Returns true if the variables in the given polynomial are sorted
in decreasing order.
Equations
Instances For
Equations
- Int.Linear.Poly.isSorted.go x✝ (Int.Linear.Poly.num k) = true
- Int.Linear.Poly.isSorted.go none (Int.Linear.Poly.add k y p) = Int.Linear.Poly.isSorted.go (some y) p
- Int.Linear.Poly.isSorted.go (some x_2) (Int.Linear.Poly.add k y p) = (decide (x_2 > y) && Int.Linear.Poly.isSorted.go (some y) p)
Instances For
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
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 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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Grind.Arith.Cutsat.mkEqCnstr p h = do let __do_lift ← Lean.Meta.Grind.Arith.Cutsat.mkCnstrId pure { p := p, h := h, id := __do_lift }
Instances For
Equations
Instances For
Resets the assingment 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 "" ++ Lean.toMessageData k ++ Lean.toMessageData "")
- (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.quoteIfNotAtom __do_lift) p_2
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Int.Linear.Poly.pp.go r (Int.Linear.Poly.num 0) = pure r
- Int.Linear.Poly.pp.go r (Int.Linear.Poly.num k) = pure (Lean.toMessageData "" ++ Lean.toMessageData r ++ Lean.toMessageData " + " ++ Lean.toMessageData k ++ Lean.toMessageData "")
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 "" ++ Lean.toMessageData c.d ++ Lean.toMessageData " ∣ " ++ Lean.toMessageData __do_lift ++ Lean.toMessageData "")
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 "" ++ Lean.toMessageData __do_lift ++ Lean.toMessageData " ≠ 0")
Instances For
Equations
- One or more equations did not get rendered due to their size.
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 "" ++ 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
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
- c.pp = do let __do_lift ← c.p.pp pure (Lean.toMessageData "" ++ 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
- One or more equations did not get rendered due to their size.
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
- cache : Std.HashMap Nat Expr
Instances For
Auxiliary monad for constructing cutsat proofs.
Equations
Instances For
Returns a Lean expression representing the variable context used to construct cutsat proofs.
Equations
Instances For
Equations
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' let a : Lean.PArray Std.Internal.Rat := __do_lift.assignment pure (Int.Linear.Poly.eval?.go a 0 p)
Instances For
Equations
- Int.Linear.Poly.eval?.go a v (Int.Linear.Poly.num k) = some (v + { num := k, den := 1 })
- Int.Linear.Poly.eval?.go a v (Int.Linear.Poly.add k x_1 p) = if x : x_1 < a.size then Int.Linear.Poly.eval?.go a (v + { num := k, den := 1 } * a[x_1]) p else none
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