l3lab/ntp-mathlib huggingface dataset:
instance : PredOrder (WithTop α) where
  pred a :=
    match a with
    | ⊤ => some ⊤
    | Option.some a => some (pred a)
  pred_le a :=
    match a with
    | ⊤ => le_top
    | Option.some a => some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases a
    · exact ((coe_lt_top (⊤ : α)).not_le ha).elim
    · exact (min_of_le_pred <| some_le_some.1 ha).withTop
  le_pred_of_lt {a b} h := by
    cases a
    · exact (le_top.not_lt h).elim
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
b : WithTop α
val✝ : α
h : Option.some val✝ < b
⊢ Option.some val✝ ≤
    (fun a =>
        match a with
        | none => ↑⊤
        | Option.some a => ↑(pred a))
      b

Next tactic:
cases b
instance : PredOrder (WithTop α) where
  pred a :=
    match a with
    | ⊤ => some ⊤
    | Option.some a => some (pred a)
  pred_le a :=
    match a with
    | ⊤ => le_top
    | Option.some a => some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases a
    · exact ((coe_lt_top (⊤ : α)).not_le ha).elim
    · exact (min_of_le_pred <| some_le_some.1 ha).withTop
  le_pred_of_lt {a b} h := by
    cases a
    · exact (le_top.not_lt h).elim
    cases b
    · 

Proof state:
case some.none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
val✝ : α
h : Option.some val✝ < none
⊢ Option.some val✝ ≤
    (fun a =>
        match a with
        | none => ↑⊤
        | Option.some a => ↑(pred a))
      none

Next tactic:
exact some_le_some.2 le_top
instance : PredOrder (WithTop α) where
  pred a :=
    match a with
    | ⊤ => some ⊤
    | Option.some a => some (pred a)
  pred_le a :=
    match a with
    | ⊤ => le_top
    | Option.some a => some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases a
    · exact ((coe_lt_top (⊤ : α)).not_le ha).elim
    · exact (min_of_le_pred <| some_le_some.1 ha).withTop
  le_pred_of_lt {a b} h := by
    cases a
    · exact (le_top.not_lt h).elim
    cases b
    · exact some_le_some.2 le_top
    

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
val✝¹ val✝ : α
h : Option.some val✝¹ < Option.some val✝
⊢ Option.some val✝¹ ≤
    (fun a =>
        match a with
        | none => ↑⊤
        | Option.some a => ↑(pred a))
      (Option.some val✝)

Next tactic:
exact some_le_some.2 (le_pred_of_lt <| some_lt_some.1 h)
instance : PredOrder (WithTop α) where
  pred a :=
    match a with
    | ⊤ => some ⊤
    | Option.some a => some (pred a)
  pred_le a :=
    match a with
    | ⊤ => le_top
    | Option.some a => some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases a
    · exact ((coe_lt_top (⊤ : α)).not_le ha).elim
    · exact (min_of_le_pred <| some_le_some.1 ha).withTop
  le_pred_of_lt {a b} h := by
    cases a
    · exact (le_top.not_lt h).elim
    cases b
    · exact some_le_some.2 le_top
    exact some_le_some.2 (le_pred_of_lt <| some_lt_some.1 h)
  le_of_pred_lt {a b} h := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
a b : WithTop α
h :
  (fun a =>
        match a with
        | none => ↑⊤
        | Option.some a => ↑(pred a))
      a <
    b
⊢ a ≤ b

Next tactic:
cases b
instance : PredOrder (WithTop α) where
  pred a :=
    match a with
    | ⊤ => some ⊤
    | Option.some a => some (pred a)
  pred_le a :=
    match a with
    | ⊤ => le_top
    | Option.some a => some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases a
    · exact ((coe_lt_top (⊤ : α)).not_le ha).elim
    · exact (min_of_le_pred <| some_le_some.1 ha).withTop
  le_pred_of_lt {a b} h := by
    cases a
    · exact (le_top.not_lt h).elim
    cases b
    · exact some_le_some.2 le_top
    exact some_le_some.2 (le_pred_of_lt <| some_lt_some.1 h)
  le_of_pred_lt {a b} h := by
    cases b
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
a : WithTop α
h :
  (fun a =>
        match a with
        | none => ↑⊤
        | Option.some a => ↑(pred a))
      a <
    none
⊢ a ≤ none

