Finite-field elements #
The Lean type denoting a value of SMT sort (_ FiniteField size), held as the integer representing
it. cvc5 answers in the symmetric representation, so an element of GF(5) comes back in
[-2, 2] rather than [0, 4]: 3 reads back as -2.
Converting an element to a term and back is done by Cvc.Untyped.Theory.FiniteField and
Cvc.Typed.Theory.FiniteField.
An element of a finite field of size size, held as an integer representing it.
Any integer congruent to it modulo size represents the same element, but equality, order and
hashing compare the integers: ⟨6⟩ : FiniteField 7 and ⟨-1⟩ are the same element yet not equal.
Values read from cvc5 come in its symmetric representation, 6 reading back as -1.
- repr : Int
Element representation.
Instances For
Instances For
Equations
Equations
- Cvc.instOrdFiniteField.ord { repr := a } { repr := b } = (compare a b).then Ordering.eq
Instances For
Equations
- Cvc.instOrdFiniteField = { compare := Cvc.instOrdFiniteField.ord }
Equations
- Cvc.FiniteField.instToTyp = { typ := Cvc.Typ.finiteField size }
Erased version of FiniteField.
- size : Nat
The field's size.
- get : FiniteField self.size
The actual finite field element.
Instances For
Erases a finite-field-element's size.
Instances For
String representation.
Instances For
Equations
- Cvc.FiniteField.instToString = { toString := Cvc.FiniteField.toString }