Skip to content
docxologyPublic

About

Quadray mathematics in Python: rank-three embeddings, exact rational volumes, lattice dynamics, optimization and reproducible scientific figures. Part of the Synergetics suite with symergetics and QuadCraft.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

QuadMath: Quadray Mathematics, Lattice Methods and Manuscript Tools

verify.yml workflow status on main Digital Object Identifier (DOI), manuscript record: 10.5281/zenodo.16887791 License: Apache-2.0 Requires Python 3.11 or newer

QuadMath combines an importable Python library, canonical mathematical chapters, Lean models and source-checkout tools for figures and PDFs. Physical quadrays are common-offset equivalence classes of four coordinates with rank-three geometry, not four independent Euclidean axes.

Repository: docxology/QuadMath · License: Apache-2.0 · Manuscript DOI: 10.5281/zenodo.16887791

Rank-Three Quadrays and FCC Contact Geometry

Scale-one quadray basis and a thirteen-sphere FCC neighborhood with twelve central contacts

Generated by the quadray abstract producer. See figure destinations and reproduction.

Status & Next Actions

This checkout prepares QuadMath 0.7.0; release availability and assets belong to GitHub releases, with current verification in workflow runs. The version-1 manuscript archived on Zenodo and the 0.6.0 package release remain historical artifacts; a fresh render does not reproduce the archived PDF or change its DOI. See the release notes, manuscript status and backlog. Test counts and coverage results belong to dated run receipts, not permanent claims about this checkout.

Quick Start

Run commands from the repository root. The scientific workflow uses Python 3.13 explicitly. The checkout's .python-version selects Python 3.15 for commands without an explicit version. Use the locked commands below to reproduce the scientific environment.

git clone https://github.com/docxology/QuadMath.git
cd QuadMath
uv sync --locked --python 3.13
uv run --locked --python 3.13 python -c "from quadmath import Quadray; print(Quadray(3, 2, 2, 1).normalize())"

For an isolated, headless figure recipe that does not touch tracked outputs:

export QUADMATH_OUTPUT_DIR="$(mktemp -d)/quadmath-results"
MPLBACKEND=Agg uv run --locked --python 3.13 python quadmath/scripts/stats_gallery.py

The output override applies to Python path helpers and cooperating generators, not the shell PDF renderer. See Figure and Manuscript Generation.

Installed package

The distribution name is quadmath-project; the import name is quadmath. Wheels include src/quadmath, not the checkout's manuscript scripts or Lean tree. Use QUADMATH_OUTPUT_DIR for installed plotting code: without it, output helpers search for a repository root and can raise outside a checkout. Development source and released wheels can expose different APIs; consult the corresponding API glossary.

Synergetics suite

QuadMath supplies mathematical specification, exact determinants, lattice methods and Lean models. Companion projects are symergetics for rational geometry and research workflows, and QuadCraft for interactive/native/browser applications. They are not production dependencies of this package.

The suite interoperability guide and its executable example cover gauge equivalence, orientation, units and different inverse rules. Do not interchange default embeddings or assume all native tetra-volumes are integers.

Project Structure

Path Responsibility Start here
src/quadmath/ Runtime coordinates, exact/rational primitives, fields, dynamics, evaluation, statistics and plotting Module guide
tests/ Numerical, resource-lifecycle and orchestration regression tests Test guide
docs/chapters/ Canonical mathematical chapters Specification, methods
quadmath/scripts/ Figure/data orchestration, API glossary and PDF tools Build guide
quadmath/output/ Generated, partly tracked artifacts; preserve user work Output policy
docs/manuscript/ Scripted template-layout projection, not an independent editing source Projection guide
docs/ Operational navigation and focused learning/analysis/Lean guides Documentation index
lean/ Handwritten Lean 4 integer quotient, distance, volume and shell models Proof scope

Package map

Generated on 2026-11-12 from the import statements under src/quadmath/. An arrow from A to B means code in A imports B; arrows already implied by a longer path are left out, so the picture shows layering rather than every edge.

