uniform_space_of_dist

Construct a uniform structure from a distance function and metric space axioms

has_dist

The distance function (given an ambient metric space on α), which returns a nonnegative real number dist x y given x y : α.

metric_space

Metric space

Each metric space induces a canonical uniform_space and hence a canonical topological_space. This is enforced in the type class definition, by extending the uniform_space structure. When instantiating a metric_space structure, the uniformity fields are not necessary, they will be filled in by default. In the same way, each metric space induces an emetric space structure. It is included in the structure, but filled in by default.

When one instantiates a metric space structure, for instance a product structure, this makes it possible to use a uniform structure and an edistance that are exactly the ones for the uniform spaces product and the emetric spaces products, thereby ensuring that everything in defeq in diamonds.

dist_le_Ico_sum_dist

The triangle (polygon) inequality for sequences of points; finset.Ico version.

dist_le_range_sum_dist

The triangle (polygon) inequality for sequences of points; finset.range version.

dist_le_Ico_sum_of_dist_le

A version of dist_le_Ico_sum_dist with each intermediate distance replaced with an upper estimate.

dist_le_range_sum_of_dist_le

A version of dist_le_range_sum_dist with each intermediate distance replaced with an upper estimate.

nndist

Distance as a nonnegative real number.

nndist_edist

Express nndist in terms of edist

edist_nndist

Express edist in terms of nndist

edist_ne_top

In a metric space, the extended distance is always finite

nndist_self

nndist x x vanishes

dist_nndist

Express dist in terms of nndist

nndist_dist

Express nndist in terms of dist

eq_of_nndist_eq_zero

Deduce the equality of points with the vanishing of the nonnegative distance

nndist_eq_zero

Characterize the equality of points with the vanishing of the nonnegative distance

nndist_triangle

Triangle inequality for the nonnegative distance

dist_edist

Express dist in terms of edist

metric.ball

ball x ε is the set of all points y with dist y x < ε

metric.closed_ball

closed_ball x ε is the set of all points y with dist y x ε

metric.totally_bounded_of_finite_discretization

A metric space space is totally bounded if one can reconstruct up to any ε>0 any element of the space from finitely many data.

metric.mem_uniformity_edist

Expressing the uniformity in terms of edist

metric_space.to_emetric_space

A metric space induces an emetric space

metric.emetric_ball

Balls defined using the distance or the edistance coincide

metric.emetric_closed_ball

Closed balls defined using the distance or the edistance coincide

emetric_space.to_metric_space_of_dist

One gets a metric space from an emetric space if the edistance is everywhere finite, by pushing the edistance to reals. We set it up so that the edist and the uniformity are defeq in the metric space and the emetric space. In this definition, the distance is given separately, to be able to prescribe some expression which is not defeq to the push-forward of the edistance to reals.

emetric_space.to_metric_space

One gets a metric space from an emetric space if the edistance is everywhere finite, by pushing the edistance to reals. We set it up so that the edist and the uniformity are defeq in the metric space and the emetric space.

real.metric_space

Instantiate the reals as a metric space.

metric.cauchy_seq_iff

In a metric space, Cauchy sequences are characterized by the fact that, eventually, the distance between its elements is arbitrarily small

metric.cauchy_seq_iff'

A variation around the metric characterization of Cauchy sequences

cauchy_seq_bdd

A Cauchy sequence on the natural numbers is bounded.

cauchy_seq_iff_le_tendsto_0

Yet another metric characterization of Cauchy sequences on integers. This one is often the most efficient.

metric.mem_closure_iff'

ε-characterization of the closure in metric spaces

metric_space_pi

A finite product of metric spaces is a metric space, with the sup distance.

finite_cover_balls_of_compact

Any compact set in a metric space can be covered by finitely many balls of a given positive radius

proper_space

A metric space is proper if all closed balls are compact.

locally_compact_of_proper

A proper space is locally compact

complete_of_proper

A proper space is complete

second_countable_of_proper

A proper metric space is separable, and therefore second countable. Indeed, any ball is compact, and therefore admits a countable dense subset. Taking a countable union over the balls centered at a fixed point and with integer radius, one obtains a countable set which is dense in the whole space.

metric.second_countable_of_almost_dense_set

A metric space is second countable if, for every ε > 0, there is a countable set which is ε-dense.

metric.second_countable_of_countable_discretization

A metric space space is second countable if one can reconstruct up to any ε>0 any element of the space from countably many data.

metric.bounded

Boundedness of a subset of a metric space. We formulate the definition to work even in the empty space.

metric.bounded.subset

Subsets of a bounded set are also bounded

metric.bounded_closed_ball

Closed balls are bounded

metric.bounded_ball

Open balls are bounded

metric.bounded_iff_subset_ball

Given a point, a bounded subset is included in some ball around this point

metric.bounded_union

The union of two bounded sets is bounded iff each of the sets is bounded

metric.bounded_bUnion

A finite union of bounded sets is bounded

metric.bounded_of_compact

A compact set is bounded

metric.bounded_of_finite

A finite set is bounded

metric.bounded_singleton

A singleton is bounded

metric.bounded_range_iff

Characterization of the boundedness of the range of a function

metric.bounded_of_compact_space

In a compact space, all sets are bounded

metric.compact_iff_closed_bounded

In a proper space, a set is compact if and only if it is closed and bounded

metric.diam

The diameter of a set in a metric space. To get controllable behavior even when the diameter should be infinite, we express it in terms of the emetric.diameter

metric.diam_nonneg

The diameter of a set is always nonnegative

metric.diam_empty

The empty set has zero diameter

metric.diam_singleton

A singleton has zero diameter

metric.bounded_iff_diam_ne_top

Characterize the boundedness of a set in terms of the finiteness of its emetric.diameter.

metric.diam_eq_zero_of_unbounded

An unbounded set has zero diameter. If you would prefer to get the value ∞, use emetric.diam. This lemma makes it possible to avoid side conditions in some situations

metric.diam_mono

If s ⊆ t, then the diameter of s is bounded by that of t, provided t is bounded.

metric.dist_le_diam_of_mem

The distance between two points in a set is controlled by the diameter of the set.

metric.diam_le_of_forall_dist_le

If the distance between any two points in a set is bounded by some constant, this constant bounds the diameter.

metric.diam_union

The diameter of a union is controlled by the sum of the diameters, and the distance between any two points in each of the sets. This lemma is true without any side condition, since it is obviously true if s ∪ t is unbounded.

metric.diam_union'

If two sets intersect, the diameter of the union is bounded by the sum of the diameters.

metric.diam_closed_ball

The diameter of a closed ball of radius r is at most 2 r.

metric.diam_ball

The diameter of a ball of radius r is at most 2 r.