Theorem: LRAT.DefaultFormula.performRupCheck_preserves_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
f_assignments_invariant : f.assignments_invariant
rupHints : Array Nat
motive : Nat → Array Assignment × List (Literal (PosFin n)) × Bool × Bool → Prop :=
  f.confirmRupHint_fold_entails_hsat_motive
h_base : motive 0 (f.assignments, [], false, false)
h_inductive :
  ∀ (idx : Fin rupHints.size) (acc : Array Assignment × List (Literal (PosFin n)) × Bool × Bool),
    motive (↑idx) acc →
      f.confirmRupHint_fold_entails_hsat_motive (↑idx + 1) (confirmRupHint f.clauses acc rupHints[idx])
hsize : (Array.foldl (fun b => confirmRupHint f.clauses b) (f.assignments, [], false, false) rupHints 0).fst.size = n
right✝ :
  (Array.foldl (fun b => confirmRupHint f.clauses b) (f.assignments, [], false, false) rupHints 0).snd.snd.fst = true →
    incompatible (PosFin n)
      (Array.foldl (fun b => confirmRupHint f.clauses b) (f.assignments, [], false, false) rupHints 0).fst f
i : PosFin n
b : Bool
h✝ :
  hasAssignment b (Array.foldl (confirmRupHint f.clauses) (f.assignments, [], false, false) rupHints 0).fst[i.val] =
    true
p : PosFin n → Bool
pf :
  p ⊨
    { clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
      assignments := (Array.foldl (confirmRupHint f.clauses) (f.assignments, [], false, false) rupHints 0).fst }
h1 :
  hasAssignment (decide (p i = false))
      (Array.foldl (fun b => confirmRupHint f.clauses b) (f.assignments, [], false, false) rupHints 0).fst[i.val]! =
    false
in_bounds_motive : Nat → Array Assignment × List (Literal (PosFin n)) × Bool × Bool → Prop :=
  fun _idx acc => acc.fst.size = n
in_bounds_base : in_bounds_motive 0 (f.assignments, [], false, false)
idx : Fin rupHints.size
acc : Array Assignment × List (Literal (PosFin n)) × Bool × Bool
ih : in_bounds_motive (↑idx) acc
h :
  (confirmRupHint f.clauses (acc.fst, acc.snd.fst, acc.snd.snd.fst, acc.snd.snd.snd) rupHints[idx]).fst.size =
    acc.fst.size
⊢ in_bounds_motive (↑idx + 1) (confirmRupHint f.clauses acc rupHints[idx])
Tactic:
simp at *
Proof state after:
n : Nat
f : DefaultFormula n
f_assignments_invariant : f.assignments_invariant
rupHints : Array Nat
motive : Nat → Array Assignment × List (Literal (PosFin n)) × Bool × Bool → Prop :=
  f.confirmRupHint_fold_entails_hsat_motive
h_base : motive 0 (f.assignments, [], false, false)
hsize : (Array.foldl (fun b => confirmRupHint f.clauses b) (f.assignments, [], false, false) rupHints 0).fst.size = n
right✝ :
  (Array.foldl (fun b => confirmRupHint f.clauses b) (f.assignments, [], false, false) rupHints 0).snd.snd.fst = true →
    incompatible (PosFin n)
      (Array.foldl (fun b => confirmRupHint f.clauses b) (f.assignments, [], false, false) rupHints 0).fst f
i : PosFin n
b : Bool
h✝ :
  hasAssignment b (Array.foldl (confirmRupHint f.clauses) (f.assignments, [], false, false) rupHints 0).fst[i.val] =
    true
p : PosFin n → Bool
pf :
  p ⊨
    { clauses := f.clauses, rupUnits := f.rupUnits, ratUnits := f.ratUnits,
      assignments := (Array.foldl (confirmRupHint f.clauses) (f.assignments, [], false, false) rupHints 0).fst }
in_bounds_motive : Nat → Array Assignment × List (Literal (PosFin n)) × Bool × Bool → Prop :=
  fun _idx acc => acc.fst.size = n
in_bounds_base : in_bounds_motive 0 (f.assignments, [], false, false)
idx : Fin rupHints.size
acc : Array Assignment × List (Literal (PosFin n)) × Bool × Bool
ih : in_bounds_motive (↑idx) acc
h_inductive :
  ∀ (idx : Fin rupHints.size) (a : Array Assignment) (a_1 : List (Literal (PosFin n))) (a_2 b : Bool),
    motive ↑idx (a, a_1, a_2, b) →
      f.confirmRupHint_fold_entails_hsat_motive (↑idx + 1) (confirmRupHint f.clauses (a, a_1, a_2, b) rupHints[↑idx])
h1 :
  hasAssignment (!p i)
      (Array.foldl (fun b => confirmRupHint f.clauses b) (f.assignments, [], false, false) rupHints 0).fst[i.val]! =
    false
h : (confirmRupHint f.clauses acc rupHints[↑idx]).fst.size = acc.fst.size
⊢ in_bounds_motive (↑idx + 1) (confirmRupHint f.clauses acc rupHints[↑idx])