Lean 4 formalization of the EML (Elementary Modulo Logarithms) operator framework — barrier theorems, F16 lower bounds, hyperbolic-ELC preservation, exp-log multiplier duality, and the open chain-order / infinite-zeros conjectures.
This project formalizes the operator-theoretic framework underlying
Monogate's SuperBEST routing system. The framework studies which
elementary functions are computable in n nodes of the F16 binary
operator family — a small alphabet of exp/log compositions over
ℝ — and proves separation theorems against richer target
functions (+, −, ×, ÷, sin).
- Reference: Odrzywołek (2026), arXiv:2603.21852.
- Companion site: monogate.org.
- EML compiler: the Forge stack lowers EML expressions through this verified operator algebra to C, Rust, Lean, Verilog, VHDL, Chisel, LLVM IR, and WebAssembly with cross-target equivalence.
- 18 submodules under
MonogateEML/, plus a top-levelMonogateEML.leanaggregator that imports them all solake buildverifies the entire corpus in one pass. - 16 files: 0 sorries. Production-grade verified content.
- 2 files: 5 open sorries at known Mathlib gaps (Khovanskii
zero-count, o-minimal
ℝ_exp). See Open problems below. The fifth sorry (tower_base_eq_chain_order) is a corollary ofchain_order_additivity— formally still open until the parent conjecture is closed.
Requires Lean 4 (leanprover/lean4:v4.14.0) and Mathlib v4.14.0.
The pinned versions live in lean-toolchain and lake-manifest.json.
lake buildA clean build prints Build completed successfully plus exactly
five declaration uses 'sorry' warnings — one per open problem
listed below. No error lines.
The project depends only on Mathlib. The key Mathlib modules used:
Mathlib.Analysis.SpecialFunctions.{Exp, Log, Pow}— the F16 operator family and the EML evaluation semantics.Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic— forReal.sin,Real.sin_int_mul_pi, the Infinite Zeros Barrier.Mathlib.Analysis.Analytic.{Basic, IsolatedZeros}— analytic continuation argument inanalytic_finite_zeros_compact.Mathlib.Data.Set.{Finite.Basic, Function}— forSet.infinite_of_injective_forall_mem.Mathlib.Topology.Algebra.Order.Compact— Bolzano-Weierstrass in the Part B compactness argument.
AddLowerBound.lean::SB_add_ge_two— no single F16 operator computesx + y, henceSB(add) ≥ 2.SubLowerBound.lean::SB_sub_ge_two— same forx − y.MulLowerBound.lean::SB_mul_ge_two— same forx · y(over general reals; positive-domain bound is 1, see UpperBounds).DivLowerBound.lean::SB_div_ge_two— same forx / y.DivLowerBound3.lean— extended division barrier covering the exp-type outer cases plus a 2-node positive construction.
UpperBounds.lean::superbest_positive_one_node_ops — explicit
F16 constructions for exp, mul, pow, recip, sqrt on
ℝ_>0, each in a single F16 node. Each construction is verified
by a _one_node_positive lemma.
EMLDepth.lean formalizes the depth-stratified EML grammar
EML_k and proves:
euler_gateway,euler_identity— the Euler identity at depth 1 plus the constant gateway lemma.exp_not_constant— strict separationEML_0 ⊊ EML_1.
EMLDuality.lean::exp_log_multiplier_product_at_fixed_point —
for z in the slit plane with Complex.exp z = z, the multiplier
product deriv exp z · deriv log z = 1. Every Lambert-W fixed
point is therefore exp-repelling and log-attracting with
reciprocal multipliers.
HyperbolicPreservation.lean — sinh, cosh, tanh are explicit
arithmetic combinations of exp(±x) and hence map ELC inputs to
ELC outputs. Includes numerical witnesses sinh(ln 2) = 3/4,
cosh(ln 2) = 5/4, and the 3-4-5 Pythagorean-triple identity
at ln 2.
InfiniteZerosBarrier.lean — sin is not in any finite-depth
EML grammar:
sin_has_infinitely_many_zeros(0 sorry) —sinhas infinitely many real zeros viaSet.infinite_of_injective_forall_memonn ↦ nπ.analytic_finite_zeros_compact(0 sorry) — non-zero real-analytic functions on[a, b]have finitely many zeros (Bolzano-Weierstrass + analytic identity theorem).eml_tree_analytic,eml_tree_analytic_depth_le_1(0 sorry) — every well-formed EML tree is real-analytic on(0, ∞), with a complete depth-1 case analysis.
Runtime.lean— drift-awaremg_*operator semantics matchinglibmonogate.hv0.1.0; SuperBEST routing ofsoftplusto the canonical sigmoid form, with bounds.ModelAudit.lean— SuperBEST v5.1 → v5.2 correction record:sqrt = 1nnot2n,mul = 1non the positive domain.
The 5 remaining sorries all sit at known Mathlib infrastructure
gaps. Sorries 1, 3, 4 reduce to the Khovanskii zero-count theorem
or o-minimality of ℝ_exp; Sorry 2 needs a formal _pFq with
DLMF parameter rewrites; Sorry 5 is a corollary of Sorry 1 and
collapses the moment Sorry 1 closes. Contributions welcome — each
one would unlock a barrier theorem of independent mathematical
interest.
Statement. For any symbolic expression f, the Pfaffian
chain order of f equals the sum (with multiplicity) of chain
orders of its PNE-primitive AST occurrences.
Empirical support. 22/23 hits across two probe sets; the
single Δ = +3 outlier is recovered once nested primitive
occurrences are counted.
Mathlib infrastructure needed.
- The Khovanskii zero-count theorem on Pfaffian chains.
- o-minimal structure theory for
ℝ_exp(Wilkie 1996). - Composition lemmas for Pfaffian functions analogous to
AnalyticOnNhd.comp.
Statement. Under unrestricted parameter substitution (DLMF
identities), {T_F, T_Γ, T_W} is a minimum generating set for
the Pfaffian-not-elementary closure.
Mathlib infrastructure needed.
- A formal model of
_pFqwith parameter substitution and DLMF identity rewrites. - The current statement is a placeholder pending a definition of "tower reducibility under parameter substitution".
Statement. No finite-depth EML tree pointwise equals Real.sin.
Why it matters. Headline barrier theorem T01: every finite EML
grammar is strictly weaker than ℝ_an,exp.
Mathlib infrastructure needed.
- Khovanskii zero-count, OR
- o-minimality of
ℝ_exp(which gives a uniform finite-zero bound for every definable function as a corollary).
Statement. Complex-side restatement of Sorry 3:
x ↦ sin(Re x) ∉ EML_k k for any finite k.
Mathlib infrastructure needed. Same as Sorry 3 — both reduce the inductive zero-count argument to a one-line consequence of an existing meta-theorem, which Mathlib does not yet have.
Statement. For any single-primitive expression f whose AST
contains exactly one PNE-primitive node p, the chain order of
f equals the chain order of p.
Why it's open. Direct corollary of Sorry 1: rewrite the chain
order via chain_order_additivity (which is sorry'd), then
collapse the singleton multiset sum. A theorem downstream of a
sorry is not proved — marking this as a fifth sorry keeps the
dependency on the open CHA conjecture honest.
What closes it. The two-line proof
rw [chain_order_additivity, hf]; simp [Multiset.map_singleton, Multiset.sum_singleton] becomes a real proof the moment Sorry 1
is closed. No additional Mathlib infrastructure beyond what
Sorry 1 needs.
See MATHLIB_KHOVANSKII_NEEDS.md
for a survey of the o-minimal/Pfaffian gap and the Mathlib issues
tracking it.
monogate-lean/
├── README.md -- this file
├── MATHLIB_KHOVANSKII_NEEDS.md -- gap analysis for the 5 sorries
├── lakefile.lean
├── lean-toolchain -- pinned at leanprover/lean4:v4.14.0
├── lake-manifest.json -- pinned Mathlib version
├── MonogateEML.lean -- top-level aggregator (imports all submodules)
└── MonogateEML/
├── AddLowerBound.lean -- SB(add) ≥ 2
├── SubLowerBound.lean -- SB(sub) ≥ 2
├── MulLowerBound.lean -- SB(mul) ≥ 2
├── DivLowerBound.lean -- SB(div) ≥ 2
├── DivLowerBound3.lean -- extended division barrier
├── UpperBounds.lean -- 1-node positive constructions
├── ModelAudit.lean -- v5.1 → v5.2 correction
├── EMLDepth.lean -- depth hierarchy + Euler identity
├── EMLDuality.lean -- exp-log multiplier duality
├── HyperbolicPreservation.lean -- sinh/cosh/tanh preserve ELC
├── InfiniteZerosBarrier.lean -- T01, Parts A–C; Part D open
├── ChainOrderAdditivity.lean -- CHA + tower-base; both open
├── Runtime.lean -- libmonogate semantics
├── Universality.lean -- universal construction lemmas
├── SelfMapConjugacy.lean -- self-map conjugacy reductions
├── Gamma.lean -- Γ-function lemmas
├── Float64.lean -- libm ULP postulate scaffold
└── Tactics.lean -- eml_auto / eml_unfold / eml_golf
This is a research formalization, not a Mathlib-style polished library. Contributions are welcome in any of three modes:
- Tighten an existing proof. If a theorem can be shortened
using a lemma I missed in Mathlib, send a PR — proof golfing
is welcome. Run
lake buildclean before submitting. - Close one of the four open sorries. Each requires real
mathematical infrastructure (Khovanskii / o-minimal /
_pFqparametric DLMF). A partial proof that introduces a clean axiom for the missing meta-theorem is also welcome — it makes the dependency explicit. - Upstream a small lemma to Mathlib. Several spots in
EMLDuality.lean,HyperbolicPreservation.lean, andEMLDepth.leanuse compositions that could become Mathlib lemmas in their own right (e.g.Real.exp_log_pi). If a lemma here would belong upstream, send the Mathlib PR first and update this repo when it lands.
Research formalization, all rights reserved by Monogate Research. The proofs reference (and are licensed compatibly with) Mathlib under Apache 2.0.
If you use these proofs in academic work, please cite:
@misc{odrzywolek2026eml,
author = {Odrzywołek, Andrzej},
title = {Elementary Modulo Logarithms: a Pfaffian operator algebra},
year = {2026},
eprint = {2603.21852},
archivePrefix = {arXiv}
}The accompanying Lean 4 formalization lives in this repository
(github.com/agent-maestro/monogate-lean)
and is verified against the version of Mathlib pinned in
lake-manifest.json.