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

tactic: obtain ⟨N⟩ :=
  isSatisfiable_union_distinctConstantsTheory_of_infinite T (Set.univ : Set κ.out) M
state_before: L : Language
T✝ : Theory L
α : Type w
n : ℕ
T' T : Theory L
κ : Cardinal
M : Type w'
inst✝² : Structure L M
inst✝¹ : M ⊨ T
inst✝ : Infinite M
⊢ ∃ N, lift κ ≤ (#↑N)

tactic: refine' ⟨(N.is_model.mono (Set.subset_union_left _ _)).bundled.reduct _, _⟩
state_before: case intro
L : Language
T✝ : Theory L
α : Type w
n : ℕ
T' T : Theory L
κ : Cardinal
M : Type w'
inst✝² : Structure L M
inst✝¹ : M ⊨ T
inst✝ : Infinite M
N : ModelType (LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T ∪ distinctConstantsTheory L Set.univ)
⊢ ∃ N, lift κ ≤ (#↑N)

tactic: haveI : N ⊨ distinctConstantsTheory _ _ := N.is_model.mono (Set.subset_union_right _ _)
state_before: case intro
L : Language
T✝ : Theory L
α : Type w
n : ℕ
T' T : Theory L
κ : Cardinal
M : Type w'
inst✝² : Structure L M
inst✝¹ : M ⊨ T
inst✝ : Infinite M
N : ModelType (LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T ∪ distinctConstantsTheory L Set.univ)
⊢ lift κ ≤
    (#↑(ModelType.reduct (lhomWithConstants L (Quotient.out κ))
          (Model.bundled (_ : ↑N ⊨ LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T))))

tactic: rw [ModelType.reduct_Carrier, coe_of]
state_before: case intro
L : Language
T✝ : Theory L
α : Type w
n : ℕ
T' T : Theory L
κ : Cardinal
M : Type w'
inst✝² : Structure L M
inst✝¹ : M ⊨ T
inst✝ : Infinite M
N : ModelType (LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T ∪ distinctConstantsTheory L Set.univ)
this : ↑N ⊨ distinctConstantsTheory L Set.univ
⊢ lift κ ≤
    (#↑(ModelType.reduct (lhomWithConstants L (Quotient.out κ))
          (Model.bundled (_ : ↑N ⊨ LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T))))

tactic: refine' _root_.trans (lift_le.2 (le_of_eq (Cardinal.mk_out κ).symm)) _
state_before: case intro
L : Language
T✝ : Theory L
α : Type w
n : ℕ
T' T : Theory L
κ : Cardinal
M : Type w'
inst✝² : Structure L M
inst✝¹ : M ⊨ T
inst✝ : Infinite M
N : ModelType (LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T ∪ distinctConstantsTheory L Set.univ)
this : ↑N ⊨ distinctConstantsTheory L Set.univ
⊢ lift κ ≤ (#↑N)

tactic: rw [← mk_univ]
state_before: case intro
L : Language
T✝ : Theory L
α : Type w
n : ℕ
T' T : Theory L
κ : Cardinal
M : Type w'
inst✝² : Structure L M
inst✝¹ : M ⊨ T
inst✝ : Infinite M
N : ModelType (LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T ∪ distinctConstantsTheory L Set.univ)
this : ↑N ⊨ distinctConstantsTheory L Set.univ
⊢ lift (#Quotient.out κ) ≤ (#↑N)

tactic: refine'
  (card_le_of_model_distinctConstantsTheory L Set.univ N).trans (lift_le.{_, max u v w}.1 _)
state_before: case intro
L : Language
T✝ : Theory L
α : Type w
n : ℕ
T' T : Theory L
κ : Cardinal
M : Type w'
inst✝² : Structure L M
inst✝¹ : M ⊨ T
inst✝ : Infinite M
N : ModelType (LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T ∪ distinctConstantsTheory L Set.univ)
this : ↑N ⊨ distinctConstantsTheory L Set.univ
⊢ lift (#↑Set.univ) ≤ (#↑N)

tactic: rw [lift_lift]
state_before: case intro
L : Language
T✝ : Theory L
α : Type w
n : ℕ
T' T : Theory L
κ : Cardinal
M : Type w'
inst✝² : Structure L M
inst✝¹ : M ⊨ T
inst✝ : Infinite M
N : ModelType (LHom.onTheory (lhomWithConstants L (Quotient.out κ)) T ∪ distinctConstantsTheory L Set.univ)
this : ↑N ⊨ distinctConstantsTheory L Set.univ
⊢ lift (lift (#↑N)) ≤ lift (#↑N)