test(poincare): gyrogroup property tests for Möbius addition - #2769
Open
HomunculusLabs wants to merge 2 commits into
Open
test(poincare): gyrogroup property tests for Möbius addition#2769HomunculusLabs wants to merge 2 commits into
HomunculusLabs wants to merge 2 commits into
Conversation
HomunculusLabs
marked this pull request as draft
August 12, 2026 18:31
HomunculusLabs
force-pushed
the
research/poincare-gyrogroup-tests
branch
from
August 12, 2026 18:39
487f6a9 to
ac95ee8
Compare
Add 11 tests verifying gyrogroup identities of Poincaré-ball Möbius
addition (Ungar 2008, Ganea et al. NeurIPS 2018):
- Möbius inverse: a ⊕ (-a) = 0
- Left-cancellation law: (-a) ⊕ (a ⊕ b) = b
- Gyration inverse: gyr[b,a] ∘ gyr[a,b] = id
- Gyration vanishes at identity: gyr[0,b] = gyr[b,0] = id
- Gyrocommutative law: a ⊕ b = gyr[a,b](b ⊕ a)
- Non-associativity: (a⊕b)⊕c ≠ a⊕(b⊕c) for generic points
- Gyrogroup identity: a ⊕ (b ⊕ c) = (a ⊕ b) ⊕ gyr[a,b](c)
- Gyration automorphism: gyr[a,b](x⊕y) = gyr[a,b](x) ⊕ gyr[a,b](y)
- Left loop property: gyr[a⊕b, b] = gyr[a, b]
- Closure: a ⊕ b stays inside the ball for interior points
- Curvature scaling: x ⊕_{-K} y = (1/√K)((√K x) ⊕_{-1} (√K y)) + flat limit
The gyration operator gyr[u,v]w = -(u⊕v) ⊕ (u ⊕ (v ⊕ w)) measures the
defect of associativity and is the defining operation that makes the
Poincaré ball a gyrocommutative gyrogroup rather than a vector space.
These properties are load-bearing for the manifold SAE decoder: tangent-
space aggregation uses Möbius addition to combine atom contributions,
and the gyrogroup structure governs how those combinations behave under
reparameterization. Reviewed via repoprompt oracle.
HomunculusLabs
force-pushed
the
research/poincare-gyrogroup-tests
branch
from
August 12, 2026 18:54
ac95ee8 to
aab5453
Compare
GPT Pro review of PR SauersML#2769 found all 11 test assertions mathematically correct but identified documentation and code-quality issues: P1 (blocking): - Ganea citation: §3.1 -> §2.3 (Gyrovector spaces) - Ungar title: full title with Einstein subtitle - Theorem 2.34 pointer: moved from gyration inverse to zero-generator test - SAE decoder rationale: decoder uses linear log_0 aggregation + exp_0, not Möbius addition; corrected to cite arbitrary-base exp/log maps P2 (quality): - Renamed: gyration_vanishes -> gyration_is_identity_when_either_generator_is_zero - Renamed: gyration_recovers_associativity_defect -> mobius_add_satisfies_left_gyroassociative_law - Fixed inverse comment: removed gyrocommutativity attribution - Fixed helper prose: 'measures how much' -> 'gyroautomorphism that compensates' - Better section header with G1-G6 taxonomy - Replaced hardcoded 0..3 loops with length-based ranges - Tightened flat-limit tolerance: 1e-6 -> 1e-10 - Reordered tests: G2, G3, G4, G5, G6, derived laws, regressions All 34 poincare tests pass. No mathematical logic changed.
HomunculusLabs
marked this pull request as ready for review
August 12, 2026 22:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds 11 deterministic tests covering G2–G6 of the gyrocommutative gyrogroup structure of Poincaré-ball Möbius addition—G1 was already covered by
mobius_add_zero_is_identity_on_either_side—plus selected derived laws, closure, nonassociativity, and curvature-scaling regressions.References: Ungar (2008), Analytic Hyperbolic Geometry and Albert Einstein's Special Theory of Relativity, Ch. 2, for the gyrogroup laws; Ganea et al. (2018), §2.3, for the Poincaré-ball Möbius-addition convention.
Why
The existing Poincaré tests cover identity, distance, exp/log round-trips, and conformal Dirichlet penalty — but do not test the algebraic structure of Möbius addition itself. Möbius addition is NOT a group operation (it is non-associative); it is a gyrocommutative gyrogroup. These laws are load-bearing for arbitrary-base Poincaré exp/log maps and other consumers of Möbius translation.
Tests added
mobius_add_inverse_cancels_to_originmobius_add_satisfies_left_gyroassociative_lawgyration_is_automorphism_of_additiongyration_left_loop_propertymobius_add_is_gyrocommutativemobius_add_left_cancellation_lawgyration_inverse_is_reversed_gyrationgyration_is_identity_when_either_generator_is_zeromobius_add_is_not_associativemobius_add_stays_inside_ball_for_interior_pointsmobius_add_curvature_scaling_relationThe gyration operator is
gyr[u,v]w = -(u⊕v) ⊕ (u ⊕ (v ⊕ w)), matching the convention inConstantCurvature::gyration(cross-checked).Review
Three review cycles before ready:
constant_curvature.rs.Verification
Not established
gyrhelper is test-local; a productiongyrmight belong in the public API if consumers need it.