Next tactic:
exact le_top
instance : PredOrder (WithTop α) where
  pred a :=
    match a with
    | ⊤ => some ⊤
    | Option.some a => some (pred a)
  pred_le a :=
    match a with
    | ⊤ => le_top
    | Option.some a => some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases a
    · exact ((coe_lt_top (⊤ : α)).not_le ha).elim
    · exact (min_of_le_pred <| some_le_some.1 ha).withTop
  le_pred_of_lt {a b} h := by
    cases a
    · exact (le_top.not_lt h).elim
    cases b
    · exact some_le_some.2 le_top
    exact some_le_some.2 (le_pred_of_lt <| some_lt_some.1 h)
  le_of_pred_lt {a b} h := by
    cases b
    · exact le_top
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
a : WithTop α
val✝ : α
h :
  (fun a =>
        match a with
        | none => ↑⊤
        | Option.some a => ↑(pred a))
      a <
    Option.some val✝
⊢ a ≤ Option.some val✝

Next tactic:
cases a
instance : PredOrder (WithTop α) where
  pred a :=
    match a with
    | ⊤ => some ⊤
    | Option.some a => some (pred a)
  pred_le a :=
    match a with
    | ⊤ => le_top
    | Option.some a => some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases a
    · exact ((coe_lt_top (⊤ : α)).not_le ha).elim
    · exact (min_of_le_pred <| some_le_some.1 ha).withTop
  le_pred_of_lt {a b} h := by
    cases a
    · exact (le_top.not_lt h).elim
    cases b
    · exact some_le_some.2 le_top
    exact some_le_some.2 (le_pred_of_lt <| some_lt_some.1 h)
  le_of_pred_lt {a b} h := by
    cases b
    · exact le_top
    cases a
    · 

Proof state:
case some.none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
val✝ : α
h :
  (fun a =>
        match a with
        | none => ↑⊤
        | Option.some a => ↑(pred a))
      none <
    Option.some val✝
⊢ none ≤ Option.some val✝

Next tactic:
exact (not_top_lt <| some_lt_some.1 h).elim
instance : PredOrder (WithTop α) where
  pred a :=
    match a with
    | ⊤ => some ⊤
    | Option.some a => some (pred a)
  pred_le a :=
    match a with
    | ⊤ => le_top
    | Option.some a => some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases a
    · exact ((coe_lt_top (⊤ : α)).not_le ha).elim
    · exact (min_of_le_pred <| some_le_some.1 ha).withTop
  le_pred_of_lt {a b} h := by
    cases a
    · exact (le_top.not_lt h).elim
    cases b
    · exact some_le_some.2 le_top
    exact some_le_some.2 (le_pred_of_lt <| some_lt_some.1 h)
  le_of_pred_lt {a b} h := by
    cases b
    · exact le_top
    cases a
    · exact (not_top_lt <| some_lt_some.1 h).elim
    · 

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
val✝¹ val✝ : α
h :
  (fun a =>
        match a with
        | none => ↑⊤
        | Option.some a => ↑(pred a))
      (Option.some val✝) <
    Option.some val✝¹
⊢ Option.some val✝ ≤ Option.some val✝¹

