by tetrionlabs
Claim-Driven Development: turn software intent into verifiable evidence.
# Add to your Claude Code skills
git clone https://github.com/tetrionlabs/mathemaGuides for using mcp servers skills like mathema.
Last scanned: 10/9/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-10-09T11:10:18.286Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how mathema compares with popular alternatives.
mathema is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by tetrionlabs. Claim-Driven Development: turn software intent into verifiable evidence. It has 225 GitHub stars.
Yes. mathema passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/tetrionlabs/mathema" and add it to your Claude Code skills directory (see the Installation section above).
mathema is primarily written in Python. It is open-source under tetrionlabs on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mathema against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
Proofs and counterexamples for Python functions, kept as records bound to the exact code they were checked against.
mathema checks Python functions against claims, short mathematical statements of what a function is meant to do, and keeps each result as a record bound to the code. It proves the mathematics of a claim over its whole domain where the body reads as mathematics, and checks the computation by running the real function on inputs chosen to break it, keeping proof and evidence apart. The name is Greek, μάθημα, that which is learned.
mathema.check(fn) runs built-in claims of both kinds with no claim written: mathematical ones about the formula (where it is defined, its poles, monotonicity, convexity, symmetry) and computational ones about the code as it runs (side effects, determinism, overflow, numerical stability).Series or DataFrame are run on real ones.mathema verify re-checks a function when it or anything it calls changes. A claim that held before and fails now keeps its fresh verdict, and the record keeps the move beside it until a person acknowledges it.mathema review) and a population report over a package (mathema audit).When mathema cannot settle a claim it says unknown and records why, rather than reporting a pass.
pip install "mathema[all]"
pip install mathema
The first adds numpy, z3, the MCP server, the coverage reader and mathema-language; the second is the core alone, which needs only sympy and pyyaml. mathema supports Python 3.10 to 3.14 and runs offline, with no account or API key.
import mathema
def discounted(price: float, rate: float) -> float:
"""The price after applying a discount rate."""
return price * (1 - rate)
print(mathema.check(discounted, claims=[
mathema.claim("for rate in [0, 1], f(price, rate) <= price",
name="at_most_price"),
mathema.claim("for price in [0, 1e6], rate in [0, 1], f(price, rate) <= price",
name="at_most_price_when_positive"),
]))
mathema.Record(discounted) · source, no side effects · form py:33f04232830d
at_most_price for rate in [0.0, 1.0] : float|missing, f(price, rate) <= price
falsified at price = -1, rate = 1
falsified mathematics for rate in [0.0, 1.0] ⊂ ℝ, f(price, rate) <= price
counterexample price = -1, rate = 1
[mathematics unsound, blame claim]
at_most_price_when_positive for price in [0.0, 1000000.0] : float|missing, rate in
[0.0, 1.0] : float|missing, f(price, rate) <= price holds
proven mathematics for price in [0.0, 1000000.0] ⊂ ℝ, rate in [0.0, 1.0] ⊂ ℝ,
f(price, rate) <= price
holds computation for price in [0.0, 1000000.0] : float, rate in [0.0, 1.0] :
float, f(price, rate) <= price 49 draws
The first claim never said prices are positive, and a negative price discounted by the whole rate breaks it. The second states the domain, and its mathematics line is proven for every price and rate in range. The computation line runs the same claim through float64 and holds on every draw, which is evidence rather than proof, so the headline reports holds.
import math
def put_call_parity_gap(s: float, k: float, r: float, t: float,
sigma: float) -> float:
"""A European call minus a European put on the same strike."""
root_t = math.sqrt(t)
d1 = (math.log(s / k) + (r + 0.5 * sigma * sigma) * t) / (sigma * root_t)
d2 = d1 - sigma * root_t
phi = lambda z: 0.5 * (1.0 + math.erf(z / math.sqrt(2.0)))
call = s * phi(d1) - k * math.exp(-r * t) * phi(d2)
put = k * math.exp(-r * t) * phi(-d2) - s * phi(-d1)
return call - put
The code prices a call and a put through logarithms, square roots and the normal distribution, yet their difference should always be s - k*exp(-r*t), with volatility dropping out entirely. That is put-call parity, and the claim states it over realistic ranges:
mathema check options.py --claim "for s in [50,150], k in [50,150], \
r in [0.0,0.1], t in [0.1,2], sigma in [0.05,0.8], \
f(s,k,r,t,sigma) == s - k*exp(-r*t)"
ok options.put_call_parity_gap: source, no side effects; claims 7/7 checked (1 proven, 6 holds, 0 falsified)
mathema lifted the body to an expression in which both Gaussian terms cancel and sigma drops out, so the identity is proven over the whole region. The six that hold are the same identity run in float64 and five rows recording what the function does with a nan in each parameter. The derive route lists what can be lifted and how each proof is named.
Before any claim is written, mathema already asks the questions that apply to every function: does it have a value for every input it accepts, does it divide by zero anywhere, does it touch anything outside itself? Here is what that finds:
import mathema
def discount_factor(x: float) -> float:
"""A discount factor that divides by one minus the rate."""
return 1 / (1 - x)
print(mathema.check(discount_factor))
mathema.Record(discount_factor) · source, no side effects · form py:bc2becbbf4fb
proven is_defined: 1 - x != 0
falsified is_pole_safe[x]: is_pole_safe(x)
counterexample x = 1 is admitted by the declared domain but sits at or beside a pole: the call raised ZeroDivisionError
These are two of fourteen rows. is_defined is a mathematical claim, proven from the formula itself; is_pole_safe is a computational one, falsified by running the code at the point the formula says is dangerous. Uniform sampling over the reals lands on x = 1 with probability zero, so mathema solves the lifted expression for where the denominator vanishes and makes sure that point is tried. See what mathema finds has more.
The function below is correct on paper, since (x + 1) - x is 1 for every real x. mathema proves that, then runs it in float64, where it is not true:
import mathema
def step(x: float) -> float:
"""The distance from x to x + 1."""
return (x + 1.0) - x
print(mathema.check(step, claims=[
mathema.claim("for x in [0, 1e16], f(x) == 1", name="unit_step")]))
mathema.Record(step) · source, no side effects · form py:fc901991b36b
unit_step for x in [0.0, 1e+16] : float|missing, f(x) = 1 falsified at x = 1e+16
proven mathematics for x in [0.0, 1e+16] ⊂ ℝ, f(x) = 1
falsified computation for x in [0.0, 1e+16] : float, f(x) = 1 counterexample x = 1e+16
[mathematics sound, implementation:numerical-instability]
f loses more than the conditioning explains (κ ≈ 0, error 1)
possible fixes:
(i) fix the code
(ii) to accept the whole claim as a discovery, keeping both lines, run: mathema accept step unit_step --as discovery
(iii) to narrow the doma