Skip to main content

Mirror Phase Mathematics: the EML Sheffer operator as a universal real-valued foundation for all elementary mathematics

Project description

EMLMath

EML Mathematics (EML-Math) — a universal real-valued foundation for all of mathematics, built from a single operator.

Created by Andrew K Watts. Based on the work by Andrzej Odrzywołek in the below paper https://arxiv.org/html/2603.21852v2 which is supplied under https://creativecommons.org/licenses/by/4.0/

you may find that another pypi library I found on the same topic is more useful for your tasks https://pypi.org/project/eml-sr/


The Core Idea

A single binary operator generates every elementary function in mathematics:

eml(x, y) = exp(x) − ln(y)

This is the EML Sheffer operator — the continuous analog of NAND for Boolean logic. A peer-reviewed paper (Odrzywolek 2026, arXiv:2603.21852v2) proves that together with the constant 1, eml can reconstruct all 36 elementary functions: +, , ×, /, exp, ln, sin, cos, tan, π, e, and every standard transcendental.

MPM's tension formula is identical: T = exp(x) − ln(y).

The EMLPoint is both the mathematical state and the expression tree node. Nesting EMLPoints is the computation:

from eml_math import EMLPoint
import math

EMLPoint(1, 1).tension()                                  # e = eml(1,1)
EMLPoint(2, 1).tension()                                  # exp(2)

# ln(e) as a nested EMLPoint tree — no imports needed
EMLPoint(1, EMLPoint(EMLPoint(1, math.e), 1)).tension()  # 1.0

Installation

pip install eml_math

With optional extensions (sympy for prime tensions, numpy for lattice fields):

pip install eml-math[ext]

Quick Start

from eml_math import EMLPoint, EMLState, simulate_pulses, verify_conservation
from eml_math import operators as ops
import math

# ── The EML primitive ─────────────────────────────────────────────────────────
print(EMLPoint(1, 1).tension())          # 2.718... (e)
print(EMLPoint(math.pi, 1).tension())    # exp(π)

# ── Operators as EMLPoint trees ──────────────────────────────────────────
print(ops.ln(math.e).tension())              # 1.0
print(ops.add(3, 4).tension())               # 7.0
print(ops.mul(3, 4).tension())               # 12.0
print(ops.sqrt(2).tension())                 # 1.414...
print(ops.sin(math.pi / 2).tension())        # 1.0

# ── Chaining: exp(ln(6)) = 6 ─────────────────────────────────────────────────
print(ops.exp(ops.add(ops.ln(2), ops.ln(3))).tension())  # 6.0

# ── Mirror-Pulse dynamics ─────────────────────────────────────────────────────
knot = EMLState(EMLPoint(1.0, 1.0))
traj = simulate_pulses(knot, n_pulses=10)
print(verify_conservation(traj))    # True — Axiom 10 holds at every step

for k in traj[:5]:
    print(f"n={k.flip_count}  rho={k.rho:.6f}  T={k.point.tension():.6f}")

# ── Discrete mode (opt-in) ────────────────────────────────────────────────────
knot_d = EMLState(EMLPoint(1.0, 1.0, D=100))   # D=100 toy scale
traj_d = simulate_pulses(knot_d, n_pulses=7)
# Reproduces the D=100 table from MPM.txt (lines ~600-643)

The EMLPair — Replacing Complex Numbers

The EML paper notes that sin, cos, and π require complex intermediates. MPM's solution: use two real EMLStates in phase relationship:

from eml_math import EMLPair

# i = EMLPair(real=0, imag=1) — no complex arithmetic
i = EMLPair.unit_i()
print(i)   # EMLPair(0 + 1i)

# Complex multiplication stays real throughout
z1 = EMLPair.from_values(3.0, 4.0)
z2 = EMLPair.from_values(1.0, 2.0)
z3 = z1 * z2
print(z3.real_tension, z3.imag_tension)  # -5.0, 10.0  ✓
print(z1.modulus)                         # 5.0

Architecture

