Documentation

Std.Tactic.BVDecide.LRAT.Internal.Assignment

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.

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
      theorem Std.Tactic.BVDecide.LRAT.Internal.Assignment.removePos_addPos_cancel {assignment : Std.Tactic.BVDecide.LRAT.Internal.Assignment} (h : ¬assignment.hasPosAssignment = true) :
      assignment.addPosAssignment.removePosAssignment = assignment
      theorem Std.Tactic.BVDecide.LRAT.Internal.Assignment.removeNeg_addNeg_cancel {assignment : Std.Tactic.BVDecide.LRAT.Internal.Assignment} (h : ¬assignment.hasNegAssignment = true) :
      assignment.addNegAssignment.removeNegAssignment = assignment
      theorem Std.Tactic.BVDecide.LRAT.Internal.Assignment.hasPos_addNeg (assignment : Std.Tactic.BVDecide.LRAT.Internal.Assignment) :
      assignment.addNegAssignment.hasPosAssignment = assignment.hasPosAssignment
      theorem Std.Tactic.BVDecide.LRAT.Internal.Assignment.hasNeg_addPos (assignment : Std.Tactic.BVDecide.LRAT.Internal.Assignment) :
      assignment.addPosAssignment.hasNegAssignment = assignment.hasNegAssignment