l3lab/ntp-mathlib huggingface dataset:
theorem le_iff_derivFamily (H : ∀ i, IsNormal (f i)) {a} :
    (∀ i, f i a ≤ a) ↔ ∃ o, derivFamily.{u, v} f o = a :=
  ⟨fun ha => by
    suffices : ∀ (o) (_ : a ≤ derivFamily.{u, v} f o), ∃ o, derivFamily.{u, v} f o = a
    exact this a ((derivFamily_isNormal _).self_le _)
    intro o
    induction' o using limitRecOn with o IH o l IH
    · intro h₁
      refine' ⟨0, le_antisymm _ h₁⟩
      rw [derivFamily_zero]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (Ordinal.zero_le _) ha
    · intro h₁
      rcases le_or_lt a (derivFamily.{u, v} f o) with h | h
      · exact IH h
      refine' ⟨succ o, le_antisymm _ h₁⟩
      rw [derivFamily_succ]
      

Proof state:
case this.H₂.inr
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
ha : ∀ (i : ι), f i a ≤ a
o : Ordinal.{max u v}
IH : a ≤ derivFamily f o → ∃ o, derivFamily f o = a
h₁ : a ≤ derivFamily f (succ o)
h : derivFamily f o < a
⊢ nfpFamily f (succ (derivFamily f o)) ≤ a

Next tactic:
exact nfpFamily_le_fp (fun i => (H i).monotone) (succ_le_of_lt h) ha
theorem le_iff_derivFamily (H : ∀ i, IsNormal (f i)) {a} :
    (∀ i, f i a ≤ a) ↔ ∃ o, derivFamily.{u, v} f o = a :=
  ⟨fun ha => by
    suffices : ∀ (o) (_ : a ≤ derivFamily.{u, v} f o), ∃ o, derivFamily.{u, v} f o = a
    exact this a ((derivFamily_isNormal _).self_le _)
    intro o
    induction' o using limitRecOn with o IH o l IH
    · intro h₁
      refine' ⟨0, le_antisymm _ h₁⟩
      rw [derivFamily_zero]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (Ordinal.zero_le _) ha
    · intro h₁
      rcases le_or_lt a (derivFamily.{u, v} f o) with h | h
      · exact IH h
      refine' ⟨succ o, le_antisymm _ h₁⟩
      rw [derivFamily_succ]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (succ_le_of_lt h) ha
    · 

Proof state:
case this.H₃
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
ha : ∀ (i : ι), f i a ≤ a
o : Ordinal.{max u v}
l : IsLimit o
IH : ∀ o' < o, a ≤ derivFamily f o' → ∃ o, derivFamily f o = a
⊢ a ≤ derivFamily f o → ∃ o, derivFamily f o = a

Next tactic:
intro h₁
theorem le_iff_derivFamily (H : ∀ i, IsNormal (f i)) {a} :
    (∀ i, f i a ≤ a) ↔ ∃ o, derivFamily.{u, v} f o = a :=
  ⟨fun ha => by
    suffices : ∀ (o) (_ : a ≤ derivFamily.{u, v} f o), ∃ o, derivFamily.{u, v} f o = a
    exact this a ((derivFamily_isNormal _).self_le _)
    intro o
    induction' o using limitRecOn with o IH o l IH
    · intro h₁
      refine' ⟨0, le_antisymm _ h₁⟩
      rw [derivFamily_zero]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (Ordinal.zero_le _) ha
    · intro h₁
      rcases le_or_lt a (derivFamily.{u, v} f o) with h | h
      · exact IH h
      refine' ⟨succ o, le_antisymm _ h₁⟩
      rw [derivFamily_succ]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (succ_le_of_lt h) ha
    · intro h₁
      

Proof state:
case this.H₃
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
ha : ∀ (i : ι), f i a ≤ a
o : Ordinal.{max u v}
l : IsLimit o
IH : ∀ o' < o, a ≤ derivFamily f o' → ∃ o, derivFamily f o = a
h₁ : a ≤ derivFamily f o
⊢ ∃ o, derivFamily f o = a

