Skip to main content

JacoPy

Graded algebra, bracket calculus and differential geometry in Python, with a step-by-step proof for every result.

tests docs PyPI Python 3.10-3.14 License: BSD-3-Clause

JacoPy is a symbolic library for graded algebra, bracket calculus and differential geometry, on the tangent bundle TM and on algebroids E, in which every manipulation is recorded as a step-by-step proof. A closed identity comes with its proof chain, the rule behind each step (a definition, a declared axiom or a cited theorem, with its literature source) and the list of assumptions it depends on. An identity that does not close reports the residual that is left. An optional model oracle checks closed identities numerically in random coordinate models. JacoPy is pure Python with no required dependencies.

JacoPy is alpha software (version 0.1.0): the public API may still change between minor versions, and every change is recorded in the changelog.

Installation

JacoPy needs Python 3.10 or newer and has no required dependencies:

pip install jacopy

Optional extras: oracle (SymPy, for the model oracle), rich (colored proof trees in the terminal), test (pytest) and dev (all of these), for example pip install "jacopy[oracle]". See the installation guide for details and the development guide for an editable checkout.

Quick example

Cartan's formula L_X ω = ι_X dω + d ι_X ω on a 1-form, evaluated on a vector field Y, proved from the definitions of d, L and ι:

import jacopy
from jacopy.central.tangent import tangent_engine

reg = jacopy.PropertyRegistry()
X, Y = jacopy.vector_fields("X Y")
(omega,) = jacopy.forms("omega", degree=1)
d, L_X, i_X = jacopy.exterior_d(), jacopy.lie_derivative(X), jacopy.interior(X)

lhs = jacopy.pairing(L_X(omega), Y)
rhs = jacopy.pairing(i_X(d(omega)), Y) + jacopy.pairing(d(i_X(omega)), Y)

chain = jacopy.show_equal(lhs, rhs, registry=reg, engine=tangent_engine(registry=reg))
print(f"closed in {len(chain.steps)} steps")
print(jacopy.to_latex(lhs), "=", jacopy.to_latex(rhs))
jacopy.print_chain(chain)   # each step with the rule that justifies it

# A false identity is refused, and the residual is reported.
try:
    jacopy.show_equal(lhs, jacopy.pairing(i_X(d(omega)), Y),
                      registry=reg, engine=tangent_engine(registry=reg))
except jacopy.ProofFailure as failure:
    print("residual:", failure.residual)

Output (the middle four proof steps are omitted here):

closed in 6 steps
\langle \mathcal{L}_{X}\!\left(\omega\right),\, Y \rangle = \langle \iota_{X}\!\left(d\!\left(\omega\right)\right),\, Y \rangle + \langle d\!\left(\iota_{X}\!\left(\omega\right)\right),\, Y \rangle
Proof (6 steps)
├── [intrinsic L (Cartan-TM): L_X f = ρ(X)(f), L_X Y = [X,Y], (L_X ω)(Y…) = 
│   ρ(X)(ω(Y…)) − Σ ω(…,[X,Y_i],…)] (definition) ⟨L_X(omega), Y⟩ → X(⟨omega, Y⟩)
│   - ⟨omega, [X,Y]_VF⟩ , apply definition: intrinsic L (Cartan-TM): L_X f = 
│   ρ(X)(f), L_X Y = [X,Y], (L_X ω)(Y…) = ρ(X)(ω(Y…)) − Σ ω(…,[X,Y_i],…)
...
└── [simplify] (X(⟨omega, Y⟩) - ⟨omega, [X,Y]_VF⟩) - ((X(⟨omega, Y⟩) - Y(⟨omega,
    X⟩) - ⟨omega, [X,Y]_VF⟩) + Y(⟨omega, X⟩)) → 0 , canonical-form pipeline
residual: Y(⟨omega, X⟩)

The notebooks in examples/ go further: proof chains, results and theorems; algebroids and declared axioms; Drinfel'd doubles, twists and the research interface.

Features

  • Cartan calculus on TM and on algebroids: d, L and ι, with Lie and Schouten-Nijenhuis brackets.
  • Algebroids with declared axioms: Jacobiator, Derivator, Predator and locality, so that a proof states exactly which axioms it used.
  • Metric-affine geometry: torsion, curvature, non-metricity, the Bianchi identities, the Cartan structure equations, the Koszul formula and E-connections.
  • Poisson, symplectic and Nambu-Poisson geometry, with the Koszul bracket and tilde calculus.
  • Drinfel'd doubles and twists, Courant algebroids and generalized geometry.
  • A research interface (jacopy.research) for user-defined brackets: assemble an engine and check the bracket axioms.
  • Proofs you can inspect and reuse: each step names its rule and source; jacopy.proof.result.prove returns a ProofResult whose requires lists the axioms, structures and registry facts the proof relied on, and a proved theorem can be cited into another proof only where the same requirements hold.
  • Output as plain text, LaTeX (including standalone documents), HTML for Jupyter, and colored terminal trees, with APA 7 citations.
  • A model oracle (jacopy.oracle) that evaluates both sides of a closed identity in random coordinate models. AGREE means "not refuted", never "proved".

Documentation

The documentation is at https://oselcukk.github.io/JacoPy/. It contains tutorials, how-to guides, explanations of the architecture and the trust model, the API reference, and the development guides (testing, citations, changelog).

Citing JacoPy

If you use JacoPy in your research, please cite it. The metadata is in CITATION.cff (GitHub shows it under "Cite this repository"). In BibTeX:

@software{Selcuk_JacoPy,
  author  = {Sel{\c{c}}uk, O{\u{g}}uzhan},
  title   = {{JacoPy}},
  version = {0.1.0},
  year    = {2026},
  url     = {https://github.com/oselcukk/JacoPy},
  license = {BSD-3-Clause}
}

Acknowledgments

JacoPy builds on the work of others:

  • The model oracle uses SymPy to evaluate expressions in coordinate models: A. Meurer et al., "SymPy: symbolic computing in Python", PeerJ Computer Science 3:e103 (2017), https://doi.org/10.7717/peerj-cs.103.
  • The definitions, axioms and theorems that JacoPy's rules implement are drawn from the mathematical literature on Lie and Courant algebroids, derived brackets, metric-affine and generalized geometry, and Drinfel'd doubles. Each rule cites its source, and the full list is on the bibliography page.

Contributing

Bug reports, mathematical corrections and pull requests are welcome. Please read CONTRIBUTING.md and follow the Code of Conduct. Ask questions in GitHub Discussions, and report security problems as described in SECURITY.md.

License

JacoPy is distributed under the BSD 3-Clause License. Copyright (c) 2026, Oğuzhan Selçuk.

Metadata

Release files for jacopy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jacopy 0.1.0
File Size Uploaded Provenance Actions
jacopy-0.1.0.tar.gz 895.3 kB With provenance Details for jacopy-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jacopy 0.1.0
File Interpreter ABI Platform Actions
jacopy-0.1.0-py3-none-any.whl Python 3 none any Details for jacopy-0.1.0-py3-none-any.whl

Total release size: 1.7 MB

Release files / jacopy-0.1.0.tar.gz

Download URL jacopy-0.1.0.tar.gz
Size 895.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4892654a7306cc23490be3d9a9197db39ab2c1e27e87037a9ee6141ab6a54ca2
BLAKE2b-256 checksum
How to use checksums
196c3bdf0a29b6ecbd1a5fc7db843c7a5dbbfc58fa1bb587e415d432a7ea40f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / jacopy-0.1.0-py3-none-any.whl

Download URL jacopy-0.1.0-py3-none-any.whl
Size 765.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbd36a6842ac37ac1b03417a08d2e843567192933cf5f01e14769d36e7d5f149
BLAKE2b-256 checksum
How to use checksums
f1446adc30f26d499877297a01326155218278e8876a1e4bede5239f6fd8c0cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Security for jacopy 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jacopy-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page