topology.uniform_space.piMathlib.Topology.UniformSpace.Pi

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -76,13 +76,15 @@ instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i)
 #align Pi.complete Pi.complete
 -/
 
-#print Pi.separated /-
-instance Pi.separated [∀ i, SeparatedSpace (α i)] : SeparatedSpace (∀ i, α i) :=
-  separated_def.2 fun x y H => by
+/- warning: Pi.separated clashes with pi.t0_space -> Pi.instT0Space
+Case conversion may be inaccurate. Consider using '#align Pi.separated Pi.instT0Spaceₓ'. -/
+#print Pi.instT0Space /-
+instance Pi.instT0Space [∀ i, T0Space (α i)] : T0Space (∀ i, α i) :=
+  t0Space_iff_uniformity.2 fun x y H => by
     ext i
     apply eq_of_separated_of_uniform_continuous (Pi.uniformContinuous_proj α i)
     apply H
-#align Pi.separated Pi.separated
+#align Pi.separated Pi.instT0Space
 -/
 
 end
Diff
@@ -32,7 +32,7 @@ variable {ι : Type _} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)]
 instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
   UniformSpace.ofCoreEq (⨅ i, UniformSpace.comap (fun a : ∀ i, α i => a i) (U i)).toCore
       Pi.topologicalSpace <|
-    Eq.symm toTopologicalSpace_iInf
+    Eq.symm UniformSpace.toTopologicalSpace_iInf
 #align Pi.uniform_space Pi.uniformSpace
 -/
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2019 Patrick Massot. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Patrick Massot
 -/
-import Mathbin.Topology.UniformSpace.Cauchy
-import Mathbin.Topology.UniformSpace.Separation
+import Topology.UniformSpace.Cauchy
+import Topology.UniformSpace.Separation
 
 #align_import topology.uniform_space.pi from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2019 Patrick Massot. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Patrick Massot
-
-! This file was ported from Lean 3 source module topology.uniform_space.pi
-! leanprover-community/mathlib commit 0a0ec35061ed9960bf0e7ffb0335f44447b58977
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Topology.UniformSpace.Cauchy
 import Mathbin.Topology.UniformSpace.Separation
 
+#align_import topology.uniform_space.pi from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
+
 /-!
 # Indexed product of uniform spaces
 
Diff
@@ -31,8 +31,6 @@ universe u
 
 variable {ι : Type _} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)]
 
-include U
-
 #print Pi.uniformSpace /-
 instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
   UniformSpace.ofCoreEq (⨅ i, UniformSpace.comap (fun a : ∀ i, α i => a i) (U i)).toCore
@@ -41,22 +39,28 @@ instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
 #align Pi.uniform_space Pi.uniformSpace
 -/
 
+#print Pi.uniformity /-
 theorem Pi.uniformity : 𝓤 (∀ i, α i) = ⨅ i : ι, (Filter.comap fun a => (a.1 i, a.2 i)) <| 𝓤 (α i) :=
   iInf_uniformity
 #align Pi.uniformity Pi.uniformity
+-/
 
 variable {α}
 
+#print uniformContinuous_pi /-
 theorem uniformContinuous_pi {β : Type _} [UniformSpace β] {f : β → ∀ i, α i} :
     UniformContinuous f ↔ ∀ i, UniformContinuous fun x => f x i := by
   simp only [UniformContinuous, Pi.uniformity, tendsto_infi, tendsto_comap_iff]
 #align uniform_continuous_pi uniformContinuous_pi
+-/
 
 variable (α)
 
+#print Pi.uniformContinuous_proj /-
 theorem Pi.uniformContinuous_proj (i : ι) : UniformContinuous fun a : ∀ i : ι, α i => a i :=
   uniformContinuous_pi.1 uniformContinuous_id i
 #align Pi.uniform_continuous_proj Pi.uniformContinuous_proj
+-/
 
 #print Pi.complete /-
 instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i) :=
Diff
@@ -21,7 +21,7 @@ import Mathbin.Topology.UniformSpace.Separation
 
 noncomputable section
 
-open uniformity Topology
+open scoped uniformity Topology
 
 section
 
Diff
@@ -41,24 +41,12 @@ instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
 #align Pi.uniform_space Pi.uniformSpace
 -/
 
