Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
case intro.h₂
n : Nat
f : DefaultFormula n
f_assignments_size : f.assignments.size = n
rupHints : Array Nat
f' : DefaultFormula n := (f.performRupCheck rupHints).fst
f'_def : f' = (f.performRupCheck rupHints).fst
f'_assignments_size : f'.assignments.size = n
derivedLits : List (Literal (PosFin n))
derivedLits_satisfies_invariant :
  f.derivedLits_invariant f_assignments_size (f.performRupCheck rupHints).fst.assignments f'_assignments_size
    derivedLits
derivedLits_arr : Array (Literal (PosFin n)) := { data := derivedLits }
derivedLits_arr_def : derivedLits_arr = { data := derivedLits }
derivedLits_arr_nodup : ∀ (i j : Fin derivedLits_arr.size), i ≠ j → derivedLits_arr[i] ≠ derivedLits_arr[j]
motive : Nat → Array Assignment → Prop := f.clear_insert_induction_motive f_assignments_size derivedLits_arr
h_base : f.clear_insert_induction_motive f_assignments_size derivedLits_arr 0 f'.assignments
h_inductive :
  ∀ (idx : Fin derivedLits_arr.size) (assignments : Array Assignment),
    motive (↑idx) assignments →
      f.clear_insert_induction_motive f_assignments_size derivedLits_arr (↑idx + 1)
        (clearUnit assignments derivedLits_arr[idx])
