Theorem: LRAT.DefaultFormula.clear_insertRup_base_case (LeanSAT/LRAT/Formula/RupAddResult.lean)

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
⊢ f.clear_insert_induction_motive ⋯ (f.insertRupUnits units).fst.rupUnits 0 (f.insertRupUnits units).fst.assignments
Tactic:
have insertRupUnits_assignments_size := insertRupUnits_preserves_assignments_size f units
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = f.assignments.size
⊢ f.clear_insert_induction_motive ⋯ (f.insertRupUnits units).fst.rupUnits 0 (f.insertRupUnits units).fst.assignments

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = f.assignments.size
⊢ f.clear_insert_induction_motive ⋯ (f.insertRupUnits units).fst.rupUnits 0 (f.insertRupUnits units).fst.assignments
Tactic:
rw [f_readyForRupAdd.2.1] at insertRupUnits_assignments_size
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = n
⊢ f.clear_insert_induction_motive ⋯ (f.insertRupUnits units).fst.rupUnits 0 (f.insertRupUnits units).fst.assignments

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = n
⊢ f.clear_insert_induction_motive ⋯ (f.insertRupUnits units).fst.rupUnits 0 (f.insertRupUnits units).fst.assignments
Tactic:
apply Exists.intro insertRupUnits_assignments_size
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = n
⊢ ∀ (i : Fin n),
    let_fun i_lt_assignments_size := ⋯;
    let_fun i_lt_f_assignments_size := ⋯;
    let assignments_i := (f.insertRupUnits units).fst.assignments[↑i];
    let fassignments_i := f.assignments[↑i];
    (assignments_i = fassignments_i ∧
        ∀ (j : Fin (f.insertRupUnits units).fst.rupUnits.size),
          ↑j ≥ 0 → (f.insertRupUnits units).fst.rupUnits[j].fst.val ≠ ↑i) ∨
      (∃ j b i_gt_zero,
          ↑j ≥ 0 ∧
            (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑i, ⋯⟩, b) ∧
              assignments_i = addAssignment b fassignments_i ∧
                ¬hasAssignment b fassignments_i = true ∧
                  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                    ↑k ≥ 0 → k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑i) ∨
        ∃ j1 j2 i_gt_zero,
          ↑j1 ≥ 0 ∧
            ↑j2 ≥ 0 ∧
              (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑i, ⋯⟩, true) ∧
                (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑i, ⋯⟩, false) ∧
                  assignments_i = both ∧
                    fassignments_i = unassigned ∧
                      ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                        ↑k ≥ 0 → k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑i

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = n
⊢ ∀ (i : Fin n),
    let_fun i_lt_assignments_size := ⋯;
    let_fun i_lt_f_assignments_size := ⋯;
    let assignments_i := (f.insertRupUnits units).fst.assignments[↑i];
    let fassignments_i := f.assignments[↑i];
    (assignments_i = fassignments_i ∧
        ∀ (j : Fin (f.insertRupUnits units).fst.rupUnits.size),
          ↑j ≥ 0 → (f.insertRupUnits units).fst.rupUnits[j].fst.val ≠ ↑i) ∨
      (∃ j b i_gt_zero,
          ↑j ≥ 0 ∧
            (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑i, ⋯⟩, b) ∧
              assignments_i = addAssignment b fassignments_i ∧
                ¬hasAssignment b fassignments_i = true ∧
                  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                    ↑k ≥ 0 → k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑i) ∨
        ∃ j1 j2 i_gt_zero,
          ↑j1 ≥ 0 ∧
            ↑j2 ≥ 0 ∧
              (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑i, ⋯⟩, true) ∧
                (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑i, ⋯⟩, false) ∧
                  assignments_i = both ∧
                    fassignments_i = unassigned ∧
                      ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                        ↑k ≥ 0 → k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑i
