l3lab/ntp-mathlib huggingface dataset:
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
    cases b
    · 

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

Next tactic:
exact (not_lt_bot h).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
    · exact (max_of_succ_le <| some_le_some.1 ha).withBot
  succ_le_of_lt {a b} h := by
    cases b
    · exact (not_lt_bot h).elim
    

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

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
    · 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
    cases b
    · exact (not_lt_bot h).elim
    cases a
    · 

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

Next tactic:
exact some_le_some.2 bot_le
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
    cases b
    · exact (not_lt_bot h).elim
    cases a
    · exact some_le_some.2 bot_le
    · 

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
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 : 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
    cases b
    · exact (not_lt_bot h).elim
    cases a
    · exact some_le_some.2 bot_le
    · 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✝¹ : OrderBot α
inst✝ : SuccOrder α
a b : WithBot α
h :
  a <
    (fun a =>
        match a with
        | none => ↑⊥
        | Option.some a => ↑(succ a))
      b
⊢ a ≤ b

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
    · 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
    cases b
    · exact (not_lt_bot h).elim
    cases a
    · exact some_le_some.2 bot_le
    · 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✝¹ : OrderBot α
inst✝ : SuccOrder α
b : WithBot α
h :
  none <
    (fun a =>
        match a with
        | none => ↑⊥
        | Option.some a => ↑(succ a))
      b
⊢ none ≤ b

Next tactic:
exact bot_le
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
    cases b
    · exact (not_lt_bot h).elim
    cases a
    · exact some_le_some.2 bot_le
    · 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 bot_le
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
inst✝ : SuccOrder α
b : WithBot α
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 : 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
    cases b
    · exact (not_lt_bot h).elim
    cases a
    · exact some_le_some.2 bot_le
    · 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 bot_le
    cases b
    · 

Proof state:
case some.none
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
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 (not_lt_bot <| some_lt_some.1 h).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
    · exact (max_of_succ_le <| some_le_some.1 ha).withBot
  succ_le_of_lt {a b} h := by
    cases b
    · exact (not_lt_bot h).elim
    cases a
    · exact some_le_some.2 bot_le
    · 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 bot_le
    cases b
    · exact (not_lt_bot <| some_lt_some.1 h).elim
    · 

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
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)
@[simp]
theorem succ_unbot :
    ∀ (a : WithBot α) (ha : a ≠ ⊥),
      succ (a.unbot ha) = (succ a).unbot (by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
inst✝ : SuccOrder α
a : WithBot α
ha : a ≠ ⊥
⊢ succ a ≠ ⊥

Next tactic:
induction a using WithBot.recBotCoe
@[simp]
theorem succ_unbot :
    ∀ (a : WithBot α) (ha : a ≠ ⊥),
      succ (a.unbot ha) = (succ a).unbot (by induction a using WithBot.recBotCoe <;> 

Proof state:
case bot
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
inst✝ : SuccOrder α
ha : ⊥ ≠ ⊥
⊢ succ ⊥ ≠ ⊥

Next tactic:
simp
@[simp]
theorem succ_unbot :
    ∀ (a : WithBot α) (ha : a ≠ ⊥),
      succ (a.unbot ha) = (succ a).unbot (by induction a using WithBot.recBotCoe <;> 

Proof state:
case coe
α : Type u_1
β : Type u_2
inst✝² : Preorder α
inst✝¹ : OrderBot α
inst✝ : SuccOrder α
a✝ : α
ha : ↑a✝ ≠ ⊥
⊢ succ ↑a✝ ≠ ⊥

Next tactic:
simp
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : WithBot α
⊢ (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      a ≤
    a

Next tactic:
cases' a with a a
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
⊢ (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      none ≤
    none

Next tactic:
exact bot_le
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
⊢ (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      (Option.some a) ≤
    Option.some a

Next tactic:
change ite _ _ _ ≤ _
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
⊢ (if a = ⊥ then ⊥ else ↑(pred a)) ≤ Option.some a

Next tactic:
split_ifs
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · 

Proof state:
case pos
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
h✝ : a = ⊥
⊢ ⊥ ≤ Option.some a

Next tactic:
exact bot_le
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · 

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
h✝ : ¬a = ⊥
⊢ ↑(pred a) ≤ Option.some a

Next tactic:
exact some_le_some.2 (pred_le a)
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : WithBot α
ha :
  a ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      a
⊢ IsMin a

Next tactic:
cases' a with a a
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
ha :
  none ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      none
⊢ IsMin none

Next tactic:
exact isMin_bot
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
ha :
  Option.some a ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      (Option.some a)
⊢ IsMin (Option.some a)

Next tactic:
dsimp only at ha
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
ha : Option.some a ≤ if a = ⊥ then ⊥ else ↑(pred a)
⊢ IsMin (Option.some a)

Next tactic:
split_ifs at ha with ha'
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · 

Proof state:
case pos
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
ha' : a = ⊥
ha : Option.some a ≤ ⊥
⊢ IsMin (Option.some a)

Next tactic:
exact (not_coe_le_bot _ ha).elim
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · 

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
ha' : ¬a = ⊥
ha : Option.some a ≤ ↑(pred a)
⊢ IsMin (Option.some a)

Next tactic:
rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      

Proof state:
case neg
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a : α
ha' : ¬a = ⊥
ha : a = ⊥
⊢ IsMin (Option.some a)

Next tactic:
exact (ha' ha).elim
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      exact (ha' ha).elim
  le_pred_of_lt {a b} h := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
a b : WithBot α
h : a < b
⊢ a ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      b

Next tactic:
cases a
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      exact (ha' ha).elim
  le_pred_of_lt {a b} h := by
    cases a
    · 

Proof state:
case none
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
b : WithBot α
h : none < b
⊢ none ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      b

Next tactic:
exact bot_le
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      exact (ha' ha).elim
  le_pred_of_lt {a b} h := by
    cases a
    · exact bot_le
    

Proof state:
case some
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
b : WithBot α
val✝ : α
h : Option.some val✝ < b
⊢ Option.some val✝ ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      b

Next tactic:
cases b
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      exact (ha' ha).elim
  le_pred_of_lt {a b} h := by
    cases a
    · exact bot_le
    cases b
    · 

Proof state:
case some.none
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
val✝ : α
h : Option.some val✝ < none
⊢ Option.some val✝ ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      none

Next tactic:
exact (not_lt_bot h).elim
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      exact (ha' ha).elim
  le_pred_of_lt {a b} h := by
    cases a
    · exact bot_le
    cases b
    · exact (not_lt_bot h).elim
    

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
val✝¹ val✝ : α
h : Option.some val✝¹ < Option.some val✝
⊢ Option.some val✝¹ ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      (Option.some val✝)

Next tactic:
rw [some_lt_some] at h
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      exact (ha' ha).elim
  le_pred_of_lt {a b} h := by
    cases a
    · exact bot_le
    cases b
    · exact (not_lt_bot h).elim
    rw [some_lt_some] at h
    

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
val✝¹ val✝ : α
h : val✝¹ < val✝
⊢ Option.some val✝¹ ≤
    (fun a =>
        match a with
        | none => ⊥
        | Option.some a => if a = ⊥ then ⊥ else ↑(pred a))
      (Option.some val✝)

Next tactic:
change _ ≤ ite _ _ _
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      exact (ha' ha).elim
  le_pred_of_lt {a b} h := by
    cases a
    · exact bot_le
    cases b
    · exact (not_lt_bot h).elim
    rw [some_lt_some] at h
    change _ ≤ ite _ _ _
    

Proof state:
case some.some
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
val✝¹ val✝ : α
h : val✝¹ < val✝
⊢ Option.some val✝¹ ≤ if val✝ = ⊥ then ⊥ else ↑(pred val✝)

Next tactic:
split_ifs with hb
instance : PredOrder (WithBot α) where
  pred a :=
    match a with
    | ⊥ => ⊥
    | Option.some a => ite (a = ⊥) ⊥ (some (pred a))
  pred_le a := by
    cases' a with a a
    · exact bot_le
    change ite _ _ _ ≤ _
    split_ifs
    · exact bot_le
    · exact some_le_some.2 (pred_le a)
  min_of_le_pred {a} ha := by
    cases' a with a a
    · exact isMin_bot
    dsimp only at ha
    split_ifs at ha with ha'
    · exact (not_coe_le_bot _ ha).elim
    · rw [some_eq_coe, coe_le_coe, le_pred_iff_eq_bot] at ha
      exact (ha' ha).elim
  le_pred_of_lt {a b} h := by
    cases a
    · exact bot_le
    cases b
    · exact (not_lt_bot h).elim
    rw [some_lt_some] at h
    change _ ≤ ite _ _ _
    split_ifs with hb
    · 

Proof state:
case pos
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq α
inst✝² : PartialOrder α
inst✝¹ : OrderBot α
inst✝ : PredOrder α
val✝¹ val✝ : α
h : val✝¹ < val✝
hb : val✝ = ⊥
⊢ Option.some val✝¹ ≤ ⊥

Next tactic:
rw [hb] at h