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 ((forget TopCat).map (BinaryCofan.inl c)) ∧
      OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c)) ∧
        IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c)))
          (Set.range ((forget TopCat).map (BinaryCofan.inr 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 ((forget TopCat).map (BinaryCofan.inl c)) ∧
      OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c)) ∧
        IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c)))
          (Set.range ((forget TopCat).map (BinaryCofan.inr c)))

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 ((forget TopCat).map (BinaryCofan.inl c)) ∧
    OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c)) ∧
      IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c)))
        (Set.range ((forget TopCat).map (BinaryCofan.inr c)))

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

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
      ((forget TopCat).map
        (BinaryCofan.inl (TopCat.binaryCofan X Y) ≫
          (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv)) ∧
    OpenEmbedding
        ((forget TopCat).map
          (BinaryCofan.inr (TopCat.binaryCofan X Y) ≫
            (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv)) ∧
      IsCompl
        (Set.range
          ((forget TopCat).map
            (BinaryCofan.inl (TopCat.binaryCofan X Y) ≫
              (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv)))
        (Set.range
          ((forget TopCat).map
            (BinaryCofan.inr (TopCat.binaryCofan X Y) ≫
              (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv)))

tactic: simp only [Functor.map_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
      ((forget TopCat).map
        (BinaryCofan.inl (TopCat.binaryCofan X Y) ≫
          (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv)))
    (Set.range
      ((forget TopCat).map
        (BinaryCofan.inr (TopCat.binaryCofan X Y) ≫
          (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv)))

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.symm]
state_before: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ IsCompl
    (Set.range
      ((forget TopCat).map (BinaryCofan.inl (TopCat.binaryCofan X Y)) ≫
        (forget TopCat).map (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv))
    (Set.range
      ((forget TopCat).map (BinaryCofan.inr (TopCat.binaryCofan X Y)) ≫
        (forget TopCat).map (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv))

tactic: congr 1
state_before: case mp.intro
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h : IsColimit c
⊢ (forget TopCat).map (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)).inv '' Set.range Sum.inrᶜ =
    ↑(Homeomorph.symm (homeoOfIso (IsColimit.coconePointUniqueUpToIso h (binaryCofanIsColimit X Y)))) ''
      Set.range Sum.inrᶜ

tactic: rintro ⟨h₁, h₂, h₃⟩
state_before: case mpr
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
⊢ OpenEmbedding ((forget TopCat).map (BinaryCofan.inl c)) ∧
      OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c)) ∧
        IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c)))
          (Set.range ((forget TopCat).map (BinaryCofan.inr c))) →
    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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
⊢ 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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ Nonempty (IsColimit c)

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
⊢ ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))

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

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ {T : TopCat} → (X ⟶ T) → (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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ c.pt ⟶ T

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous fun x =>
    if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
      (forget TopCat).map f
        (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
          { val := x, property := h })
    else
      (forget TopCat).map g
        (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
          { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ (x : ↑c.pt),
    ContinuousAt
      (fun x =>
        if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
          (forget TopCat).map f
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
              { val := x, property := h })
        else
          (forget TopCat).map g
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
              { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
      x

tactic: by_cases 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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
    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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ↑c.pt → ↑T

tactic: revert h x
state_before: case pos
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c))
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
    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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ (x : ↑c.pt),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) →
      ContinuousAt
        (fun x =>
          if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
            (forget TopCat).map f
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
                { val := x, property := h })
          else
            (forget TopCat).map g
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
                { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
        x

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ContinuousOn
    (fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
    (Set.range ((forget TopCat).map (BinaryCofan.inl c)))

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous
    (Set.restrict (Set.range ((forget TopCat).map (BinaryCofan.inl c))) fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))

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

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
e_2✝ : ↑T = (forget TopCat).obj T
⊢ (Set.restrict (Set.range ((forget TopCat).map (BinaryCofan.inl c))) fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })) =
    (forget TopCat).map f ∘
      ↑(Homeomorph.symm
          (Homeomorph.ofEmbedding ((forget TopCat).map (BinaryCofan.inl c))
            (_ : Embedding ((forget TopCat).map (BinaryCofan.inl c)))))

