Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- ringId : Nat
- checkCoeffDvd : Bool
If
checkCoeffDvdistrue, then when using a polynomialk*m - pto simplify.. + k'*m*m_2 + ..., the substitution is performed IFkdividesk', OR- Ring implements
NoNatZeroDivisors.
We need this check when simplifying disequalities. In this case, if we perform the simplification anyway, we may end up with a proof that
k * q = 0, but we cannot deduceq = 0since the ring does not implementNoNatZeroDivisorsSee comment atPolyDerivation.
Instances For
@[always_inline]
instance
Lean.Meta.Grind.Arith.CommRing.instMonadGetRingOfMonadLift
(m n : Type → Type)
[MonadLift m n]
[MonadGetRing m]
:
Equations
@[reducible, inline]
We don't want to keep carrying the RingId around.
Equations
Instances For
@[reducible, inline]
Equations
- Lean.Meta.Grind.Arith.CommRing.RingM.run ringId x = x { ringId := ringId }
Instances For
@[reducible, inline]
Equations
- Lean.Meta.Grind.Arith.CommRing.getRingId = do let __do_lift ← read pure __do_lift.ringId
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
Equations
Instances For
@[reducible, inline]
abbrev
Lean.Meta.Grind.Arith.CommRing.SemiringM.run
{α : Type}
(semiringId : Nat)
(x : SemiringM α)
:
GoalM α
Equations
- Lean.Meta.Grind.Arith.CommRing.SemiringM.run semiringId x = x { semiringId := semiringId }
Instances For
@[reducible, inline]
Equations
- Lean.Meta.Grind.Arith.CommRing.getSemiringId = do let __do_lift ← read pure __do_lift.semiringId
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
Equations
- Lean.Meta.Grind.Arith.CommRing.withCheckCoeffDvd x = withReader (fun (ctx : Lean.Meta.Grind.Arith.CommRing.RingM.Context) => { ringId := ctx.ringId, checkCoeffDvd := true }) x
Instances For
Equations
- Lean.Meta.Grind.Arith.CommRing.checkCoeffDvd = do let __do_lift ← read pure __do_lift.checkCoeffDvd
Instances For
Equations
- Lean.Meta.Grind.Arith.CommRing.getTermRingId? e = do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.get' pure (Lean.PersistentHashMap.find? __do_lift.exprToRingId { expr := e })
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Grind.Arith.CommRing.getTermSemiringId? e = do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.get' pure (Lean.PersistentHashMap.find? __do_lift.exprToSemiringId { expr := e })
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns some c if the current ring has a nonzero characteristic c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns some (charInst, c) if the current ring has a nonzero characteristic c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Grind.Arith.CommRing.noZeroDivisorsInst? = do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.getRing pure __do_lift.noZeroDivInst?
Instances For
Returns true if the current ring satisfies the property
∀ (k : Nat) (a : α), k ≠ 0 → OfNat.ofNat (α := α) k * a = 0 → a = 0
Equations
- Lean.Meta.Grind.Arith.CommRing.noZeroDivisors = do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.getRing pure __do_lift.noZeroDivInst?.isSome
Instances For
Returns true if the current ring has a IsCharP instance.
Equations
- Lean.Meta.Grind.Arith.CommRing.hasChar = do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.getRing pure __do_lift.charInst?.isSome
Instances For
Equations
- Lean.Meta.Grind.Arith.CommRing.isField = do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.getRing pure __do_lift.fieldInst?.isSome
Instances For
Equations
- Lean.Meta.Grind.Arith.CommRing.isQueueEmpty = do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.getRing pure (Lean.RBTree.isEmpty __do_lift.queue)
Instances For
Equations
- One or more equations did not get rendered due to their size.