-- Mathlib/.lake/packages/lean4/src/lean/Std/Tactic/BVDecide/LRAT/Internal/LRATCheckerSound.lean
theorem addRatCaseSound [DecidableEq α] [Clause α β] [Entails α σ] [Formula α β σ] (f : σ)
    (f_readyForRupAdd : ReadyForRupAdd f) (f_readyForRatAdd : ReadyForRatAdd f) (c : β)
    (pivot : Literal α) (f' : σ) (rupHints : Array Nat) (ratHints : Array (Nat × Array Nat))
    (pivot_limplies_c : Limplies α pivot c) (heq : performRatAdd f c pivot rupHints ratHints = (f', true))
    (restPrf : List (Action β α)) (restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a)
    (ih : ∀ (f : σ),
      ReadyForRupAdd f → ReadyForRatAdd f → (∀ (a : Action β α), a ∈ restPrf → WellFormedAction a) →
      lratChecker f restPrf = success → Unsatisfiable α f)
    (f'_success : lratChecker f' restPrf = success) :
    Unsatisfiable α f

Proof state:
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝³ : DecidableEq α
inst✝² : Clause α β
inst✝¹ : Entails α σ
inst✝ : Formula α β σ
f : σ
f_readyForRupAdd : ReadyForRupAdd f
f_readyForRatAdd : ReadyForRatAdd f
c : β
pivot : Literal α
f' : σ
rupHints : Array Nat
ratHints : Array (Nat × Array Nat)
pivot_limplies_c : pivot ∈ Clause.toList c
heq : performRatAdd f c pivot rupHints ratHints = (f', true)
restPrf : List (Action β α)
restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a
ih :
  ∀ (f : σ),
    ReadyForRupAdd f →
      ReadyForRatAdd f →
        (∀ (a : Action β α), a ∈ restPrf → WellFormedAction a) → lratChecker f restPrf = success → Unsatisfiable α f
f'_success : lratChecker f' restPrf = success
⊢ Unsatisfiable α f

Tactic:
have f'_def := ratAdd_result f c pivot rupHints ratHints f' f_readyForRatAdd pivot_limplies_c heq

Result:
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝³ : DecidableEq α
inst✝² : Clause α β
inst✝¹ : Entails α σ
inst✝ : Formula α β σ
f : σ
f_readyForRupAdd : ReadyForRupAdd f
f_readyForRatAdd : ReadyForRatAdd f
c : β
pivot : Literal α
f' : σ
rupHints : Array Nat
ratHints : Array (Nat × Array Nat)
pivot_limplies_c : pivot ∈ Clause.toList c
heq : performRatAdd f c pivot rupHints ratHints = (f', true)
restPrf : List (Action β α)
restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a
ih :
  ∀ (f : σ),
    ReadyForRupAdd f →
      ReadyForRatAdd f →
        (∀ (a : Action β α), a ∈ restPrf → WellFormedAction a) → lratChecker f restPrf = success → Unsatisfiable α f
f'_success : lratChecker f' restPrf = success
f'_def : f' = Formula.insert f c
⊢ Unsatisfiable α f

Proof state:
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝³ : DecidableEq α
inst✝² : Clause α β
inst✝¹ : Entails α σ
inst✝ : Formula α β σ
f : σ
f_readyForRupAdd : ReadyForRupAdd f
f_readyForRatAdd : ReadyForRatAdd f
c : β
pivot : Literal α
f' : σ
rupHints : Array Nat
ratHints : Array (Nat × Array Nat)
pivot_limplies_c : pivot ∈ Clause.toList c
heq : performRatAdd f c pivot rupHints ratHints = (f', true)
restPrf : List (Action β α)
restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a
ih :
  ∀ (f : σ),
    ReadyForRupAdd f →
      ReadyForRatAdd f →
        (∀ (a : Action β α), a ∈ restPrf → WellFormedAction a) → lratChecker f restPrf = success → Unsatisfiable α f
f'_success : lratChecker f' restPrf = success
f'_def : f' = Formula.insert f c
f'_readyForRupAdd : ReadyForRupAdd f'
⊢ Unsatisfiable α f

Tactic:
have f'_readyForRatAdd : ReadyForRatAdd f' := by
  rw [f'_def]
  exact readyForRatAdd_insert f c f_readyForRatAdd

Result:
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝³ : DecidableEq α
inst✝² : Clause α β
inst✝¹ : Entails α σ
inst✝ : Formula α β σ
f : σ
f_readyForRupAdd : ReadyForRupAdd f
f_readyForRatAdd : ReadyForRatAdd f
c : β
pivot : Literal α
f' : σ
rupHints : Array Nat
ratHints : Array (Nat × Array Nat)
pivot_limplies_c : pivot ∈ Clause.toList c
heq : performRatAdd f c pivot rupHints ratHints = (f', true)
restPrf : List (Action β α)
restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a
ih :
  ∀ (f : σ),
    ReadyForRupAdd f →
      ReadyForRatAdd f →
        (∀ (a : Action β α), a ∈ restPrf → WellFormedAction a) → lratChecker f restPrf = success → Unsatisfiable α f
f'_success : lratChecker f' restPrf = success
f'_def : f' = Formula.insert f c
f'_readyForRupAdd : ReadyForRupAdd f'
f'_readyForRatAdd : ReadyForRatAdd f'
⊢ Unsatisfiable α f

Proof state:
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝³ : DecidableEq α
inst✝² : Clause α β
inst✝¹ : Entails α σ
inst✝ : Formula α β σ
f : σ
f_readyForRupAdd : ReadyForRupAdd f
f_readyForRatAdd : ReadyForRatAdd f
c : β
pivot : Literal α
f' : σ
rupHints : Array Nat
ratHints : Array (Nat × Array Nat)
pivot_limplies_c : pivot ∈ Clause.toList c
heq : performRatAdd f c pivot rupHints ratHints = (f', true)
restPrf : List (Action β α)
restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a
f'_success : lratChecker f' restPrf = success
f'_def : f' = Formula.insert f c
f'_readyForRupAdd : ReadyForRupAdd f'
f'_readyForRatAdd : ReadyForRatAdd f'
ih : Unsatisfiable α f'
f_equisat_f' : Unsatisfiable α f ↔ Unsatisfiable α f'
p : α → Bool
pf : p ⊨ f
⊢ False

Tactic:
rw [← f_equisat_f'] at ih

Result:
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝³ : DecidableEq α
inst✝² : Clause α β
inst✝¹ : Entails α σ
inst✝ : Formula α β σ
f : σ
f_readyForRupAdd : ReadyForRupAdd f
f_readyForRatAdd : ReadyForRatAdd f
c : β
pivot : Literal α
f' : σ
rupHints : Array Nat
ratHints : Array (Nat × Array Nat)
pivot_limplies_c : pivot ∈ Clause.toList c
heq : performRatAdd f c pivot rupHints ratHints = (f', true)
restPrf : List (Action β α)
restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a
f'_success : lratChecker f' restPrf = success
f'_def : f' = Formula.insert f c
f'_readyForRupAdd : ReadyForRupAdd f'
f'_readyForRatAdd : ReadyForRatAdd f'
ih : Unsatisfiable α f
f_equisat_f' : Unsatisfiable α f ↔ Unsatisfiable α f'
p : α → Bool
pf : p ⊨ f
⊢ False

Proof state:
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝³ : DecidableEq α
inst✝² : Clause α β
inst✝¹ : Entails α σ
inst✝ : Formula α β σ
f : σ
f_readyForRupAdd : ReadyForRupAdd f
f_readyForRatAdd : ReadyForRatAdd f
c : β
pivot : Literal α
f' : σ
rupHints : Array Nat
ratHints : Array (Nat × Array Nat)
pivot_limplies_c : pivot ∈ Clause.toList c
heq : performRatAdd f c pivot rupHints ratHints = (f', true)
restPrf : List (Action β α)
restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a
ih :
  ∀ (f : σ),
    ReadyForRupAdd f →
      ReadyForRatAdd f →
        (∀ (a : Action β α), a ∈ restPrf → WellFormedAction a) → lratChecker f restPrf = success → Unsatisfiable α f
f'_success : lratChecker f' restPrf = success
f'_def : f' = Formula.insert f c
f'_readyForRupAdd : ReadyForRupAdd f'
⊢ ReadyForRatAdd (Formula.insert f c)

Tactic:
exact readyForRatAdd_insert f c f_readyForRatAdd

Result:
no goals

Proof state:
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝³ : DecidableEq α
inst✝² : Clause α β
inst✝¹ : Entails α σ
inst✝ : Formula α β σ
f : σ
f_readyForRupAdd : ReadyForRupAdd f
f_readyForRatAdd : ReadyForRatAdd f
c : β
pivot : Literal α
f' : σ
rupHints : Array Nat
ratHints : Array (Nat × Array Nat)
pivot_limplies_c : pivot ∈ Clause.toList c
heq : performRatAdd f c pivot rupHints ratHints = (f', true)
restPrf : List (Action β α)
restPrfWellFormed : ∀ (a : Action β α), a ∈ restPrf → WellFormedAction a
f'_success : lratChecker f' restPrf = success
f'_def : f' = Formula.insert f c
f'_readyForRupAdd : ReadyForRupAdd f'
f'_readyForRatAdd : ReadyForRatAdd f'
ih : Unsatisfiable α f
f_equisat_f' : Unsatisfiable α f ↔ Unsatisfiable α f'
p : α → Bool
pf : p ⊨ f
⊢ False

Tactic:
exact ih p pf

Result:
no goals