tactic: exact dif_pos 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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
e_2✝ : ↑T = (forget TopCat).obj T
x : ↑c.pt
hx : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c))
⊢ Set.restrict (Set.range ((forget TopCat).map (BinaryCofan.inl c)))
      (fun x =>
        if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
          (forget TopCat).map f
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
              { val := x, property := h })
        else
          (forget TopCat).map g
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
              { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
      { val := x, property := hx } =
    ((forget TopCat).map f ∘
        ↑(Homeomorph.symm
            (Homeomorph.ofEmbedding ((forget TopCat).map (BinaryCofan.inl c))
              (_ : Embedding ((forget TopCat).map (BinaryCofan.inl c))))))
      { val := x, property := hx }

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous ((forget TopCat).map f)

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

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

tactic: revert h x
state_before: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : ↑c.pt
h : ¬x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c))
⊢ ContinuousAt
    (fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
    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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ (x : ↑c.pt),
    ¬x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) →
      ContinuousAt
        (fun x =>
          if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
            (forget TopCat).map f
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
                { val := x, property := h })
          else
            (forget TopCat).map g
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
                { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
        x

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ContinuousOn
    (fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
    fun a => a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ Continuous
    (Set.restrict (fun a => a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False) fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ Continuous
    (Set.restrict (fun a => a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False) fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))

tactic: apply Continuous.comp
state_before: case neg
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ Continuous
    ((forget TopCat).map g ∘
      ↑(Homeomorph.symm
            (Homeomorph.ofEmbedding ((forget TopCat).map (BinaryCofan.inr c))
              (_ : Embedding ((forget TopCat).map (BinaryCofan.inr c))))) ∘
        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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })
h : a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c))ᶜ
⊢ a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
e_1✝ :
  (↑fun a => a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False) =
    { a // ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) }
e_2✝ : ↑T = (forget TopCat).obj T
⊢ (Set.restrict (fun a => a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False) fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })) =
    (forget TopCat).map g ∘
      ↑(Homeomorph.symm
            (Homeomorph.ofEmbedding ((forget TopCat).map (BinaryCofan.inr c))
              (_ : Embedding ((forget TopCat).map (BinaryCofan.inr c))))) ∘
        Subtype.map (fun a => a) this

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
e_1✝ :
  (↑fun a => a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False) =
    { a // ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) }
e_2✝ : ↑T = (forget TopCat).obj T
x : ↑c.pt
hx : x ∈ fun a => a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False
⊢ Set.restrict (fun a => a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False)
      (fun x =>
        if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
          (forget TopCat).map f
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
              { val := x, property := h })
        else
          (forget TopCat).map g
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
              { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
      { val := x, property := hx } =
    ((forget TopCat).map g ∘
        ↑(Homeomorph.symm
              (Homeomorph.ofEmbedding ((forget TopCat).map (BinaryCofan.inr c))
                (_ : Embedding ((forget TopCat).map (BinaryCofan.inr c))))) ∘
          Subtype.map (fun a => a) this)
      { val := x, property := hx }

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ Continuous ((forget TopCat).map g)

tactic: apply Continuous.comp
state_before: case neg.hf
J : Type v
inst✝ : SmallCategory J
X Y : TopCat
c : BinaryCofan X Y
h₁ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ Continuous
    (↑(Homeomorph.symm
          (Homeomorph.ofEmbedding ((forget TopCat).map (BinaryCofan.inr c))
            (_ : Embedding ((forget TopCat).map (BinaryCofan.inr c))))) ∘
      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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ Continuous
    ↑(Homeomorph.symm
        (Homeomorph.ofEmbedding ((forget TopCat).map (BinaryCofan.inr c))
          (_ : Embedding ((forget TopCat).map (BinaryCofan.inr c)))))

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ Continuous (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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
this :
  ∀ (a : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    ¬a ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → a ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ Continuous (Subtype.val ∘ Subtype.map (fun a => a) this)

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

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ IsOpen (Set.range ((forget TopCat).map (BinaryCofan.inl c))ᶜ)

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

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T),
    (BinaryCofan.inl c ≫
        ContinuousMap.mk fun x =>
          if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
            (forget TopCat).map f
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
                { val := x, property := h })
          else
            (forget TopCat).map g
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
                { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })) =
      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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ (BinaryCofan.inl c ≫
      ContinuousMap.mk fun x =>
        if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
          (forget TopCat).map f
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
              { val := x, property := h })
        else
          (forget TopCat).map g
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
              { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })) =
    f

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ (forget TopCat).map
      (BinaryCofan.inl c ≫
        ContinuousMap.mk fun x =>
          if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
            (forget TopCat).map f
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
                { val := x, property := h })
          else
            (forget TopCat).map g
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
                { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
      x =
    (forget TopCat).map 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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ ↑(BinaryCofan.inl c) x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c))

