l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' 

Proof state:
case h.h.h.h.h.h.h
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁶ i✝⁵ : A
i✝⁴ i✝³ i✝² : Set B
i✝¹ : IsOpen i✝⁴
i✝ : IsOpen i✝³
⊢ IsOpen
    (⋃ (_ : IsOpen i✝²),
      ⋃ (_ : Disjoint (i✝⁴ * i✝³) i✝²),
        {f | ⇑f '' {i✝⁶} ⊆ i✝⁴} ∩ {f | ⇑f '' {i✝⁵} ⊆ i✝³} ∩ {f | ⇑f '' {i✝⁶ * i✝⁵} ⊆ i✝²})

Next tactic:
apply isOpen_iUnion
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; 

Proof state:
case h.h.h.h.h.h.h.h
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁶ i✝⁵ : A
i✝⁴ i✝³ i✝² : Set B
i✝¹ : IsOpen i✝⁴
i✝ : IsOpen i✝³
⊢ IsOpen i✝² →
    IsOpen
      (⋃ (_ : Disjoint (i✝⁴ * i✝³) i✝²),
        {f | ⇑f '' {i✝⁶} ⊆ i✝⁴} ∩ {f | ⇑f '' {i✝⁵} ⊆ i✝³} ∩ {f | ⇑f '' {i✝⁶ * i✝⁵} ⊆ i✝²})

Next tactic:
intro
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' 

Proof state:
case h.h.h.h.h.h.h.h
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁷ i✝⁶ : A
i✝⁵ i✝⁴ i✝³ : Set B
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : IsOpen i✝³
⊢ IsOpen
    (⋃ (_ : Disjoint (i✝⁵ * i✝⁴) i✝³),
      {f | ⇑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ⇑f '' {i✝⁶} ⊆ i✝⁴} ∩ {f | ⇑f '' {i✝⁷ * i✝⁶} ⊆ i✝³})

Next tactic:
apply isOpen_iUnion
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; 

Proof state:
case h.h.h.h.h.h.h.h.h
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁷ i✝⁶ : A
i✝⁵ i✝⁴ i✝³ : Set B
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : IsOpen i✝³
⊢ Disjoint (i✝⁵ * i✝⁴) i✝³ → IsOpen ({f | ⇑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ⇑f '' {i✝⁶} ⊆ i✝⁴} ∩ {f | ⇑f '' {i✝⁷ * i✝⁶} ⊆ i✝³})

Next tactic:
intro
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' 

Proof state:
case h.h.h.h.h.h.h.h.h
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen ({f | ⇑f '' {i✝⁸} ⊆ i✝⁶} ∩ {f | ⇑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ⇑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴})

Next tactic:
apply isOpen_iUnion
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; intro
        

Proof state:
case h.h.h.h.h.h.h.h.h
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen ({f | ⇑f '' {i✝⁸} ⊆ i✝⁶} ∩ {f | ⇑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ⇑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴})

Next tactic:
repeat' apply IsOpen.inter
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; intro
        repeat' 

Proof state:
case h.h.h.h.h.h.h.h.h
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen ({f | ⇑f '' {i✝⁸} ⊆ i✝⁶} ∩ {f | ⇑f '' {i✝⁷} ⊆ i✝⁵} ∩ {f | ⇑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴})

Next tactic:
apply IsOpen.inter
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; intro
        repeat' 

Proof state:
case h.h.h.h.h.h.h.h.h.h₁
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen ({f | ⇑f '' {i✝⁸} ⊆ i✝⁶} ∩ {f | ⇑f '' {i✝⁷} ⊆ i✝⁵})

Next tactic:
apply IsOpen.inter
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; intro
        repeat' 

Proof state:
case h.h.h.h.h.h.h.h.h.h₁.h₁
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen {f | ⇑f '' {i✝⁸} ⊆ i✝⁶}

Next tactic:
apply IsOpen.inter
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; intro
        repeat' 

Proof state:
case h.h.h.h.h.h.h.h.h.h₁.h₂
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen {f | ⇑f '' {i✝⁷} ⊆ i✝⁵}

Next tactic:
apply IsOpen.inter
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; intro
        repeat' 

Proof state:
case h.h.h.h.h.h.h.h.h.h₂
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen {f | ⇑f '' {i✝⁸ * i✝⁷} ⊆ i✝⁴}

Next tactic:
apply IsOpen.inter
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; intro
        repeat' apply IsOpen.inter
        all_goals 

Proof state:
case h.h.h.h.h.h.h.h.h.h₁.h₁
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen {f | ⇑f '' {i✝⁸} ⊆ i✝⁶}

Next tactic:
apply ContinuousMap.isOpen_gen isCompact_singleton
@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) :=
  ⟨embedding_toContinuousMap A B,
    ⟨by
      suffices
        Set.range (toContinuousMap : ContinuousMonoidHom A B → C(A, B)) =
          ({ f | f '' {1} ⊆ {1}ᶜ } ∪
              ⋃ (x) (y) (U) (V) (W) (_ : IsOpen U) (_ : IsOpen V) (_ : IsOpen W) (_ :
                Disjoint (U * V) W),
                { f | f '' {x} ⊆ U } ∩ { f | f '' {y} ⊆ V } ∩ { f | f '' {x * y} ⊆ W } :
                  Set C(A , B))ᶜ by
        rw [this, compl_compl]
        refine' (ContinuousMap.isOpen_gen isCompact_singleton isOpen_compl_singleton).union _
        repeat' apply isOpen_iUnion; intro
        repeat' apply IsOpen.inter
        all_goals apply ContinuousMap.isOpen_gen isCompact_singleton; 

Proof state:
case h.h.h.h.h.h.h.h.h.h₁.h₁
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹² : Monoid A
inst✝¹¹ : Monoid B
inst✝¹⁰ : Monoid C
inst✝⁹ : Monoid D
inst✝⁸ : CommGroup E
inst✝⁷ : TopologicalSpace A
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace C
inst✝⁴ : TopologicalSpace D
inst✝³ : TopologicalSpace E
inst✝² : TopologicalGroup E
inst✝¹ : ContinuousMul B
inst✝ : T2Space B
this :
  Set.range toContinuousMap =
    ({f | ⇑f '' {1} ⊆ {1}ᶜ} ∪
        ⋃ x,
          ⋃ y,
            ⋃ U,
              ⋃ V,
                ⋃ W,
                  ⋃ (_ : IsOpen U),
                    ⋃ (_ : IsOpen V),
                      ⋃ (_ : IsOpen W),
                        ⋃ (_ : Disjoint (U * V) W),
                          {f | ⇑f '' {x} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {x * y} ⊆ W})ᶜ
i✝⁸ i✝⁷ : A
i✝⁶ i✝⁵ i✝⁴ : Set B
i✝³ : IsOpen i✝⁶
i✝² : IsOpen i✝⁵
i✝¹ : IsOpen i✝⁴
i✝ : Disjoint (i✝⁶ * i✝⁵) i✝⁴
⊢ IsOpen i✝⁶

Next tactic:
assumption