internlm/Lean-Github huggingface dataset:
Theorem: LRAT.DefaultFormula.ofArray_readyForRupAdd
Proof state before:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.clause = [(l, false)]
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_eq_l✝ : i.val = l.val
h : hasAssignment b acc[l.val].addNegAssignment = true
b_eq_false : ¬b = true
i_eq_l : i = l
⊢ some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
Tactic:
have c_def : c = ⟨c.clause, c.nodupkey, c.nodup⟩ := rfl
Proof state after:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.clause = [(l, false)]
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_eq_l✝ : i.val = l.val
h : hasAssignment b acc[l.val].addNegAssignment = true
b_eq_false : ¬b = true
i_eq_l : i = l
c_def : c = { clause := c.clause, nodupkey := ⋯, nodup := ⋯ }
⊢ some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
Theorem: LRAT.DefaultFormula.ofArray_readyForRupAdd
Proof state before:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.clause = [(l, false)]
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_eq_l✝ : i.val = l.val
h : hasAssignment b acc[l.val].addNegAssignment = true
b_eq_false : ¬b = true
i_eq_l : i = l
c_def : c = { clause := c.clause, nodupkey := ⋯, nodup := ⋯ }
⊢ some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
Tactic:
simp only [heq] at c_def
Proof state after:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.clause = [(l, false)]
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_eq_l✝ : i.val = l.val
h : hasAssignment b acc[l.val].addNegAssignment = true
b_eq_false : ¬b = true
i_eq_l : i = l
c_def : c = { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ }
⊢ some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
Theorem: LRAT.DefaultFormula.ofArray_readyForRupAdd
Proof state before:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.clause = [(l, false)]
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_eq_l✝ : i.val = l.val
h : hasAssignment b acc[l.val].addNegAssignment = true
b_eq_false : ¬b = true
i_eq_l : i = l
c_def : c = { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ }
⊢ some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
Tactic:
rw [c_def] at cOpt_in_arr
Proof state after:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.clause = [(l, false)]
cOpt_in_arr : some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_eq_l✝ : i.val = l.val
h : hasAssignment b acc[l.val].addNegAssignment = true
b_eq_false : ¬b = true
i_eq_l : i = l
c_def : c = { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ }
⊢ some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
Theorem: LRAT.DefaultFormula.ofArray_readyForRupAdd
Proof state before:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.clause = [(l, false)]
cOpt_in_arr : some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_eq_l✝ : i.val = l.val
h : hasAssignment b acc[l.val].addNegAssignment = true
b_eq_false : ¬b = true
i_eq_l : i = l
c_def : c = { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ }
⊢ some { clause := [(l, false)], nodupkey := ⋯, nodup := ⋯ } ∈ arr.data
Tactic:
exact cOpt_in_arr
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.ofArray_readyForRupAdd
Proof state before:
case neg
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.isUnit = some (l, false)
h : hasAssignment b (acc.modify l.val addNegAssignment)[i.val] = true
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
h✝ : ¬i.val = l.val
⊢ unit (i, b) ∈ (ofArray arr).toList
Tactic:
next i_ne_l =>
simp only [Array.get_modify_unchanged l_in_bounds i_in_bounds _ (Ne.symm i_ne_l)] at h
exact ih i b h
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.ofArray_readyForRupAdd
Proof state before:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.isUnit = some (l, false)
h : hasAssignment b (acc.modify l.val addNegAssignment)[i.val] = true
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_ne_l : ¬i.val = l.val
⊢ unit (i, b) ∈ (ofArray arr).toList
Tactic:
simp only [Array.get_modify_unchanged l_in_bounds i_in_bounds _ (Ne.symm i_ne_l)] at h
Proof state after:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.isUnit = some (l, false)
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_ne_l : ¬i.val = l.val
h : hasAssignment b acc[i.val] = true
⊢ unit (i, b) ∈ (ofArray arr).toList
Theorem: LRAT.DefaultFormula.ofArray_readyForRupAdd
Proof state before:
n : Nat
arr : Array (Option (DefaultClause n))
hsize✝¹ : (ofArray arr).assignments.size = n
modified_assignments_invariant : Array Assignment → Prop :=
  fun assignments =>
    ∃ hsize, ∀ (i : PosFin n) (b : Bool), hasAssignment b assignments[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
hb : modified_assignments_invariant (mkArray n unassigned)
acc : Array Assignment
i : PosFin n
b : Bool
cOpt : Option (DefaultClause n)
c : DefaultClause n
cOpt_in_arr : some c ∈ arr.data
hsize✝ : (ofArray_fold_fn acc (some c)).size = n
l : PosFin n
heq : c.isUnit = some (l, false)
i_in_bounds : i.val < acc.size
l_in_bounds : l.val < acc.size
hsize : acc.size = n
ih : ∀ (i : PosFin n) (b : Bool), hasAssignment b acc[i.val] = true → unit (i, b) ∈ (ofArray arr).toList
i_ne_l : ¬i.val = l.val
h : hasAssignment b acc[i.val] = true
⊢ unit (i, b) ∈ (ofArray arr).toList
Tactic:
exact ih i b h
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.ofArray_readyForRatAdd
Proof state before:
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).readyForRatAdd
Tactic:
constructor
Proof state after:
case left
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).ratUnits = #[]

