awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (goal)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
⊢ MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
    MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
have rw : MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
    (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r))
    (MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Cofix F α)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a))) =
  MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
    (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r))
    (MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Cofix F α)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b)))
Tactic: rw [appendFun_comp_id, comp_map, comp_map]
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (hypothesis)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
⊢ MvQPF.abs (F := F) (α := α ::: Quot r')
      (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (M.dest (P F) (α := α) a)) =
    MvQPF.abs (F := F) (α := α ::: Quot r')
      (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (M.dest (P F) (α := α) b))
have h₀ : MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
    (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
    (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
  MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
    (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
    (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
Tactic: have h₀ :
      appendFun id (Quot.mk r ∘ Quot.mk Mcongr) <$$> MvQPF.abs (M.dest q.P a) =
        appendFun id (Quot.mk r ∘ Quot.mk Mcongr) <$$> MvQPF.abs (M.dest q.P b) := by
      rw [appendFun_comp_id, comp_map, comp_map]; exact h _ _ r'ab
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (goal)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
h₀ :
  MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
    MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
u v : (P F).M α
cuv : Mcongr (F := F) (α := α) u v
⊢ Quot.mk r' u = Quot.mk r' v
have a₁ : r' u v
Tactic: apply Quot.sound
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (goal)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
h₀ :
  MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
    MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
u v : (P F).M α
cuv : Mcongr (F := F) (α := α) u v
⊢ r (Quot.mk (Mcongr (F := F) (α := α)) u) (Quot.mk (Mcongr (F := F) (α := α)) v)
have a₁ : r (Quot.mk (Mcongr (F := F) (α := α)) v) (Quot.mk (Mcongr (F := F) (α := α)) v)
Tactic: rw [Quot.sound cuv]
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (hypothesis)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
h₀ :
  MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
    MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
⊢ MvQPF.abs (F := F) (α := α ::: Quot r')
      (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (M.dest (P F) (α := α) a)) =
    MvQPF.abs (F := F) (α := α ::: Quot r')
      (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (M.dest (P F) (α := α) b))
have h₁ : ∀ (u v : (P F).M α), Mcongr (F := F) (α := α) u v → Quot.mk r' u = Quot.mk r' v
Tactic: have h₁ : ∀ u v : q.P.M α, Mcongr u v → Quot.mk r' u = Quot.mk r' v := by
      intro u v cuv
      apply Quot.sound
      dsimp [r', hr']
      rw [Quot.sound cuv]
      apply h'
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (goal)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
h₀ :
  MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
    MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
h₁ : ∀ (u v : (P F).M α), Mcongr (F := F) (α := α) u v → Quot.mk r' u = Quot.mk r' v
c : Cofix F α
⊢ ∀ (b : Cofix F α) (a : r c b),
    Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁ c =
      Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁ b
have apply : ∀ (a : (P F).M α) (b : Cofix F α),
  r (Quot.mk (Mcongr (F := F) (α := α)) a) b →
    Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁ (Quot.mk (Mcongr (F := F) (α := α)) a) =
      Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁ b
Tactic: apply Quot.inductionOn
            (motive := fun c =>
              ∀ b, r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b) c
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (goal)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
h₀ :
  MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
    MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
h₁ : ∀ (u v : (P F).M α), Mcongr (F := F) (α := α) u v → Quot.mk r' u = Quot.mk r' v
c : (P F).M α
d : Cofix F α
⊢ r (Quot.mk (Mcongr (F := F) (α := α)) c) d →
    Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁ (Quot.mk (Mcongr (F := F) (α := α)) c) =
      Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁ d
have apply : ∀ (a : (P F).M α),
  r (Quot.mk (Mcongr (F := F) (α := α)) c) (Quot.mk (Mcongr (F := F) (α := α)) a) →
    Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁ (Quot.mk (Mcongr (F := F) (α := α)) c) =
      Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁ (Quot.mk (Mcongr (F := F) (α := α)) a)
Tactic: apply Quot.inductionOn
            (motive := fun d => r (Quot.mk Mcongr c) d →
              Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ d) d
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (hypothesis)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
h₀ :
  MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
    MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
h₁ : ∀ (u v : (P F).M α), Mcongr (F := F) (α := α) u v → Quot.mk r' u = Quot.mk r' v
f : Quot r → Quot r' := Quot.lift (r := r) (Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁) ⋯
⊢ MvQPF.abs (F := F) (α := α ::: Quot r')
      (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (M.dest (P F) (α := α) a)) =
    MvQPF.abs (F := F) (α := α ::: Quot r')
      (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (M.dest (P F) (α := α) b))
have this : f ∘ Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α)) = Quot.mk r'
Tactic: have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (goal)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
a b : (P F).M α
r'ab : r' a b
h₀ :
  MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) a)) =
    MvFunctor.map (F := F) (α := α ::: (P F).M α) (β := α ::: Quot r)
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (MvQPF.abs (F := F) (α := α ::: (P F).M α) (M.dest (P F) (α := α) b))
h₁ : ∀ (u v : (P F).M α), Mcongr (F := F) (α := α) u v → Quot.mk r' u = Quot.mk r' v
f : Quot r → Quot r' := Quot.lift (r := r) (Quot.lift (r := Mcongr (F := F) (α := α)) (Quot.mk r') h₁) ⋯
this : f ∘ Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α)) = Quot.mk r'
⊢ MvQPF.abs (F := F) (α := α ::: Quot r')
      (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (M.dest (P F) (α := α) a)) =
    MvQPF.abs (F := F) (α := α ::: Quot r')
      (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (M.dest (P F) (α := α) b))
have rw : MvQPF.abs (F := F) (α := α ::: Quot r')
    (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (f ∘ Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (M.dest (P F) (α := α) a)) =
  MvQPF.abs (F := F) (α := α ::: Quot r')
    (MvFunctor.map (F := (↑(P F) : (α : TypeVec.{u} (n + 1)) → Type u)) (α := α ::: (P F).M α) (β := α ::: Quot r')
      (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (f ∘ Quot.mk r ∘ Quot.mk (Mcongr (F := F) (α := α))))
      (M.dest (P F) (α := α) b))
Tactic: rw [← this, appendFun_comp_id, q.P.comp_map, q.P.comp_map, abs_map, abs_map, abs_map, abs_map,
      h₀]
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (hypothesis)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h' : ∀ (x : Cofix F α), r x x
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
x y : (P F).M α
rxy : r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
r' : (x y : (P F).M α) → Prop :=
  fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
hr' : r' = fun (x y : (P F).M α) ↦ r (Quot.mk (Mcongr (F := F) (α := α)) x) (Quot.mk (Mcongr (F := F) (α := α)) y)
⊢ Mcongr (F := F) (α := α) x y
have this : IsPrecongr (F := F) (α := α) r'
Tactic: have : IsPrecongr r' := by
    intro a b r'ab
    have h₀ :
      appendFun id (Quot.mk r ∘ Quot.mk Mcongr) <$$> MvQPF.abs (M.dest q.P a) =
        appendFun id (Quot.mk r ∘ Quot.mk Mcongr) <$$> MvQPF.abs (M.dest q.P b) := by
      rw [appendFun_comp_id, comp_map, comp_map]; exact h _ _ r'ab
    have h₁ : ∀ u v : q.P.M α, Mcongr u v → Quot.mk r' u = Quot.mk r' v := by
      intro u v cuv
      apply Quot.sound
      dsimp [r', hr']
      rw [Quot.sound cuv]
      apply h'
    let f : Quot r → Quot r' :=
      Quot.lift (Quot.lift (Quot.mk r') h₁)
        (by
          intro c
          apply Quot.inductionOn
            (motive := fun c =>
              ∀ b, r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b) c
          clear c
          intro c d
          apply Quot.inductionOn
            (motive := fun d => r (Quot.mk Mcongr c) d →
              Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ d) d
          clear d
          intro d rcd; apply Quot.sound; apply rcd)
    have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl
    rw [← this, appendFun_comp_id, q.P.comp_map, q.P.comp_map, abs_map, abs_map, abs_map, abs_map,
      h₀]
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (goal)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
r' : (x y : Cofix F α) → Prop := fun (x y : Cofix F α) ↦ x = y ∨ r x y
x y : Cofix F α
rxy : r x y
⊢ x = y
have h' : ∀ (x : Cofix F α), r' x x
Tactic: apply Cofix.bisim_aux r'
-- Lean 4 proof step from Mathlib.Data.QPF.Multivariate.Constructions.Cofix (goal)
Goal:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
r : Cofix F α → Cofix F α → Prop
h :
  ∀ (x y : Cofix F α),
    r x y →
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (x.dest (F := F) (α := α)) =
        MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r)
          (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r)) (y.dest (F := F) (α := α))
r' : (x y : Cofix F α) → Prop := fun (x y : Cofix F α) ↦ x = y ∨ r x y
x y : Cofix F α
rxy : r x y
h' : ∀ (x : Cofix F α), r' x x
⊢ x = y
have h₁ : ∀ (x y : Cofix F α),
  r' x y →
    MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (x.dest (F := F) (α := α)) =
      MvFunctor.map (F := F) (α := α ::: Cofix F α) (β := α ::: Quot r')
        (appendFun (α := α) (α' := α) (TypeVec.id (α := α)) (Quot.mk r')) (y.dest (F := F) (α := α))
Tactic: apply Cofix.bisim_aux r'