-- Mathlib/SetTheory/Game/Birthday.lean
theorem small_setOf_birthday_lt (o : Ordinal) : Small.{u} {x : Game.{u} // birthday x < o}

Proof state:
y : PGame
IH : ∀ k < Order.succ (birthday ⟦y⟧), Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a ∈ Set.Iio (Order.succ (birthday ⟦y⟧)), {x | x.birthday < a}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio (Order.succ (birthday ⟦y⟧))) fun a h => {x | x.birthday < a}
f : Set ↑S × Set ↑S → Game :=
  fun g =>
    ⟦PGame.mk (Shrink.{u, u + 1} ↑g.1) (Shrink.{u, u + 1} ↑g.2) (fun x => Quotient.out ↑↑((equivShrink ↑g.1).symm x))
        fun x => Quotient.out ↑↑((equivShrink ↑g.2).symm x)⟧
hy' : y.birthday = birthday ⟦y⟧
i :
  (PGame.mk (Shrink.{u, u + 1} ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).1)
      (Shrink.{u, u + 1} ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).2)
      (fun x =>
        Quotient.out ↑↑((equivShrink ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).1).symm x))
      fun x =>
      Quotient.out
        ↑↑((equivShrink ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).2).symm x)).RightMoves
j : y.RightMoves
hj : ⟦y.moveRight j⟧ = ↑↑((equivShrink ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).2).symm i)
⊢ (PGame.mk (Shrink.{u, u + 1} ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).1)
          (Shrink.{u, u + 1} ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).2)
          (fun x =>
            Quotient.out ↑↑((equivShrink ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).1).symm x))
          fun x =>
          Quotient.out
            ↑↑((equivShrink ↑({z | ∃ i, ⟦y.moveLeft i⟧ = ↑z}, {z | ∃ i, ⟦y.moveRight i⟧ = ↑z}).2).symm x)).moveRight
      i ≈
    y.moveRight j

Tactic:
simp [PGame.equiv_iff_game_eq, hj]

Result:
no goals

Proof state:
case h.inr.inl.intro.convert_2
a : Ordinal.{u}
IH : ∀ k < Order.succ a, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a_1 ∈ Set.Iio (Order.succ a), {x | x.birthday < a_1}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio (Order.succ a)) fun a_1 h => {x | x.birthday < a_1}
⊢ Small.{u, u + 1} ↑{x | x.birthday = a}

Tactic:
let f (g : Set S × Set S) : Game := ⟦PGame.mk _ _
  (fun x ↦ ((equivShrink g.1).symm x).1.1.out) (fun x ↦ ((equivShrink g.2).symm x).1.1.out)⟧

Result:
case h.inr.inl.intro.convert_2
a : Ordinal.{u}
IH : ∀ k < Order.succ a, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a_1 ∈ Set.Iio (Order.succ a), {x | x.birthday < a_1}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio (Order.succ a)) fun a_1 h => {x | x.birthday < a_1}
f : Set ↑S × Set ↑S → Game :=
  fun g =>
    ⟦PGame.mk (Shrink.{u, u + 1} ↑g.1) (Shrink.{u, u + 1} ↑g.2) (fun x => Quotient.out ↑↑((equivShrink ↑g.1).symm x))
        fun x => Quotient.out ↑↑((equivShrink ↑g.2).symm x)⟧
⊢ Small.{u, u + 1} ↑{x | x.birthday = a}

Proof state:
case h.inl
IH : ∀ k < 0, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a ∈ Set.Iio 0, {x | x.birthday < a}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio 0) fun a h => {x | x.birthday < a}
⊢ Small.{u, u + 1} { x // False }

Tactic:
exact small_empty

Result:
no goals

Proof state:
case h.inr.inl.intro.convert_1
a : Ordinal.{u}
IH : ∀ k < Order.succ a, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a_1 ∈ Set.Iio (Order.succ a), {x | x.birthday < a_1}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio (Order.succ a)) fun a_1 h => {x | x.birthday < a_1}
⊢ Small.{u, u + 1} ↑{x | x.birthday < a}

Tactic:
exact IH _ (Order.lt_succ a)

Result:
no goals

Proof state:
case h.inl
IH : ∀ k < 0, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a ∈ Set.Iio 0, {x | x.birthday < a}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio 0) fun a h => {x | x.birthday < a}
⊢ Small.{u, u + 1} { x // x.birthday < 0 }

Tactic:
simp_rw [Ordinal.not_lt_zero]

Result:
case h.inl
IH : ∀ k < 0, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a ∈ Set.Iio 0, {x | x.birthday < a}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio 0) fun a h => {x | x.birthday < a}
⊢ Small.{u, u + 1} { x // False }

Proof state:
y : PGame
IH : ∀ k < Order.succ (birthday ⟦y⟧), Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a ∈ Set.Iio (Order.succ (birthday ⟦y⟧)), {x | x.birthday < a}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio (Order.succ (birthday ⟦y⟧))) fun a h => {x | x.birthday < a}
f : Set ↑S × Set ↑S → Game :=
  fun g =>
    ⟦PGame.mk (Shrink.{u, u + 1} ↑g.1) (Shrink.{u, u + 1} ↑g.2) (fun x => Quotient.out ↑↑((equivShrink ↑g.1).symm x))
        fun x => Quotient.out ↑↑((equivShrink ↑g.2).symm x)⟧
hy' : y.birthday = birthday ⟦y⟧
i : y.RightMoves
⊢ birthday ⟦y.moveRight i⟧ < y.birthday

Tactic:
exact (birthday_quot_le_pGameBirthday _).trans_lt (PGame.birthday_moveRight_lt i)

Result:
no goals

Proof state:
case h.inr.inl.intro.convert_2
a : Ordinal.{u}
IH : ∀ k < Order.succ a, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a_1 ∈ Set.Iio (Order.succ a), {x | x.birthday < a_1}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio (Order.succ a)) fun a_1 h => {x | x.birthday < a_1}
f : Set ↑S × Set ↑S → Game :=
  fun g =>
    ⟦PGame.mk (Shrink.{u, u + 1} ↑g.1) (Shrink.{u, u + 1} ↑g.2) (fun x => Quotient.out ↑↑((equivShrink ↑g.1).symm x))
        fun x => Quotient.out ↑↑((equivShrink ↑g.2).symm x)⟧
⊢ Small.{u, u + 1} ↑{x | x.birthday = a}

Tactic:
suffices {x | x.birthday = a} ⊆ Set.range f from small_subset this

Result:
case h.inr.inl.intro.convert_2
a : Ordinal.{u}
IH : ∀ k < Order.succ a, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a_1 ∈ Set.Iio (Order.succ a), {x | x.birthday < a_1}
H : Small.{u, u + 1} ↑S := small_biUnion (Set.Iio (Order.succ a)) fun a_1 h => {x | x.birthday < a_1}
f : Set ↑S × Set ↑S → Game :=
  fun g =>
    ⟦PGame.mk (Shrink.{u, u + 1} ↑g.1) (Shrink.{u, u + 1} ↑g.2) (fun x => Quotient.out ↑↑((equivShrink ↑g.1).symm x))
        fun x => Quotient.out ↑↑((equivShrink ↑g.2).symm x)⟧
⊢ {x | x.birthday = a} ⊆ Set.range f

Proof state:
case h
o : Ordinal.{u}
IH : ∀ k < o, Small.{u, u + 1} { x // x.birthday < k }
⊢ Small.{u, u + 1} { x // x.birthday < o }

Tactic:
let S := ⋃ a ∈ Set.Iio o, {x : Game.{u} | birthday x < a}

Result:
case h
o : Ordinal.{u}
IH : ∀ k < o, Small.{u, u + 1} { x // x.birthday < k }
S : Set Game := ⋃ a ∈ Set.Iio o, {x | x.birthday < a}
⊢ Small.{u, u + 1} { x // x.birthday < o }