Instances For
Equations
We don't want to keep carrying the StructId around.
Equations
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.LinearM.run structId x = x { structId := structId }
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.getStructId = do let __do_lift ← read pure __do_lift.structId
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.getRingCore? (some ringId) = Lean.Meta.Grind.Arith.CommRing.RingM.run ringId do let __do_lift ← Lean.Meta.Grind.Arith.CommRing.getRing pure (some __do_lift)
- Lean.Meta.Grind.Arith.Linear.getRingCore? ringId? = pure none
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.throwNotRing = Lean.throwError (Lean.toMessageData "`grind linarith` internal error, structure is not a ring")
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.throwNotCommRing = Lean.throwError (Lean.toMessageData "`grind linarith` internal error, structure is not a commutative ring")
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.getRing? = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct liftM (Lean.Meta.Grind.Arith.Linear.getRingCore? __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.
Equations
- Lean.Meta.Grind.Arith.Linear.getZero = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct pure __do_lift.zero
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
- Lean.Meta.Grind.Arith.Linear.isCommRing = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct pure __do_lift.ringId?.isSome
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.isLinearOrder = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct pure __do_lift.linearInst?.isSome
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.hasNoNatZeroDivisors = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct pure __do_lift.noNatDivInst?.isSome
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.getTermStructId? e = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.get' pure (Lean.PersistentHashMap.find? __do_lift.exprToStructId { expr := e })
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.
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.isOrderedAdd = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct pure __do_lift.orderedAddInst?.isSome
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.
Instances For
Tries to evaluate the polynomial p using the partial model/assignment built so far.
The result is none if the polynomial contains variables that have not been assigned.
Equations
- p.eval? = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct have a : Lean.PArray Std.Internal.Rat := __do_lift.assignment pure (Lean.Grind.Linarith.Poly.eval?.go✝ a 0 p)
Instances For
Returns .true if c is satisfied by the current partial model,
.undef if c contains unassigned variables, and .false otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Resets the assignment of any variable bigger or equal to x.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Grind.Arith.Linear.getVar x = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct pure __do_lift.vars[x]!
Instances For
Returns true if the linarith state is inconsistent.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns true if x has been eliminated using an equality constraint.
Equations
- Lean.Meta.Grind.Arith.Linear.eliminated x = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct pure __do_lift.elimEqs[x]!.isSome
Instances For
Returns occurrences of x.
Equations
- Lean.Meta.Grind.Arith.Linear.getOccursOf x = do let __do_lift ← Lean.Meta.Grind.Arith.Linear.getStruct pure __do_lift.occurs[x]!
Instances For
Adds y as an occurrence of x.
That is, x occurs in lowers[y], uppers[y], or diseqs[y].
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given p a polynomial being inserted into lowers, uppers, or diseqs,
get its leading variable y, and adds y as an occurrence for the remaining variables in p.
Equations
- (Lean.Grind.Linarith.Poly.add k x p_2).updateOccs = Lean.Grind.Linarith.Poly.updateOccs.go✝ x p_2
- p.updateOccs = Lean.throwError (Lean.toMessageData "`grind linarith` internal error, unexpected constant polynomial")
Instances For
Given a polynomial p, returns some (x, k, c) if p contains the monomial k*x,
and x has been eliminated using the equality c.
Equations
- One or more equations did not get rendered due to their size.
- Lean.Grind.Linarith.Poly.nil.findVarToSubst = pure none
Instances For
Equations
- Lean.Grind.Linarith.Poly.nil.gcdCoeffsAux x✝ = x✝
- (Lean.Grind.Linarith.Poly.add k' v p).gcdCoeffsAux x✝ = p.gcdCoeffsAux (k'.gcd ↑x✝)
Instances For
Equations
- (Lean.Grind.Linarith.Poly.add k v p_2).gcdCoeffs = p_2.gcdCoeffsAux k.natAbs
- Lean.Grind.Linarith.Poly.nil.gcdCoeffs = 1
Instances For
Equations
- (Lean.Grind.Linarith.Poly.add k_1 v p_2).div k = Lean.Grind.Linarith.Poly.add (k_1 / k) v (p_2.div k)
- Lean.Grind.Linarith.Poly.nil.div k = Lean.Grind.Linarith.Poly.nil
Instances For
Selects the variable in the given linear polynomial whose coefficient has the smallest absolute value.