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
Instances
Instances
Instances
- CommRing.toGrindCommRing
- Lean.Grind.Fin.instCommRingFinOfNeZeroNat
- Lean.Grind.instCommRingBitVec
- Lean.Grind.instCommRingISize
- Lean.Grind.instCommRingInt
- Lean.Grind.instCommRingInt16
- Lean.Grind.instCommRingInt32
- Lean.Grind.instCommRingInt64
- Lean.Grind.instCommRingInt8
- Lean.Grind.instCommRingUInt16
- Lean.Grind.instCommRingUInt32
- Lean.Grind.instCommRingUInt64
- Lean.Grind.instCommRingUInt8
- Lean.Grind.instCommRingUSize
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances
- Lean.Grind.Fin.instIsCharPFin
- Lean.Grind.instIsCharPBitVecHPowNatOfNat
- Lean.Grind.instIsCharPISizeHPowNatOfNatNumBits
- Lean.Grind.instIsCharPInt16HPowNatOfNat
- Lean.Grind.instIsCharPInt32HPowNatOfNat
- Lean.Grind.instIsCharPInt64HPowNatOfNat
- Lean.Grind.instIsCharPInt8HPowNatOfNat
- Lean.Grind.instIsCharPIntOfNatNat
- Lean.Grind.instIsCharPUInt16OfNatNat
- Lean.Grind.instIsCharPUInt32OfNatNat
- Lean.Grind.instIsCharPUInt64OfNatNat
- Lean.Grind.instIsCharPUInt8OfNatNat
- Lean.Grind.instIsCharPUSizeHPowNatOfNatNumBits
theorem
Lean.Grind.no_int_zero_divisors
{α : Type u}
[Ring α]
[NoNatZeroDivisors α]
{k : Int}
{a : α}
: