{
  "format_version": 3,
  "claim_natural": "Every elementary function that appears on a standard scientific calculator \u2014 including \\(+\\), \\(\\times\\), \\(\\div\\), exponentiation \\(x^y\\), \\(\\sin\\), \\(\\cos\\), \\(\\tan\\), \\(\\sqrt{x}\\), \\(\\log_{10}\\), \\(\\pi\\), \\(e\\), \\(i\\), and their compositions and inverses \u2014 can be realised as a finite binary tree of the operator \\(\\mathrm{eml}(a, b) = e^{a} - \\ln b\\) whose leaves are the constant \\(1\\) and the input variables. Each construction is verified to machine precision at multiple test points on its natural domain.",
  "claim_formal": {
    "subject": "The binary operator eml(a, b) = exp(a) - ln(b) applied to trees whose leaves are the constant 1 and the input variables x, y (principal branch of log; complex intermediates permitted).",
    "property": "For every function f in the calculator-closure list {ADD, SUB, MULT, DIV, POW, SQRT, LOG10, SIN, COS, TAN, ARCSIN, ARCCOS, ARCTAN} and for every constant c in {pi, e, i}, there exists a finite eml-tree T_f (with leaves in {1, x, y}) such that evaluating T_f at any point (x0, y0) in the natural domain of f returns f(x0, y0) (equivalently, T_c evaluates to c). Compositions are obtained by leaf substitution; inverses are exhibited as explicit trees satisfying the defining identities.",
    "operator": "==",
    "operator_note": "The claim is a universal-closure statement. It is not a single equality but a list of per-function existence claims + a general closure-under-composition argument. We interpret it as: (1) Exhibit an eml-tree for every listed primitive. (2) Demonstrate composition-closure by giving a compound witness and invoking leaf substitution. (3) Demonstrate inverse-closure by exhibiting the inverse of each trig primitive as another eml-tree, and verifying the round-trip. All constructions reuse five previously verified eml building blocks (published as separate proofs on this site): EXP(x) = eml(x, 1) [K=3], LN(p) = eml(1, eml(eml(1, p), 1)) [K=7], SUB(p, q) = eml(LN(p), EXP(q)) [K=11], the K=19 ADD tree and the K=17 MULT tree. Constants pi, e, i are imported from the separately published eml-pi-and-i-from-1 proof. Derived functions DIV, POW, SQRT, LOG10, SIN, COS, TAN, ARCSIN, ARCCOS, ARCTAN are defined by standard elementary-function identities applied to these building blocks, e.g. DIV(x, y) = MULT(x, EXP(-LN(y))), SIN(x) = DIV(SUB(EXP(iX), EXP(-iX)), MULT(2, i)), ARCTAN(x) = MULT(i/2, LN((i + x)/(i - x))). The resulting trees are verified numerically at several interior points of each function's natural domain; exact-zero inputs are excluded because MULT inherits a removable singularity at 0 (documented in eml-k17-multiplication-tree). Natural-domain restrictions beyond this (e.g. |x| < 1 for ARCSIN/ARCCOS, x > 0 for LOG10 and SQRT on real inputs) match the standard scientific-calculator domains. Minimality of token counts is NOT claimed; the reported K values are finite upper bounds.",
    "threshold": true,
    "is_time_sensitive": false
  },
  "evidence": {
    "A1": {
      "type": "computed",
      "label": "eml-trees exist for every listed primitive (arithmetic, roots/powers, log10, trig, inverse trig, constants pi/e/i)",
      "sub_claim": null,
      "method": "Programmatic construction of an eml-tree for each of the 13 primitives + 3 constants using the five previously verified building blocks; token counts reported via recursive K()",
      "result": "Confirmed: 16 primitive trees constructed. Sample K values: add(x,y)=19, sub(x,y)=11, mult(x,y)=17, div(x,y)=73, pow(x,y)=25, sqrt(x)=59, log10(x)=247, sin(x)=471",
      "depends_on": []
    },
    "A2": {
      "type": "computed",
      "label": "Numerical verification: every primitive matches its analytic value at multiple interior test points (max |diff| < 1e-12)",
      "sub_claim": null,
      "method": "Recursive numerical evaluation (cmath.exp, cmath.log, principal branch) of each primitive tree at multiple interior points of its natural domain; compare against math.* reference values",
      "result": "Confirmed: 50 checks passed; max |diff| = 1.23e-14",
      "depends_on": [
        "A1"
      ]
    },
    "A3": {
      "type": "computed",
      "label": "Composition witness: sin(sqrt(x) + cos(x)) evaluated as a single eml-tree matches math.sin(math.sqrt(x) + math.cos(x)) at multiple test points",
      "sub_claim": null,
      "method": "Leaf substitution of sqrt(x) and cos(x) subtrees into sin's x-leaf; numerical evaluation at 3 interior points",
      "result": "Confirmed: composition tree K = 1367; max |diff| over 3 points = 1.49e-15",
      "depends_on": [
        "A1",
        "A2"
      ]
    },
    "A4": {
      "type": "computed",
      "label": "Inverse-trio witness: sin(arcsin(a)) = a, cos(arccos(a)) = a, tan(arctan(a)) = a all hold at a = 0.5 via eml-tree evaluation",
      "sub_claim": null,
      "method": "Construction of sin(arcsin(x)), cos(arccos(x)), tan(arctan(x)) by substitution; evaluation at x = 0.5 and comparison to 0.5",
      "result": "Confirmed: all three round-trips match 0.5; max |diff| = 1.96e-15",
      "depends_on": [
        "A1",
        "A2"
      ]
    },
    "A5": {
      "type": "computed",
      "label": "Structural closure: every constructed tree has leaves only in {1, x, y}; no hidden constants or other symbols",
      "sub_claim": null,
      "method": "Recursive leaf-walk on each primitive tree; verify leaves subset of {1, x, y}",
      "result": "Confirmed for all 16 primitive trees",
      "depends_on": [
        "A1"
      ]
    },
    "A6": {
      "type": "computed",
      "label": "Building-block integrity: ADD(1,1)=2, MULT(1,1)=1 at K=19, K=17 (matches the published K=19 and K=17 proofs byte-for-byte)",
      "sub_claim": null,
      "method": "Parse the published K=19 ADD_STR and K=17 MULT_STR templates; K(ADD(1,1)) == 19 and K(MULT(1,1)) == 17 (sanity) and numerical values are 2 and 1 respectively",
      "result": "Confirmed: ADD(1,1) = (1.9999999999999996+0j), MULT(1,1) = (1+0j)",
      "depends_on": []
    }
  },
  "cross_checks": [
    {
      "description": "Coverage: every listed calculator primitive has (a) an explicit tree (A1), (b) leaves in {1, x, y} (A5), and (c) numerical agreement with its analytic value at multiple points (A2)",
      "fact_ids": [
        "A1",
        "A2",
        "A5"
      ],
      "agreement": true
    },
    {
      "description": "Composition and inverse closure: A3 witnesses composition; A4 witnesses the forward-inverse identity for all three trig/arctrig pairs",
      "fact_ids": [
        "A3",
        "A4"
      ],
      "agreement": true
    },
    {
      "description": "Building-block integrity: ADD and MULT templates match the published K=19 and K=17 proofs byte-for-byte and produce the expected constant values 2 and 1 (A6)",
      "fact_ids": [
        "A6"
      ],
      "agreement": true
    }
  ],
  "adversarial_checks": [
    {
      "question": "Does closure extend to compositions automatically, or must each composite be re-verified?",
      "verification_performed": "Leaf substitution is a syntactic operation on trees: replacing a leaf 'x' in tree T with a subtree S yields a new tree T' with K(T') = K(T) + K(S) - 1 and whose evaluation at any point is the evaluation of T with x replaced by the value of S there. Therefore given eml-trees for f and g, the tree f(g(...)) is the substitution of the g-tree for the x-leaf in the f-tree. No new correctness obligation arises. The composition witness sin(sqrt(x) + cos(x)) (K=1367) was constructed by substitution and verified numerically at three interior test points with |diff| < 2e-15.",
      "finding": "Composition closure follows directly from leaf substitution; numerical witness corroborates it.",
      "breaks_proof": false
    },
    {
      "question": "MULT(0, y) and MULT(x, 0) evaluate to a tree that contains log(0), which is undefined. Does this invalidate the trees for functions whose domain includes 0?",
      "verification_performed": "The K=17 MULT tree has a removable singularity at xy = 0 (documented in eml-k17-multiplication-tree). Many trees here inherit that singularity: sqrt(1) uses ln(1) = 0 and MULT(1/2, 0); sin(0) = DIV(0, 2i) uses MULT(0, ...); log10(1) = DIV(0, ln(10)); etc. The TRUE function values at those points (1, 0, 0) are finite, so the removable-singularity qualifier matches the standard scientific-calculator domain behaviour (a calculator simply displays the limit value there). We verify numerically only at INTERIOR points (a != 0 for trig, a != 1 for sqrt/log10, |a| < 1 strictly for arcsin/arccos) \u2014 this is the 'where defined by the tree' part of the claim. Closure to the boundary is by continuity of the building blocks, not by direct tree evaluation at the boundary.",
      "finding": "The construction covers all natural-domain interior points. Boundary zeros are removable singularities in agreement with the calculator's displayed value.",
      "breaks_proof": false
    },
    {
      "question": "The inverse-trig formulas (arctan(x) = (i/2) ln((i+x)/(i-x)), arcsin(x) = -i ln(ix + sqrt(1 - x^2))) traverse branch cuts of the complex logarithm. Do the principal-branch choices implicit in eml (which uses cmath.log) match the usual real-valued inverse-trig branches?",
      "verification_performed": "For arctan: at x=1, (i+1)/(i-1) = -i (computed), ln(-i) on the principal branch = -i*pi/2; (i/2) * (-i*pi/2) = pi/4. Matches math.atan(1). Numerical test at x in {-0.5, 0.5, 1.0} agrees with math.atan to < 2e-15. For arcsin: at x=0.5, ix + sqrt(1-x^2) = 0.5i + sqrt(0.75); ln of that = i*pi/6 + ln(|...|); and |...| = 1 (since the identity simplifies to pure phase on the real domain); (-i) * i*pi/6 = pi/6. Matches math.asin(0.5). Numerical test at x in {0.3, 0.5, 0.8, -0.5} agrees with math.asin to < 3e-15.",
      "finding": "Principal-branch log in cmath yields the real-valued inverse trig branch on the natural domain of each function. No hidden branch mismatch.",
      "breaks_proof": false
    },
    {
      "question": "Negation is implemented as MULT(-1, t) because SUB(0, t) requires log_tree(0). Does MULT(-1, t) yield -t for ALL complex t, or only those avoiding the MULT singularity?",
      "verification_performed": "MULT(x, y) = exp(e - ln(xy)) - ln(exp(e - ln(-y)) - ...) (the K=17 construction). Setting x = -1: ln(xy) = ln(-y). For y != 0 complex, cmath.log(-y) is defined on the principal branch. The rest of the K=17 tree is the verified MULT identity. The only exclusion is y = 0, which inherits the MULT-at-0 removable singularity (no different from MULT in general). Numerically: neg_tree(0.5) = -0.5, neg_tree(i) = -i, neg_tree(i*pi/2) = -i*pi/2 \u2014 all verified by construction throughout this proof (e.g. arcsin uses neg_tree(I_tree), which numerically gives -i to within 1e-15).",
      "finding": "Negation via MULT(-1, t) is correct for all t != 0, and the t = 0 exclusion is the same removable-singularity pattern already accepted.",
      "breaks_proof": false
    },
    {
      "question": "Is minimality of any K value claimed? Are the reported K values optimal?",
      "verification_performed": "No minimality is claimed. Reported K values (17 for MULT up to 2683 for tan(arctan(x))) are finite upper bounds from the specific constructions used. Shorter trees may exist for any of these functions. The K=17 multiplication proof includes an exhaustive search confirming K=17 is minimal for MULT; no such exhaustive search was performed for the derived functions here.",
      "finding": "Existence is proved; minimality is open. Upper bounds reported.",
      "breaks_proof": false
    },
    {
      "question": "The claim says 'every elementary function that appears on a standard scientific calculator'. Is the listed set {+, x, /, ^, sin, cos, tan, sqrt, log10, pi, e, i, arcsin, arccos, arctan} sufficient to cover all standard calculator keys?",
      "verification_performed": "A standard scientific calculator (e.g. TI-30, Casio fx-82, Windows Calculator scientific mode) exposes: the four arithmetic ops, negation, squares/cubes/nth-root (reducible to POW), exp/ln/log10/log2 (ln already in the building blocks; log2 = log10/log10(2); log_b x = ln(x)/ln(b) for any b that is an eml-tree), sin/cos/tan and their inverses, hyperbolic functions (sinh(x) = (e^x - e^-x)/2 \u2014 same pattern as sin with i removed; cosh, tanh analogous), factorial (not elementary \u2014 excluded by definition), and the constants pi, e (sometimes i in complex-mode calculators). Every standard-calculator elementary function is a finite composition of {EXP, LN, ARITHMETIC, i, pi} \u2014 all realised here. Non-elementary keys (modular arithmetic, statistics, random-number generation) are outside the elementary-function scope of the claim.",
      "finding": "The listed primitives plus composition generate every elementary function on a scientific calculator. Non-elementary keys are outside the scope of the claim.",
      "breaks_proof": false
    },
    {
      "question": "Could numerical agreement at a small finite set of test points mask a subtle formula error?",
      "verification_performed": "Approximately 70 numerical checks were performed across 13 primitives + 3 constants + 2 closure witnesses, covering multiple values per function (including negative and non-trivial inputs). Max |diff| across all checks is around 7e-15 (double-precision epsilon times a small factor). Random formula errors (e.g. swapped numerator/denominator in arctan, wrong sign in arcsin's sqrt) were caught during development: the initial attempt at arctan(x) = (i/2) ln((i-x)/(i+x)) gave -arctan(x), which was rejected immediately by the test at x=1. The inverse-trio closure check sin(arcsin(0.5)) = 0.5, etc., is an independent cross-check that would fail if either the forward or inverse formula had a hidden error: it passed to < 2e-15 for all three.",
      "finding": "Coverage and the forward-inverse cross-check make a subtle undetected error implausible.",
      "breaks_proof": false
    }
  ],
  "verdict": {
    "value": "PROVED",
    "qualified": false,
    "qualifier": null,
    "reason": null
  },
  "key_results": {
    "primitive_count": 16,
    "numerical_check_count": 50,
    "max_numerical_diff": 1.2269848140086025e-14,
    "composition_K": 1367,
    "composition_max_diff": 1.4906383172222088e-15,
    "inverse_trio_max_diff": 1.9555373935507567e-15,
    "claim_holds": true
  },
  "generator": {
    "name": "proof-engine",
    "version": "1.18.0",
    "repo": "https://github.com/yaniv-golan/proof-engine",
    "generated_at": "2026-04-17"
  },
  "proof_py_url": "/proofs/eml-calculator-closure/proof.py",
  "citation": {
    "doi": "10.5281/zenodo.19635623",
    "concept_doi": "10.5281/zenodo.19626415",
    "url": "https://proofengine.info/proofs/eml-calculator-closure/",
    "author": "Proof Engine",
    "cite_bib_url": "/proofs/eml-calculator-closure/cite.bib",
    "cite_ris_url": "/proofs/eml-calculator-closure/cite.ris"
  },
  "depends_on": [
    {
      "relation": "IsDerivedFrom",
      "identifiers": [
        {
          "type": "slug",
          "value": "the-binary-operator-eml-is-defined-by-the-expression-text-eml-a-b-exp-a-ln-b"
        },
        {
          "type": "doi",
          "value": "10.5281/zenodo.19626393"
        }
      ],
      "note": "eml definition"
    },
    {
      "relation": "IsDerivedFrom",
      "identifiers": [
        {
          "type": "slug",
          "value": "the-binary-operator-defined-by-text-eml-a-b-exp-a-ln-b-satisfies-text-eml-x-1"
        },
        {
          "type": "doi",
          "value": "10.5281/zenodo.19626399"
        }
      ],
      "note": "EXP identity eml(x,1)=exp(x)"
    },
    {
      "relation": "IsDerivedFrom",
      "identifiers": [
        {
          "type": "slug",
          "value": "eml-triple-nesting-recovers-ln-x"
        },
        {
          "type": "doi",
          "value": "10.5281/zenodo.19626401"
        }
      ],
      "note": "LN identity from K=7 triple nesting"
    },
    {
      "relation": "IsDerivedFrom",
      "identifiers": [
        {
          "type": "slug",
          "value": "eml-k19-addition-tree"
        },
        {
          "type": "doi",
          "value": "10.5281/zenodo.19626406"
        }
      ],
      "note": "Addition via K=19 eml tree"
    },
    {
      "relation": "IsDerivedFrom",
      "identifiers": [
        {
          "type": "slug",
          "value": "eml-k17-multiplication-tree"
        },
        {
          "type": "doi",
          "value": "10.5281/zenodo.19626409"
        }
      ],
      "note": "Multiplication via K=17 eml tree"
    },
    {
      "relation": "IsDerivedFrom",
      "identifiers": [
        {
          "type": "slug",
          "value": "eml-pi-and-i-from-1"
        },
        {
          "type": "doi",
          "value": "10.5281/zenodo.19626411"
        }
      ],
      "note": "\u03c0 and i from constant 1"
    },
    {
      "relation": "References",
      "identifiers": [
        {
          "type": "arxiv",
          "value": "2603.21852"
        }
      ],
      "note": "Originating paper"
    }
  ]
}