Integers and Gaussian integers as pairs of naturals #
Mathlib's Primrec has no arithmetic on ℤ (and no Primcodable ℤ), so the enumeration behind
lem:value-lower-approx carries its integers as pairs of naturals: PInt := ℕ × ℕ denotes
a - b, and GInt := PInt × PInt denotes the Gaussian integer m + n i. Equality and order are
the semantic ones (PInt.Eq', PInt.Lt', GInt.Eq'), decidable and primitive recursive;
PInt.toInt and GInt.toC read the values off and commute with the operations provided. Every
function here is primitive recursive, with the proof next to the definition.
Integers #
@[reducible, inline]
An integer a - b, as the pair (a, b) of naturals.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
@[instance_reducible]
@[instance_reducible]
Gaussian integers #
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
@[instance_reducible]