You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some important field constants (see Jubjub), but no way to reference them from within an Expr. They can be embedded directly into an Expr, but it's better to use names for named things.
But maybe it's more important for expression to stay self-contained. Not sure yet.
The text was updated successfully, but these errors were encountered:
About the remark about comparing the characteristic of the field with the number r in Jubjub,hs.
I'm sure you know this, but you can do something like
type P = 52435875175126190479447740508185965837690552500527637822603658699938581184513
type F = GF.Prime P
...
r == GHC.TypeLits.natVal (Proxy:: Proxy P)
I'd been wondering about this anyway because it would be good to check that the big number really is prime.
[Later] It's probably better to use char from Data.Galois.Field.
r == (toInteger $ char (zer::TinyLang.Field.Jubjub.F))
char just uses natVal anyway. It's a bit annoying that we have to compare a Natural with an Integer though.
We have some important field constants (see
Jubjub
), but no way to reference them from within anExpr
. They can be embedded directly into anExpr
, but it's better to use names for named things.But maybe it's more important for expression to stay self-contained. Not sure yet.
The text was updated successfully, but these errors were encountered: