simp only [insertUnit, h3, Prod.mk.eta, ite_false, Array.get_push_eq, i_eq_l]
n : Nat
assignments0 : Array Assignment
assignments0_size : assignments0.size = n
units : Array (Literal (PosFin n))
assignments : Array Assignment
assignments_size : assignments.size = n
foundContradiction : Bool
l : Literal (PosFin n)
i : Fin n
i_in_bounds : ↑i < assignments.size
l_in_bounds : l.fst.val < assignments.size
h1 : assignments[↑i] = assignments0[↑i]
h2 : ∀ (j : Fin units.size), ¬units[↑j].fst.val = ↑i
h3 : ¬hasAssignment l.snd assignments[l.fst.val]! = true
i_eq_l : ↑i = l.fst.val
units_size_lt_updatedUnits_size : units.size < (insertUnit (units, assignments, foundContradiction) l).fst.size
mostRecentUnitIdx : Fin (insertUnit (units, assignments, foundContradiction) l).fst.size :=
  ⟨units.size, units_size_lt_updatedUnits_size⟩
i_gt_zero : ↑i > 0
⊢ (insertUnit (units, assignments, foundContradiction) l).fst[↑mostRecentUnitIdx] = (⟨↑i, ⋯⟩, l.snd) ∧
    (insertUnit (units, assignments, foundContradiction) l).snd.fst[↑i] = addAssignment l.snd assignments0[↑i] ∧
      hasAssignment l.snd assignments0[↑i] = false ∧
        ∀ (k : Fin (insertUnit (units, assignments, foundContradiction) l).fst.size),
          ¬k = mostRecentUnitIdx → ¬(insertUnit (units, assignments, foundContradiction) l).fst[↑k].fst.val = ↑i
n : Nat
assignments0 : Array Assignment
assignments0_size : assignments0.size = n
units : Array (Literal (PosFin n))
assignments : Array Assignment
assignments_size : assignments.size = n
foundContradiction : Bool
l : Literal (PosFin n)
i : Fin n
i_in_bounds : ↑i < assignments.size
l_in_bounds : l.fst.val < assignments.size
h1 : assignments[↑i] = assignments0[↑i]
h2 : ∀ (j : Fin units.size), ¬units[↑j].fst.val = ↑i
h3 : ¬hasAssignment l.snd assignments[l.fst.val]! = true
i_eq_l : ↑i = l.fst.val
units_size_lt_updatedUnits_size : units.size < (insertUnit (units, assignments, foundContradiction) l).fst.size
mostRecentUnitIdx : Fin (insertUnit (units, assignments, foundContradiction) l).fst.size :=
  ⟨units.size, units_size_lt_updatedUnits_size⟩
i_gt_zero : ↑i > 0
⊢ l = (⟨l.fst.val, ⋯⟩, l.snd) ∧
    (assignments.modify l.fst.val (addAssignment l.snd))[l.fst.val] = addAssignment l.snd assignments0[l.fst.val] ∧
      hasAssignment l.snd assignments0[l.fst.val] = false ∧
        ∀
          (k :
            Fin
              (if hasAssignment l.snd assignments[l.fst.val]! = true then (units, assignments, foundContradiction)
                  else
                    (units.push (l.fst, l.snd), assignments.modify l.fst.val (addAssignment l.snd),
                      foundContradiction || assignments[l.fst.val]! != unassigned)).fst.size),
          ¬k = mostRecentUnitIdx → ¬(units.push l)[↑k].fst.val = l.fst.val