Theorem: PFun.fixInduction_spec
File: Mathlib/Data/PFun.lean

tactic: unfold fixInduction
state_before: α : Type u_2
β : Type u_3
γ : Type ?u.31479
δ : Type ?u.31482
ε : Type ?u.31485
ι : Type ?u.31488
C : α → Sort u_1
f : α →. β ⊕ α
b : β
a : α
h : b ∈ fix f a
H : (a' : α) → b ∈ fix f a' → ((a'' : α) → Sum.inr a'' ∈ f a' → C a'') → C a'
⊢ fixInduction h H = H a h fun a' h' => fixInduction (_ : b ∈ fix f a') H

tactic: generalize (Part.mem_assert_iff.1 h).fst = ha
state_before: α : Type u_2
β : Type u_3
γ : Type ?u.31479
δ : Type ?u.31482
ε : Type ?u.31485
ι : Type ?u.31488
C : α → Sort u_1
f : α →. β ⊕ α
b : β
a : α
h : b ∈ fix f a
H : (a' : α) → b ∈ fix f a' → ((a'' : α) → Sum.inr a'' ∈ f a' → C a'') → C a'
⊢ (let_fun h₂ :=
      (_ :
        b ∈
          WellFounded.fixF
            (fun a IH =>
              Part.assert (f a).Dom fun hf =>
                match e : Part.get (f a) hf with
                | Sum.inl b => Part.some b
                | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
            a (_ : Acc (fun x y => Sum.inr x ∈ f y) a));
    Acc.rec (motive := fun {a} h₁ =>
      b ∈
          WellFounded.fixF
            (fun a IH =>
              Part.assert (f a).Dom fun hf =>
                match e : Part.get (f a) hf with
                | Sum.inl b => Part.some b
                | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
            a h₁ →
        C a)
      (fun a ha IH h₂ =>
        let_fun h :=
          (_ :
            b ∈
              Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
                WellFounded.fixF
                  (fun a IH =>
                    Part.assert (f a).Dom fun hf =>
                      match e : Part.get (f a) hf with
                      | Sum.inl b => Part.some b
                      | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                  a h);
        H a h fun a' fa' =>
          IH a' fa'
            (_ :
              b ∈
                WellFounded.fixF
                  (fun a IH =>
                    Part.assert (f a).Dom fun hf =>
                      match e : Part.get (f a) hf with
                      | Sum.inl b => Part.some b
                      | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                  a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a')))
      (_ : Acc (fun x y => Sum.inr x ∈ f y) a) h₂) =
    H a h fun a' h' =>
      let_fun h₂ :=
        (_ :
          b ∈
            WellFounded.fixF
              (fun a IH =>
                Part.assert (f a).Dom fun hf =>
                  match e : Part.get (f a) hf with
                  | Sum.inl b => Part.some b
                  | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
              a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a'));
      Acc.rec (motive := fun {a} h₁ =>
        b ∈
            WellFounded.fixF
              (fun a IH =>
                Part.assert (f a).Dom fun hf =>
                  match e : Part.get (f a) hf with
                  | Sum.inl b => Part.some b
                  | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
              a h₁ →
          (fun x => C x) a)
        (fun a ha IH h₂ =>
          let_fun h :=
            (_ :
              b ∈
                Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
                  WellFounded.fixF
                    (fun a IH =>
                      Part.assert (f a).Dom fun hf =>
                        match e : Part.get (f a) hf with
                        | Sum.inl b => Part.some b
                        | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                    a h);
          H a h fun a' fa' =>
            IH a' fa'
              (_ :
                b ∈
                  WellFounded.fixF
                    (fun a IH =>
                      Part.assert (f a).Dom fun hf =>
                        match e : Part.get (f a) hf with
                        | Sum.inl b => Part.some b
                        | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                    a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a')))
        (_ : Acc (fun x y => Sum.inr x ∈ f y) a') h₂

tactic: induction ha
state_before: α : Type u_2
β : Type u_3
γ : Type ?u.31479
δ : Type ?u.31482
ε : Type ?u.31485
ι : Type ?u.31488
C : α → Sort u_1
f : α →. β ⊕ α
b : β
a : α
h : b ∈ fix f a
H : (a' : α) → b ∈ fix f a' → ((a'' : α) → Sum.inr a'' ∈ f a' → C a'') → C a'
ha : Acc (fun x y => Sum.inr x ∈ f y) a
⊢ (let_fun h₂ :=
      (_ :
        b ∈
          WellFounded.fixF
            (fun a IH =>
              Part.assert (f a).Dom fun hf =>
                match e : Part.get (f a) hf with
                | Sum.inl b => Part.some b
                | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
            a (_ : Acc (fun x y => Sum.inr x ∈ f y) a));
    Acc.rec (motive := fun {a} h₁ =>
      b ∈
          WellFounded.fixF
            (fun a IH =>
              Part.assert (f a).Dom fun hf =>
                match e : Part.get (f a) hf with
                | Sum.inl b => Part.some b
                | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
            a h₁ →
        C a)
      (fun a ha IH h₂ =>
        let_fun h :=
          (_ :
            b ∈
              Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
                WellFounded.fixF
                  (fun a IH =>
                    Part.assert (f a).Dom fun hf =>
                      match e : Part.get (f a) hf with
                      | Sum.inl b => Part.some b
                      | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                  a h);
        H a h fun a' fa' =>
          IH a' fa'
            (_ :
              b ∈
                WellFounded.fixF
                  (fun a IH =>
                    Part.assert (f a).Dom fun hf =>
                      match e : Part.get (f a) hf with
                      | Sum.inl b => Part.some b
                      | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                  a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a')))
      ha h₂) =
    H a h fun a' h' =>
      let_fun h₂ :=
        (_ :
          b ∈
            WellFounded.fixF
              (fun a IH =>
                Part.assert (f a).Dom fun hf =>
                  match e : Part.get (f a) hf with
                  | Sum.inl b => Part.some b
                  | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
              a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a'));
      Acc.rec (motive := fun {a} h₁ =>
        b ∈
            WellFounded.fixF
              (fun a IH =>
                Part.assert (f a).Dom fun hf =>
                  match e : Part.get (f a) hf with
                  | Sum.inl b => Part.some b
                  | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
              a h₁ →
          (fun x => C x) a)
        (fun a ha IH h₂ =>
          let_fun h :=
            (_ :
              b ∈
                Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
                  WellFounded.fixF
                    (fun a IH =>
                      Part.assert (f a).Dom fun hf =>
                        match e : Part.get (f a) hf with
                        | Sum.inl b => Part.some b
                        | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                    a h);
          H a h fun a' fa' =>
            IH a' fa'
              (_ :
                b ∈
                  WellFounded.fixF
                    (fun a IH =>
                      Part.assert (f a).Dom fun hf =>
                        match e : Part.get (f a) hf with
                        | Sum.inl b => Part.some b
                        | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                    a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a')))
        (_ : Acc (fun x y => Sum.inr x ∈ f y) a') h₂

tactic: rfl
state_before: case intro
α : Type u_2
β : Type u_3
γ : Type ?u.31479
δ : Type ?u.31482
ε : Type ?u.31485
ι : Type ?u.31488
C : α → Sort u_1
f : α →. β ⊕ α
b : β
a : α
H : (a' : α) → b ∈ fix f a' → ((a'' : α) → Sum.inr a'' ∈ f a' → C a'') → C a'
x✝ : α
h✝ : ∀ (y : α), Sum.inr y ∈ f x✝ → Acc (fun x y => Sum.inr x ∈ f y) y
h_ih✝ :
  ∀ (y : α) (a : Sum.inr y ∈ f x✝) (h : b ∈ fix f y),
    (let_fun h₂ :=
        (_ :
          b ∈
            WellFounded.fixF
              (fun a IH =>
                Part.assert (f a).Dom fun hf =>
                  match e : Part.get (f a) hf with
                  | Sum.inl b => Part.some b
                  | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
              y (_ : Acc (fun x y => Sum.inr x ∈ f y) y));
      Acc.rec (motive := fun {a} h₁ =>
        b ∈
            WellFounded.fixF
              (fun a IH =>
                Part.assert (f a).Dom fun hf =>
                  match e : Part.get (f a) hf with
                  | Sum.inl b => Part.some b
                  | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
              a h₁ →
          C a)
        (fun a ha IH h₂ =>
          let_fun h :=
            (_ :
              b ∈
                Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
                  WellFounded.fixF
                    (fun a IH =>
                      Part.assert (f a).Dom fun hf =>
                        match e : Part.get (f a) hf with
                        | Sum.inl b => Part.some b
                        | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                    a h);
          H a h fun a' fa' =>
            IH a' fa'
              (_ :
                b ∈
                  WellFounded.fixF
                    (fun a IH =>
                      Part.assert (f a).Dom fun hf =>
                        match e : Part.get (f a) hf with
                        | Sum.inl b => Part.some b
                        | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                    a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a')))
        (_ : Acc ?m.32009 y) h₂) =
      H y h fun a' h' =>
        let_fun h₂ :=
          (_ :
            b ∈
              WellFounded.fixF
                (fun a IH =>
                  Part.assert (f a).Dom fun hf =>
                    match e : Part.get (f a) hf with
                    | Sum.inl b => Part.some b
                    | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a'));
        Acc.rec (motive := fun {a} h₁ =>
          b ∈
              WellFounded.fixF
                (fun a IH =>
                  Part.assert (f a).Dom fun hf =>
                    match e : Part.get (f a) hf with
                    | Sum.inl b => Part.some b
                    | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                a h₁ →
            (fun x => C x) a)
          (fun a ha IH h₂ =>
            let_fun h :=
              (_ :
                b ∈
                  Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
                    WellFounded.fixF
                      (fun a IH =>
                        Part.assert (f a).Dom fun hf =>
                          match e : Part.get (f a) hf with
                          | Sum.inl b => Part.some b
                          | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                      a h);
            H a h fun a' fa' =>
              IH a' fa'
                (_ :
                  b ∈
                    WellFounded.fixF
                      (fun a IH =>
                        Part.assert (f a).Dom fun hf =>
                          match e : Part.get (f a) hf with
                          | Sum.inl b => Part.some b
                          | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                      a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a')))
          (_ : Acc (fun x y => Sum.inr x ∈ f y) a') h₂
h : b ∈ fix f x✝
⊢ (let_fun h₂ :=
      (_ :
        b ∈
          WellFounded.fixF
            (fun a IH =>
              Part.assert (f a).Dom fun hf =>
                match e : Part.get (f a) hf with
                | Sum.inl b => Part.some b
                | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
            x✝ (_ : Acc (fun x y => Sum.inr x ∈ f y) x✝));
    Acc.rec (motive := fun {a} h₁ =>
      b ∈
          WellFounded.fixF
            (fun a IH =>
              Part.assert (f a).Dom fun hf =>
                match e : Part.get (f a) hf with
                | Sum.inl b => Part.some b
                | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
            a h₁ →
        C a)
      (fun a ha IH h₂ =>
        let_fun h :=
          (_ :
            b ∈
              Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
                WellFounded.fixF
                  (fun a IH =>
                    Part.assert (f a).Dom fun hf =>
                      match e : Part.get (f a) hf with
                      | Sum.inl b => Part.some b
                      | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                  a h);
        H a h fun a' fa' =>
          IH a' fa'
            (_ :
              b ∈
                WellFounded.fixF
                  (fun a IH =>
                    Part.assert (f a).Dom fun hf =>
                      match e : Part.get (f a) hf with
                      | Sum.inl b => Part.some b
                      | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                  a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a')))
      (_ : Acc (fun x y => Sum.inr x ∈ f y) x✝) h₂) =
    H x✝ h fun a' h' =>
      let_fun h₂ :=
        (_ :
          b ∈
            WellFounded.fixF
              (fun a IH =>
                Part.assert (f a).Dom fun hf =>
                  match e : Part.get (f a) hf with
                  | Sum.inl b => Part.some b
                  | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
              a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a'));
      Acc.rec (motive := fun {a} h₁ =>
        b ∈
            WellFounded.fixF
              (fun a IH =>
                Part.assert (f a).Dom fun hf =>
                  match e : Part.get (f a) hf with
                  | Sum.inl b => Part.some b
                  | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
              a h₁ →
          (fun x => C x) a)
        (fun a ha IH h₂ =>
          let_fun h :=
            (_ :
              b ∈
                Part.assert (Acc (fun x y => Sum.inr x ∈ f y) a) fun h =>
                  WellFounded.fixF
                    (fun a IH =>
                      Part.assert (f a).Dom fun hf =>
                        match e : Part.get (f a) hf with
                        | Sum.inl b => Part.some b
                        | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                    a h);
          H a h fun a' fa' =>
            IH a' fa'
              (_ :
                b ∈
                  WellFounded.fixF
                    (fun a IH =>
                      Part.assert (f a).Dom fun hf =>
                        match e : Part.get (f a) hf with
                        | Sum.inl b => Part.some b
                        | Sum.inr a' => IH a' (_ : ∃ h, Part.get (f a) h = Sum.inr a'))
                    a' (_ : Acc (fun x y => Sum.inr x ∈ f y) a')))
        (_ : Acc (fun x y => Sum.inr x ∈ f y) a') h₂