Theorem: LRAT.DefaultFormula.performRatCheck_success_entails_c_without_negPivot
Proof state before:
case isTrue
n : Nat
f : DefaultFormula n
hf : f.ratUnits = #[] ∧ f.assignments_invariant
negPivot : Literal (PosFin n)
ratHint : Nat × Array Nat
c : DefaultClause n
hc : f.clauses[ratHint.fst]! = some c
p : PosFin n → Bool
pf : p ⊨ f
h✝ :
  ({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits, assignments := f.assignments }.insertRatUnits
        (c.delete negPivot).negate).snd =
    true
performRatCheck_success :
  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                  assignments := f.assignments }.insertRatUnits
              (c.delete negPivot).negate).fst.clearRatUnits,
        true).snd =
    true
⊢ p ⊨ c.delete negPivot

case isFalse
n : Nat
f : DefaultFormula n
hf : f.ratUnits = #[] ∧ f.assignments_invariant
negPivot : Literal (PosFin n)
ratHint : Nat × Array Nat
c : DefaultClause n
hc : f.clauses[ratHint.fst]! = some c
p : PosFin n → Bool
pf : p ⊨ f
h✝ :
  ¬({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
              assignments := f.assignments }.insertRatUnits
          (c.delete negPivot).negate).snd =
      true
performRatCheck_success :
  (if
          (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).2.2.snd =
              true ∨
            (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).2.2.fst =
              false then
        ({
              clauses :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.clauses,
              rupUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.rupUnits,
              ratUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.ratUnits,
              assignments :=
                restoreAssignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete negPivot).negate).fst.performRupCheck
                        ratHint.snd).1.assignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete negPivot).negate).fst.performRupCheck
                        ratHint.snd).2.fst }.clearRatUnits,
          false)
      else
        ({
              clauses :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.clauses,
              rupUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.rupUnits,
              ratUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.ratUnits,
              assignments :=
                restoreAssignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete negPivot).negate).fst.performRupCheck
                        ratHint.snd).1.assignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete negPivot).negate).fst.performRupCheck
                        ratHint.snd).2.fst }.clearRatUnits,
          true)).snd =
    true
⊢ p ⊨ c.delete negPivot
Tactic:
. next h =>
  exact insertRat_entails_hsat f hf (DefaultClause.delete c negPivot) p pf h
Proof state after:
case isFalse
n : Nat
f : DefaultFormula n
hf : f.ratUnits = #[] ∧ f.assignments_invariant
negPivot : Literal (PosFin n)
ratHint : Nat × Array Nat
c : DefaultClause n
hc : f.clauses[ratHint.fst]! = some c
p : PosFin n → Bool
pf : p ⊨ f
h✝ :
  ¬({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
              assignments := f.assignments }.insertRatUnits
          (c.delete negPivot).negate).snd =
      true
performRatCheck_success :
  (if
          (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).2.2.snd =
              true ∨
            (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).2.2.fst =
              false then
        ({
              clauses :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.clauses,
              rupUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.rupUnits,
              ratUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.ratUnits,
              assignments :=
                restoreAssignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete negPivot).negate).fst.performRupCheck
                        ratHint.snd).1.assignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete negPivot).negate).fst.performRupCheck
                        ratHint.snd).2.fst }.clearRatUnits,
          false)
      else
        ({
              clauses :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.clauses,
              rupUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.rupUnits,
              ratUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete negPivot).negate).fst.performRupCheck
                      ratHint.snd).1.ratUnits,
              assignments :=
                restoreAssignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete negPivot).negate).fst.performRupCheck
                        ratHint.snd).1.assignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete negPivot).negate).fst.performRupCheck
                        ratHint.snd).2.fst }.clearRatUnits,
          true)).snd =
    true
⊢ p ⊨ c.delete negPivot