Theorem: List.Ascending.cons_of_head_tail (Algdata/Data/List/Ascending.lean)

State before:
α : Type u
r : α → α → Prop
a : α
as : List α
⊢ predHead (r a) as → Ascending r as → Ascending r (a :: as)
Tactic:
cases as
State after:
case nil
α : Type u
r : α → α → Prop
a : α
⊢ predHead (r a) [] → Ascending r [] → Ascending r [a]

case cons
α : Type u
r : α → α → Prop
a head✝ : α
tail✝ : List α
⊢ predHead (r a) (head✝ :: tail✝) → Ascending r (head✝ :: tail✝) → Ascending r (a :: head✝ :: tail✝)

State before:
α : Type u
r : α → α → Prop
a : α
⊢ predHead (r a) [] → Ascending r [] → Ascending r [a]
Tactic:
case nil => exact λ _ _ => Ascending.singleton _
State after:
no goals

State before:
α : Type u
r : α → α → Prop
a head✝ : α
tail✝ : List α
⊢ predHead (r a) (head✝ :: tail✝) → Ascending r (head✝ :: tail✝) → Ascending r (a :: head✝ :: tail✝)
Tactic:
case cons => exact Ascending.cons
State after:
no goals

State before:
α : Type u
r : α → α → Prop
a : α
⊢ predHead (r a) [] → Ascending r [] → Ascending r [a]
Tactic:
exact λ _ _ => Ascending.singleton _
State after:
no goals

State before:
α : Type u
r : α → α → Prop
a head✝ : α
tail✝ : List α
⊢ predHead (r a) (head✝ :: tail✝) → Ascending r (head✝ :: tail✝) → Ascending r (a :: head✝ :: tail✝)
Tactic:
exact Ascending.cons
State after:
no goals