Theorem: Profinite.NobelingProof.GoodProducts.head!_eq_o_of_maxProducts
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

Proof steps:
state_before: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
⊢ (↑↑l).head! = term I ho
state_after: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
⊢ ord I (↑↑l).head! = o
tactic: rw [eq_comm, ← ord_term ho]
state_before: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
⊢ ord I (↑↑l).head! = o
state_after: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
⊢ ord I (↑↑l).head! = o
tactic: have hm := l.prop.2
state_before: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
⊢ ord I (↑↑l).head! = o
state_after: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
this : ord I (↑↑l).head! < Order.succ o
⊢ ord I (↑↑l).head! = o
tactic: have := Products.prop_of_isGood_of_contained C _ l.prop.1 hsC l.val.val.head!
    (List.head!_mem_self (List.ne_nil_of_mem hm))
state_before: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
this : ord I (↑↑l).head! < Order.succ o
⊢ ord I (↑↑l).head! = o
state_after: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
this : ord I (↑↑l).head! ≤ o
⊢ ord I (↑↑l).head! = o
tactic: simp only [Order.lt_succ_iff] at this
state_before: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
this : ord I (↑↑l).head! ≤ o
⊢ ord I (↑↑l).head! = o
state_after: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
this : ord I (↑↑l).head! ≤ o
⊢ o ≤ ord I (↑↑l).head!
tactic: refine eq_of_le_of_not_lt this (not_lt.mpr ?_)
state_before: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
this : ord I (↑↑l).head! ≤ o
⊢ o ≤ ord I (↑↑l).head!
state_after: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
this : ord I (↑↑l).head! ≤ o
h : ord I (term I ho) ≤ ord I (↑↑l).head!
⊢ o ≤ ord I (↑↑l).head!
tactic: have h : ord I (term I ho) ≤ ord I l.val.val.head! := by
    simp only [← ord_term_aux, ord, Ordinal.typein_le_typein, not_lt]
    exact Products.rel_head!_of_mem hm
state_before: I : Type u
inst✝² : LinearOrder I
inst✝¹ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
hC : IsClosed C
hsC : contained C (Order.succ o)
ho : o < Ordinal.type fun x x_1 => x < x_1
inst✝ : Inhabited I
l : ↑(MaxProducts C ho)
hm : term I ho ∈ ↑↑l
this : ord I (↑↑l).head! ≤ o
h : ord I (term I ho) ≤ ord I (↑↑l).head!
⊢ o ≤ ord I (↑↑l).head!
state_after: no goals
tactic: rwa [ord_term_aux] at h