internlm/Lean-Github huggingface dataset:
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
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
Tactic:
. intro _
  exact Or.inl c2_eq_c1
Proof state after:
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
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
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
Tactic:
. 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:
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
Tactic:
intro _
Proof state after:
case mp
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
a✝ :
  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 mp
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
a✝ :
  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:
exact Or.inl c2_eq_c1
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
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
Tactic:
intro _
Proof state after:
case mpr
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
a✝ :
  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
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
case mpr
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
a✝ :
  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
Tactic:
apply Or.inl
Proof state after:
case mpr.h
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
a✝ :
  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
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
case mpr.h
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
a✝ :
  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
Tactic:
simp only [c2_eq_c1, insert]
Proof state after:
case mpr.h
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
a✝ :
  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 c1 ∈
    (match c1.isUnit with
        | none =>
          { clauses := f.clauses.push (some c1), rupUnits := f.rupUnits, ratUnits := f.ratUnits,
            assignments := f.assignments }
        | some (l, true) =>
          { clauses := f.clauses.push (some c1), rupUnits := f.rupUnits, ratUnits := f.ratUnits,
            assignments := f.assignments.modify l.val addPosAssignment }
        | some (l, false) =>
          { clauses := f.clauses.push (some c1), rupUnits := f.rupUnits, ratUnits := f.ratUnits,
            assignments := f.assignments.modify l.val addNegAssignment }).clauses.data
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
case mpr.h
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_eq_c1 : c2 = c1
a✝ :
  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 c1 ∈
    (match c1.isUnit with
        | none =>
          { clauses := f.clauses.push (some c1), rupUnits := f.rupUnits, ratUnits := f.ratUnits,
            assignments := f.assignments }
        | some (l, true) =>
          { clauses := f.clauses.push (some c1), rupUnits := f.rupUnits, ratUnits := f.ratUnits,
            assignments := f.assignments.modify l.val addPosAssignment }
        | some (l, false) =>
          { clauses := f.clauses.push (some c1), rupUnits := f.rupUnits, ratUnits := f.ratUnits,
            assignments := f.assignments.modify l.val addNegAssignment }).clauses.data
Tactic:
split <;> simp
Proof state after:
no goals
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:
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_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_ne_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_ne_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
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
case mp
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_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_ne_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
Tactic:
. 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
Proof state after:
case mpr
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_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
Theorem: LRAT.DefaultFormula.insert_iff
Proof state before:
case mpr
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_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
Tactic:
. 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 mp
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_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:
intro h
Proof state after:
case mp
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_c1 : ¬c2 = c1
h :
  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 mp
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_c1 : ¬c2 = c1
h :
  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:
apply Or.inr
Proof state after:
case mp.h
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_c1 : ¬c2 = c1
h :
  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
⊢ 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 mp.h
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_c1 : ¬c2 = c1
h :
  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
⊢ 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:
rcases h with h | h | h
Proof state after:
case mp.h.inl
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_c1 : ¬c2 = c1
h : some c2 ∈ (f.insert c1).clauses.data
⊢ 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 mp.h.inr.inl
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_c1 : ¬c2 = c1
h :
  ∃ a,
    (a, false) ∈ (f.insert c1).rupUnits.data ∧ unit (a, false) = c2 ∨
      (a, true) ∈ (f.insert c1).rupUnits.data ∧ unit (a, true) = c2
⊢ 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 mp.h.inr.inr
n : Nat
f : DefaultFormula n
c1 c2 : DefaultClause n
c2_ne_c1 : ¬c2 = c1
h :
  ∃ a,
    (a, false) ∈ (f.insert c1).ratUnits.data ∧ unit (a, false) = c2 ∨
      (a, true) ∈ (f.insert c1).ratUnits.data ∧ unit (a, true) = c2
⊢ 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