Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Meta.Grind.Arith.Linear.instHashablePoly_lean.hash Lean.Grind.Linarith.Poly.nil = 0
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Meta.Grind.Arith.Linear.instHashableExpr_lean.hash Lean.Grind.Linarith.Expr.zero = 0
- Lean.Meta.Grind.Arith.Linear.instHashableExpr_lean.hash (Lean.Grind.Linarith.Expr.var a) = mixHash 1 (hash a)
- Lean.Meta.Grind.Arith.Linear.instHashableExpr_lean.hash a.neg = mixHash 4 (Lean.Meta.Grind.Arith.Linear.instHashableExpr_lean.hash a)
- Lean.Meta.Grind.Arith.Linear.instHashableExpr_lean.hash (Lean.Grind.Linarith.Expr.natMul a a_1) = mixHash (mixHash 5 (hash a)) (Lean.Meta.Grind.Arith.Linear.instHashableExpr_lean.hash a_1)
- Lean.Meta.Grind.Arith.Linear.instHashableExpr_lean.hash (Lean.Grind.Linarith.Expr.intMul a a_1) = mixHash (mixHash 6 (hash a)) (Lean.Meta.Grind.Arith.Linear.instHashableExpr_lean.hash a_1)
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
- coreOfNat (a b : Expr) (natStructId : Nat) (lhs rhs : 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
- coreOfNat (e : Expr) (natStructId : Nat) (lhs rhs : LinExpr) : IneqCnstrProof
- notCoreOfNat (e : Expr) (natStructId : Nat) (lhs rhs : 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. - ofEqOfNat
(a b : Expr)
(natStructId : Nat)
(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
- coreOfNat (a b : Expr) (natStructId : Nat) (lhs rhs : 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 LEinstance if availableLTinstance if availableLawfulOrderLTinstance if availableIsPreorderinstance if availableOrderedAddinstance withIsPreorderif availableIsPartialOrderinstance if availableIsLinearOrderinstance 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.
Instances For
- id : Nat
- structId : Nat
Id for
OfNatModule.Q - type : Expr
- u : Level
Cached
getDecLevel type - natModuleInst : Expr
NatModuleinstance fortype LEinstance if availableLTinstance if availableLawfulOrderLTinstance if availableIsPreorderinstance if availableOrderedAddinstance withIsPreorderif availableIsLinearOrderinstance if available- rfl_q : Expr
- zero : Expr
- toQFn : Expr
- addFn : Expr
- smulFn : Expr
Instances For
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.Some types are unordered rings, so we do not process them in
linarith. When such types are detected ingetStructId?, we add them to the setforbiddenNatModulesto avoid reprocessing them ingetNatStructId?.NatModule. We support them using the envelopeOfNatModule.Q
Instances For
Equations
- One or more equations did not get rendered due to their size.