Next tactic:
cases' eq_or_lt_of_le h₁ with h h
theorem le_iff_derivFamily (H : ∀ i, IsNormal (f i)) {a} :
    (∀ i, f i a ≤ a) ↔ ∃ o, derivFamily.{u, v} f o = a :=
  ⟨fun ha => by
    suffices : ∀ (o) (_ : a ≤ derivFamily.{u, v} f o), ∃ o, derivFamily.{u, v} f o = a
    exact this a ((derivFamily_isNormal _).self_le _)
    intro o
    induction' o using limitRecOn with o IH o l IH
    · intro h₁
      refine' ⟨0, le_antisymm _ h₁⟩
      rw [derivFamily_zero]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (Ordinal.zero_le _) ha
    · intro h₁
      rcases le_or_lt a (derivFamily.{u, v} f o) with h | h
      · exact IH h
      refine' ⟨succ o, le_antisymm _ h₁⟩
      rw [derivFamily_succ]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (succ_le_of_lt h) ha
    · intro h₁
      cases' eq_or_lt_of_le h₁ with h h
      · 

Proof state:
case this.H₃.inl
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
ha : ∀ (i : ι), f i a ≤ a
o : Ordinal.{max u v}
l : IsLimit o
IH : ∀ o' < o, a ≤ derivFamily f o' → ∃ o, derivFamily f o = a
h₁ : a ≤ derivFamily f o
h : a = derivFamily f o
⊢ ∃ o, derivFamily f o = a

Next tactic:
exact ⟨_, h.symm⟩
theorem le_iff_derivFamily (H : ∀ i, IsNormal (f i)) {a} :
    (∀ i, f i a ≤ a) ↔ ∃ o, derivFamily.{u, v} f o = a :=
  ⟨fun ha => by
    suffices : ∀ (o) (_ : a ≤ derivFamily.{u, v} f o), ∃ o, derivFamily.{u, v} f o = a
    exact this a ((derivFamily_isNormal _).self_le _)
    intro o
    induction' o using limitRecOn with o IH o l IH
    · intro h₁
      refine' ⟨0, le_antisymm _ h₁⟩
      rw [derivFamily_zero]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (Ordinal.zero_le _) ha
    · intro h₁
      rcases le_or_lt a (derivFamily.{u, v} f o) with h | h
      · exact IH h
      refine' ⟨succ o, le_antisymm _ h₁⟩
      rw [derivFamily_succ]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (succ_le_of_lt h) ha
    · intro h₁
      cases' eq_or_lt_of_le h₁ with h h
      · exact ⟨_, h.symm⟩
      

Proof state:
case this.H₃.inr
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
ha : ∀ (i : ι), f i a ≤ a
o : Ordinal.{max u v}
l : IsLimit o
IH : ∀ o' < o, a ≤ derivFamily f o' → ∃ o, derivFamily f o = a
h₁ : a ≤ derivFamily f o
h : a < derivFamily f o
⊢ ∃ o, derivFamily f o = a

Next tactic:
rw [derivFamily_limit _ l, ← not_le, bsup_le_iff, not_ball] at h
theorem le_iff_derivFamily (H : ∀ i, IsNormal (f i)) {a} :
    (∀ i, f i a ≤ a) ↔ ∃ o, derivFamily.{u, v} f o = a :=
  ⟨fun ha => by
    suffices : ∀ (o) (_ : a ≤ derivFamily.{u, v} f o), ∃ o, derivFamily.{u, v} f o = a
    exact this a ((derivFamily_isNormal _).self_le _)
    intro o
    induction' o using limitRecOn with o IH o l IH
    · intro h₁
      refine' ⟨0, le_antisymm _ h₁⟩
      rw [derivFamily_zero]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (Ordinal.zero_le _) ha
    · intro h₁
      rcases le_or_lt a (derivFamily.{u, v} f o) with h | h
      · exact IH h
      refine' ⟨succ o, le_antisymm _ h₁⟩
      rw [derivFamily_succ]
      exact nfpFamily_le_fp (fun i => (H i).monotone) (succ_le_of_lt h) ha
    · intro h₁
      cases' eq_or_lt_of_le h₁ with h h
      · exact ⟨_, h.symm⟩
      rw [derivFamily_limit _ l, ← not_le, bsup_le_iff, not_ball] at h
      

