Returns true if the variables in the given polynomial are sorted
in decreasing order.
Equations
Instances For
Equations
Instances For
Returns true if the cutsat state is inconsistent.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Creates a new variable in the cutsat module.
Equations
- Lean.Meta.Grind.Arith.Cutsat.getVars = do let __do_lift ← Lean.Meta.Grind.Arith.Cutsat.get' pure __do_lift.vars
Instances For
Equations
- Lean.Meta.Grind.Arith.Cutsat.getVar x = do let __do_lift ← Lean.Meta.Grind.Arith.Cutsat.get' pure __do_lift.vars[x]!
Instances For
Returns true if e is already associated with a cutsat variable.
Equations
- Lean.Meta.Grind.Arith.Cutsat.hasVar e = do let __do_lift ← Lean.Meta.Grind.Arith.Cutsat.get' pure (Lean.PersistentHashMap.contains __do_lift.varMap { expr := e })
Instances For
Instances For
Returns true if x has been eliminated using an equality constraint.
Equations
- Lean.Meta.Grind.Arith.Cutsat.eliminated x = do let __do_lift ← Lean.Meta.Grind.Arith.Cutsat.get' pure __do_lift.elimEqs[x]!.isSome
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
- One or more equations did not get rendered due to their size.
- (Int.Linear.Poly.num k).pp = pure (Lean.toMessageData k)
- (Int.Linear.Poly.add 1 x p_2).pp = do let __do_lift ← Lean.Meta.Grind.Arith.Cutsat.getVar x Int.Linear.Poly.pp.go✝ (Lean.Meta.Grind.Arith.quoteIfArithTerm __do_lift) p_2
Instances For
Equations
- p.denoteExpr' = do let vars ← Lean.Meta.Grind.Arith.Cutsat.getVars let __do_lift ← liftM (Int.Linear.Poly.denoteExpr (fun (x : Nat) => vars[x]!) p) pure __do_lift
Instances For
Equations
- c.pp = do let __do_lift ← c.p.pp pure (Lean.toMessageData c.d ++ Lean.toMessageData " ∣ " ++ Lean.toMessageData __do_lift)
Instances For
Equations
- c.denoteExpr = do let __do_lift ← c.p.denoteExpr' pure (Lean.mkIntDvd (Lean.toExpr c.d) __do_lift)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- c.pp = do let __do_lift ← c.p.pp pure (Lean.toMessageData __do_lift ++ Lean.toMessageData " ≠ 0")
Instances For
Equations
- c.throwUnexpected = do let __do_lift ← c.pp Lean.throwError (Lean.toMessageData "`grind` internal error, unexpected" ++ Lean.toMessageData (Lean.indentD __do_lift))
Instances For
Equations
- c.denoteExpr = do let __do_lift ← c.p.denoteExpr' pure (Lean.mkNot (Lean.mkIntEq __do_lift (Lean.mkIntLit 0)))
Instances For
Equations
- c.pp = do let __do_lift ← c.p.pp pure (Lean.toMessageData __do_lift ++ Lean.toMessageData " ≤ 0")
Instances For
Equations
- c.denoteExpr = do let __do_lift ← c.p.denoteExpr' pure (Lean.mkIntLE __do_lift (Lean.mkIntLit 0))
Instances For
Equations
- c.throwUnexpected = do let __do_lift ← c.pp Lean.throwError (Lean.toMessageData "`grind` internal error, unexpected" ++ Lean.toMessageData (Lean.indentD __do_lift))
Instances For
Instances For
Equations
- c.pp = do let __do_lift ← c.p.pp pure (Lean.toMessageData __do_lift ++ Lean.toMessageData " = 0")
Instances For
Equations
- c.denoteExpr = do let __do_lift ← c.p.denoteExpr' pure (Lean.mkIntEq __do_lift (Lean.mkIntLit 0))
Instances For
Equations
- c.throwUnexpected = do let __do_lift ← c.pp Lean.throwError (Lean.toMessageData "`grind` internal error, unexpected" ++ Lean.toMessageData (Lean.indentD __do_lift))
Instances For
Returns occurrences of x.
Equations
- Lean.Meta.Grind.Arith.Cutsat.getOccursOf x = do let __do_lift ← Lean.Meta.Grind.Arith.Cutsat.get' pure __do_lift.occurs[x]!
Instances For
Adds y as an occurrence of x.
That is, x occurs in lowers[y], uppers[y], or dvdCnstrs[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 dvdCnstrs,
get its leading variable y, and adds y as an occurrence for the remaining variables in p.
Equations
- (Int.Linear.Poly.add k x p_2).updateOccs = Int.Linear.Poly.updateOccs.go✝ x p_2
- p.updateOccs = Lean.throwError (Lean.toMessageData "`grind` internal error, unexpected constant polynomial")
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.Cutsat.get' have a : Lean.PArray Rat := __do_lift.assignment pure (Int.Linear.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
Equations
- p.satisfiedLe = do let __discr ← p.eval? match __discr with | some v => pure (decide (v ≤ 0)).toLBool | x => pure Lean.LBool.undef
Instances For
Returns .true if c is satisfied by the current partial model,
.undef if c contains unassigned variables, and .false otherwise.
Equations
- c.satisfied = c.p.satisfiedLe
Instances For
Returns .true if c is satisfied by the current partial model,
.undef if c contains unassigned variables, and .false otherwise.
Equations
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.
- (Int.Linear.Poly.num k).findVarToSubst = pure none
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.
- (Lean.Meta.Grind.Arith.Cutsat.UnsatProof.le c).pp = c.pp
- (Lean.Meta.Grind.Arith.Cutsat.UnsatProof.eq c).pp = c.pp
- (Lean.Meta.Grind.Arith.Cutsat.UnsatProof.dvd c).pp = c.pp
- (Lean.Meta.Grind.Arith.Cutsat.UnsatProof.diseq c).pp = c.pp