Skip to main content

clausal-sympy

SymPy predicates for Clausal Prolog.

Wraps SymPy as Clausal Prolog predicates for symbolic mathematics: simplify, expand, factor, solve, differentiate, integrate and more. Logic variables and arithmetic operators convert to SymPy expressions directly.

Install

pip install clausal-sympy

sympy is pulled in as a dependency. Requires Python 3.13 or later.

Use

Import the predicates into a seam (.seam) module, as the package's own tests do. A Clausal Prolog (.clausal) module reaches Python only through the seam: put the imports in a .seam module and list it under [tool.clausal] python_bridges in your project's pyproject.toml (see Importing Prolog).

This test, from tests/fixtures/sympy_algebra.seam, shows the shape of a call:

-import_from(sympy, [collect, sym_equal])

test("collect by x") <- (
    collect(X**2 + 2*X + X*Y, X, R),
    sym_equal(R, X**2 + X*(Y + 2))
)

Documentation

License

MIT

Metadata

Release files for clausal-sympy 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 clausal-sympy 0.1.0
File Size Uploaded
clausal_sympy-0.1.0.tar.gz 25.0 kB Details

Built distribution (wheel)

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

Total release size: 39.8 kB

Release files / clausal_sympy-0.1.0.tar.gz

Download URL clausal_sympy-0.1.0.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
97a4a07130b8744ba1e417951f0b695d2a141443f1ca626e2364ccf50f8a6db9
BLAKE2b-256 checksum
How to use checksums
0e01f311d18d7eaa3cc53056d27e1cf31681ad685431444fd5ab9f9018cbd55c
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 7, 2026.

Transparency log

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

Download URL clausal_sympy-0.1.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ba8a007f71145ceed060e2accdee7f7b6dcb94537b5986b0b5135c0b91ef0c5
BLAKE2b-256 checksum
How to use checksums
d3b52c640887f1ec5f1999a86fdd26f026015078c2dcdda5e6661ab0e183af3c
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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