Theorem: factorsThrough_of_pullbackCondition
File: Mathlib/Condensed/TopComparison.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
⊢ Function.FactorsThrough ⇑a ⇑(G.map π)
state_after: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
⊢ a x = a y
tactic: intro x y hxy
state_before: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
⊢ a x = a y
state_after: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
⊢ a x = a y
tactic: let xy : G.obj (pullback π π) := (PreservesPullback.iso G π π).inv <|
    (TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩
state_before: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
⊢ a x = a y
state_after: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : (⇑a ∘ ⇑(G.map (pullback.fst π π))) xy = (⇑a ∘ ⇑(G.map (pullback.snd π π))) xy
⊢ a x = a y
tactic: have ha' := congr_fun ha xy
state_before: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : (⇑a ∘ ⇑(G.map (pullback.fst π π))) xy = (⇑a ∘ ⇑(G.map (pullback.snd π π))) xy
⊢ a x = a y
state_after: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : a ((G.map (pullback.fst π π)) xy) = a ((G.map (pullback.snd π π)) xy)
⊢ a x = a y
tactic: dsimp at ha'
state_before: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : a ((G.map (pullback.fst π π)) xy) = a ((G.map (pullback.snd π π)) xy)
⊢ a x = a y
state_after: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : a ((G.map (pullback.fst π π)) xy) = a ((G.map (pullback.snd π π)) xy)
h₁ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.fst π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.fst (G.map π) (G.map π)) y
⊢ a x = a y
tactic: have h₁ : ∀ y, G.map (pullback.fst _ _) ((PreservesPullback.iso G π π).inv y) =
      pullback.fst (G.map π) (G.map π) y := by
    simp only [← PreservesPullback.iso_inv_fst]; intro y; rfl
state_before: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : a ((G.map (pullback.fst π π)) xy) = a ((G.map (pullback.snd π π)) xy)
h₁ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.fst π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.fst (G.map π) (G.map π)) y
⊢ a x = a y
state_after: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : a ((G.map (pullback.fst π π)) xy) = a ((G.map (pullback.snd π π)) xy)
h₁ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.fst π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.fst (G.map π) (G.map π)) y
h₂ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.snd π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.snd (G.map π) (G.map π)) y
⊢ a x = a y
tactic: have h₂ : ∀ y, G.map (pullback.snd _ _) ((PreservesPullback.iso G π π).inv y) =
      pullback.snd (G.map π) (G.map π) y := by
    simp only [← PreservesPullback.iso_inv_snd]; intro y; rfl
state_before: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : a ((G.map (pullback.fst π π)) xy) = a ((G.map (pullback.snd π π)) xy)
h₁ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.fst π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.fst (G.map π) (G.map π)) y
h₂ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.snd π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.snd (G.map π) (G.map π)) y
⊢ a x = a y
state_after: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : a (↑⟨(x, y), hxy⟩).1 = a (↑⟨(x, y), hxy⟩).2
h₁ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.fst π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.fst (G.map π) (G.map π)) y
h₂ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.snd π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.snd (G.map π) (G.map π)) y
⊢ a x = a y
tactic: erw [h₁, h₂, TopCat.pullbackIsoProdSubtype_inv_fst_apply,
    TopCat.pullbackIsoProdSubtype_inv_snd_apply] at ha'
state_before: C : Type u
inst✝³ : Category.{v, u} C
G : C ⥤ TopCat
X : Type w'
inst✝² : TopologicalSpace X
Z B : C
π : Z ⟶ B
inst✝¹ : HasPullback π π
inst✝ : PreservesLimit (cospan π π) G
a : C(↑(G.obj Z), X)
ha : ⇑a ∘ ⇑(G.map (pullback.fst π π)) = ⇑a ∘ ⇑(G.map (pullback.snd π π))
x y : ↑(G.obj Z)
hxy : (G.map π) x = (G.map π) y
xy : ↑(G.obj (pullback π π)) :=
  (PreservesPullback.iso G π π).inv ((TopCat.pullbackIsoProdSubtype (G.map π) (G.map π)).inv ⟨(x, y), hxy⟩)
ha' : a (↑⟨(x, y), hxy⟩).1 = a (↑⟨(x, y), hxy⟩).2
h₁ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.fst π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.fst (G.map π) (G.map π)) y
h₂ :
  ∀ (y : ↑(pullback (G.map π) (G.map π))),
    (G.map (pullback.snd π π)) ((PreservesPullback.iso G π π).inv y) = (pullback.snd (G.map π) (G.map π)) y
⊢ a x = a y
state_after: no goals
tactic: simpa using ha'