Proof state:
case this.H₃.inr
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
ha : ∀ (i : ι), f i a ≤ a
o : Ordinal.{max u v}
l : IsLimit o
IH : ∀ o' < o, a ≤ derivFamily f o' → ∃ o, derivFamily f o = a
h₁ : a ≤ derivFamily f o
h : ∃ x, ∃ (_ : x < o), ¬derivFamily f x ≤ a
⊢ ∃ o, derivFamily f o = a

Next tactic:
exact
        let ⟨o', h, hl⟩ := h
        IH o' h (le_of_not_le hl)
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  

Proof state:
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
⊢ derivFamily f = enumOrd (⋂ i, fixedPoints (f i))

Next tactic:
rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
  

Proof state:
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
⊢ StrictMono (derivFamily f) ∧ Set.range (derivFamily f) = ⋂ i, fixedPoints (f i)

Next tactic:
use (derivFamily_isNormal f).strictMono
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
  use (derivFamily_isNormal f).strictMono
  

Proof state:
case right
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
⊢ Set.range (derivFamily f) = ⋂ i, fixedPoints (f i)

Next tactic:
rw [Set.range_eq_iff]
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
  use (derivFamily_isNormal f).strictMono
  rw [Set.range_eq_iff]
  

Proof state:
case right
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
⊢ (∀ (a : Ordinal.{max u v}), derivFamily f a ∈ ⋂ i, fixedPoints (f i)) ∧
    ∀ b ∈ ⋂ i, fixedPoints (f i), ∃ a, derivFamily f a = b

Next tactic:
refine' ⟨_, fun a ha => _⟩
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
  use (derivFamily_isNormal f).strictMono
  rw [Set.range_eq_iff]
  refine' ⟨_, fun a ha => _⟩
  · 

Proof state:
case right.refine'_1
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
⊢ ∀ (a : Ordinal.{max u v}), derivFamily f a ∈ ⋂ i, fixedPoints (f i)

Next tactic:
rintro a S ⟨i, hi⟩
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
  use (derivFamily_isNormal f).strictMono
  rw [Set.range_eq_iff]
  refine' ⟨_, fun a ha => _⟩
  · rintro a S ⟨i, hi⟩
    

Proof state:
case right.refine'_1.intro
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
S : Set Ordinal.{max u v}
i : ι
hi : (fun i => fixedPoints (f i)) i = S
⊢ derivFamily f a ∈ S

Next tactic:
rw [← hi]
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
  use (derivFamily_isNormal f).strictMono
  rw [Set.range_eq_iff]
  refine' ⟨_, fun a ha => _⟩
  · rintro a S ⟨i, hi⟩
    rw [← hi]
    

Proof state:
case right.refine'_1.intro
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
S : Set Ordinal.{max u v}
i : ι
hi : (fun i => fixedPoints (f i)) i = S
⊢ derivFamily f a ∈ (fun i => fixedPoints (f i)) i

Next tactic:
exact derivFamily_fp (H i) a
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
  use (derivFamily_isNormal f).strictMono
  rw [Set.range_eq_iff]
  refine' ⟨_, fun a ha => _⟩
  · rintro a S ⟨i, hi⟩
    rw [← hi]
    exact derivFamily_fp (H i) a
  

Proof state:
case right.refine'_2
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
ha : a ∈ ⋂ i, fixedPoints (f i)
⊢ ∃ a_1, derivFamily f a_1 = a

