Theorem: MvQPF.Fix.ind
File: Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean

tactic: apply Quot.ind
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
⊢ ∀ (x : Fix F α), p x

tactic: intro x
state_before: case mk
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
⊢ ∀ (a : MvPFunctor.W (P F) α), p (Quot.mk Setoid.r a)

tactic: apply q.P.w_ind _ x
state_before: case mk
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
⊢ p (Quot.mk Setoid.r x)

tactic: intro a f' f ih
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
⊢ ∀ (a : (P F).A) (f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α)
    (f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α),
    (∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))) →
      p (Quot.mk Setoid.r (MvPFunctor.wMk (P F) a f' f))

tactic: change p ⟦q.P.wMk a f' f⟧
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
⊢ p (Quot.mk Setoid.r (MvPFunctor.wMk (P F) a f' f))

tactic: rw [← Fix.ind_aux a f' f]
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
⊢ p (Quotient.mk (wSetoid α) (MvPFunctor.wMk (P F) a f' f))

tactic: apply h
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
⊢ p (mk (abs { fst := a, snd := MvPFunctor.appendContents (P F) f' fun x => Quotient.mk (wSetoid α) (f x) }))

tactic: rw [MvQPF.liftP_iff]
state_before: case a
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
⊢ LiftP (PredLast α p)
    (abs { fst := a, snd := MvPFunctor.appendContents (P F) f' fun x => Quotient.mk (wSetoid α) (f x) })

tactic: refine' ⟨_, _, rfl, _⟩
state_before: case a
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
⊢ ∃ a_1 f_1,
    abs { fst := a, snd := MvPFunctor.appendContents (P F) f' fun x => Quotient.mk (wSetoid α) (f x) } =
        abs { fst := a_1, snd := f_1 } ∧
      ∀ (i : Fin2 (n + 1)) (j : MvPFunctor.B (P F) a_1 i), PredLast α p (f_1 i j)

tactic: intro i j
state_before: case a
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
⊢ ∀ (i : Fin2 (n + 1)) (j : MvPFunctor.B (P F) a i),
    PredLast α p (MvPFunctor.appendContents (P F) f' (fun x => Quotient.mk (wSetoid α) (f x)) i j)

tactic: cases i
state_before: case a
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
i : Fin2 (n + 1)
j : MvPFunctor.B (P F) a i
⊢ PredLast α p (MvPFunctor.appendContents (P F) f' (fun x => Quotient.mk (wSetoid α) (f x)) i j)

tactic: apply ih
state_before: case a.fz
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
j : MvPFunctor.B (P F) a Fin2.fz
⊢ PredLast α p (MvPFunctor.appendContents (P F) f' (fun x => Quotient.mk (wSetoid α) (f x)) Fin2.fz j)

tactic: trivial
state_before: case a.fs
n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α✝ α : TypeVec n
p : Fix F α → Prop
h : ∀ (x : F (α ::: Fix F α)), LiftP (PredLast α p) x → p (mk x)
x : MvPFunctor.W (P F) α
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
ih : ∀ (i : PFunctor.B (MvPFunctor.last (P F)) a), p (Quot.mk Setoid.r (f i))
a✝ : Fin2 (Nat.add n 0)
j : MvPFunctor.B (P F) a (Fin2.fs a✝)
⊢ PredLast α p (MvPFunctor.appendContents (P F) f' (fun x => Quotient.mk (wSetoid α) (f x)) (Fin2.fs a✝) j)