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' apply isOpen_iUnion; 

Proof state:
case 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 : A),
    IsOpen
      (⋃ y,
        ⋃ U,
          ⋃ V,
            ⋃ W,
              ⋃ (_ : IsOpen U),
                ⋃ (_ : IsOpen V),
                  ⋃ (_ : IsOpen W),
                    ⋃ (_ : Disjoint (U * V) W), {f | ⇑f '' {i} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {i * y} ⊆ W})

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
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✝ : A
⊢ IsOpen
    (⋃ y,
      ⋃ U,
        ⋃ V,
          ⋃ W,
            ⋃ (_ : IsOpen U),
              ⋃ (_ : IsOpen V),
                ⋃ (_ : IsOpen W),
                  ⋃ (_ : Disjoint (U * V) W), {f | ⇑f '' {i✝} ⊆ U} ∩ {f | ⇑f '' {y} ⊆ V} ∩ {f | ⇑f '' {i✝ * y} ⊆ W})

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
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✝ : A
⊢ ∀ (i : A),
    IsOpen
      (⋃ U,
        ⋃ V,
          ⋃ W,
            ⋃ (_ : IsOpen U),
              ⋃ (_ : IsOpen V),
                ⋃ (_ : IsOpen W),
                  ⋃ (_ : Disjoint (U * V) W), {f | ⇑f '' {i✝} ⊆ U} ∩ {f | ⇑f '' {i} ⊆ V} ∩ {f | ⇑f '' {i✝ * i} ⊆ W})

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
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
⊢ IsOpen
    (⋃ U,
      ⋃ V,
        ⋃ W,
          ⋃ (_ : IsOpen U),
            ⋃ (_ : IsOpen V),
              ⋃ (_ : IsOpen W),
                ⋃ (_ : Disjoint (U * V) W), {f | ⇑f '' {i✝¹} ⊆ U} ∩ {f | ⇑f '' {i✝} ⊆ V} ∩ {f | ⇑f '' {i✝¹ * i✝} ⊆ W})

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
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 : Set B),
    IsOpen
      (⋃ V,
        ⋃ W,
          ⋃ (_ : IsOpen i),
            ⋃ (_ : IsOpen V),
              ⋃ (_ : IsOpen W),
                ⋃ (_ : Disjoint (i * V) W), {f | ⇑f '' {i✝¹} ⊆ i} ∩ {f | ⇑f '' {i✝} ⊆ V} ∩ {f | ⇑f '' {i✝¹ * i✝} ⊆ W})

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
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✝ : Set B
⊢ IsOpen
    (⋃ V,
      ⋃ W,
        ⋃ (_ : IsOpen i✝),
          ⋃ (_ : IsOpen V),
            ⋃ (_ : IsOpen W),
              ⋃ (_ : Disjoint (i✝ * V) W), {f | ⇑f '' {i✝²} ⊆ i✝} ∩ {f | ⇑f '' {i✝¹} ⊆ V} ∩ {f | ⇑f '' {i✝² * i✝¹} ⊆ W})

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
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✝ : Set B
⊢ ∀ (i : Set B),
    IsOpen
      (⋃ W,
        ⋃ (_ : IsOpen i✝),
          ⋃ (_ : IsOpen i),
            ⋃ (_ : IsOpen W),
              ⋃ (_ : Disjoint (i✝ * i) W), {f | ⇑f '' {i✝²} ⊆ i✝} ∩ {f | ⇑f '' {i✝¹} ⊆ i} ∩ {f | ⇑f '' {i✝² * i✝¹} ⊆ W})

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
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✝ : Set B
⊢ IsOpen
    (⋃ W,
      ⋃ (_ : IsOpen i✝¹),
        ⋃ (_ : IsOpen i✝),
          ⋃ (_ : IsOpen W),
            ⋃ (_ : Disjoint (i✝¹ * i✝) W),
              {f | ⇑f '' {i✝³} ⊆ i✝¹} ∩ {f | ⇑f '' {i✝²} ⊆ i✝} ∩ {f | ⇑f '' {i✝³ * i✝²} ⊆ W})

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
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✝ : Set B
⊢ ∀ (i : Set B),
    IsOpen
      (⋃ (_ : IsOpen i✝¹),
        ⋃ (_ : IsOpen i✝),
          ⋃ (_ : IsOpen i),
            ⋃ (_ : 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
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
⊢ IsOpen
    (⋃ (_ : IsOpen i✝²),
      ⋃ (_ : IsOpen i✝¹),
        ⋃ (_ : 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
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
⊢ IsOpen i✝² →
    IsOpen
      (⋃ (_ : IsOpen i✝¹),
        ⋃ (_ : IsOpen i✝),
          ⋃ (_ : 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
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✝³
⊢ IsOpen
    (⋃ (_ : IsOpen i✝²),
      ⋃ (_ : 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
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✝³
⊢ IsOpen i✝² →
    IsOpen
      (⋃ (_ : IsOpen i✝¹),
        ⋃ (_ : Disjoint (i✝³ * i✝²) i✝¹),
          {f | ⇑f '' {i✝⁵} ⊆ i✝³} ∩ {f | ⇑f '' {i✝⁴} ⊆ i✝²} ∩ {f | ⇑f '' {i✝⁵ * i✝⁴} ⊆ i✝¹})

Next tactic:
intro