flowchart TB
    accTitle: Internal dependency map of the quadmath package
    accDescr: Generated from import statements in src/quadmath. Each box is a subpackage or module of the package; an arrow from A to B means code in A imports B; arrows already implied by a longer path are omitted. Most-imported: core, lattice, optimize.
    n_viz["viz/"]
    n_lattice["lattice/"]
    n_core["core/"]
    n_stats["stats/"]
    n_learn["learn/"]
    n_validate["validate/"]
    n_inference["inference/"]
    n_optimize["optimize/"]
    n_pipeline["pipeline.py"]
    n_tools["tools/"]
    n_paths["paths.py"]
    n_viz --> n_core
    n_viz --> n_paths
    n_stats --> n_lattice
    n_inference --> n_core
    n_learn --> n_lattice
    n_optimize --> n_core
    n_pipeline --> n_lattice
    n_core --> n_optimize
    n_lattice --> n_viz
    n_validate --> n_core
    n_viz --> n_tools
    n_viz --> n_stats
Loading

Mathematical and learning entry points

  • Quadray methods and conversions: gauge, metric, affine, oriented and volume contracts.
  • Field learning: soft regularized fitting versus hard-boundary harmonic extension.
  • Dynamics: symmetric-normalized heat, conservative concentration transport and integer rounded averaging are distinct laws.
  • Evaluation: validation-fold selection, temporal continuation and tabular baselines. Random site folds do not guarantee spatially independent generalization.
  • Benchmarks/statistics: seeded workloads and inference; elapsed timings remain machine-dependent.

Figure and Manuscript Generation

Python renderers are library operations. Scripts select examples, call them and print paths. make_all_figures.py runs its explicit generator list and writes data/figure_manifest.txt under the configured output root. It is not a test suite.

The canonical graphical abstract is emitted by quadmath/scripts/graphical_abstract_quadray.py; its PNG remains figures/graphical_abstract_quadray.png, with an SVG companion. The panels identify the scale-one basis and actual FCC 12-contact neighborhood rather than treating four basis vectors as a packing neighborhood.

Build (PDF)

The shell renderer requires pandoc, xelatex, fontconfig (fc-list), DejaVu Serif and DejaVu Sans Mono. On macOS install Pandoc, TeX Live/MacTeX, fontconfig and DejaVu; on Debian/Ubuntu install pandoc texlive-xetex texlive-fonts-recommended fontconfig fonts-dejavu.

# Deliberately writes checkout artifacts and updates the canonical API glossary.
# Run in a separate checkout if those writes must be isolated.
unset QUADMATH_OUTPUT_DIR
UV_PYTHON=3.13 bash quadmath/scripts/render_pdf.sh

It generates figures (unless --skip-figures), refreshes the glossary, runs strict manuscript validation, then builds individual/combined PDF and TeX. It does not run pytest, coverage or Lean. PDF/TeX remain fixed under quadmath/output/; setting QUADMATH_OUTPUT_DIR does not redirect them and can separate new figures from the paths expected by the manuscript.

Development Workflow

WORKFLOW.md separates runtime changes, documentation checks, rendering and integration. ARCHITECTURE.md describes boundaries. For an integration owner explicitly running verification:

PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --locked --python 3.13 coverage run -m pytest -q
uv run --locked --python 3.13 coverage report

The configured coverage floor is a gate, not proof of every mathematical claim. During delegated implementation, defer builds/tests/lint/formatters to the integration owner and preserve generated files. Never clean outputs merely because they can theoretically be regenerated.

Contributing

Use a feature branch, read agent guidance, add behavior-level regressions for changed consumer contracts, and update affected chapters or operational guides. Preserve explicit equation/code anchors. Record only checks actually exercised and review figure labels, units and legibility in addition to successful saves.

Citation

@software{quadmath2025,
  title={QuadMath: Analytical Review of Quadray Coordinates (4D)},
  author={docxology},
  year={2025},
  url={https://github.com/docxology/QuadMath},
  doi={10.5281/zenodo.16887791},
  license={Apache-2.0}
}

About

Quadray mathematics in Python: rank-three embeddings, exact rational volumes, lattice dynamics, optimization and reproducible scientific figures. Part of the Synergetics suite with symergetics and QuadCraft.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages