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, separator replaces the ", " between claim segments, 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.1.0 and the interface may change before 1.0.

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

Built distribution (wheel)

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

Total release size: 38.8 kB

Release files / mathema_symbology-0.1.0.tar.gz

Download URL mathema_symbology-0.1.0.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4f3af053a58d88bfda23d1cd21f740e1c83f92cff4211faa92d98bd7eec79adb
BLAKE2b-256 checksum
How to use checksums
829aae0cf51f5f31ff3b08c1f7b24aa6fa4ef885bd0680c93756bb310f66e2db
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 Aug 29, 2026.

Transparency log

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

Download URL mathema_symbology-0.1.0-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab45ce7a0ee7ac3a98c0484c643150a2579af99124b7f0ea44cee38325dee469
BLAKE2b-256 checksum
How to use checksums
83df94d2af6f59f4f21a410d47d4078000d4547653655e9a28e0ef329c5b6e80
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 Aug 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

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