Module Contents
eml_math.point EMLPoint — universal EML node, continuous by default
eml_math.knot EMLState — full Φ(n, ρ, θ) kinematic entity
eml_math.pair EMLPair — real replacement for complex numbers
eml_math.operators All 36 elementary ops as pure EML EMLPoint nestings
eml_math.simulation simulate_pulses, verify_conservation, trajectories
eml_math.convert Bidirectional MPM ↔ traditional notation converter (v0.3.0)
eml_math.qft Klein-Gordon, Dirac, Path Integral simulation (v0.4.0)
eml_math.qm Quantum postulates Q1-Q5, qubits, entanglement (v0.5.0)

Continuous vs Discrete Mode

Continuous (default) — smooth float arithmetic, only frame-shift guard:

p = EMLPoint(1.0, 1.0)          # D=None — continuous

Discrete (opt-in) — Planck-scale quantization via round(T × D):

p = EMLPoint(1.0, 1.0, D=100)   # toy discrete
p = EMLPoint(1.0, 1.0, D=6.187e34)  # physical Planck scale

Mathematical Background

The 16 axioms of Mirror Phase Mathematics derive everything from one principle:

  • Axiom 5 (Tension): T = exp(x) − ln(y) — the EML Sheffer operator
  • Axiom 7 (Mirror Update): x_{t+1} = y_t, y_{t+1} = T_{t+1}
  • Axiom 8 (Frame Shift): when y ≤ 0, use |y| — keeps all values real
  • Axiom 9 (3:1 Flip): 3 growth steps + 1 reflection = net +2 reality units
  • Axiom 10 (Conservation): T + x = exp(x) — holds at every step

Full documentation: eml_math.readthedocs.io

Related Work

  • Odrzywolek, A. (2026). "All elementary functions from a single operator." arXiv:2603.21852v2

License

