Theorem: PredOrder.limitRecOn_pred
File: Mathlib/Order/SuccPred/Limit.lean

Proof steps:
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
⊢ PredOrder.limitRecOn (pred a) H_pred H_lim = H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
h : ¬IsPredLimit (pred a)
⊢ PredOrder.limitRecOn (pred a) H_pred H_lim = H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
tactic: have h := not_isPredLimit_pred_of_not_isMin ha
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
h : ¬IsPredLimit (pred a)
⊢ PredOrder.limitRecOn (pred a) H_pred H_lim = H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
h : ¬IsPredLimit (pred a)
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = pred a) ⋯;
    ⋯ ▸
      H_pred ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsPredLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = a) ⋯;
                  ⋯ ▸ H_pred ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
tactic: rw [PredOrder.limitRecOn, WellFounded.fix_eq, dif_neg h]
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
h : ¬IsPredLimit (pred a)
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = pred a) ⋯;
    ⋯ ▸
      H_pred ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsPredLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = a) ⋯;
                  ⋯ ▸ H_pred ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
h : ¬IsPredLimit (pred a)
this :
  ∀ {b c : α} {hb : ¬IsMin b} {hc : ¬IsMin c} {x : (a : α) → C a} (h : b = c), ⋯ ▸ H_pred b hb (x b) = H_pred c hc (x c)
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = pred a) ⋯;
    ⋯ ▸
      H_pred ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsPredLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = a) ⋯;
                  ⋯ ▸ H_pred ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
tactic: have {b c hb hc} {x : ∀ a, C a} (h : b = c) :
    congr_arg pred h ▸ H_pred b hb (x b) = H_pred c hc (x c) := by subst h; rfl
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
h : ¬IsPredLimit (pred a)
this :
  ∀ {b c : α} {hb : ¬IsMin b} {hc : ¬IsMin c} {x : (a : α) → C a} (h : b = c), ⋯ ▸ H_pred b hb (x b) = H_pred c hc (x c)
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = pred a) ⋯;
    ⋯ ▸
      H_pred ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsPredLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = a) ⋯;
                  ⋯ ▸ H_pred ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
h : ¬IsPredLimit (pred a)
this :
  ∀ {b c : α} {hb : ¬IsMin b} {hc : ¬IsMin c} {x : (a : α) → C a} (h : b = c), ⋯ ▸ H_pred b hb (x b) = H_pred c hc (x c)
x : { x // ¬IsMin x ∧ pred x = pred a } := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = pred a) ⋯
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = pred a) ⋯;
    ⋯ ▸
      H_pred ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsPredLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = a) ⋯;
                  ⋯ ▸ H_pred ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
tactic: let x := Classical.indefiniteDescription _ (not_isPredLimit_iff.mp h)
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : ¬IsMin a
h : ¬IsPredLimit (pred a)
this :
  ∀ {b c : α} {hb : ¬IsMin b} {hc : ¬IsMin c} {x : (a : α) → C a} (h : b = c), ⋯ ▸ H_pred b hb (x b) = H_pred c hc (x c)
x : { x // ¬IsMin x ∧ pred x = pred a } := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = pred a) ⋯
⊢ (let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = pred a) ⋯;
    ⋯ ▸
      H_pred ↑x ⋯
        ((fun y x =>
            ⋯.fix
              (fun a IH =>
                if h : IsPredLimit a then H_lim a h IH
                else
                  let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = a) ⋯;
                  ⋯ ▸ H_pred ↑x ⋯ (IH ↑x ⋯))
              y)
          ↑x ⋯)) =
    H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)
state_after: no goals
tactic: exact this ((pred_eq_pred_iff_of_not_isMin x.2.1 ha).mp x.2.2)