Theorem: LRAT.DefaultFormula.confirmRupHint_preserves_invariant_helper
Proof state before:
case intro
n : Nat
f : DefaultFormula n
f_assignments_size : f.assignments.size = n
acc : Array Assignment × List (Literal (PosFin n)) × Bool × Bool
hsize : acc.fst.size = n
l : Literal (PosFin n)
ih : f.derivedLits_invariant f_assignments_size acc.fst hsize acc.snd.fst
h : ¬hasAssignment l.snd acc.fst[l.fst.val]! = true
hsize'✝ : (acc.fst.modify l.fst.val (addAssignment l.snd)).size = n :=
  Eq.mpr (id (congrArg (fun _a => _a = n) Array.modify_preserves_size)) hsize
i : Fin n
i_in_bounds : ↑i < acc.fst.size
l_in_bounds : l.fst.val < acc.fst.size
j1 j2 : Fin acc.snd.fst.length
j1_eq_i : (acc.snd.fst.get j1).fst.val = ↑i
j2_eq_i : (acc.snd.fst.get j2).fst.val = ↑i
j1_eq_true : (acc.snd.fst.get j1).snd = true
j2_eq_false : (acc.snd.fst.get j2).snd = false
h1 : acc.fst[↑i] = both
h2 : f.assignments[↑i] = unassigned
h3 : ∀ (k : Fin acc.snd.fst.length), k ≠ j1 → k ≠ j2 → (acc.snd.fst.get k).fst.val ≠ ↑i
j1_succ_in_bounds : ↑j1 + 1 < (l :: acc.snd.fst).length
j2_succ_in_bounds : ↑j2 + 1 < (l :: acc.snd.fst).length
j1_succ : Fin (l :: acc.snd.fst).length := ⟨↑j1 + 1, j1_succ_in_bounds⟩
j2_succ : Fin (l :: acc.snd.fst).length := ⟨↑j2 + 1, j2_succ_in_bounds⟩
l_ne_i : l.fst.val ≠ ↑i
k : Fin acc.snd.fst.length.succ
k_ne_j1_succ : ¬k = j1_succ
k_ne_j2_succ : ¬k = j2_succ
zero_in_bounds : 0 < (l :: acc.snd.fst).length
k_ne_zero : ¬k = ⟨0, zero_in_bounds⟩
k_val_ne_zero : ↑k ≠ 0
k' : Nat
k_eq_k'_succ : ↑k = k' + 1
k'_succ_in_bounds : k' + 1 < (l :: acc.snd.fst).length
⊢ ∃ k' k'_succ_in_bounds, k = ⟨k' + 1, k'_succ_in_bounds⟩
Tactic:
apply Exists.intro k' ∘ Exists.intro k'_succ_in_bounds
Proof state after:
case intro
n : Nat
f : DefaultFormula n
f_assignments_size : f.assignments.size = n
acc : Array Assignment × List (Literal (PosFin n)) × Bool × Bool
hsize : acc.fst.size = n
l : Literal (PosFin n)
ih : f.derivedLits_invariant f_assignments_size acc.fst hsize acc.snd.fst
h : ¬hasAssignment l.snd acc.fst[l.fst.val]! = true
hsize'✝ : (acc.fst.modify l.fst.val (addAssignment l.snd)).size = n :=
  Eq.mpr (id (congrArg (fun _a => _a = n) Array.modify_preserves_size)) hsize
i : Fin n
i_in_bounds : ↑i < acc.fst.size
l_in_bounds : l.fst.val < acc.fst.size
j1 j2 : Fin acc.snd.fst.length
j1_eq_i : (acc.snd.fst.get j1).fst.val = ↑i
j2_eq_i : (acc.snd.fst.get j2).fst.val = ↑i
j1_eq_true : (acc.snd.fst.get j1).snd = true
j2_eq_false : (acc.snd.fst.get j2).snd = false
h1 : acc.fst[↑i] = both
h2 : f.assignments[↑i] = unassigned
h3 : ∀ (k : Fin acc.snd.fst.length), k ≠ j1 → k ≠ j2 → (acc.snd.fst.get k).fst.val ≠ ↑i
j1_succ_in_bounds : ↑j1 + 1 < (l :: acc.snd.fst).length
j2_succ_in_bounds : ↑j2 + 1 < (l :: acc.snd.fst).length
j1_succ : Fin (l :: acc.snd.fst).length := ⟨↑j1 + 1, j1_succ_in_bounds⟩
j2_succ : Fin (l :: acc.snd.fst).length := ⟨↑j2 + 1, j2_succ_in_bounds⟩
l_ne_i : l.fst.val ≠ ↑i
k : Fin acc.snd.fst.length.succ
k_ne_j1_succ : ¬k = j1_succ
k_ne_j2_succ : ¬k = j2_succ
zero_in_bounds : 0 < (l :: acc.snd.fst).length
k_ne_zero : ¬k = ⟨0, zero_in_bounds⟩
k_val_ne_zero : ↑k ≠ 0
k' : Nat
k_eq_k'_succ : ↑k = k' + 1
k'_succ_in_bounds : k' + 1 < (l :: acc.snd.fst).length
⊢ k = ⟨k' + 1, k'_succ_in_bounds⟩