MIT — Andrew K Watts, 2026

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eml_math-0.2.0a0.tar.gz (40.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

eml_math-0.2.0a0-cp313-cp313-win_amd64.whl (274.4 kB view details)

Uploaded CPython 3.13Windows x86-64

eml_math-0.2.0a0-cp313-cp313-musllinux_1_2_x86_64.whl (491.4 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

eml_math-0.2.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (432.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

eml_math-0.2.0a0-cp313-cp313-macosx_11_0_arm64.whl (374.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

eml_math-0.2.0a0-cp312-cp312-win_amd64.whl (275.2 kB view details)

Uploaded CPython 3.12Windows x86-64

eml_math-0.2.0a0-cp312-cp312-musllinux_1_2_x86_64.whl (491.6 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

eml_math-0.2.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (433.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

eml_math-0.2.0a0-cp312-cp312-macosx_11_0_arm64.whl (374.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

eml_math-0.2.0a0-cp311-cp311-win_amd64.whl (275.5 kB view details)

Uploaded CPython 3.11Windows x86-64

eml_math-0.2.0a0-cp311-cp311-musllinux_1_2_x86_64.whl (490.8 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

eml_math-0.2.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (431.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

eml_math-0.2.0a0-cp311-cp311-macosx_11_0_arm64.whl (374.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file eml_math-0.2.0a0.tar.gz.

File metadata

  • Download URL: eml_math-0.2.0a0.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eml_math-0.2.0a0.tar.gz
Algorithm Hash digest
SHA256 e2d3135aa4f8e7c937494769769efdc7cc6e8b57ce4b82d02cd9a5543f2db501
MD5 1a689a8f02e8699631457f03901a0c30
BLAKE2b-256 d5a43fea023605d632b556638940bcb9da5832572e609575350603c5937b355d

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0.tar.gz:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: eml_math-0.2.0a0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 274.4 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eml_math-0.2.0a0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3eb63f702ea6a4d3f55396fb346060be42b7d083cb394d79980c8755b04a690e
MD5 3ab9db10592b9a169f918812686ce68a
BLAKE2b-256 ee7f048872d1f52458246368d5a84297dcae0d2bb04b95fbdbdcce93d87d575f

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp313-cp313-win_amd64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 56a9fe77dcc2250cfa2fe43d5fa47e6d9aab9e2a3435a25d62c26b96611f9b30
MD5 9f7699d96d49a9edf2c072edf673e8c5
BLAKE2b-256 cf3f4c4bcead3240e026295423bade7bc0f87766a2cc851cebe2d06627b66f49

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b893ad5e7a8df4f590f0a68d4aad26e71ca76ac2c02082f838029a3b4adb5d78
MD5 864349f913b490640607263f539a56b3
BLAKE2b-256 4601fc02560840d0711324dd621f3935bfb907384b3ca537c299fbcfe12059ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7dc53d8cf154ca72dbe3fc7c1dad5898a62d96c3ab50dafcf84e0347c05c2187
MD5 463c32b155ddb4bd04b5e322bbae4fa0
BLAKE2b-256 cab40ec50632067594d4cd08eeb47e48249ed0bb38f1ad0551e23cc952fd3830

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: eml_math-0.2.0a0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 275.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eml_math-0.2.0a0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 16d7e3703521b54ef5817b40a132b805dd641b9ed52f81602d478c2237b490eb
MD5 5b49388ecf9cb09f8d657b57a27d7727
BLAKE2b-256 a1d5afcb225a73e88e830435202c99b82d338b095dc452f716d372c931064a35

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp312-cp312-win_amd64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6a35c89378bda66781d4972c8afb1776e0f4d62f084aa4dae24cd9a7101f682e
MD5 2b231b0d0cd1bf3bdf8118a6f43e29b2
BLAKE2b-256 b05c9f4f98f13b06fccc55abe55ec3fd00c2f7c8846671dcf6ea5c1170267f48

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f31a980751da5014756d58bd78256ce977febdfca56d908e85d08e4f533c22c2
MD5 7b1539cdf5ca1a5e5beec5e8e8817865
BLAKE2b-256 c72793023e2ab00813ec44d5fcad24a7730d46ef423eb00e03171c92a2ccd669

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dd8ebece3d4b8660b1d425bede52f73c5265c904a496a548c8dfa1d21b68c9ae
MD5 5f9986cbe69800186e69d67a02243983
BLAKE2b-256 3d62fc37552a25039a4cfdfde0bd32899ddba9e970dfe8ceabb762adcc186916

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: eml_math-0.2.0a0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 275.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for eml_math-0.2.0a0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5b57a2ae414524c811b44407810992063c9b4ccbafdbad811f9a420a2387e64d
MD5 3ec04dc31b8ce740695be3f5d6506f4d
BLAKE2b-256 a94fba9d4d999e8d5b7b80b740d4bbf1b72f986dd45d5db42009c256ceb17b68

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp311-cp311-win_amd64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c43481bb6741644401f478bf85e4bc501dd4be8f409c8e299e72f50632ef84fd
MD5 2b08ab67b5559ec0579553c1094592a2
BLAKE2b-256 958a04a4ebb0a2522c9167962212802b93aefe6b047a524da6113e5ecdfced4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e607220750b5d7d4376cbf5fa91262863826a2b6a8942b62cd4473b79d99fd11
MD5 4856a05f171fefdee1aeae7c9f66a6d4
BLAKE2b-256 361c9fe1dfe89afe8c214526faf44913f010461328be9dae6b159cd9f1b9c23b

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eml_math-0.2.0a0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for eml_math-0.2.0a0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca7840d26e2f2e9bbe0aadcfc6dc7e70234cbe9506ca65e140e464dccc2573ab
MD5 4d1e0a9b95a8c4338091ac240e43a05f
BLAKE2b-256 b17e565e035ec31dec0d2932ce5c2bbc82948af1a00c971aaff496f1705e6ac6

See more details on using hashes here.

Provenance

The following attestation bundles were made for eml_math-0.2.0a0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: workflow.yml on andrewkwatts-maker/EML-Math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page