Theorem: FirstOrder.Language.exists_elementaryEmbedding_card_eq_of_ge
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: obtain ⟨N0, hN0⟩ := (L.elementaryDiagram M).exists_large_model_of_infinite_model κ M
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
⊢ ∃ N, Nonempty (M ↪ₑ[L] ↑N) ∧ (#↑N) = κ

tactic: rw [← lift_le.{max w w', max u v}, lift_lift, lift_lift] at h2
state_before: case intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
⊢ ∃ N, Nonempty (M ↪ₑ[L] ↑N) ∧ (#↑N) = κ

tactic: obtain ⟨N, ⟨NN0⟩, hN⟩ :=
  exists_elementaryEmbedding_card_eq_of_le (L[[M]]) N0 κ
    (aleph0_le_lift.1 ((aleph0_le_lift.2 (aleph0_le_mk M)).trans h2))
    (by
      simp only [card_withConstants, lift_add, lift_lift]
      rw [add_comm, add_eq_max (aleph0_le_lift.2 (infinite_iff.1 iM)), max_le_iff]
      rw [← lift_le.{_, w'}, lift_lift, lift_lift] at h1
      exact ⟨h2, h1⟩)
    (hN0.trans (by rw [← lift_umax', lift_id]))
state_before: case intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
⊢ ∃ N, Nonempty (M ↪ₑ[L] ↑N) ∧ (#↑N) = κ

tactic: simp only [card_withConstants, lift_add, lift_lift]
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
⊢ lift (card (L[[M]])) ≤ lift κ

tactic: rw [add_comm, add_eq_max (aleph0_le_lift.2 (infinite_iff.1 iM)), max_le_iff]
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
⊢ lift (card L) + lift (#M) ≤ lift κ

tactic: rw [← lift_le.{_, w'}, lift_lift, lift_lift] at h1
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
⊢ lift (#M) ≤ lift κ ∧ lift (card L) ≤ lift κ

tactic: exact ⟨h2, h1⟩
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
⊢ lift (#M) ≤ lift κ ∧ lift (card L) ≤ lift κ

tactic: rw [← lift_umax', lift_id]
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
⊢ (#↑N0) ≤ lift (#↑N0)

tactic: letI := (lhomWithConstants L M).reduct N
state_before: case intro.intro.intro.intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
N : Bundled (Structure (L[[M]]))
hN : (#↑N) = κ
NN0 : ↑N ↪ₑ[L[[M]]] ↑N0
⊢ ∃ N, Nonempty (M ↪ₑ[L] ↑N) ∧ (#↑N) = κ

tactic: haveI h : N ⊨ L.elementaryDiagram M :=
  (NN0.theory_model_iff (L.elementaryDiagram M)).2 inferInstance
state_before: case intro.intro.intro.intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
N : Bundled (Structure (L[[M]]))
hN : (#↑N) = κ
NN0 : ↑N ↪ₑ[L[[M]]] ↑N0
this : Structure L ↑N := LHom.reduct (lhomWithConstants L M) ↑N
⊢ ∃ N, Nonempty (M ↪ₑ[L] ↑N) ∧ (#↑N) = κ

tactic: refine' ⟨Bundled.of N, ⟨_⟩, hN⟩
state_before: case intro.intro.intro.intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
N : Bundled (Structure (L[[M]]))
hN : (#↑N) = κ
NN0 : ↑N ↪ₑ[L[[M]]] ↑N0
this : Structure L ↑N := LHom.reduct (lhomWithConstants L M) ↑N
h : ↑N ⊨ elementaryDiagram L M
⊢ ∃ N, Nonempty (M ↪ₑ[L] ↑N) ∧ (#↑N) = κ

tactic: apply ElementaryEmbedding.ofModelsElementaryDiagram L M N
state_before: case intro.intro.intro.intro
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝ : Structure L M
iM : Infinite M
κ : Cardinal
h1 : lift (card L) ≤ lift κ
h2 : lift (#M) ≤ lift κ
N0 : Theory.ModelType (elementaryDiagram L M)
hN0 : lift κ ≤ (#↑N0)
N : Bundled (Structure (L[[M]]))
hN : (#↑N) = κ
NN0 : ↑N ↪ₑ[L[[M]]] ↑N0
this : Structure L ↑N := LHom.reduct (lhomWithConstants L M) ↑N
h : ↑N ⊨ elementaryDiagram L M
⊢ M ↪ₑ[L] ↑(Bundled.of ↑N)