Next tactic:
rw [Set.mem_iInter] at ha
/-- For a family of normal functions, `Ordinal.derivFamily` enumerates the common fixed points. -/
theorem derivFamily_eq_enumOrd (H : ∀ i, IsNormal (f i)) :
    derivFamily.{u, v} f = enumOrd (⋂ i, Function.fixedPoints (f i)) := by
  rw [← eq_enumOrd _ (fp_family_unbounded.{u, v} H)]
  use (derivFamily_isNormal f).strictMono
  rw [Set.range_eq_iff]
  refine' ⟨_, fun a ha => _⟩
  · rintro a S ⟨i, hi⟩
    rw [← hi]
    exact derivFamily_fp (H i) a
  rw [Set.mem_iInter] at ha
  

Proof state:
case right.refine'_2
ι : Type u
f : ι → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : ι), IsNormal (f i)
a : Ordinal.{max u v}
ha : ∀ (i : ι), a ∈ fixedPoints (f i)
⊢ ∃ a_1, derivFamily f a_1 = a

Next tactic:
rwa [← fp_iff_derivFamily H]
theorem apply_lt_nfpBFamily (H : ∀ i hi, IsNormal (f i hi)) {a b} (hb : b < nfpBFamily.{u, v} o f a)
    (i hi) : f i hi b < nfpBFamily.{u, v} o f a := by
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a b : Ordinal.{max v u}
hb : b < nfpBFamily o f a
i : Ordinal.{u}
hi : i < o
⊢ f i hi b < nfpBFamily o f a

Next tactic:
rw [← familyOfBFamily_enum o f]
theorem apply_lt_nfpBFamily (H : ∀ i hi, IsNormal (f i hi)) {a b} (hb : b < nfpBFamily.{u, v} o f a)
    (i hi) : f i hi b < nfpBFamily.{u, v} o f a := by
  rw [← familyOfBFamily_enum o f]
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a b : Ordinal.{max v u}
hb : b < nfpBFamily o f a
i : Ordinal.{u}
hi : i < o
⊢ familyOfBFamily o f (enum (fun x x_1 => x < x_1) i (_ : i < type fun x x_1 => x < x_1)) b < nfpBFamily o f a

Next tactic:
apply apply_lt_nfpFamily (fun _ => H _ _) hb
theorem apply_lt_nfpBFamily_iff (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b < nfpBFamily.{u, v} o f a) ↔ b < nfpBFamily.{u, v} o f a :=
  ⟨fun h => by
    

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < nfpBFamily o f a
⊢ b < nfpBFamily o f a

Next tactic:
haveI := out_nonempty_iff_ne_zero.2 ho
theorem apply_lt_nfpBFamily_iff (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b < nfpBFamily.{u, v} o f a) ↔ b < nfpBFamily.{u, v} o f a :=
  ⟨fun h => by
    haveI := out_nonempty_iff_ne_zero.2 ho
    

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < nfpBFamily o f a
this : Nonempty (Quotient.out o).α
⊢ b < nfpBFamily o f a

Next tactic:
refine' (apply_lt_nfpFamily_iff.{u, v} _).1 fun _ => h _ _
theorem apply_lt_nfpBFamily_iff (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b < nfpBFamily.{u, v} o f a) ↔ b < nfpBFamily.{u, v} o f a :=
  ⟨fun h => by
    haveI := out_nonempty_iff_ne_zero.2 ho
    refine' (apply_lt_nfpFamily_iff.{u, v} _).1 fun _ => h _ _
    

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < nfpBFamily o f a
this : Nonempty (Quotient.out o).α
⊢ ∀ (i : (Quotient.out o).α), IsNormal (familyOfBFamily o f i)

Next tactic:
exact fun _ => H _ _
theorem nfpBFamily_le_apply (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∃ i hi, nfpBFamily.{u, v} o f a ≤ f i hi b) ↔ nfpBFamily.{u, v} o f a ≤ b := by
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
⊢ (∃ i, ∃ (hi : i < o), nfpBFamily o f a ≤ f i hi b) ↔ nfpBFamily o f a ≤ b

Next tactic:
rw [← not_iff_not]
theorem nfpBFamily_le_apply (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∃ i hi, nfpBFamily.{u, v} o f a ≤ f i hi b) ↔ nfpBFamily.{u, v} o f a ≤ b := by
  rw [← not_iff_not]
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
⊢ (¬∃ i, ∃ (hi : i < o), nfpBFamily o f a ≤ f i hi b) ↔ ¬nfpBFamily o f a ≤ b

