Equalities or disequalities to be propagated to a theory solver after two equivalence classes have been merged.
Some solvers (e.g. cutsat
) require the core data structures to satisfy
their invariants. During the merge operations some of these invariants do not hold.
Thus, we first record the facts that must be propagated in a PendingTheoryPropagation
value,
complete the merge, and only then perform the propagation.
We now use this workflow for all theory solvers, even when a particular solver does not rely on these invariants. This keeps the core solver-agnostic and lets us modify solvers without further adjustments.
- none : PendingTheoryPropagation
Nothing to propagate.
- eq
(lhs rhs : Expr)
: PendingTheoryPropagation
Propagate the equality
lhs = rhs
. - diseqs
(ps : ParentSet)
: PendingTheoryPropagation
Propagate the disequalities in
ps
.
Instances For
Equations
Instances For
Equations
- Lean.Meta.Grind.propagateCutsat (Lean.Meta.Grind.PendingTheoryPropagation.eq lhs rhs) = Lean.Meta.Grind.Arith.Cutsat.processNewEq lhs rhs
- Lean.Meta.Grind.propagateCutsat (Lean.Meta.Grind.PendingTheoryPropagation.diseqs ps) = Lean.Meta.Grind.propagateCutsatDiseqs ps
- Lean.Meta.Grind.propagateCutsat Lean.Meta.Grind.PendingTheoryPropagation.none = pure ()
Instances For
Equations
- Lean.Meta.Grind.propagateCommRing (Lean.Meta.Grind.PendingTheoryPropagation.eq lhs rhs) = Lean.Meta.Grind.Arith.CommRing.processNewEq lhs rhs
- Lean.Meta.Grind.propagateCommRing (Lean.Meta.Grind.PendingTheoryPropagation.diseqs ps) = Lean.Meta.Grind.propagateCommRingDiseqs ps
- Lean.Meta.Grind.propagateCommRing x✝ = pure ()
Instances For
Adds a new hypothesis.
Equations
- Lean.Meta.Grind.addHypothesis fvarId generation = do let __do_lift ← liftM fvarId.getType Lean.Meta.Grind.add __do_lift (Lean.mkFVar fvarId) generation