internlm/Lean-Github huggingface dataset:
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
⊢ ∀ (l : Literal (PosFin n)), l ∈ (insertUnit acc unit).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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
hl : l ∈ (insertUnit acc unit).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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
hl : l ∈ (insertUnit acc unit).fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
rw [insertUnit] at 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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
hl :
  l ∈
    (match acc with
        | (units, assignments, foundContradiction) =>
          match unit with
          | (l, b) =>
            let curAssignment := assignments[l.val]!;
            if hasAssignment b curAssignment = true then (units, assignments, foundContradiction)
            else
              (units.push (l, b), assignments.modify l.val (addAssignment b),
                foundContradiction || curAssignment != unassigned)).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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
hl :
  l ∈
    (match acc with
        | (units, assignments, foundContradiction) =>
          match unit with
          | (l, b) =>
            let curAssignment := assignments[l.val]!;
            if hasAssignment b curAssignment = true then (units, assignments, foundContradiction)
            else
              (units.push (l, b), assignments.modify l.val (addAssignment b),
                foundContradiction || curAssignment != unassigned)).fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
simp only [Prod.mk.eta] at 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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
hl :
  l ∈
    (if hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true then acc
        else
          (acc.fst.push unit, acc.2.fst.modify unit.fst.val (addAssignment unit.snd),
            acc.2.snd || acc.2.fst[unit.fst.val]! != unassigned)).fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case isFalse
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : ¬hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
hl :
  l ∈
    (acc.fst.push unit, acc.2.fst.modify unit.fst.val (addAssignment unit.snd),
          acc.2.snd || acc.2.fst[unit.fst.val]! != unassigned).fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
. 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:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case isTrue
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
hl : l ∈ acc.fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
exact ih l hl
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case isFalse
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : ¬hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
hl :
  l ∈
    (acc.fst.push unit, acc.2.fst.modify unit.fst.val (addAssignment unit.snd),
          acc.2.snd || acc.2.fst[unit.fst.val]! != unassigned).fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
simp only [Array.push_data, List.mem_append, List.mem_singleton] at hl
Proof state after:
case isFalse
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : ¬hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
hl : l ∈ acc.fst.data ∨ l = unit
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case isFalse.inr
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : ¬hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
l_eq_unit : l = unit
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
. rw [l_eq_unit]
  exact Or.inr unit_in_units
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case isFalse.inl
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : ¬hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
l_in_acc : l ∈ acc.fst.data
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
exact ih l l_in_acc
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case isFalse.inr
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : ¬hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
l_eq_unit : l = unit
⊢ l ∈ f.rupUnits.data ∨ l ∈ units
Tactic:
rw [l_eq_unit]
Proof state after:
case isFalse.inr
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : ¬hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
l_eq_unit : l = unit
⊢ unit ∈ f.rupUnits.data ∨ unit ∈ units
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case isFalse.inr
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 ∧
            LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data ∧
            LRAT.DefaultClause.unit (a, true) = c) ∨
      ∃ a,
        (a, false) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, false) = c ∨
          (a, true) ∈ f.ratUnits.data ∧ LRAT.DefaultClause.unit (a, true) = c
hb : ∀ (l : Literal (PosFin n)), l ∈ (f.rupUnits, f.assignments, false).fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
acc : Array (Literal (PosFin n)) × Array Assignment × Bool
ih : ∀ (l : Literal (PosFin n)), l ∈ acc.fst.data → l ∈ f.rupUnits.data ∨ l ∈ units
unit : Literal (PosFin n)
unit_in_units : unit ∈ units
l : Literal (PosFin n)
h✝ : ¬hasAssignment unit.snd acc.2.fst[unit.fst.val]! = true
l_eq_unit : l = unit
⊢ unit ∈ f.rupUnits.data ∨ unit ∈ units
Tactic:
exact Or.inr unit_in_units
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case inl
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 : some c ∈ f.clauses.data
⊢ (∃ 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.inl h
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case inr.inl.intro.inl.intro.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
i : PosFin n
h1 : (i, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data
h2 : unit (i, false) = c
h_insertUnit_fold : (i, false) ∈ 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:
. apply Or.inl ∘ Exists.intro i ∘ Or.inl
  exact ⟨h_insertUnit_fold, h2⟩
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.mem_of_insertRupUnits
Proof state before:
case inr.inl.intro.inl.intro.inl
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
i : PosFin n
h1 : (i, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data
h2 : unit (i, false) = c
h_insertUnit_fold : (i, false) ∈ f.rupUnits.data
⊢ (∃ 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:
apply Or.inr ∘ Or.inr ∘ Or.inl ∘ Exists.intro i ∘ Or.inl
Proof state after:
case inr.inl.intro.inl.intro.inl
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
i : PosFin n
h1 : (i, false) ∈ (List.foldl insertUnit (f.rupUnits, f.assignments, false) units).fst.data
h2 : unit (i, false) = c
h_insertUnit_fold : (i, false) ∈ f.rupUnits.data
⊢ (i, false) ∈ f.rupUnits.data ∧ unit (i, false) = c