Theorem: TopCat.binaryCofan_isColimit_iff
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

tactic: constructor
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
⊢ Nonempty (IsColimit c) ↔ OpenEmbedding ⇑c.inl ∧ OpenEmbedding ⇑c.inr ∧ IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
state_after: case mp
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
⊢ Nonempty (IsColimit c) → OpenEmbedding ⇑c.inl ∧ OpenEmbedding ⇑c.inr ∧ IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)

case mpr
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
⊢ OpenEmbedding ⇑c.inl ∧ OpenEmbedding ⇑c.inr ∧ IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr) → Nonempty (IsColimit c)

tactic: rintro ⟨h⟩
state_before: case mp
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
⊢ Nonempty (IsColimit c) → OpenEmbedding ⇑c.inl ∧ OpenEmbedding ⇑c.inr ∧ IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
state_after: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ OpenEmbedding ⇑c.inl ∧ OpenEmbedding ⇑c.inr ∧ IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)

tactic: rw [← show _ = c.inl from
    h.comp_coconePointUniqueUpToIso_inv (binaryCofanIsColimit X Y) ⟨WalkingPair.left⟩,
  ← show _ = c.inr from
    h.comp_coconePointUniqueUpToIso_inv (binaryCofanIsColimit X Y) ⟨WalkingPair.right⟩]
