Theorem: List.Sorted.lt_ord_of_lt
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: cases l with
| nil => simp at hmltl
| cons a as =>
  cases m with
  | nil => intro i hi; simp at hi
  | cons b bs =>
    intro i hi
    suffices h : i ≤ a by refine lt_of_le_of_lt ?_ (hlt a (mem_cons_self a as)); simpa
    cases hi with
    | head as => exact List.head_le_of_lt hmltl
    | tail b hi => exact le_of_lt (lt_of_lt_of_le (List.rel_of_sorted_cons hm _ hi)
        (List.head_le_of_lt hmltl))
state_before: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
l m : List α
o : Ordinal.{u}
hl : Sorted (fun x x_1 => x > x_1) l
hm : Sorted (fun x x_1 => x > x_1) m
hlt : ∀ i ∈ l, Ordinal.typein (fun x x_1 => x < x_1) i < o
hmltl : Lex (fun x x_1 => x < x_1) m l
⊢ ∀ i ∈ m, Ordinal.typein (fun x x_1 => x < x_1) i < o
state_after: no goals

tactic: simp at hmltl
state_before: case nil
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
m : List α
o : Ordinal.{u}
hm : Sorted (fun x x_1 => x > x_1) m
hl : Sorted (fun x x_1 => x > x_1) []
hlt : ∀ i ∈ [], Ordinal.typein (fun x x_1 => x < x_1) i < o
hmltl : Lex (fun x x_1 => x < x_1) m []
⊢ ∀ i ∈ m, Ordinal.typein (fun x x_1 => x < x_1) i < o
state_after: no goals

tactic: cases m with
| nil => intro i hi; simp at hi
| cons b bs =>
  intro i hi
  suffices h : i ≤ a by refine lt_of_le_of_lt ?_ (hlt a (mem_cons_self a as)); simpa
  cases hi with
  | head as => exact List.head_le_of_lt hmltl
  | tail b hi => exact le_of_lt (lt_of_lt_of_le (List.rel_of_sorted_cons hm _ hi)
      (List.head_le_of_lt hmltl))
state_before: case cons
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
m : List α
o : Ordinal.{u}
hm : Sorted (fun x x_1 => x > x_1) m
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
hmltl : Lex (fun x x_1 => x < x_1) m (a :: as)
⊢ ∀ i ∈ m, Ordinal.typein (fun x x_1 => x < x_1) i < o
state_after: no goals

tactic: intro i hi
state_before: case cons.nil
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
hm : Sorted (fun x x_1 => x > x_1) []
hmltl : Lex (fun x x_1 => x < x_1) [] (a :: as)
⊢ ∀ i ∈ [], Ordinal.typein (fun x x_1 => x < x_1) i < o
state_after: case cons.nil
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
hm : Sorted (fun x x_1 => x > x_1) []
hmltl : Lex (fun x x_1 => x < x_1) [] (a :: as)
i : α
hi : i ∈ []
⊢ Ordinal.typein (fun x x_1 => x < x_1) i < o

tactic: simp at hi
state_before: case cons.nil
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
hm : Sorted (fun x x_1 => x > x_1) []
hmltl : Lex (fun x x_1 => x < x_1) [] (a :: as)
i : α
hi : i ∈ []
⊢ Ordinal.typein (fun x x_1 => x < x_1) i < o
state_after: no goals

tactic: intro i hi
state_before: case cons.cons
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
⊢ ∀ i ∈ b :: bs, Ordinal.typein (fun x x_1 => x < x_1) i < o
state_after: case cons.cons
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
i : α
hi : i ∈ b :: bs
⊢ Ordinal.typein (fun x x_1 => x < x_1) i < o

tactic: suffices h : i ≤ a by refine lt_of_le_of_lt ?_ (hlt a (mem_cons_self a as)); simpa
state_before: case cons.cons
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
i : α
hi : i ∈ b :: bs
⊢ Ordinal.typein (fun x x_1 => x < x_1) i < o
state_after: case cons.cons
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
i : α
hi : i ∈ b :: bs
⊢ i ≤ a

tactic: cases hi with
| head as => exact List.head_le_of_lt hmltl
| tail b hi => exact le_of_lt (lt_of_lt_of_le (List.rel_of_sorted_cons hm _ hi)
    (List.head_le_of_lt hmltl))
state_before: case cons.cons
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
i : α
hi : i ∈ b :: bs
⊢ i ≤ a
state_after: no goals

tactic: refine lt_of_le_of_lt ?_ (hlt a (mem_cons_self a as))
state_before: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
i : α
hi : i ∈ b :: bs
h : i ≤ a
⊢ Ordinal.typein (fun x x_1 => x < x_1) i < o
state_after: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
i : α
hi : i ∈ b :: bs
h : i ≤ a
⊢ Ordinal.typein (fun x x_1 => x < x_1) i ≤ Ordinal.typein (fun x x_1 => x < x_1) a

tactic: simpa
state_before: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
i : α
hi : i ∈ b :: bs
h : i ≤ a
⊢ Ordinal.typein (fun x x_1 => x < x_1) i ≤ Ordinal.typein (fun x x_1 => x < x_1) a
state_after: no goals

tactic: exact List.head_le_of_lt hmltl
state_before: case cons.cons.head
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
⊢ b ≤ a
state_after: no goals

tactic: exact le_of_lt (lt_of_lt_of_le (List.rel_of_sorted_cons hm _ hi)
(List.head_le_of_lt hmltl))
state_before: case cons.cons.tail
α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
inst✝¹ : LinearOrder α
inst✝ : IsWellOrder α fun x x_1 => x < x_1
o : Ordinal.{u}
a : α
as : List α
hl : Sorted (fun x x_1 => x > x_1) (a :: as)
hlt : ∀ i ∈ a :: as, Ordinal.typein (fun x x_1 => x < x_1) i < o
b : α
bs : List α
hm : Sorted (fun x x_1 => x > x_1) (b :: bs)
hmltl : Lex (fun x x_1 => x < x_1) (b :: bs) (a :: as)
i : α
hi : Mem i bs
⊢ i ≤ a
state_after: no goals