l3lab/ntp-mathlib huggingface dataset:
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
u : Set α
hmeas : MeasurableSet u
hu₁ : ∀ t ⊆ u, ↑s t = 0
hu₂ : ∀ t ⊆ uᶜ, ↑μ t = 0
i : Set α
hi₁ : MeasurableSet i
hi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i
hi₃ : VectorMeasure.restrict s iᶜ ≤ VectorMeasure.restrict 0 iᶜ
hpos : (toJordanDecomposition s).posPart = toMeasureOfZeroLE s i hi₁ hi₂
hneg : (toJordanDecomposition s).negPart = toMeasureOfLEZero s iᶜ (_ : MeasurableSet iᶜ) hi₃
⊢ totalVariation s ⟂ₘ VectorMeasure.ennrealToMeasure μ

Next tactic:
refine' ⟨u, hmeas, _, _⟩
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    refine' ⟨u, hmeas, _, _⟩
    · 

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
u : Set α
hmeas : MeasurableSet u
hu₁ : ∀ t ⊆ u, ↑s t = 0
hu₂ : ∀ t ⊆ uᶜ, ↑μ t = 0
i : Set α
hi₁ : MeasurableSet i
hi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i
hi₃ : VectorMeasure.restrict s iᶜ ≤ VectorMeasure.restrict 0 iᶜ
hpos : (toJordanDecomposition s).posPart = toMeasureOfZeroLE s i hi₁ hi₂
hneg : (toJordanDecomposition s).negPart = toMeasureOfLEZero s iᶜ (_ : MeasurableSet iᶜ) hi₃
⊢ ↑↑(totalVariation s) u = 0

Next tactic:
rw [totalVariation, Measure.add_apply, hpos, hneg, toMeasureOfZeroLE_apply _ _ _ hmeas,
        toMeasureOfLEZero_apply _ _ _ hmeas]
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    refine' ⟨u, hmeas, _, _⟩
    · rw [totalVariation, Measure.add_apply, hpos, hneg, toMeasureOfZeroLE_apply _ _ _ hmeas,
        toMeasureOfLEZero_apply _ _ _ hmeas]
      -- Porting note: added `← NNReal.eq_iff`
      

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
u : Set α
hmeas : MeasurableSet u
hu₁ : ∀ t ⊆ u, ↑s t = 0
hu₂ : ∀ t ⊆ uᶜ, ↑μ t = 0
i : Set α
hi₁ : MeasurableSet i
hi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i
hi₃ : VectorMeasure.restrict s iᶜ ≤ VectorMeasure.restrict 0 iᶜ
hpos : (toJordanDecomposition s).posPart = toMeasureOfZeroLE s i hi₁ hi₂
hneg : (toJordanDecomposition s).negPart = toMeasureOfLEZero s iᶜ (_ : MeasurableSet iᶜ) hi₃
⊢ ↑{ val := ↑s (i ∩ u), property := (_ : 0 ≤ ↑s (i ∩ u)) } +
      ↑{ val := -↑s (iᶜ ∩ u), property := (_ : 0 ≤ -↑s (iᶜ ∩ u)) } =
    0

Next tactic:
simp [hu₁ _ (Set.inter_subset_right _ _), ← NNReal.eq_iff]
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    refine' ⟨u, hmeas, _, _⟩
    · rw [totalVariation, Measure.add_apply, hpos, hneg, toMeasureOfZeroLE_apply _ _ _ hmeas,
        toMeasureOfLEZero_apply _ _ _ hmeas]
      -- Porting note: added `← NNReal.eq_iff`
      simp [hu₁ _ (Set.inter_subset_right _ _), ← NNReal.eq_iff]
    · 

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
u : Set α
hmeas : MeasurableSet u
hu₁ : ∀ t ⊆ u, ↑s t = 0
hu₂ : ∀ t ⊆ uᶜ, ↑μ t = 0
i : Set α
hi₁ : MeasurableSet i
hi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i
hi₃ : VectorMeasure.restrict s iᶜ ≤ VectorMeasure.restrict 0 iᶜ
hpos : (toJordanDecomposition s).posPart = toMeasureOfZeroLE s i hi₁ hi₂
hneg : (toJordanDecomposition s).negPart = toMeasureOfLEZero s iᶜ (_ : MeasurableSet iᶜ) hi₃
⊢ ↑↑(VectorMeasure.ennrealToMeasure μ) uᶜ = 0

Next tactic:
rw [VectorMeasure.ennrealToMeasure_apply hmeas.compl]
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    refine' ⟨u, hmeas, _, _⟩
    · rw [totalVariation, Measure.add_apply, hpos, hneg, toMeasureOfZeroLE_apply _ _ _ hmeas,
        toMeasureOfLEZero_apply _ _ _ hmeas]
      -- Porting note: added `← NNReal.eq_iff`
      simp [hu₁ _ (Set.inter_subset_right _ _), ← NNReal.eq_iff]
    · rw [VectorMeasure.ennrealToMeasure_apply hmeas.compl]
      

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
u : Set α
hmeas : MeasurableSet u
hu₁ : ∀ t ⊆ u, ↑s t = 0
hu₂ : ∀ t ⊆ uᶜ, ↑μ t = 0
i : Set α
hi₁ : MeasurableSet i
hi₂ : VectorMeasure.restrict 0 i ≤ VectorMeasure.restrict s i
hi₃ : VectorMeasure.restrict s iᶜ ≤ VectorMeasure.restrict 0 iᶜ
hpos : (toJordanDecomposition s).posPart = toMeasureOfZeroLE s i hi₁ hi₂
hneg : (toJordanDecomposition s).negPart = toMeasureOfLEZero s iᶜ (_ : MeasurableSet iᶜ) hi₃
⊢ ↑μ uᶜ = 0

Next tactic:
exact hu₂ _ (Set.Subset.refl _)
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    refine' ⟨u, hmeas, _, _⟩
    · rw [totalVariation, Measure.add_apply, hpos, hneg, toMeasureOfZeroLE_apply _ _ _ hmeas,
        toMeasureOfLEZero_apply _ _ _ hmeas]
      -- Porting note: added `← NNReal.eq_iff`
      simp [hu₁ _ (Set.inter_subset_right _ _), ← NNReal.eq_iff]
    · rw [VectorMeasure.ennrealToMeasure_apply hmeas.compl]
      exact hu₂ _ (Set.Subset.refl _)
  · 

Proof state:
case mpr
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
⊢ totalVariation s ⟂ₘ VectorMeasure.ennrealToMeasure μ → s ⟂ᵥ μ

Next tactic:
rintro ⟨u, hmeas, hu₁, hu₂⟩
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    refine' ⟨u, hmeas, _, _⟩
    · rw [totalVariation, Measure.add_apply, hpos, hneg, toMeasureOfZeroLE_apply _ _ _ hmeas,
        toMeasureOfLEZero_apply _ _ _ hmeas]
      -- Porting note: added `← NNReal.eq_iff`
      simp [hu₁ _ (Set.inter_subset_right _ _), ← NNReal.eq_iff]
    · rw [VectorMeasure.ennrealToMeasure_apply hmeas.compl]
      exact hu₂ _ (Set.Subset.refl _)
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    

Proof state:
case mpr.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
u : Set α
hmeas : MeasurableSet u
hu₁ : ↑↑(totalVariation s) u = 0
hu₂ : ↑↑(VectorMeasure.ennrealToMeasure μ) uᶜ = 0
⊢ s ⟂ᵥ μ

Next tactic:
refine'
      VectorMeasure.MutuallySingular.mk u hmeas
        (fun t htu _ => null_of_totalVariation_zero _ (measure_mono_null htu hu₁)) fun t htv hmt =>
        _
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    refine' ⟨u, hmeas, _, _⟩
    · rw [totalVariation, Measure.add_apply, hpos, hneg, toMeasureOfZeroLE_apply _ _ _ hmeas,
        toMeasureOfLEZero_apply _ _ _ hmeas]
      -- Porting note: added `← NNReal.eq_iff`
      simp [hu₁ _ (Set.inter_subset_right _ _), ← NNReal.eq_iff]
    · rw [VectorMeasure.ennrealToMeasure_apply hmeas.compl]
      exact hu₂ _ (Set.Subset.refl _)
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    refine'
      VectorMeasure.MutuallySingular.mk u hmeas
        (fun t htu _ => null_of_totalVariation_zero _ (measure_mono_null htu hu₁)) fun t htv hmt =>
        _
    

Proof state:
case mpr.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
u : Set α
hmeas : MeasurableSet u
hu₁ : ↑↑(totalVariation s) u = 0
hu₂ : ↑↑(VectorMeasure.ennrealToMeasure μ) uᶜ = 0
t : Set α
htv : t ⊆ uᶜ
hmt : MeasurableSet t
⊢ ↑μ t = 0

Next tactic:
rw [← VectorMeasure.ennrealToMeasure_apply hmt]
theorem mutuallySingular_ennreal_iff (s : SignedMeasure α) (μ : VectorMeasure α ℝ≥0∞) :
    s ⟂ᵥ μ ↔ s.totalVariation ⟂ₘ μ.ennrealToMeasure := by
  constructor
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    obtain ⟨i, hi₁, hi₂, hi₃, hpos, hneg⟩ := s.toJordanDecomposition_spec
    refine' ⟨u, hmeas, _, _⟩
    · rw [totalVariation, Measure.add_apply, hpos, hneg, toMeasureOfZeroLE_apply _ _ _ hmeas,
        toMeasureOfLEZero_apply _ _ _ hmeas]
      -- Porting note: added `← NNReal.eq_iff`
      simp [hu₁ _ (Set.inter_subset_right _ _), ← NNReal.eq_iff]
    · rw [VectorMeasure.ennrealToMeasure_apply hmeas.compl]
      exact hu₂ _ (Set.Subset.refl _)
  · rintro ⟨u, hmeas, hu₁, hu₂⟩
    refine'
      VectorMeasure.MutuallySingular.mk u hmeas
        (fun t htu _ => null_of_totalVariation_zero _ (measure_mono_null htu hu₁)) fun t htv hmt =>
        _
    rw [← VectorMeasure.ennrealToMeasure_apply hmt]
    

Proof state:
case mpr.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
s : SignedMeasure α
μ : VectorMeasure α ℝ≥0∞
u : Set α
hmeas : MeasurableSet u
hu₁ : ↑↑(totalVariation s) u = 0
hu₂ : ↑↑(VectorMeasure.ennrealToMeasure μ) uᶜ = 0
t : Set α
htv : t ⊆ uᶜ
hmt : MeasurableSet t
⊢ ↑↑(VectorMeasure.ennrealToMeasure μ) t = 0

Next tactic:
exact measure_mono_null htv hu₂
theorem corecF_eq {α : TypeVec n} {β : Type u} (g : β → F (α.append1 β)) (x : β) :
    M.dest q.P (corecF g x) = appendFun id (corecF g) <$$> repr (g x) := by
  

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g : β → F (α ::: β)
x : β
⊢ M.dest (P F) (corecF g x) = (TypeVec.id ::: corecF g) <$$> repr (g x)

Next tactic:
rw [corecF, M.dest_corec]
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
⊢ ∀ (a b : M (P F) α), Mcongr a b → (fun x => Quot.mk Mcongr (g <$$> x)) a = (fun x => Quot.mk Mcongr (g <$$> x)) b

Next tactic:
rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; 

Proof state:
case intro.intro
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂ : r aa₁ aa₂
⊢ (fun x => Quot.mk Mcongr (g <$$> x)) aa₁ = (fun x => Quot.mk Mcongr (g <$$> x)) aa₂

Next tactic:
apply Quot.sound
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      

Proof state:
case intro.intro.a
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂ : r aa₁ aa₂
⊢ Mcongr (g <$$> aa₁) (g <$$> aa₂)

Next tactic:
let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      

Proof state:
case intro.intro.a
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
⊢ Mcongr (g <$$> aa₁) (g <$$> aa₂)

Next tactic:
use r'
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; 

Proof state:
case h
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
⊢ IsPrecongr r' ∧ r' (g <$$> aa₁) (g <$$> aa₂)

Next tactic:
constructor
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · 

Proof state:
case h.left
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
⊢ IsPrecongr r'

Next tactic:
show IsPrecongr r'
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · show IsPrecongr r'
        

Proof state:
case h.left
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
⊢ IsPrecongr r'

Next tactic:
rintro b₁ b₂ ⟨a₁, a₂, ra₁a₂, b₁eq, b₂eq⟩
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · show IsPrecongr r'
        rintro b₁ b₂ ⟨a₁, a₂, ra₁a₂, b₁eq, b₂eq⟩
        

Proof state:
case h.left.intro.intro.intro.intro
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂✝ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
b₁ b₂ : M (P F) β
a₁ a₂ : M (P F) α
ra₁a₂ : r a₁ a₂
b₁eq : b₁ = g <$$> a₁
b₂eq : b₂ = g <$$> a₂
⊢ abs ((TypeVec.id ::: Quot.mk r') <$$> M.dest (P F) b₁) = abs ((TypeVec.id ::: Quot.mk r') <$$> M.dest (P F) b₂)

Next tactic:
let u : Quot r → Quot r' :=
          Quot.lift (fun x : q.P.M α => Quot.mk r' (g <$$> x))
            (by
              intro a₁ a₂ ra₁a₂
              apply Quot.sound
              exact ⟨a₁, a₂, ra₁a₂, rfl, rfl⟩)
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · show IsPrecongr r'
        rintro b₁ b₂ ⟨a₁, a₂, ra₁a₂, b₁eq, b₂eq⟩
        let u : Quot r → Quot r' :=
          Quot.lift (fun x : q.P.M α => Quot.mk r' (g <$$> x))
            (by
              

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂✝ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
b₁ b₂ : M (P F) β
a₁ a₂ : M (P F) α
ra₁a₂ : r a₁ a₂
b₁eq : b₁ = g <$$> a₁
b₂eq : b₂ = g <$$> a₂
⊢ ∀ (a b : M (P F) α), r a b → (fun x => Quot.mk r' (g <$$> x)) a = (fun x => Quot.mk r' (g <$$> x)) b

Next tactic:
intro a₁ a₂ ra₁a₂
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · show IsPrecongr r'
        rintro b₁ b₂ ⟨a₁, a₂, ra₁a₂, b₁eq, b₂eq⟩
        let u : Quot r → Quot r' :=
          Quot.lift (fun x : q.P.M α => Quot.mk r' (g <$$> x))
            (by
              intro a₁ a₂ ra₁a₂
              

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂✝¹ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
b₁ b₂ : M (P F) β
a₁✝ a₂✝ : M (P F) α
ra₁a₂✝ : r a₁✝ a₂✝
b₁eq : b₁ = g <$$> a₁✝
b₂eq : b₂ = g <$$> a₂✝
a₁ a₂ : M (P F) α
ra₁a₂ : r a₁ a₂
⊢ (fun x => Quot.mk r' (g <$$> x)) a₁ = (fun x => Quot.mk r' (g <$$> x)) a₂

Next tactic:
apply Quot.sound
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · show IsPrecongr r'
        rintro b₁ b₂ ⟨a₁, a₂, ra₁a₂, b₁eq, b₂eq⟩
        let u : Quot r → Quot r' :=
          Quot.lift (fun x : q.P.M α => Quot.mk r' (g <$$> x))
            (by
              intro a₁ a₂ ra₁a₂
              apply Quot.sound
              

Proof state:
case a
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂✝¹ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
b₁ b₂ : M (P F) β
a₁✝ a₂✝ : M (P F) α
ra₁a₂✝ : r a₁✝ a₂✝
b₁eq : b₁ = g <$$> a₁✝
b₂eq : b₂ = g <$$> a₂✝
a₁ a₂ : M (P F) α
ra₁a₂ : r a₁ a₂
⊢ r' (g <$$> a₁) (g <$$> a₂)

Next tactic:
exact ⟨a₁, a₂, ra₁a₂, rfl, rfl⟩
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · show IsPrecongr r'
        rintro b₁ b₂ ⟨a₁, a₂, ra₁a₂, b₁eq, b₂eq⟩
        let u : Quot r → Quot r' :=
          Quot.lift (fun x : q.P.M α => Quot.mk r' (g <$$> x))
            (by
              intro a₁ a₂ ra₁a₂
              apply Quot.sound
              exact ⟨a₁, a₂, ra₁a₂, rfl, rfl⟩)
        

Proof state:
case h.left.intro.intro.intro.intro
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂✝ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
b₁ b₂ : M (P F) β
a₁ a₂ : M (P F) α
ra₁a₂ : r a₁ a₂
b₁eq : b₁ = g <$$> a₁
b₂eq : b₂ = g <$$> a₂
u : Quot r → Quot r' :=
  Quot.lift (fun x => Quot.mk r' (g <$$> x))
    (_ : ∀ (a₁ a₂ : M (P F) α), r a₁ a₂ → Quot.mk r' (g <$$> a₁) = Quot.mk r' (g <$$> a₂))
⊢ abs ((TypeVec.id ::: Quot.mk r') <$$> M.dest (P F) b₁) = abs ((TypeVec.id ::: Quot.mk r') <$$> M.dest (P F) b₂)

Next tactic:
have hu : (Quot.mk r' ∘ fun x : q.P.M α => g <$$> x) = u ∘ Quot.mk r := by
          ext x
          rfl
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · show IsPrecongr r'
        rintro b₁ b₂ ⟨a₁, a₂, ra₁a₂, b₁eq, b₂eq⟩
        let u : Quot r → Quot r' :=
          Quot.lift (fun x : q.P.M α => Quot.mk r' (g <$$> x))
            (by
              intro a₁ a₂ ra₁a₂
              apply Quot.sound
              exact ⟨a₁, a₂, ra₁a₂, rfl, rfl⟩)
        have hu : (Quot.mk r' ∘ fun x : q.P.M α => g <$$> x) = u ∘ Quot.mk r := by
          

Proof state:
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂✝ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
b₁ b₂ : M (P F) β
a₁ a₂ : M (P F) α
ra₁a₂ : r a₁ a₂
b₁eq : b₁ = g <$$> a₁
b₂eq : b₂ = g <$$> a₂
u : Quot r → Quot r' :=
  Quot.lift (fun x => Quot.mk r' (g <$$> x))
    (_ : ∀ (a₁ a₂ : M (P F) α), r a₁ a₂ → Quot.mk r' (g <$$> a₁) = Quot.mk r' (g <$$> a₂))
⊢ (Quot.mk r' ∘ fun x => g <$$> x) = u ∘ Quot.mk r

Next tactic:
ext x
/-- the map function for the functor `Cofix F` -/
def Cofix.map {α β : TypeVec n} (g : α ⟹ β) : Cofix F α → Cofix F β :=
  Quot.lift (fun x : q.P.M α => Quot.mk Mcongr (g <$$> x))
    (by
      rintro aa₁ aa₂ ⟨r, pr, ra₁a₂⟩; apply Quot.sound
      let r' b₁ b₂ := ∃ a₁ a₂ : q.P.M α, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
      use r'; constructor
      · show IsPrecongr r'
        rintro b₁ b₂ ⟨a₁, a₂, ra₁a₂, b₁eq, b₂eq⟩
        let u : Quot r → Quot r' :=
          Quot.lift (fun x : q.P.M α => Quot.mk r' (g <$$> x))
            (by
              intro a₁ a₂ ra₁a₂
              apply Quot.sound
              exact ⟨a₁, a₂, ra₁a₂, rfl, rfl⟩)
        have hu : (Quot.mk r' ∘ fun x : q.P.M α => g <$$> x) = u ∘ Quot.mk r := by
          ext x
          

Proof state:
case h
n : ℕ
F : TypeVec.{u} (n + 1) → Type u
mvf : MvFunctor F
q : MvQPF F
α β : TypeVec.{u} n
g : α ⟹ β
aa₁ aa₂ : M (P F) α
r : M (P F) α → M (P F) α → Prop
pr : IsPrecongr r
ra₁a₂✝ : r aa₁ aa₂
r' : M (P F) β → M (P F) β → Prop := fun b₁ b₂ => ∃ a₁ a₂, r a₁ a₂ ∧ b₁ = g <$$> a₁ ∧ b₂ = g <$$> a₂
b₁ b₂ : M (P F) β
a₁ a₂ : M (P F) α
ra₁a₂ : r a₁ a₂
b₁eq : b₁ = g <$$> a₁
b₂eq : b₂ = g <$$> a₂
u : Quot r → Quot r' :=
  Quot.lift (fun x => Quot.mk r' (g <$$> x))
    (_ : ∀ (a₁ a₂ : M (P F) α), r a₁ a₂ → Quot.mk r' (g <$$> a₁) = Quot.mk r' (g <$$> a₂))
x : M (P F) α
⊢ (Quot.mk r' ∘ fun x => g <$$> x) x = (u ∘ Quot.mk r) x

Next tactic:
rfl