statement stringlengths 1 2.88k | proof stringlengths 0 13.9k | type stringclasses 10
values | symbolic_name stringlengths 1 131 | library stringclasses 417
values | filename stringlengths 17 80 | imports listlengths 0 16 | deps listlengths 0 64 | docstring stringlengths 0 10.2k | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
subset_compl_right (h : is_metric_separated s t) : s ⊆ tᶜ | λ x hs ht, h.disjoint.le_bot ⟨hs, ht⟩ | lemma | is_metric_separated.subset_compl_right | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mono {s' t'} (hs : s ⊆ s') (ht : t ⊆ t') :
is_metric_separated s' t' → is_metric_separated s t | λ ⟨r, r0, hr⟩, ⟨r, r0, λ x hx y hy, hr x (hs hx) y (ht hy)⟩ | lemma | is_metric_separated.mono | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mono_left {s'} (h' : is_metric_separated s' t) (hs : s ⊆ s') :
is_metric_separated s t | h'.mono hs subset.rfl | lemma | is_metric_separated.mono_left | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mono_right {t'} (h' : is_metric_separated s t') (ht : t ⊆ t') :
is_metric_separated s t | h'.mono subset.rfl ht | lemma | is_metric_separated.mono_right | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
union_left {s'} (h : is_metric_separated s t) (h' : is_metric_separated s' t) :
is_metric_separated (s ∪ s') t | begin
rcases ⟨h, h'⟩ with ⟨⟨r, r0, hr⟩, ⟨r', r0', hr'⟩⟩,
refine ⟨min r r', _, λ x hx y hy, hx.elim _ _⟩,
{ rw [← pos_iff_ne_zero] at r0 r0' ⊢,
exact lt_min r0 r0' },
{ exact λ hx, (min_le_left _ _).trans (hr _ hx _ hy) },
{ exact λ hx, (min_le_right _ _).trans (hr' _ hx _ hy) }
end | lemma | is_metric_separated.union_left | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
union_left_iff {s'} :
is_metric_separated (s ∪ s') t ↔ is_metric_separated s t ∧ is_metric_separated s' t | ⟨λ h, ⟨h.mono_left (subset_union_left _ _), h.mono_left (subset_union_right _ _)⟩,
λ h, h.1.union_left h.2⟩ | lemma | is_metric_separated.union_left_iff | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
union_right {t'} (h : is_metric_separated s t) (h' : is_metric_separated s t') :
is_metric_separated s (t ∪ t') | (h.symm.union_left h'.symm).symm | lemma | is_metric_separated.union_right | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
union_right_iff {t'} :
is_metric_separated s (t ∪ t') ↔ is_metric_separated s t ∧ is_metric_separated s t' | comm.trans $ union_left_iff.trans $ and_congr comm comm | lemma | is_metric_separated.union_right_iff | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"comm",
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
finite_Union_left_iff {ι : Type*} {I : set ι} (hI : I.finite) {s : ι → set X} {t : set X} :
is_metric_separated (⋃ i ∈ I, s i) t ↔ ∀ i ∈ I, is_metric_separated (s i) t | begin
refine finite.induction_on hI (by simp) (λ i I hi _ hI, _),
rw [bUnion_insert, ball_insert_iff, union_left_iff, hI]
end | lemma | is_metric_separated.finite_Union_left_iff | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
finite_Union_right_iff {ι : Type*} {I : set ι} (hI : I.finite) {s : set X} {t : ι → set X} :
is_metric_separated s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, is_metric_separated s (t i) | by simpa only [@comm _ _ s] using finite_Union_left_iff hI | lemma | is_metric_separated.finite_Union_right_iff | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"comm",
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
finset_Union_left_iff {ι : Type*} {I : finset ι} {s : ι → set X} {t : set X} :
is_metric_separated (⋃ i ∈ I, s i) t ↔ ∀ i ∈ I, is_metric_separated (s i) t | finite_Union_left_iff I.finite_to_set | lemma | is_metric_separated.finset_Union_left_iff | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"finset",
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
finset_Union_right_iff {ι : Type*} {I : finset ι} {s : set X} {t : ι → set X} :
is_metric_separated s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, is_metric_separated s (t i) | finite_Union_right_iff I.finite_to_set | lemma | is_metric_separated.finset_Union_right_iff | topology.metric_space | src/topology/metric_space/metric_separated.lean | [
"topology.metric_space.emetric_space"
] | [
"finset",
"is_metric_separated"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
pseudo_metrizable_space (X : Type*) [t : topological_space X] : Prop | (exists_pseudo_metric : ∃ (m : pseudo_metric_space X), m.to_uniform_space.to_topological_space = t) | class | topological_space.pseudo_metrizable_space | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"pseudo_metric_space",
"topological_space"
] | A topological space is *pseudo metrizable* if there exists a pseudo metric space structure
compatible with the topology. To endow such a space with a compatible distance, use
`letI : pseudo_metric_space X := topological_space.pseudo_metrizable_space_pseudo_metric X`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
_root_.pseudo_metric_space.to_pseudo_metrizable_space {X : Type*}
[m : pseudo_metric_space X] :
pseudo_metrizable_space X | ⟨⟨m, rfl⟩⟩ | instance | pseudo_metric_space.to_pseudo_metrizable_space | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"pseudo_metric_space"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
pseudo_metrizable_space_pseudo_metric
(X : Type*) [topological_space X] [h : pseudo_metrizable_space X] :
pseudo_metric_space X | h.exists_pseudo_metric.some.replace_topology h.exists_pseudo_metric.some_spec.symm | def | topological_space.pseudo_metrizable_space_pseudo_metric | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"pseudo_metric_space",
"topological_space"
] | Construct on a metrizable space a metric compatible with the topology. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
pseudo_metrizable_space_prod [pseudo_metrizable_space X] [pseudo_metrizable_space Y] :
pseudo_metrizable_space (X × Y) | begin
letI : pseudo_metric_space X := pseudo_metrizable_space_pseudo_metric X,
letI : pseudo_metric_space Y := pseudo_metrizable_space_pseudo_metric Y,
apply_instance
end | instance | topological_space.pseudo_metrizable_space_prod | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"pseudo_metric_space"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
_root_.inducing.pseudo_metrizable_space [pseudo_metrizable_space Y] {f : X → Y}
(hf : inducing f) :
pseudo_metrizable_space X | begin
letI : pseudo_metric_space Y := pseudo_metrizable_space_pseudo_metric Y,
exact ⟨⟨hf.comap_pseudo_metric_space, rfl⟩⟩
end | lemma | inducing.pseudo_metrizable_space | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"inducing",
"pseudo_metric_space"
] | Given an inducing map of a topological space into a pseudo metrizable space, the source space
is also pseudo metrizable. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
pseudo_metrizable_space.first_countable_topology [h : pseudo_metrizable_space X] :
topological_space.first_countable_topology X | begin
unfreezingI { rcases h with ⟨_, hm⟩, rw ←hm },
exact @uniform_space.first_countable_topology X pseudo_metric_space.to_uniform_space
emetric.uniformity.filter.is_countably_generated,
end | instance | topological_space.pseudo_metrizable_space.first_countable_topology | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"topological_space.first_countable_topology",
"uniform_space.first_countable_topology"
] | Every pseudo-metrizable space is first countable. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
pseudo_metrizable_space.subtype [pseudo_metrizable_space X]
(s : set X) : pseudo_metrizable_space s | inducing_coe.pseudo_metrizable_space | instance | topological_space.pseudo_metrizable_space.subtype | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
pseudo_metrizable_space_pi [Π i, pseudo_metrizable_space (π i)] :
pseudo_metrizable_space (Π i, π i) | by { casesI nonempty_fintype ι, letI := λ i, pseudo_metrizable_space_pseudo_metric (π i),
apply_instance } | instance | topological_space.pseudo_metrizable_space_pi | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"nonempty_fintype"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
metrizable_space (X : Type*) [t : topological_space X] : Prop | (exists_metric : ∃ (m : metric_space X), m.to_uniform_space.to_topological_space = t) | class | topological_space.metrizable_space | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"metric_space",
"topological_space"
] | A topological space is metrizable if there exists a metric space structure compatible with the
topology. To endow such a space with a compatible distance, use
`letI : metric_space X := topological_space.metrizable_space_metric X` | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
_root_.metric_space.to_metrizable_space {X : Type*} [m : metric_space X] :
metrizable_space X | ⟨⟨m, rfl⟩⟩ | instance | metric_space.to_metrizable_space | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"metric_space"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
metrizable_space.to_pseudo_metrizable_space [h : metrizable_space X] :
pseudo_metrizable_space X | ⟨let ⟨m, hm⟩ := h.1 in ⟨m.to_pseudo_metric_space, hm⟩⟩ | instance | topological_space.metrizable_space.to_pseudo_metrizable_space | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
metrizable_space_metric (X : Type*) [topological_space X]
[h : metrizable_space X] :
metric_space X | h.exists_metric.some.replace_topology h.exists_metric.some_spec.symm | def | topological_space.metrizable_space_metric | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"metric_space",
"topological_space"
] | Construct on a metrizable space a metric compatible with the topology. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
t2_space_of_metrizable_space [metrizable_space X] : t2_space X | by { letI : metric_space X := metrizable_space_metric X, apply_instance } | instance | topological_space.t2_space_of_metrizable_space | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"metric_space",
"t2_space"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
metrizable_space_prod [metrizable_space X] [metrizable_space Y] :
metrizable_space (X × Y) | begin
letI : metric_space X := metrizable_space_metric X,
letI : metric_space Y := metrizable_space_metric Y,
apply_instance
end | instance | topological_space.metrizable_space_prod | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"metric_space"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
_root_.embedding.metrizable_space [metrizable_space Y] {f : X → Y} (hf : embedding f) :
metrizable_space X | begin
letI : metric_space Y := metrizable_space_metric Y,
exact ⟨⟨hf.comap_metric_space f, rfl⟩⟩
end | lemma | embedding.metrizable_space | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"embedding",
"metric_space"
] | Given an embedding of a topological space into a metrizable space, the source space is also
metrizable. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
metrizable_space.subtype [metrizable_space X] (s : set X) : metrizable_space s | embedding_subtype_coe.metrizable_space | instance | topological_space.metrizable_space.subtype | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
metrizable_space_pi [Π i, metrizable_space (π i)] : metrizable_space (Π i, π i) | by { casesI nonempty_fintype ι, letI := λ i, metrizable_space_metric (π i), apply_instance } | instance | topological_space.metrizable_space_pi | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"nonempty_fintype"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_embedding_l_infty : ∃ f : X → (ℕ →ᵇ ℝ), embedding f | begin
haveI : normal_space X := normal_space_of_t3_second_countable X,
-- Choose a countable basis, and consider the set `s` of pairs of set `(U, V)` such that `U ∈ B`,
-- `V ∈ B`, and `closure U ⊆ V`.
rcases exists_countable_basis X with ⟨B, hBc, -, hB⟩,
set s : set (set X × set X) := {UV ∈ B ×ˢ B| closure U... | lemma | topological_space.exists_embedding_l_infty | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [
"bounded_continuous_function.dist_coe_le_dist",
"bounded_continuous_function.dist_le",
"bounded_continuous_function.isometry_extend",
"closure",
"continuous.tendsto",
"discrete_topology",
"disjoint",
"embedding",
"embedding.comp",
"embedding.mk'",
"encodable",
"encodable.encode'",
"exists_co... | A T₃ topological space with second countable topology can be embedded into `l^∞ = ℕ →ᵇ ℝ`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
metrizable_space_of_t3_second_countable : metrizable_space X | let ⟨f, hf⟩ := exists_embedding_l_infty X in hf.metrizable_space | lemma | topological_space.metrizable_space_of_t3_second_countable | topology.metric_space | src/topology/metric_space/metrizable.lean | [
"analysis.specific_limits.basic",
"topology.urysohns_lemma",
"topology.continuous_function.bounded",
"topology.uniform_space.cauchy"
] | [] | *Urysohn's metrization theorem* (Tychonoff's version): a T₃ topological space with second
countable topology `X` is metrizable, i.e., there exists a metric space structure that generates the
same topology. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
of_prenndist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
(dist_comm : ∀ x y, d x y = d y x) :
pseudo_metric_space X | { dist := λ x y, ↑(⨅ l : list X, ((x :: l).zip_with d (l ++ [y])).sum : ℝ≥0),
dist_self := λ x, (nnreal.coe_eq_zero _).2 $ nonpos_iff_eq_zero.1 $
(cinfi_le (order_bot.bdd_below _) []).trans_eq $ by simp [dist_self],
dist_comm := λ x y, nnreal.coe_eq.2 $
begin
refine reverse_surjective.infi_congr _ (λ ... | def | pseudo_metric_space.of_prenndist | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"append_assoc",
"cinfi_le",
"cons_append",
"dist_comm",
"dist_self",
"dist_triangle",
"nnreal.coe_add",
"nnreal.coe_eq_zero",
"nnreal.coe_le_coe",
"nnreal.le_infi_add_infi",
"order_bot.bdd_below",
"pseudo_metric_space"
] | The maximal pseudo metric space structure on `X` such that `dist x y ≤ d x y` for all `x y`,
where `d : X → X → ℝ≥0` is a function such that `d x x = 0` and `d x y = d y x` for all `x`, `y`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
dist_of_prenndist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
(dist_comm : ∀ x y, d x y = d y x) (x y : X) :
@dist X (@pseudo_metric_space.to_has_dist X
(pseudo_metric_space.of_prenndist d dist_self dist_comm)) x y =
↑(⨅ l : list X, ((x :: l).zip_with d (l ++ [y])).sum : ℝ≥0) | rfl | lemma | pseudo_metric_space.dist_of_prenndist | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"dist_comm",
"dist_self",
"pseudo_metric_space.of_prenndist"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dist_of_prenndist_le (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
(dist_comm : ∀ x y, d x y = d y x) (x y : X) :
@dist X (@pseudo_metric_space.to_has_dist X
(pseudo_metric_space.of_prenndist d dist_self dist_comm)) x y ≤ d x y | nnreal.coe_le_coe.2 $ (cinfi_le (order_bot.bdd_below _) []).trans_eq $ by simp | lemma | pseudo_metric_space.dist_of_prenndist_le | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"cinfi_le",
"dist_comm",
"dist_self",
"order_bot.bdd_below",
"pseudo_metric_space.of_prenndist"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
le_two_mul_dist_of_prenndist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
(dist_comm : ∀ x y, d x y = d y x)
(hd : ∀ x₁ x₂ x₃ x₄, d x₁ x₄ ≤ 2 * max (d x₁ x₂) (max (d x₂ x₃) (d x₃ x₄))) (x y : X) :
↑(d x y) ≤ 2 * @dist X (@pseudo_metric_space.to_has_dist X
(pseudo_metric_space.of_prenndist d dist_self dist_c... | begin
/- We need to show that `d x y` is at most twice the sum `L` of `d xᵢ xᵢ₊₁` over a path
`x₀=x, ..., xₙ=y`. We prove it by induction on the length `n` of the sequence. Find an edge that
splits the path into two parts of almost equal length: both `d x₀ x₁ + ... + d xₖ₋₁ xₖ` and
`d xₖ₊₁ xₖ₊₂ + ... + d xₙ₋₁ x... | lemma | pseudo_metric_space.le_two_mul_dist_of_prenndist | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"bdd_above",
"cSup_le",
"dist_comm",
"dist_self",
"eq_or_ne",
"is_greatest",
"le_cSup",
"le_cinfi",
"le_rfl",
"mul_le_mul_left'",
"mul_zero",
"nat.lt_iff_add_one_le",
"nat.lt_succ_iff",
"nat.succ_le_iff",
"nnreal.coe_le_coe",
"nnreal.coe_mul",
"nnreal.coe_two",
"nnreal.mul_infi",
... | Consider a function `d : X → X → ℝ≥0` such that `d x x = 0` and `d x y = d y x` for all `x`,
`y`. Let `dist` be the largest pseudometric distance such that `dist x y ≤ d x y`, see
`pseudo_metric_space.of_prenndist`. Suppose that `d` satisfies the following triangle-like
inequality: `d x₁ x₄ ≤ 2 * max (d x₁ x₂, d x₂ x₃,... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
uniform_space.metrizable_uniformity (X : Type*) [uniform_space X]
[is_countably_generated (𝓤 X)] :
∃ I : pseudo_metric_space X, I.to_uniform_space = ‹_› | begin
/- Choose a fast decreasing antitone basis `U : ℕ → set (X × X)` of the uniformity filter `𝓤 X`.
Define `d x y : ℝ≥0` to be `(1 / 2) ^ n`, where `n` is the minimal index of `U n` that separates
`x` and `y`: `(x, y) ∉ U n`, or `0` if `x` is not separated from `y`. This function satisfies the
assumptions o... | lemma | uniform_space.metrizable_uniformity | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"div_le_iff'",
"div_mul_cancel",
"eventually_uniformity_iterate_comp_subset",
"le_max_iff",
"le_rfl",
"lt_add_one",
"mul_one_div",
"nat.find_le_iff",
"nnreal.coe_div",
"nnreal.coe_le_coe",
"nnreal.coe_lt_coe",
"nnreal.coe_pow",
"nnreal.coe_two",
"nnreal.div_le_iff",
"nnreal.div_le_iff'",... | If `X` is a uniform space with countably generated uniformity filter, there exists a
`pseudo_metric_space` structure compatible with the `uniform_space` structure. Use
`uniform_space.pseudo_metric_space` or `uniform_space.metric_space` instead. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
uniform_space.pseudo_metric_space (X : Type*) [uniform_space X]
[is_countably_generated (𝓤 X)] : pseudo_metric_space X | (uniform_space.metrizable_uniformity X).some.replace_uniformity $
congr_arg _ (uniform_space.metrizable_uniformity X).some_spec.symm | def | uniform_space.pseudo_metric_space | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"pseudo_metric_space",
"uniform_space",
"uniform_space.metrizable_uniformity"
] | A `pseudo_metric_space` instance compatible with a given `uniform_space` structure. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
uniform_space.metric_space (X : Type*) [uniform_space X]
[is_countably_generated (𝓤 X)] [t0_space X] : metric_space X | @metric_space.of_t0_pseudo_metric_space X (uniform_space.pseudo_metric_space X) _ | def | uniform_space.metric_space | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"metric_space",
"metric_space.of_t0_pseudo_metric_space",
"t0_space",
"uniform_space",
"uniform_space.pseudo_metric_space"
] | A `metric_space` instance compatible with a given `uniform_space` structure. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
uniform_space.pseudo_metrizable_space [uniform_space X] [is_countably_generated (𝓤 X)] :
topological_space.pseudo_metrizable_space X | by { letI := uniform_space.pseudo_metric_space X, apply_instance } | instance | uniform_space.pseudo_metrizable_space | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"topological_space.pseudo_metrizable_space",
"uniform_space",
"uniform_space.pseudo_metric_space"
] | A uniform space with countably generated `𝓤 X` is pseudo metrizable. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
uniform_space.metrizable_space [uniform_space X] [is_countably_generated (𝓤 X)] [t0_space X] :
topological_space.metrizable_space X | by { letI := uniform_space.metric_space X, apply_instance } | lemma | uniform_space.metrizable_space | topology.metric_space | src/topology/metric_space/metrizable_uniformity.lean | [
"topology.metric_space.metrizable"
] | [
"t0_space",
"topological_space.metrizable_space",
"uniform_space",
"uniform_space.metric_space"
] | A T₀ uniform space with countably generated `𝓤 X` is metrizable. This is not an instance to
avoid loops. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
eventually_nhds_zero_forall_closed_ball_subset (hK : ∀ i, is_closed (K i))
(hU : ∀ i, is_open (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : locally_finite K) (x : X) :
∀ᶠ p : ℝ≥0∞ × X in 𝓝 0 ×ᶠ 𝓝 x, ∀ i, p.2 ∈ K i → closed_ball p.2 p.1 ⊆ U i | begin
suffices : ∀ i, x ∈ K i → ∀ᶠ p : ℝ≥0∞ × X in 𝓝 0 ×ᶠ 𝓝 x, closed_ball p.2 p.1 ⊆ U i,
{ filter_upwards [tendsto_snd (hfin.Inter_compl_mem_nhds hK x),
(eventually_all_finite (hfin.point_finite x)).2 this],
rintro ⟨r, y⟩ hxy hyU i hi,
simp only [mem_Inter₂, mem_compl_iff, not_imp_not, mem_preimage... | lemma | emetric.eventually_nhds_zero_forall_closed_ball_subset | topology.metric_space | src/topology/metric_space/partition_of_unity.lean | [
"topology.metric_space.emetric_paracompact",
"analysis.convex.partition_of_unity"
] | [
"add_tsub_cancel_of_le",
"eventually_lt_nhds",
"is_closed",
"is_open",
"locally_finite",
"not_imp_not",
"tsub_le_tsub_left"
] | Let `K : ι → set X` be a locally finitie family of closed sets in an emetric space. Let
`U : ι → set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then for any point
`x : X`, for sufficiently small `r : ℝ≥0∞` and for `y` sufficiently close to `x`, for all `i`, if
`y ∈ K i`, then `emetric.closed_ball y ... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
exists_forall_closed_ball_subset_aux₁ (hK : ∀ i, is_closed (K i))
(hU : ∀ i, is_open (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : locally_finite K) (x : X) :
∃ r : ℝ, ∀ᶠ y in 𝓝 x, r ∈ Ioi (0 : ℝ) ∩
ennreal.of_real ⁻¹' ⋂ i (hi : y ∈ K i), {r | closed_ball y r ⊆ U i} | begin
have := (ennreal.continuous_of_real.tendsto' 0 0 ennreal.of_real_zero).eventually
(eventually_nhds_zero_forall_closed_ball_subset hK hU hKU hfin x).curry,
rcases this.exists_gt with ⟨r, hr0, hr⟩,
refine ⟨r, hr.mono (λ y hy, ⟨hr0, _⟩)⟩,
rwa [mem_preimage, mem_Inter₂]
end | lemma | emetric.exists_forall_closed_ball_subset_aux₁ | topology.metric_space | src/topology/metric_space/partition_of_unity.lean | [
"topology.metric_space.emetric_paracompact",
"analysis.convex.partition_of_unity"
] | [
"ennreal.of_real",
"ennreal.of_real_zero",
"is_closed",
"is_open",
"locally_finite"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_forall_closed_ball_subset_aux₂ (y : X) :
convex ℝ (Ioi (0 : ℝ) ∩ ennreal.of_real ⁻¹' ⋂ i (hi : y ∈ K i), {r | closed_ball y r ⊆ U i}) | (convex_Ioi _).inter $ ord_connected.convex $ ord_connected.preimage_ennreal_of_real $
ord_connected_Inter $ λ i, ord_connected_Inter $
λ hi, ord_connected_set_of_closed_ball_subset y (U i) | lemma | emetric.exists_forall_closed_ball_subset_aux₂ | topology.metric_space | src/topology/metric_space/partition_of_unity.lean | [
"topology.metric_space.emetric_paracompact",
"analysis.convex.partition_of_unity"
] | [
"convex",
"convex_Ioi",
"ennreal.of_real"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_continuous_real_forall_closed_ball_subset (hK : ∀ i, is_closed (K i))
(hU : ∀ i, is_open (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : locally_finite K) :
∃ δ : C(X, ℝ), (∀ x, 0 < δ x) ∧ ∀ i (x ∈ K i), closed_ball x (ennreal.of_real $ δ x) ⊆ U i | by simpa only [mem_inter_iff, forall_and_distrib, mem_preimage, mem_Inter, @forall_swap ι X]
using exists_continuous_forall_mem_convex_of_local_const exists_forall_closed_ball_subset_aux₂
(exists_forall_closed_ball_subset_aux₁ hK hU hKU hfin) | lemma | emetric.exists_continuous_real_forall_closed_ball_subset | topology.metric_space | src/topology/metric_space/partition_of_unity.lean | [
"topology.metric_space.emetric_paracompact",
"analysis.convex.partition_of_unity"
] | [
"ennreal.of_real",
"exists_continuous_forall_mem_convex_of_local_const",
"forall_and_distrib",
"forall_swap",
"is_closed",
"is_open",
"locally_finite"
] | Let `X` be an extended metric space. Let `K : ι → set X` be a locally finite family of closed
sets, let `U : ι → set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there
exists a positive continuous function `δ : C(X, ℝ)` such that for any `i` and `x ∈ K i`,
we have `emetric.closed_ball x (ennreal.... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
exists_continuous_nnreal_forall_closed_ball_subset (hK : ∀ i, is_closed (K i))
(hU : ∀ i, is_open (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : locally_finite K) :
∃ δ : C(X, ℝ≥0), (∀ x, 0 < δ x) ∧ ∀ i (x ∈ K i), closed_ball x (δ x) ⊆ U i | begin
rcases exists_continuous_real_forall_closed_ball_subset hK hU hKU hfin with ⟨δ, hδ₀, hδ⟩,
lift δ to C(X, ℝ≥0) using λ x, (hδ₀ x).le,
refine ⟨δ, hδ₀, λ i x hi, _⟩,
simpa only [← ennreal.of_real_coe_nnreal] using hδ i x hi
end | lemma | emetric.exists_continuous_nnreal_forall_closed_ball_subset | topology.metric_space | src/topology/metric_space/partition_of_unity.lean | [
"topology.metric_space.emetric_paracompact",
"analysis.convex.partition_of_unity"
] | [
"ennreal.of_real_coe_nnreal",
"is_closed",
"is_open",
"lift",
"locally_finite"
] | Let `X` be an extended metric space. Let `K : ι → set X` be a locally finite family of closed
sets, let `U : ι → set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there
exists a positive continuous function `δ : C(X, ℝ≥0)` such that for any `i` and `x ∈ K i`,
we have `emetric.closed_ball x (δ x) ⊆... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
exists_continuous_ennreal_forall_closed_ball_subset (hK : ∀ i, is_closed (K i))
(hU : ∀ i, is_open (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : locally_finite K) :
∃ δ : C(X, ℝ≥0∞), (∀ x, 0 < δ x) ∧ ∀ i (x ∈ K i), closed_ball x (δ x) ⊆ U i | let ⟨δ, hδ₀, hδ⟩ := exists_continuous_nnreal_forall_closed_ball_subset hK hU hKU hfin
in ⟨continuous_map.comp ⟨coe, ennreal.continuous_coe⟩ δ, λ x, ennreal.coe_pos.2 (hδ₀ x), hδ⟩ | lemma | emetric.exists_continuous_ennreal_forall_closed_ball_subset | topology.metric_space | src/topology/metric_space/partition_of_unity.lean | [
"topology.metric_space.emetric_paracompact",
"analysis.convex.partition_of_unity"
] | [
"is_closed",
"is_open",
"locally_finite"
] | Let `X` be an extended metric space. Let `K : ι → set X` be a locally finite family of closed
sets, let `U : ι → set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there
exists a positive continuous function `δ : C(X, ℝ≥0∞)` such that for any `i` and `x ∈ K i`,
we have `emetric.closed_ball x (δ x) ... | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
exists_continuous_nnreal_forall_closed_ball_subset (hK : ∀ i, is_closed (K i))
(hU : ∀ i, is_open (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : locally_finite K) :
∃ δ : C(X, ℝ≥0), (∀ x, 0 < δ x) ∧ ∀ i (x ∈ K i), closed_ball x (δ x) ⊆ U i | begin
rcases emetric.exists_continuous_nnreal_forall_closed_ball_subset hK hU hKU hfin
with ⟨δ, hδ0, hδ⟩,
refine ⟨δ, hδ0, λ i x hx, _⟩,
rw [← emetric_closed_ball_nnreal],
exact hδ i x hx
end | lemma | metric.exists_continuous_nnreal_forall_closed_ball_subset | topology.metric_space | src/topology/metric_space/partition_of_unity.lean | [
"topology.metric_space.emetric_paracompact",
"analysis.convex.partition_of_unity"
] | [
"emetric.exists_continuous_nnreal_forall_closed_ball_subset",
"is_closed",
"is_open",
"locally_finite"
] | Let `X` be a metric space. Let `K : ι → set X` be a locally finite family of closed sets, let
`U : ι → set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there exists a
positive continuous function `δ : C(X, ℝ≥0)` such that for any `i` and `x ∈ K i`, we have
`metric.closed_ball x (δ x) ⊆ U i`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
exists_continuous_real_forall_closed_ball_subset (hK : ∀ i, is_closed (K i))
(hU : ∀ i, is_open (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : locally_finite K) :
∃ δ : C(X, ℝ), (∀ x, 0 < δ x) ∧ ∀ i (x ∈ K i), closed_ball x (δ x) ⊆ U i | let ⟨δ, hδ₀, hδ⟩ := exists_continuous_nnreal_forall_closed_ball_subset hK hU hKU hfin
in ⟨continuous_map.comp ⟨coe, nnreal.continuous_coe⟩ δ, hδ₀, hδ⟩ | lemma | metric.exists_continuous_real_forall_closed_ball_subset | topology.metric_space | src/topology/metric_space/partition_of_unity.lean | [
"topology.metric_space.emetric_paracompact",
"analysis.convex.partition_of_unity"
] | [
"is_closed",
"is_open",
"locally_finite"
] | Let `X` be a metric space. Let `K : ι → set X` be a locally finite family of closed sets, let
`U : ι → set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there exists a
positive continuous function `δ : C(X, ℝ)` such that for any `i` and `x ∈ K i`, we have
`metric.closed_ball x (δ x) ⊆ U i`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
first_diff (x y : Π n, E n) : ℕ | if h : x ≠ y then nat.find (ne_iff.1 h) else 0 | def | pi_nat.first_diff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | In a product space `Π n, E n`, then `first_diff x y` is the first index at which `x` and `y`
differ. If `x = y`, then by convention we set `first_diff x x = 0`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
apply_first_diff_ne {x y : Π n, E n} (h : x ≠ y) :
x (first_diff x y) ≠ y (first_diff x y) | begin
rw [first_diff, dif_pos h],
exact nat.find_spec (ne_iff.1 h),
end | lemma | pi_nat.apply_first_diff_ne | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
apply_eq_of_lt_first_diff {x y : Π n, E n} {n : ℕ} (hn : n < first_diff x y) :
x n = y n | begin
rw first_diff at hn,
split_ifs at hn,
{ convert nat.find_min (ne_iff.1 h) hn,
simp },
{ exact (not_lt_zero' hn).elim }
end | lemma | pi_nat.apply_eq_of_lt_first_diff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"not_lt_zero'"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
first_diff_comm (x y : Π n, E n) :
first_diff x y = first_diff y x | begin
rcases eq_or_ne x y with rfl|hxy, { refl },
rcases lt_trichotomy (first_diff x y) (first_diff y x) with h|h|h,
{ exact (apply_first_diff_ne hxy (apply_eq_of_lt_first_diff h).symm).elim },
{ exact h },
{ exact (apply_first_diff_ne hxy.symm (apply_eq_of_lt_first_diff h).symm).elim }
end | lemma | pi_nat.first_diff_comm | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"eq_or_ne"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
min_first_diff_le (x y z : Π n, E n) (h : x ≠ z) :
min (first_diff x y) (first_diff y z) ≤ first_diff x z | begin
by_contra' H,
have : x (first_diff x z) = z (first_diff x z), from calc
x (first_diff x z) = y (first_diff x z) :
apply_eq_of_lt_first_diff (H.trans_le (min_le_left _ _))
... = z ((first_diff x z)) : apply_eq_of_lt_first_diff (H.trans_le (min_le_right _ _)),
exact (apply_first_diff_ne h this).... | lemma | pi_nat.min_first_diff_le | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
cylinder (x : Π n, E n) (n : ℕ) : set (Π n, E n) | {y | ∀ i, i < n → y i = x i} | def | pi_nat.cylinder | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | In a product space `Π n, E n`, the cylinder set of length `n` around `x`, denoted
`cylinder x n`, is the set of sequences `y` that coincide with `x` on the first `n` symbols, i.e.,
such that `y i = x i` for all `i < n`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
cylinder_eq_pi (x : Π n, E n) (n : ℕ) :
cylinder x n = set.pi (finset.range n : set ℕ) (λ (i : ℕ), {x i}) | by { ext y, simp [cylinder] } | lemma | pi_nat.cylinder_eq_pi | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"finset.range",
"set.pi"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
cylinder_zero (x : Π n, E n) : cylinder x 0 = univ | by simp [cylinder_eq_pi] | lemma | pi_nat.cylinder_zero | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
cylinder_anti (x : Π n, E n) {m n : ℕ} (h : m ≤ n) : cylinder x n ⊆ cylinder x m | λ y hy i hi, hy i (hi.trans_le h) | lemma | pi_nat.cylinder_anti | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_cylinder_iff {x y : Π n, E n} {n : ℕ} :
y ∈ cylinder x n ↔ ∀ i, i < n → y i = x i | iff.rfl | lemma | pi_nat.mem_cylinder_iff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
self_mem_cylinder (x : Π n, E n) (n : ℕ) :
x ∈ cylinder x n | by simp | lemma | pi_nat.self_mem_cylinder | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_cylinder_iff_eq {x y : Π n, E n} {n : ℕ} :
y ∈ cylinder x n ↔ cylinder y n = cylinder x n | begin
split,
{ assume hy,
apply subset.antisymm,
{ assume z hz i hi,
rw ← hy i hi,
exact hz i hi },
{ assume z hz i hi,
rw hy i hi,
exact hz i hi } },
{ assume h,
rw ← h,
exact self_mem_cylinder _ _ }
end | lemma | pi_nat.mem_cylinder_iff_eq | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_cylinder_comm (x y : Π n, E n) (n : ℕ) :
y ∈ cylinder x n ↔ x ∈ cylinder y n | by simp [mem_cylinder_iff_eq, eq_comm] | lemma | pi_nat.mem_cylinder_comm | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_cylinder_iff_le_first_diff {x y : Π n, E n} (hne : x ≠ y) (i : ℕ) :
x ∈ cylinder y i ↔ i ≤ first_diff x y | begin
split,
{ assume h,
by_contra',
exact apply_first_diff_ne hne (h _ this) },
{ assume hi j hj,
exact apply_eq_of_lt_first_diff (hj.trans_le hi) }
end | lemma | pi_nat.mem_cylinder_iff_le_first_diff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_cylinder_first_diff (x y : Π n, E n) :
x ∈ cylinder y (first_diff x y) | λ i hi, apply_eq_of_lt_first_diff hi | lemma | pi_nat.mem_cylinder_first_diff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
cylinder_eq_cylinder_of_le_first_diff (x y : Π n, E n) {n : ℕ} (hn : n ≤ first_diff x y) :
cylinder x n = cylinder y n | begin
rw ← mem_cylinder_iff_eq,
assume i hi,
exact apply_eq_of_lt_first_diff (hi.trans_le hn),
end | lemma | pi_nat.cylinder_eq_cylinder_of_le_first_diff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
Union_cylinder_update (x : Π n, E n) (n : ℕ) :
(⋃ k, cylinder (update x n k) (n+1)) = cylinder x n | begin
ext y,
simp only [mem_cylinder_iff, mem_Union],
split,
{ rintros ⟨k, hk⟩ i hi,
simpa [hi.ne] using hk i (nat.lt_succ_of_lt hi) },
{ assume H,
refine ⟨y n, λ 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 } },
end | lemma | pi_nat.Union_cylinder_update | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"update"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
update_mem_cylinder (x : Π n, E n) (n : ℕ) (y : E n) :
update x n y ∈ cylinder x n | mem_cylinder_iff.2 (λ i hi, by simp [hi.ne]) | lemma | pi_nat.update_mem_cylinder | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"update"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
res (x : ℕ → α) : ℕ → list α | | 0 := nil
| (nat.succ n) := x n :: res n | def | pi_nat.res | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | 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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
res_zero (x : ℕ → α) : res x 0 = @nil α | rfl | lemma | pi_nat.res_zero | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
res_succ (x : ℕ → α) (n : ℕ) : res x n.succ = x n :: res x n | rfl | lemma | pi_nat.res_succ | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
res_length (x : ℕ → α) (n : ℕ) : (res x n).length = n | by induction n; simp [*] | lemma | pi_nat.res_length | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
res_eq_res {x y : ℕ → α} {n : ℕ} : res x n = res y n ↔ ∀ ⦃m⦄, m < n → x m = y m | begin
split; intro h; induction n with n ih, { simp },
{ intros m hm,
rw nat.lt_succ_iff_lt_or_eq at hm,
simp only [res_succ] at h,
cases hm with hm hm,
{ exact ih h.2 hm },
rw hm,
exact h.1, },
{ simp },
simp only [res_succ],
refine ⟨h (nat.lt_succ_self _), ih (λ m hm, _)⟩,
exact h ... | lemma | pi_nat.res_eq_res | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"ih",
"nat.lt_succ_iff_lt_or_eq"
] | 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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
res_injective : injective (@res α) | begin
intros x y h,
ext n,
apply (res_eq_res).mp _ (nat.lt_succ_self _),
rw h,
end | lemma | pi_nat.res_injective | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
cylinder_eq_res (x : ℕ → α) (n : ℕ) : cylinder x n = {y | res y n = res x n} | begin
ext y,
dsimp [cylinder],
rw res_eq_res,
end | theorem | pi_nat.cylinder_eq_res | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | `cylinder x n` is equal to the set of sequences `y` with the same restriction to `n` as `x`. | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
has_dist : has_dist (Π n, E n) | ⟨λ x y, if h : x ≠ y then (1/2 : ℝ) ^ (first_diff x y) else 0⟩ | def | pi_nat.has_dist | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"has_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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
dist_eq_of_ne {x y : Π n, E n} (h : x ≠ y) :
dist x y = (1/2 : ℝ) ^ (first_diff x y) | by simp [dist, h] | lemma | pi_nat.dist_eq_of_ne | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dist_self (x : Π n, E n) : dist x x = 0 | by simp [dist] | lemma | pi_nat.dist_self | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"dist_self"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dist_comm (x y : Π n, E n) : dist x y = dist y x | by simp [dist, @eq_comm _ x y, first_diff_comm] | lemma | pi_nat.dist_comm | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"dist_comm"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dist_nonneg (x y : Π n, E n) : 0 ≤ dist x y | begin
rcases eq_or_ne x y with rfl|h,
{ simp [dist] },
{ simp [dist, h] }
end | lemma | pi_nat.dist_nonneg | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"dist_nonneg",
"eq_or_ne"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
dist_triangle_nonarch (x y z : Π n, E n) :
dist x z ≤ max (dist x y) (dist y z) | begin
rcases eq_or_ne x z with rfl|hxz,
{ simp [pi_nat.dist_self x, pi_nat.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_bit0,
ne.def, not_false_iff, le_max_iff, zer... | lemma | pi_nat.dist_triangle_nonarch | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"eq_or_ne",
"inv_le_inv",
"inv_pow",
"le_max_iff",
"one_div",
"one_lt_two",
"pi_nat.dist_nonneg",
"pi_nat.dist_self",
"pow_le_pow_iff",
"pow_pos",
"zero_lt_bit0",
"zero_lt_one"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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 (pi_nat.dist_nonneg _ _) (pi_nat.dist_nonneg _ _) | lemma | pi_nat.dist_triangle | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"dist_triangle",
"pi_nat.dist_nonneg"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
eq_of_dist_eq_zero (x y : Π n, E n) (hxy : dist x y = 0) : x = y | begin
rcases eq_or_ne x y with rfl|h, { refl },
simp [dist_eq_of_ne h] at hxy,
exact (two_ne_zero (pow_eq_zero hxy)).elim
end | lemma | pi_nat.eq_of_dist_eq_zero | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"eq_of_dist_eq_zero",
"eq_or_ne",
"pow_eq_zero",
"two_ne_zero"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
mem_cylinder_iff_dist_le {x y : Π n, E n} {n : ℕ} :
y ∈ cylinder x n ↔ dist y x ≤ (1/2)^n | begin
rcases eq_or_ne y x with rfl|hne, { simp [pi_nat.dist_self] },
suffices : (∀ (i : ℕ), i < n → y i = x i) ↔ n ≤ first_diff y x,
by simpa [dist_eq_of_ne hne],
split,
{ assume hy,
by_contra' H,
exact apply_first_diff_ne hne (hy _ H) },
{ assume h i hi,
exact apply_eq_of_lt_first_diff (hi.tr... | lemma | pi_nat.mem_cylinder_iff_dist_le | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"eq_or_ne",
"pi_nat.dist_self"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
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 | begin
rcases eq_or_ne x y with rfl|hne, { refl },
have : n < first_diff x y,
by simpa [dist_eq_of_ne hne, inv_lt_inv, pow_lt_pow_iff, one_lt_two] using h,
exact apply_eq_of_lt_first_diff (hi.trans_lt this),
end | lemma | pi_nat.apply_eq_of_dist_lt | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"eq_or_ne",
"inv_lt_inv",
"one_lt_two",
"pow_lt_pow_iff"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
lipschitz_with_one_iff_forall_dist_image_le_of_mem_cylinder
{α : Type*} [pseudo_metric_space α] {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) | begin
split,
{ assume H x y n hxy,
apply (H x y).trans,
rw pi_nat.dist_comm,
exact mem_cylinder_iff_dist_le.1 hxy },
{ assume H x y,
rcases eq_or_ne x y with rfl|hne, { simp [pi_nat.dist_nonneg] },
rw dist_eq_of_ne hne,
apply H x y (first_diff x y),
rw first_diff_comm,
exact mem_cy... | lemma | pi_nat.lipschitz_with_one_iff_forall_dist_image_le_of_mem_cylinder | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"eq_or_ne",
"pi_nat.dist_comm",
"pi_nat.dist_nonneg",
"pseudo_metric_space"
] | 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 `lipschitz_with` as we don't have a metric space structure | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
is_open_cylinder (x : Π n, E n) (n : ℕ) : is_open (cylinder x n) | begin
rw pi_nat.cylinder_eq_pi,
exact is_open_set_pi (finset.range n).finite_to_set (λ a ha, is_open_discrete _),
end | lemma | pi_nat.is_open_cylinder | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"finset.range",
"is_open",
"is_open_discrete",
"is_open_set_pi",
"pi_nat.cylinder_eq_pi"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_topological_basis_cylinders :
is_topological_basis {s : set (Π n, E n) | ∃ (x : Π n, E n) (n : ℕ), s = cylinder x n} | begin
apply is_topological_basis_of_open_of_nhds,
{ rintros u ⟨x, n, rfl⟩,
apply is_open_cylinder, },
{ assume x u hx u_open,
obtain ⟨v, ⟨U, F, hUF, rfl⟩, xU, Uu⟩ : ∃ (v : set (Π (i : ℕ), E i))
(H : v ∈ {S : set (Π (i : ℕ), E i) | ∃ (U : Π (i : ℕ), set (E i)) (F : finset ℕ),
(∀ (i : ℕ), i ∈ ... | lemma | pi_nat.is_topological_basis_cylinders | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"finset",
"finset.bdd_above",
"finset.mem_coe",
"is_open",
"is_topological_basis_pi",
"lt_add_one",
"set.mem_pi"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
is_open_iff_dist (s : set (Π n, E n)) :
is_open s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ y, dist x y < ε → y ∈ s | begin
split,
{ assume hs x hx,
obtain ⟨v, ⟨y, n, rfl⟩, h'x, h's⟩ : ∃ (v : set (Π (n : ℕ), E n))
(H : v ∈ {s | ∃ (x : Π (n : ℕ), E n) (n : ℕ), s = cylinder x n}), x ∈ v ∧ v ⊆ s :=
(is_topological_basis_cylinders E).exists_subset_of_mem_open hx hs,
rw ← mem_cylinder_iff_eq.1 h'x at h's,
exac... | lemma | pi_nat.is_open_iff_dist | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"exists_pow_lt_of_lt_one",
"is_open",
"one_half_lt_one",
"pi_nat.dist_comm"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
metric_space : metric_space (Π n, E n) | metric_space.of_dist_topology dist pi_nat.dist_self pi_nat.dist_comm pi_nat.dist_triangle
is_open_iff_dist pi_nat.eq_of_dist_eq_zero | def | pi_nat.metric_space | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"metric_space",
"metric_space.of_dist_topology",
"pi_nat.dist_comm",
"pi_nat.dist_self",
"pi_nat.dist_triangle",
"pi_nat.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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
metric_space_of_discrete_uniformity {E : ℕ → Type*} [∀ n, uniform_space (E n)]
(h : ∀ n, uniformity (E n) = 𝓟 id_rel) : metric_space (Π n, E n) | begin
haveI : ∀ n, discrete_topology (E n) := λ n, discrete_topology_of_discrete_uniformity (h n),
exact
{ dist_triangle := pi_nat.dist_triangle,
dist_comm := pi_nat.dist_comm,
dist_self := pi_nat.dist_self,
eq_of_dist_eq_zero := pi_nat.eq_of_dist_eq_zero,
to_uniform_space := Pi.uniform_space _,
... | def | pi_nat.metric_space_of_discrete_uniformity | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"Pi.uniform_space",
"Pi.uniformity",
"discrete_topology",
"discrete_topology_of_discrete_uniformity",
"dist_comm",
"dist_self",
"dist_triangle",
"eq_of_dist_eq_zero",
"exists_pow_lt_of_lt_one",
"finset.mem_coe",
"finset.mem_range",
"finset.range",
"gt_iff_lt",
"id_rel",
"imp_self",
"le... | 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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
metric_space_nat_nat : metric_space (ℕ → ℕ) | pi_nat.metric_space_of_discrete_uniformity (λ n, rfl) | def | pi_nat.metric_space_nat_nat | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"metric_space",
"pi_nat.metric_space_of_discrete_uniformity"
] | 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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
complete_space : complete_space (Π n, E n) | begin
refine metric.complete_of_convergent_controlled_sequences (λ n, (1/2)^n) (by simp) _,
assume u hu,
refine ⟨λ n, u n n, tendsto_pi_nhds.2 (λ i, _)⟩,
refine tendsto_const_nhds.congr' _,
filter_upwards [filter.Ici_mem_at_top i] with n hn,
exact apply_eq_of_dist_lt (hu i i n le_rfl hn) le_rfl,
end | lemma | pi_nat.complete_space | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"complete_space",
"filter.Ici_mem_at_top",
"le_rfl",
"metric.complete_of_convergent_controlled_sequences"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
exists_disjoint_cylinder {s : set (Π n, E n)} (hs : is_closed s) {x : Π n, E n} (hx : x ∉ s) :
∃ n, disjoint s (cylinder x n) | begin
unfreezingI { rcases eq_empty_or_nonempty s with rfl|hne },
{ exact ⟨0, by simp⟩ },
have A : 0 < inf_dist x s := (hs.not_mem_iff_inf_dist_pos hne).1 hx,
obtain ⟨n, hn⟩ : ∃ n, (1/2 : ℝ)^n < inf_dist x s := exists_pow_lt_of_lt_one A (one_half_lt_one),
refine ⟨n, _⟩,
apply disjoint_left.2 (λ y ys hy, _),... | lemma | pi_nat.exists_disjoint_cylinder | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"disjoint",
"exists_pow_lt_of_lt_one",
"is_closed",
"one_half_lt_one"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
shortest_prefix_diff {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 | pi_nat.shortest_prefix_diff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"disjoint"
] | Given a point `x` in a product space `Π (n : ℕ), E n`, and `s` a subset of this space, then
`shortest_prefix_diff 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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
first_diff_lt_shortest_prefix_diff {s : set (Π n, E n)} (hs : is_closed s)
{x y : (Π n, E n)} (hx : x ∉ s) (hy : y ∈ s) :
first_diff x y < shortest_prefix_diff x s | begin
have A := exists_disjoint_cylinder hs hx,
rw [shortest_prefix_diff, dif_pos A],
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_first_diff x y)
end | lemma | pi_nat.first_diff_lt_shortest_prefix_diff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"is_closed"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
shortest_prefix_diff_pos {s : set (Π n, E n)} (hs : is_closed s) (hne : s.nonempty)
{x : (Π n, E n)} (hx : x ∉ s) :
0 < shortest_prefix_diff x s | begin
rcases hne with ⟨y, hy⟩,
exact (zero_le _).trans_lt (first_diff_lt_shortest_prefix_diff hs hx hy)
end | lemma | pi_nat.shortest_prefix_diff_pos | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"is_closed"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
longest_prefix {E : ℕ → Type*} (x : (Π n, E n)) (s : set (Π n, E n)) : ℕ | shortest_prefix_diff x s - 1 | def | pi_nat.longest_prefix | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [] | Given a point `x` in a product space `Π (n : ℕ), E n`, and `s` a subset of this space, then
`longest_prefix 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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
first_diff_le_longest_prefix {s : set (Π n, E n)} (hs : is_closed s)
{x y : (Π n, E n)} (hx : x ∉ s) (hy : y ∈ s) :
first_diff x y ≤ longest_prefix x s | begin
rw [longest_prefix, le_tsub_iff_right],
{ exact first_diff_lt_shortest_prefix_diff hs hx hy },
{ exact shortest_prefix_diff_pos hs ⟨y, hy⟩ hx }
end | lemma | pi_nat.first_diff_le_longest_prefix | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"is_closed",
"le_tsub_iff_right"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
inter_cylinder_longest_prefix_nonempty
{s : set (Π n, E n)} (hs : is_closed s) (hne : s.nonempty) (x : (Π n, E n)) :
(s ∩ cylinder x (longest_prefix x s)).nonempty | begin
by_cases hx : x ∈ s, { exact ⟨x, hx, self_mem_cylinder _ _⟩ },
have A := exists_disjoint_cylinder hs hx,
have B : longest_prefix x s < shortest_prefix_diff x s :=
nat.pred_lt (shortest_prefix_diff_pos hs hne hx).ne',
rw [longest_prefix, shortest_prefix_diff, dif_pos A] at B ⊢,
obtain ⟨y, ys, hy⟩ : ∃... | lemma | pi_nat.inter_cylinder_longest_prefix_nonempty | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"is_closed"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
disjoint_cylinder_of_longest_prefix_lt
{s : set (Π n, E n)} (hs : is_closed s)
{x : (Π n, E n)} (hx : x ∉ s) {n : ℕ} (hn : longest_prefix x s < n) :
disjoint s (cylinder x n) | begin
rcases eq_empty_or_nonempty s with h's|hne, { simp [h's] },
contrapose! hn,
rcases not_disjoint_iff_nonempty_inter.1 hn with ⟨y, ys, hy⟩,
apply le_trans _ (first_diff_le_longest_prefix hs hx ys),
apply (mem_cylinder_iff_le_first_diff (ne_of_mem_of_not_mem ys hx).symm _).1,
rwa mem_cylinder_comm,
end | lemma | pi_nat.disjoint_cylinder_of_longest_prefix_lt | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"disjoint",
"is_closed",
"ne_of_mem_of_not_mem"
] | https://github.com/leanprover-community/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 | |
cylinder_longest_prefix_eq_of_longest_prefix_lt_first_diff
{x y : Π n, E n} {s : set (Π n, E n)} (hs : is_closed s) (hne : s.nonempty)
(H : longest_prefix x s < first_diff x y) (xs : x ∉ s) (ys : y ∉ s) :
cylinder x (longest_prefix x s) = cylinder y (longest_prefix y s) | begin
have l_eq : longest_prefix y s = longest_prefix x s,
{ rcases lt_trichotomy (longest_prefix y s) (longest_prefix x s) with L|L|L,
{ have Ax : (s ∩ cylinder x (longest_prefix x s)).nonempty :=
inter_cylinder_longest_prefix_nonempty hs hne x,
have Z := disjoint_cylinder_of_longest_prefix_lt hs... | lemma | pi_nat.cylinder_longest_prefix_eq_of_longest_prefix_lt_first_diff | topology.metric_space | src/topology/metric_space/pi_nat.lean | [
"tactic.ring_exp",
"topology.metric_space.hausdorff_distance"
] | [
"is_closed"
] | 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/mathlib | 65a1391a0106c9204fe45bc73a039f056558cb83 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.