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
checkCoeffDvd
istrue
, then when using a polynomialk*m - p
to simplify.. + k'*m*m_2 + ...
, the substitution is performed IFk
dividesk'
, 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 = 0
since the ring does not implementNoNatZeroDivisors
See comment atPolyDerivation
.
Instances For
- getRing : m Ring
Helper function for removing dependency on
GoalM
. During search we want to track the instances synthesized bygrind
, and this isGrind.synthInstance
.
Instances
def
Lean.Meta.Grind.Arith.CommRing.MonadRing.synthInstance
{m : Type → Type}
[Monad m]
[MonadError m]
[MonadRing m]
(type : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[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
Equations
- One or more equations did not get rendered due to their size.
@[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
Equations
- One or more equations did not get rendered due to their size.
@[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
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 (Std.TreeSet.isEmpty __do_lift.queue)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getAddFn
{m : Type → Type}
[MonadError m]
[Monad m]
[MonadRing m]
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getSubFn
{m : Type → Type}
[MonadError m]
[Monad m]
[MonadRing m]
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getMulFn
{m : Type → Type}
[MonadError m]
[Monad m]
[MonadRing m]
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getNegFn
{m : Type → Type}
[MonadError m]
[Monad m]
[MonadRing m]
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getInvFn
{m : Type → Type}
[MonadError m]
[Monad m]
[MonadRing m]
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getPowFn
{m : Type → Type}
[MonadLiftT MetaM m]
[MonadError m]
[Monad m]
[MonadRing m]
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getIntCastFn
{m : Type → Type}
[MonadLiftT MetaM m]
[Monad m]
[MonadRing m]
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getNatCastFn
{m : Type → Type}
[MonadLiftT MetaM m]
[Monad m]
[MonadRing m]
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Grind.Arith.CommRing.getOne
{m : Type → Type}
[Monad m]
[MonadRing m]
[MonadLiftT GoalM m]
:
m Expr
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
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
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
Equations
- One or more equations did not get rendered due to their size.