Tactic:
intro i
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = n
i : Fin n
⊢ let_fun i_lt_assignments_size := ⋯;
  let_fun i_lt_f_assignments_size := ⋯;
  let assignments_i := (f.insertRupUnits units).fst.assignments[↑i];
  let fassignments_i := f.assignments[↑i];
  (assignments_i = fassignments_i ∧
      ∀ (j : Fin (f.insertRupUnits units).fst.rupUnits.size),
        ↑j ≥ 0 → (f.insertRupUnits units).fst.rupUnits[j].fst.val ≠ ↑i) ∨
    (∃ j b i_gt_zero,
        ↑j ≥ 0 ∧
          (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑i, ⋯⟩, b) ∧
            assignments_i = addAssignment b fassignments_i ∧
              ¬hasAssignment b fassignments_i = true ∧
                ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                  ↑k ≥ 0 → k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑i) ∨
      ∃ j1 j2 i_gt_zero,
        ↑j1 ≥ 0 ∧
          ↑j2 ≥ 0 ∧
            (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑i, ⋯⟩, true) ∧
              (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑i, ⋯⟩, false) ∧
                assignments_i = both ∧
                  fassignments_i = unassigned ∧
                    ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                      ↑k ≥ 0 → k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑i

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = n
i : Fin n
⊢ let_fun i_lt_assignments_size := ⋯;
  let_fun i_lt_f_assignments_size := ⋯;
  let assignments_i := (f.insertRupUnits units).fst.assignments[↑i];
  let fassignments_i := f.assignments[↑i];
  (assignments_i = fassignments_i ∧
      ∀ (j : Fin (f.insertRupUnits units).fst.rupUnits.size),
        ↑j ≥ 0 → (f.insertRupUnits units).fst.rupUnits[j].fst.val ≠ ↑i) ∨
    (∃ j b i_gt_zero,
        ↑j ≥ 0 ∧
          (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑i, ⋯⟩, b) ∧
            assignments_i = addAssignment b fassignments_i ∧
              ¬hasAssignment b fassignments_i = true ∧
                ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                  ↑k ≥ 0 → k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑i) ∨
      ∃ j1 j2 i_gt_zero,
        ↑j1 ≥ 0 ∧
          ↑j2 ≥ 0 ∧
            (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑i, ⋯⟩, true) ∧
              (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑i, ⋯⟩, false) ∧
                assignments_i = both ∧
                  fassignments_i = unassigned ∧
                    ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                      ↑k ≥ 0 → k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑i
Tactic:
simp only [Nat.zero_le, Fin.getElem_fin, ne_eq, forall_const, true_and]
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = n
i : Fin n
⊢ ((f.insertRupUnits units).fst.assignments[↑i] = f.assignments[↑i] ∧
      ∀ (j : Fin (f.insertRupUnits units).fst.rupUnits.size), ¬(f.insertRupUnits units).fst.rupUnits[↑j].fst.val = ↑i) ∨
    (∃ j b i_gt_zero,
        (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨↑i, ⋯⟩, b) ∧
          (f.insertRupUnits units).fst.assignments[↑i] = addAssignment b f.assignments[↑i] ∧
            ¬hasAssignment b f.assignments[↑i] = true ∧
              ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                ¬k = j → ¬(f.insertRupUnits units).fst.rupUnits[↑k].fst.val = ↑i) ∨
      ∃ j1 j2 i_gt_zero,
        (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨↑i, ⋯⟩, true) ∧
          (f.insertRupUnits units).fst.rupUnits[↑j2] = (⟨↑i, ⋯⟩, false) ∧
            (f.insertRupUnits units).fst.assignments[↑i] = both ∧
              f.assignments[↑i] = unassigned ∧
                ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                  ¬k = j1 → ¬k = j2 → ¬(f.insertRupUnits units).fst.rupUnits[↑k].fst.val = ↑i

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
insertRupUnits_assignments_size : (f.insertRupUnits units).fst.assignments.size = n
i : Fin n
⊢ ((f.insertRupUnits units).fst.assignments[↑i] = f.assignments[↑i] ∧
      ∀ (j : Fin (f.insertRupUnits units).fst.rupUnits.size), ¬(f.insertRupUnits units).fst.rupUnits[↑j].fst.val = ↑i) ∨
    (∃ j b i_gt_zero,
        (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨↑i, ⋯⟩, b) ∧
          (f.insertRupUnits units).fst.assignments[↑i] = addAssignment b f.assignments[↑i] ∧
            ¬hasAssignment b f.assignments[↑i] = true ∧
              ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                ¬k = j → ¬(f.insertRupUnits units).fst.rupUnits[↑k].fst.val = ↑i) ∨
      ∃ j1 j2 i_gt_zero,
        (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨↑i, ⋯⟩, true) ∧
          (f.insertRupUnits units).fst.rupUnits[↑j2] = (⟨↑i, ⋯⟩, false) ∧
            (f.insertRupUnits units).fst.assignments[↑i] = both ∧
              f.assignments[↑i] = unassigned ∧
                ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
                  ¬k = j1 → ¬k = j2 → ¬(f.insertRupUnits units).fst.rupUnits[↑k].fst.val = ↑i
Tactic:
exact insertRupUnits_postcondition f f_readyForRupAdd units i
State after:
no goals