Theorem: FirstOrder.Language.Term.card_sigma
File: Mathlib/ModelTheory/Encoding.lean

tactic: refine' le_antisymm _ _
state_before: L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ (#(n : ℕ) × Term L (α ⊕ Fin n)) = max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i)

tactic: rw [mk_sigma]
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ (#(n : ℕ) × Term L (α ⊕ Fin n)) ≤ max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i)

tactic: refine' (sum_le_iSup_lift _).trans _
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ (Cardinal.sum fun i => #Term L (α ⊕ Fin i)) ≤ max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i)

tactic: rw [mk_nat, lift_aleph0, mul_eq_max_of_aleph0_le_left le_rfl, max_le_iff,
  ciSup_le_iff' (bddAbove_range _)]
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ (lift (#ℕ) * ⨆ (i : ℕ), #Term L (α ⊕ Fin i)) ≤ max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i)

tactic: refine' ⟨le_max_left _ _, fun i => card_le.trans _⟩
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ ℵ₀ ≤ max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i) ∧ ∀ (i : ℕ), (#Term L (α ⊕ Fin i)) ≤ max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i)

tactic: refine' max_le (le_max_left _ _) _
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
i : ℕ
⊢ max ℵ₀ (#(α ⊕ Fin i) ⊕ (i : ℕ) × Functions L i) ≤ max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i)

tactic: rw [← add_eq_max le_rfl, mk_sum, mk_sum, mk_sum, add_comm (Cardinal.lift (#α)), lift_add,
  add_assoc, lift_lift, lift_lift, mk_fin, lift_natCast]
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
i : ℕ
⊢ (#(α ⊕ Fin i) ⊕ (i : ℕ) × Functions L i) ≤ max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i)

tactic: exact add_le_add_right (nat_lt_aleph0 _).le _
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
i : ℕ
⊢ ↑i + (lift (#α) + lift (#(i : ℕ) × Functions L i)) ≤ ℵ₀ + (lift (#α) + lift (#(i : ℕ) × Functions L i))

tactic: rw [← one_le_iff_ne_zero]
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ (⨆ (i : ℕ), #Term L (α ⊕ Fin i)) ≠ 0

tactic: refine' _root_.trans _ (le_ciSup (bddAbove_range _) 1)
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ 1 ≤ ⨆ (i : ℕ), #Term L (α ⊕ Fin i)

tactic: rw [one_le_iff_ne_zero, mk_ne_zero_iff]
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ 1 ≤ (#Term L (α ⊕ Fin 1))

tactic: exact ⟨var (Sum.inr 0)⟩
state_before: case refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ Nonempty (Term L (α ⊕ Fin 1))

tactic: rw [max_le_iff, ← infinite_iff]
state_before: case refine'_2
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ max ℵ₀ (#α ⊕ (i : ℕ) × Functions L i) ≤ (#(n : ℕ) × Term L (α ⊕ Fin n))

tactic: refine' ⟨Infinite.of_injective (fun i => ⟨i + 1, var (Sum.inr i)⟩) fun i j ij => _, _⟩
state_before: case refine'_2
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ Infinite ((n : ℕ) × Term L (α ⊕ Fin n)) ∧ (#α ⊕ (i : ℕ) × Functions L i) ≤ (#(n : ℕ) × Term L (α ⊕ Fin n))

tactic: cases ij
state_before: case refine'_2.refine'_1
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
i j : ℕ
ij : (fun i => { fst := i + 1, snd := var (Sum.inr ↑i) }) i = (fun i => { fst := i + 1, snd := var (Sum.inr ↑i) }) j
⊢ i = j

tactic: rfl
state_before: case refine'_2.refine'_1.refl
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
i : ℕ
⊢ i = i

tactic: rw [Cardinal.le_def]
state_before: case refine'_2.refine'_2
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ (#α ⊕ (i : ℕ) × Functions L i) ≤ (#(n : ℕ) × Term L (α ⊕ Fin n))

tactic: refine' ⟨⟨Sum.elim (fun i => ⟨0, var (Sum.inl i)⟩)
  fun F => ⟨1, func F.2 fun _ => var (Sum.inr 0)⟩, _⟩⟩
state_before: case refine'_2.refine'_2
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ Nonempty (α ⊕ (i : ℕ) × Functions L i ↪ (n : ℕ) × Term L (α ⊕ Fin n))

tactic: rintro (a | a) (b | b) h
state_before: case refine'_2.refine'_2
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ Function.Injective
    (Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) }) fun F =>
      { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) })

tactic: simp only [Sum.elim_inl, Sigma.mk.inj_iff, heq_eq_eq, var.injEq, Sum.inl.injEq, true_and]
  at h
state_before: case refine'_2.refine'_2.inl.inl
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
a b : α
h :
  Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) })
      (fun F => { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) }) (Sum.inl a) =
    Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) })
      (fun F => { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) }) (Sum.inl b)
⊢ Sum.inl a = Sum.inl b

tactic: rw [h]
state_before: case refine'_2.refine'_2.inl.inl
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
a b : α
h : a = b
⊢ Sum.inl a = Sum.inl b

tactic: simp only [Sum.elim_inl, Sum.elim_inr, Sigma.mk.inj_iff, false_and] at h
state_before: case refine'_2.refine'_2.inl.inr
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
a : α
b : (i : ℕ) × Functions L i
h :
  Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) })
      (fun F => { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) }) (Sum.inl a) =
    Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) })
      (fun F => { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) }) (Sum.inr b)
⊢ Sum.inl a = Sum.inr b

tactic: simp only [Sum.elim_inr, Sum.elim_inl, Sigma.mk.inj_iff, false_and] at h
state_before: case refine'_2.refine'_2.inr.inl
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
a : (i : ℕ) × Functions L i
b : α
h :
  Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) })
      (fun F => { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) }) (Sum.inr a) =
    Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) })
      (fun F => { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) }) (Sum.inl b)
⊢ Sum.inr a = Sum.inl b

tactic: simp only [Sum.elim_inr, Sigma.mk.inj_iff, heq_eq_eq, func.injEq, true_and] at h
state_before: case refine'_2.refine'_2.inr.inr
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
a b : (i : ℕ) × Functions L i
h :
  Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) })
      (fun F => { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) }) (Sum.inr a) =
    Sum.elim (fun i => { fst := 0, snd := var (Sum.inl i) })
      (fun F => { fst := 1, snd := func F.snd fun x => var (Sum.inr 0) }) (Sum.inr b)
⊢ Sum.inr a = Sum.inr b

tactic: rw [Sigma.ext_iff.2 ⟨h.1, h.2.1⟩]
state_before: case refine'_2.refine'_2.inr.inr
L : Language
M : Type w
N : Type ?u.10289
P : Type ?u.10292
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
a b : (i : ℕ) × Functions L i
h : a.fst = b.fst ∧ HEq a.snd b.snd ∧ HEq (fun x => var (Sum.inr 0)) fun x => var (Sum.inr 0)
⊢ Sum.inr a = Sum.inr b