l3lab/ntp-mathlib huggingface dataset:
/-- This function sends finite cardinals to the corresponding natural, and infinite cardinals
  to `⊤`. -/
def toPartENat : Cardinal →+ PartENat where
  toFun c := if c < ℵ₀ then toNat c else ⊤
  map_zero' := by simp [if_pos (zero_lt_one.trans one_lt_aleph0)]
  map_add' x y := by
    by_cases hx : x < ℵ₀
    · obtain ⟨x0, rfl⟩ := lt_aleph0.1 hx
      by_cases hy : y < ℵ₀
      · obtain ⟨y0, rfl⟩ := lt_aleph0.1 hy
        simp only [add_lt_aleph0 hx hy, hx, hy, toNat_cast, if_true]
        rw [← Nat.cast_add, toNat_cast, Nat.cast_add]
      · simp_rw [if_neg hy, PartENat.add_top]
        contrapose! hy
        simp only [ne_eq, ite_eq_right_iff, PartENat.natCast_ne_top, not_forall, exists_prop,
          and_true, not_false_eq_true] at hy
        exact le_add_self.trans_lt hy
    · simp_rw [if_neg hx, PartENat.top_add]
      contrapose! hx
      simp only [ne_eq, ite_eq_right_iff, PartENat.natCast_ne_top, not_forall, exists_prop,
        and_true, not_false_eq_true] at hx
      

Proof state:
case neg
α β : Type u
c : Cardinal.{?u.592107}
x y : Cardinal.{?u.604361}
hx : x + y < ℵ₀
⊢ x < ℵ₀

Next tactic:
exact le_self_add.trans_lt hx
@[simp]
theorem toPartENat_cast (n : ℕ) : toPartENat n = n := by
  

Proof state:
α β : Type u
c : Cardinal.{?u.634978}
n : ℕ
⊢ toPartENat ↑n = ↑n

Next tactic:
rw [toPartENat_apply_of_lt_aleph0 (nat_lt_aleph0 n), toNat_cast]
theorem toPartENat_eq_top_iff_le_aleph0 {c : Cardinal} :
    toPartENat c = ⊤ ↔ ℵ₀ ≤ c := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.670275}
c : Cardinal.{u_1}
⊢ toPartENat c = ⊤ ↔ ℵ₀ ≤ c

Next tactic:
cases lt_or_ge c ℵ₀ with
  | inl hc =>
    simp only [toPartENat_apply_of_lt_aleph0 hc, PartENat.natCast_ne_top, false_iff, not_le, hc]
  | inr hc => simp only [toPartENat_apply_of_aleph0_le hc, eq_self_iff_true, true_iff]; exact hc
theorem toPartENat_eq_top_iff_le_aleph0 {c : Cardinal} :
    toPartENat c = ⊤ ↔ ℵ₀ ≤ c := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.670275}
c : Cardinal.{u_1}
x✝ : c < ℵ₀ ∨ c ≥ ℵ₀
⊢ toPartENat c = ⊤ ↔ ℵ₀ ≤ c

Next tactic:
cases lt_or_ge c ℵ₀ with
  | inl hc =>
    simp only [toPartENat_apply_of_lt_aleph0 hc, PartENat.natCast_ne_top, false_iff, not_le, hc]
  | inr hc => simp only [toPartENat_apply_of_aleph0_le hc, eq_self_iff_true, true_iff]; exact hc
theorem toPartENat_eq_top_iff_le_aleph0 {c : Cardinal} :
    toPartENat c = ⊤ ↔ ℵ₀ ≤ c := by
  cases lt_or_ge c ℵ₀ with
  

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.670275}
c : Cardinal.{u_1}
hc : c < ℵ₀
⊢ toPartENat c = ⊤ ↔ ℵ₀ ≤ c

Next tactic:
| inl hc =>
    simp only [toPartENat_apply_of_lt_aleph0 hc, PartENat.natCast_ne_top, false_iff, not_le, hc]
theorem toPartENat_eq_top_iff_le_aleph0 {c : Cardinal} :
    toPartENat c = ⊤ ↔ ℵ₀ ≤ c := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.670275}
c : Cardinal.{u_1}
hc : c < ℵ₀
⊢ toPartENat c = ⊤ ↔ ℵ₀ ≤ c

Next tactic:
simp only [toPartENat_apply_of_lt_aleph0 hc, PartENat.natCast_ne_top, false_iff, not_le, hc]
theorem toPartENat_eq_top_iff_le_aleph0 {c : Cardinal} :
    toPartENat c = ⊤ ↔ ℵ₀ ≤ c := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    simp only [toPartENat_apply_of_lt_aleph0 hc, PartENat.natCast_ne_top, false_iff, not_le, hc]
  

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.670275}
c : Cardinal.{u_1}
hc : c ≥ ℵ₀
⊢ toPartENat c = ⊤ ↔ ℵ₀ ≤ c

