proof-systems icon indicating copy to clipboard operation
proof-systems copied to clipboard

Should we move T: Field to T: PrimeField everywhere?

Open mimoo opened this issue 3 years ago • 3 comments

Since kimchi is built exclusively for prime fields (and not for extension fields, for example), it might make sense to move to PrimeField everywhere instead of having Field, FftField, and PrimeField all over the place

mimoo avatar Jul 12 '22 18:07 mimoo

there's also SquareRootField used in some places

mimoo avatar Jul 12 '22 18:07 mimoo

as a helper:

/// The interface for a field that supports an efficient square-root operation.
SquareRootField: Field

PrimeField: Field + FftField
FftField: Field

mimoo avatar Jul 12 '22 18:07 mimoo

I think the only disadvantage is that some bounds will apply unnecessary constraints and it will be a bit harder to know if something needs PrimeField or only a subset of it. But I don't if that's even something that's true now, if it isn't I think is more consistent to just use PrimeField.

fabrizio-m avatar Jul 12 '22 20:07 fabrizio-m

Stale issue message

github-actions[bot] avatar Sep 11 '22 07:09 github-actions[bot]