You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mkerjean@CohenCyril@t6s What about renaming PseudoMetric to BallMetric?
(so that we free the "pseudometric" substring for a potential genuine pseudometric structure (i.e., with a distance function)
and still we do not change the naming too much (ideally, I would like to avoid the "metric" substring completely for something
like "ball topology" but that could be harder to re-brain for users)).
@mkerjean@CohenCyril@t6s What about renaming PseudoMetric to BallMetric? (so that we free the "pseudometric" substring for a potential genuine pseudometric structure (i.e., with a distance function) and still we do not change the naming too much (ideally, I would like to avoid the "metric" substring completely for something like "ball topology" but that could be harder to re-brain for users)).
Yes, this looks like a reasonable idea. Do you have an objection @CohenCyril ?
Hey! Sorry, so,... is the future intended category PseudoMetric isomorphic to BallMetric?
If it is the case then the structure must not be renamed. Structures in the hierarchy represent there equivalence class for isomorphism of category, and only the mixin should be renamed.
My quick assessment is that this is an iso of category since the balls completely gives the data of the metric and vice versa.
Ok, so that's at least a temporary no. Of course, we'll know for sure what it is proved or disproved. Let me ping @hoheinzollern and @NotBad4U who have a direct interest in the topic.
My quick assessment is that this is an iso of category since the balls completely gives the data of the metric and vice versa.
I think this is only straightforward over a realType : the pseudometric can be defined as dist x y = inf [set r | ball x r y]. If the scalar type doesn't have lower bounds then this probably doesn't work in general. For example, the rational plane rat * rat has a natural ball metric-structure over rat, but no natural way to deduce a pseudometric from it.
EDIT: even over a realType the construction above is not an isomorphism because the inf above can be empty. There is nothing in the axioms to state that a point must be within some ball of any other point.
After some deeper thought, I'm revising my above comment. The distinctions here are quite technical, so I'll need to set some definitions for clarity. Let $$X$$ be a topological space, and $$R$$ a fixed scalar type for balls/pseudometrics:
$$X$$ is "ball-metric" if there is a predicate ball as in the axioms of PseudoMetric that generates the topology of $$X$$. This is what the current PseudoMetric class describes.
$$X$$ is "ball-metrizable" if it can be equipped with some (non-unique) ball-metric structure.
$$X$$ is "pseudometric" if there is a pseudometric $$d : X \times X \to R$$ such that $$X$$ is ball-metric with the system of open balls generated by $$d$$.
$$X$$ is "pseudometrizable" if it can be equipped with some (non-unique) pseudometric structure.
The following implications are clear : 3 implies 1, 2 and 4; 1 implies 2; 4 implies 2. We also have the following more interesting results:
a. If $$R$$ is an archiNumFieldType, then ball-metrizable implies pseudometrizable: let $$d(x,y)=\frac1n$$ when $$n > 0$$ is minimal such that ~ ball x n.+1%:R^-1 y, and $$d(x,y) = 0$$ if no such $$n$$ exists. Without the condition on $$R$$, the implication fails in general.
b. No matter the conditions on $$R$$, a ball-metric space is in general not pseudometric, (though may still be pseudometrizable): consider the system of closed balls generated by an $$\mathbb{R}$$-valued pseudometric.
In the light of these results, I would advocate for the current PseudoMetric interface to be renamed to BallMetric, and for the new PseudoMetric to add a pseudometric function to the interface. Then, we may provide a factory BallMetric_isPseudoMetrizable to implement (a), with the explicit property that the resulting PseudoMetric's ball be in general completely different from the ball provided to the factory, due to (b).
The two could be unified, but then there would be a factory that takes in an explicit ball and returns a structure with a completely different ball, worse than the current wart of defining topologies in terms of closed sets (#134) .
Alternatively, we could do away with BallMetric altogether and have PseudoMetric require a pseudometric function with no intermediate structure.
Activity
affeldt-aist commentedon Aug 21, 2026
ping @CohenCyril @mkerjean
This is not critical but the sooner the better because this will cause a number of deprecations.
affeldt-aist commentedon Aug 30, 2026
I still haven't an idea so I postpone.
affeldt-aist commentedon Oct 1, 2026
@mkerjean @CohenCyril @t6s What about renaming
PseudoMetrictoBallMetric?(so that we free the "pseudometric" substring for a potential genuine pseudometric structure (i.e., with a distance function)
and still we do not change the naming too much (ideally, I would like to avoid the "metric" substring completely for something
like "ball topology" but that could be harder to re-brain for users)).
mkerjean commentedon Oct 1, 2026
Yes, this looks like a reasonable idea. Do you have an objection @CohenCyril ?
affeldt-aist commentedon Oct 13, 2026
ping @CohenCyril ?
CohenCyril commentedon Oct 13, 2026
Hey! Sorry, so,... is the future intended category PseudoMetric isomorphic to BallMetric?
If it is the case then the structure must not be renamed. Structures in the hierarchy represent there equivalence class for isomorphism of category, and only the mixin should be renamed.
My quick assessment is that this is an iso of category since the balls completely gives the data of the metric and vice versa.
affeldt-aist commentedon Oct 14, 2026
Ok, so that's at least a temporary no. Of course, we'll know for sure what it is proved or disproved. Let me ping @hoheinzollern and @NotBad4U who have a direct interest in the topic.
nmolinamounier commentedon Oct 16, 2026
I think this is only straightforward over a
realType: the pseudometric can be defined asdist x y = inf [set r | ball x r y]. If the scalar type doesn't have lower bounds then this probably doesn't work in general. For example, the rational planerat * rathas a natural ball metric-structure overrat, but no natural way to deduce a pseudometric from it.EDIT: even over a
realTypethe construction above is not an isomorphism because theinfabove can be empty. There is nothing in the axioms to state that a point must be within some ball of any other point.nmolinamounier commentedon Nov 2, 2026
After some deeper thought, I'm revising my above comment. The distinctions here are quite technical, so I'll need to set some definitions for clarity. Let$$X$$ be a topological space, and $$R$$ a fixed scalar type for balls/pseudometrics:
ballas in the axioms ofPseudoMetricthat generates the topology ofPseudoMetricclass describes.The following implications are clear : 3 implies 1, 2 and 4; 1 implies 2; 4 implies 2. We also have the following more interesting results:
a. If$$R$$ is an $$d(x,y)=\frac1n$$ when $$n > 0$$ is minimal such that $$d(x,y) = 0$$ if no such $$n$$ exists. Without the condition on $$R$$ , the implication fails in general.$$R$$ , a ball-metric space is in general not pseudometric, (though may still be pseudometrizable): consider the system of closed balls generated by an $$\mathbb{R}$$ -valued pseudometric.
archiNumFieldType, then ball-metrizable implies pseudometrizable: let~ ball x n.+1%:R^-1 y, andb. No matter the conditions on
In the light of these results, I would advocate for the current
PseudoMetricinterface to be renamed toBallMetric, and for the newPseudoMetricto add a pseudometric function to the interface. Then, we may provide a factoryBallMetric_isPseudoMetrizableto implement (a), with the explicit property that the resultingPseudoMetric'sballbe in general completely different from theballprovided to the factory, due to (b).The two could be unified, but then there would be a factory that takes in an explicit
balland returns a structure with a completely differentball, worse than the current wart of defining topologies in terms of closed sets (#134) .Alternatively, we could do away with
BallMetricaltogether and havePseudoMetricrequire a pseudometric function with no intermediate structure.affeldt-aist commentedon Nov 12, 2026
So PseudoMetric -> BallMetric is an ok change after all?