Skip to main content

mathema-symbology

Symbol lookups for mathema claim rendering.

tests PyPI

mathema renders a verified claim back as one readable line of text, and on its own it can only spell a parameter the way the code spells it. This package supplies the notation: a curated mapping from common parameter and function names to the symbols their field's literature actually uses, so a claim about price, sigma1 or delta_revenue renders as P, σ₁ and ΔR rather than as Python identifiers. mathema asks it for a symbol on every render, and any name it has no entry for falls straight back to mathema's own naming.

Install

pip install mathema-symbology

mathema discovers it automatically once installed, through the mathema.capabilities entry point; there is no configuration to write.

Before and after

claim: for price in [0, 100], f(price) >= 0

without:  ∀ price ∈ [0.0, 100.0] ⊂ ℝ ∪ {∅}, f(price) ≥ 0
with:     let P = price, ∀ P ∈ [0.0, 100.0] ⊂ ℝ ∪ {∅}, f(P) ≥ 0

claim: for delta_revenue in [0, 10], f(delta_revenue) >= 0

without:  let x = delta_revenue, ∀ x ∈ [0.0, 10.0] ⊂ ℝ ∪ {∅}, f(x) ≥ 0
with:     let ΔR = delta_revenue, ∀ ΔR ∈ [0.0, 10.0] ⊂ ℝ ∪ {∅}, f(ΔR) ≥ 0

claim: for sigma1 in (0, 5], f(sigma1) >= 0

without:  ∀ sigma1 ∈ (0.0, 5.0] ⊂ ℝ ∪ {∅}, f(sigma1) ≥ 0
with:     let `σ₁` = sigma1, ∀ `σ₁` ∈ (0.0, 5.0] ⊂ ℝ ∪ {∅}, f(`σ₁`) ≥ 0

claim: for variance in [0, 10], f(variance) >= 0

without:  ∀ variance ∈ [0.0, 10.0] ⊂ ℝ ∪ {∅}, f(variance) ≥ 0
with:     let `σ²` = variance, ∀ `σ²` ∈ [0.0, 10.0] ⊂ ℝ ∪ {∅}, f(`σ²`) ≥ 0

claim: for pct_change_ebit in [-50, 50], f(pct_change_ebit) <= 1

without:  let x = pct_change_ebit, ∀ x ∈ [-50.0, 50.0] ⊂ ℝ ∪ {∅}, f(x) ≤ 1
with:     let `%ΔEBIT` = pct_change_ebit, ∀ `%ΔEBIT` ∈ [-50.0, 50.0] ⊂ ℝ ∪ {∅}, f(`%ΔEBIT`) ≤ 1

claim: for half_life in (0, 100], f(half_life) >= 0

without:  let x = half_life, ∀ x ∈ (0.0, 100.0] ⊂ ℝ ∪ {∅}, f(x) ≥ 0
with:     let `t½` = half_life, ∀ `t½` ∈ (0.0, 100.0] ⊂ ℝ ∪ {∅}, f(`t½`) ≥ 0

A symbol that isn't a valid identifier arrives backtick-wrapped, and the rendered text still parses back to an equivalent claim.

Resolution order

  1. The project's own .mathema/symbology.yaml, if one exists.
  2. Compositional shapes: delta_<rest> and delta<Rest> resolve <rest> on its own and prefix Δ, and pct_change_<rest> does the same with %Δ.
  3. The built-in table of standard notation.
  4. A <base>_<digits> name falls back to the spelling without the underscore, so alpha_1 and alpha1 resolve identically.

A name none of these recognise renders unchanged.

Configuration

.mathema/symbology.yaml takes four keys, all optional: params and funcs map names to symbols, show_missing controls whether an unbounded domain prints whether missing values are included or excluded, and enabled: false switches the package off for the project. A symbol that isn't a valid Python identifier goes inside of backticks (handled in mathema). The file is found from the working directory, under the nearest .mathema/ within the enclosing repository, so a command run from a subdirectory reads the project's own file.

params:
  headcount: N
  runway: "`T_run`"
funcs:
  payback: PB

Setting MATHEMA_SYMBOLOGY_DISABLE=1 in the environment switches it off for one run, whatever the file says.

Adding a symbol

Open a pull request against the table in src/mathema_symbology/_default_mapping.py. An entry has to be real, standard notation in some field, worth making the default for parameter names that match. The missing-symbol issue template asks for the details that justify including it.

For symbols that don't generalise beyond your codebase, use Configuration instead.

Requirements

Python 3.10 or later. The only runtime dependency is pyyaml; mathema itself is not strictly required, only discovered when present.

Licence

Apache-2.0, see LICENSE.

Version

The interface may change before 1.0; the installed version is mathema_symbology.__version__.

Release files for mathema-symbology 0.3.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 mathema-symbology 0.3.0
File Size Uploaded
mathema_symbology-0.3.0.tar.gz 22.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mathema-symbology 0.3.0
File Interpreter ABI Platform
mathema_symbology-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.8 kB

Release files / mathema_symbology-0.3.0.tar.gz

Download URL mathema_symbology-0.3.0.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1648a6b4e12bf20d1b8fc511a5db5089769b118ce2baf638379dc958d3db828a
BLAKE2b-256 checksum
How to use checksums
e6bf4c861826f72846cfa555cac516087536341e503a8b00ac90d9a6c440cc68
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 Sep 24, 2026.

Transparency log

Release files / mathema_symbology-0.3.0-py3-none-any.whl

Download URL mathema_symbology-0.3.0-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33095489649f2f48e97f985b68ef3c73e97917cb11814dd4b5c69e53b3a7f0b6
BLAKE2b-256 checksum
How to use checksums
3e5277e3df8bc0097d05dc11d14bb8b6904d8c1cece63fed71ae68427c6b4a68
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 Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

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