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

tactic: classical
  refine
    ⟨fun h s => h.mono (Set.iUnion_mono fun _ => Set.iUnion_subset_iff.2 fun _ => refl _),
      fun h => ?_⟩
  rw [isSatisfiable_iff_isFinitelySatisfiable]
  intro s hs
  rw [Set.iUnion_eq_iUnion_finset] at hs
  obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion (by
    exact Monotone.directed_le fun t1 t2 (h : ∀ ⦃x⦄, x ∈ t1 → x ∈ t2) =>
      Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩) hs
  exact (h t).mono ht
state_before: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
⊢ IsSatisfiable (⋃ i, T i) ↔ ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
state_after: no goals

tactic: refine
  ⟨fun h s => h.mono (Set.iUnion_mono fun _ => Set.iUnion_subset_iff.2 fun _ => refl _),
    fun h => ?_⟩
state_before: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
⊢ IsSatisfiable (⋃ i, T i) ↔ ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
state_after: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
⊢ IsSatisfiable (⋃ i, T i)

tactic: rw [isSatisfiable_iff_isFinitelySatisfiable]
state_before: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
⊢ IsSatisfiable (⋃ i, T i)
state_after: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
⊢ IsFinitelySatisfiable (⋃ i, T i)

tactic: intro s hs
state_before: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
⊢ IsFinitelySatisfiable (⋃ i, T i)
state_after: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
s : Finset L.Sentence
hs : ↑s ⊆ ⋃ i, T i
⊢ IsSatisfiable ↑s

tactic: rw [Set.iUnion_eq_iUnion_finset] at hs
state_before: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
s : Finset L.Sentence
hs : ↑s ⊆ ⋃ i, T i
⊢ IsSatisfiable ↑s
state_after: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
s : Finset L.Sentence
hs : ↑s ⊆ ⋃ t, ⋃ i ∈ t, T i
⊢ IsSatisfiable ↑s

tactic: obtain ⟨t, ht⟩ := Directed.exists_mem_subset_of_finset_subset_biUnion (by
  exact Monotone.directed_le fun t1 t2 (h : ∀ ⦃x⦄, x ∈ t1 → x ∈ t2) =>
    Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩) hs
state_before: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
s : Finset L.Sentence
hs : ↑s ⊆ ⋃ t, ⋃ i ∈ t, T i
⊢ IsSatisfiable ↑s
state_after: case intro
L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
s : Finset L.Sentence
hs : ↑s ⊆ ⋃ t, ⋃ i ∈ t, T i
t : Finset ι
ht : ↑s ⊆ ⋃ i ∈ t, T i
⊢ IsSatisfiable ↑s

tactic: exact (h t).mono ht
state_before: case intro
L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
s : Finset L.Sentence
hs : ↑s ⊆ ⋃ t, ⋃ i ∈ t, T i
t : Finset ι
ht : ↑s ⊆ ⋃ i ∈ t, T i
⊢ IsSatisfiable ↑s
state_after: no goals

tactic: exact Monotone.directed_le fun t1 t2 (h : ∀ ⦃x⦄, x ∈ t1 → x ∈ t2) =>
  Set.iUnion_mono fun _ => Set.iUnion_mono' fun h1 => ⟨h h1, refl _⟩
state_before: L : Language
T✝ : L.Theory
α : Type w
n : ℕ
T' : L.Theory
ι : Type u_1
T : ι → L.Theory
h : ∀ (s : Finset ι), IsSatisfiable (⋃ i ∈ s, T i)
s : Finset L.Sentence
hs : ↑s ⊆ ⋃ t, ⋃ i ∈ t, T i
⊢ Directed (fun x x_1 => x ⊆ x_1) fun i => ⋃ i_1 ∈ i, T i_1
state_after: no goals