tactic: dsimp
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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ (fun h =>
        (forget TopCat).map f
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := ↑(BinaryCofan.inl c) x, property := h }))
      (_ : ∃ y, (forget TopCat).map (BinaryCofan.inl c) y = ↑(BinaryCofan.inl c) x) =
    (forget TopCat).map f x

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
⊢ (forget TopCat).map f
      (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
              (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
        { val := ↑(BinaryCofan.inl c) x,
          property := (_ : ∃ y, (forget TopCat).map (BinaryCofan.inl c) y = ↑(BinaryCofan.inl c) x) }) =
    (forget TopCat).map f x

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T),
    (BinaryCofan.inr c ≫
        ContinuousMap.mk fun x =>
          if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
            (forget TopCat).map f
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
                { val := x, property := h })
          else
            (forget TopCat).map g
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
                { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })) =
      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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
⊢ (BinaryCofan.inr c ≫
      ContinuousMap.mk fun x =>
        if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
          (forget TopCat).map f
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
              { val := x, property := h })
        else
          (forget TopCat).map g
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
              { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })) =
    g

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ (forget TopCat).map
      (BinaryCofan.inr c ≫
        ContinuousMap.mk fun x =>
          if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
            (forget TopCat).map f
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
                { val := x, property := h })
          else
            (forget TopCat).map g
              (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                      (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
                { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
      x =
    (forget TopCat).map 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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ ¬↑(BinaryCofan.inr c) x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c))

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
y : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
e : (forget TopCat).map (BinaryCofan.inl c) y = ↑(BinaryCofan.inr c) x
⊢ 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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this✝ :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
y : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.left })
e : (forget TopCat).map (BinaryCofan.inl c) y = ↑(BinaryCofan.inr c) x
this :
  (forget TopCat).map (BinaryCofan.inr c) x ∈
    Set.range ((forget TopCat).map (BinaryCofan.inl c)) ⊓ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ False

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
f : X ⟶ T
g : Y ⟶ T
x : (forget TopCat).obj ((pair X Y).obj { as := WalkingPair.right })
⊢ (fun h =>
        (forget TopCat).map g
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := ↑(BinaryCofan.inr c) x,
              property := (_ : ↑(BinaryCofan.inr c) x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
      (_ : ↑(BinaryCofan.inr c) x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) → False) =
    (forget TopCat).map g x

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
⊢ ∀ {T : TopCat} (f : X ⟶ T) (g : Y ⟶ T) (m : c.pt ⟶ T),
    BinaryCofan.inl c ≫ m = f →
      BinaryCofan.inr c ≫ m = g →
        m =
          ContinuousMap.mk fun x =>
            if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
              (forget TopCat).map f
                (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                        (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
                  { val := x, property := h })
            else
              (forget TopCat).map g
                (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                        (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
                  { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
m : c.pt ⟶ T
⊢ m =
    ContinuousMap.mk fun x =>
      if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
        (forget TopCat).map (BinaryCofan.inl c ≫ m)
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
            { val := x, property := h })
      else
        (forget TopCat).map (BinaryCofan.inr c ≫ m)
          (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                  (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
            { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) })

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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
m : c.pt ⟶ T
x : (forget TopCat).obj c.pt
⊢ (forget TopCat).map m x =
    (forget TopCat).map
      (ContinuousMap.mk fun x =>
        if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
          (forget TopCat).map (BinaryCofan.inl c ≫ m)
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
              { val := x, property := h })
        else
          (forget TopCat).map (BinaryCofan.inr c ≫ m)
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
              { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
      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 ((forget TopCat).map (BinaryCofan.inl c))
h₂ : OpenEmbedding ((forget TopCat).map (BinaryCofan.inr c))
h₃ : IsCompl (Set.range ((forget TopCat).map (BinaryCofan.inl c))) (Set.range ((forget TopCat).map (BinaryCofan.inr c)))
this :
  ∀ (x : (forget TopCat).obj (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := WalkingPair.left })),
    x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) ∨ x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))
T : TopCat
m : c.pt ⟶ T
x : (forget TopCat).obj c.pt
⊢ (forget TopCat).map m x =
    if h : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inl c)) then
      (fun h =>
          (forget TopCat).map (BinaryCofan.inl c ≫ m)
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inl c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inl c)))).symm
              { val := x, property := h }))
        h
    else
      (fun h =>
          (forget TopCat).map (BinaryCofan.inr c ≫ m)
            (↑(Equiv.ofInjective ((forget TopCat).map (BinaryCofan.inr c))
                    (_ : Function.Injective ((forget TopCat).map (BinaryCofan.inr c)))).symm
              { val := x, property := (_ : x ∈ Set.range ((forget TopCat).map (BinaryCofan.inr c))) }))
        h