A monolithic commutative ring typeclass for internal use in grind
. #
The Lean.Grind.CommRing
class will be used to convert expressions into the internal representation via polynomials,
with coefficients expressed via OfNat
and Neg
.
The IsCharP α p
typeclass expresses that the ring has characteristic p
,
i.e. that a coefficient OfNat.ofNat x : α
is zero if and only if x % p = 0
(in Nat
).
See
theorem ofNat_ext_iff {x y : Nat} : OfNat.ofNat (α := α) x = OfNat.ofNat (α := α) y ↔ x % p = y % p
theorem ofNat_emod (x : Nat) : OfNat.ofNat (α := α) (x % p) = OfNat.ofNat x
theorem ofNat_eq_iff_of_lt {x y : Nat} (h₁ : x < p) (h₂ : y < p) :
OfNat.ofNat (α := α) x = OfNat.ofNat (α := α) y ↔ x = y
Instances
theorem
Lean.Grind.no_int_zero_divisors
{α : Type u}
[CommRing α]
[NoNatZeroDivisors α]
{k : Int}
{a : α}
: