internlm/Lean-Github huggingface dataset:
Theorem: LRAT.DefaultFormula.insert_readyForRupAdd
Proof state before:
case neg
n : Nat
f : DefaultFormula n
c : DefaultClause n
f_readyForRupAdd : f.readyForRupAdd
x✝ : Option (Literal (PosFin n))
l : PosFin n
hc : c.isUnit = some (l, false)
hsize : (f.assignments.modify l.val addNegAssignment).size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.assignments.modify l.val addNegAssignment)[i.val] = true
hf : hasAssignment b f.assignments[i.val] = true → unit (i, b) ∈ f.toList
i_in_bounds : i.val < f.assignments.size
l_in_bounds : l.val < f.assignments.size
ib_ne_c : ¬(i, b) = (l, false)
l_eq_i : l.val = i.val
h✝ : ¬b = true
⊢ b = true
Tactic:
next b_eq_false =>
simp only [b_eq_false, Subtype.ext l_eq_i, not_true] at ib_ne_c
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_readyForRupAdd
Proof state before:
n : Nat
f : DefaultFormula n
c : DefaultClause n
f_readyForRupAdd : f.readyForRupAdd
x✝ : Option (Literal (PosFin n))
l : PosFin n
hc : c.isUnit = some (l, false)
hsize : (f.assignments.modify l.val addNegAssignment).size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.assignments.modify l.val addNegAssignment)[i.val] = true
hf : hasAssignment b f.assignments[i.val] = true → unit (i, b) ∈ f.toList
i_in_bounds : i.val < f.assignments.size
l_in_bounds : l.val < f.assignments.size
ib_ne_c : ¬(i, b) = (l, false)
l_eq_i : l.val = i.val
b_eq_false : ¬b = true
⊢ b = true
Tactic:
simp only [b_eq_false, Subtype.ext l_eq_i, not_true] at ib_ne_c
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_readyForRupAdd
Proof state before:
case neg
n : Nat
f : DefaultFormula n
c : DefaultClause n
f_readyForRupAdd : f.readyForRupAdd
x✝ : Option (Literal (PosFin n))
l : PosFin n
hc : c.isUnit = some (l, false)
hsize : (f.assignments.modify l.val addNegAssignment).size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.assignments.modify l.val addNegAssignment)[i.val] = true
hf : hasAssignment b f.assignments[i.val] = true → unit (i, b) ∈ f.toList
i_in_bounds : i.val < f.assignments.size
l_in_bounds : l.val < f.assignments.size
ib_ne_c : ¬(i, b) = (l, false)
h✝ : ¬l.val = i.val
⊢ hasAssignment b f.assignments[i.val] = true
Tactic:
next l_ne_i =>
simp only [Array.get_modify_unchanged l_in_bounds i_in_bounds _ l_ne_i] at hb
exact hb
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_readyForRupAdd
Proof state before:
n : Nat
f : DefaultFormula n
c : DefaultClause n
f_readyForRupAdd : f.readyForRupAdd
x✝ : Option (Literal (PosFin n))
l : PosFin n
hc : c.isUnit = some (l, false)
hsize : (f.assignments.modify l.val addNegAssignment).size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.assignments.modify l.val addNegAssignment)[i.val] = true
hf : hasAssignment b f.assignments[i.val] = true → unit (i, b) ∈ f.toList
i_in_bounds : i.val < f.assignments.size
l_in_bounds : l.val < f.assignments.size
ib_ne_c : ¬(i, b) = (l, false)
l_ne_i : ¬l.val = i.val
⊢ hasAssignment b f.assignments[i.val] = true
Tactic:
simp only [Array.get_modify_unchanged l_in_bounds i_in_bounds _ l_ne_i] at hb
Proof state after:
n : Nat
f : DefaultFormula n
c : DefaultClause n
f_readyForRupAdd : f.readyForRupAdd
x✝ : Option (Literal (PosFin n))
l : PosFin n
hc : c.isUnit = some (l, false)
hsize : (f.assignments.modify l.val addNegAssignment).size = n
i : PosFin n
b : Bool
hf : hasAssignment b f.assignments[i.val] = true → unit (i, b) ∈ f.toList
i_in_bounds : i.val < f.assignments.size
l_in_bounds : l.val < f.assignments.size
ib_ne_c : ¬(i, b) = (l, false)
l_ne_i : ¬l.val = i.val
hb : hasAssignment b f.assignments[i.val] = true
⊢ hasAssignment b f.assignments[i.val] = true
Theorem: LRAT.DefaultFormula.insert_readyForRupAdd
Proof state before:
n : Nat
f : DefaultFormula n
c : DefaultClause n
f_readyForRupAdd : f.readyForRupAdd
x✝ : Option (Literal (PosFin n))
l : PosFin n
hc : c.isUnit = some (l, false)
hsize : (f.assignments.modify l.val addNegAssignment).size = n
i : PosFin n
b : Bool
hf : hasAssignment b f.assignments[i.val] = true → unit (i, b) ∈ f.toList
i_in_bounds : i.val < f.assignments.size
l_in_bounds : l.val < f.assignments.size
ib_ne_c : ¬(i, b) = (l, false)
l_ne_i : ¬l.val = i.val
hb : hasAssignment b f.assignments[i.val] = true
⊢ hasAssignment b f.assignments[i.val] = true
Tactic:
exact hb
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_readyForRupAdd
Proof state before:
case inl
n : Nat
f : DefaultFormula n
c : DefaultClause n
f_readyForRupAdd : f.readyForRupAdd
x✝ : Option (Literal (PosFin n))
l : PosFin n
hc : c.isUnit = some (l, false)
hsize : (f.assignments.modify l.val addNegAssignment).size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.assignments.modify l.val addNegAssignment)[i.val] = true
i_in_bounds : i.val < f.assignments.size
l_in_bounds : l.val < f.assignments.size
ib_ne_c : ¬(i, b) = (l, false)
hb' : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
⊢ (some (unit (i, b)) ∈ f.clauses.data ∨ unit (i, b) = c) ∨
    (∃ a,
        (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = unit (i, b) ∨
          (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = unit (i, b)) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = unit (i, b) ∨
          (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = unit (i, b)
Tactic:
exact Or.inl $ Or.inl hf
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_readyForRupAdd
Proof state before:
case inr
n : Nat
f : DefaultFormula n
c : DefaultClause n
f_readyForRupAdd : f.readyForRupAdd
x✝ : Option (Literal (PosFin n))
l : PosFin n
hc : c.isUnit = some (l, false)
hsize : (f.assignments.modify l.val addNegAssignment).size = n
i : PosFin n
b : Bool
hb : hasAssignment b (f.assignments.modify l.val addNegAssignment)[i.val] = true
i_in_bounds : i.val < f.assignments.size
l_in_bounds : l.val < f.assignments.size
ib_ne_c : ¬(i, b) = (l, false)
hb' : hasAssignment b f.assignments[i.val] = true
hf :
  (∃ a,
      (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = unit (i, b) ∨
        (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = unit (i, b)) ∨
    ∃ a,
      (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = unit (i, b) ∨
        (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = unit (i, b)
⊢ (some (unit (i, b)) ∈ f.clauses.data ∨ unit (i, b) = c) ∨
    (∃ a,
        (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = unit (i, b) ∨
          (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = unit (i, b)) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = unit (i, b) ∨
          (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = unit (i, b)
Tactic:
exact Or.inr hf
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_readyForRatAdd
Proof state before:
n : Nat
f : DefaultFormula n
c : DefaultClause n
⊢ f.readyForRatAdd → (f.insert c).readyForRatAdd
Tactic:
intro h
Proof state after:
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).readyForRatAdd
Theorem: LRAT.DefaultFormula.insert_readyForRatAdd
Proof state before:
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).readyForRatAdd
Tactic:
constructor
Proof state after:
case left
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).ratUnits = #[]

case right
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).readyForRupAdd
Theorem: LRAT.DefaultFormula.insert_readyForRatAdd
Proof state before:
case left
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).ratUnits = #[]

case right
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).readyForRupAdd
Tactic:
. simp only [insert, h.1] <;> split <;> rfl
Proof state after:
case right
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).readyForRupAdd
Theorem: LRAT.DefaultFormula.insert_readyForRatAdd
Proof state before:
case right
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).readyForRupAdd
Tactic:
. exact insert_readyForRupAdd f c h.2
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_readyForRatAdd
Proof state before:
case left
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).ratUnits = #[]
Tactic:
simp only [insert, h.1] <;> split <;> rfl
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insert_readyForRatAdd
Proof state before:
case right
n : Nat
f : DefaultFormula n
c : DefaultClause n
h : f.readyForRatAdd
⊢ (f.insert c).readyForRupAdd
Tactic:
exact insert_readyForRupAdd f c h.2
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
⊢ c ∈ (f.insertRupUnits units).fst.toList → c ∈ List.map Clause.unit units ∨ c ∈ f.toList
Tactic:
simp only [toList, insertRupUnits, Prod.mk.eta, Array.toList_eq, List.append_assoc, List.mem_append,
  List.mem_filterMap, id_eq, exists_eq_right, List.mem_map, Prod.exists, Bool.exists_bool]
Proof state after:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
⊢ (some c ∈ f.clauses.data ∨
      (∃ a,
          (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
            (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
              unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c) →
    (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
      some c ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
⊢ (some c ∈ f.clauses.data ∨
      (∃ a,
          (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
            (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
              unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c) →
    (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
      some c ∈ f.clauses.data ∨
        (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
          ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Tactic:
intro h
Proof state after:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
⊢ (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
    some c ∈ f.clauses.data ∨
      (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
⊢ (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
    some c ∈ f.clauses.data ∨
      (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Tactic:
have hb : ∀ l : Literal (PosFin n), l ∈ (f.rupUnits, f.assignments, false).1.data → (l ∈ f.rupUnits.data ∨ l ∈ units) := by
  intro l hl
  exact Or.inl hl
Proof state after:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
⊢ (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
    some c ∈ f.clauses.data ∨
      (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
⊢ (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
    some c ∈ f.clauses.data ∨
      (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Tactic:
have hl (acc : Array (Literal (PosFin n)) × Array Assignment × Bool)
  (ih : ∀ l : Literal (PosFin n), l ∈ acc.1.data → l ∈ f.rupUnits.data ∨ l ∈ units)
  (unit : Literal (PosFin n)) (unit_in_units : unit ∈ units) :
  ∀ l : Literal (PosFin n), l ∈ (insertUnit acc unit).1.data → (l ∈ f.rupUnits.data ∨ l ∈ units) := by
  intro l hl
  rw [insertUnit] at hl
  simp only [Prod.mk.eta] at hl
  split at hl
  . exact ih l hl
  . simp only [Array.push_data, List.mem_append, List.mem_singleton] at hl
    rcases hl with l_in_acc | l_eq_unit
    . exact ih l l_in_acc
    . rw [l_eq_unit]
      exact Or.inr unit_in_units
Proof state after:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
hl :
  ∀ (acc : Array (Literal (PosFin n)) × Array Assignment × Bool),
    (∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units) →
      ∀ (unit : Literal (PosFin n)),
        unit ∈ units → ∀ (l : Literal (PosFin n)), l ∈ (insertUnit acc unit).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
⊢ (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
    some c ∈ f.clauses.data ∨
      (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
hl :
  ∀ (acc : Array (Literal (PosFin n)) × Array Assignment × Bool),
    (∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units) →
      ∀ (unit : Literal (PosFin n)),
        unit ∈ units → ∀ (l : Literal (PosFin n)), l ∈ (insertUnit acc unit).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
⊢ (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
    some c ∈ f.clauses.data ∨
      (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Tactic:
have h_insertUnit_fold := List.foldlRecOn units insertUnit (f.rupUnits, f.assignments, false) hb hl
Proof state after:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
hl :
  ∀ (acc : Array (Literal (PosFin n)) × Array Assignment × Bool),
    (∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units) →
      ∀ (unit : Literal (PosFin n)),
        unit ∈ units → ∀ (l : Literal (PosFin n)), l ∈ (insertUnit acc unit).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
h_insertUnit_fold :
  ∀ (l : Literal (PosFin n)),
    l ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
⊢ (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
    some c ∈ f.clauses.data ∨
      (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case inr.inr
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
hl :
  ∀ (acc : Array (Literal (PosFin n)) × Array Assignment × Bool),
    (∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units) →
      ∀ (unit : Literal (PosFin n)),
        unit ∈ units → ∀ (l : Literal (PosFin n)), l ∈ (insertUnit acc unit).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
h_insertUnit_fold :
  ∀ (l : Literal (PosFin n)),
    l ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
h : ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
⊢ (∃ a, (a, false) ∈ units ∧ Clause.unit (a, false) = c ∨ (a, true) ∈ units ∧ Clause.unit (a, true) = c) ∨
    some c ∈ f.clauses.data ∨
      (∃ a, (a, false) ∈ f.rupUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.rupUnits.data ∧ unit (a, true) = c) ∨
        ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
Tactic:
. exact (Or.inr ∘ Or.inr ∘ Or.inr) h
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
⊢ ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
intro l hl
Proof state after:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
l : Literal (PosFin n)
hl : l ∈ (f.rupUnits, f.assignments, false).fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
n : Nat
f : DefaultFormula n
units : List (Literal (PosFin n))
c : DefaultClause n
h :
  some c ∈ f.clauses.data ∨
    (∃ a,
        (a, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧ unit (a, true) = c) ∨
      ∃ a, (a, false) ∈ f.ratUnits.data ∧ unit (a, false) = c ∨ (a, true) ∈ f.ratUnits.data ∧ unit (a, true) = c
l : Literal (PosFin n)
hl : l ∈ (f.rupUnits, f.assignments, false).fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
exact Or.inl hl
Proof state after:
no goals