state_before: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ OpenEmbedding ⇑c.inl ∧ OpenEmbedding ⇑c.inr ∧ IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
state_after: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ OpenEmbedding
      ⇑((X.binaryCofan Y).ι.app { as := WalkingPair.left } ≫
          (h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv) ∧
    OpenEmbedding
        ⇑((X.binaryCofan Y).ι.app { as := WalkingPair.right } ≫
            (h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv) ∧
      IsCompl
        (Set.range
          ⇑((X.binaryCofan Y).ι.app { as := WalkingPair.left } ≫
              (h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv))
        (Set.range
          ⇑((X.binaryCofan Y).ι.app { as := WalkingPair.right } ≫
              (h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv))

tactic: dsimp
state_before: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ OpenEmbedding
      ⇑((X.binaryCofan Y).ι.app { as := WalkingPair.left } ≫
          (h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv) ∧
    OpenEmbedding
        ⇑((X.binaryCofan Y).ι.app { as := WalkingPair.right } ≫
            (h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv) ∧
      IsCompl
        (Set.range
          ⇑((X.binaryCofan Y).ι.app { as := WalkingPair.left } ≫
              (h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv))
        (Set.range
          ⇑((X.binaryCofan Y).ι.app { as := WalkingPair.right } ≫
              (h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv))
state_after: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ OpenEmbedding (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inl) ∧
    OpenEmbedding (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inr) ∧
      IsCompl (Set.range (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inl))
        (Set.range (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inr))

tactic: refine ⟨(homeoOfIso <| h.coconePointUniqueUpToIso
  (binaryCofanIsColimit X Y)).symm.openEmbedding.comp openEmbedding_inl,
    (homeoOfIso <| h.coconePointUniqueUpToIso
      (binaryCofanIsColimit X Y)).symm.openEmbedding.comp openEmbedding_inr, ?_⟩
state_before: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ OpenEmbedding (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inl) ∧
    OpenEmbedding (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inr) ∧
      IsCompl (Set.range (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inl))
        (Set.range (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inr))
state_after: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ IsCompl (Set.range (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inl))
    (Set.range (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inr))

tactic: erw [Set.range_comp, ← eq_compl_iff_isCompl, Set.range_comp _ Sum.inr,
  ← Set.image_compl_eq (homeoOfIso <| h.coconePointUniqueUpToIso
      (binaryCofanIsColimit X Y)).symm.bijective, Set.compl_range_inr, Set.image_comp]
state_before: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ IsCompl (Set.range (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inl))
    (Set.range (⇑(h.coconePointUniqueUpToIso (X.binaryCofanIsColimit Y)).inv ∘ ⇑(X.binaryCofan Y).inr))
state_after: no goals

tactic: rintro ⟨h₁, h₂, h₃⟩
state_before: case mpr
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
⊢ OpenEmbedding ⇑c.inl ∧ OpenEmbedding ⇑c.inr ∧ IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr) → Nonempty (IsColimit c)
state_after: case mpr.intro.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
⊢ Nonempty (IsColimit c)

tactic: have : ∀ x, x ∈ Set.range c.inl ∨ x ∈ Set.range c.inr := by
  rw [eq_compl_iff_isCompl.mpr h₃.symm]
  exact fun _ => or_not
state_before: case mpr.intro.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
⊢ Nonempty (IsColimit c)
state_after: case mpr.intro.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ Nonempty (IsColimit c)

tactic: refine ⟨BinaryCofan.IsColimit.mk _ ?_ ?_ ?_ ?_⟩
state_before: case mpr.intro.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ Nonempty (IsColimit c)
state_after: case mpr.intro.intro.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ {T : TopCat} → (X ⟶ T) → (Y ⟶ T) → (c.pt ⟶ T)

case mpr.intro.intro.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T), c.inl ≫ ?mpr.intro.intro.refine_1 f g = f

case mpr.intro.intro.refine_3
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T), c.inr ≫ ?mpr.intro.intro.refine_1 f g = g

case mpr.intro.intro.refine_4
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T) (m : c.pt ⟶ T),
    c.inl ≫ m = f → c.inr ≫ m = g → m = ?mpr.intro.intro.refine_1 f g

tactic: rw [eq_compl_iff_isCompl.mpr h₃.symm]
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
⊢ ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
state_after: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
⊢ ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ (Set.range ⇑c.inl)ᶜ

tactic: exact fun _ => or_not
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
⊢ ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ (Set.range ⇑c.inl)ᶜ
state_after: no goals

tactic: intro T f g
state_before: case mpr.intro.intro.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ {T : TopCat} → (X ⟶ T) → (Y ⟶ T) → (c.pt ⟶ T)
state_after: case mpr.intro.intro.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ c.pt ⟶ T

tactic: refine ContinuousMap.mk ?_ ?_
state_before: case mpr.intro.intro.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ c.pt ⟶ T
state_after: case mpr.intro.intro.refine_1.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ↑c.pt → ↑T

case mpr.intro.intro.refine_1.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous ?mpr.intro.intro.refine_1.refine_1

tactic: rw [continuous_iff_continuousAt]
state_before: case mpr.intro.intro.refine_1.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous fun x =>
    if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
    else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩)
state_after: case mpr.intro.intro.refine_1.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ (x : ↑c.pt),
    ContinuousAt
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      x

tactic: intro x
state_before: case mpr.intro.intro.refine_1.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ (x : ↑c.pt),
    ContinuousAt
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      x
state_after: case mpr.intro.intro.refine_1.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    x

tactic: by_cases h : x ∈ Set.range c.inl
state_before: case mpr.intro.intro.refine_1.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    x
state_after: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
h : x ∈ Set.range ⇑c.inl
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    x

case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
h : x ∉ Set.range ⇑c.inl
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    x

tactic: exact fun x =>
  if h : x ∈ Set.range c.inl then f ((Equiv.ofInjective _ h₁.inj).symm ⟨x, h⟩)
  else g ((Equiv.ofInjective _ h₂.inj).symm ⟨x, (this x).resolve_left h⟩)
state_before: case mpr.intro.intro.refine_1.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ↑c.pt → ↑T
state_after: no goals

tactic: revert h x
state_before: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
h : x ∈ Set.range ⇑c.inl
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    x
state_after: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ x ∈ Set.range ⇑c.inl,
    ContinuousAt
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      x

tactic: apply (IsOpen.continuousOn_iff _).mp
state_before: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ x ∈ Set.range ⇑c.inl,
    ContinuousAt
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      x
state_after: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ContinuousOn
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    (Set.range ⇑c.inl)

J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen (Set.range ⇑c.inl)

tactic: rw [continuousOn_iff_continuous_restrict]
state_before: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ContinuousOn
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    (Set.range ⇑c.inl)
state_after: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous
    ((Set.range ⇑c.inl).restrict fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))

tactic: convert_to Continuous (f ∘ (Homeomorph.ofEmbedding _ h₁.toEmbedding).symm)
state_before: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous
    ((Set.range ⇑c.inl).restrict fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
state_after: case h.e'_5
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ((Set.range ⇑c.inl).restrict fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩)) =
    ⇑f ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inl ⋯).symm

case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous (⇑f ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inl ⋯).symm)

