l3lab/ntp-mathlib huggingface dataset:
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    

Proof state:
case mk.right
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
key :
  ∃ U ∈ comap (⇑e) (𝓝 x₀),
    ∃ V ∈ comap (⇑f) (𝓝 y₀),
      ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
⊢ W' ∈
    map (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1)
      (comap (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))

Next tactic:
rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    

Proof state:
case mk.right.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
U_nhd : U ∈ comap (⇑e) (𝓝 x₀)
V : Set δ
V_nhd : V ∈ comap (⇑f) (𝓝 y₀)
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
⊢ W' ∈
    map (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1)
      (comap (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))

Next tactic:
rw [mem_comap] at U_nhd
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    rw [mem_comap] at U_nhd
    

Proof state:
case mk.right.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
U_nhd : ∃ t ∈ 𝓝 x₀, ⇑e ⁻¹' t ⊆ U
V : Set δ
V_nhd : V ∈ comap (⇑f) (𝓝 y₀)
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
⊢ W' ∈
    map (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1)
      (comap (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))

Next tactic:
rcases U_nhd with ⟨U', U'_nhd, U'_sub⟩
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    rw [mem_comap] at U_nhd
    rcases U_nhd with ⟨U', U'_nhd, U'_sub⟩
    

Proof state:
case mk.right.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
V : Set δ
V_nhd : V ∈ comap (⇑f) (𝓝 y₀)
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
U' : Set α
U'_nhd : U' ∈ 𝓝 x₀
U'_sub : ⇑e ⁻¹' U' ⊆ U
⊢ W' ∈
    map (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1)
      (comap (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))

Next tactic:
rw [mem_comap] at V_nhd
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    rw [mem_comap] at U_nhd
    rcases U_nhd with ⟨U', U'_nhd, U'_sub⟩
    rw [mem_comap] at V_nhd
    

Proof state:
case mk.right.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
V : Set δ
V_nhd : ∃ t ∈ 𝓝 y₀, ⇑f ⁻¹' t ⊆ V
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
U' : Set α
U'_nhd : U' ∈ 𝓝 x₀
U'_sub : ⇑e ⁻¹' U' ⊆ U
⊢ W' ∈
    map (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1)
      (comap (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))

Next tactic:
rcases V_nhd with ⟨V', V'_nhd, V'_sub⟩
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    rw [mem_comap] at U_nhd
    rcases U_nhd with ⟨U', U'_nhd, U'_sub⟩
    rw [mem_comap] at V_nhd
    rcases V_nhd with ⟨V', V'_nhd, V'_sub⟩
    

Proof state:
case mk.right.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
V : Set δ
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
U' : Set α
U'_nhd : U' ∈ 𝓝 x₀
U'_sub : ⇑e ⁻¹' U' ⊆ U
V' : Set γ
V'_nhd : V' ∈ 𝓝 y₀
V'_sub : ⇑f ⁻¹' V' ⊆ V
⊢ W' ∈
    map (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1)
      (comap (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀)))

Next tactic:
rw [mem_map, mem_comap, nhds_prod_eq]
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    rw [mem_comap] at U_nhd
    rcases U_nhd with ⟨U', U'_nhd, U'_sub⟩
    rw [mem_comap] at V_nhd
    rcases V_nhd with ⟨V', V'_nhd, V'_sub⟩
    rw [mem_map, mem_comap, nhds_prod_eq]
    

Proof state:
case mk.right.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
V : Set δ
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
U' : Set α
U'_nhd : U' ∈ 𝓝 x₀
U'_sub : ⇑e ⁻¹' U' ⊆ U
V' : Set γ
V'_nhd : V' ∈ 𝓝 y₀
V'_sub : ⇑f ⁻¹' V' ⊆ V
⊢ ∃ t ∈ (𝓝 x₀ ×ˢ 𝓝 y₀) ×ˢ 𝓝 x₀ ×ˢ 𝓝 y₀,
    (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) ⁻¹' t ⊆
      (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1) ⁻¹' W'

Next tactic:
exists (U' ×ˢ V') ×ˢ U' ×ˢ V'
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    rw [mem_comap] at U_nhd
    rcases U_nhd with ⟨U', U'_nhd, U'_sub⟩
    rw [mem_comap] at V_nhd
    rcases V_nhd with ⟨V', V'_nhd, V'_sub⟩
    rw [mem_map, mem_comap, nhds_prod_eq]
    exists (U' ×ˢ V') ×ˢ U' ×ˢ V'
    

Proof state:
case mk.right.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
V : Set δ
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
U' : Set α
U'_nhd : U' ∈ 𝓝 x₀
U'_sub : ⇑e ⁻¹' U' ⊆ U
V' : Set γ
V'_nhd : V' ∈ 𝓝 y₀
V'_sub : ⇑f ⁻¹' V' ⊆ V
⊢ (U' ×ˢ V') ×ˢ U' ×ˢ V' ∈ (𝓝 x₀ ×ˢ 𝓝 y₀) ×ˢ 𝓝 x₀ ×ˢ 𝓝 y₀ ∧
    (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) ⁻¹' (U' ×ˢ V') ×ˢ U' ×ˢ V' ⊆
      (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1) ⁻¹' W'