-/- warning: Pi.uniformity -> Pi.uniformity is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u2}} (α : ι -> Type.{u1}) [U : forall (i : ι), UniformSpace.{u1} (α i)], Eq.{succ (max u2 u1)} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (uniformity.{max u2 u1} (forall (i : ι), α i) (Pi.uniformSpace.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => U i))) (iInf.{max u2 u1, succ u2} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (ConditionallyCompleteLattice.toHasInf.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (CompleteLattice.toConditionallyCompleteLattice.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (Filter.completeLattice.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))))) ι (fun (i : ι) => Filter.comap.{max u2 u1, u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) (Prod.{u1, u1} (α i) (α i)) (fun (a : Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) => Prod.mk.{u1, u1} (α i) (α i) (Prod.fst.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i) (Prod.snd.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i)) (uniformity.{u1} (α i) (U i))))
-but is expected to have type
-  forall {ι : Type.{u1}} (α : ι -> Type.{u2}) [U : forall (i : ι), UniformSpace.{u2} (α i)], Eq.{max (succ u2) (succ u1)} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (uniformity.{max u2 u1} (forall (i : ι), α i) (Pi.uniformSpace.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => U i))) (iInf.{max u2 u1, succ u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (ConditionallyCompleteLattice.toInfSet.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (CompleteLattice.toConditionallyCompleteLattice.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (Filter.instCompleteLatticeFilter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))))) ι (fun (i : ι) => Filter.comap.{max u2 u1, u2} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) (Prod.{u2, u2} (α i) (α i)) (fun (a : Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) => Prod.mk.{u2, u2} (α i) (α i) (Prod.fst.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i) (Prod.snd.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i)) (uniformity.{u2} (α i) (U i))))
-Case conversion may be inaccurate. Consider using '#align Pi.uniformity Pi.uniformityₓ'. -/
 theorem Pi.uniformity : 𝓤 (∀ i, α i) = ⨅ i : ι, (Filter.comap fun a => (a.1 i, a.2 i)) <| 𝓤 (α i) :=
   iInf_uniformity
 #align Pi.uniformity Pi.uniformity
 
 variable {α}
 
-/- warning: uniform_continuous_pi -> uniformContinuous_pi is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [U : forall (i : ι), UniformSpace.{u1} (α i)] {β : Type.{u3}} [_inst_1 : UniformSpace.{u3} β] {f : β -> (forall (i : ι), α i)}, Iff (UniformContinuous.{u3, max u2 u1} β (forall (i : ι), α i) _inst_1 (Pi.uniformSpace.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => U i)) f) (forall (i : ι), UniformContinuous.{u3, u1} β (α i) _inst_1 (U i) (fun (x : β) => f x i))
-but is expected to have type
-  forall {ι : Type.{u1}} {α : ι -> Type.{u3}} [U : forall (i : ι), UniformSpace.{u3} (α i)] {β : Type.{u2}} [_inst_1 : UniformSpace.{u2} β] {f : β -> (forall (i : ι), α i)}, Iff (UniformContinuous.{u2, max u3 u1} β (forall (i : ι), α i) _inst_1 (Pi.uniformSpace.{u3, u1} ι (fun (i : ι) => α i) (fun (i : ι) => U i)) f) (forall (i : ι), UniformContinuous.{u2, u3} β (α i) _inst_1 (U i) (fun (x : β) => f x i))
-Case conversion may be inaccurate. Consider using '#align uniform_continuous_pi uniformContinuous_piₓ'. -/
 theorem uniformContinuous_pi {β : Type _} [UniformSpace β] {f : β → ∀ i, α i} :
     UniformContinuous f ↔ ∀ i, UniformContinuous fun x => f x i := by
   simp only [UniformContinuous, Pi.uniformity, tendsto_infi, tendsto_comap_iff]
