The Assignment
inductive datatype is used in the assignments
field of default formulas (defined in
Formula.Implementation.lean) to store and quickly access information about whether unit literals are
contained in (or entailed by) a formula.
The elements of Assignment
can be viewed as a lattice where both
is top, satisfying both hasPosAssignment
and hasNegAssignment
, pos
satisfies only the former, neg
satisfies only the latter, and unassigned
is
bottom, satisfying neither. If one wanted to modify the default formula structure to use a BitArray rather than
an Assignment Array
for the assignments
field, a reasonable 2-bit representation of the Assignment
type
would be:
- both: 11
- pos: 10
- neg: 01
- unassigned: 00
Then hasPosAssignment
could simply query the first bit and hasNegAssignment
could simply query the second bit.
- pos: Std.Tactic.BVDecide.LRAT.Internal.Assignment
- neg: Std.Tactic.BVDecide.LRAT.Internal.Assignment
- both: Std.Tactic.BVDecide.LRAT.Internal.Assignment
- unassigned: Std.Tactic.BVDecide.LRAT.Internal.Assignment
Instances For
Equations
- Std.Tactic.BVDecide.LRAT.Internal.instDecidableEqAssignment x y = if h : x.toCtorIdx = y.toCtorIdx then isTrue ⋯ else isFalse ⋯
Equations
- One or more equations did not get rendered due to their size.
Equations
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos.hasPosAssignment = true
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg.hasPosAssignment = false
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.both.hasPosAssignment = true
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned.hasPosAssignment = false
Instances For
Equations
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos.hasNegAssignment = false
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg.hasNegAssignment = true
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.both.hasNegAssignment = true
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned.hasNegAssignment = false
Instances For
Updates the old assignment of l
to reflect the fact that (l, true)
is now part of the formula.
Equations
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos.addPosAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg.addPosAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.both
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.both.addPosAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.both
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned.addPosAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos
Instances For
Updates the old assignment of l
to reflect the fact that (l, true)
is no longer part of the
formula.
Equations
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos.removePosAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg.removePosAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.both.removePosAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned.removePosAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned
Instances For
Updates the old assignment of l
to reflect the fact that (l, false)
is now part of the formula.
Equations
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos.addNegAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.both
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg.addNegAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.both.addNegAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.both
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned.addNegAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg
Instances For
Updates the old assignment of l
to reflect the fact that (l, false)
is no longer part of the
formula.
Equations
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos.removeNegAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.neg.removeNegAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.both.removeNegAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.pos
- Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned.removeNegAssignment = Std.Tactic.BVDecide.LRAT.Internal.Assignment.unassigned
Instances For
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.
Instances For
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.