Next tactic:
rw [mem_prod_same_iff]
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    rw [mem_comap] at U_nhd
    rcases U_nhd with ⟨U', U'_nhd, U'_sub⟩
    rw [mem_comap] at V_nhd
    rcases V_nhd with ⟨V', V'_nhd, V'_sub⟩
    rw [mem_map, mem_comap, nhds_prod_eq]
    exists (U' ×ˢ V') ×ˢ U' ×ˢ V'
    rw [mem_prod_same_iff]
    

Proof state:
case mk.right.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
V : Set δ
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
U' : Set α
U'_nhd : U' ∈ 𝓝 x₀
U'_sub : ⇑e ⁻¹' U' ⊆ U
V' : Set γ
V'_nhd : V' ∈ 𝓝 y₀
V'_sub : ⇑f ⁻¹' V' ⊆ V
⊢ (∃ t ∈ 𝓝 x₀ ×ˢ 𝓝 y₀, t ×ˢ t ⊆ (U' ×ˢ V') ×ˢ U' ×ˢ V') ∧
    (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) ⁻¹' (U' ×ˢ V') ×ˢ U' ×ˢ V' ⊆
      (fun p => (fun p => (φ p.1) p.2) p.2 - (fun p => (φ p.1) p.2) p.1) ⁻¹' W'

Next tactic:
simp only [exists_prop]
/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2)) := by
  refine' continuous_extend_of_cauchy _ _
  rintro ⟨x₀, y₀⟩
  constructor
  · apply NeBot.map
    apply comap_neBot
    intro U h
    rcases mem_closure_iff_nhds.1 ((de.prod df).dense (x₀, y₀)) U h with ⟨x, x_in, ⟨z, z_x⟩⟩
    exists z
    aesop
  · suffices map (fun p : (β × δ) × β × δ => (fun p : β × δ => φ p.1 p.2) p.2 -
      (fun p : β × δ => φ p.1 p.2) p.1)
        (comap (fun p : (β × δ) × β × δ => ((e p.1.1, f p.1.2), (e p.2.1, f p.2.2)))
        (𝓝 (x₀, y₀) ×ˢ 𝓝 (x₀, y₀))) ≤ 𝓝 0 by
      rwa [uniformity_eq_comap_nhds_zero G, prod_map_map_eq, ← map_le_iff_le_comap, Filter.map_map,
        prod_comap_comap_eq]
    intro W' W'_nhd
    have key := extend_Z_bilin_key de df hφ W'_nhd x₀ y₀
    rcases key with ⟨U, U_nhd, V, V_nhd, h⟩
    rw [mem_comap] at U_nhd
    rcases U_nhd with ⟨U', U'_nhd, U'_sub⟩
    rw [mem_comap] at V_nhd
    rcases V_nhd with ⟨V', V'_nhd, V'_sub⟩
    rw [mem_map, mem_comap, nhds_prod_eq]
    exists (U' ×ˢ V') ×ˢ U' ×ˢ V'
    rw [mem_prod_same_iff]
    simp only [exists_prop]
    

Proof state:
case mk.right.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝¹⁶ : TopologicalSpace α
inst✝¹⁵ : AddCommGroup α
inst✝¹⁴ : TopologicalAddGroup α
inst✝¹³ : TopologicalSpace β
inst✝¹² : AddCommGroup β
inst✝¹¹ : TopologicalAddGroup β
inst✝¹⁰ : TopologicalSpace γ
inst✝⁹ : AddCommGroup γ
inst✝⁸ : TopologicalAddGroup γ
inst✝⁷ : TopologicalSpace δ
inst✝⁶ : AddCommGroup δ
inst✝⁵ : TopologicalAddGroup δ
inst✝⁴ : UniformSpace G
inst✝³ : AddCommGroup G
inst✝² : UniformAddGroup G
inst✝¹ : SeparatedSpace G
inst✝ : CompleteSpace G
e : β →+ α
de : DenseInducing ⇑e
f : δ →+ γ
df : DenseInducing ⇑f
φ : β →+ δ →+ G
hφ : Continuous fun p => (φ p.1) p.2
W'✝ : Set G
W'_nhd✝ : W'✝ ∈ 𝓝 0
x₀ : α
y₀ : γ
W' : Set G
W'_nhd : W' ∈ 𝓝 0
U : Set β
V : Set δ
h : ∀ x ∈ U, ∀ x' ∈ U, ∀ y ∈ V, ∀ y' ∈ V, (fun p => (φ p.1) p.2) (x', y') - (fun p => (φ p.1) p.2) (x, y) ∈ W'
U' : Set α
U'_nhd : U' ∈ 𝓝 x₀
U'_sub : ⇑e ⁻¹' U' ⊆ U
V' : Set γ
V'_nhd : V' ∈ 𝓝 y₀
V'_sub : ⇑f ⁻¹' V' ⊆ V
⊢ (∃ t ∈ 𝓝 x₀ ×ˢ 𝓝 y₀, t ×ˢ t ⊆ (U' ×ˢ V') ×ˢ U' ×ˢ V') ∧
    (fun p => ((e p.1.1, f p.1.2), e p.2.1, f p.2.2)) ⁻¹' (U' ×ˢ V') ×ˢ U' ×ˢ V' ⊆
      (fun p => (φ p.2.1) p.2.2 - (φ p.1.1) p.1.2) ⁻¹' W'

Next tactic:
constructor