Next tactic:
push_neg
theorem nfpBFamily_le_apply (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∃ i hi, nfpBFamily.{u, v} o f a ≤ f i hi b) ↔ nfpBFamily.{u, v} o f a ≤ b := by
  rw [← not_iff_not]
  push_neg
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
⊢ (∀ (i : Ordinal.{u}) (hi : i < o), f i hi b < nfpBFamily o f a) ↔ b < nfpBFamily o f a

Next tactic:
exact apply_lt_nfpBFamily_iff.{u, v} ho H
theorem nfpBFamily_fp {i hi} (H : IsNormal (f i hi)) (a) :
    f i hi (nfpBFamily.{u, v} o f a) = nfpBFamily.{u, v} o f a := by
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ f i hi (nfpBFamily o f a) = nfpBFamily o f a

Next tactic:
rw [← familyOfBFamily_enum o f]
theorem nfpBFamily_fp {i hi} (H : IsNormal (f i hi)) (a) :
    f i hi (nfpBFamily.{u, v} o f a) = nfpBFamily.{u, v} o f a := by
  rw [← familyOfBFamily_enum o f]
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ familyOfBFamily o f (enum (fun x x_1 => x < x_1) i (_ : i < type fun x x_1 => x < x_1)) (nfpBFamily o f a) =
    nfpBFamily o f a

Next tactic:
apply nfpFamily_fp
theorem nfpBFamily_fp {i hi} (H : IsNormal (f i hi)) (a) :
    f i hi (nfpBFamily.{u, v} o f a) = nfpBFamily.{u, v} o f a := by
  rw [← familyOfBFamily_enum o f]
  apply nfpFamily_fp
  

Proof state:
case H
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ IsNormal (familyOfBFamily o f (enum (fun x x_1 => x < x_1) i (_ : i < type fun x x_1 => x < x_1)))

Next tactic:
rw [familyOfBFamily_enum]
theorem nfpBFamily_fp {i hi} (H : IsNormal (f i hi)) (a) :
    f i hi (nfpBFamily.{u, v} o f a) = nfpBFamily.{u, v} o f a := by
  rw [← familyOfBFamily_enum o f]
  apply nfpFamily_fp
  rw [familyOfBFamily_enum]
  

Proof state:
case H
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ IsNormal (f i ?H.hi)
case H.hi
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max v u}
⊢ i < o

Next tactic:
exact H
theorem apply_le_nfpBFamily (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b ≤ nfpBFamily.{u, v} o f a) ↔ b ≤ nfpBFamily.{u, v} o f a := by
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
⊢ (∀ (i : Ordinal.{u}) (hi : i < o), f i hi b ≤ nfpBFamily o f a) ↔ b ≤ nfpBFamily o f a

Next tactic:
refine' ⟨fun h => _, fun h i hi => _⟩
theorem apply_le_nfpBFamily (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b ≤ nfpBFamily.{u, v} o f a) ↔ b ≤ nfpBFamily.{u, v} o f a := by
  refine' ⟨fun h => _, fun h i hi => _⟩
  · 

Proof state:
case refine'_1
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b ≤ nfpBFamily o f a
⊢ b ≤ nfpBFamily o f a

Next tactic:
have ho' : 0 < o := Ordinal.pos_iff_ne_zero.2 ho
theorem apply_le_nfpBFamily (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b ≤ nfpBFamily.{u, v} o f a) ↔ b ≤ nfpBFamily.{u, v} o f a := by
  refine' ⟨fun h => _, fun h i hi => _⟩
  · have ho' : 0 < o := Ordinal.pos_iff_ne_zero.2 ho
    

Proof state:
case refine'_1
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : ∀ (i : Ordinal.{u}) (hi : i < o), f i hi b ≤ nfpBFamily o f a
ho' : 0 < o
⊢ b ≤ nfpBFamily o f a