Next tactic:
| inr hc => simp only [toPartENat_apply_of_aleph0_le hc, eq_self_iff_true, true_iff]; exact hc
theorem toPartENat_eq_top_iff_le_aleph0 {c : Cardinal} :
    toPartENat c = ⊤ ↔ ℵ₀ ≤ c := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    simp only [toPartENat_apply_of_lt_aleph0 hc, PartENat.natCast_ne_top, false_iff, not_le, hc]
  | inr hc => 

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.670275}
c : Cardinal.{u_1}
hc : c ≥ ℵ₀
⊢ toPartENat c = ⊤ ↔ ℵ₀ ≤ c

Next tactic:
simp only [toPartENat_apply_of_aleph0_le hc, eq_self_iff_true, true_iff]
theorem toPartENat_eq_top_iff_le_aleph0 {c : Cardinal} :
    toPartENat c = ⊤ ↔ ℵ₀ ≤ c := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    simp only [toPartENat_apply_of_lt_aleph0 hc, PartENat.natCast_ne_top, false_iff, not_le, hc]
  | inr hc => simp only [toPartENat_apply_of_aleph0_le hc, eq_self_iff_true, true_iff]; 

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.670275}
c : Cardinal.{u_1}
hc : c ≥ ℵ₀
⊢ ℵ₀ ≤ c

Next tactic:
exact hc
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
  | inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0,
    le_antisymm h hc]
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
x✝ : c < ℵ₀ ∨ c ≥ ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
  | inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0,
    le_antisymm h hc]
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
| inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
rw [toPartENat_apply_of_lt_aleph0 hc]
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
x✝ : c' < ℵ₀ ∨ c' ≥ ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    

Proof state:
case inl.inl
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
hc' : c' < ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
| inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      

Proof state:
case inl.inl
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
hc' : c' < ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      

Proof state:
case inl.inl
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
hc' : c' < ℵ₀
⊢ toNat c ≤ toNat c' ↔ c ≤ c'

Next tactic:
exact toNat_le_iff_le_of_lt_aleph0 hc hc'
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    

Proof state:
case inl.inr
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
hc' : c' ≥ ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
| inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      

Proof state:
case inl.inr
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
hc' : c' ≥ ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      

Proof state:
case inl.inr
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c < ℵ₀
hc' : c' ≥ ℵ₀
⊢ c ≤ c'

Next tactic:
exact le_trans h hc'
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
  

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c ≥ ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
| inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0,
    le_antisymm h hc]
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
  | inr hc =>
    

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c ≥ ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
rw [toPartENat_apply_of_aleph0_le hc]
lemma toPartENat_le_iff_of_le_aleph0 {c c' : Cardinal} (h : c ≤ ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_iff_le_of_lt_aleph0 hc hc'
    | inr hc' =>
      simp only [toPartENat_apply_of_aleph0_le hc',
      le_top, true_iff]
      exact le_trans h hc'
  | inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.679355}
c c' : Cardinal.{u_1}
h : c ≤ ℵ₀
hc : c ≥ ℵ₀
⊢ ⊤ ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0,
    le_antisymm h hc]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    exact toNat_le_iff_le_of_lt_aleph0 hc hc'
  | inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0]
    rw [← not_iff_not, not_le, not_le]
    simp only [hc', lt_of_lt_of_le hc' hc]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
x✝ : c < ℵ₀ ∨ c ≥ ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    exact toNat_le_iff_le_of_lt_aleph0 hc hc'
  | inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0]
    rw [← not_iff_not, not_le, not_le]
    simp only [hc', lt_of_lt_of_le hc' hc]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c < ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
| inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    exact toNat_le_iff_le_of_lt_aleph0 hc hc'
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c < ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
rw [toPartENat_apply_of_lt_aleph0 hc]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c < ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c < ℵ₀
⊢ toNat c ≤ toNat c' ↔ c ≤ c'

Next tactic:
exact toNat_le_iff_le_of_lt_aleph0 hc hc'
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    exact toNat_le_iff_le_of_lt_aleph0 hc hc'
  

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c ≥ ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
| inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0]
    rw [← not_iff_not, not_le, not_le]
    simp only [hc', lt_of_lt_of_le hc' hc]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    exact toNat_le_iff_le_of_lt_aleph0 hc hc'
  | inr hc =>
    

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c ≥ ℵ₀
⊢ toPartENat c ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
rw [toPartENat_apply_of_aleph0_le hc]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    exact toNat_le_iff_le_of_lt_aleph0 hc hc'
  | inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c ≥ ℵ₀
⊢ ⊤ ≤ toPartENat c' ↔ c ≤ c'

Next tactic:
simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    exact toNat_le_iff_le_of_lt_aleph0 hc hc'
  | inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0]
    

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c ≥ ℵ₀
⊢ ℵ₀ ≤ c' ↔ c ≤ c'

Next tactic:
rw [← not_iff_not, not_le, not_le]
lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
    exact toNat_le_iff_le_of_lt_aleph0 hc hc'
  | inr hc =>
    rw [toPartENat_apply_of_aleph0_le hc]
    simp only [top_le_iff, toPartENat_eq_top_iff_le_aleph0]
    rw [← not_iff_not, not_le, not_le]
    

