test: Java golden-value oracles for the five DCE math cores + P1-2/P1-3 fixes #27
Reference in New Issue
Block a user
No description provided.
Delete Branch "tests/java-golden-oracles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Java golden-value oracles for the five DCE math cores (P0) + P1-2/P1-3 fixes
Pins the C++ math/functional cores bit-for-bit (1e-12) against the compiled upstream Java library (
de.varylab.discreteconformal.*, openjdk 17). Unlike the existing FD gradient checks — which only prove curl-freeness, since the C++ energy is the path-integral of its own gradient — these lock absolute values against an independent implementation.New oracle suites
HyperIdealGoldenJava— Clausen/Л/ImLi₂, ζ₁₃/₁₄/₁₅/ζ, both tetrahedron-volume formulas (realClausen/HyperIdealUtility).EuclideanGoldenJava/SphericalGoldenJava— angle formulas + β relations + Л energy terms, plus full-mesh oracles driving the realEuclideanCyclicFunctional/SphericalFunctionalon a shared tetrahedron: per-vertex gradientΘ−ΣαandΔE = E(x)−E(0)(C++ Gauss-Legendre path integral vs Java closed form — two independent methods).SphericalGoldenJava.FullMeshEdgeDofGradient— edge-DOF gradient (vertex + edge components,α_opp⁺+α_opp⁻−θ_e) vs rawconformalEnergyAndGradient, locking Finding 3 at the solution level (audit items 4 & 5).PeriodMatrix.NormalizeModulus_GoldenJava— τ-reduction fold convention vs the realDiscreteEllipticUtility.normalizeModulus(audit items 7 & 8).Subtlety documented: the spherical oracles call Java's raw
conformalEnergyAndGradient, notevaluate()—evaluate()pre-runs a 1-D Brent maximization over the global-scale gauge (maximizeInNegativeDirection), which C++ factors into the Newton solver'sspherical_gauge_shiftinstead.Bundled fixes
layout.hpp): Euclidean holonomy uses a per-cut-edge rigid-motion fitg(z)=a·z+b, exposingresidual_rotation = |arg(a)|as a diagnostic. Non-regressive (flat casea=1reduces to the old midpoint formula).period_matrix.hpp):is_in_fundamental_domainfixed to the correct half-open SL(2,ℤ) domain (−½ ≤ Re < ½). The now-exposedComputePeriodMatrix_ReducedTau_InFDwas updated to assert thenormalizeModulusdomain (closed+½edge) instead.Verification
doc/api/tests.md(single source of truth) andCLAUDE.md;check-test-counts.shgreen.Scope note
This MR deliberately contains only the test/oracle + P1-2/P1-3 work. The parallel literature-review edits (
doc/math/references.md,novelty-statement.md, roadmap/reviewer docs, and theGlickenstein §5.2line inCLAUDE.md) are intentionally excluded and will land via their own MR.🤖 Generated with Claude Code
user2595 referenced this pull request2026-05-29 21:38:55 +00:00