Universality witnesses for elementary functions over the EML routing tree.
Project description
eml-witness — ARCHIVED
🗄 This package is archived as of 2026-04-25 (E-129 consolidation).
The functionality has been folded into the main
monogatepackage as ofmonogate 2.4.0+. New users should install:pip install monogate[witness]and use:
from monogate.witness import universality_witness # or, equivalently (via lazy alias on the package root): from monogate import universality_witnessThe standalone
eml-witnessPyPI / GitHub package is frozen at 0.2.0 and will receive no further updates. Existing installs continue to work, but please migrate tomonogate[witness]for ongoing improvements.See monogate's CHANGELOG entry for 2.4.0 for details.
eml-witness (historical)
Universality witnesses for elementary functions over the EML routing tree. A witness is a finite, structured certificate that an expression admits an EML routing tree — composed of the expression's Pfaffian profile, its closest registry match (if any), and a rewrite path to a lower-cost equivalent (if one exists).
from eml_witness import universality_witness
w = universality_witness("1/(1+exp(-x))")
print(w.profile.predicted_depth) # 2
print(w.identified.name) # 'sigmoid (canonical)'
print(w.verified_in_lean) # False (until Lean lands)
Serialise to JSON:
from eml_witness import witness_to_dict
import json
print(json.dumps(witness_to_dict(w), indent=2))
Lean integration
verified_in_lean defaults to False and is the link to the
formal half of the universality story. It will flip to True
once EML_Universality.lean lands in the monogate-lean
repository AND the user has personally verified the file via
the VS Code lean4 extension (per the project's
feedback_lean_writing_protocol_2026_04_25 rule).
When verified, the upstream consumer can patch the witness post-construction:
w = universality_witness("sin(x)")
w_verified = dataclasses.replace(
w,
verified_in_lean=True,
lean_url="https://github.com/almaguer1986/monogate-lean/blob/main/MonogateEML/Universality.lean",
)
Why a separate package?
The witness API composes three other packages:
| Provided by | Used for |
|---|---|
eml-cost |
profile (analyze + fingerprint + fingerprint_axes) |
eml-discover |
identification |
eml-rewrite |
canonical path + best-rewrite walk |
Putting it as a leaf-level package keeps the dependency story
clean: the eml-* substrate stays unchanged, and downstream
clients (eml-explore, eml-jupyter, eml-vscode,
eml-discover-server) can pull witness-shaped data through
one entry point.
Status
Beta. v0.1.0. Patent pending.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eml_witness-0.2.0.tar.gz.
File metadata
- Download URL: eml_witness-0.2.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
204b749ed67f43c2bc35165e63b52ba103ddd0e5297b790312d7e3d017fbdc7d
|
|
| MD5 |
9482907f1baccd2a0d36e1b61cd0f6c3
|
|
| BLAKE2b-256 |
a8486dbf634ed016324db105feb54de4d599330db6051d8dd7247c769d5d5e36
|
File details
Details for the file eml_witness-0.2.0-py3-none-any.whl.
File metadata
- Download URL: eml_witness-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e4797b70ec0d5a86ef664ee85223e6972a7375b02bbcc1786717a75e59625cb
|
|
| MD5 |
37b2c32454472ea85b4fa040263cc059
|
|
| BLAKE2b-256 |
233f58ab78150c9848bdb5d8e5a926f1a3c5cd9cc100f4ce608a5d54919a6d99
|