Proof state:
case inr
α β : Type u
c✝ : Cardinal.{?u.697313}
c c' : Cardinal.{u_1}
hc' : c' < ℵ₀
hc : c ≥ ℵ₀
⊢ c' < ℵ₀ ↔ c' < c

Next tactic:
simp only [hc', lt_of_lt_of_le hc' hc]
lemma toPartENat_eq_iff_of_le_aleph0 {c c' : Cardinal} (hc : c ≤ ℵ₀) (hc' : c' ≤ ℵ₀) :
    toPartENat c = toPartENat c' ↔ c = c' := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.715134}
c c' : Cardinal.{u_1}
hc : c ≤ ℵ₀
hc' : c' ≤ ℵ₀
⊢ toPartENat c = toPartENat c' ↔ c = c'

Next tactic:
rw [le_antisymm_iff, le_antisymm_iff, toPartENat_le_iff_of_le_aleph0 hc,
    toPartENat_le_iff_of_le_aleph0 hc']
theorem toPartENat_mono {c c' : Cardinal} (h : c ≤ c') :
    toPartENat c ≤ toPartENat c' := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.732655}
c c' : Cardinal.{u_1}
h : c ≤ c'
⊢ toPartENat c ≤ toPartENat c'

Next tactic:
cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_of_le_of_lt_aleph0 hc' h
    | inr hc' =>
        rw [toPartENat_apply_of_aleph0_le hc']
        exact le_top
  | inr hc =>
      rw [toPartENat_apply_of_aleph0_le hc,
      toPartENat_apply_of_aleph0_le (le_trans hc h)]
theorem toPartENat_mono {c c' : Cardinal} (h : c ≤ c') :
    toPartENat c ≤ toPartENat c' := by
  

Proof state:
α β : Type u
c✝ : Cardinal.{?u.732655}
c c' : Cardinal.{u_1}
h : c ≤ c'
x✝ : c < ℵ₀ ∨ c ≥ ℵ₀
⊢ toPartENat c ≤ toPartENat c'

Next tactic:
cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_of_le_of_lt_aleph0 hc' h
    | inr hc' =>
        rw [toPartENat_apply_of_aleph0_le hc']
        exact le_top
  | inr hc =>
      rw [toPartENat_apply_of_aleph0_le hc,
      toPartENat_apply_of_aleph0_le (le_trans hc h)]
theorem toPartENat_mono {c c' : Cardinal} (h : c ≤ c') :
    toPartENat c ≤ toPartENat c' := by
  cases lt_or_ge c ℵ₀ with
  

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.732655}
c c' : Cardinal.{u_1}
h : c ≤ c'
hc : c < ℵ₀
⊢ toPartENat c ≤ toPartENat c'

Next tactic:
| inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_of_le_of_lt_aleph0 hc' h
    | inr hc' =>
        rw [toPartENat_apply_of_aleph0_le hc']
        exact le_top
theorem toPartENat_mono {c c' : Cardinal} (h : c ≤ c') :
    toPartENat c ≤ toPartENat c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.732655}
c c' : Cardinal.{u_1}
h : c ≤ c'
hc : c < ℵ₀
⊢ toPartENat c ≤ toPartENat c'

Next tactic:
rw [toPartENat_apply_of_lt_aleph0 hc]
theorem toPartENat_mono {c c' : Cardinal} (h : c ≤ c') :
    toPartENat c ≤ toPartENat c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.732655}
c c' : Cardinal.{u_1}
h : c ≤ c'
hc : c < ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c'

Next tactic:
cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_of_le_of_lt_aleph0 hc' h
    | inr hc' =>
        rw [toPartENat_apply_of_aleph0_le hc']
        exact le_top
theorem toPartENat_mono {c c' : Cardinal} (h : c ≤ c') :
    toPartENat c ≤ toPartENat c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    

Proof state:
case inl
α β : Type u
c✝ : Cardinal.{?u.732655}
c c' : Cardinal.{u_1}
h : c ≤ c'
hc : c < ℵ₀
x✝ : c' < ℵ₀ ∨ c' ≥ ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c'

Next tactic:
cases lt_or_ge c' ℵ₀ with
    | inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_of_le_of_lt_aleph0 hc' h
    | inr hc' =>
        rw [toPartENat_apply_of_aleph0_le hc']
        exact le_top
theorem toPartENat_mono {c c' : Cardinal} (h : c ≤ c') :
    toPartENat c ≤ toPartENat c' := by
  cases lt_or_ge c ℵ₀ with
  | inl hc =>
    rw [toPartENat_apply_of_lt_aleph0 hc]
    cases lt_or_ge c' ℵ₀ with
    

Proof state:
case inl.inl
α β : Type u
c✝ : Cardinal.{?u.732655}
c c' : Cardinal.{u_1}
h : c ≤ c'
hc : c < ℵ₀
hc' : c' < ℵ₀
⊢ ↑(toNat c) ≤ toPartENat c'

Next tactic:
| inl hc' =>
      rw [toPartENat_apply_of_lt_aleph0 hc', PartENat.coe_le_coe]
      exact toNat_le_of_le_of_lt_aleph0 hc' h