Skip to content

Rename MetricSpaces parent method metric to metric_function, add EuclideanSpace to category of metric spaces #30062

@mkoeppe

Description

@mkoeppe
sage: from sage.categories.metric_spaces import MetricSpaces
sage: QQ in MetricSpaces()
True
sage: RR in MetricSpaces()
True
sage: ZZ in MetricSpaces()
True
sage: AA in MetricSpaces()
False
sage: QuadraticField(5) in MetricSpaces()
False
sage: M = Matrix(QQ,[[2,1,0],[1,2,1],[0,1,2]])
sage: V = VectorSpace(QQ,3,inner_product_matrix=M)
sage: V in MetricSpaces()
False
sage: E = EuclideanSpace(3)
sage: E in MetricSpaces()
False

On this ticket, we add (from #30061 comment:44) EuclideanSpace (implementing the distance function by means of the Cartesian chart) to the category.

To do this, we rename the MetricSpaces parent method metric to metric_function.

The other examples from above will be taken care of in #30092 (which adds inner product spaces) and #30219 (real embedded number fields).

CC: @tscrim @egourgoulhon

Component: categories

Author: Eric Gourgoulhon, Matthias Koeppe

Branch/Commit: d785c0d

Reviewer: Matthias Koeppe, Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/30062

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions