Theorem: Order.isSuccLimitRecOn_succ'
File: Mathlib/Order/SuccPred/Limit.lean

tactic: have hb' := not_isSuccLimit_succ_of_not_isMax hb
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : SuccOrder α
a b✝ : α
C : α → Sort u_2
hs : (a : α) → ¬IsMax a → C (succ a)
hl : (a : α) → IsSuccLimit a → C a
b : α
hb : ¬IsMax b
⊢ isSuccLimitRecOn (succ b) hs hl = hs b hb

tactic: have H := Classical.choose_spec (not_isSuccLimit_iff.1 hb')
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : SuccOrder α
a b✝ : α
C : α → Sort u_2
hs : (a : α) → ¬IsMax a → C (succ a)
hl : (a : α) → IsSuccLimit a → C a
b : α
hb : ¬IsMax b
hb' : ¬IsSuccLimit (succ b)
⊢ isSuccLimitRecOn (succ b) hs hl = hs b hb

tactic: rw [isSuccLimitRecOn]
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : SuccOrder α
a b✝ : α
C : α → Sort u_2
hs : (a : α) → ¬IsMax a → C (succ a)
hl : (a : α) → IsSuccLimit a → C a
b : α
hb : ¬IsMax b
hb' : ¬IsSuccLimit (succ b)
H :
  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧
    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b
⊢ isSuccLimitRecOn (succ b) hs hl = hs b hb

tactic: simp only [cast_eq_iff_heq, hb', not_false_iff, eq_mpr_eq_cast, dif_neg]
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : SuccOrder α
a b✝ : α
C : α → Sort u_2
hs : (a : α) → ¬IsMax a → C (succ a)
hl : (a : α) → IsSuccLimit a → C a
b : α
hb : ¬IsMax b
hb' : ¬IsSuccLimit (succ b)
H :
  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧
    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b
⊢ (if hb : IsSuccLimit (succ b) then hl (succ b) hb
    else
      let_fun H :=
        (_ :
          ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧
            succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b);
      Eq.mpr (_ : C (succ b) = C (succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))))
        (hs (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))
          (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))))) =
    hs b hb

tactic: congr 1 <;> first |
  exact (succ_eq_succ_iff_of_not_isMax H.left hb).mp H.right |
  exact proof_irrel_heq H.left hb
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : SuccOrder α
a b✝ : α
C : α → Sort u_2
hs : (a : α) → ¬IsMax a → C (succ a)
hl : (a : α) → IsSuccLimit a → C a
b : α
hb : ¬IsMax b
hb' : ¬IsSuccLimit (succ b)
H :
  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧
    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b
⊢ HEq
    (hs (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))
      (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))))
    (hs b hb)

tactic: exact (succ_eq_succ_iff_of_not_isMax H.left hb).mp H.right
state_before: case e_2
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : SuccOrder α
a b✝ : α
C : α → Sort u_2
hs : (a : α) → ¬IsMax a → C (succ a)
hl : (a : α) → IsSuccLimit a → C a
b : α
hb : ¬IsMax b
hb' : ¬IsSuccLimit (succ b)
H :
  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧
    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b
⊢ HEq (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))) hb

tactic: exact proof_irrel_heq H.left hb
state_before: case e_2
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : SuccOrder α
a b✝ : α
C : α → Sort u_2
hs : (a : α) → ¬IsMax a → C (succ a)
hl : (a : α) → IsSuccLimit a → C a
b : α
hb : ¬IsMax b
hb' : ¬IsSuccLimit (succ b)
H :
  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧
    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b
⊢ HEq (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))) hb