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 ≤ b
from an equalitya = b
coming from the core. - ofCommRingEq
(a b : Expr)
(ra rb : Grind.CommRing.Expr)
(p : CommRing.Poly)
(lhs' : LinExpr)
: IneqCnstrProof
a ≤ b
from an equalitya = b
coming 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
CommRing
module atringId?
- type : Expr
- u : Level
Cached
getDecLevel type
- intModuleInst : Expr
IntModule
instance Preorder
instance if availableOrderedAdd
instance withPreorder
if availablePartialOrder
instance if availableLinearOrder
instance if availableNoNatZeroDivisors
Ring
instanceCommRing
instanceOrderedRing
instance withPreorder
Field
instanceIsCharP
instance fortype
if 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
Expr
to a variable representing it.Mapping from variables to their "lower" bounds. We say a relational constraint
c
is a lower bound for a variablex
ifx
is the maximal variable inc
, andx
coefficient inc
is negative.Mapping from variables to their "upper" bounds. We say a relational constraint
c
is a upper bound for a variablex
ifx
is the maximal variable inc
, andx
coefficient inc
is positive.- diseqs : PArray (PArray DiseqCnstr)
Mapping from variables to their disequalities. We say a disequality constraint
c
is a disequality for a variablex
ifx
is the maximal variable inc
. Partial assignment being constructed by linarith.
- caseSplits : Bool
caseSplits
istrue
if linarith is searching for model and already performed case splits. This information is used to decide whether a conflict should immediately close the currentgrind
goal or not. - conflict? : Option UnsatProof
conflict?
issome ..
if a contradictory constraint was derived. This field is only set whencaseSplits
istrue
. Otherwise, we can convertUnsatProof
into a Lean term and close the currentgrind
goal. 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 thatx
may occur inlowers
, oruppers
, ordiseqs
of variablesy
andz
. Ifx
occurs indiseqs[y]
,lowers[y]
, oruppers[y]
, theny
is inoccurs[x]
, but the reverse is not true. Ifx
is 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
IntModule
s in a given goal. Thus, usingArray
is fine here.