Theorem: FirstOrder.Language.Theory.models_iff_finset_models
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: simp only [models_iff_not_satisfiable]
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
⊢ T ⊨ᵇ φ ↔ ∃ T0, ↑T0 ⊆ T ∧ ↑T0 ⊨ᵇ φ
state_after: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
⊢ ¬(T ∪ {Formula.not φ}).IsSatisfiable ↔ ∃ T0, ↑T0 ⊆ T ∧ ¬(↑T0 ∪ {Formula.not φ}).IsSatisfiable

tactic: rw [← not_iff_not, not_not, isSatisfiable_iff_isFinitelySatisfiable, IsFinitelySatisfiable]
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
⊢ ¬(T ∪ {Formula.not φ}).IsSatisfiable ↔ ∃ T0, ↑T0 ⊆ T ∧ ¬(↑T0 ∪ {Formula.not φ}).IsSatisfiable
state_after: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0) ↔
    ¬∃ T0, ↑T0 ⊆ T ∧ ¬(↑T0 ∪ {Formula.not φ}).IsSatisfiable

tactic: push_neg
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0) ↔
    ¬∃ T0, ↑T0 ⊆ T ∧ ¬(↑T0 ∪ {Formula.not φ}).IsSatisfiable
state_after: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0) ↔
    ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable

tactic: letI := Classical.decEq (Sentence L)
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0) ↔
    ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable
state_after: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0) ↔
    ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable

tactic: constructor
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0) ↔
    ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable
state_after: case mp
L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0) →
    ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable

case mpr
L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable) →
    ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0

tactic: intro h T0 hT0
state_before: case mp
L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0) →
    ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable
state_after: case mp
L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T
⊢ (↑T0 ∪ {Formula.not φ}).IsSatisfiable

tactic: simpa using h (T0 ∪ {Formula.not φ})
  (by
    simp only [Finset.coe_union, Finset.coe_singleton]
    exact Set.union_subset_union hT0 (Set.Subset.refl _))
state_before: case mp
L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T
⊢ (↑T0 ∪ {Formula.not φ}).IsSatisfiable
state_after: no goals

tactic: simp only [Finset.coe_union, Finset.coe_singleton]
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T
⊢ ↑(T0 ∪ {Formula.not φ}) ⊆ T ∪ {Formula.not φ}
state_after: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T
⊢ ↑T0 ∪ {Formula.not φ} ⊆ T ∪ {Formula.not φ}

tactic: exact Set.union_subset_union hT0 (Set.Subset.refl _)
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T
⊢ ↑T0 ∪ {Formula.not φ} ⊆ T ∪ {Formula.not φ}
state_after: no goals

tactic: intro h T0 hT0
state_before: case mpr
L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
⊢ (∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable) →
    ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T ∪ {Formula.not φ} → IsSatisfiable ↑T0
state_after: case mpr
L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T ∪ {Formula.not φ}
⊢ IsSatisfiable ↑T0

tactic: exact IsSatisfiable.mono (h (T0.erase (Formula.not φ))
  (by simpa using hT0)) (by simp)
state_before: case mpr
L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T ∪ {Formula.not φ}
⊢ IsSatisfiable ↑T0
state_after: no goals

tactic: simpa using hT0
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T ∪ {Formula.not φ}
⊢ ↑(T0.erase (Formula.not φ)) ⊆ T
state_after: no goals

tactic: simp
state_before: L : Language
T : L.Theory
α : Type w
n : ℕ
φ : L.Sentence
this : DecidableEq L.Sentence := Classical.decEq L.Sentence
h : ∀ (T0 : Finset L.Sentence), ↑T0 ⊆ T → (↑T0 ∪ {Formula.not φ}).IsSatisfiable
T0 : Finset L.Sentence
hT0 : ↑T0 ⊆ T ∪ {Formula.not φ}
⊢ ↑T0 ⊆ ↑(T0.erase (Formula.not φ)) ∪ {Formula.not φ}
state_after: no goals