Skip to content

TODO: rename pseudometric #1990

Open
Open

Description

@affeldt-aist

#[short(type="pseudoMetricType")]

but how? @CohenCyril @mkerjean

Activity

  1. added this to the 1.18.0 milestone on Jun 9, 2026
  2. affeldt-aist commented on Aug 21, 2026

    @affeldt-aist
    MemberAuthor

    ping @CohenCyril @mkerjean

    This is not critical but the sooner the better because this will cause a number of deprecations.

  3. affeldt-aist commented on Aug 30, 2026

    @affeldt-aist
    MemberAuthor

    I still haven't an idea so I postpone.

  4. modified the milestones: 1.18.0, 1.19.0 on Aug 30, 2026
  5. affeldt-aist commented on Oct 1, 2026

    @affeldt-aist
    MemberAuthor

    @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)).

  6. mkerjean commented on Oct 1, 2026

    @mkerjean
    Collaborator

    @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 ?

  7. affeldt-aist commented on Oct 13, 2026

    @affeldt-aist
    MemberAuthor
  8. CohenCyril commented on Oct 13, 2026

    @CohenCyril
    Member

    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.

  9. affeldt-aist commented on Oct 14, 2026

    @affeldt-aist
    MemberAuthor

    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.

  10. modified the milestones: 1.19.0, 1.20.0 on Oct 14, 2026
  11. nmolinamounier commented on Oct 16, 2026

    @nmolinamounier
    Collaborator

    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.

  12. nmolinamounier commented on Nov 2, 2026

    @nmolinamounier
    Collaborator

    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:

    1. $$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.
    2. $$X$$ is "ball-metrizable" if it can be equipped with some (non-unique) ball-metric structure.
    3. $$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$$.
    4. $$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.

  13. affeldt-aist commented on Nov 12, 2026

    @affeldt-aist
    MemberAuthor

    So PseudoMetric -> BallMetric is an ok change after all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question ❓There is an unanswered question hererenaming/refactoring 🔧This is about a renaming or refactoring in the library

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions