statement
stringlengths
1
2.93k
proof
stringlengths
0
19.2k
type
stringclasses
13 values
symbolic_name
stringlengths
1
131
library
stringlengths
4
62
filename
stringlengths
20
95
imports
listlengths
0
10
deps
listlengths
0
64
docstring
stringlengths
0
4.95k
source_url
stringclasses
1 value
commit
stringclasses
1 value
iUnion_cylinder_update (x : ∀ n, E n) (n : ℕ) : ⋃ k, cylinder (update x n k) (n + 1) = cylinder x n
by ext y simp only [mem_cylinder_iff, mem_iUnion] constructor · rintro ⟨k, hk⟩ i hi simpa [hi.ne] using hk i (Nat.lt_succ_of_lt hi) · intro H refine ⟨y n, fun i hi => ?_⟩ rcases Nat.lt_succ_iff_lt_or_eq.1 hi with (h'i | rfl) · simp [H i h'i, h'i.ne] · simp
theorem
PiNat.iUnion_cylinder_update
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
update_mem_cylinder (x : ∀ n, E n) (n : ℕ) (y : E n) : update x n y ∈ cylinder x n
mem_cylinder_iff.2 fun i hi => by simp [hi.ne]
theorem
PiNat.update_mem_cylinder
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
res (x : ℕ → α) : ℕ → List α
| 0 => nil | Nat.succ n => x n :: res x n
def
PiNat.res
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
In the case where `E` has constant value `α`, the cylinder `cylinder x n` can be identified with the element of `List α` consisting of the first `n` entries of `x`. See `cylinder_eq_res`. We call this list `res x n`, the restriction of `x` to `n`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
res_zero (x : ℕ → α) : res x 0 = @nil α
rfl
theorem
PiNat.res_zero
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
res_succ (x : ℕ → α) (n : ℕ) : res x n.succ = x n :: res x n
rfl
theorem
PiNat.res_succ
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
res_length (x : ℕ → α) (n : ℕ) : (res x n).length = n
by induction n <;> simp [*]
theorem
PiNat.res_length
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
res_eq_res {x y : ℕ → α} {n : ℕ} : res x n = res y n ↔ ∀ ⦃m⦄, m < n → x m = y m
by constructor <;> intro h · induction n with | zero => simp | succ n ih => intro m hm rw [Nat.lt_succ_iff_lt_or_eq] at hm simp only [res_succ, cons.injEq] at h rcases hm with hm | hm · exact ih h.2 hm rw [hm] exact h.1 · induction n with | zero => simp | ...
theorem
PiNat.res_eq_res
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
The restrictions of `x` and `y` to `n` are equal if and only if `x m = y m` for all `m < n`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
res_injective : Injective (@res α)
by intro x y h ext n apply res_eq_res.mp _ (Nat.lt_succ_self _) rw [h]
theorem
PiNat.res_injective
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cylinder_eq_res (x : ℕ → α) (n : ℕ) : cylinder x n = { y | res y n = res x n }
by ext y dsimp [cylinder] rw [res_eq_res]
theorem
PiNat.cylinder_eq_res
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
`cylinder x n` is equal to the set of sequences `y` with the same restriction to `n` as `x`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist : Dist (∀ n, E n)
⟨fun x y => if x ≠ y then (1 / 2 : ℝ) ^ firstDiff x y else 0⟩
def
PiNat.dist
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Dist" ]
The distance function on a product space `Π n, E n`, given by `dist x y = (1/2)^n` where `n` is the first index at which `x` and `y` differ.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_eq_of_ne {x y : ∀ n, E n} (h : x ≠ y) : dist x y = (1 / 2 : ℝ) ^ firstDiff x y
by simp [dist, h]
theorem
PiNat.dist_eq_of_ne
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_self (x : ∀ n, E n) : dist x x = 0
by simp [dist]
theorem
PiNat.dist_self
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "dist_self" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_comm (x y : ∀ n, E n) : dist x y = dist y x
by classical simp [dist, @eq_comm _ x y, firstDiff_comm]
theorem
PiNat.dist_comm
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "dist_comm" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_nonneg (x y : ∀ n, E n) : 0 ≤ dist x y
by rcases eq_or_ne x y with (rfl | h) · simp [dist] · simp [dist, h]
theorem
PiNat.dist_nonneg
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "dist_nonneg", "eq_or_ne" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_le_one (x y : ∀ n, E n) : dist x y ≤ 1
by rcases eq_or_ne x y with (rfl | h) · simp [dist] · simp only [dist, ne_eq, h, not_false_eq_true, ↓reduceIte, one_div, inv_pow] bound
theorem
PiNat.dist_le_one
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "bound", "eq_or_ne", "inv_pow", "one_div" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_triangle_nonarch (x y z : ∀ n, E n) : dist x z ≤ max (dist x y) (dist y z)
by rcases eq_or_ne x z with (rfl | hxz) · simp [PiNat.dist_self x, PiNat.dist_nonneg] rcases eq_or_ne x y with (rfl | hxy) · simp rcases eq_or_ne y z with (rfl | hyz) · simp simp only [dist_eq_of_ne, hxz, hxy, hyz, inv_le_inv₀, one_div, inv_pow, zero_lt_two, Ne, not_false_iff, le_max_iff, pow_le_pow_i...
theorem
PiNat.dist_triangle_nonarch
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "PiNat.dist_nonneg", "PiNat.dist_self", "eq_or_ne", "inv_le_inv₀", "inv_pow", "le_max_iff", "one_div", "one_lt_two", "pow_le_pow_iff_right₀", "pow_pos", "zero_lt_two" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_triangle (x y z : ∀ n, E n) : dist x z ≤ dist x y + dist y z
calc dist x z ≤ max (dist x y) (dist y z) := dist_triangle_nonarch x y z _ ≤ dist x y + dist y z := max_le_add_of_nonneg (PiNat.dist_nonneg _ _) (PiNat.dist_nonneg _ _)
theorem
PiNat.dist_triangle
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "PiNat.dist_nonneg", "dist_triangle" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
eq_of_dist_eq_zero (x y : ∀ n, E n) (hxy : dist x y = 0) : x = y
by rcases eq_or_ne x y with (rfl | h); · rfl simp [dist_eq_of_ne h] at hxy
theorem
PiNat.eq_of_dist_eq_zero
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "eq_of_dist_eq_zero", "eq_or_ne" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
mem_cylinder_iff_dist_le {x y : ∀ n, E n} {n : ℕ} : y ∈ cylinder x n ↔ dist y x ≤ (1 / 2) ^ n
by rcases eq_or_ne y x with (rfl | hne) · simp [PiNat.dist_self] suffices (∀ i : ℕ, i < n → y i = x i) ↔ n ≤ firstDiff y x by simpa [dist_eq_of_ne hne] constructor · intro hy by_contra! H exact apply_firstDiff_ne hne (hy _ H) · intro h i hi exact apply_eq_of_lt_firstDiff (hi.trans_le h)
theorem
PiNat.mem_cylinder_iff_dist_le
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "PiNat.dist_self", "eq_or_ne" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
apply_eq_of_dist_lt {x y : ∀ n, E n} {n : ℕ} (h : dist x y < (1 / 2) ^ n) {i : ℕ} (hi : i ≤ n) : x i = y i
by rcases eq_or_ne x y with (rfl | hne) · rfl have : n < firstDiff x y := by simpa [dist_eq_of_ne hne, inv_lt_inv₀, pow_lt_pow_iff_right₀, one_lt_two] using h exact apply_eq_of_lt_firstDiff (hi.trans_lt this)
theorem
PiNat.apply_eq_of_dist_lt
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "eq_or_ne", "inv_lt_inv₀", "one_lt_two", "pow_lt_pow_iff_right₀" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
lipschitz_with_one_iff_forall_dist_image_le_of_mem_cylinder {α : Type*} [PseudoMetricSpace α] {f : (∀ n, E n) → α} : (∀ x y : ∀ n, E n, dist (f x) (f y) ≤ dist x y) ↔ ∀ x y n, y ∈ cylinder x n → dist (f x) (f y) ≤ (1 / 2) ^ n
by constructor · intro H x y n hxy apply (H x y).trans rw [PiNat.dist_comm] exact mem_cylinder_iff_dist_le.1 hxy · intro H x y rcases eq_or_ne x y with (rfl | hne) · simp [PiNat.dist_nonneg] rw [dist_eq_of_ne hne] apply H x y (firstDiff x y) rw [firstDiff_comm] exact mem_cylind...
theorem
PiNat.lipschitz_with_one_iff_forall_dist_image_le_of_mem_cylinder
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "PiNat.dist_comm", "PiNat.dist_nonneg", "PseudoMetricSpace", "eq_or_ne", "trans" ]
A function to a pseudo-metric-space is `1`-Lipschitz if and only if points in the same cylinder of length `n` are sent to points within distance `(1/2)^n`. Not expressed using `LipschitzWith` as we don't have a metric space structure
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
isOpen_cylinder (x : ∀ n, E n) (n : ℕ) : IsOpen (cylinder x n)
by rw [PiNat.cylinder_eq_pi] exact isOpen_set_pi (Finset.range n).finite_toSet fun a _ => isOpen_discrete _
theorem
PiNat.isOpen_cylinder
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Finset.range", "IsOpen", "PiNat.cylinder_eq_pi", "isOpen_discrete", "isOpen_set_pi" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
isTopologicalBasis_cylinders : IsTopologicalBasis { s : Set (∀ n, E n) | ∃ (x : ∀ n, E n) (n : ℕ), s = cylinder x n }
by apply isTopologicalBasis_of_isOpen_of_nhds · rintro u ⟨x, n, rfl⟩ apply isOpen_cylinder · intro x u hx u_open obtain ⟨v, ⟨U, F, -, rfl⟩, xU, Uu⟩ : ∃ v ∈ { S : Set (∀ i : ℕ, E i) | ∃ (U : ∀ i : ℕ, Set (E i)) (F : Finset ℕ), (∀ i : ℕ, i ∈ F → U i ∈ { s : Set (E i) | IsOpen s }) ∧ S = (F...
theorem
PiNat.isTopologicalBasis_cylinders
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Finset", "Finset.bddAbove", "Finset.mem_coe", "IsOpen", "Set", "Set.mem_pi", "isTopologicalBasis_pi", "lt_add_one" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
isOpen_iff_dist (s : Set (∀ n, E n)) : IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ y, dist x y < ε → y ∈ s
by constructor · intro hs x hx obtain ⟨v, ⟨y, n, rfl⟩, h'x, h's⟩ : ∃ v ∈ { s | ∃ (x : ∀ n : ℕ, E n) (n : ℕ), s = cylinder x n }, x ∈ v ∧ v ⊆ s := (isTopologicalBasis_cylinders E).exists_subset_of_mem_open hx hs rw [← mem_cylinder_iff_eq.1 h'x] at h's exact ⟨(1 / 2 : ℝ) ^ n, by simp, ...
theorem
PiNat.isOpen_iff_dist
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsOpen", "PiNat.dist_comm", "Set", "exists_pow_lt_of_lt_one", "one_half_lt_one" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
metricSpace : MetricSpace (∀ n, E n)
MetricSpace.ofDistTopology dist PiNat.dist_self PiNat.dist_comm PiNat.dist_triangle isOpen_iff_dist PiNat.eq_of_dist_eq_zero
def
PiNat.metricSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "MetricSpace", "MetricSpace.ofDistTopology", "PiNat.dist_comm", "PiNat.dist_self", "PiNat.dist_triangle", "PiNat.eq_of_dist_eq_zero" ]
Metric space structure on `Π (n : ℕ), E n` when the spaces `E n` have the discrete topology, where the distance is given by `dist x y = (1/2)^n`, where `n` is the smallest index where `x` and `y` differ. Not registered as a global instance by default. Warning: this definition makes sure that the topology is defeq to th...
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
metricSpaceOfDiscreteUniformity {E : ℕ → Type*} [∀ n, UniformSpace (E n)] (h : ∀ n, uniformity (E n) = 𝓟 SetRel.id) : MetricSpace (∀ n, E n)
haveI : ∀ n, DiscreteTopology (E n) := fun n => discreteTopology_of_discrete_uniformity (h n) { dist_triangle := PiNat.dist_triangle dist_comm := PiNat.dist_comm dist_self := PiNat.dist_self eq_of_dist_eq_zero := PiNat.eq_of_dist_eq_zero _ _ toUniformSpace := Pi.uniformSpace _ uniformity_dist := b...
def
PiNat.metricSpaceOfDiscreteUniformity
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "DiscreteTopology", "Finset.mem_coe", "Finset.mem_range", "Finset.range", "MetricSpace", "Pi.uniformSpace", "Pi.uniformity", "PiNat.dist_comm", "PiNat.dist_self", "PiNat.dist_triangle", "PiNat.eq_of_dist_eq_zero", "SetRel.id", "UniformSpace", "discreteTopology_of_discrete_uniformity", "d...
Metric space structure on `Π (n : ℕ), E n` when the spaces `E n` have the discrete uniformity, where the distance is given by `dist x y = (1/2)^n`, where `n` is the smallest index where `x` and `y` differ. Not registered as a global instance by default.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
metricSpaceNatNat : MetricSpace (ℕ → ℕ)
PiNat.metricSpaceOfDiscreteUniformity fun _ => rfl
def
PiNat.metricSpaceNatNat
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "MetricSpace", "PiNat.metricSpaceOfDiscreteUniformity" ]
Metric space structure on `ℕ → ℕ` where the distance is given by `dist x y = (1/2)^n`, where `n` is the smallest index where `x` and `y` differ. Not registered as a global instance by default.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
completeSpace : CompleteSpace (∀ n, E n)
by refine Metric.complete_of_convergent_controlled_sequences (fun n => (1 / 2) ^ n) (by simp) ?_ intro u hu refine ⟨fun n => u n n, tendsto_pi_nhds.2 fun i => ?_⟩ refine tendsto_const_nhds.congr' ?_ filter_upwards [Filter.Ici_mem_atTop i] with n hn exact apply_eq_of_dist_lt (hu i i n le_rfl hn) le_rfl
theorem
PiNat.completeSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "CompleteSpace", "Filter.Ici_mem_atTop", "Metric.complete_of_convergent_controlled_sequences", "le_rfl" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
boundedSpace : BoundedSpace (∀ n, E n)
by rw [Metric.boundedSpace_iff] use 1 apply PiNat.dist_le_one
theorem
PiNat.boundedSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "BoundedSpace", "Metric.boundedSpace_iff", "PiNat.dist_le_one" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
exists_disjoint_cylinder {s : Set (∀ n, E n)} (hs : IsClosed s) {x : ∀ n, E n} (hx : x ∉ s) : ∃ n, Disjoint s (cylinder x n)
by rcases eq_empty_or_nonempty s with (rfl | hne) · exact ⟨0, by simp⟩ have A : 0 < infDist x s := (hs.notMem_iff_infDist_pos hne).1 hx obtain ⟨n, hn⟩ : ∃ n, (1 / 2 : ℝ) ^ n < infDist x s := exists_pow_lt_of_lt_one A one_half_lt_one refine ⟨n, disjoint_left.2 fun y ys hy => ?_⟩ apply lt_irrefl (infDist x s)...
theorem
PiNat.exists_disjoint_cylinder
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Disjoint", "IsClosed", "Set", "exists_pow_lt_of_lt_one", "lt_irrefl", "one_half_lt_one" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
shortestPrefixDiff {E : ℕ → Type*} (x : ∀ n, E n) (s : Set (∀ n, E n)) : ℕ
if h : ∃ n, Disjoint s (cylinder x n) then Nat.find h else 0
def
PiNat.shortestPrefixDiff
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Disjoint", "Nat.find", "Set" ]
Given a point `x` in a product space `Π (n : ℕ), E n`, and `s` a subset of this space, then `shortestPrefixDiff x s` if the smallest `n` for which there is no element of `s` having the same prefix of length `n` as `x`. If there is no such `n`, then use `0` by convention.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
firstDiff_lt_shortestPrefixDiff {s : Set (∀ n, E n)} (hs : IsClosed s) {x y : ∀ n, E n} (hx : x ∉ s) (hy : y ∈ s) : firstDiff x y < shortestPrefixDiff x s
by have A := exists_disjoint_cylinder hs hx rw [shortestPrefixDiff, dif_pos A] classical have B := Nat.find_spec A contrapose! B rw [not_disjoint_iff_nonempty_inter] refine ⟨y, hy, ?_⟩ rw [mem_cylinder_comm] exact cylinder_anti y B (mem_cylinder_firstDiff x y)
theorem
PiNat.firstDiff_lt_shortestPrefixDiff
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsClosed", "Nat.find_spec", "Set" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
shortestPrefixDiff_pos {s : Set (∀ n, E n)} (hs : IsClosed s) (hne : s.Nonempty) {x : ∀ n, E n} (hx : x ∉ s) : 0 < shortestPrefixDiff x s
by rcases hne with ⟨y, hy⟩ exact (firstDiff_lt_shortestPrefixDiff hs hx hy).pos
theorem
PiNat.shortestPrefixDiff_pos
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsClosed", "Set" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
longestPrefix {E : ℕ → Type*} (x : ∀ n, E n) (s : Set (∀ n, E n)) : ℕ
shortestPrefixDiff x s - 1
def
PiNat.longestPrefix
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Set" ]
Given a point `x` in a product space `Π (n : ℕ), E n`, and `s` a subset of this space, then `longestPrefix x s` if the largest `n` for which there is an element of `s` having the same prefix of length `n` as `x`. If there is no such `n`, use `0` by convention.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
firstDiff_le_longestPrefix {s : Set (∀ n, E n)} (hs : IsClosed s) {x y : ∀ n, E n} (hx : x ∉ s) (hy : y ∈ s) : firstDiff x y ≤ longestPrefix x s
by rw [longestPrefix, le_tsub_iff_right] · exact firstDiff_lt_shortestPrefixDiff hs hx hy · exact shortestPrefixDiff_pos hs ⟨y, hy⟩ hx
theorem
PiNat.firstDiff_le_longestPrefix
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsClosed", "Set", "le_tsub_iff_right" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
inter_cylinder_longestPrefix_nonempty {s : Set (∀ n, E n)} (hs : IsClosed s) (hne : s.Nonempty) (x : ∀ n, E n) : (s ∩ cylinder x (longestPrefix x s)).Nonempty
by by_cases hx : x ∈ s · exact ⟨x, hx, self_mem_cylinder _ _⟩ have A := exists_disjoint_cylinder hs hx have B : longestPrefix x s < shortestPrefixDiff x s := Nat.pred_lt (shortestPrefixDiff_pos hs hne hx).ne' rw [longestPrefix, shortestPrefixDiff, dif_pos A] at B ⊢ classical obtain ⟨y, ys, hy⟩ : ∃ y :...
theorem
PiNat.inter_cylinder_longestPrefix_nonempty
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsClosed", "Nat.find", "Nat.find_min", "Set", "by_cases" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
disjoint_cylinder_of_longestPrefix_lt {s : Set (∀ n, E n)} (hs : IsClosed s) {x : ∀ n, E n} (hx : x ∉ s) {n : ℕ} (hn : longestPrefix x s < n) : Disjoint s (cylinder x n)
by contrapose! hn rcases not_disjoint_iff_nonempty_inter.1 hn with ⟨y, ys, hy⟩ apply le_trans _ (firstDiff_le_longestPrefix hs hx ys) apply (mem_cylinder_iff_le_firstDiff (ne_of_mem_of_not_mem ys hx).symm _).1 rwa [mem_cylinder_comm]
theorem
PiNat.disjoint_cylinder_of_longestPrefix_lt
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Disjoint", "IsClosed", "Set", "le_trans", "symm" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
cylinder_longestPrefix_eq_of_longestPrefix_lt_firstDiff {x y : ∀ n, E n} {s : Set (∀ n, E n)} (hs : IsClosed s) (hne : s.Nonempty) (H : longestPrefix x s < firstDiff x y) (xs : x ∉ s) (ys : y ∉ s) : cylinder x (longestPrefix x s) = cylinder y (longestPrefix y s)
by have l_eq : longestPrefix y s = longestPrefix x s := by rcases lt_trichotomy (longestPrefix y s) (longestPrefix x s) with (L | L | L) · have Ax : (s ∩ cylinder x (longestPrefix x s)).Nonempty := inter_cylinder_longestPrefix_nonempty hs hne x have Z := disjoint_cylinder_of_longestPrefix_lt hs ...
theorem
PiNat.cylinder_longestPrefix_eq_of_longestPrefix_lt_firstDiff
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsClosed", "Set", "lt_trichotomy" ]
If two points `x, y` coincide up to length `n`, and the longest common prefix of `x` with `s` is strictly shorter than `n`, then the longest common prefix of `y` with `s` is the same, and both cylinders of this length based at `x` and `y` coincide.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
exists_lipschitz_retraction_of_isClosed {s : Set (∀ n, E n)} (hs : IsClosed s) (hne : s.Nonempty) : ∃ f : (∀ n, E n) → ∀ n, E n, (∀ x ∈ s, f x = x) ∧ range f = s ∧ LipschitzWith 1 f
by /- The map `f` is defined as follows. For `x ∈ s`, let `f x = x`. Otherwise, consider the longest prefix `w` that `x` shares with an element of `s`, and let `f x = z_w` where `z_w` is an element of `s` starting with `w`. All the desired properties are clear, except the fact that `f` is `1`-Lipschitz: i...
theorem
PiNat.exists_lipschitz_retraction_of_isClosed
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsClosed", "LipschitzWith", "LipschitzWith.mk_one", "Set", "by_cases", "eq_or_ne", "symm" ]
Given a closed nonempty subset `s` of `Π (n : ℕ), E n`, there exists a Lipschitz retraction onto this set, i.e., a Lipschitz map with range equal to `s`, equal to the identity on `s`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
exists_retraction_of_isClosed {s : Set (∀ n, E n)} (hs : IsClosed s) (hne : s.Nonempty) : ∃ f : (∀ n, E n) → ∀ n, E n, (∀ x ∈ s, f x = x) ∧ range f = s ∧ Continuous f
by rcases exists_lipschitz_retraction_of_isClosed hs hne with ⟨f, fs, frange, hf⟩ exact ⟨f, fs, frange, hf.continuous⟩
theorem
PiNat.exists_retraction_of_isClosed
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Continuous", "IsClosed", "Set" ]
Given a closed nonempty subset `s` of `Π (n : ℕ), E n`, there exists a retraction onto this set, i.e., a continuous map with range equal to `s`, equal to the identity on `s`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
exists_retraction_subtype_of_isClosed {s : Set (∀ n, E n)} (hs : IsClosed s) (hne : s.Nonempty) : ∃ f : (∀ n, E n) → s, (∀ x : s, f x = x) ∧ Surjective f ∧ Continuous f
by obtain ⟨f, fs, rfl, f_cont⟩ : ∃ f : (∀ n, E n) → ∀ n, E n, (∀ x ∈ s, f x = x) ∧ range f = s ∧ Continuous f := exists_retraction_of_isClosed hs hne have A : ∀ x : range f, rangeFactorization f x = x := fun x ↦ Subtype.ext <| fs x x.2 exact ⟨rangeFactorization f, A, fun x => ⟨x, A x⟩, f_cont.subtype_mk _...
theorem
PiNat.exists_retraction_subtype_of_isClosed
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Continuous", "IsClosed", "Set" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
exists_nat_nat_continuous_surjective_of_completeSpace (α : Type*) [MetricSpace α] [CompleteSpace α] [SecondCountableTopology α] [Nonempty α] : ∃ f : (ℕ → ℕ) → α, Continuous f ∧ Surjective f
by /- First, we define a surjective map from a closed subset `s` of `ℕ → ℕ`. Then, we compose this map with a retraction of `ℕ → ℕ` onto `s` to obtain the desired map. Let us consider a dense sequence `u` in `α`. Then `s` is the set of sequences `xₙ` such that the balls `closedBall (u xₙ) (1/2^n)` have a ...
theorem
exists_nat_nat_continuous_surjective_of_completeSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "CompleteSpace", "Continuous", "IsClosed", "MetricSpace", "PiNat.metricSpaceNatNat", "SecondCountableTopology", "Set", "continuousAt_of_locally_lipschitz", "dist_triangle_right", "eq_or_ne", "le_rfl", "pow_nonneg", "pow_pos", "pow_zero", "squeeze_zero", "symm", "tendsto_pow_atTop_nhd...
Any nonempty complete second countable metric space is the continuous image of the fundamental space `ℕ → ℕ`. For a version of this theorem in the context of Polish spaces, see `exists_nat_nat_continuous_surjective_of_polishSpace`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
edist : EDist (∀ i, F i)
where edist x y := ∑' i, min (2⁻¹ ^ encode i) (edist (x i) (y i))
def
PiCountable.edist
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "EDist" ]
Given a countable family of extended metric spaces, one may put an extended distance on their product `Π i, E i`. It is highly non-canonical, though, and therefore not registered as a global instance. The distance we use here is `edist x y = ∑' i, min (1/2)^(encode i) (edist (x i) (y i))`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
edist_eq_tsum (x y : ∀ i, F i) : edist x y = ∑' i, min (2⁻¹ ^ encode i) (edist (x i) (y i))
rfl
lemma
PiCountable.edist_eq_tsum
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
min_edist_le_edist_pi (x y : ∀ i, F i) (i : ι) : min (2⁻¹ ^ encode i) (edist (x i) (y i)) ≤ edist x y
ENNReal.le_tsum _
lemma
PiCountable.min_edist_le_edist_pi
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "ENNReal.le_tsum" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
edist_le_two : edist x y ≤ 2
(ENNReal.tsum_geometric_two_encode_le_two).trans' <| by rw [edist_eq_tsum]; gcongr; exact min_le_left ..
lemma
PiCountable.edist_le_two
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "ENNReal.tsum_geometric_two_encode_le_two", "min_le_left" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
edist_lt_top : edist x y < ∞
edist_le_two.trans_lt (by simp)
lemma
PiCountable.edist_lt_top
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "edist_lt_top" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
edist_le_edist_pi_of_edist_lt (h : edist x y < 2⁻¹ ^ encode i) : edist (x i) (y i) ≤ edist x y
by simpa only [not_le.2 h, false_or] using min_le_iff.1 (min_edist_le_edist_pi x y i)
lemma
PiCountable.edist_le_edist_pi_of_edist_lt
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
pseudoEMetricSpace : PseudoEMetricSpace (∀ i, F i)
where edist_self x := by simp [edist_eq_tsum] edist_comm x y := by simp [edist_eq_tsum, edist_comm] edist_triangle x y z := calc ∑' i, min (2⁻¹ ^ encode i) (edist (x i) (z i)) _ ≤ ∑' i, (min (2⁻¹ ^ encode i) (edist (x i) (y i)) + min (2⁻¹ ^ encode i) (edist (y i) (z i))) := by gcongr wi...
def
PiCountable.pseudoEMetricSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "ENNReal.add_halves", "ENNReal.add_lt_add_of_le_of_lt", "ENNReal.exists_pos_mul_lt", "ENNReal.one_half_lt_one", "ENNReal.pow_pos", "ENNReal.sum_add_tsum_compl", "ENNReal.tendsto_tsum_compl_atTop_zero", "ENNReal.tsum_add", "Finset", "Finset.mem_coe", "Pi.uniformSpace", "Pi.uniformity", "Pseud...
Given a countable family of extended pseudometric spaces, one may put an extended distance on their product `Π i, E i`. It is highly non-canonical, though, and therefore not registered as a global instance. The distance we use here is `edist x y = ∑' i, min (1/2)^(encode i) (edist (x i) (y i))`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
emetricSpace : EMetricSpace (∀ i, F i)
where eq_of_edist_eq_zero := by simp [edist_eq_tsum, funext_iff]
def
PiCountable.emetricSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "EMetricSpace" ]
Given a countable family of extended metric spaces, one may put an extended distance on their product `Π i, E i`. It is highly non-canonical, though, and therefore not registered as a global instance. The distance we use here is `edist x y = ∑' i, min (1/2)^(encode i) (edist (x i) (y i))`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist : Dist (∀ i, F i)
where dist x y := ∑' i, min (2⁻¹ ^ encode i) (dist (x i) (y i))
def
PiCountable.dist
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Dist" ]
Given a countable family of metric spaces, one may put a distance on their product `Π i, E i`. It is highly non-canonical, though, and therefore not registered as a global instance. The distance we use here is `dist x y = ∑' i, min (1/2)^(encode i) (dist (x i) (y i))`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_eq_tsum (x y : ∀ i, F i) : dist x y = ∑' i, min (2⁻¹ ^ encode i) (dist (x i) (y i))
rfl
lemma
PiCountable.dist_eq_tsum
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_summable (x y : ∀ i, F i) : Summable fun i ↦ min (2⁻¹ ^ encode i) (dist (x i) (y i))
by refine .of_nonneg_of_le (fun i => ?_) (fun i => min_le_left _ _) <| by simpa [one_div] using summable_geometric_two_encode exact le_min (by positivity) dist_nonneg
lemma
PiCountable.dist_summable
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "dist_nonneg", "le_min", "min_le_left", "one_div", "summable_geometric_two_encode" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
min_dist_le_dist_pi (x y : ∀ i, F i) (i : ι) : min (2⁻¹ ^ encode i) (dist (x i) (y i)) ≤ dist x y
(dist_summable x y).le_tsum i fun j _ => le_min (by simp) dist_nonneg
lemma
PiCountable.min_dist_le_dist_pi
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "dist_nonneg", "le_min" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_le_dist_pi_of_dist_lt (h : dist x y < 2⁻¹ ^ encode i) : dist (x i) (y i) ≤ dist x y
by simpa only [not_le.2 h, false_or] using min_le_iff.1 (min_dist_le_dist_pi x y i)
lemma
PiCountable.dist_le_dist_pi_of_dist_lt
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
pseudoMetricSpace : PseudoMetricSpace (∀ i, F i)
PseudoEMetricSpace.toPseudoMetricSpaceOfDist dist (fun x y ↦ by simp [dist_eq_tsum]; positivity) fun x y ↦ by rw [edist_eq_tsum, dist_eq_tsum, ENNReal.ofReal_tsum_of_nonneg (fun _ ↦ by positivity) (dist_summable ..)] simp [edist, ENNReal.inv_pow] congr! with a exact PseudoMetricSpace...
def
PiCountable.pseudoMetricSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "ENNReal.inv_pow", "ENNReal.ofReal_tsum_of_nonneg", "PseudoEMetricSpace.toPseudoMetricSpaceOfDist", "PseudoMetricSpace" ]
Given a countable family of metric spaces, one may put a distance on their product `Π i, E i`. It is highly non-canonical, though, and therefore not registered as a global instance. The distance we use here is `dist x y = ∑' i, min (1/2)^(encode i) (dist (x i) (y i))`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
metricSpace : MetricSpace (∀ i, F i)
EMetricSpace.toMetricSpaceOfDist dist (by simp) (by simp [edist_dist])
def
PiCountable.metricSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "EMetricSpace.toMetricSpaceOfDist", "MetricSpace", "edist_dist" ]
Given a countable family of metric spaces, one may put a distance on their product `Π i, E i`. It is highly non-canonical, though, and therefore not registered as a global instance. The distance we use here is `edist x y = ∑' i, min (1/2)^(encode i) (edist (x i) (y i))`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
PiNatEmbed (X : Type*) (Y : ι → Type*) (f : ∀ i, X → Y i) where /-- The map from `X` to the subset of `∀ i, Y i`. -/ toPiNat :: /-- The map from the subset of `∀ i, Y i` to `X`. -/ ofPiNat : X
structure
Metric.PiNatEmbed
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
Given a type `X` and a sequence `Y` of metric spaces and a sequence `f : : ∀ i, X → Y i` of separating functions, `PiNatEmbed X Y f` is a type synonym for `X` seen as a subset of `∀ i, Y i`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
ext {x y : PiNatEmbed X Y f} (hxy : x.ofPiNat = y.ofPiNat) : x = y
by cases x; congr!
lemma
Metric.PiNatEmbed.ext
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
toPiNatEquiv : X ≃ PiNatEmbed X Y f
where toFun := toPiNat invFun := ofPiNat left_inv _ := rfl right_inv _ := rfl
def
Metric.PiNatEmbed.toPiNatEquiv
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
Equivalence between `X` and its embedding into `∀ i, Y i`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
ofPiNat_inj {x y : PiNatEmbed X Y f} : x.ofPiNat = y.ofPiNat ↔ x = y
(toPiNatEquiv X Y f).symm.injective.eq_iff
lemma
Metric.PiNatEmbed.ofPiNat_inj
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
«forall» {P : PiNatEmbed X Y f → Prop} : (∀ x, P x) ↔ ∀ x, P (toPiNat x)
(toPiNatEquiv X Y f).symm.forall_congr_left
lemma
Metric.PiNatEmbed.«forall»
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
embed : PiNatEmbed X Y f → ∀ i, Y i
fun x i ↦ f i x.ofPiNat
def
Metric.PiNatEmbed.embed
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
`X` equipped with the distance coming from `∀ i, Y i` embeds in `∀ i, Y i`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
embed_injective (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : Injective (embed X Y f)
by simpa [Pairwise, not_imp_comm (a := _ = _), funext_iff, Function.Injective] using! separating_f
lemma
Metric.PiNatEmbed.embed_injective
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Pairwise", "not_imp_comm" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
edist_def (x y : PiNatEmbed X Y f) : edist x y = ∑' i, min (2⁻¹ ^ encode i) (edist (f i x.ofPiNat) (f i y.ofPiNat))
rfl
lemma
Metric.PiNatEmbed.edist_def
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
isometry_embed : Isometry (embed X Y f)
PseudoEMetricSpace.isometry_induced _
lemma
Metric.PiNatEmbed.isometry_embed
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Isometry", "PseudoEMetricSpace.isometry_induced" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_def (x y : PiNatEmbed X Y f) : dist x y = ∑' i, min (2⁻¹ ^ encode i) (dist (f i x.ofPiNat) (f i y.ofPiNat))
rfl
lemma
Metric.PiNatEmbed.dist_def
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
continuous_toPiNat (continuous_f : ∀ i, Continuous (f i)) : Continuous (toPiNat : X → PiNatEmbed X Y f)
by rw [continuous_iff_continuous_dist] simp only [dist_def] apply continuous_tsum (by fun_prop) summable_geometric_two_encode <| by simp [abs_of_nonneg]
lemma
Metric.PiNatEmbed.continuous_toPiNat
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Continuous", "continuous_iff_continuous_dist", "continuous_tsum", "summable_geometric_two_encode" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
emetricSpace (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : EMetricSpace (PiNatEmbed X Y f)
.induced (embed X Y f) (embed_injective separating_f) PiCountable.emetricSpace
abbrev
Metric.PiNatEmbed.emetricSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "EMetricSpace", "Pairwise", "PiCountable.emetricSpace" ]
If the functions `f i : X → Y i` separate points of `X`, then `X` can be embedded into `∀ i, Y i`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
isUniformEmbedding_embed (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : IsUniformEmbedding (embed X Y f)
let := emetricSpace separating_f; isometry_embed.isUniformEmbedding
lemma
Metric.PiNatEmbed.isUniformEmbedding_embed
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsUniformEmbedding", "Pairwise" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
metricSpace (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : MetricSpace (PiNatEmbed X Y f)
(emetricSpace separating_f).toMetricSpace fun x y ↦ by simp [edist_dist]
abbrev
Metric.PiNatEmbed.metricSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "MetricSpace", "Pairwise", "edist_dist" ]
If the functions `f i : X → Y i` separate points of `X`, then `X` can be embedded into `∀ i, Y i`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
isHomeomorph_toPiNat (continuous_f : ∀ i, Continuous (f i)) (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : IsHomeomorph (toPiNat : X → PiNatEmbed X Y f)
by letI := emetricSpace separating_f rw [isHomeomorph_iff_continuous_bijective] exact ⟨continuous_toPiNat continuous_f, (toPiNatEquiv X Y f).bijective⟩
lemma
Metric.PiNatEmbed.isHomeomorph_toPiNat
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Continuous", "IsHomeomorph", "Pairwise", "isHomeomorph_iff_continuous_bijective" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
toPiNatHomeo (continuous_f : ∀ i, Continuous (f i)) (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : X ≃ₜ PiNatEmbed X Y f
(toPiNatEquiv X Y f).toHomeomorphOfIsInducing (isHomeomorph_toPiNat continuous_f separating_f).isInducing
def
Metric.PiNatEmbed.toPiNatHomeo
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Continuous", "Pairwise" ]
Homeomorphism between `X` and its embedding into `∀ i, Y i` induced by a separating family of continuous functions `f i : X → Y i`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
TopologicalSpace.MetrizableSpace.of_countable_separating (f : ∀ i, X → Y i) (continuous_f : ∀ i, Continuous (f i)) (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : MetrizableSpace X
letI := Metric.PiNatEmbed.metricSpace separating_f (Metric.PiNatEmbed.toPiNatHomeo X Y f continuous_f separating_f).isEmbedding.metrizableSpace
lemma
Metric.PiNatEmbed.TopologicalSpace.MetrizableSpace.of_countable_separating
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Continuous", "Metric.PiNatEmbed.metricSpace", "Metric.PiNatEmbed.toPiNatHomeo", "Pairwise" ]
If `X` is compact, and there exists a sequence of continuous functions `f i : X → Y i` to metric spaces `Y i` that separate points on `X`, then `X` is metrizable.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
distDenseSeq (n : ℕ) (x : X) : I
have : Nonempty X := ⟨x⟩ projIcc _ _ zero_le_one <| dist x (denseSeq X n)
abbrev
Metric.PiNatEmbed.distDenseSeq
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "zero_le_one" ]
Given a separable metric space `X`, `denseSeq X : ℕ → X` gives a countable dense sequence. This measures the distance between `denseSeq X n` and `x`, truncated to the unit interval `I` so that the distances remain bounded. The function `(fun x n ↦ distDenseSeq n x) : X → ℕ → I` is a mapping from `X` to the Hilbert cub...
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
continuous_distDenseSeq (n : ℕ) : Continuous (distDenseSeq X n)
by cases isEmpty_or_nonempty X · exact continuous_of_discreteTopology refine continuous_projIcc.comp <| Continuous.dist continuous_id' ?_ convert! continuous_const (y := denseSeq X n)
lemma
Metric.PiNatEmbed.continuous_distDenseSeq
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Continuous", "Continuous.dist", "continuous_const", "continuous_id'", "continuous_of_discreteTopology", "isEmpty_or_nonempty" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
separation {x : X} {C : Set X} (hxC : C ∈ 𝓝 x) : ∃ (n : ℕ), C ∈ (𝓝 (distDenseSeq X n x)).comap (distDenseSeq X n)
by let ε : ℝ := min (infDist x (closure Cᶜ)) 1 obtain hC | hC := (closure Cᶜ).eq_empty_or_nonempty · simp_all have : Nonempty X := ⟨x⟩ obtain ⟨n, hn⟩ := denseRange_iff.mp (denseRange_denseSeq X) x (ε / 2) (by simp_all [ε, ← IsClosed.notMem_iff_infDist_pos, mem_interior_iff_mem_nhds]) refine ⟨n, ball 0 (...
lemma
Metric.PiNatEmbed.separation
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "IsClosed.notMem_iff_infDist_pos", "Set", "Subtype.dist_eq", "closure", "comap", "dist_triangle_right", "div_le_iff₀", "mem_interior_iff_mem_nhds", "notMem_of_notMem_closure", "not_lt_of_ge" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
injective_distDenseSeq (x y : X) (hxy : x ≠ y) : ∃ n, distDenseSeq X n x ≠ distDenseSeq X n y
by obtain ⟨n, hn⟩ := separation ((isOpen_compl_singleton (x := y)).mem_nhds hxy) exact ⟨n, fun e ↦ by simp +contextual [e, ← exists_prop, mem_of_mem_nhds] at hn⟩
lemma
Metric.PiNatEmbed.injective_distDenseSeq
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "isOpen_compl_singleton", "mem_of_mem_nhds" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
continuous_distDenseSeq_inv : Continuous (ofPiNat : PiNatEmbed X (fun _ => I) (distDenseSeq X) → X)
by refine continuous_iff_continuousAt.mpr fun x s hs ↦ ?_ obtain ⟨i, t, ht, hts⟩ := separation hs rw [(isUniformEmbedding_embed injective_distDenseSeq).isEmbedding.nhds_eq_comap, nhds_pi] exact ⟨_, Filter.mem_pi_of_mem _ ht, fun x hx ↦ hts hx⟩
lemma
Metric.PiNatEmbed.continuous_distDenseSeq_inv
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[ "Continuous", "Filter.mem_pi_of_mem", "nhds_pi" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
exists_embedding_to_hilbert_cube : ∃ F : X → ℕ → I, IsEmbedding F
by let firststep : X ≃ₜ PiNatEmbed X (fun i => I) (distDenseSeq X) := { toFun := toPiNat invFun := ofPiNat left_inv _ := rfl right_inv _ := rfl continuous_toFun := continuous_toPiNat <| fun i ↦ continuous_distDenseSeq i continuous_invFun := continuous_distDenseSeq_inv } let secondstep : PiNa...
theorem
Metric.PiNatEmbed.exists_embedding_to_hilbert_cube
Topology.MetricSpace
Mathlib/Topology/MetricSpace/PiNat.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
PolishSpace (α : Type*) [h : TopologicalSpace α] : Prop extends SecondCountableTopology α, IsCompletelyMetrizableSpace α
class
PolishSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "SecondCountableTopology", "TopologicalSpace" ]
A Polish space is a topological space with second countable topology, that can be endowed with a metric for which it is complete. To endow a Polish space with a complete metric space structure, do `letI := upgradeIsCompletelyMetrizable α`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
exists_nat_nat_continuous_surjective (α : Type*) [TopologicalSpace α] [PolishSpace α] [Nonempty α] : ∃ f : (ℕ → ℕ) → α, Continuous f ∧ Surjective f
letI := upgradeIsCompletelyMetrizable α exists_nat_nat_continuous_surjective_of_completeSpace α
theorem
PolishSpace.exists_nat_nat_continuous_surjective
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "Continuous", "PolishSpace", "TopologicalSpace", "exists_nat_nat_continuous_surjective_of_completeSpace" ]
Any nonempty Polish space is the continuous image of the fundamental space `ℕ → ℕ`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
_root_.Topology.IsClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β] {f : α → β} (hf : IsClosedEmbedding f) : PolishSpace α
by letI := upgradeIsCompletelyMetrizable β letI : MetricSpace α := hf.isEmbedding.comapMetricSpace f haveI : SecondCountableTopology α := hf.isEmbedding.secondCountableTopology have : CompleteSpace α := by rw [completeSpace_iff_isComplete_range hf.isEmbedding.to_isometry.isUniformInducing] exact hf.isCl...
theorem
Topology.IsClosedEmbedding.polishSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "CompleteSpace", "MetricSpace", "PolishSpace", "SecondCountableTopology", "TopologicalSpace", "completeSpace_iff_isComplete_range" ]
Given a closed embedding into a Polish space, the source space is also Polish.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
_root_.Equiv.polishSpace_induced [t : TopologicalSpace β] [PolishSpace β] (f : α ≃ β) : @PolishSpace α (t.induced f)
letI : TopologicalSpace α := t.induced f (f.toHomeomorphOfIsInducing ⟨rfl⟩).isClosedEmbedding.polishSpace
theorem
Equiv.polishSpace_induced
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "PolishSpace", "TopologicalSpace" ]
Pulling back a Polish topology under an equiv gives again a Polish topology.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
_root_.IsClosed.polishSpace [TopologicalSpace α] [PolishSpace α] {s : Set α} (hs : IsClosed s) : PolishSpace s
hs.isClosedEmbedding_subtypeVal.polishSpace
theorem
IsClosed.polishSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "IsClosed", "PolishSpace", "Set", "TopologicalSpace" ]
A closed subset of a Polish space is also Polish.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
_root_.CompletePseudometrizable.iInf {ι : Type*} [Countable ι] {t : ι → TopologicalSpace α} (ht₀ : ∃ t₀, @T2Space α t₀ ∧ ∀ i, t i ≤ t₀) (ht : ∀ i, ∃ u : UniformSpace α, CompleteSpace α ∧ 𝓤[u].IsCountablyGenerated ∧ u.toTopologicalSpace = t i) : ∃ u : UniformSpace α, CompleteSpace α ∧ 𝓤[u].IsCo...
by choose u hcomp hcount hut using ht obtain rfl : t = fun i ↦ (u i).toTopologicalSpace := (funext hut).symm refine ⟨⨅ i, u i, .iInf hcomp ht₀, ?_, UniformSpace.toTopologicalSpace_iInf⟩ rw [iInf_uniformity] infer_instance
theorem
CompletePseudometrizable.iInf
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "CompleteSpace", "Countable", "T2Space", "TopologicalSpace", "UniformSpace", "iInf_uniformity", "symm" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
iInf {ι : Type*} [Countable ι] {t : ι → TopologicalSpace α} (ht₀ : ∃ i₀, ∀ i, t i ≤ t i₀) (ht : ∀ i, @PolishSpace α (t i)) : @PolishSpace α (⨅ i, t i)
by rcases ht₀ with ⟨i₀, hi₀⟩ rcases CompletePseudometrizable.iInf ⟨t i₀, letI := t i₀; haveI := ht i₀; inferInstance, hi₀⟩ fun i ↦ letI := t i; haveI := ht i; letI := upgradeIsCompletelyMetrizable α ⟨inferInstance, inferInstance, inferInstance, rfl⟩ with ⟨u, hcomp, hcount, htop⟩ rw [← htop] ...
theorem
PolishSpace.iInf
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "CompletePseudometrizable.iInf", "Countable", "PolishSpace", "SecondCountableTopology", "T1Space", "TopologicalSpace", "t1Space_antitone" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α] [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t) (h'm : ∀ n, @PolishSpace α (m n)) : ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t'
⟨⨅ i : Option ι, i.elim t m, fun i ↦ iInf_le _ (some i), iInf_le _ none, .iInf ⟨none, Option.forall.2 ⟨le_rfl, hm⟩⟩ <| Option.forall.2 ⟨p, h'm⟩⟩
theorem
PolishSpace.exists_polishSpace_forall_le
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "Countable", "PolishSpace", "TopologicalSpace" ]
Given a Polish space, and countably many finer Polish topologies, there exists another Polish topology which is finer than all of them.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
CompleteCopy {α : Type*} [MetricSpace α] (s : Opens α) : Type _
s
def
TopologicalSpace.Opens.CompleteCopy
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "MetricSpace" ]
A type synonym for a subset `s` of a metric space, on which we will construct another metric for which it will be complete.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
instDist : Dist (CompleteCopy s)
where dist x y := dist x.1 y.1 + abs (1 / infDist x.1 sᶜ - 1 / infDist y.1 sᶜ)
instance
TopologicalSpace.Opens.CompleteCopy.instDist
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "Dist" ]
A distance on an open subset `s` of a metric space, designed to make it complete. It is given by `dist' x y = dist x y + |1 / dist x sᶜ - 1 / dist y sᶜ|`, where the second term blows up close to the boundary to ensure that Cauchy sequences for `dist'` remain well inside `s`.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_eq (x y : CompleteCopy s) : dist x y = dist x.1 y.1 + abs (1 / infDist x.1 sᶜ - 1 / infDist y.1 sᶜ)
rfl
theorem
TopologicalSpace.Opens.CompleteCopy.dist_eq
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
dist_val_le_dist (x y : CompleteCopy s) : dist x.1 y.1 ≤ dist x y
le_add_of_nonneg_right (abs_nonneg _)
theorem
TopologicalSpace.Opens.CompleteCopy.dist_val_le_dist
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
instMetricSpace : MetricSpace (CompleteCopy s)
by refine @MetricSpace.ofT0PseudoMetricSpace (CompleteCopy s) (.ofDistTopology dist (fun _ ↦ ?_) (fun _ _ ↦ ?_) (fun x y z ↦ ?_) fun t ↦ ?_) _ · simp only [dist_eq, dist_self, one_div, sub_self, abs_zero, add_zero] · simp only [dist_eq, dist_comm, abs_sub_comm] · calc dist x z = dist x.1 z.1 + |1 / in...
instance
TopologicalSpace.Opens.CompleteCopy.instMetricSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "Metric.isOpen_iff", "MetricSpace", "MetricSpace.ofT0PseudoMetricSpace", "dist_comm", "dist_self", "dist_triangle", "one_div" ]
A metric space structure on a subset `s` of a metric space, designed to make it complete if `s` is open. It is given by `dist' x y = dist x y + |1 / dist x sᶜ - 1 / dist y sᶜ|`, where the second term blows up close to the boundary to ensure that Cauchy sequences for `dist'` remain well inside `s`. This definition ensu...
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
instCompleteSpace [CompleteSpace α] : CompleteSpace (CompleteCopy s)
by refine Metric.complete_of_convergent_controlled_sequences ((1 / 2) ^ ·) (by simp) fun u hu ↦ ?_ have A : CauchySeq fun n => (u n).1 := by refine cauchySeq_of_le_tendsto_0 (fun n : ℕ => (1 / 2) ^ n) (fun n m N hNn hNm => ?_) ?_ · exact (dist_val_le_dist (u n) (u m)).trans (hu N n m hNn hNm).le · exact...
instance
TopologicalSpace.Opens.CompleteCopy.instCompleteSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "CauchySeq", "CompleteSpace", "Metric.complete_of_convergent_controlled_sequences", "Set", "by_cases", "cauchySeq_of_le_tendsto_0", "cauchySeq_tendsto_of_complete", "dist_nonneg", "div_le_iff₀", "div_le_iff₀'", "div_nonneg", "div_pos", "le_rfl", "lt_of_le_of_lt", "lt_of_lt_of_le", "ten...
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
_root_.IsOpen.polishSpace {α : Type*} [TopologicalSpace α] [PolishSpace α] {s : Set α} (hs : IsOpen s) : PolishSpace s
by letI := upgradeIsCompletelyMetrizable α lift s to Opens α using hs exact inferInstanceAs (PolishSpace s.CompleteCopy)
theorem
IsOpen.polishSpace
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "IsOpen", "PolishSpace", "Set", "TopologicalSpace" ]
An open subset of a Polish space is also Polish.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
IsClopenable [t : TopologicalSpace α] (s : Set α) : Prop
∃ t' : TopologicalSpace α, t' ≤ t ∧ @PolishSpace α t' ∧ IsClosed[t'] s ∧ IsOpen[t'] s
def
PolishSpace.IsClopenable
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "IsClosed", "IsOpen", "PolishSpace", "Set", "TopologicalSpace" ]
A set in a topological space is clopenable if there exists a finer Polish topology for which this set is open and closed. It turns out that this notion is equivalent to being Borel-measurable, but this is nontrivial (see `isClopenable_iff_measurableSet`).
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
_root_.IsClosed.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α} (hs : IsClosed s) : IsClopenable s
by /- Both sets `s` and `sᶜ` admit a Polish topology. So does their disjoint union `s ⊕ sᶜ`. Pulling back this topology by the canonical bijection with `α` gives the desired Polish topology in which `s` is both open and closed. -/ classical haveI : PolishSpace s := hs.polishSpace let t : Set α := sᶜ h...
theorem
IsClosed.isClopenable
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "Equiv.Set.sumCompl", "IsClosed", "PolishSpace", "Set", "TopologicalSpace", "TopologicalSpace.coinduced", "coinduced_compose", "coinduced_sup", "continuous_iff_coinduced_le", "instTopologicalSpaceSum", "isOpen_coinduced", "isOpen_sum_iff", "sup_le_iff" ]
Given a closed set `s` in a Polish space, one can construct a finer Polish topology for which `s` is both open and closed.
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) : IsClopenable sᶜ
by rcases hs with ⟨t, t_le, t_polish, h, h'⟩ exact ⟨t, t_le, t_polish, @IsOpen.isClosed_compl α t s h', @IsClosed.isOpen_compl α t s h⟩
theorem
PolishSpace.IsClopenable.compl
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "Set", "TopologicalSpace" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
_root_.IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α} (hs : IsOpen s) : IsClopenable s
by simpa using hs.isClosed_compl.isClopenable.compl
theorem
IsOpen.isClopenable
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "IsOpen", "PolishSpace", "Set", "TopologicalSpace" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319
IsClopenable.iUnion [t : TopologicalSpace α] [PolishSpace α] {s : ℕ → Set α} (hs : ∀ n, IsClopenable (s n)) : IsClopenable (⋃ n, s n)
by choose m mt m_polish _ m_open using hs obtain ⟨t', t'm, -, t'_polish⟩ : ∃ t' : TopologicalSpace α, (∀ n : ℕ, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := exists_polishSpace_forall_le m mt m_polish have A : IsOpen[t'] (⋃ n, s n) := by apply isOpen_iUnion intro n apply t'm n exact m_open n...
theorem
PolishSpace.IsClopenable.iUnion
Topology.MetricSpace
Mathlib/Topology/MetricSpace/Polish.lean
[]
[ "IsClosed", "IsOpen", "IsOpen.isClopenable", "PolishSpace", "Set", "TopologicalSpace", "isOpen_iUnion", "trans" ]
https://github.com/leanprover-community/mathlib4
b9f14353520df73472ae3825fb53f86559a01319