l3lab/ntp-mathlib huggingface dataset:
/-- The lift of a supremum is the supremum of the lifts. -/
theorem lift_sSup {s : Set Cardinal} (hs : BddAbove s) :
    lift.{u} (sSup s) = sSup (lift.{u} '' s) := by
  apply ((le_csSup_iff' (bddAbove_image.{_,u} _ hs)).2 fun c hc => _).antisymm (csSup_le' _)
  · intro c hc
    by_contra h
    obtain ⟨d, rfl⟩ := Cardinal.lift_down (not_le.1 h).le
    simp_rw [lift_le] at h hc
    

Proof state:
case intro
α β : Type u
s : Set Cardinal.{u_1}
hs : BddAbove s
d : Cardinal.{u_1}
hc : lift.{u, u_1} d ∈ upperBounds (lift.{u, u_1} '' s)
h : ¬sSup s ≤ d
⊢ False

Next tactic:
rw [csSup_le_iff' hs] at h
/-- The lift of a supremum is the supremum of the lifts. -/
theorem lift_sSup {s : Set Cardinal} (hs : BddAbove s) :
    lift.{u} (sSup s) = sSup (lift.{u} '' s) := by
  apply ((le_csSup_iff' (bddAbove_image.{_,u} _ hs)).2 fun c hc => _).antisymm (csSup_le' _)
  · intro c hc
    by_contra h
    obtain ⟨d, rfl⟩ := Cardinal.lift_down (not_le.1 h).le
    simp_rw [lift_le] at h hc
    rw [csSup_le_iff' hs] at h
    

Proof state:
case intro
α β : Type u
s : Set Cardinal.{u_1}
hs : BddAbove s
d : Cardinal.{u_1}
hc : lift.{u, u_1} d ∈ upperBounds (lift.{u, u_1} '' s)
h : ¬∀ x ∈ s, x ≤ d
⊢ False

Next tactic:
exact h fun a ha => lift_le.1 <| hc (mem_image_of_mem _ ha)
/-- The lift of a supremum is the supremum of the lifts. -/
theorem lift_sSup {s : Set Cardinal} (hs : BddAbove s) :
    lift.{u} (sSup s) = sSup (lift.{u} '' s) := by
  apply ((le_csSup_iff' (bddAbove_image.{_,u} _ hs)).2 fun c hc => _).antisymm (csSup_le' _)
  · intro c hc
    by_contra h
    obtain ⟨d, rfl⟩ := Cardinal.lift_down (not_le.1 h).le
    simp_rw [lift_le] at h hc
    rw [csSup_le_iff' hs] at h
    exact h fun a ha => lift_le.1 <| hc (mem_image_of_mem _ ha)
  · 

Proof state:
α β : Type u
s : Set Cardinal.{u_1}
hs : BddAbove s
⊢ lift.{u, u_1} (sSup s) ∈ upperBounds (lift.{u, u_1} '' s)

Next tactic:
rintro i ⟨j, hj, rfl⟩
/-- The lift of a supremum is the supremum of the lifts. -/
theorem lift_sSup {s : Set Cardinal} (hs : BddAbove s) :
    lift.{u} (sSup s) = sSup (lift.{u} '' s) := by
  apply ((le_csSup_iff' (bddAbove_image.{_,u} _ hs)).2 fun c hc => _).antisymm (csSup_le' _)
  · intro c hc
    by_contra h
    obtain ⟨d, rfl⟩ := Cardinal.lift_down (not_le.1 h).le
    simp_rw [lift_le] at h hc
    rw [csSup_le_iff' hs] at h
    exact h fun a ha => lift_le.1 <| hc (mem_image_of_mem _ ha)
  · rintro i ⟨j, hj, rfl⟩
    

Proof state:
case intro.intro
α β : Type u
s : Set Cardinal.{u_1}
hs : BddAbove s
j : Cardinal.{u_1}
hj : j ∈ s
⊢ lift.{u, u_1} j ≤ lift.{u, u_1} (sSup s)

Next tactic:
exact lift_le.2 (le_csSup hs hj)
/-- The lift of a supremum is the supremum of the lifts. -/
theorem lift_iSup {ι : Type v} {f : ι → Cardinal.{w}} (hf : BddAbove (range f)) :
    lift.{u} (iSup f) = ⨆ i, lift.{u} (f i) := by
  

Proof state:
α β : Type u
ι : Type v
f : ι → Cardinal.{w}
hf : BddAbove (range f)
⊢ lift.{u, w} (iSup f) = ⨆ i, lift.{u, w} (f i)

Next tactic:
rw [iSup, iSup, lift_sSup hf, ← range_comp]
/-- The lift of a supremum is the supremum of the lifts. -/
theorem lift_iSup {ι : Type v} {f : ι → Cardinal.{w}} (hf : BddAbove (range f)) :
    lift.{u} (iSup f) = ⨆ i, lift.{u} (f i) := by
  rw [iSup, iSup, lift_sSup hf, ← range_comp]
  

Proof state:
α β : Type u
ι : Type v
f : ι → Cardinal.{w}
hf : BddAbove (range f)
⊢ sSup (range (lift.{u, w} ∘ f)) = sSup (range fun i => lift.{u, w} (f i))

Next tactic:
simp [Function.comp]
/-- To prove that the lift of a supremum is bounded by some cardinal `t`,
it suffices to show that the lift of each cardinal is bounded by `t`. -/
theorem lift_iSup_le {ι : Type v} {f : ι → Cardinal.{w}} {t : Cardinal} (hf : BddAbove (range f))
    (w : ∀ i, lift.{u} (f i) ≤ t) : lift.{u} (iSup f) ≤ t := by
  

Proof state:
α β : Type u
ι : Type v
f : ι → Cardinal.{w}
t : Cardinal.{max u w}
hf : BddAbove (range f)
w : ∀ (i : ι), lift.{u, w} (f i) ≤ t
⊢ lift.{u, w} (iSup f) ≤ t

Next tactic:
rw [lift_iSup hf]
/-- To prove that the lift of a supremum is bounded by some cardinal `t`,
it suffices to show that the lift of each cardinal is bounded by `t`. -/
theorem lift_iSup_le {ι : Type v} {f : ι → Cardinal.{w}} {t : Cardinal} (hf : BddAbove (range f))
    (w : ∀ i, lift.{u} (f i) ≤ t) : lift.{u} (iSup f) ≤ t := by
  rw [lift_iSup hf]
  

Proof state:
α β : Type u
ι : Type v
f : ι → Cardinal.{w}
t : Cardinal.{max u w}
hf : BddAbove (range f)
w : ∀ (i : ι), lift.{u, w} (f i) ≤ t
⊢ ⨆ i, lift.{u, w} (f i) ≤ t

Next tactic:
exact ciSup_le' w
@[simp]
theorem lift_iSup_le_iff {ι : Type v} {f : ι → Cardinal.{w}} (hf : BddAbove (range f))
    {t : Cardinal} : lift.{u} (iSup f) ≤ t ↔ ∀ i, lift.{u} (f i) ≤ t := by
  

Proof state:
α β : Type u
ι : Type v
f : ι → Cardinal.{w}
hf : BddAbove (range f)
t : Cardinal.{max u w}
⊢ lift.{u, w} (iSup f) ≤ t ↔ ∀ (i : ι), lift.{u, w} (f i) ≤ t

Next tactic:
rw [lift_iSup hf]
@[simp]
theorem lift_iSup_le_iff {ι : Type v} {f : ι → Cardinal.{w}} (hf : BddAbove (range f))
    {t : Cardinal} : lift.{u} (iSup f) ≤ t ↔ ∀ i, lift.{u} (f i) ≤ t := by
  rw [lift_iSup hf]
  

Proof state:
α β : Type u
ι : Type v
f : ι → Cardinal.{w}
hf : BddAbove (range f)
t : Cardinal.{max u w}
⊢ ⨆ i, lift.{u, w} (f i) ≤ t ↔ ∀ (i : ι), lift.{u, w} (f i) ≤ t

Next tactic:
exact ciSup_le_iff' (bddAbove_range_comp.{_,_,u} hf _)
/-- To prove an inequality between the lifts to a common universe of two different supremums,
it suffices to show that the lift of each cardinal from the smaller supremum
if bounded by the lift of some cardinal from the larger supremum.
-/
theorem lift_iSup_le_lift_iSup {ι : Type v} {ι' : Type v'} {f : ι → Cardinal.{w}}
    {f' : ι' → Cardinal.{w'}} (hf : BddAbove (range f)) (hf' : BddAbove (range f')) {g : ι → ι'}
    (h : ∀ i, lift.{w'} (f i) ≤ lift.{w} (f' (g i))) : lift.{w'} (iSup f) ≤ lift.{w} (iSup f') := by
  

Proof state:
α β : Type u
ι : Type v
ι' : Type v'
f : ι → Cardinal.{w}
f' : ι' → Cardinal.{w'}
hf : BddAbove (range f)
hf' : BddAbove (range f')
g : ι → ι'
h : ∀ (i : ι), lift.{w', w} (f i) ≤ lift.{w, w'} (f' (g i))
⊢ lift.{w', w} (iSup f) ≤ lift.{w, w'} (iSup f')

Next tactic:
rw [lift_iSup hf, lift_iSup hf']
/-- To prove an inequality between the lifts to a common universe of two different supremums,
it suffices to show that the lift of each cardinal from the smaller supremum
if bounded by the lift of some cardinal from the larger supremum.
-/
theorem lift_iSup_le_lift_iSup {ι : Type v} {ι' : Type v'} {f : ι → Cardinal.{w}}
    {f' : ι' → Cardinal.{w'}} (hf : BddAbove (range f)) (hf' : BddAbove (range f')) {g : ι → ι'}
    (h : ∀ i, lift.{w'} (f i) ≤ lift.{w} (f' (g i))) : lift.{w'} (iSup f) ≤ lift.{w} (iSup f') := by
  rw [lift_iSup hf, lift_iSup hf']
  

Proof state:
α β : Type u
ι : Type v
ι' : Type v'
f : ι → Cardinal.{w}
f' : ι' → Cardinal.{w'}
hf : BddAbove (range f)
hf' : BddAbove (range f')
g : ι → ι'
h : ∀ (i : ι), lift.{w', w} (f i) ≤ lift.{w, w'} (f' (g i))
⊢ ⨆ i, lift.{w', w} (f i) ≤ ⨆ i, lift.{w, w'} (f' i)

Next tactic:
exact ciSup_mono' (bddAbove_range_comp.{_,_,w} hf' _) fun i => ⟨_, h i⟩
@[simp]
theorem aleph0_le_lift {c : Cardinal.{u}} : ℵ₀ ≤ lift.{v} c ↔ ℵ₀ ≤ c := by
  

Proof state:
α β : Type u
c : Cardinal.{u}
⊢ ℵ₀ ≤ lift.{v, u} c ↔ ℵ₀ ≤ c

Next tactic:
rw [← lift_aleph0.{u,v}, lift_le]
@[simp]
theorem lift_le_aleph0 {c : Cardinal.{u}} : lift.{v} c ≤ ℵ₀ ↔ c ≤ ℵ₀ := by
  

Proof state:
α β : Type u
c : Cardinal.{u}
⊢ lift.{v, u} c ≤ ℵ₀ ↔ c ≤ ℵ₀

Next tactic:
rw [← lift_aleph0.{u,v}, lift_le]
@[simp]
theorem aleph0_lt_lift {c : Cardinal.{u}} : ℵ₀ < lift.{v} c ↔ ℵ₀ < c := by
  

Proof state:
α β : Type u
c : Cardinal.{u}
⊢ ℵ₀ < lift.{v, u} c ↔ ℵ₀ < c

Next tactic:
rw [← lift_aleph0.{u,v}, lift_lt]
@[simp]
theorem lift_lt_aleph0 {c : Cardinal.{u}} : lift.{v} c < ℵ₀ ↔ c < ℵ₀ := by
  

Proof state:
α β : Type u
c : Cardinal.{u}
⊢ lift.{v, u} c < ℵ₀ ↔ c < ℵ₀

Next tactic:
rw [← lift_aleph0.{u,v}, lift_lt]
theorem mk_fin (n : ℕ) : #(Fin n) = n := by 

Proof state:
α β : Type u
n : ℕ
⊢ #(Fin n) = ↑n

Next tactic:
simp
@[simp]
theorem lift_natCast (n : ℕ) : lift.{u} (n : Cardinal.{v}) = n := by 

Proof state:
α β : Type u
n : ℕ
⊢ lift.{u, v} ↑n = ↑n

Next tactic:
induction n
@[simp]
theorem lift_natCast (n : ℕ) : lift.{u} (n : Cardinal.{v}) = n := by induction n <;> 

Proof state:
case zero
α β : Type u
⊢ lift.{u, v} ↑Nat.zero = ↑Nat.zero

Next tactic:
simp [*]
@[simp]
theorem lift_natCast (n : ℕ) : lift.{u} (n : Cardinal.{v}) = n := by induction n <;> 

Proof state:
case succ
α β : Type u
n✝ : ℕ
n_ih✝ : lift.{u, v} ↑n✝ = ↑n✝
⊢ lift.{u, v} ↑(Nat.succ n✝) = ↑(Nat.succ n✝)

Next tactic:
simp [*]
@[simp]
theorem nat_eq_lift_iff {n : ℕ} {a : Cardinal.{u}} :
    (n : Cardinal) = lift.{v} a ↔ (n : Cardinal) = a := by
  

Proof state:
α β : Type u
n : ℕ
a : Cardinal.{u}
⊢ ↑n = lift.{v, u} a ↔ ↑n = a

Next tactic:
rw [← lift_natCast.{v,u} n, lift_inj]
@[simp]
theorem lift_le_nat_iff {a : Cardinal.{u}} {n : ℕ} : lift.{v} a ≤ n ↔ a ≤ n := by
  

Proof state:
α β : Type u
a : Cardinal.{u}
n : ℕ
⊢ lift.{v, u} a ≤ ↑n ↔ a ≤ ↑n

Next tactic:
rw [← lift_natCast.{v,u}, lift_le]
@[simp]
theorem nat_le_lift_iff {n : ℕ} {a : Cardinal.{u}} : n ≤ lift.{v} a ↔ n ≤ a := by
  

Proof state:
α β : Type u
n : ℕ
a : Cardinal.{u}
⊢ ↑n ≤ lift.{v, u} a ↔ ↑n ≤ a

Next tactic:
rw [← lift_natCast.{v,u}, lift_le]
@[simp]
theorem lift_lt_nat_iff {a : Cardinal.{u}} {n : ℕ} : lift.{v} a < n ↔ a < n := by
  

Proof state:
α β : Type u
a : Cardinal.{u}
n : ℕ
⊢ lift.{v, u} a < ↑n ↔ a < ↑n

Next tactic:
rw [← lift_natCast.{v,u}, lift_lt]
@[simp]
theorem nat_lt_lift_iff {n : ℕ} {a : Cardinal.{u}} : n < lift.{v} a ↔ n < a := by
  

Proof state:
α β : Type u
n : ℕ
a : Cardinal.{u}
⊢ ↑n < lift.{v, u} a ↔ ↑n < a

Next tactic:
rw [← lift_natCast.{v,u}, lift_lt]
theorem mk_coe_finset {α : Type u} {s : Finset α} : #s = ↑(Finset.card s) := by 

Proof state:
α✝ β α : Type u
s : Finset α
⊢ #{ x // x ∈ s } = ↑(Finset.card s)

Next tactic:
simp
theorem mk_finset_of_fintype [Fintype α] : #(Finset α) = 2 ^ Fintype.card α := by
  

Proof state:
α β : Type u
inst✝ : Fintype α
⊢ #(Finset α) = 2 ^ Fintype.card α

Next tactic:
simp [Pow.pow]
@[simp]
theorem mk_finsupp_lift_of_fintype (α : Type u) (β : Type v) [Fintype α] [Zero β] :
    #(α →₀ β) = lift.{u} #β ^ Fintype.card α := by
  

Proof state:
α✝ β✝ α : Type u
β : Type v
inst✝¹ : Fintype α
inst✝ : Zero β
⊢ #(α →₀ β) = lift.{u, v} #β ^ Fintype.card α

Next tactic:
simpa using (@Finsupp.equivFunOnFinite α β _ _).cardinal_eq
theorem mk_finsupp_of_fintype (α β : Type u) [Fintype α] [Zero β] :
    #(α →₀ β) = #β ^ Fintype.card α := by 

Proof state:
α✝ β✝ α β : Type u
inst✝¹ : Fintype α
inst✝ : Zero β
⊢ #(α →₀ β) = #β ^ Fintype.card α

Next tactic:
simp
@[norm_cast]
theorem natCast_pow {m n : ℕ} : (↑(m ^ n) : Cardinal) = (↑m : Cardinal) ^ (↑n : Cardinal) := by
  

Proof state:
α β : Type u
m n : ℕ
⊢ ↑(m ^ n) = ↑m ^ ↑n

Next tactic:
induction n
@[norm_cast]
theorem natCast_pow {m n : ℕ} : (↑(m ^ n) : Cardinal) = (↑m : Cardinal) ^ (↑n : Cardinal) := by
  induction n <;> 

Proof state:
case zero
α β : Type u
m : ℕ
⊢ ↑(m ^ Nat.zero) = ↑m ^ ↑Nat.zero

Next tactic:
simp [pow_succ', power_add, *, Pow.pow]
@[norm_cast]
theorem natCast_pow {m n : ℕ} : (↑(m ^ n) : Cardinal) = (↑m : Cardinal) ^ (↑n : Cardinal) := by
  induction n <;> 

Proof state:
case succ
α β : Type u
m n✝ : ℕ
n_ih✝ : ↑(m ^ n✝) = ↑m ^ ↑n✝
⊢ ↑(m ^ Nat.succ n✝) = ↑m ^ ↑(Nat.succ n✝)

Next tactic:
simp [pow_succ', power_add, *, Pow.pow]
@[norm_cast]
theorem natCast_le {m n : ℕ} : (m : Cardinal) ≤ n ↔ m ≤ n := by
  

Proof state:
α β : Type u
m n : ℕ
⊢ ↑m ≤ ↑n ↔ m ≤ n

Next tactic:
rw [← lift_mk_fin, ← lift_mk_fin, lift_le, le_def, Function.Embedding.nonempty_iff_card_le,
    Fintype.card_fin, Fintype.card_fin]
@[norm_cast]
theorem natCast_lt {m n : ℕ} : (m : Cardinal) < n ↔ m < n := by
  

Proof state:
α β : Type u
m n : ℕ
⊢ ↑m < ↑n ↔ m < n

Next tactic:
rw [lt_iff_le_not_le, ← not_le]
@[norm_cast]
theorem natCast_lt {m n : ℕ} : (m : Cardinal) < n ↔ m < n := by
  rw [lt_iff_le_not_le, ← not_le]
  

Proof state:
α β : Type u
m n : ℕ
⊢ ↑m ≤ ↑n ∧ ¬↑n ≤ ↑m ↔ ¬n ≤ m

Next tactic:
simp only [natCast_le, not_le, and_iff_right_iff_imp]
@[norm_cast]
theorem natCast_lt {m n : ℕ} : (m : Cardinal) < n ↔ m < n := by
  rw [lt_iff_le_not_le, ← not_le]
  simp only [natCast_le, not_le, and_iff_right_iff_imp]
  

Proof state:
α β : Type u
m n : ℕ
⊢ m < n → m ≤ n

Next tactic:
exact fun h ↦ le_of_lt h
@[simp, norm_cast]
theorem nat_succ (n : ℕ) : (n.succ : Cardinal) = succ ↑n := by
  

Proof state:
α β : Type u
n : ℕ
⊢ ↑(Nat.succ n) = succ ↑n

Next tactic:
rw [Nat.cast_succ]
@[simp, norm_cast]
theorem nat_succ (n : ℕ) : (n.succ : Cardinal) = succ ↑n := by
  rw [Nat.cast_succ]
  

Proof state:
α β : Type u
n : ℕ
⊢ ↑n + 1 = succ ↑n

Next tactic:
refine (add_one_le_succ _).antisymm (succ_le_of_lt ?_)
@[simp, norm_cast]
theorem nat_succ (n : ℕ) : (n.succ : Cardinal) = succ ↑n := by
  rw [Nat.cast_succ]
  refine (add_one_le_succ _).antisymm (succ_le_of_lt ?_)
  

Proof state:
α β : Type u
n : ℕ
⊢ ↑n < ↑n + 1

Next tactic:
rw [← Nat.cast_succ]
@[simp, norm_cast]
theorem nat_succ (n : ℕ) : (n.succ : Cardinal) = succ ↑n := by
  rw [Nat.cast_succ]
  refine (add_one_le_succ _).antisymm (succ_le_of_lt ?_)
  rw [← Nat.cast_succ]
  

Proof state:
α β : Type u
n : ℕ
⊢ ↑n < ↑(Nat.succ n)

Next tactic:
exact natCast_lt.2 (Nat.lt_succ_self _)
@[simp]
theorem succ_zero : succ (0 : Cardinal) = 1 := by 

Proof state:
α β : Type u
⊢ succ 0 = 1

Next tactic:
norm_cast
theorem card_le_of {α : Type u} {n : ℕ} (H : ∀ s : Finset α, s.card ≤ n) : #α ≤ n := by
  

Proof state:
α✝ β α : Type u
n : ℕ
H : ∀ (s : Finset α), Finset.card s ≤ n
⊢ #α ≤ ↑n

Next tactic:
refine' le_of_lt_succ (lt_of_not_ge fun hn => _)
theorem card_le_of {α : Type u} {n : ℕ} (H : ∀ s : Finset α, s.card ≤ n) : #α ≤ n := by
  refine' le_of_lt_succ (lt_of_not_ge fun hn => _)
  

Proof state:
α✝ β α : Type u
n : ℕ
H : ∀ (s : Finset α), Finset.card s ≤ n
hn : #α ≥ succ ↑n
⊢ False

Next tactic:
rw [← Cardinal.nat_succ, ← lift_mk_fin n.succ] at hn
theorem card_le_of {α : Type u} {n : ℕ} (H : ∀ s : Finset α, s.card ≤ n) : #α ≤ n := by
  refine' le_of_lt_succ (lt_of_not_ge fun hn => _)
  rw [← Cardinal.nat_succ, ← lift_mk_fin n.succ] at hn
  

Proof state:
α✝ β α : Type u
n : ℕ
H : ∀ (s : Finset α), Finset.card s ≤ n
hn : #α ≥ lift.{u, 0} #(Fin (Nat.succ n))
⊢ False

Next tactic:
cases' hn with f
theorem card_le_of {α : Type u} {n : ℕ} (H : ∀ s : Finset α, s.card ≤ n) : #α ≤ n := by
  refine' le_of_lt_succ (lt_of_not_ge fun hn => _)
  rw [← Cardinal.nat_succ, ← lift_mk_fin n.succ] at hn
  cases' hn with f
  

Proof state:
case intro
α✝ β α : Type u
n : ℕ
H : ∀ (s : Finset α), Finset.card s ≤ n
f : ULift.{u, 0} (Fin (Nat.succ n)) ↪ α
⊢ False

Next tactic:
refine' (H <| Finset.univ.map f).not_lt _
theorem card_le_of {α : Type u} {n : ℕ} (H : ∀ s : Finset α, s.card ≤ n) : #α ≤ n := by
  refine' le_of_lt_succ (lt_of_not_ge fun hn => _)
  rw [← Cardinal.nat_succ, ← lift_mk_fin n.succ] at hn
  cases' hn with f
  refine' (H <| Finset.univ.map f).not_lt _
  

Proof state:
case intro
α✝ β α : Type u
n : ℕ
H : ∀ (s : Finset α), Finset.card s ≤ n
f : ULift.{u, 0} (Fin (Nat.succ n)) ↪ α
⊢ n < Finset.card (Finset.map f Finset.univ)

Next tactic:
rw [Finset.card_map, ← Fintype.card, Fintype.card_ulift, Fintype.card_fin]
theorem card_le_of {α : Type u} {n : ℕ} (H : ∀ s : Finset α, s.card ≤ n) : #α ≤ n := by
  refine' le_of_lt_succ (lt_of_not_ge fun hn => _)
  rw [← Cardinal.nat_succ, ← lift_mk_fin n.succ] at hn
  cases' hn with f
  refine' (H <| Finset.univ.map f).not_lt _
  rw [Finset.card_map, ← Fintype.card, Fintype.card_ulift, Fintype.card_fin]
  

Proof state:
case intro
α✝ β α : Type u
n : ℕ
H : ∀ (s : Finset α), Finset.card s ≤ n
f : ULift.{u, 0} (Fin (Nat.succ n)) ↪ α
⊢ n < Nat.succ n

Next tactic:
exact n.lt_succ_self
theorem cantor' (a) {b : Cardinal} (hb : 1 < b) : a < b ^ a := by
  

Proof state:
α β : Type u
a b : Cardinal.{u_1}
hb : 1 < b
⊢ a < b ^ a

Next tactic:
rw [← succ_le_iff, (by norm_cast : succ (1 : Cardinal) = 2)] at hb
theorem cantor' (a) {b : Cardinal} (hb : 1 < b) : a < b ^ a := by
  rw [← succ_le_iff, (by 

Proof state:
α β : Type u
a b : Cardinal.{u_1}
hb : succ 1 ≤ b
⊢ succ 1 = 2

Next tactic:
norm_cast
theorem cantor' (a) {b : Cardinal} (hb : 1 < b) : a < b ^ a := by
  rw [← succ_le_iff, (by norm_cast : succ (1 : Cardinal) = 2)] at hb
  

Proof state:
α β : Type u
a b : Cardinal.{u_1}
hb : 2 ≤ b
⊢ a < b ^ a

Next tactic:
exact (cantor a).trans_le (power_le_power_right hb)
theorem one_le_iff_pos {c : Cardinal} : 1 ≤ c ↔ 0 < c := by
  

Proof state:
α β : Type u
c : Cardinal.{u_1}
⊢ 1 ≤ c ↔ 0 < c

Next tactic:
rw [← succ_zero, succ_le_iff]
theorem one_le_iff_ne_zero {c : Cardinal} : 1 ≤ c ↔ c ≠ 0 := by
  

Proof state:
α β : Type u
c : Cardinal.{u_1}
⊢ 1 ≤ c ↔ c ≠ 0

Next tactic:
rw [one_le_iff_pos, pos_iff_ne_zero]
theorem nat_lt_aleph0 (n : ℕ) : (n : Cardinal.{u}) < ℵ₀ :=
  succ_le_iff.1
    (by
      

Proof state:
α β : Type u
n : ℕ
⊢ succ ↑n ≤ ℵ₀

Next tactic:
rw [← nat_succ, ← lift_mk_fin, aleph0, lift_mk_le.{u}]
theorem nat_lt_aleph0 (n : ℕ) : (n : Cardinal.{u}) < ℵ₀ :=
  succ_le_iff.1
    (by
      rw [← nat_succ, ← lift_mk_fin, aleph0, lift_mk_le.{u}]
      

Proof state:
α β : Type u
n : ℕ
⊢ Nonempty (Fin (Nat.succ n) ↪ ℕ)

Next tactic:
exact ⟨⟨(↑), fun a b => Fin.ext⟩⟩
@[simp]
theorem one_lt_aleph0 : 1 < ℵ₀ := by 

Proof state:
α β : Type u
⊢ 1 < ℵ₀

Next tactic:
simpa using nat_lt_aleph0 1
theorem lt_aleph0 {c : Cardinal} : c < ℵ₀ ↔ ∃ n : ℕ, c = n :=
  ⟨fun h => by
    

Proof state:
α β : Type u
c : Cardinal.{u_1}
h : c < ℵ₀
⊢ ∃ n, c = ↑n

Next tactic:
rcases lt_lift_iff.1 h with ⟨c, rfl, h'⟩
theorem lt_aleph0 {c : Cardinal} : c < ℵ₀ ↔ ∃ n : ℕ, c = n :=
  ⟨fun h => by
    rcases lt_lift_iff.1 h with ⟨c, rfl, h'⟩
    

Proof state:
case intro.intro
α β : Type u
c : Cardinal.{0}
h' : c < #ℕ
h : lift.{u_1, 0} c < ℵ₀
⊢ ∃ n, lift.{u_1, 0} c = ↑n

Next tactic:
rcases le_mk_iff_exists_set.1 h'.1 with ⟨S, rfl⟩
theorem lt_aleph0 {c : Cardinal} : c < ℵ₀ ↔ ∃ n : ℕ, c = n :=
  ⟨fun h => by
    rcases lt_lift_iff.1 h with ⟨c, rfl, h'⟩
    rcases le_mk_iff_exists_set.1 h'.1 with ⟨S, rfl⟩
    

Proof state:
case intro.intro.intro
α β : Type u
S : Set ℕ
h' : #↑S < #ℕ
h : lift.{u_1, 0} #↑S < ℵ₀
⊢ ∃ n, lift.{u_1, 0} #↑S = ↑n

Next tactic:
suffices S.Finite by
      lift S to Finset ℕ using this
      simp
theorem lt_aleph0 {c : Cardinal} : c < ℵ₀ ↔ ∃ n : ℕ, c = n :=
  ⟨fun h => by
    rcases lt_lift_iff.1 h with ⟨c, rfl, h'⟩
    rcases le_mk_iff_exists_set.1 h'.1 with ⟨S, rfl⟩
    suffices S.Finite by
      

Proof state:
α β : Type u
S : Set ℕ
h' : #↑S < #ℕ
h : lift.{u_1, 0} #↑S < ℵ₀
this : Set.Finite S
⊢ ∃ n, lift.{u_1, 0} #↑S = ↑n

Next tactic:
lift S to Finset ℕ using this
theorem lt_aleph0 {c : Cardinal} : c < ℵ₀ ↔ ∃ n : ℕ, c = n :=
  ⟨fun h => by
    rcases lt_lift_iff.1 h with ⟨c, rfl, h'⟩
    rcases le_mk_iff_exists_set.1 h'.1 with ⟨S, rfl⟩
    suffices S.Finite by
      lift S to Finset ℕ using this
      

Proof state:
case intro
α β : Type u
S : Finset ℕ
h' : #↑↑S < #ℕ
h : lift.{u_1, 0} #↑↑S < ℵ₀
⊢ ∃ n, lift.{u_1, 0} #↑↑S = ↑n

Next tactic:
simp
theorem lt_aleph0 {c : Cardinal} : c < ℵ₀ ↔ ∃ n : ℕ, c = n :=
  ⟨fun h => by
    rcases lt_lift_iff.1 h with ⟨c, rfl, h'⟩
    rcases le_mk_iff_exists_set.1 h'.1 with ⟨S, rfl⟩
    suffices S.Finite by
      lift S to Finset ℕ using this
      simp
    

Proof state:
case intro.intro.intro
α β : Type u
S : Set ℕ
h' : #↑S < #ℕ
h : lift.{u_1, 0} #↑S < ℵ₀
⊢ Set.Finite S

Next tactic:
contrapose! h'
theorem lt_aleph0 {c : Cardinal} : c < ℵ₀ ↔ ∃ n : ℕ, c = n :=
  ⟨fun h => by
    rcases lt_lift_iff.1 h with ⟨c, rfl, h'⟩
    rcases le_mk_iff_exists_set.1 h'.1 with ⟨S, rfl⟩
    suffices S.Finite by
      lift S to Finset ℕ using this
      simp
    contrapose! h'
    

Proof state:
case intro.intro.intro
α β : Type u
S : Set ℕ
h : lift.{u_1, 0} #↑S < ℵ₀
h' : ¬Set.Finite S
⊢ #ℕ ≤ #↑S

Next tactic:
haveI := Infinite.to_subtype h'
theorem lt_aleph0 {c : Cardinal} : c < ℵ₀ ↔ ∃ n : ℕ, c = n :=
  ⟨fun h => by
    rcases lt_lift_iff.1 h with ⟨c, rfl, h'⟩
    rcases le_mk_iff_exists_set.1 h'.1 with ⟨S, rfl⟩
    suffices S.Finite by
      lift S to Finset ℕ using this
      simp
    contrapose! h'
    haveI := Infinite.to_subtype h'
    

Proof state:
case intro.intro.intro
α β : Type u
S : Set ℕ
h : lift.{u_1, 0} #↑S < ℵ₀
h' : ¬Set.Finite S
this : Infinite ↑S
⊢ #ℕ ≤ #↑S

Next tactic:
exact ⟨Infinite.natEmbedding S⟩
theorem aleph0_le {c : Cardinal} : ℵ₀ ≤ c ↔ ∀ n : ℕ, ↑n ≤ c :=
  ⟨fun h n => (nat_lt_aleph0 _).le.trans h, fun h =>
    le_of_not_lt fun hn => by
      

Proof state:
α β : Type u
c : Cardinal.{u_1}
h : ∀ (n : ℕ), ↑n ≤ c
hn : c < ℵ₀
⊢ False

Next tactic:
rcases lt_aleph0.1 hn with ⟨n, rfl⟩
theorem aleph0_le {c : Cardinal} : ℵ₀ ≤ c ↔ ∀ n : ℕ, ↑n ≤ c :=
  ⟨fun h n => (nat_lt_aleph0 _).le.trans h, fun h =>
    le_of_not_lt fun hn => by
      rcases lt_aleph0.1 hn with ⟨n, rfl⟩
      

Proof state:
case intro
α β : Type u
n : ℕ
h : ∀ (n_1 : ℕ), ↑n_1 ≤ ↑n
hn : ↑n < ℵ₀
⊢ False

Next tactic:
exact (Nat.lt_succ_self _).not_le (natCast_le.1 (h (n + 1)))
theorem isSuccLimit_aleph0 : IsSuccLimit ℵ₀ :=
  isSuccLimit_of_succ_lt fun a ha => by
    

Proof state:
α β : Type u
a : Cardinal.{u_1}
ha : a < ℵ₀
⊢ succ a < ℵ₀

Next tactic:
rcases lt_aleph0.1 ha with ⟨n, rfl⟩
theorem isSuccLimit_aleph0 : IsSuccLimit ℵ₀ :=
  isSuccLimit_of_succ_lt fun a ha => by
    rcases lt_aleph0.1 ha with ⟨n, rfl⟩
    

Proof state:
case intro
α β : Type u
n : ℕ
ha : ↑n < ℵ₀
⊢ succ ↑n < ℵ₀

Next tactic:
rw [← nat_succ]
theorem isSuccLimit_aleph0 : IsSuccLimit ℵ₀ :=
  isSuccLimit_of_succ_lt fun a ha => by
    rcases lt_aleph0.1 ha with ⟨n, rfl⟩
    rw [← nat_succ]
    

Proof state:
case intro
α β : Type u
n : ℕ
ha : ↑n < ℵ₀
⊢ ↑(Nat.succ n) < ℵ₀

Next tactic:
apply nat_lt_aleph0
theorem IsLimit.aleph0_le {c : Cardinal} (h : IsLimit c) : ℵ₀ ≤ c := by
  

Proof state:
α β : Type u
c : Cardinal.{u_1}
h : IsLimit c
⊢ ℵ₀ ≤ c

Next tactic:
by_contra! h'
theorem IsLimit.aleph0_le {c : Cardinal} (h : IsLimit c) : ℵ₀ ≤ c := by
  by_contra! h'
  

Proof state:
α β : Type u
c : Cardinal.{u_1}
h : IsLimit c
h' : c < ℵ₀
⊢ False

Next tactic:
rcases lt_aleph0.1 h' with ⟨n, rfl⟩
theorem IsLimit.aleph0_le {c : Cardinal} (h : IsLimit c) : ℵ₀ ≤ c := by
  by_contra! h'
  rcases lt_aleph0.1 h' with ⟨n, rfl⟩
  

Proof state:
case intro
α β : Type u
n : ℕ
h : IsLimit ↑n
h' : ↑n < ℵ₀
⊢ False

Next tactic:
exact not_isLimit_natCast n h
@[simp]
theorem range_natCast : range ((↑) : ℕ → Cardinal) = Iio ℵ₀ :=
  ext fun x => by 

Proof state:
α β : Type u
x : Cardinal.{u_1}
⊢ x ∈ range Nat.cast ↔ x ∈ Iio ℵ₀

Next tactic:
simp only [mem_Iio, mem_range, eq_comm, lt_aleph0]
theorem mk_eq_nat_iff {α : Type u} {n : ℕ} : #α = n ↔ Nonempty (α ≃ Fin n) := by
  

Proof state:
α✝ β α : Type u
n : ℕ
⊢ #α = ↑n ↔ Nonempty (α ≃ Fin n)

Next tactic:
rw [← lift_mk_fin, ← lift_uzero #α, lift_mk_eq']
theorem lt_aleph0_iff_finite {α : Type u} : #α < ℵ₀ ↔ Finite α := by
  

Proof state:
α✝ β α : Type u
⊢ #α < ℵ₀ ↔ Finite α

Next tactic:
simp only [lt_aleph0, mk_eq_nat_iff, finite_iff_exists_equiv_fin]
theorem mk_le_aleph0_iff : #α ≤ ℵ₀ ↔ Countable α := by
  

Proof state:
α β : Type u
⊢ #α ≤ ℵ₀ ↔ Countable α

Next tactic:
rw [countable_iff_nonempty_embedding, aleph0, ← lift_uzero #α, lift_mk_le']
theorem le_aleph0_iff_set_countable {s : Set α} : #s ≤ ℵ₀ ↔ s.Countable := by
  

Proof state:
α β : Type u
s : Set α
⊢ #↑s ≤ ℵ₀ ↔ Set.Countable s

Next tactic:
rw [mk_le_aleph0_iff, countable_coe_iff]
theorem add_lt_aleph0 {a b : Cardinal} (ha : a < ℵ₀) (hb : b < ℵ₀) : a + b < ℵ₀ :=
  match a, b, lt_aleph0.1 ha, lt_aleph0.1 hb with
  | _, _, ⟨m, rfl⟩, ⟨n, rfl⟩ => by 

Proof state:
α β : Type u
a b : Cardinal.{u_1}
m n : ℕ
ha : ↑m < ℵ₀
hb : ↑n < ℵ₀
⊢ ↑m + ↑n < ℵ₀

Next tactic:
rw [← Nat.cast_add]
theorem add_lt_aleph0 {a b : Cardinal} (ha : a < ℵ₀) (hb : b < ℵ₀) : a + b < ℵ₀ :=
  match a, b, lt_aleph0.1 ha, lt_aleph0.1 hb with
  | _, _, ⟨m, rfl⟩, ⟨n, rfl⟩ => by rw [← Nat.cast_add]; 

Proof state:
α β : Type u
a b : Cardinal.{u_1}
m n : ℕ
ha : ↑m < ℵ₀
hb : ↑n < ℵ₀
⊢ ↑(m + n) < ℵ₀

Next tactic:
apply nat_lt_aleph0
theorem aleph0_le_add_iff {a b : Cardinal} : ℵ₀ ≤ a + b ↔ ℵ₀ ≤ a ∨ ℵ₀ ≤ b := by
  

Proof state:
α β : Type u
a b : Cardinal.{u_1}
⊢ ℵ₀ ≤ a + b ↔ ℵ₀ ≤ a ∨ ℵ₀ ≤ b

Next tactic:
simp only [← not_lt, add_lt_aleph0_iff, not_and_or]