internlm/Lean-Github huggingface dataset:
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ p ⊨ c
Tactic:
rw [h1] at hboth
Proof state after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[↑⟨i.val, ⋯⟩] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ p ⊨ c
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[↑⟨i.val, ⋯⟩] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ p ⊨ c
Tactic:
simp only at hboth
Proof state after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ p ⊨ c
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ p ⊨ c
Tactic:
have hpos : hasAssignment true (f.assignments[i.1]'i_in_bounds) = true := by simp only [hboth]; decide
Proof state after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
⊢ p ⊨ c
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
⊢ p ⊨ c
Tactic:
have hneg : hasAssignment false (f.assignments[i.1]'i_in_bounds) = true := by simp only [hboth]; decide
Proof state after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
hneg : hasAssignment false f.assignments[i.val] = true
⊢ p ⊨ c
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
hneg : hasAssignment false f.assignments[i.val] = true
⊢ p ⊨ c
Tactic:
have p_entails_i_true := (assignments_invariant_of_strong_assignments_invariant f f_readyForRupAdd.2).2 i true hpos p pf
Proof state after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
hneg : hasAssignment false f.assignments[i.val] = true
p_entails_i_true : p ⊨ (i, true)
⊢ p ⊨ c
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
hneg : hasAssignment false f.assignments[i.val] = true
p_entails_i_true : p ⊨ (i, true)
⊢ p ⊨ c
Tactic:
have p_entails_i_false := (assignments_invariant_of_strong_assignments_invariant f f_readyForRupAdd.2).2 i false hneg p pf
Proof state after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
hneg : hasAssignment false f.assignments[i.val] = true
p_entails_i_true : p ⊨ (i, true)
p_entails_i_false : p ⊨ (i, false)
⊢ p ⊨ c
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
hneg : hasAssignment false f.assignments[i.val] = true
p_entails_i_true : p ⊨ (i, true)
p_entails_i_false : p ⊨ (i, false)
⊢ p ⊨ c
Tactic:
simp only [HSat.eval] at p_entails_i_true p_entails_i_false
Proof state after:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
hneg : hasAssignment false f.assignments[i.val] = true
p_entails_i_true : p i = true
p_entails_i_false : p i = false
⊢ p ⊨ c
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
case intro.inl.intro
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
hneg : hasAssignment false f.assignments[i.val] = true
p_entails_i_true : p i = true
p_entails_i_false : p i = false
⊢ p ⊨ c
Tactic:
simp only [p_entails_i_true] at p_entails_i_false
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ hasAssignment true f.assignments[i.val] = true
Tactic:
simp only [hboth]
Proof state after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ hasAssignment true both = true
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
⊢ hasAssignment true both = true
Tactic:
decide
Proof state after:
no goals
Theorem: LRAT.DefaultFormula.insertRup_entails_hsat
Proof state before:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
⊢ hasAssignment false f.assignments[i.val] = true
Tactic:
simp only [hboth]
Proof state after:
n : Nat
f : DefaultFormula n
f_readyForRupAdd : f.readyForRupAdd
c : DefaultClause n
p : PosFin n → Bool
pf : p ⊨ f
insertUnit_fold_success : (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).2.snd = true
false_imp : false = true → ∃ i, f.assignments[i.val] = both
i : PosFin n
hboth : f.assignments[i.val] = both
i_in_bounds : i.val < f.assignments.size
h0 : insertUnit_invariant f.assignments ⋯ f.rupUnits f.assignments ⋯
insertUnit_fold_satisfies_invariant :
  let update_res := List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate;
  let_fun update_res_size := ⋯;
  insertUnit_invariant f.assignments ⋯ update_res.fst update_res.snd.fst update_res_size
h1 :
  (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).snd.fst[↑⟨i.val, ⋯⟩] = f.assignments[↑⟨i.val, ⋯⟩]
h2 :
  ∀ (j : Fin (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst.size),
    (List.foldl insertUnit (f.rupUnits, f.assignments, false) c.negate).fst[j].fst.val ≠ ↑⟨i.val, ⋯⟩
hpos : hasAssignment true f.assignments[i.val] = true
⊢ hasAssignment false both = true