Structures · Topology
MetricSpace
A metric space is a type endowed with a ℝ-valued distance dist satisfying
dist x y = 0 ↔ x = y, commutativity dist x y = dist y x, and the triangle inequality
dist x z ≤ dist x y + dist y z.
See pseudometric spaces (PseudoMetricSpace) for the similar class with the dist x y = 0 ↔ x = y
assumption weakened to dist x x = 0.
Any metric space is a T1 topological space and a uniform space (see TopologicalSpace, T1Space,
UniformSpace), where the topology and uniformity come from the metric.
We make the uniformity/topology part of the data instead of deriving it from the metric.
This e.g. ensures that we do not get a diamond when doing
[MetricSpace α] [MetricSpace β] : TopologicalSpace (α × β):
The product metric and product topology agree, but not definitionally so.
See Note [forgetful inheritance].
- Defined in
- Mathlib.Topology.MetricSpace.Defs
- Shape
- One type argument · adds eq_of_dist_eq_zero
Extends1
Extended by9
Forgetful instances
Every MetricSpace is also a
Concrete types that are instances44
- Int
- Nat
- Real
- Rat
- SeparationQuotient
- NNReal
- BoundedContinuousFunction
- Padic
- UniformSpace.Completion
- NNRat
- Unitization
- PadicInt
- WithLp
- UniformFun
- ContinuousMapZero
- ZeroAtInftyContinuousMap
- PNat
- TopologicalSpace.NonemptyCompacts
- Empty
- Hamming
- ContinuousAffineMap
- PiLp
- Circle
- ConvexBody
- UpperHalfPlane
- ODE.FunSpace
- Metric.Snowflaking
- GromovHausdorff.GHSpace
- TopologicalSpace.Opens.CompleteCopy
- Metric.GlueSpace
- MeasureTheory.LevyProkhorov
- Metric.InductiveLimit
- GromovHausdorff.GHSpace.Rep
- GromovHausdorff.OptimalGHCoupling
- Subtype
- Prod
- OrderDual
- ULift
- MulOpposite
- PUnit
- AddOpposite
- ContinuousMap
- Multiplicative
- Additive
How is a type an instance?
Loading the hierarchy index…
Assumed by1,812
- cfc
- EuclideanGeometry.oangle
- cfcₙ
- EuclideanGeometry.angle
- EuclideanGeometry.Sphere.center
- EuclideanGeometry.Sphere.radius
- EuclideanGeometry.orthogonalProjection
- cfcHom
- cfcₙHom
- Affine.Simplex.excenter
- Affine.Simplex.ExcenterExists
- Affine.Simplex.circumcenter
- Affine.Simplex.touchpoint
- EuclideanGeometry.inversion
- signedDist
- EuclideanGeometry.Sphere.orthRadius
- cfc_apply
- EuclideanGeometry.Cospherical
- EuclideanGeometry.angle_comm
- Affine.Simplex.excenterWeightsUnnorm
- Affine.Simplex.incenter
- Affine.Simplex.circumradius
- Affine.Simplex.orthogonalProjectionSpan
- Affine.Simplex.excenterWeights
- cfcₙ_apply
- cfcₙ_apply_of_not_predicate
- Affine.Simplex.excenterExists_empty
- Affine.Simplex.height
- AffineSubspace.perpBisector
- EuclideanGeometry.oangle_rotate_sign
- AffineIsometry.injective
- cfcₙ_congr
- EuclideanGeometry.reflection
- EuclideanGeometry.oangle_eq_angle_of_sign_eq_one
- Affine.Triangle.orthocenter
- Affine.Simplex.altitudeFoot
- EuclideanGeometry.mem_sphere
- cfc_comp'
- cfc_id
- Affine.Simplex.exsphere
- Affine.Simplex.mongePoint
- cfc_congr
- cfcₙ_id
- Affine.Simplex.touchpointWeights
- EuclideanGeometry.orthogonalProjection_mem
- Affine.Simplex.circumsphere
- Affine.Simplex.signedInfDist
- cfc_apply_of_not_predicate
- EuclideanGeometry.Sphere.secondInter
- Affine.Simplex.exradius