Abstract Cyclic-Group Parameters #
GroupParam axiomatizes a finite cyclic group of prime order together with its
scalar field, packaged as a single structure so protocol definitions can quantify
over an arbitrary such group. The carrier G is the group; Scalar is the field
ℤ/qℤ where q = |g|; exp x = gᣞ is generator exponentiation and groupExp h x
is exponentiation of an arbitrary element. The structure records the group and
scalar-field axioms as fields, so a concrete instantiation discharges them once and
every downstream proof reasons purely equationally.
This is the abstract group interface used by the UC examples over discrete-log groups (Pedersen commitment, dual-mode oblivious transfer).
Parameters for a finite cyclic group of prime order together with its scalar
field ℤ/qℤ. The carrier G is the group with generator generator; Scalar
is the field of exponents; exp is generator exponentiation and groupExp is
exponentiation of an arbitrary group element. The remaining fields record the
group and field axioms needed for equational reasoning.
- G : Type
The group carrier.
- Scalar : Type
The scalar field
ℤ/qℤ, whereqis the order of the generator. Gis finite.Gis nonempty.- decG : DecidableEq self.G
Ghas decidable equality. Scalaris finite.Scalaris nonempty.- decScalar : DecidableEq self.Scalar
Scalarhas decidable equality. - generator : self.G
The generator
g. - identity : self.G
The group identity element.
Generator exponentiation
g ^ x.Exponentiation of an arbitrary element
h ^ x.Scalar addition.
Scalar multiplication.
Scalar subtraction.
Scalar division (well-defined by primality of the order).
Scalar negation.
- scalarZero : self.Scalar
The additive identity scalar.
Group multiplication.
Group inverse.
- scalarOne : self.Scalar
The multiplicative identity scalar.
- exp_add (x y : self.Scalar) : self.exp (self.scalarAdd x y) = self.groupMul (self.exp x) (self.exp y)
Generator exponentiation is a homomorphism:
g ^ (x + y) = gᣞ · gᣩ. g ^ 0 = 1.- div_mul_cancel (x y : self.Scalar) : y ≠ self.scalarZero → self.scalarMul (self.scalarDiv x y) y = x
Division is a right inverse to multiplication:
(x / y) · y = xfory ≠ 0. Generator exponentiation is a special case of general exponentiation.
Exponentiation of a power:
(g ^ w) ^ e = g ^ (w · e).h ^ 1 = h.- groupExp_add (h : self.G) (a b : self.Scalar) : self.groupExp h (self.scalarAdd a b) = self.groupMul (self.groupExp h a) (self.groupExp h b)
General exponentiation is additive in the exponent.
- scalarSub_ne_zero (a b : self.Scalar) : a ≠ b → self.scalarSub a b ≠ self.scalarZero
Distinct scalars have nonzero difference.
Right identity for group multiplication.
Left identity for group multiplication.
Right inverse for group multiplication.
Left inverse for group multiplication.
- groupMul_assoc (a b c : self.G) : self.groupMul (self.groupMul a b) c = self.groupMul a (self.groupMul b c)
Group multiplication is associative.
h ^ 0 = 1.a · 1 = a.- groupInv_groupExp (h : self.G) (e : self.Scalar) : self.groupInv (self.groupExp h e) = self.groupExp h (self.scalarNeg e)
Inverse of a power:
(h ^ e)⁻¹ = h ^ (-e). Subtraction as addition of the negation.
Right negation cancels:
a + (-a) = 0.Generator exponentiation is surjective.
Generator exponentiation is injective (prime order).
Scalar addition is commutative.
- scalarAdd_assoc (a b c : self.Scalar) : self.scalarAdd (self.scalarAdd a b) c = self.scalarAdd a (self.scalarAdd b c)
Scalar addition is associative.
- scalarMul_add (a b c : self.Scalar) : self.scalarMul a (self.scalarAdd b c) = self.scalarAdd (self.scalarMul a b) (self.scalarMul a c)
Scalar multiplication distributes over addition on the left.
- scalarAdd_mul (a b c : self.Scalar) : self.scalarMul (self.scalarAdd a b) c = self.scalarAdd (self.scalarMul a c) (self.scalarMul b c)
Scalar multiplication distributes over addition on the right.
Scalar multiplication is commutative.
Right additive identity:
a + 0 = a.Left additive identity:
0 + a = a.Left negation cancels:
(-a) + a = 0.Negation of zero is zero.
- scalarNeg_add_distrib (a b : self.Scalar) : self.scalarNeg (self.scalarAdd a b) = self.scalarAdd (self.scalarNeg a) (self.scalarNeg b)
Negation distributes over addition.
a · 0 = 0.0 · a = 0.- mul_div_cancel (a b : self.Scalar) : b ≠ self.scalarZero → self.scalarDiv (self.scalarMul a b) b = a
Division cancels multiplication:
(a · b) / b = aforb ≠ 0. - scalarMul_assoc (a b c : self.Scalar) : self.scalarMul (self.scalarMul a b) c = self.scalarMul a (self.scalarMul b c)
Scalar multiplication is associative.