@@ -66,12 +54,6 @@ theorem uniformContinuous_pi {β : Type _} [UniformSpace β] {f : β → ∀ i,
 
 variable (α)
 
-/- warning: Pi.uniform_continuous_proj -> Pi.uniformContinuous_proj is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u2}} (α : ι -> Type.{u1}) [U : forall (i : ι), UniformSpace.{u1} (α i)] (i : ι), UniformContinuous.{max u2 u1, u1} (forall (i : ι), α i) (α i) (Pi.uniformSpace.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => U i)) (U i) (fun (a : forall (i : ι), α i) => a i)
-but is expected to have type
-  forall {ι : Type.{u1}} (α : ι -> Type.{u2}) [U : forall (i : ι), UniformSpace.{u2} (α i)] (i : ι), UniformContinuous.{max u2 u1, u2} (forall (i : ι), α i) (α i) (Pi.uniformSpace.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => U i)) (U i) (fun (a : forall (i : ι), α i) => a i)
-Case conversion may be inaccurate. Consider using '#align Pi.uniform_continuous_proj Pi.uniformContinuous_projₓ'. -/
 theorem Pi.uniformContinuous_proj (i : ι) : UniformContinuous fun a : ∀ i : ι, α i => a i :=
   uniformContinuous_pi.1 uniformContinuous_id i
 #align Pi.uniform_continuous_proj Pi.uniformContinuous_proj
Diff
@@ -37,18 +37,18 @@ include U
 instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
   UniformSpace.ofCoreEq (⨅ i, UniformSpace.comap (fun a : ∀ i, α i => a i) (U i)).toCore
       Pi.topologicalSpace <|
-    Eq.symm toTopologicalSpace_infᵢ
+    Eq.symm toTopologicalSpace_iInf
 #align Pi.uniform_space Pi.uniformSpace
 -/
 
 /- warning: Pi.uniformity -> Pi.uniformity is a dubious translation:
 lean 3 declaration is
-  forall {ι : Type.{u2}} (α : ι -> Type.{u1}) [U : forall (i : ι), UniformSpace.{u1} (α i)], Eq.{succ (max u2 u1)} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (uniformity.{max u2 u1} (forall (i : ι), α i) (Pi.uniformSpace.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => U i))) (infᵢ.{max u2 u1, succ u2} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (ConditionallyCompleteLattice.toHasInf.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (CompleteLattice.toConditionallyCompleteLattice.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (Filter.completeLattice.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))))) ι (fun (i : ι) => Filter.comap.{max u2 u1, u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) (Prod.{u1, u1} (α i) (α i)) (fun (a : Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) => Prod.mk.{u1, u1} (α i) (α i) (Prod.fst.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i) (Prod.snd.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i)) (uniformity.{u1} (α i) (U i))))
+  forall {ι : Type.{u2}} (α : ι -> Type.{u1}) [U : forall (i : ι), UniformSpace.{u1} (α i)], Eq.{succ (max u2 u1)} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (uniformity.{max u2 u1} (forall (i : ι), α i) (Pi.uniformSpace.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => U i))) (iInf.{max u2 u1, succ u2} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (ConditionallyCompleteLattice.toHasInf.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (CompleteLattice.toConditionallyCompleteLattice.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (Filter.completeLattice.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))))) ι (fun (i : ι) => Filter.comap.{max u2 u1, u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) (Prod.{u1, u1} (α i) (α i)) (fun (a : Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) => Prod.mk.{u1, u1} (α i) (α i) (Prod.fst.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i) (Prod.snd.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i)) (uniformity.{u1} (α i) (U i))))
 but is expected to have type
-  forall {ι : Type.{u1}} (α : ι -> Type.{u2}) [U : forall (i : ι), UniformSpace.{u2} (α i)], Eq.{max (succ u2) (succ u1)} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (uniformity.{max u2 u1} (forall (i : ι), α i) (Pi.uniformSpace.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => U i))) (infᵢ.{max u2 u1, succ u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (ConditionallyCompleteLattice.toInfSet.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (CompleteLattice.toConditionallyCompleteLattice.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (Filter.instCompleteLatticeFilter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))))) ι (fun (i : ι) => Filter.comap.{max u2 u1, u2} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) (Prod.{u2, u2} (α i) (α i)) (fun (a : Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) => Prod.mk.{u2, u2} (α i) (α i) (Prod.fst.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i) (Prod.snd.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i)) (uniformity.{u2} (α i) (U i))))
+  forall {ι : Type.{u1}} (α : ι -> Type.{u2}) [U : forall (i : ι), UniformSpace.{u2} (α i)], Eq.{max (succ u2) (succ u1)} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (uniformity.{max u2 u1} (forall (i : ι), α i) (Pi.uniformSpace.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => U i))) (iInf.{max u2 u1, succ u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (ConditionallyCompleteLattice.toInfSet.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (CompleteLattice.toConditionallyCompleteLattice.{max u2 u1} (Filter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))) (Filter.instCompleteLatticeFilter.{max u2 u1} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i))))) ι (fun (i : ι) => Filter.comap.{max u2 u1, u2} (Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) (Prod.{u2, u2} (α i) (α i)) (fun (a : Prod.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i)) => Prod.mk.{u2, u2} (α i) (α i) (Prod.fst.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i) (Prod.snd.{max u2 u1, max u2 u1} (forall (i : ι), α i) (forall (i : ι), α i) a i)) (uniformity.{u2} (α i) (U i))))
 Case conversion may be inaccurate. Consider using '#align Pi.uniformity Pi.uniformityₓ'. -/
 theorem Pi.uniformity : 𝓤 (∀ i, α i) = ⨅ i : ι, (Filter.comap fun a => (a.1 i, a.2 i)) <| 𝓤 (α i) :=