Next tactic:
exact some_le_some.2 (le_of_pred_lt <| some_lt_some.1 h)
@[simp]
theorem pred_untop :
    ∀ (a : WithTop α) (ha : a ≠ ⊤),
      pred (a.untop ha) = (pred a).untop (by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
a : WithTop α
ha : a ≠ ⊤
⊢ pred a ≠ ⊤

Next tactic:
induction a using WithTop.recTopCoe
@[simp]
theorem pred_untop :
    ∀ (a : WithTop α) (ha : a ≠ ⊤),
      pred (a.untop ha) = (pred a).untop (by induction a using WithTop.recTopCoe <;> 

Proof state:
case top
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
ha : ⊤ ≠ ⊤
⊢ pred ⊤ ≠ ⊤

Next tactic:
simp
@[simp]
theorem pred_untop :
    ∀ (a : WithTop α) (ha : a ≠ ⊤),
      pred (a.untop ha) = (pred a).untop (by induction a using WithTop.recTopCoe <;> 

Proof state:
case coe
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderTop α
inst✝ : PredOrder α
a✝ : α
ha : ↑a✝ ≠ ⊤
⊢ pred ↑a✝ ≠ ⊤

Next tactic:
simp
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
a : WithTop α
⊢ a ≤
    (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      a

Next tactic:
cases' a with a a
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
⊢ none ≤
    (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      none

Next tactic:
exact le_top
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · 

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
a : α
⊢ Option.some a ≤
    (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      (Option.some a)

Next tactic:
exact some_le_some.2 (le_succ a)
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
a : WithTop α
ha :
  (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      a ≤
    a
⊢ IsMax a

Next tactic:
cases a
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
ha :
  (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      none ≤
    none
⊢ IsMax none

Next tactic:
exact isMax_top
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · 

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
val✝ : α
ha :
  (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      (Option.some val✝) ≤
    Option.some val✝
⊢ IsMax (Option.some val✝)

Next tactic:
exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
a b : WithTop α
h : a < b
⊢ (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      a ≤
    b

Next tactic:
cases a
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
b : WithTop α
h : none < b
⊢ (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      none ≤
    b

Next tactic:
exact (not_top_lt h).elim
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
b : WithTop α
val✝ : α
h : Option.some val✝ < b
⊢ (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      (Option.some val✝) ≤
    b

Next tactic:
cases b
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · 

Proof state:
case some.none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
val✝ : α
h : Option.some val✝ < none
⊢ (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      (Option.some val✝) ≤
    none

Next tactic:
exact le_top
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · exact le_top
    · 

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
val✝¹ val✝ : α
h : Option.some val✝¹ < Option.some val✝
⊢ (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      (Option.some val✝¹) ≤
    Option.some val✝

Next tactic:
exact some_le_some.2 (succ_le_of_lt <| some_lt_some.1 h)
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · exact le_top
    · exact some_le_some.2 (succ_le_of_lt <| some_lt_some.1 h)
  le_of_lt_succ {a b} h := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
a b : WithTop α
h :
  a <
    (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      b
⊢ a ≤ b

Next tactic:
cases a
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · exact le_top
    · exact some_le_some.2 (succ_le_of_lt <| some_lt_some.1 h)
  le_of_lt_succ {a b} h := by
    cases a
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
b : WithTop α
h :
  none <
    (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      b
⊢ none ≤ b

Next tactic:
exact (not_top_lt h).elim
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · exact le_top
    · exact some_le_some.2 (succ_le_of_lt <| some_lt_some.1 h)
  le_of_lt_succ {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
b : WithTop α
val✝ : α
h :
  Option.some val✝ <
    (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      b
⊢ Option.some val✝ ≤ b

Next tactic:
cases b
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · exact le_top
    · exact some_le_some.2 (succ_le_of_lt <| some_lt_some.1 h)
  le_of_lt_succ {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · 

Proof state:
case some.none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
val✝ : α
h :
  Option.some val✝ <
    (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      none
⊢ Option.some val✝ ≤ none

Next tactic:
exact le_top
instance succOrderOfNoMaxOrder : SuccOrder (WithTop α) where
  succ a :=
    match a with
    | ⊤ => ⊤
    | Option.some a => some (succ a)
  le_succ a := by
    cases' a with a a
    · exact le_top
    · exact some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact isMax_top
    · exact (not_isMax _ <| max_of_succ_le <| some_le_some.1 ha).elim
  succ_le_of_lt {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · exact le_top
    · exact some_le_some.2 (succ_le_of_lt <| some_lt_some.1 h)
  le_of_lt_succ {a b} h := by
    cases a
    · exact (not_top_lt h).elim
    cases b
    · exact le_top
    · 

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : NoMaxOrder α
inst✝ : SuccOrder α
val✝¹ val✝ : α
h :
  Option.some val✝¹ <
    (fun a =>
        match a with
        | none => ⊤
        | Option.some a => ↑(succ a))
      (Option.some val✝)
⊢ Option.some val✝¹ ≤ Option.some val✝

Next tactic:
exact some_le_some.2 (le_of_lt_succ <| some_lt_some.1 h)
instance [hα : Nonempty α] : IsEmpty (PredOrder (WithTop α)) :=
  ⟨by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
hα : Nonempty α
⊢ PredOrder (WithTop α) → False

Next tactic:
intro
instance [hα : Nonempty α] : IsEmpty (PredOrder (WithTop α)) :=
  ⟨by
    intro
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
hα : Nonempty α
a✝ : PredOrder (WithTop α)
⊢ False

Next tactic:
cases' h : pred (⊤ : WithTop α) with a ha
instance [hα : Nonempty α] : IsEmpty (PredOrder (WithTop α)) :=
  ⟨by
    intro
    cases' h : pred (⊤ : WithTop α) with a ha
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
hα : Nonempty α
a✝ : PredOrder (WithTop α)
h : pred ⊤ = none
⊢ False

Next tactic:
exact hα.elim fun a => (min_of_le_pred h.ge).not_lt <| coe_lt_top a
instance [hα : Nonempty α] : IsEmpty (PredOrder (WithTop α)) :=
  ⟨by
    intro
    cases' h : pred (⊤ : WithTop α) with a ha
    · exact hα.elim fun a => (min_of_le_pred h.ge).not_lt <| coe_lt_top a
    · 

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
hα : Nonempty α
a✝ : PredOrder (WithTop α)
a : α
h : pred ⊤ = Option.some a
⊢ False

Next tactic:
obtain ⟨c, hc⟩ := exists_gt a
instance [hα : Nonempty α] : IsEmpty (PredOrder (WithTop α)) :=
  ⟨by
    intro
    cases' h : pred (⊤ : WithTop α) with a ha
    · exact hα.elim fun a => (min_of_le_pred h.ge).not_lt <| coe_lt_top a
    · obtain ⟨c, hc⟩ := exists_gt a
      

Proof state:
case some.intro
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
hα : Nonempty α
a✝ : PredOrder (WithTop α)
a : α
h : pred ⊤ = Option.some a
c : α
hc : a < c
⊢ False

Next tactic:
rw [← some_lt_some, ← h] at hc
instance [hα : Nonempty α] : IsEmpty (PredOrder (WithTop α)) :=
  ⟨by
    intro
    cases' h : pred (⊤ : WithTop α) with a ha
    · exact hα.elim fun a => (min_of_le_pred h.ge).not_lt <| coe_lt_top a
    · obtain ⟨c, hc⟩ := exists_gt a
      rw [← some_lt_some, ← h] at hc
      

Proof state:
case some.intro
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
hα : Nonempty α
a✝ : PredOrder (WithTop α)
a : α
h : pred ⊤ = Option.some a
c : α
hc : pred ⊤ < Option.some c
⊢ False

Next tactic:
exact (le_of_pred_lt hc).not_lt (some_lt_none _)
instance : SuccOrder (WithBot α) where
  succ a :=
    match a with
    | ⊥ => some ⊥
    | Option.some a => some (succ a)
  le_succ a :=
    match a with
    | ⊥ => bot_le
    | Option.some a => some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
inst✝ : SuccOrder α
a : WithBot α
ha :
  (fun a =>
        match a with
        | none => ↑⊥
        | Option.some a => ↑(succ a))
      a ≤
    a
⊢ IsMax a

Next tactic:
cases a
instance : SuccOrder (WithBot α) where
  succ a :=
    match a with
    | ⊥ => some ⊥
    | Option.some a => some (succ a)
  le_succ a :=
    match a with
    | ⊥ => bot_le
    | Option.some a => some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
inst✝ : SuccOrder α
ha :
  (fun a =>
        match a with
        | none => ↑⊥
        | Option.some a => ↑(succ a))
      none ≤
    none
⊢ IsMax none

Next tactic:
exact ((none_lt_some (⊥ : α)).not_le ha).elim
instance : SuccOrder (WithBot α) where
  succ a :=
    match a with
    | ⊥ => some ⊥
    | Option.some a => some (succ a)
  le_succ a :=
    match a with
    | ⊥ => bot_le
    | Option.some a => some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact ((none_lt_some (⊥ : α)).not_le ha).elim
    · 

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
inst✝ : SuccOrder α
val✝ : α
ha :
  (fun a =>
        match a with
        | none => ↑⊥
        | Option.some a => ↑(succ a))
      (Option.some val✝) ≤
    Option.some val✝
⊢ IsMax (Option.some val✝)

Next tactic:
exact (max_of_succ_le <| some_le_some.1 ha).withBot
instance : SuccOrder (WithBot α) where
  succ a :=
    match a with
    | ⊥ => some ⊥
    | Option.some a => some (succ a)
  le_succ a :=
    match a with
    | ⊥ => bot_le
    | Option.some a => some_le_some.2 (le_succ a)
  max_of_succ_le {a} ha := by
    cases a
    · exact ((none_lt_some (⊥ : α)).not_le ha).elim
    · exact (max_of_succ_le <| some_le_some.1 ha).withBot
  succ_le_of_lt {a b} h := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
inst✝ : SuccOrder α
a b : WithBot α
h : a < b
⊢ (fun a =>
        match a with
        | none => ↑⊥
        | Option.some a => ↑(succ a))
      a ≤
    b

Next tactic:
cases b