Theorem: LRAT.DefaultFormula.insertRupUnits_preserves_assignments_invariant (LeanSAT/LRAT/Formula/RupAddSound.lean)

State before:
case neg
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b') ∨
    (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
Tactic:
rw [hb']
State after:
case neg
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false) ∨
    (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)

State before:
case neg
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false) ∨
    (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
Tactic:
apply Or.inl
State after:
case neg.h
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)

State before:
case neg.h
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
Tactic:
constructor
State after:
case neg.h.left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data

case neg.h.right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)

State before:
case neg.h.left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data

case neg.h.right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
Tactic:
. have h1 : (insertRupUnits f units).fst.rupUnits[j] = (i, false) := by
    rw [hb'] at h1
    rw [h1]
    simp only [Prod.mk.injEq, and_true]
    apply Subtype.ext
    rfl
  rw [← h1]
  apply Array.getElem_mem_data
State after:
case neg.h.right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)

State before:
case neg.h.right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
Tactic:
. rfl
State after:
no goals

State before:
case neg.h.left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data
Tactic:
have h1 : (insertRupUnits f units).fst.rupUnits[j] = (i, false) := by
  rw [hb'] at h1
  rw [h1]
  simp only [Prod.mk.injEq, and_true]
  apply Subtype.ext
  rfl
State after:
case neg.h.left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1✝ : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (i, false)
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data

State before:
case neg.h.left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1✝ : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (i, false)
⊢ (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data
Tactic:
rw [← h1]
State after:
case neg.h.left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1✝ : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (i, false)
⊢ (f.insertRupUnits units).fst.rupUnits[j] ∈ (f.insertRupUnits units).fst.rupUnits.data

State before:
case neg.h.left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1✝ : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (i, false)
⊢ (f.insertRupUnits units).fst.rupUnits[j] ∈ (f.insertRupUnits units).fst.rupUnits.data
Tactic:
apply Array.getElem_mem_data
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (f.insertRupUnits units).fst.rupUnits[j] = (i, false)
Tactic:
rw [hb'] at h1
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (f.insertRupUnits units).fst.rupUnits[j] = (i, false)

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (f.insertRupUnits units).fst.rupUnits[j] = (i, false)
Tactic:
rw [h1]
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false) = (i, false)

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false) = (i, false)
Tactic:
simp only [Prod.mk.injEq, and_true]
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ ⟨i.val, ⋯⟩ = i

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ ⟨i.val, ⋯⟩ = i
Tactic:
apply Subtype.ext
State after:
case a
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ ⟨i.val, ⋯⟩.val = i.val

State before:
case a
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ ⟨i.val, ⋯⟩.val = i.val
Tactic:
rfl
State after:
no goals

State before:
case neg.h.right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
hb' : b' = false
⊢ unit (i, false) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
Tactic:
rfl
State after:
no goals

State before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ false = b'
hp2 : decide (p i' = false) = true
⊢ p ⊨ (i, b)
Tactic:
simp only [b_eq_b', ← hp1.2, HSat.eval]
State after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ false = b'
hp2 : decide (p i' = false) = true
⊢ p i = false

State before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ false = b'
hp2 : decide (p i' = false) = true
⊢ p i = false
Tactic:
rw [hp1.1] at hp2
State after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ false = b'
hp2 : decide (p ⟨i.val, ⋯⟩ = false) = true
⊢ p i = false

State before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ false = b'
hp2 : decide (p ⟨i.val, ⋯⟩ = false) = true
⊢ p i = false
Tactic:
exact of_decide_eq_true hp2
State after:
no goals

State before:
case intro.inr.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ true = b'
hp2 : p i' = true
⊢ p ⊨ (i, b)
Tactic:
simp only [b_eq_b', ← hp1.2, HSat.eval]
State after:
case intro.inr.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ true = b'
hp2 : p i' = true
⊢ p i = true

State before:
case intro.inr.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ true = b'
hp2 : p i' = true
⊢ p i = true
Tactic:
rw [hp1.1] at hp2
State after:
case intro.inr.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ true = b'
hp2 : p ⟨i.val, ⋯⟩ = true
⊢ p i = true

State before:
case intro.inr.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j] = (⟨i.val, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_eq_b' : b = b'
j_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_def : j_unit = unit (f.insertRupUnits units).fst.rupUnits[j]
j_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j_unit
i' : PosFin n
hp1 : i' = ⟨i.val, ⋯⟩ ∧ true = b'
hp2 : p ⟨i.val, ⋯⟩ = true
⊢ p i = true
Tactic:
exact hp2
State after:
no goals

State before:
case neg
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
h✝ : ¬b = b'
⊢ p ⊨ (i, b)
Tactic:
next b_ne_b' =>
apply (assignments_invariant_of_strong_assignments_invariant f f_readyForRupAdd.2).2 i b _ p pf
have b'_def : b' = (decide ¬b = true) := by
  cases b <;> cases b' <;> simp at *
rw [has_iff_has_of_add_complement, ← b'_def, hb]
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_ne_b' : ¬b = b'
⊢ p ⊨ (i, b)
Tactic:
apply (assignments_invariant_of_strong_assignments_invariant f f_readyForRupAdd.2).2 i b _ p pf
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_ne_b' : ¬b = b'
⊢ hasAssignment b f.assignments[i.val] = true

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_ne_b' : ¬b = b'
⊢ hasAssignment b f.assignments[i.val] = true
Tactic:
have b'_def : b' = (decide ¬b = true) := by
  cases b <;> cases b' <;> simp at *
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_ne_b' : ¬b = b'
b'_def : b' = decide ¬b = true
⊢ hasAssignment b f.assignments[i.val] = true

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_ne_b' : ¬b = b'
b'_def : b' = decide ¬b = true
⊢ hasAssignment b f.assignments[i.val] = true
Tactic:
rw [has_iff_has_of_add_complement, ← b'_def, hb]
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j : Fin (f.insertRupUnits units).fst.rupUnits.size
b' : Bool
hb : hasAssignment b (addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]) = true
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, b')
h2 : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = addAssignment b' f.assignments[↑⟨i.val, ⋯⟩]
h3 : ¬hasAssignment b' f.assignments[↑⟨i.val, ⋯⟩] = true
h4 :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
b_ne_b' : ¬b = b'
⊢ b' = decide ¬b = true
Tactic:
cases b <;> cases b' <;> simp at *
State after:
no goals

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ p ⊨ (i, b)
Tactic:
let j1_unit := unit (insertRupUnits f units).1.rupUnits[j1]
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ p ⊨ (i, b)
Tactic:
have j1_unit_def : j1_unit = unit (insertRupUnits f units).1.rupUnits[j1] := rfl
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ p ⊨ (i, b)
Tactic:
have j1_unit_in_insertRupUnits_res :
  ∃ i : PosFin n,
    (i, false) ∈ (insertRupUnits f units).1.rupUnits.data ∧ unit (i, false) = j1_unit ∨
    (i, true) ∈ (insertRupUnits f units).1.rupUnits.data ∧ unit (i, true) = j1_unit := by
  apply Exists.intro i ∘ Or.inr
  rw [j1_unit_def, h1]
  constructor
  . have h1 : (insertRupUnits f units).fst.rupUnits[j1] = (i, true) := by
      rw [h1]
      simp only [Prod.mk.injEq, and_true]
      apply Subtype.ext
      rfl
    rw [← h1]
    apply Array.getElem_mem_data
  . rfl
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
⊢ p ⊨ (i, b)
Tactic:
let j2_unit := unit (insertRupUnits f units).1.rupUnits[j2]
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
⊢ p ⊨ (i, b)
Tactic:
have j2_unit_def : j2_unit = unit (insertRupUnits f units).1.rupUnits[j2] := rfl
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
⊢ p ⊨ (i, b)
Tactic:
have j2_unit_in_insertRupUnits_res :
  ∃ i : PosFin n,
    (i, false) ∈ (insertRupUnits f units).1.rupUnits.data ∧ unit (i, false) = j2_unit ∨
    (i, true) ∈ (insertRupUnits f units).1.rupUnits.data ∧ unit (i, true) = j2_unit := by
  apply Exists.intro i ∘ Or.inl
  rw [j2_unit_def, h2]
  constructor
  . have h2 : (insertRupUnits f units).fst.rupUnits[j2] = (i, false) := by
      rw [h2]
      simp only [Prod.mk.injEq, and_true]
      apply Subtype.ext
      rfl
    rw [← h2]
    apply Array.getElem_mem_data
  . rfl
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
⊢ p ⊨ (i, b)
Tactic:
have hp1 := hp j1_unit ((Or.inr ∘ Or.inl) j1_unit_in_insertRupUnits_res)
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
hp1 :
  ∃ a, (a, false) ∈ Clause.toList j1_unit ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList j1_unit ∧ p a = true
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
hp1 :
  ∃ a, (a, false) ∈ Clause.toList j1_unit ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList j1_unit ∧ p a = true
⊢ p ⊨ (i, b)
Tactic:
have hp2 := hp j2_unit ((Or.inr ∘ Or.inl) j2_unit_in_insertRupUnits_res)
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
hp1 :
  ∃ a, (a, false) ∈ Clause.toList j1_unit ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList j1_unit ∧ p a = true
hp2 :
  ∃ a, (a, false) ∈ Clause.toList j2_unit ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList j2_unit ∧ p a = true
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
hp1 :
  ∃ a, (a, false) ∈ Clause.toList j1_unit ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList j1_unit ∧ p a = true
hp2 :
  ∃ a, (a, false) ∈ Clause.toList j2_unit ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList j2_unit ∧ p a = true
⊢ p ⊨ (i, b)
Tactic:
simp only [List.any_eq_true, Prod.exists, Bool.exists_bool, Bool.decide_coe, Fin.getElem_fin, List.find?, j1_unit, j2_unit] at hp1 hp2
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
hp1 :
  ∃ a,
    (a, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p a = false) = true ∨
      (a, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p a = true
hp2 :
  ∃ a,
    (a, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p a = false) = true ∨
      (a, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p a = true
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
hp1 :
  ∃ a,
    (a, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p a = false) = true ∨
      (a, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p a = true
hp2 :
  ∃ a,
    (a, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p a = false) = true ∨
      (a, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p a = true
⊢ p ⊨ (i, b)
Tactic:
rcases hp1 with ⟨i1, hp1⟩
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
hp2 :
  ∃ a,
    (a, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p a = false) = true ∨
      (a, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p a = true
i1 : PosFin n
hp1 :
  (i1, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p i1 = false) = true ∨
    (i1, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p i1 = true
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
hp2 :
  ∃ a,
    (a, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p a = false) = true ∨
      (a, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p a = true
i1 : PosFin n
hp1 :
  (i1, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p i1 = false) = true ∨
    (i1, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p i1 = true
⊢ p ⊨ (i, b)
Tactic:
rcases hp2 with ⟨i2, hp2⟩
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 : PosFin n
hp1 :
  (i1, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p i1 = false) = true ∨
    (i1, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p i1 = true
i2 : PosFin n
hp2 :
  (i2, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p i2 = false) = true ∨
    (i2, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p i2 = true
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 : PosFin n
hp1 :
  (i1, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p i1 = false) = true ∨
    (i1, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p i1 = true
i2 : PosFin n
hp2 :
  (i2, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p i2 = false) = true ∨
    (i2, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p i2 = true
⊢ p ⊨ (i, b)
Tactic:
simp only [Fin.getElem_fin] at h1
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨i.val, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 : PosFin n
hp1 :
  (i1, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p i1 = false) = true ∨
    (i1, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p i1 = true
i2 : PosFin n
hp2 :
  (i2, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p i2 = false) = true ∨
    (i2, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p i2 = true
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨i.val, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 : PosFin n
hp1 :
  (i1, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p i1 = false) = true ∨
    (i1, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p i1 = true
i2 : PosFin n
hp2 :
  (i2, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p i2 = false) = true ∨
    (i2, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p i2 = true
⊢ p ⊨ (i, b)
Tactic:
simp only [Fin.getElem_fin] at h2
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨i.val, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[↑j2] = (⟨i.val, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 : PosFin n
hp1 :
  (i1, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p i1 = false) = true ∨
    (i1, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p i1 = true
i2 : PosFin n
hp2 :
  (i2, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p i2 = false) = true ∨
    (i2, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p i2 = true
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨i.val, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[↑j2] = (⟨i.val, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 : PosFin n
hp1 :
  (i1, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ decide (p i1 = false) = true ∨
    (i1, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j1]) ∧ p i1 = true
i2 : PosFin n
hp2 :
  (i2, false) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ decide (p i2 = false) = true ∨
    (i2, true) ∈ Clause.toList (unit (f.insertRupUnits units).fst.rupUnits[↑j2]) ∧ p i2 = true
⊢ p ⊨ (i, b)
Tactic:
simp only [h1, Clause.toList, unit_eq, List.mem_singleton, Prod.mk.injEq,
  and_false, false_and, and_true, false_or, h2, or_false] at hp1 hp2
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨i.val, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[↑j2] = (⟨i.val, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 i2 : PosFin n
hp1 : i1 = ⟨i.val, ⋯⟩ ∧ p i1 = true
hp2 : i2 = ⟨i.val, ⋯⟩ ∧ decide (p i2 = false) = true
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨i.val, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[↑j2] = (⟨i.val, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 i2 : PosFin n
hp1 : i1 = ⟨i.val, ⋯⟩ ∧ p i1 = true
hp2 : i2 = ⟨i.val, ⋯⟩ ∧ decide (p i2 = false) = true
⊢ p ⊨ (i, b)
Tactic:
simp only [hp2.1, ← hp1.1, decide_eq_true_eq, true_and] at hp2
State after:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨i.val, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[↑j2] = (⟨i.val, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 i2 : PosFin n
hp1 : i1 = ⟨i.val, ⋯⟩ ∧ p i1 = true
hp2 : p i1 = false
⊢ p ⊨ (i, b)

State before:
case inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[↑j1] = (⟨i.val, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[↑j2] = (⟨i.val, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
j2_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_def : j2_unit = unit (f.insertRupUnits units).fst.rupUnits[j2]
j2_unit_in_insertRupUnits_res :
  ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j2_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j2_unit
i1 i2 : PosFin n
hp1 : i1 = ⟨i.val, ⋯⟩ ∧ p i1 = true
hp2 : p i1 = false
⊢ p ⊨ (i, b)
Tactic:
simp only [hp1.2] at hp2
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ ∃ i,
    (i, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, false) = j1_unit ∨
      (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
Tactic:
apply Exists.intro i ∘ Or.inr
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = j1_unit
Tactic:
rw [j1_unit_def, h1]
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
Tactic:
constructor
State after:
case left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data

case right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)

State before:
case left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data

case right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
Tactic:
. have h1 : (insertRupUnits f units).fst.rupUnits[j1] = (i, true) := by
    rw [h1]
    simp only [Prod.mk.injEq, and_true]
    apply Subtype.ext
    rfl
  rw [← h1]
  apply Array.getElem_mem_data
State after:
case right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)

State before:
case right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
Tactic:
. rfl
State after:
no goals

State before:
case left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data
Tactic:
have h1 : (insertRupUnits f units).fst.rupUnits[j1] = (i, true) := by
  rw [h1]
  simp only [Prod.mk.injEq, and_true]
  apply Subtype.ext
  rfl
State after:
case left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1✝ : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (i, true)
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data

State before:
case left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1✝ : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (i, true)
⊢ (i, true) ∈ (f.insertRupUnits units).fst.rupUnits.data
Tactic:
rw [← h1]
State after:
case left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1✝ : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (i, true)
⊢ (f.insertRupUnits units).fst.rupUnits[j1] ∈ (f.insertRupUnits units).fst.rupUnits.data

State before:
case left
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1✝ : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (i, true)
⊢ (f.insertRupUnits units).fst.rupUnits[j1] ∈ (f.insertRupUnits units).fst.rupUnits.data
Tactic:
apply Array.getElem_mem_data
State after:
no goals

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (f.insertRupUnits units).fst.rupUnits[j1] = (i, true)
Tactic:
rw [h1]
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true) = (i, true)

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true) = (i, true)
Tactic:
simp only [Prod.mk.injEq, and_true]
State after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ ⟨i.val, ⋯⟩ = i

State before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ ⟨i.val, ⋯⟩ = i
Tactic:
apply Subtype.ext
State after:
case a
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ ⟨i.val, ⋯⟩.val = i.val

State before:
case a
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ ⟨i.val, ⋯⟩.val = i.val
Tactic:
rfl
State after:
no goals

State before:
case right
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
units : List (Literal (PosFin n))
h :
  let assignments := (f.insertRupUnits units).fst.assignments;
  let_fun hsize := ⋯;
  let rupUnits := (f.insertRupUnits units).fst.rupUnits;
  insertUnit_invariant f.assignments ⋯ rupUnits assignments hsize
hsize : (f.insertRupUnits units).fst.assignments.size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.insertRupUnits units).fst.assignments[i.val] = true
p : PosFin n → Bool
hp :
  ∀ (x : DefaultClause n),
    (some x ∈ (f.insertRupUnits units).fst.clauses.data ∨
        (∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.rupUnits.data ∧ unit (a, true) = x) ∨
          ∃ a,
            (a, false) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, false) = x ∨
              (a, true) ∈ (f.insertRupUnits units).fst.ratUnits.data ∧ unit (a, true) = x) →
      ∃ a, (a, false) ∈ Clause.toList x ∧ decide (p a = false) = true ∨ (a, true) ∈ Clause.toList x ∧ p a = true
pf : p ⊨ f
j1 j2 : Fin (f.insertRupUnits units).fst.rupUnits.size
i_gt_zero : ↑⟨i.val, ⋯⟩ > 0
h1 : (f.insertRupUnits units).fst.rupUnits[j1] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
h2 : (f.insertRupUnits units).fst.rupUnits[j2] = (⟨↑⟨i.val, ⋯⟩, ⋯⟩, false)
left✝¹ : (f.insertRupUnits units).fst.assignments[↑⟨i.val, ⋯⟩] = both
left✝ : f.assignments[↑⟨i.val, ⋯⟩] = unassigned
right✝ :
  ∀ (k : Fin (f.insertRupUnits units).fst.rupUnits.size),
    k ≠ j1 → k ≠ j2 → (f.insertRupUnits units).fst.rupUnits[k].fst.val ≠ ↑⟨i.val, ⋯⟩
j1_unit : DefaultClause n := unit (f.insertRupUnits units).fst.rupUnits[j1]
j1_unit_def : j1_unit = unit (f.insertRupUnits units).fst.rupUnits[j1]
⊢ unit (i, true) = unit (⟨↑⟨i.val, ⋯⟩, ⋯⟩, true)
Tactic:
rfl
State after:
no goals