-  infᵢ_uniformity
+  iInf_uniformity
 #align Pi.uniformity Pi.uniformity
 
 variable {α}

Changes in mathlib4

mathlib3
mathlib4
feat: general Ascoli theorem (#6844)

Co-authored-by: @vbeffara (port to Lean4), @tb65536 (suggested to skip the totally bounded case and go straight to compactness using Tykhonov)

This was discussed on Zulip recently and a while ago.

Diff
@@ -22,13 +22,13 @@ universe u
 variable {ι ι' β : Type*} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)] [UniformSpace β]
 
 instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
-  UniformSpace.ofCoreEq (⨅ i, UniformSpace.comap (fun a : ∀ i, α i => a i) (U i)).toCore
+  UniformSpace.ofCoreEq (⨅ i, UniformSpace.comap (eval i) (U i)).toCore
       Pi.topologicalSpace <|
     Eq.symm toTopologicalSpace_iInf
 #align Pi.uniform_space Pi.uniformSpace
 
 lemma Pi.uniformSpace_eq :
-    Pi.uniformSpace α = ⨅ i, UniformSpace.comap (fun a : (∀ i, α i) ↦ a i) (U i) := by
+    Pi.uniformSpace α = ⨅ i, UniformSpace.comap (eval i) (U i) := by
   ext : 1; rfl
 
 theorem Pi.uniformity :
@@ -116,6 +116,11 @@ instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i)
 
 #align Pi.separated Pi.instT0Space
 
+lemma Pi.uniformSpace_comap_restrict_sUnion (𝔖 : Set (Set ι)) :
+    UniformSpace.comap (⋃₀ 𝔖).restrict (Pi.uniformSpace (fun i : (⋃₀ 𝔖) ↦ α i)) =
+    ⨅ S ∈ 𝔖, UniformSpace.comap S.restrict (Pi.uniformSpace (fun i : S ↦ α i)) := by
+  simp_rw [Pi.uniformSpace_comap_restrict α, iInf_sUnion]
+
 /- An infimum of complete uniformities is complete,
 as long as the whole family is bounded by some common T2 topology. -/
 protected theorem CompleteSpace.iInf {ι X : Type*} {u : ι → UniformSpace X}
feat: better polishSpace_of_complete_second_countable (#10890)
  • Make it work for a UniformSpace with extra properties.
  • Use it to golf some instances.

Co-authored-by: @ADedecker

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2019 Patrick Massot. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Patrick Massot
 -/
-import Mathlib.Topology.UniformSpace.Cauchy
+import Mathlib.Topology.UniformSpace.UniformEmbedding
 
 #align_import topology.uniform_space.pi from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
 
@@ -14,11 +14,8 @@ import Mathlib.Topology.UniformSpace.Cauchy
 
 noncomputable section
 
-open Uniformity Topology
-
-section
-
-open Filter UniformSpace Function
+open scoped Uniformity Topology
+open Filter UniformSpace Function Set
 
 universe u
 
@@ -119,4 +116,27 @@ instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i)
 
 #align Pi.separated Pi.instT0Space
 
-end
+/- An infimum of complete uniformities is complete,
+as long as the whole family is bounded by some common T2 topology. -/
+protected theorem CompleteSpace.iInf {ι X : Type*} {u : ι → UniformSpace X}
+    (hu : ∀ i, @CompleteSpace X (u i))
+    (ht : ∃ t, @T2Space X t ∧ ∀ i, (u i).toTopologicalSpace ≤ t) :
+    @CompleteSpace X (⨅ i, u i) := by
+  -- We can assume `X` is nonempty.
+  nontriviality X
+  rcases ht with ⟨t, ht, hut⟩
+  -- The diagonal map `(X, ⨅ i, u i) → ∀ i, (X, u i)` is a uniform embedding.
+  have : @UniformInducing X (ι → X) (⨅ i, u i) (Pi.uniformSpace (U := u)) (const ι) := by
+    simp_rw [uniformInducing_iff, iInf_uniformity, Pi.uniformity, Filter.comap_iInf,
+      Filter.comap_comap, (· ∘ ·), const, Prod.eta, comap_id']
+  -- Hence, it suffices to show that its range, the diagonal, is closed in `Π i, (X, u i)`.
+  simp_rw [@completeSpace_iff_isComplete_range _ _ (_) (_) _ this, range_const_eq_diagonal,
+    setOf_forall]
+  -- The separation of `t` ensures that this is the case in `Π i, (X, t)`, hence the result
+  -- since the topology associated to each `u i` is finer than `t`.
+  have : Pi.topologicalSpace (t₂ := fun i ↦ (u i).toTopologicalSpace) ≤
+         Pi.topologicalSpace (t₂ := fun _ ↦ t) :=
+    iInf_mono fun i ↦ induced_mono <| hut i
+  refine IsClosed.isComplete <| .mono ?_ this
+  exact isClosed_iInter fun i ↦ isClosed_iInter fun j ↦
+    isClosed_eq (continuous_apply _) (continuous_apply _)
refactor(UniformSpace): drop separationRel (#10644)

We had duplicated API between topological spaces and uniform spaces. In this PR I mostly deduplicate it with some exceptions:

  • SeparationQuotient.lift' and SeparationQuotient.map are leftovers from the old version that are designed to work with uniform spaces;
  • probably, some theorems/instances still assume UniformSpace when TopologicalSpace would work.

Outside of UniformSpace/Separation, I mostly changed SeparatedSpace to T0Space and separationRel to Inseparable. I also rewrote a few proofs that were broken by the API change.

Fixes #2031

Diff
@@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Patrick Massot
 -/
 import Mathlib.Topology.UniformSpace.Cauchy
-import Mathlib.Topology.UniformSpace.Separation
 
 #align_import topology.uniform_space.pi from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
 
@@ -118,12 +117,6 @@ instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i)
     rwa [nhds_pi, le_pi]
 #align Pi.complete Pi.complete
 
-instance Pi.separated [∀ i, SeparatedSpace (α i)] : SeparatedSpace (∀ i, α i) :=
-  separated_def.2 fun x y H => by
-    ext i
-    -- Porting note: should be `eq_ofSeparated_ofUniformContinuous`?
-    apply eq_of_separated_of_uniformContinuous (Pi.uniformContinuous_proj α i)
-    apply H
-#align Pi.separated Pi.separated
+#align Pi.separated Pi.instT0Space
 
 end
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -49,7 +49,7 @@ instance [Countable ι] [∀ i, IsCountablyGenerated (𝓤 (α i))] :
 
 theorem uniformContinuous_pi {β : Type*} [UniformSpace β] {f : β → ∀ i, α i} :
     UniformContinuous f ↔ ∀ i, UniformContinuous fun x => f x i := by
-  -- porting note: required `Function.comp` to close
+  -- Porting note: required `Function.comp` to close
   simp only [UniformContinuous, Pi.uniformity, tendsto_iInf, tendsto_comap_iff, Function.comp]
 #align uniform_continuous_pi uniformContinuous_pi
 
@@ -121,7 +121,7 @@ instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i)
 instance Pi.separated [∀ i, SeparatedSpace (α i)] : SeparatedSpace (∀ i, α i) :=
   separated_def.2 fun x y H => by
     ext i
-    -- porting note: should be `eq_ofSeparated_ofUniformContinuous`?
+    -- Porting note: should be `eq_ofSeparated_ofUniformContinuous`?
     apply eq_of_separated_of_uniformContinuous (Pi.uniformContinuous_proj α i)
     apply H
 #align Pi.separated Pi.separated
feat(UniformSpace): add IsCountablyGenerated (𝓤 _) instances (#10699)

This typeclass says that the uniformity is pseudometrizable.

Diff
@@ -42,6 +42,11 @@ theorem Pi.uniformity :
 
 variable {α}
 
+instance [Countable ι] [∀ i, IsCountablyGenerated (𝓤 (α i))] :
+    IsCountablyGenerated (𝓤 (∀ i, α i)) := by
+  rw [Pi.uniformity]
+  infer_instance
+
 theorem uniformContinuous_pi {β : Type*} [UniformSpace β] {f : β → ∀ i, α i} :
     UniformContinuous f ↔ ∀ i, UniformContinuous fun x => f x i := by
   -- porting note: required `Function.comp` to close
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -88,7 +88,8 @@ lemma Pi.uniformContinuous_restrict (S : Set ι) :
 lemma Pi.uniformSpace_comap_restrict (S : Set ι) :
     UniformSpace.comap (S.restrict) (Pi.uniformSpace (fun i : S ↦ α i)) =
     ⨅ i ∈ S, UniformSpace.comap (eval i) (U i) := by
-  simp [← iInf_subtype'', ← uniformSpace_comap_precomp' _ ((↑) : S → ι), Set.restrict]
+  simp (config := { unfoldPartialApp := true })
+    [← iInf_subtype'', ← uniformSpace_comap_precomp' _ ((↑) : S → ι), Set.restrict]
 
 lemma cauchy_pi_iff [Nonempty ι] {l : Filter (∀ i, α i)} :
     Cauchy l ↔ ∀ i, Cauchy (map (eval i) l) := by
feat: piCongr for topological and uniform spaces (#6836)
Diff
@@ -23,7 +23,7 @@ open Filter UniformSpace Function
 
 universe u
 
-variable {ι : Type*} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)]
+variable {ι ι' β : Type*} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)] [UniformSpace β]
 
 instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
   UniformSpace.ofCoreEq (⨅ i, UniformSpace.comap (fun a : ∀ i, α i => a i) (U i)).toCore
@@ -54,6 +54,42 @@ theorem Pi.uniformContinuous_proj (i : ι) : UniformContinuous fun a : ∀ i : 
   uniformContinuous_pi.1 uniformContinuous_id i
 #align Pi.uniform_continuous_proj Pi.uniformContinuous_proj
 
+theorem Pi.uniformContinuous_precomp' (φ : ι' → ι) :
+    UniformContinuous (fun (f : (∀ i, α i)) (j : ι') ↦ f (φ j)) :=
+  uniformContinuous_pi.mpr fun j ↦ uniformContinuous_proj α (φ j)
+
+theorem Pi.uniformContinuous_precomp (φ : ι' → ι) :
+    UniformContinuous (· ∘ φ : (ι → β) → (ι' → β)) :=
+  Pi.uniformContinuous_precomp' _ φ
+
+theorem Pi.uniformContinuous_postcomp' {β : ι → Type*} [∀ i, UniformSpace (β i)]
+    {g : ∀ i, α i → β i} (hg : ∀ i, UniformContinuous (g i)) :
+    UniformContinuous (fun (f : (∀ i, α i)) (i : ι) ↦ g i (f i)) :=
+  uniformContinuous_pi.mpr fun i ↦ (hg i).comp <| uniformContinuous_proj α i
+
+theorem Pi.uniformContinuous_postcomp {α : Type*} [UniformSpace α] {g : α → β}
+    (hg : UniformContinuous g) : UniformContinuous (g ∘ · : (ι → α) → (ι → β)) :=
+  Pi.uniformContinuous_postcomp' _ fun _ ↦ hg
+
+lemma Pi.uniformSpace_comap_precomp' (φ : ι' → ι) :
+    UniformSpace.comap (fun g i' ↦ g (φ i')) (Pi.uniformSpace (fun i' ↦ α (φ i'))) =
+    ⨅ i', UniformSpace.comap (eval (φ i')) (U (φ i')) := by
+  simp [Pi.uniformSpace_eq, UniformSpace.comap_iInf, ← UniformSpace.comap_comap, comp]
+
+lemma Pi.uniformSpace_comap_precomp (φ : ι' → ι) :
+    UniformSpace.comap (· ∘ φ) (Pi.uniformSpace (fun _ ↦ β)) =
+    ⨅ i', UniformSpace.comap (eval (φ i')) ‹UniformSpace β› :=
+  uniformSpace_comap_precomp' (fun _ ↦ β) φ
+
+lemma Pi.uniformContinuous_restrict (S : Set ι) :
+    UniformContinuous (S.restrict : (∀ i : ι, α i) → (∀ i : S, α i)) :=
+  Pi.uniformContinuous_precomp' _ ((↑) : S → ι)
+
+lemma Pi.uniformSpace_comap_restrict (S : Set ι) :
+    UniformSpace.comap (S.restrict) (Pi.uniformSpace (fun i : S ↦ α i)) =
+    ⨅ i ∈ S, UniformSpace.comap (eval i) (U i) := by
+  simp [← iInf_subtype'', ← uniformSpace_comap_precomp' _ ((↑) : S → ι), Set.restrict]
+
 lemma cauchy_pi_iff [Nonempty ι] {l : Filter (∀ i, α i)} :
     Cauchy l ↔ ∀ i, Cauchy (map (eval i) l) := by
   simp_rw [Pi.uniformSpace_eq, cauchy_iInf_uniformSpace, cauchy_comap_uniformSpace]
feat: behavior of Cauchy under operations on UniformSpace (#6694)

Some of the lemmas are cherry-picked from leanprover-community/mathlib#17975 and will be useful for the general Arzela-Ascoli theorem, but I also filled some API holes on the way.

Diff
@@ -19,19 +19,22 @@ open Uniformity Topology
 
 section
 
-open Filter UniformSpace
+open Filter UniformSpace Function
 
 universe u
 
 variable {ι : Type*} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)]
 
-
 instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
   UniformSpace.ofCoreEq (⨅ i, UniformSpace.comap (fun a : ∀ i, α i => a i) (U i)).toCore
       Pi.topologicalSpace <|
     Eq.symm toTopologicalSpace_iInf
 #align Pi.uniform_space Pi.uniformSpace
 
+lemma Pi.uniformSpace_eq :
+    Pi.uniformSpace α = ⨅ i, UniformSpace.comap (fun a : (∀ i, α i) ↦ a i) (U i) := by
+  ext : 1; rfl
+
 theorem Pi.uniformity :
     𝓤 (∀ i, α i) = ⨅ i : ι, (Filter.comap fun a => (a.1 i, a.2 i)) (𝓤 (α i)) :=
   iInf_uniformity
@@ -51,18 +54,26 @@ theorem Pi.uniformContinuous_proj (i : ι) : UniformContinuous fun a : ∀ i : 
   uniformContinuous_pi.1 uniformContinuous_id i
 #align Pi.uniform_continuous_proj Pi.uniformContinuous_proj
 
-instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i) :=
-  ⟨by
-    intro f hf
-    haveI := hf.1
-    have : ∀ i, ∃ x : α i, Filter.map (fun a : ∀ i, α i => a i) f ≤ 𝓝 x := by
-      intro i
-      have key : Cauchy (map (fun a : ∀ i : ι, α i => a i) f) :=
-        hf.map (Pi.uniformContinuous_proj α i)
-      exact cauchy_iff_exists_le_nhds.1 key
-    choose x hx using this
+lemma cauchy_pi_iff [Nonempty ι] {l : Filter (∀ i, α i)} :
+    Cauchy l ↔ ∀ i, Cauchy (map (eval i) l) := by
+  simp_rw [Pi.uniformSpace_eq, cauchy_iInf_uniformSpace, cauchy_comap_uniformSpace]
+
+lemma cauchy_pi_iff' {l : Filter (∀ i, α i)} [l.NeBot] :
+    Cauchy l ↔ ∀ i, Cauchy (map (eval i) l) := by
+  simp_rw [Pi.uniformSpace_eq, cauchy_iInf_uniformSpace', cauchy_comap_uniformSpace]
+
+lemma Cauchy.pi [Nonempty ι] {l : ∀ i, Filter (α i)} (hl : ∀ i, Cauchy (l i)) :
+    Cauchy (Filter.pi l) := by
+  have := fun i ↦ (hl i).1
+  simpa [cauchy_pi_iff]
+
+instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i) where
+  complete {f} hf := by
+    have := hf.1
+    simp_rw [cauchy_pi_iff', cauchy_iff_exists_le_nhds] at hf
+    choose x hx using hf
     use x
-    rwa [nhds_pi, le_pi]⟩
+    rwa [nhds_pi, le_pi]
 #align Pi.complete Pi.complete
 
 instance Pi.separated [∀ i, SeparatedSpace (α i)] : SeparatedSpace (∀ i, α i) :=
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -23,7 +23,7 @@ open Filter UniformSpace
 
 universe u
 
-variable {ι : Type _} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)]
+variable {ι : Type*} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)]
 
 
 instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