h_size : (Array.foldl (fun b => clearUnit b) f'.assignments derivedLits_arr 0).size = n
i : Nat
hi1 : i < (Array.foldl clearUnit f'.assignments { data := derivedLits } 0).size
hi2✝ : i < f.assignments.size
hi2 : i < n
h :
  let_fun i_lt_assignments_size := ⋯;
  let_fun i_lt_f_assignments_size := ⋯;
  let assignments_i := (Array.foldl (fun b => clearUnit b) f'.assignments derivedLits_arr 0)[↑⟨i, hi2⟩];
  let fassignments_i := f.assignments[↑⟨i, hi2⟩];
  (assignments_i = fassignments_i ∧
      ∀ (j : Fin derivedLits_arr.size), ↑j ≥ derivedLits_arr.size → derivedLits_arr[j].fst.val ≠ ↑⟨i, hi2⟩) ∨
    (∃ j b i_gt_zero,
        ↑j ≥ derivedLits_arr.size ∧
          derivedLits_arr[j] = (⟨↑⟨i, hi2⟩, ⋯⟩, b) ∧
            assignments_i = addAssignment b fassignments_i ∧
              ¬hasAssignment b fassignments_i = true ∧
                ∀ (k : Fin derivedLits_arr.size),
                  ↑k ≥ derivedLits_arr.size → k ≠ j → derivedLits_arr[k].fst.val ≠ ↑⟨i, hi2⟩) ∨
      ∃ j1 j2 i_gt_zero,
        ↑j1 ≥ derivedLits_arr.size ∧
          ↑j2 ≥ derivedLits_arr.size ∧
            derivedLits_arr[j1] = (⟨↑⟨i, hi2⟩, ⋯⟩, true) ∧
              derivedLits_arr[j2] = (⟨↑⟨i, hi2⟩, ⋯⟩, false) ∧
                assignments_i = both ∧
                  fassignments_i = unassigned ∧
                    ∀ (k : Fin derivedLits_arr.size),
                      ↑k ≥ derivedLits_arr.size → k ≠ j1 → k ≠ j2 → derivedLits_arr[k].fst.val ≠ ↑⟨i, hi2⟩
⊢ (Array.foldl clearUnit f'.assignments { data := derivedLits } 0)[i] = f.assignments[i]
Tactic:
rcases h with ⟨h1, _⟩ | ⟨j, b, i_gt_zero, j_ge_derivedLits_size, _⟩ | ⟨j1, j2, i_gt_zero, j1_ge_derivedLits_size, _⟩
Proof state after:
case intro.h₂.inl.intro
n : Nat
f : DefaultFormula n
f_assignments_size : f.assignments.size = n
rupHints : Array Nat
f' : DefaultFormula n := (f.performRupCheck rupHints).fst
f'_def : f' = (f.performRupCheck rupHints).fst
f'_assignments_size : f'.assignments.size = n
derivedLits : List (Literal (PosFin n))
derivedLits_satisfies_invariant :
  f.derivedLits_invariant f_assignments_size (f.performRupCheck rupHints).fst.assignments f'_assignments_size
    derivedLits
derivedLits_arr : Array (Literal (PosFin n)) := { data := derivedLits }
derivedLits_arr_def : derivedLits_arr = { data := derivedLits }
derivedLits_arr_nodup : ∀ (i j : Fin derivedLits_arr.size), i ≠ j → derivedLits_arr[i] ≠ derivedLits_arr[j]
motive : Nat → Array Assignment → Prop := f.clear_insert_induction_motive f_assignments_size derivedLits_arr
h_base : f.clear_insert_induction_motive f_assignments_size derivedLits_arr 0 f'.assignments
h_inductive :
  ∀ (idx : Fin derivedLits_arr.size) (assignments : Array Assignment),
    motive (↑idx) assignments →
      f.clear_insert_induction_motive f_assignments_size derivedLits_arr (↑idx + 1)
        (clearUnit assignments derivedLits_arr[idx])
h_size : (Array.foldl (fun b => clearUnit b) f'.assignments derivedLits_arr 0).size = n
i : Nat
hi1 : i < (Array.foldl clearUnit f'.assignments { data := derivedLits } 0).size
hi2✝ : i < f.assignments.size
hi2 : i < n
h1 : (Array.foldl (fun b => clearUnit b) f'.assignments derivedLits_arr 0)[↑⟨i, hi2⟩] = f.assignments[↑⟨i, hi2⟩]
right✝ : ∀ (j : Fin derivedLits_arr.size), ↑j ≥ derivedLits_arr.size → derivedLits_arr[j].fst.val ≠ ↑⟨i, hi2⟩
⊢ (Array.foldl clearUnit f'.assignments { data := derivedLits } 0)[i] = f.assignments[i]

case intro.h₂.inr.inl.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_assignments_size : f.assignments.size = n
rupHints : Array Nat
f' : DefaultFormula n := (f.performRupCheck rupHints).fst
f'_def : f' = (f.performRupCheck rupHints).fst
f'_assignments_size : f'.assignments.size = n
derivedLits : List (Literal (PosFin n))
derivedLits_satisfies_invariant :
  f.derivedLits_invariant f_assignments_size (f.performRupCheck rupHints).fst.assignments f'_assignments_size
    derivedLits
derivedLits_arr : Array (Literal (PosFin n)) := { data := derivedLits }
derivedLits_arr_def : derivedLits_arr = { data := derivedLits }
derivedLits_arr_nodup : ∀ (i j : Fin derivedLits_arr.size), i ≠ j → derivedLits_arr[i] ≠ derivedLits_arr[j]
motive : Nat → Array Assignment → Prop := f.clear_insert_induction_motive f_assignments_size derivedLits_arr
h_base : f.clear_insert_induction_motive f_assignments_size derivedLits_arr 0 f'.assignments
h_inductive :
  ∀ (idx : Fin derivedLits_arr.size) (assignments : Array Assignment),
    motive (↑idx) assignments →
      f.clear_insert_induction_motive f_assignments_size derivedLits_arr (↑idx + 1)
        (clearUnit assignments derivedLits_arr[idx])
h_size : (Array.foldl (fun b => clearUnit b) f'.assignments derivedLits_arr 0).size = n
i : Nat
hi1 : i < (Array.foldl clearUnit f'.assignments { data := derivedLits } 0).size
hi2✝ : i < f.assignments.size
hi2 : i < n
j : Fin derivedLits_arr.size
b : Bool
i_gt_zero : ↑⟨i, hi2⟩ > 0
j_ge_derivedLits_size : ↑j ≥ derivedLits_arr.size
right✝ :
  derivedLits_arr[j] = (⟨↑⟨i, hi2⟩, ⋯⟩, b) ∧
    (Array.foldl (fun b => clearUnit b) f'.assignments derivedLits_arr 0)[↑⟨i, hi2⟩] =
        addAssignment b f.assignments[↑⟨i, hi2⟩] ∧
      ¬hasAssignment b f.assignments[↑⟨i, hi2⟩] = true ∧
        ∀ (k : Fin derivedLits_arr.size), ↑k ≥ derivedLits_arr.size → k ≠ j → derivedLits_arr[k].fst.val ≠ ↑⟨i, hi2⟩
⊢ (Array.foldl clearUnit f'.assignments { data := derivedLits } 0)[i] = f.assignments[i]

case intro.h₂.inr.inr.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_assignments_size : f.assignments.size = n
rupHints : Array Nat
f' : DefaultFormula n := (f.performRupCheck rupHints).fst
f'_def : f' = (f.performRupCheck rupHints).fst
f'_assignments_size : f'.assignments.size = n
derivedLits : List (Literal (PosFin n))
derivedLits_satisfies_invariant :
  f.derivedLits_invariant f_assignments_size (f.performRupCheck rupHints).fst.assignments f'_assignments_size
    derivedLits
derivedLits_arr : Array (Literal (PosFin n)) := { data := derivedLits }
derivedLits_arr_def : derivedLits_arr = { data := derivedLits }
derivedLits_arr_nodup : ∀ (i j : Fin derivedLits_arr.size), i ≠ j → derivedLits_arr[i] ≠ derivedLits_arr[j]
motive : Nat → Array Assignment → Prop := f.clear_insert_induction_motive f_assignments_size derivedLits_arr
h_base : f.clear_insert_induction_motive f_assignments_size derivedLits_arr 0 f'.assignments
h_inductive :
  ∀ (idx : Fin derivedLits_arr.size) (assignments : Array Assignment),
    motive (↑idx) assignments →
      f.clear_insert_induction_motive f_assignments_size derivedLits_arr (↑idx + 1)
        (clearUnit assignments derivedLits_arr[idx])
h_size : (Array.foldl (fun b => clearUnit b) f'.assignments derivedLits_arr 0).size = n
i : Nat
hi1 : i < (Array.foldl clearUnit f'.assignments { data := derivedLits } 0).size
hi2✝ : i < f.assignments.size
hi2 : i < n
j1 j2 : Fin derivedLits_arr.size
i_gt_zero : ↑⟨i, hi2⟩ > 0
j1_ge_derivedLits_size : ↑j1 ≥ derivedLits_arr.size
right✝ :
  ↑j2 ≥ derivedLits_arr.size ∧
    derivedLits_arr[j1] = (⟨↑⟨i, hi2⟩, ⋯⟩, true) ∧
      derivedLits_arr[j2] = (⟨↑⟨i, hi2⟩, ⋯⟩, false) ∧
        (Array.foldl (fun b => clearUnit b) f'.assignments derivedLits_arr 0)[↑⟨i, hi2⟩] = both ∧
          f.assignments[↑⟨i, hi2⟩] = unassigned ∧
            ∀ (k : Fin derivedLits_arr.size),
              ↑k ≥ derivedLits_arr.size → k ≠ j1 → k ≠ j2 → derivedLits_arr[k].fst.val ≠ ↑⟨i, hi2⟩
⊢ (Array.foldl clearUnit f'.assignments { data := derivedLits } 0)[i] = f.assignments[i]