Theorem: SuccOrder.limitRecOn_succ
File: Mathlib/Order/SuccPred/Limit.lean

Proof steps:
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
⊢ SuccOrder.limitRecOn (succ a) H_succ H_lim = H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
h : ¬IsSuccLimit (succ a)
⊢ SuccOrder.limitRecOn (succ a) H_succ H_lim = H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
tactic: have h := not_isSuccLimit_succ_of_not_isMax ha
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
h : ¬IsSuccLimit (succ a)
⊢ SuccOrder.limitRecOn (succ a) H_succ H_lim = H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
h : ¬IsSuccLimit (succ a)
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = succ a) ⋯;
    ⋯ ▸
      H_succ ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsSuccLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = a) ⋯;
                  ⋯ ▸ H_succ ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
tactic: rw [SuccOrder.limitRecOn, WellFounded.fix_eq, dif_neg h]
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
h : ¬IsSuccLimit (succ a)
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = succ a) ⋯;
    ⋯ ▸
      H_succ ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsSuccLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = a) ⋯;
                  ⋯ ▸ H_succ ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
h : ¬IsSuccLimit (succ a)
this :
  ∀ {b c : α} {hb : ¬IsMax b} {hc : ¬IsMax c} {x : (a : α) → C a} (h : b = c), ⋯ ▸ H_succ b hb (x b) = H_succ c hc (x c)
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = succ a) ⋯;
    ⋯ ▸
      H_succ ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsSuccLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = a) ⋯;
                  ⋯ ▸ H_succ ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
tactic: have {b c hb hc} {x : ∀ a, C a} (h : b = c) :
    congr_arg succ h ▸ H_succ b hb (x b) = H_succ c hc (x c) := by subst h; rfl
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
h : ¬IsSuccLimit (succ a)
this :
  ∀ {b c : α} {hb : ¬IsMax b} {hc : ¬IsMax c} {x : (a : α) → C a} (h : b = c), ⋯ ▸ H_succ b hb (x b) = H_succ c hc (x c)
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = succ a) ⋯;
    ⋯ ▸
      H_succ ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsSuccLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = a) ⋯;
                  ⋯ ▸ H_succ ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
h : ¬IsSuccLimit (succ a)
this :
  ∀ {b c : α} {hb : ¬IsMax b} {hc : ¬IsMax c} {x : (a : α) → C a} (h : b = c), ⋯ ▸ H_succ b hb (x b) = H_succ c hc (x c)
x : { x // ¬IsMax x ∧ succ x = succ a } := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = succ a) ⋯
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = succ a) ⋯;
    ⋯ ▸
      H_succ ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsSuccLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = a) ⋯;
                  ⋯ ▸ H_succ ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
tactic: let x := Classical.indefiniteDescription _ (not_isSuccLimit_iff.mp h)
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedLT α
H_succ : (a : α) → ¬IsMax a → C a → C (succ a)
H_lim : (a : α) → IsSuccLimit a → ((b : α) → b < a → C b) → C a
ha : ¬IsMax a
h : ¬IsSuccLimit (succ a)
this :
  ∀ {b c : α} {hb : ¬IsMax b} {hc : ¬IsMax c} {x : (a : α) → C a} (h : b = c), ⋯ ▸ H_succ b hb (x b) = H_succ c hc (x c)
x : { x // ¬IsMax x ∧ succ x = succ a } := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = succ a) ⋯
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = succ a) ⋯;
    ⋯ ▸
      H_succ ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsSuccLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMax x ∧ succ x = a) ⋯;
                  ⋯ ▸ H_succ ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)
state_after: no goals
tactic: exact this ((succ_eq_succ_iff_of_not_isMax x.2.1 ha).mp x.2.2)