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 three keys, all optional: params and funcs map names to symbols, and show_missing controls whether an unbounded domain prints whether missing values are included or excluded. A symbol that isn't a valid Python identifier goes inside of backticks (handled in mathema):

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

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 details about its inclusion.

For specific symbols that don't generalise beyond your codebase just use the approach in Configuration

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

This is 0.2.0 and the interface may change before 1.0.

Release files for mathema-symbology 0.2.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.2.0
File Size Uploaded
mathema_symbology-0.2.0.tar.gz 21.0 kB Details

Built distribution (wheel)

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

Total release size: 38.4 kB

Release files / mathema_symbology-0.2.0.tar.gz

Download URL mathema_symbology-0.2.0.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8c8bdfc22995b6cb3f2288a4d25ac7608df55877d708d54e16cf1433f754076d
BLAKE2b-256 checksum
How to use checksums
3d3ac5a4c97d0353d3b5c0a2c6fa67e743a3529b37ce4641d334f8e44e3a19c0
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 14, 2026.

Transparency log

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

Download URL mathema_symbology-0.2.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8cd7be9a183218325571994c2129349c57c23c4068f40ba575df49bb9f74df26
BLAKE2b-256 checksum
How to use checksums
e21f5c68c211551d496603a3e69aed23890198b7699f6beb100949ebd1393c96
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

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