internlm/Lean-Github huggingface dataset:
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
case pos
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝¹ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
h✝ : id = ↑idx
⊢ (f.clauses.data.set id none).get ⟨↑idx, idx_in_bounds⟩ = f.clauses.data.get idx
Tactic:
next id_eq_idx =>
exfalso
have idx_in_bounds2 : idx.1 < f.clauses.size := by
  have f_clauses_rw : f.clauses = { data := f.clauses.data } := rfl
  conv => rhs; rw [f_clauses_rw, Array.size_mk]
  exact idx.2
simp only [getElem!, id_eq_idx, Array.data_length, idx_in_bounds2, ↓reduceDite,
  Fin.eta, Array.get_eq_getElem, Array.getElem_eq_data_get] at heq
rw [hidx, hl] at heq
simp only [unit, Option.some.injEq, DefaultClause.mk.injEq, List.cons.injEq, and_true] at heq
simp only [← heq, not] at l_ne_b
split at l_ne_b
. simp only at l_ne_b
. simp only at l_ne_b
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
⊢ (f.clauses.data.set id none).get ⟨↑idx, idx_in_bounds⟩ = f.clauses.data.get idx
Tactic:
exfalso
Proof state after:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
⊢ False
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
⊢ False
Tactic:
have idx_in_bounds2 : idx.1 < f.clauses.size := by
  have f_clauses_rw : f.clauses = { data := f.clauses.data } := rfl
  conv => rhs; rw [f_clauses_rw, Array.size_mk]
  exact idx.2
Proof state after:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
⊢ False
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
⊢ False
Tactic:
simp only [getElem!, id_eq_idx, Array.data_length, idx_in_bounds2, ↓reduceDite,
  Fin.eta, Array.get_eq_getElem, Array.getElem_eq_data_get] at heq
Proof state after:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
heq : f.clauses.data.get idx = some c
⊢ False
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
heq : f.clauses.data.get idx = some c
⊢ False
Tactic:
rw [hidx, hl] at heq
Proof state after:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
heq : some (unit (i, b)) = some { clause := [l], nodupkey := ⋯, nodup := ⋯ }
⊢ False
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
heq : some (unit (i, b)) = some { clause := [l], nodupkey := ⋯, nodup := ⋯ }
⊢ False
Tactic:
simp only [unit, Option.some.injEq, DefaultClause.mk.injEq, List.cons.injEq, and_true] at heq
Proof state after:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
heq : (i, b) = l
⊢ False
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
heq : (i, b) = l
⊢ False
Tactic:
simp only [← heq, not] at l_ne_b
Proof state after:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
heq : (i, b) = l
l_ne_b :
  b =
    match b with
    | true => false
    | false => true
⊢ False
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
heq : (i, b) = l
l_ne_b :
  b =
    match b with
    | true => false
    | false => true
⊢ False
Tactic:
split at l_ne_b
Proof state after:
case h_1
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
c✝ : Bool
hb✝ : hasAssignment true (removeAssignment (!true) f.assignments[i.val]) = true
hb : hasAssignment true f.assignments[i.val] = true
hf : some (unit (i, true)) ∈ f.clauses.data
hidx : f.clauses.data.get idx = some (unit (i, true))
heq : (i, true) = l
l_ne_b : true = false
⊢ False

case h_2
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
c✝ : Bool
hb✝ : hasAssignment false (removeAssignment (!false) f.assignments[i.val]) = true
hb : hasAssignment false f.assignments[i.val] = true
hf : some (unit (i, false)) ∈ f.clauses.data
hidx : f.clauses.data.get idx = some (unit (i, false))
heq : (i, false) = l
l_ne_b : false = true
⊢ False
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
case h_1
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
c✝ : Bool
hb✝ : hasAssignment true (removeAssignment (!true) f.assignments[i.val]) = true
hb : hasAssignment true f.assignments[i.val] = true
hf : some (unit (i, true)) ∈ f.clauses.data
hidx : f.clauses.data.get idx = some (unit (i, true))
heq : (i, true) = l
l_ne_b : true = false
⊢ False

