Theorem: LRAT.DefaultFormula.performRatCheck_preserves_formula
Proof state before:
case isFalse
n : Nat
f : DefaultFormula n
hf : f.ratUnits = #[] ∧ f.assignments.size = n
p : Literal (PosFin n)
ratHint : Nat × Array Nat
x✝ : Option (DefaultClause n)
c : DefaultClause n
heq✝ : f.clauses[ratHint.fst]! = some c
h✝ :
  ¬({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
              assignments := f.assignments }.insertRatUnits
          (c.delete p).negate).snd =
      true
fc : DefaultFormula n := (f.insertRatUnits (c.delete p).negate).fst
fc_assignments_size : fc.assignments.size = n
insertRatUnits_rw :
  (f.insertRatUnits (c.delete p).negate).fst =
    { clauses := (f.insertRatUnits (c.delete p).negate).fst.clauses,
      rupUnits := (f.insertRatUnits (c.delete p).negate).fst.rupUnits,
      ratUnits := (f.insertRatUnits (c.delete p).negate).fst.ratUnits,
      assignments := (f.insertRatUnits (c.delete p).negate).fst.assignments }
⊢ (if
          (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete p).negate).fst.performRupCheck
                      ratHint.snd).2.2.snd =
              true ∨
            (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete p).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 p).negate).fst.performRupCheck
                      ratHint.snd).1.clauses,
              rupUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete p).negate).fst.performRupCheck
                      ratHint.snd).1.rupUnits,
              ratUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete p).negate).fst.performRupCheck
                      ratHint.snd).1.ratUnits,
              assignments :=
                restoreAssignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete p).negate).fst.performRupCheck
                        ratHint.snd).1.assignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete p).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 p).negate).fst.performRupCheck
                      ratHint.snd).1.clauses,
              rupUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete p).negate).fst.performRupCheck
                      ratHint.snd).1.rupUnits,
              ratUnits :=
                (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete p).negate).fst.performRupCheck
                      ratHint.snd).1.ratUnits,
              assignments :=
                restoreAssignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete p).negate).fst.performRupCheck
                        ratHint.snd).1.assignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete p).negate).fst.performRupCheck
                        ratHint.snd).2.fst }.clearRatUnits,
          true)).fst =
    f
Tactic:
simp only [performRupCheck_preserves_clauses, performRupCheck_preserves_rupUnits, performRupCheck_preserves_ratUnits]
Proof state after:
case isFalse
n : Nat
f : DefaultFormula n
hf : f.ratUnits = #[] ∧ f.assignments.size = n
p : Literal (PosFin n)
ratHint : Nat × Array Nat
x✝ : Option (DefaultClause n)
c : DefaultClause n
heq✝ : f.clauses[ratHint.fst]! = some c
h✝ :
  ¬({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
              assignments := f.assignments }.insertRatUnits
          (c.delete p).negate).snd =
      true
fc : DefaultFormula n := (f.insertRatUnits (c.delete p).negate).fst
fc_assignments_size : fc.assignments.size = n
insertRatUnits_rw :
  (f.insertRatUnits (c.delete p).negate).fst =
    { clauses := (f.insertRatUnits (c.delete p).negate).fst.clauses,
      rupUnits := (f.insertRatUnits (c.delete p).negate).fst.rupUnits,
      ratUnits := (f.insertRatUnits (c.delete p).negate).fst.ratUnits,
      assignments := (f.insertRatUnits (c.delete p).negate).fst.assignments }
⊢ (if
          (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete p).negate).fst.performRupCheck
                      ratHint.snd).2.2.snd =
              true ∨
            (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                assignments := f.assignments }.insertRatUnits
                            (c.delete p).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 p).negate).fst.clauses,
              rupUnits :=
                ({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                          assignments := f.assignments }.insertRatUnits
                      (c.delete p).negate).fst.rupUnits,
              ratUnits :=
                ({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                          assignments := f.assignments }.insertRatUnits
                      (c.delete p).negate).fst.ratUnits,
              assignments :=
                restoreAssignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete p).negate).fst.performRupCheck
                        ratHint.snd).1.assignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete p).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 p).negate).fst.clauses,
              rupUnits :=
                ({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                          assignments := f.assignments }.insertRatUnits
                      (c.delete p).negate).fst.rupUnits,
              ratUnits :=
                ({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                          assignments := f.assignments }.insertRatUnits
                      (c.delete p).negate).fst.ratUnits,
              assignments :=
                restoreAssignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete p).negate).fst.performRupCheck
                        ratHint.snd).1.assignments
                  (({ clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
                                  assignments := f.assignments }.insertRatUnits
                              (c.delete p).negate).fst.performRupCheck
                        ratHint.snd).2.fst }.clearRatUnits,
          true)).fst =
    f