From daf60c7c7f80b67a7730b93811855402ff88e216 Mon Sep 17 00:00:00 2001 From: Brent Carmer Date: Tue, 25 Aug 2026 12:19:45 -0700 Subject: [PATCH] add Field concept wrapping is_field --- libs/algebra/include/nil/crypto3/algebra/type_traits.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/algebra/include/nil/crypto3/algebra/type_traits.hpp b/libs/algebra/include/nil/crypto3/algebra/type_traits.hpp index 75dfcdc4e..c37c2470e 100644 --- a/libs/algebra/include/nil/crypto3/algebra/type_traits.hpp +++ b/libs/algebra/include/nil/crypto3/algebra/type_traits.hpp @@ -178,6 +178,12 @@ namespace nil { { a.pow(exponent) } -> std::same_as; }; + template + concept Field = is_field::value && requires { + typename T::value_type; + requires FieldValue; + }; + template concept FieldElementWithCoordinates = is_field_element::value && requires(T &value, const T &const_value, std::size_t index) {