Cyclic groups of prime order (EasyCrypt theories/algebra/Group.ec) #
What a development gets by
clone CyclicGroup as G.
axiom prime_p : IntDiv.prime G.order.
clone G.PowZMod as GP with lemma prime_order <- prime_p.
clone GP.FDistr as FD.
a cyclic group group with generator g, its exponents exp (the field Z/pZ of PowZMod),
exponentiation x ^ k, the discrete logarithm loge, and the uniform distribution dt on the
exponents (FDistr). Only what ported developments use is here. Names are EasyCrypt's.
The operations of the group and of the field are Mathlib's (CommGroup group, Field exp):
EC's e, *, inv, / are 1, *, ⁻¹, /; the lemmas of EC's ZModpField on exp are
those of a field (ring). The class Params group exp holds what Mathlib does not: the
generator, the exponentiation by a field element, the logarithm and their laws. Its types are
outParams, as for every theory: inside a development that clones it nothing is written.
EC's types are inhabited (witness): group by its unit.
Equations
- GaudisCrypt.EC.CyclicGroup.instInhabited_gaudisCrypt = { default := 1 }
exp is inhabited, by its zero.
Equations
- GaudisCrypt.EC.CyclicGroup.instInhabited_gaudisCrypt_1 = { default := 0 }
FDistr #
EC's op dt : exp distr = dunifin: the uniform distribution on the exponents (an
abbreviation: EC's provers see through an operator's body, and so do the closers here).