Skip to content

unify printed representation of curve pointsΒ #24

@steven-varga

Description

@steven-varga

Description:

Currently, individual ECPoint{T,C} objects print with full curve context:

(31𝔽₇₉,51𝔽₇₉)
(14𝔽₃₁,4𝔽₃₁) ∈ Weierstrass{Fp{UInt128, 31}}

This becomes verbose and visually noisy when printing collections of points, especially in REPL sessions, logs, or documentation.

Proposal

Implement a unified Base.show method for collections of ECPoint{T,C} using clean group-theoretic notation:

{ (7, 58), (8, 12), (34, 45), (∞, ∞) } βŠ‚ TwistedEdwards{𝔽₇₉} # collection of points
(7, 58) ∈ TwistedEdwards{𝔽₇₉}                                # individual point

Benefits

  • Concise and mathematically expressive.
  • Avoids repetition of curve metadata.
  • Improves readability of test/debug output.
  • Fits formal/academic documentation styles.

Tasks

  • Add Base.show overload for Vector{ECPoint{T,C}}.
  • Add fallback for empty vector: {} βŠ‚ CurveName{π”½β‚š}.
  • Consider extending to Set{ECPoint} and other iterable types.
  • Optional: support pretty-aligned output for large sets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions