Skip to content
sergiorfPublic

About

A modern C++ symbolic mathematics engine and interactive notebook, built for algebra, calculus, expression manipulation, and extensible mathematical computing.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

CI Status License

Aleph3 Logo

Aleph3

Aleph3 is a modern C++ symbolic mathematics engine and interactive notebook project for exact computation, algebra, expression manipulation, and extensible mathematical computing.

The symbolic kernel is the core of the project. The CLI, SDK, session layer, web API, and notebook-facing interfaces are intended to share that same semantic engine rather than implement separate evaluator behavior.

Aleph3 is under active development. APIs and product surfaces may still evolve, and the supported symbolic subset is deliberately smaller than systems such as Mathematica, Maple, SageMath, or SymPy. Unsupported operations should produce explicit diagnostics instead of silently guessing.

Quick Examples

The CLI and session-backed surfaces currently accept a Wolfram-like expression syntax:

1/2 + 1/3
Factor[x^2 - 1]
Refine[Sqrt[x^2], x >= 0]
PolynomialQuotient[x^2*y + x*y^2 + y, x*y, {x, y}]

In the REPL:

> 1/2 + 1/3
5/6

> Factor[x^2 - 1]
(x - 1) * (x + 1)

> Refine[Sqrt[x^2], x >= 0]
x

> PolynomialQuotient[x^2*y + x*y^2 + y, x*y, {x, y}]
{x + y, y}

The syntax is a current frontend, not the whole product identity. The kernel keeps syntax separate from expression meaning so compatibility syntax, Aleph3-native syntax, or both can evolve over time.

What Works Today

Current implemented surfaces include:

  • a C++20 symbolic kernel with exact rationals, expression evaluation, assumptions, diagnostics, rewrite support, and function registration;
  • a CLI workbench over the shared session, kernel, and registered packs;
  • a C++ SDK path for validating and executing application formulas through the shared kernel;
  • algebra pack functionality including focused polynomial operations;
  • calculus pack functionality including focused symbolic differentiation;
  • a headless notebook core for document structure, JSON persistence, and clean Run All lifecycle behavior;
  • dormant web/API experiments over shared sessions, kept as implementation context rather than the active product path.

The CLI is currently the fastest way to try the engine locally. The near-term product path is the Windows-first local notebook over the existing notebook core and session layer.

Build And Try The CLI

You need CMake 3.20+ and a C++20 compiler. The symbolic kernel uses Boost.Multiprecision for internal exact scalar arithmetic; CMake uses a system Boost 1.86 config package when available and otherwise fetches the needed header-only Boost modules.

git clone https://github.com/sergiorf/aleph3.git
cd aleph3
cmake -S . -B build
cmake --build build --config Release --target aleph3_cli aleph-runtime

aleph3_cli is the current interactive and scripting workbench. The aleph-runtime target builds the private runtime process used by the runtime-protocol/client boundary. Until the CLI migration milestone is complete, ordinary CLI use still follows the current CLI path, while runtime protocol tests and future notebook-facing clients exercise aleph-runtime directly.

Run the REPL on Unix-like single-configuration builds:

./build/bin/aleph3_cli repl

Run the REPL on Windows or other multi-configuration builds:

.\build\bin\Release\aleph3_cli.exe repl

One-shot evaluation also works:

./build/bin/aleph3_cli "Factor[x^2 - 1]"
.\build\bin\Release\aleph3_cli.exe "Factor[x^2 - 1]"

Run stateful scripts with one expression per non-empty line:

./build/bin/aleph3_cli script calculations.aleph3
./build/bin/aleph3_cli script --json calculations.aleph3

Useful REPL commands:

> :help
> :help Factor
> :packs
> :complete Pol
> :inspect Factor[x^2 - 1]
> :reset
> :quit

On Windows and Unix-like interactive terminals, Tab completes commands and symbol names, arrows navigate history, and left/right arrows edit the current line. :complete <prefix> is the portable fallback and is also useful in piped tests.

Build The Developer System

Build the kernel, packs, CLI, SDK, notebook core, web components, examples, and tests:

cmake -S . -B build
cmake --build build --config Release

For a focused runtime-boundary build, compile the CLI, runtime executable, protocol tests, client tests, and private runtime protocol tests:

cmake --build build --config Release --target aleph3_cli aleph-runtime aleph_protocol_tests aleph_client_tests aleph_runtime_protocol_tests

Run the configured CTest suite:

ctest --test-dir build -C Release --output-on-failure

For a smaller SDK-focused configuration:

cmake -S . -B build-sdk -DALEPH3_BUILD_SYMBOLIC_ENGINE=OFF -DBUILD_TESTING=OFF
cmake --build build-sdk --config Release

The SDK still uses the kernel in this configuration. The option disables the broader symbolic product surface and its tests; it does not introduce a separate runtime.

Architecture At A Glance

  • aleph3_kernel owns expressions, evaluation, rewriting, exact arithmetic, assumptions, diagnostics, resource budgets, and registration.
  • Math packs add domain functions through kernel registration; core-algebra currently owns the focused polynomial surface and core-calculus owns focused differentiation.
  • aleph3_sdk adds schemas, policies, host-facing values, and the trusted embedding boundary over the kernel.
  • The reusable session layer owns interactive state and exposes evaluation, completion, help, and reset behavior to CLI and web consumers.
  • aleph3_cli is the current local interactive and scripting workbench. In the planned public/private split it remains private first-party tooling.
  • aleph3_notebook_core owns the current headless document model, persistence, and clean Run All lifecycle.
  • Public notebook and app-client code should communicate with a private aleph-runtime executable through a stable protocol rather than linking kernel internals.

aleph3_symbolic remains a compatibility target name during migration; it is not a second semantic engine.

For the full ownership model, see Architecture.

Project Status

Aleph3 is a personal engineering project in active development. The strongest current surfaces are the kernel, CLI, SDK, sessions, focused algebra and calculus support, and notebook core.

The near-term product work is the Windows-first local notebook MVP: a usable graphical notebook backed by the shared semantic engine and existing notebook core. Broader CAS features, richer notebook UX, calculus beyond the focused derivative subset, solving, plotting, arbitrary-precision expansion, DSP packs, web products, and large compatibility claims remain future work unless documented as supported in the manual and specifications.

The intended commercial split is private aleph-core for the domain-independent kernel core, CLI, packs, and real aleph-runtime executable, with public visibility centered on aleph-notebook and protocol/client code. The split should happen only after the protocol boundary is proven in the current repository.

GitHub Actions runs the CI workflow for pushes and pull requests targeting main. The workflow builds and runs the CTest suite on Ubuntu and Windows, and checks changed C++ source/header formatting with clang-format on Ubuntu.

Documentation

The variable list {x, y} in multivariate algebra declares variable precedence. See the manual's Concepts and terminology appendix for a plain-language explanation.

License

Copyright 2025 Sergio Rodriguez Freire.

Aleph3 is licensed under the Apache License 2.0.

About

A modern C++ symbolic mathematics engine and interactive notebook, built for algebra, calculus, expression manipulation, and extensible mathematical computing.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages