-- Mathlib/CategoryTheory/Limits/FilteredColimitCommutesProduct.lean
theorem Types.isIso_colimitPointwiseProductToProductColimit (F : ∀ i, I i ⥤ Type u) :
    IsIso (colimitPointwiseProductToProductColimit F)

Proof state:
α : Type u
I : α → Type u
inst✝¹ : (i : α) → SmallCategory (I i)
inst✝ : ∀ (i : α), IsFiltered (I i)
F : (i : α) → I i ⥤ Type u
ky : (i : α) → I i
yk₀ : (pointwiseProduct F).obj ky
ky' : (i : α) → I i
yk₀' : (pointwiseProduct F).obj ky'
k : (i : α) → I i := IsFiltered.max ky ky'
yk : ∏ᶜ fun s => (F s).obj (k s) := (pointwiseProduct F).map (IsFiltered.leftToMax ky ky') yk₀
yk' : ∏ᶜ fun s => (F s).obj (k s) := (pointwiseProduct F).map (IsFiltered.rightToMax ky ky') yk₀'
hyk₀ : colimit.ι (pointwiseProduct F) ky yk₀ = colimit.ι (pointwiseProduct F) k yk
hyk₀' : colimit.ι (pointwiseProduct F) ky' yk₀' = colimit.ι (pointwiseProduct F) k yk'
hy :
  colimitPointwiseProductToProductColimit F (colimit.ι (pointwiseProduct F) k yk) =
    colimitPointwiseProductToProductColimit F (colimit.ι (pointwiseProduct F) k yk')
⊢ ∀ (s : α),
    ∃ i' hi',
      (F s).map hi' (Pi.π (fun s => (F s).obj (k s)) s yk) = (F s).map hi' (Pi.π (fun s => (F s).obj (k s)) s yk')

Tactic:
intro s

Result:
α : Type u
I : α → Type u
inst✝¹ : (i : α) → SmallCategory (I i)
inst✝ : ∀ (i : α), IsFiltered (I i)
F : (i : α) → I i ⥤ Type u
ky : (i : α) → I i
yk₀ : (pointwiseProduct F).obj ky
ky' : (i : α) → I i
yk₀' : (pointwiseProduct F).obj ky'
k : (i : α) → I i := IsFiltered.max ky ky'
yk : ∏ᶜ fun s => (F s).obj (k s) := (pointwiseProduct F).map (IsFiltered.leftToMax ky ky') yk₀
yk' : ∏ᶜ fun s => (F s).obj (k s) := (pointwiseProduct F).map (IsFiltered.rightToMax ky ky') yk₀'
hyk₀ : colimit.ι (pointwiseProduct F) ky yk₀ = colimit.ι (pointwiseProduct F) k yk
hyk₀' : colimit.ι (pointwiseProduct F) ky' yk₀' = colimit.ι (pointwiseProduct F) k yk'
hy :
  colimitPointwiseProductToProductColimit F (colimit.ι (pointwiseProduct F) k yk) =
    colimitPointwiseProductToProductColimit F (colimit.ι (pointwiseProduct F) k yk')
s : α
⊢ ∃ i' hi', (F s).map hi' (Pi.π (fun s => (F s).obj (k s)) s yk) = (F s).map hi' (Pi.π (fun s => (F s).obj (k s)) s yk')

Proof state:
case refine_2
α : Type u
I : α → Type u
inst✝¹ : (i : α) → SmallCategory (I i)
inst✝ : ∀ (i : α), IsFiltered (I i)
F : (i : α) → I i ⥤ Type u
x : ∏ᶜ fun s => colimit (F s)
hch : ∀ (s : α), ∃ i xi, colimit.ι (F s) i xi = Pi.π (fun s => colimit (F s)) s x
⊢ ∃ a, colimitPointwiseProductToProductColimit F a = x

Tactic:
choose k p hk using hch

Result:
case refine_2
α : Type u
I : α → Type u
inst✝¹ : (i : α) → SmallCategory (I i)
inst✝ : ∀ (i : α), IsFiltered (I i)
F : (i : α) → I i ⥤ Type u
x : ∏ᶜ fun s => colimit (F s)
k : (s : α) → I s
p : (s : α) → (F s).obj (k s)
hk : ∀ (s : α), colimit.ι (F s) (k s) (p s) = Pi.π (fun s => colimit (F s)) s x
⊢ ∃ a, colimitPointwiseProductToProductColimit F a = x

Proof state:
case refine_1.intro.intro.intro.intro
α : Type u
I : α → Type u
inst✝¹ : (i : α) → SmallCategory (I i)
inst✝ : ∀ (i : α), IsFiltered (I i)
F : (i : α) → I i ⥤ Type u
ky : (i : α) → I i
yk₀ : (pointwiseProduct F).obj ky
ky' : (i : α) → I i
yk₀' : (pointwiseProduct F).obj ky'
k : (i : α) → I i := IsFiltered.max ky ky'
yk : ∏ᶜ fun s => (F s).obj (k s) := (pointwiseProduct F).map (IsFiltered.leftToMax ky ky') yk₀
yk' : ∏ᶜ fun s => (F s).obj (k s) := (pointwiseProduct F).map (IsFiltered.rightToMax ky ky') yk₀'
hyk₀ : colimit.ι (pointwiseProduct F) ky yk₀ = colimit.ι (pointwiseProduct F) k yk
hyk₀' : colimit.ι (pointwiseProduct F) ky' yk₀' = colimit.ι (pointwiseProduct F) k yk'
hy :
  colimitPointwiseProductToProductColimit F (colimit.ι (pointwiseProduct F) k yk) =
    colimitPointwiseProductToProductColimit F (colimit.ι (pointwiseProduct F) k yk')
⊢ colimit.ι (pointwiseProduct F) k yk = colimit.ι (pointwiseProduct F) k yk'

Tactic:
have hch : ∀ (s : α), ∃ (i' : I s) (hi' : k s ⟶ i'),
    (F s).map hi' (Pi.π (fun s => (F s).obj (k s)) s yk) =
      (F s).map hi' (Pi.π (fun s => (F s).obj (k s)) s yk') := by
  intro s
  have hy₁ := congrFun (ι_colimitPointwiseProductToProductColimit_π F k s) yk
  have hy₂ := congrFun (ι_colimitPointwiseProductToProductColimit_π F k s) yk'
  dsimp only [pointwiseProduct_obj, types_comp_apply] at hy₁ hy₂
  rw [← hy, hy₁, Types.FilteredColimit.colimit_eq_iff] at hy₂
  obtain ⟨i₀, f₀, g₀, h₀⟩ := hy₂
  refine ⟨IsFiltered.coeq f₀ g₀, f₀ ≫ IsFiltered.coeqHom f₀ g₀, ?_⟩
  conv_rhs => rw [IsFiltered.coeq_condition]
  simp [h₀]

Result:
case refine_1.intro.intro.intro.intro
α : Type u
I : α → Type u
inst✝¹ : (i : α) → SmallCategory (I i)
inst✝ : ∀ (i : α), IsFiltered (I i)
F : (i : α) → I i ⥤ Type u
ky : (i : α) → I i
yk₀ : (pointwiseProduct F).obj ky
ky' : (i : α) → I i
yk₀' : (pointwiseProduct F).obj ky'
k : (i : α) → I i := IsFiltered.max ky ky'
yk : ∏ᶜ fun s => (F s).obj (k s) := (pointwiseProduct F).map (IsFiltered.leftToMax ky ky') yk₀
yk' : ∏ᶜ fun s => (F s).obj (k s) := (pointwiseProduct F).map (IsFiltered.rightToMax ky ky') yk₀'
hyk₀ : colimit.ι (pointwiseProduct F) ky yk₀ = colimit.ι (pointwiseProduct F) k yk
hyk₀' : colimit.ι (pointwiseProduct F) ky' yk₀' = colimit.ι (pointwiseProduct F) k yk'
hy :
  colimitPointwiseProductToProductColimit F (colimit.ι (pointwiseProduct F) k yk) =
    colimitPointwiseProductToProductColimit F (colimit.ι (pointwiseProduct F) k yk')
hch :
  ∀ (s : α),
    ∃ i' hi',
      (F s).map hi' (Pi.π (fun s => (F s).obj (k s)) s yk) = (F s).map hi' (Pi.π (fun s => (F s).obj (k s)) s yk')
⊢ colimit.ι (pointwiseProduct F) k yk = colimit.ι (pointwiseProduct F) k yk'

Proof state:
α : Type u
I : α → Type u
inst✝¹ : (i : α) → SmallCategory (I i)
inst✝ : ∀ (i : α), IsFiltered (I i)
F : (i : α) → I i ⥤ Type u
y y' : colimit (pointwiseProduct F)
hy : colimitPointwiseProductToProductColimit F y = colimitPointwiseProductToProductColimit F y'
ky : (i : α) → I i
yk₀ : (pointwiseProduct F).obj ky
hyk₀ : colimit.ι (pointwiseProduct F) ky yk₀ = y
ky' : (i : α) → I i
yk₀' : (pointwiseProduct F).obj ky'
hyk₀' : colimit.ι (pointwiseProduct F) ky' yk₀' = y'
k : (i : α) → I i := IsFiltered.max ky ky'
yk : (pointwiseProduct F).obj k := (pointwiseProduct F).map (IsFiltered.leftToMax ky ky') yk₀
yk' : (pointwiseProduct F).obj k := (pointwiseProduct F).map (IsFiltered.rightToMax ky ky') yk₀'
⊢ y = colimit.ι (pointwiseProduct F) k yk

Tactic:
simp only [k, yk, Types.Colimit.w_apply', hyk₀]

Result:
no goals