Theorem: Profinite.NobelingProof.GoodProducts.good_lt_maxProducts
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

tactic: have : Inhabited I := ⟨term I 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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
⊢ List.Lex (fun x x_1 => x < x_1) ↑↑q ↑↑l
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
⊢ List.Lex (fun x x_1 => x < x_1) ↑↑q ↑↑l

tactic: by_cases h : q.val.val = []
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
⊢ List.Lex (fun x x_1 => x < x_1) ↑↑q ↑↑l
state_after: case pos
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ↑↑q = []
⊢ List.Lex (fun x x_1 => x < x_1) ↑↑q ↑↑l

case neg
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ¬↑↑q = []
⊢ List.Lex (fun x x_1 => x < x_1) ↑↑q ↑↑l

tactic: rw [h, max_eq_o_cons_tail C hsC ho l]
state_before: case pos
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ↑↑q = []
⊢ List.Lex (fun x x_1 => x < x_1) ↑↑q ↑↑l
state_after: case pos
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ↑↑q = []
⊢ List.Lex (fun x x_1 => x < x_1) [] (term I ho :: ↑(↑l).Tail)

tactic: exact List.Lex.nil
state_before: case pos
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ↑↑q = []
⊢ List.Lex (fun x x_1 => x < x_1) [] (term I ho :: ↑(↑l).Tail)
state_after: no goals

tactic: rw [← List.cons_head!_tail h, max_eq_o_cons_tail C hsC ho l]
state_before: case neg
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ¬↑↑q = []
⊢ List.Lex (fun x x_1 => x < x_1) ↑↑q ↑↑l
state_after: case neg
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ¬↑↑q = []
⊢ List.Lex (fun x x_1 => x < x_1) ((↑↑q).head! :: (↑↑q).tail) (term I ho :: ↑(↑l).Tail)

tactic: apply List.Lex.rel
state_before: case neg
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ¬↑↑q = []
⊢ List.Lex (fun x x_1 => x < x_1) ((↑↑q).head! :: (↑↑q).tail) (term I ho :: ↑(↑l).Tail)
state_after: case neg.h
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ¬↑↑q = []
⊢ (↑↑q).head! < term I ho

tactic: simp only [term, Ordinal.typein_enum]
state_before: case neg.h
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ¬↑↑q = []
⊢ Ordinal.typein (fun x x_1 => x < x_1) (↑↑q).head! < Ordinal.typein (fun x x_1 => x < x_1) (term I ho)
state_after: case neg.h
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ¬↑↑q = []
⊢ Ordinal.typein (fun x x_1 => x < x_1) (↑↑q).head! < o

tactic: exact Products.prop_of_isGood C _ q.prop q.val.val.head! (List.head!_mem_self h)
state_before: case neg.h
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
q : ↑(GoodProducts (π C fun x => ord I x < o))
l : ↑(MaxProducts C ho)
this : Inhabited I
h : ¬↑↑q = []
⊢ Ordinal.typein (fun x x_1 => x < x_1) (↑↑q).head! < o
state_after: no goals