Instances For
- core (a b : Expr) (lhs rhs : LinExpr) : EqCnstrProof
- coreCommRing (a b : Expr) (ra rb : Grind.CommRing.Expr) (p : CommRing.Poly) (lhs' : LinExpr) : EqCnstrProof
- neg (c : EqCnstr) : EqCnstrProof
- coeff (k : Nat) (c : EqCnstr) : EqCnstrProof
- subst (x : Var) (c₁ c₂ : EqCnstr) : EqCnstrProof
Instances For
An inequality constraint and its justification/proof.
- p : Poly
- strict : Bool
- h : IneqCnstrProof
Instances For
- core (e : Expr) (lhs rhs : LinExpr) : IneqCnstrProof
- notCore (e : Expr) (lhs rhs : LinExpr) : IneqCnstrProof
- coreCommRing (e : Expr) (lhs rhs : Grind.CommRing.Expr) (p : CommRing.Poly) (lhs' : LinExpr) : IneqCnstrProof
- notCoreCommRing (e : Expr) (lhs rhs : Grind.CommRing.Expr) (p : CommRing.Poly) (lhs' : LinExpr) : IneqCnstrProof
- combine (c₁ c₂ : IneqCnstr) : IneqCnstrProof
- norm (c₁ : IneqCnstr) (k : Nat) : IneqCnstrProof
- dec (h : FVarId) : IneqCnstrProof
- ofDiseqSplit (c₁ : DiseqCnstr) (decVar : FVarId) (h : UnsatProof) (decVars : Array FVarId) : IneqCnstrProof
- oneGtZero : IneqCnstrProof
- ofEq
(a b : Expr)
(la lb : LinExpr)
: IneqCnstrProof
a ≤ bfrom an equalitya = bcoming from the core. - ofCommRingEq
(a b : Expr)
(ra rb : Grind.CommRing.Expr)
(p : CommRing.Poly)
(lhs' : LinExpr)
: IneqCnstrProof
a ≤ bfrom an equalitya = bcoming from the core. - subst (x : Var) (c₁ : EqCnstr) (c₂ : IneqCnstr) : IneqCnstrProof
Instances For
- p : Poly
- h : DiseqCnstrProof
Instances For
- core (a b : Expr) (lhs rhs : LinExpr) : DiseqCnstrProof
- coreCommRing (a b : Expr) (ra rb : Grind.CommRing.Expr) (p : CommRing.Poly) (lhs' : LinExpr) : DiseqCnstrProof
- neg (c : DiseqCnstr) : DiseqCnstrProof
- subst (k₁ k₂ : Int) (c₁ : EqCnstr) (c₂ : DiseqCnstr) : DiseqCnstrProof
- subst1 (k : Int) (c₁ : EqCnstr) (c₂ : DiseqCnstr) : DiseqCnstrProof
- oneNeZero : DiseqCnstrProof
Instances For
- diseq (c : DiseqCnstr) : UnsatProof
- lt (c : IneqCnstr) : UnsatProof
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
State for each algebraic structure by this module.
Each type must at least implement the instance IntModule.
For being able to process inequalities, it must at least implement Preorder, and OrderedAdd
- id : Nat
If the structure is a ring, we store its id in the
CommRingmodule atringId?- type : Expr
- u : Level
Cached
getDecLevel type - intModuleInst : Expr
IntModuleinstance Preorderinstance if availableOrderedAddinstance withPreorderif availablePartialOrderinstance if availableLinearOrderinstance if availableNoNatZeroDivisorsRinginstanceCommRinginstanceOrderedRinginstance withPreorderFieldinstanceIsCharPinstance fortypeif available.- zero : Expr
- ofNatZero : Expr
- addFn : Expr
- zsmulFn : Expr
- nsmulFn : Expr
- subFn : Expr
- negFn : Expr
Mapping from variables to their denotations. Remark each variable can be in only one ring.
Mapping from
Exprto a variable representing it.Mapping from variables to their "lower" bounds. We say a relational constraint
cis a lower bound for a variablexifxis the maximal variable inc, andxcoefficient incis negative.Mapping from variables to their "upper" bounds. We say a relational constraint
cis a upper bound for a variablexifxis the maximal variable inc, andxcoefficient incis positive.- diseqs : PArray (PArray DiseqCnstr)
Mapping from variables to their disequalities. We say a disequality constraint
cis a disequality for a variablexifxis the maximal variable inc. Partial assignment being constructed by linarith.
- caseSplits : Bool
caseSplitsistrueif linarith is searching for model and already performed case splits. This information is used to decide whether a conflict should immediately close the currentgrindgoal or not. - conflict? : Option UnsatProof
conflict?issome ..if a contradictory constraint was derived. This field is only set whencaseSplitsistrue. Otherwise, we can convertUnsatProofinto a Lean term and close the currentgrindgoal. Cache decision variables used when splitting on disequalities. This is necessary because the same disequality may be in different conflicts.
Mapping from variable to occurrences. For example, an entry
x ↦ {y, z}means thatxmay occur inlowers, oruppers, ordiseqsof variablesyandz. Ifxoccurs indiseqs[y],lowers[y], oruppers[y], thenyis inoccurs[x], but the reverse is not true. Ifxis inelimStack, thenoccurs[x]is the empty set.Linear constraints that are not supported. We use this information for diagnostics. TODO: store constraints instead.
Instances For
Equations
- One or more equations did not get rendered due to their size.
State for all IntModule types detected by grind.
Structures detected. We expect to find a small number of
IntModules in a given goal. Thus, usingArrayis fine here.