Theorem: List.lt_iff_lex_lt
File: Mathlib/Data/List/Lex.lean

tactic: constructor <;>
intro h
state_before: α : Type u
inst✝ : LinearOrder α
l l' : List α
⊢ l.lt l' ↔ Lex (fun x x_1 => x < x_1) l l'
state_after: case mp
α : Type u
inst✝ : LinearOrder α
l l' : List α
h : l.lt l'
⊢ Lex (fun x x_1 => x < x_1) l l'

case mpr
α : Type u
inst✝ : LinearOrder α
l l' : List α
h : Lex (fun x x_1 => x < x_1) l l'
⊢ l.lt l'

tactic: induction h with
| nil b bs => exact Lex.nil
| @head a as b bs hab => apply Lex.rel; assumption
| @tail a as b bs hab hba _ ih =>
  have heq : a = b := _root_.le_antisymm (le_of_not_lt hba) (le_of_not_lt hab)
  subst b; apply Lex.cons; assumption
state_before: case mp
α : Type u
inst✝ : LinearOrder α
l l' : List α
h : l.lt l'
⊢ Lex (fun x x_1 => x < x_1) l l'
state_after: no goals

tactic: exact Lex.nil
state_before: case mp.nil
α : Type u
inst✝ : LinearOrder α
l l' : List α
b : α
bs : List α
⊢ Lex (fun x x_1 => x < x_1) [] (b :: bs)
state_after: no goals

tactic: apply Lex.rel
state_before: case mp.head
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
hab : a < b
⊢ Lex (fun x x_1 => x < x_1) (a :: as) (b :: bs)
state_after: case mp.head.h
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
hab : a < b
⊢ a < b

tactic: assumption
state_before: case mp.head.h
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
hab : a < b
⊢ a < b
state_after: no goals

tactic: have heq : a = b := _root_.le_antisymm (le_of_not_lt hba) (le_of_not_lt hab)
state_before: case mp.tail
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
hab : ¬a < b
hba : ¬b < a
a✝ : as.lt bs
ih : Lex (fun x x_1 => x < x_1) as bs
⊢ Lex (fun x x_1 => x < x_1) (a :: as) (b :: bs)
state_after: case mp.tail
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
hab : ¬a < b
hba : ¬b < a
a✝ : as.lt bs
ih : Lex (fun x x_1 => x < x_1) as bs
heq : a = b
⊢ Lex (fun x x_1 => x < x_1) (a :: as) (b :: bs)

tactic: subst b
state_before: case mp.tail
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
hab : ¬a < b
hba : ¬b < a
a✝ : as.lt bs
ih : Lex (fun x x_1 => x < x_1) as bs
heq : a = b
⊢ Lex (fun x x_1 => x < x_1) (a :: as) (b :: bs)
state_after: case mp.tail
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as bs : List α
a✝ : as.lt bs
ih : Lex (fun x x_1 => x < x_1) as bs
hab hba : ¬a < a
⊢ Lex (fun x x_1 => x < x_1) (a :: as) (a :: bs)

tactic: apply Lex.cons
state_before: case mp.tail
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as bs : List α
a✝ : as.lt bs
ih : Lex (fun x x_1 => x < x_1) as bs
hab hba : ¬a < a
⊢ Lex (fun x x_1 => x < x_1) (a :: as) (a :: bs)
state_after: case mp.tail.h
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as bs : List α
a✝ : as.lt bs
ih : Lex (fun x x_1 => x < x_1) as bs
hab hba : ¬a < a
⊢ Lex (fun x x_1 => x < x_1) as bs

tactic: assumption
state_before: case mp.tail.h
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as bs : List α
a✝ : as.lt bs
ih : Lex (fun x x_1 => x < x_1) as bs
hab hba : ¬a < a
⊢ Lex (fun x x_1 => x < x_1) as bs
state_after: no goals

tactic: induction h with
| @nil a as => apply lt.nil
| @cons a as bs _ ih => apply lt.tail <;> simp [ih]
| @rel a as b bs h => apply lt.head; assumption
state_before: case mpr
α : Type u
inst✝ : LinearOrder α
l l' : List α
h : Lex (fun x x_1 => x < x_1) l l'
⊢ l.lt l'
state_after: no goals

tactic: apply lt.nil
state_before: case mpr.nil
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
⊢ [].lt (a :: as)
state_after: no goals

tactic: apply lt.tail <;> simp [ih]
state_before: case mpr.cons
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as bs : List α
h✝ : Lex (fun x x_1 => x < x_1) as bs
ih : as.lt bs
⊢ (a :: as).lt (a :: bs)
state_after: no goals

tactic: apply lt.head
state_before: case mpr.rel
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
h : a < b
⊢ (a :: as).lt (b :: bs)
state_after: case mpr.rel.a
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
h : a < b
⊢ a < b

tactic: assumption
state_before: case mpr.rel.a
α : Type u
inst✝ : LinearOrder α
l l' : List α
a : α
as : List α
b : α
bs : List α
h : a < b
⊢ a < b
state_after: no goals