case right
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).readyForRupAdd
Theorem: LRAT.DefaultFormula.ofArray_readyForRatAdd
Proof state before:
case left
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).ratUnits = #[]

case right
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).readyForRupAdd
Tactic:
. simp only [ofArray]
Proof state after:
case right
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).readyForRupAdd
Theorem: LRAT.DefaultFormula.ofArray_readyForRatAdd
Proof state before:
case right
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).readyForRupAdd
Tactic:
. exact ofArray_readyForRupAdd arr
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.ofArray_readyForRatAdd
Proof state before:
case left
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).ratUnits = #[]
Tactic:
simp only [ofArray]
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.ofArray_readyForRatAdd
Proof state before:
case right
n : Nat
arr : Array (Option (DefaultClause n))
⊢ (ofArray arr).readyForRupAdd
Tactic:
exact ofArray_readyForRupAdd arr
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
⊢ c2 ∈ (f.insert c1).toList ↔ c2 = c1 ∨ c2 ∈ f.toList
Tactic:
simp only [toList, Array.toList_eq, List.append_assoc, List.mem_append, List.mem_filterMap, id_eq, exists_eq_right,
  List.mem_map, Misc.Prod.exists, Misc.Bool.exists_bool]
Proof state after:
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2
Tactic:
by_cases c2 = c1
Proof state after:
case pos
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
h✝ : c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2

case neg
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
h✝ : ¬c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
case pos
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
h✝ : c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2

case neg
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
h✝ : ¬c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2
Tactic:
. next c2_eq_c1 =>
  constructor
  . intro _
    exact Or.inl c2_eq_c1
  . intro _
    apply Or.inl
    simp only [c2_eq_c1, insert]
    split <;> simp
Proof state after:
case neg
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
h✝ : ¬c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
case neg
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
h✝ : ¬c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2
Tactic:
. next c2_ne_c1 =>
  constructor
  . intro h
    apply Or.inr
    rcases h with h | h | h
    . apply Or.inl
      simp only [insert] at h
      split at h
      all_goals
        simp only [Array.push_data, List.mem_append, List.mem_singleton, Option.some.injEq] at h
        rcases h with h | h
        . exact h
        . exact False.elim $ c2_ne_c1 h
    . rw [insert_preserves_rupUnits] at h
      exact Or.inr $ Or.inl h
    . rw [insert_preserves_ratUnits] at h
      exact Or.inr $ Or.inr h
  . intro h
    rcases h with h | h | h | h
    . exact False.elim $ c2_ne_c1 h
    . apply Or.inl
      simp only [insert]
      split
      all_goals
        simp only [Array.push_data, List.mem_append, List.mem_singleton, Option.some.injEq]
        exact Or.inl h
    . rw [insert_preserves_rupUnits]
      exact Or.inr $ Or.inl h
    . rw [insert_preserves_ratUnits]
      exact Or.inr $ Or.inr h
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
case pos
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
h✝ : c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2
Tactic:
next c2_eq_c1 =>
constructor
. intro _
  exact Or.inl c2_eq_c1
. intro _
  apply Or.inl
  simp only [c2_eq_c1, insert]
  split <;> simp
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) ↔
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2
Tactic:
constructor
Proof state after:
case mp
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
⊢ (some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2) →
    c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2

case mpr
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
⊢ (c2 = c1 ∨
      some c2 ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c2) ∨
          ∃ a,
            (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c2 ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c2) →
    some c2 ∈ (f.insert c1).clauses.data ∨
      (∃ a,
          (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2) ∨
        ∃ a,
          (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
            (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2