next i_eq_l =>
simp only [i_eq_l, Array.get_modify_at_idx l_in_bounds] at h
by_cases b
. next b_eq_true =>
  rw [isUnit_iff, DefaultClause.toList] at heq
  simp only [toList, ofArray, Array.toList_eq, List.map, List.append_nil, List.mem_filterMap, id_eq, exists_eq_right]
  have i_eq_l : i = l := Subtype.ext i_eq_l
  simp only [unit, b_eq_true, i_eq_l]
  have c_def : c = ⟨c.clause, c.nodupkey, c.nodup⟩ := rfl
  simp only [heq] at c_def
  rw [c_def] at cOpt_in_arr
  exact cOpt_in_arr
. next b_eq_false =>
  simp only [Bool.not_eq_true] at b_eq_false
  simp only [hasAssignment, b_eq_false, ite_false, hasNeg_of_addPos] at h
  specialize ih l false
  simp only [hasAssignment, ite_false] at ih
  rw [b_eq_false, Subtype.ext i_eq_l]
  exact ih h
case pos
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.isUnit = some (l, true)
h : hasAssignment b (acc.modify l.val addPosAssignment)[i.val] = true
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
h✝ : i.val = l.val
⊢ unit (i, b) ∈ (ofArray arr).toList
no goals