Next tactic:
exact ((H 0 ho').self_le b).trans (h 0 ho')
theorem apply_le_nfpBFamily (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b ≤ nfpBFamily.{u, v} o f a) ↔ b ≤ nfpBFamily.{u, v} o f a := by
  refine' ⟨fun h => _, fun h i hi => _⟩
  · have ho' : 0 < o := Ordinal.pos_iff_ne_zero.2 ho
    exact ((H 0 ho').self_le b).trans (h 0 ho')
  · 

Proof state:
case refine'_2
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : b ≤ nfpBFamily o f a
i : Ordinal.{u}
hi : i < o
⊢ f i hi b ≤ nfpBFamily o f a

Next tactic:
rw [← nfpBFamily_fp (H i hi)]
theorem apply_le_nfpBFamily (ho : o ≠ 0) (H : ∀ i hi, IsNormal (f i hi)) {a b} :
    (∀ i hi, f i hi b ≤ nfpBFamily.{u, v} o f a) ↔ b ≤ nfpBFamily.{u, v} o f a := by
  refine' ⟨fun h => _, fun h i hi => _⟩
  · have ho' : 0 < o := Ordinal.pos_iff_ne_zero.2 ho
    exact ((H 0 ho').self_le b).trans (h 0 ho')
  · rw [← nfpBFamily_fp (H i hi)]
    

Proof state:
case refine'_2
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
ho : o ≠ 0
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max v u}
b : Ordinal.{max u v}
h : b ≤ nfpBFamily o f a
i : Ordinal.{u}
hi : i < o
⊢ f i hi b ≤ f i hi (nfpBFamily o f a)

Next tactic:
exact (H i hi).monotone h
/-- A generalization of the fixed point lemma for normal functions: any family of normal functions
    has an unbounded set of common fixed points. -/
theorem fp_bfamily_unbounded (H : ∀ i hi, IsNormal (f i hi)) :
    (⋂ (i) (hi), Function.fixedPoints (f i hi)).Unbounded (· < ·) := fun a =>
  ⟨nfpBFamily.{u, v} _ f a, by
    

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max u v}
⊢ nfpBFamily o f a ∈ ⋂ i, ⋂ (hi : i < o), fixedPoints (f i hi)

Next tactic:
rw [Set.mem_iInter₂]
/-- A generalization of the fixed point lemma for normal functions: any family of normal functions
    has an unbounded set of common fixed points. -/
theorem fp_bfamily_unbounded (H : ∀ i hi, IsNormal (f i hi)) :
    (⋂ (i) (hi), Function.fixedPoints (f i hi)).Unbounded (· < ·) := fun a =>
  ⟨nfpBFamily.{u, v} _ f a, by
    rw [Set.mem_iInter₂]
    

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
H : ∀ (i : Ordinal.{u}) (hi : i < o), IsNormal (f i hi)
a : Ordinal.{max u v}
⊢ ∀ (i : Ordinal.{u}) (j : i < o), nfpBFamily o f a ∈ fixedPoints (f i j)

Next tactic:
exact fun i hi => nfpBFamily_fp (H i hi) _
theorem derivBFamily_fp {i hi} (H : IsNormal (f i hi)) (a : Ordinal) :
    f i hi (derivBFamily.{u, v} o f a) = derivBFamily.{u, v} o f a := by
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max u v}
⊢ f i hi (derivBFamily o f a) = derivBFamily o f a

Next tactic:
rw [← familyOfBFamily_enum o f]
theorem derivBFamily_fp {i hi} (H : IsNormal (f i hi)) (a : Ordinal) :
    f i hi (derivBFamily.{u, v} o f a) = derivBFamily.{u, v} o f a := by
  rw [← familyOfBFamily_enum o f]
  

Proof state:
o : Ordinal.{u}
f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}
i : Ordinal.{u}
hi : i < o
H : IsNormal (f i hi)
a : Ordinal.{max u v}
⊢ familyOfBFamily o f (enum (fun x x_1 => x < x_1) i (_ : i < type fun x x_1 => x < x_1)) (derivBFamily o f a) =
    derivBFamily o f a

Next tactic:
apply derivFamily_fp