internlm/Lean-Github huggingface dataset:
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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_satisfies_invariant :
  f.derivedLits_invariant f_assignments_size (f.performRupCheck rupHints).fst.assignments f'_assignments_size
    (f.performRupCheck rupHints).snd.fst
⊢ List.foldl clearUnit (f.performRupCheck rupHints).fst.assignments (f.performRupCheck rupHints).snd.fst = f.assignments
Tactic:
generalize (performRupCheck f rupHints).2.1 = derivedLits at *
Proof state after:
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
⊢ List.foldl clearUnit (f.performRupCheck rupHints).fst.assignments derivedLits = f.assignments
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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
⊢ List.foldl clearUnit (f.performRupCheck rupHints).fst.assignments derivedLits = f.assignments
Tactic:
rw [← f'_def, ← Array.foldl_eq_foldl_data]
Proof state after:
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
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Tactic:
let derivedLits_arr : Array (Literal (PosFin n)) := {data := derivedLits}
Proof state after:
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 }
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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 }
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Tactic:
have derivedLits_arr_def : derivedLits_arr = {data := derivedLits} := rfl
Proof state after:
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 }
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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 }
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Tactic:
have derivedLits_arr_nodup := derivedLits_nodup f f_assignments_size rupHints f'_assignments_size derivedLits
  derivedLits_satisfies_invariant derivedLits_arr derivedLits_arr_def
Proof state after:
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]
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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]
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Tactic:
let motive := clear_insert_induction_motive f f_assignments_size derivedLits_arr
Proof state after:
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
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Tactic:
have h_base :=
  restoreAssignments_performRupCheck_base_case f f_assignments_size f' f'_def f'_assignments_size derivedLits
    derivedLits_arr derivedLits_arr_def derivedLits_satisfies_invariant derivedLits_arr_nodup
Proof state after:
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
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Tactic:
have h_inductive (idx : Fin derivedLits_arr.size) (assignments : Array Assignment) (ih : motive idx.val assignments) :=
  clear_insert_inductive_case f f_assignments_size derivedLits_arr derivedLits_arr_nodup idx assignments ih
Proof state after:
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])
⊢ Array.foldl clearUnit f'.assignments { data := derivedLits } 0 = f.assignments
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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 = n
Tactic:
rw [performRupCheck_preserves_assignments_size f rupHints, f_assignments_size]
Proof state after:
no goals
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
h :
  ∀ (i : Fin n),
    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];
    let fassignments_i := f.assignments[↑i];
    (assignments_i = fassignments_i ∧
        ∀ (j : Fin derivedLits_arr.size), ↑j ≥ derivedLits_arr.size → derivedLits_arr[j].fst.val ≠ ↑i) ∨
      (∃ j b i_gt_zero,
          ↑j ≥ derivedLits_arr.size ∧
            derivedLits_arr[j] = (⟨↑i, ⋯⟩, 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) ∨
        ∃ j1 j2 i_gt_zero,
          ↑j1 ≥ derivedLits_arr.size ∧
            ↑j2 ≥ derivedLits_arr.size ∧
              derivedLits_arr[j1] = (⟨↑i, ⋯⟩, true) ∧
                derivedLits_arr[j2] = (⟨↑i, ⋯⟩, 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
⊢ (Array.foldl clearUnit f'.assignments { data := derivedLits } 0).size = f.assignments.size
Tactic:
rw [Array.foldl_eq_foldl_data, clearUnit_foldl_preserves_size f'.assignments clearUnit clearUnit_preserves_size derivedLits,
  f'_assignments_size, f_assignments_size]
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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]
Tactic:
. exfalso
  exact (Nat.not_lt_of_le j1_ge_derivedLits_size) j1.2
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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 derivedLits_arr.size)[i] = f.assignments[i]
Tactic:
exact h1
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.restoreAssignments_performRupCheck
Proof state before:
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⟩
⊢ False
Tactic:
exact (Nat.not_lt_of_le j_ge_derivedLits_size) j.2
Proof state after:
no goals