case h_2
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
c✝ : Bool
hb✝ : hasAssignment false (removeAssignment (!false) f.assignments[i.val]) = true
hb : hasAssignment false f.assignments[i.val] = true
hf : some (unit (i, false)) ∈ f.clauses.data
hidx : f.clauses.data.get idx = some (unit (i, false))
heq : (i, false) = l
l_ne_b : false = true
⊢ False
Tactic:
. simp only at l_ne_b
Proof state after:
case h_2
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
c✝ : Bool
hb✝ : hasAssignment false (removeAssignment (!false) f.assignments[i.val]) = true
hb : hasAssignment false f.assignments[i.val] = true
hf : some (unit (i, false)) ∈ f.clauses.data
hidx : f.clauses.data.get idx = some (unit (i, false))
heq : (i, false) = l
l_ne_b : false = true
⊢ False
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
case h_2
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
c✝ : Bool
hb✝ : hasAssignment false (removeAssignment (!false) f.assignments[i.val]) = true
hb : hasAssignment false f.assignments[i.val] = true
hf : some (unit (i, false)) ∈ f.clauses.data
hidx : f.clauses.data.get idx = some (unit (i, false))
heq : (i, false) = l
l_ne_b : false = true
⊢ False
Tactic:
. simp only at l_ne_b
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
⊢ ↑idx < f.clauses.size
Tactic:
have f_clauses_rw : f.clauses = { data := f.clauses.data } := rfl
Proof state after:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑idx < f.clauses.size
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑idx < f.clauses.size
Tactic:
conv => rhs; rw [f_clauses_rw, Array.size_mk]
Proof state after:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑idx < f.clauses.data.length
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
b : Bool
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
heq : f.clauses[id]! = some c
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
hb✝ : hasAssignment b (removeAssignment (!b) f.assignments[i.val]) = true
l_ne_b : l.snd = !b
hb : hasAssignment b f.assignments[i.val] = true
hf : some (unit (i, b)) ∈ f.clauses.data
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
hidx : f.clauses.data.get idx = some (unit (i, b))
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
f_clauses_rw : f.clauses = { data := f.clauses.data }
⊢ ↑idx < f.clauses.data.length
Tactic:
exact idx.2
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
case h_1
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
c✝ : Bool
hb✝ : hasAssignment true (removeAssignment (!true) f.assignments[i.val]) = true
hb : hasAssignment true f.assignments[i.val] = true
hf : some (unit (i, true)) ∈ f.clauses.data
hidx : f.clauses.data.get idx = some (unit (i, true))
heq : (i, true) = l
l_ne_b : true = false
⊢ False
Tactic:
simp only at l_ne_b
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.deleteOne_preserves_strong_assignments_invariant
Proof state before:
case h_2
n : Nat
f : DefaultFormula n
id : Nat
hsize : f.assignments.size = n
hsize' : (f.deleteOne id).assignments.size = n
i : PosFin n
i_in_bounds : i.val < f.assignments.size
c : DefaultClause n
l : Literal (PosFin n)
hl : c = { clause := [l], nodupkey := ⋯, nodup := ⋯ }
l_eq_i : l.fst.val = i.val
h✝ : id < f.clauses.size
idx : Fin f.clauses.data.length
idx_in_bounds : ↑idx < (f.clauses.data.set id none).length
id_eq_idx : id = ↑idx
idx_in_bounds2 : ↑idx < f.clauses.size
c✝ : Bool
hb✝ : hasAssignment false (removeAssignment (!false) f.assignments[i.val]) = true
hb : hasAssignment false f.assignments[i.val] = true
hf : some (unit (i, false)) ∈ f.clauses.data
hidx : f.clauses.data.get idx = some (unit (i, false))
heq : (i, false) = l
l_ne_b : false = true
⊢ False
Tactic:
simp only at l_ne_b
Proof state after:
no goals