@@ -39,7 +39,7 @@ theorem Pi.uniformity :
 
 variable {α}
 
-theorem uniformContinuous_pi {β : Type _} [UniformSpace β] {f : β → ∀ i, α i} :
+theorem uniformContinuous_pi {β : Type*} [UniformSpace β] {f : β → ∀ i, α i} :
     UniformContinuous f ↔ ∀ i, UniformContinuous fun x => f x i := by
   -- porting note: required `Function.comp` to close
   simp only [UniformContinuous, Pi.uniformity, tendsto_iInf, tendsto_comap_iff, Function.comp]
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2019 Patrick Massot. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Patrick Massot
-
-! This file was ported from Lean 3 source module topology.uniform_space.pi
-! leanprover-community/mathlib commit 2705404e701abc6b3127da906f40bae062a169c9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Topology.UniformSpace.Cauchy
 import Mathlib.Topology.UniformSpace.Separation
 
+#align_import topology.uniform_space.pi from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9"
+
 /-!
 # Indexed product of uniform spaces
 -/
fix: precedences of ⨆⋃⋂⨅ (#5614)
Diff
@@ -35,7 +35,8 @@ instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
     Eq.symm toTopologicalSpace_iInf
 #align Pi.uniform_space Pi.uniformSpace
 
-theorem Pi.uniformity : 𝓤 (∀ i, α i) = ⨅ i : ι, (Filter.comap fun a => (a.1 i, a.2 i)) <| 𝓤 (α i) :=
+theorem Pi.uniformity :
+    𝓤 (∀ i, α i) = ⨅ i : ι, (Filter.comap fun a => (a.1 i, a.2 i)) (𝓤 (α i)) :=
   iInf_uniformity
 #align Pi.uniformity Pi.uniformity
 
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -32,11 +32,11 @@ variable {ι : Type _} (α : ι → Type u) [U : ∀ i, UniformSpace (α i)]
 instance Pi.uniformSpace : UniformSpace (∀ i, α i) :=
   UniformSpace.ofCoreEq (⨅ i, UniformSpace.comap (fun a : ∀ i, α i => a i) (U i)).toCore
       Pi.topologicalSpace <|
-    Eq.symm toTopologicalSpace_infᵢ
+    Eq.symm toTopologicalSpace_iInf
 #align Pi.uniform_space Pi.uniformSpace
 
 theorem Pi.uniformity : 𝓤 (∀ i, α i) = ⨅ i : ι, (Filter.comap fun a => (a.1 i, a.2 i)) <| 𝓤 (α i) :=
-  infᵢ_uniformity
+  iInf_uniformity
 #align Pi.uniformity Pi.uniformity
 
 variable {α}
@@ -44,7 +44,7 @@ variable {α}
 theorem uniformContinuous_pi {β : Type _} [UniformSpace β] {f : β → ∀ i, α i} :
     UniformContinuous f ↔ ∀ i, UniformContinuous fun x => f x i := by
   -- porting note: required `Function.comp` to close
-  simp only [UniformContinuous, Pi.uniformity, tendsto_infᵢ, tendsto_comap_iff, Function.comp]
+  simp only [UniformContinuous, Pi.uniformity, tendsto_iInf, tendsto_comap_iff, Function.comp]
 #align uniform_continuous_pi uniformContinuous_pi
 
 variable (α)
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -57,8 +57,7 @@ instance Pi.complete [∀ i, CompleteSpace (α i)] : CompleteSpace (∀ i, α i)
   ⟨by
     intro f hf
     haveI := hf.1
-    have : ∀ i, ∃ x : α i, Filter.map (fun a : ∀ i, α i => a i) f ≤ 𝓝 x :=
-      by
+    have : ∀ i, ∃ x : α i, Filter.map (fun a : ∀ i, α i => a i) f ≤ 𝓝 x := by
       intro i
       have key : Cauchy (map (fun a : ∀ i : ι, α i => a i) f) :=
         hf.map (Pi.uniformContinuous_proj α i)
feat: Port/Topology.UniformSpace.Pi (#2048)

port of topology.uniform_space.pi

all simple fixes

Dependencies 8 + 310

311 files ported (97.5%)
137430 lines ported (96.5%)
Show graph

The unported dependencies are