tactic: apply Continuous.comp
state_before: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous (⇑f ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inl ⋯).symm)
state_after: case pos.hg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous ⇑f

case pos.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous ⇑(Homeomorph.ofEmbedding ⇑c.inl ⋯).symm

tactic: ext ⟨x, hx⟩
state_before: case h.e'_5
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ((Set.range ⇑c.inl).restrict fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩)) =
    ⇑f ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inl ⋯).symm
state_after: case h.e'_5.h.mk
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
hx : x ∈ Set.range ⇑c.inl
⊢ (Set.range ⇑c.inl).restrict
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      ⟨x, hx⟩ =
    (⇑f ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inl ⋯).symm) ⟨x, hx⟩

tactic: exact dif_pos hx
state_before: case h.e'_5.h.mk
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
hx : x ∈ Set.range ⇑c.inl
⊢ (Set.range ⇑c.inl).restrict
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      ⟨x, hx⟩ =
    (⇑f ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inl ⋯).symm) ⟨x, hx⟩
state_after: no goals

tactic: exact f.continuous_toFun
state_before: case pos.hg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous ⇑f
state_after: no goals

tactic: continuity
state_before: case pos.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous ⇑(Homeomorph.ofEmbedding ⇑c.inl ⋯).symm
state_after: no goals

tactic: exact h₁.isOpen_range
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen (Set.range ⇑c.inl)
state_after: no goals

tactic: revert h x
state_before: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
h : x ∉ Set.range ⇑c.inl
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    x
state_after: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ x ∉ Set.range ⇑c.inl,
    ContinuousAt
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      x

tactic: apply (IsOpen.continuousOn_iff _).mp
state_before: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ x ∉ Set.range ⇑c.inl,
    ContinuousAt
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      x
state_after: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ContinuousOn
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    fun a => a ∈ Set.range ⇑c.inl → False

J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen fun a => a ∈ Set.range ⇑c.inl → False

tactic: rw [continuousOn_iff_continuous_restrict]
state_before: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ContinuousOn
    (fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
    fun a => a ∈ Set.range ⇑c.inl → False
state_after: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous
    (Set.restrict (fun a => a ∈ Set.range ⇑c.inl → False) fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))

tactic: have : ∀ a, a ∉ Set.range c.inl → a ∈ Set.range c.inr := by
  rintro a (h : a ∈ (Set.range c.inl)ᶜ)
  rwa [eq_compl_iff_isCompl.mpr h₃.symm]
state_before: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous
    (Set.restrict (fun a => a ∈ Set.range ⇑c.inl → False) fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
state_after: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous
    (Set.restrict (fun a => a ∈ Set.range ⇑c.inl → False) fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))

tactic: convert_to Continuous
    (g ∘ (Homeomorph.ofEmbedding _ h₂.toEmbedding).symm ∘ Subtype.map _ this)
state_before: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous
    (Set.restrict (fun a => a ∈ Set.range ⇑c.inl → False) fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
state_after: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
e_1✝ : (↑fun a => a ∈ Set.range ⇑c.inl → False) = { a // a ∉ Set.range ⇑c.inl }
⊢ (Set.restrict (fun a => a ∈ Set.range ⇑c.inl → False) fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩)) =
    ⇑g ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm ∘ Subtype.map (fun a => a) this

case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous (⇑g ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm ∘ Subtype.map (fun a => a) this)

tactic: apply Continuous.comp
state_before: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous (⇑g ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm ∘ Subtype.map (fun a => a) this)
state_after: case neg.hg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous ⇑g

case neg.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous (⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm ∘ Subtype.map (fun a => a) this)

tactic: rintro a (h : a ∈ (Set.range c.inl)ᶜ)
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
state_after: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
a : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })
h : a ∈ (Set.range ⇑c.inl)ᶜ
⊢ a ∈ Set.range ⇑c.inr

tactic: rwa [eq_compl_iff_isCompl.mpr h₃.symm]
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
a : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })
h : a ∈ (Set.range ⇑c.inl)ᶜ
⊢ a ∈ Set.range ⇑c.inr
state_after: no goals

tactic: ext ⟨x, hx⟩
state_before: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
e_1✝ : (↑fun a => a ∈ Set.range ⇑c.inl → False) = { a // a ∉ Set.range ⇑c.inl }
⊢ (Set.restrict (fun a => a ∈ Set.range ⇑c.inl → False) fun x =>
      if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
      else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩)) =
    ⇑g ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm ∘ Subtype.map (fun a => a) this
state_after: case h.e'_5.h.h.mk
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
e_1✝ : (↑fun a => a ∈ Set.range ⇑c.inl → False) = { a // a ∉ Set.range ⇑c.inl }
x : ↑c.pt
hx : x ∈ fun a => a ∈ Set.range ⇑c.inl → False
⊢ Set.restrict (fun a => a ∈ Set.range ⇑c.inl → False)
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      ⟨x, hx⟩ =
    (⇑g ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm ∘ Subtype.map (fun a => a) this) ⟨x, hx⟩

tactic: exact dif_neg hx
state_before: case h.e'_5.h.h.mk
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
e_1✝ : (↑fun a => a ∈ Set.range ⇑c.inl → False) = { a // a ∉ Set.range ⇑c.inl }
x : ↑c.pt
hx : x ∈ fun a => a ∈ Set.range ⇑c.inl → False
⊢ Set.restrict (fun a => a ∈ Set.range ⇑c.inl → False)
      (fun x =>
        if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩))
      ⟨x, hx⟩ =
    (⇑g ∘ ⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm ∘ Subtype.map (fun a => a) this) ⟨x, hx⟩
state_after: no goals

tactic: exact g.continuous_toFun
state_before: case neg.hg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous ⇑g
state_after: no goals

tactic: apply Continuous.comp
state_before: case neg.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous (⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm ∘ Subtype.map (fun a => a) this)
state_after: case neg.hf.hg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous ⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm

case neg.hf.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous (Subtype.map (fun a => a) this)

tactic: continuity
state_before: case neg.hf.hg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous ⇑(Homeomorph.ofEmbedding ⇑c.inr ⋯).symm
state_after: no goals

tactic: rw [embedding_subtype_val.toInducing.continuous_iff]
state_before: case neg.hf.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous (Subtype.map (fun a => a) this)
state_after: case neg.hf.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous (Subtype.val ∘ Subtype.map (fun a => a) this)

tactic: exact continuous_subtype_val
state_before: case neg.hf.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this : ∀ a ∉ Set.range ⇑c.inl, a ∈ Set.range ⇑c.inr
⊢ Continuous (Subtype.val ∘ Subtype.map (fun a => a) this)
state_after: no goals

tactic: change IsOpen (Set.range c.inl)ᶜ
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen fun a => a ∈ Set.range ⇑c.inl → False
state_after: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen (Set.range ⇑c.inl)ᶜ

tactic: rw [← eq_compl_iff_isCompl.mpr h₃.symm]
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen (Set.range ⇑c.inl)ᶜ
state_after: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen (Set.range ⇑c.inr)

tactic: exact h₂.isOpen_range
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen (Set.range ⇑c.inr)
state_after: no goals

tactic: intro T f g
state_before: case mpr.intro.intro.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T),
    c.inl ≫
        {
          toFun := fun x =>
            if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
            else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
          continuous_toFun := ⋯ } =
      f
state_after: case mpr.intro.intro.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ c.inl ≫
      {
        toFun := fun x =>
          if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
          else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
        continuous_toFun := ⋯ } =
    f

tactic: ext x
state_before: case mpr.intro.intro.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ c.inl ≫
      {
        toFun := fun x =>
          if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
          else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
        continuous_toFun := ⋯ } =
    f
state_after: case mpr.intro.intro.refine_2.w
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ (c.inl ≫
        {
          toFun := fun x =>
            if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
            else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
          continuous_toFun := ⋯ })
      x =
    f x

tactic: refine (dif_pos ?_).trans ?_
state_before: case mpr.intro.intro.refine_2.w
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ (c.inl ≫
        {
          toFun := fun x =>
            if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
            else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
          continuous_toFun := ⋯ })
      x =
    f x
state_after: case mpr.intro.intro.refine_2.w.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ c.inl x ∈ Set.range ⇑c.inl

case mpr.intro.intro.refine_2.w.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨c.inl x, ?mpr.intro.intro.refine_2.w.refine_1⟩) = f x

tactic: exact ⟨x, rfl⟩
state_before: case mpr.intro.intro.refine_2.w.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ c.inl x ∈ Set.range ⇑c.inl
state_after: no goals

tactic: conv_lhs => erw [Equiv.ofInjective_symm_apply]
state_before: case mpr.intro.intro.refine_2.w.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨c.inl x, ⋯⟩) = f x
state_after: case mpr.intro.intro.refine_2.w.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ f x = f x

tactic: rfl
state_before: case mpr.intro.intro.refine_2.w.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ f x = f x
state_after: no goals

tactic: intro T f g
state_before: case mpr.intro.intro.refine_3
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T),
    c.inr ≫
        {
          toFun := fun x =>
            if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
            else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
          continuous_toFun := ⋯ } =
      g
state_after: case mpr.intro.intro.refine_3
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ c.inr ≫
      {
        toFun := fun x =>
          if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
          else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
        continuous_toFun := ⋯ } =
    g

tactic: ext x
state_before: case mpr.intro.intro.refine_3
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ c.inr ≫
      {
        toFun := fun x =>
          if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
          else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
        continuous_toFun := ⋯ } =
    g
state_after: case mpr.intro.intro.refine_3.w
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ (c.inr ≫
        {
          toFun := fun x =>
            if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
            else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
          continuous_toFun := ⋯ })
      x =
    g x

tactic: refine (dif_neg ?_).trans ?_
state_before: case mpr.intro.intro.refine_3.w
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ (c.inr ≫
        {
          toFun := fun x =>
            if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
            else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
          continuous_toFun := ⋯ })
      x =
    g x
state_after: case mpr.intro.intro.refine_3.w.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ c.inr x ∉ Set.range ⇑c.inl

case mpr.intro.intro.refine_3.w.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨c.inr x, ⋯⟩) = g x

tactic: rintro ⟨y, e⟩
state_before: case mpr.intro.intro.refine_3.w.refine_1
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ c.inr x ∉ Set.range ⇑c.inl
state_after: case mpr.intro.intro.refine_3.w.refine_1.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
y : ↑((pair X Y).obj { as := WalkingPair.left })
e : c.inl y = c.inr x
⊢ False

tactic: have : c.inr x ∈ Set.range c.inl ⊓ Set.range c.inr := ⟨⟨_, e⟩, ⟨_, rfl⟩⟩
state_before: case mpr.intro.intro.refine_3.w.refine_1.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
y : ↑((pair X Y).obj { as := WalkingPair.left })
e : c.inl y = c.inr x
⊢ False
state_after: case mpr.intro.intro.refine_3.w.refine_1.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
y : ↑((pair X Y).obj { as := WalkingPair.left })
e : c.inl y = c.inr x
this : c.inr x ∈ Set.range ⇑c.inl ⊓ Set.range ⇑c.inr
⊢ False

tactic: rwa [disjoint_iff.mp h₃.1] at this
state_before: case mpr.intro.intro.refine_3.w.refine_1.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this✝ :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
y : ↑((pair X Y).obj { as := WalkingPair.left })
e : c.inl y = c.inr x
this : c.inr x ∈ Set.range ⇑c.inl ⊓ Set.range ⇑c.inr
⊢ False
state_after: no goals

tactic: exact congr_arg g (Equiv.ofInjective_symm_apply _ _)
state_before: case mpr.intro.intro.refine_3.w.refine_2
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨c.inr x, ⋯⟩) = g x
state_after: no goals

tactic: rintro T _ _ m rfl rfl
state_before: case mpr.intro.intro.refine_4
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T) (m : c.pt ⟶ T),
    c.inl ≫ m = f →
      c.inr ≫ m = g →
        m =
          {
            toFun := fun x =>
              if h : x ∈ Set.range ⇑c.inl then f ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
              else g ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
            continuous_toFun := ⋯ }
state_after: case mpr.intro.intro.refine_4
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
m : c.pt ⟶ T
⊢ m =
    {
      toFun := fun x =>
        if h : x ∈ Set.range ⇑c.inl then (c.inl ≫ m) ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else (c.inr ≫ m) ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
      continuous_toFun := ⋯ }

tactic: ext x
state_before: case mpr.intro.intro.refine_4
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
m : c.pt ⟶ T
⊢ m =
    {
      toFun := fun x =>
        if h : x ∈ Set.range ⇑c.inl then (c.inl ≫ m) ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
        else (c.inr ≫ m) ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
      continuous_toFun := ⋯ }
state_after: case mpr.intro.intro.refine_4.w
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
m : c.pt ⟶ T
x : (forget TopCat).obj c.pt
⊢ m x =
    {
        toFun := fun x =>
          if h : x ∈ Set.range ⇑c.inl then (c.inl ≫ m) ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
          else (c.inr ≫ m) ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
        continuous_toFun := ⋯ }
      x

tactic: change m x = dite _ _ _
state_before: case mpr.intro.intro.refine_4.w
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
m : c.pt ⟶ T
x : (forget TopCat).obj c.pt
⊢ m x =
    {
        toFun := fun x =>
          if h : x ∈ Set.range ⇑c.inl then (c.inl ≫ m) ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
          else (c.inr ≫ m) ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩),
        continuous_toFun := ⋯ }
      x
state_after: case mpr.intro.intro.refine_4.w
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
m : c.pt ⟶ T
x : (forget TopCat).obj c.pt
⊢ m x =
    if h : x ∈ Set.range ⇑c.inl then (c.inl ≫ m) ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
    else (c.inr ≫ m) ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩)

tactic: split_ifs <;> exact congr_arg _ (Equiv.apply_ofInjective_symm _ ⟨_, _⟩).symm
state_before: case mpr.intro.intro.refine_4.w
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ⇑c.inl
h₂ : OpenEmbedding ⇑c.inr
h₃ : IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)
this :
  ∀ (x : ↑(((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ⇑c.inl ∨ x ∈ Set.range ⇑c.inr
T : TopCat
m : c.pt ⟶ T
x : (forget TopCat).obj c.pt
⊢ m x =
    if h : x ∈ Set.range ⇑c.inl then (c.inl ≫ m) ((Equiv.ofInjective ⇑c.inl ⋯).symm ⟨x, h⟩)
    else (c.inr ≫ m) ((Equiv.ofInjective ⇑c.inr ⋯).symm ⟨x, ⋯⟩)
state_after: no goals