diff --git a/research/mixed-rank-touching-envelope/EXAMPLE.json b/research/mixed-rank-touching-envelope/EXAMPLE.json new file mode 100644 index 0000000000..5657901c04 --- /dev/null +++ b/research/mixed-rank-touching-envelope/EXAMPLE.json @@ -0,0 +1,24 @@ +{ + "schema": "synchronized-invoice-envelope/v1", + "old": { + "schema": "integer-mult-recursive-invoice/v1", + "contract": { + "model": "synthetic signed power invoice", + "boundary": "arithmetic example; no physical supplier", + "rank_semantics": "H_r costs r^t" + }, + "paid": {"4": 3, "9": 2, "7": 11}, + "targets": {"5": 13} + }, + "new": { + "schema": "integer-mult-recursive-invoice/v1", + "contract": { + "model": "synthetic signed power invoice", + "boundary": "arithmetic example; no physical supplier", + "rank_semantics": "H_r costs r^t" + }, + "paid": {"1": 6, "36": 1, "7": 11}, + "targets": {"5": 13} + }, + "certificate": {"bases": [2, 3], "p": 1, "q": 2, "scale": 1, "offset": 0} +} diff --git a/research/mixed-rank-touching-envelope/PROOF.md b/research/mixed-rank-touching-envelope/PROOF.md new file mode 100644 index 0000000000..da979b3ae5 --- /dev/null +++ b/research/mixed-rank-touching-envelope/PROOF.md @@ -0,0 +1,121 @@ +# Sharp synchronized mixed-rank invoice envelopes + +Let m be a positive even integer, let a_1,...,a_m be integers greater than +one, let p,q be integers with 0
0 and epsilon>=0 be real. +Define + +```text +D(t) = epsilon + lambda product_(i=1)^m (a_i^(q t) - a_i^p). +``` + +Then D has global minimum epsilon on the whole real line. Its unique minimizer +is t=p/q, which lies inside (0,1). If epsilon=0, its only real zero has exactly +m-fold multiplicity. If epsilon>0, D is strictly positive everywhere. + +## Proof + +Each factor is strictly increasing. It vanishes exactly at p/q, is negative +below p/q, and is positive above p/q. All m factors therefore have the same +nonzero sign away from p/q. Their product is positive because m is even. +At p/q the product vanishes. Positivity of lambda proves both the minimum +and its unique location. + +The derivative of the i-th factor at p/q is +q log(a_i) a_i^p>0. Its zero is simple. The product of m analytic functions +with simple zeros at the same point has a zero of exact multiplicity m. +Adding a positive epsilon removes all zeros, while leaving the minimizer +and the sharp lower envelope unchanged. This proves every claim. + +## Exact signed invoices + +Suppose lambda and epsilon are nonnegative integers, with lambda positive. +Expansion gives + +```text +D(t) = epsilon + lambda sum_(S subset {1,...,m}) + (-1)^(m-|S|) (product_(i not in S) a_i^p) + (product_(i in S) a_i^q)^t. +``` + +All ranks and signed coefficients are integers. Equal subset products must be +combined before comparison. No independence or distinctness of the bases is +assumed. Put positive coefficients into the new paid histogram and negated +negative coefficients into the old paid histogram. This realizes the signed +difference as two nonnegative integer invoices. More generally, the checker +accepts any placement in paid and target histograms whose full net difference +is this polynomial. Identical arbitrary paid and target charges on both sides +cancel. This is arithmetic realization, not a physical construction. + +For rational positive lambda and nonnegative epsilon, clearing their common +denominator gives the same integer-certificate form with the correspondingly +scaled envelope. The executable accepts the integer form only. + +## First mixed-rank example + +For m=2, a_1=2, a_2=3, p=1 and q=2, + +```text +6 - 3*4^t - 2*9^t + 36^t = (4^t-2)(9^t-3) >= 0. +``` + +Equality holds only at t=1/2 and has exact multiplicity two. Thus the seven-job +invoice 6 H1 + H36 costs at least the five-job invoice 3 H4 + 2 H9 for every +power tariff, with equality at sqrt-rank pricing. Adding one H1 to the former +gives sharp minimum gap one for every real t. Swapping the invoices reverses +the ordering, but is not claimed to implement a cheaper physical circuit. + +The ranks 4 and 9 are not powers of a common integer greater than one, since +that integer would have a prime divisor dividing both ranks. This supplies a +genuinely mixed-rank example. There are two coefficient sign changes, and +neither endpoint is zero. A closure rule using simple interior witnesses alone +cannot spend a two-root budget on this double zero. The factor certificate +supplies its multiplicity directly. This is an implication from the documented +certificate rules in #5788, not a replay or audit of its implementation. + +With two distinct prime bases a,b, arbitrary 0
1 and 0
0 and epsilon>=0,
+
+```text
+epsilon + lambda product_i (a_i^(q t) - a_i^p)
+```
+
+has sharp global minimum epsilon, attained uniquely at t=p/q. At epsilon=0,
+the unique zero has exact multiplicity m. The written [proof](PROOF.md) covers
+all real t and arbitrary finite even m. This is a **scoped algebraic proof**,
+with finite executable corroboration. It is an arithmetic side result, with
+no physical construction or new kappa claim.
+
+The first example is
+
+```text
+6 H1 + H36 - 3 H4 - 2 H9
+ = (4^t-2)(9^t-3) >= 0,
+```
+
+where H_r costs r^t. Equality holds only at t=1/2 and is a double zero. Adding
+one H1 makes the sharp minimum gap one. Ranks 4 and 9 have no common integer
+base. This resolves the touching-point obligation for this explicit infinite
+family without numeric root isolation or exhaustion of a global root budget.
+
+## Scope and predecessors
+
+The question is the touching-root continuation in Ali Romman's
+[#5788](https://github.com/CrocSwap/integer-mult-bounds/pull/5788), pinned at
+`56565b9aec29203bddb14f5d0e76a657d7090699`. Its
+[proof and limitation](https://github.com/aliromman/integer-mult-bounds/blob/56565b9aec29203bddb14f5d0e76a657d7090699/docs/research/recursive-power-variation.md)
+are cited, not audited or replayed. Credit zxv for signed-invoice accounting,
+mightyOil for the moment-order context, and woklerx for the specialized
+crossing predecessor. Elementary factorization and calculus retain their
+classical status; no literature priority is claimed for those methods.
+
+This changes the `independent-moment` card from checking an existing supplier
+to constructing a new exact invoice family and certificate. The card's first
+selected-baseline binding command passed; no scientific predecessor replay
+was run. [TASK.json](TASK.json) records the changed scope and source URL.
+[SOURCES.json](SOURCES.json) binds the revision-8 catalogue and selected record
+as historical provenance, with no live mathematical predecessor dependency.
+
+The complete signed difference is new paid minus new targets minus old paid
+plus old targets. `envelope.py` requires equal declared contracts and exact
+agreement with an independently supplied sparse factor certificate. Equal
+subset-product ranks are combined, including repeated bases. The executable
+reports the sharp envelope only after this identity check. Matching contract
+text does not prove a source-to-circuit interpretation.
+
+## Reproduce
+
+From the repository root, with CPython 3.12 and the standard library:
+
+```sh
+/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/mixed-rank-touching-envelope/verify.py
+/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -O -W error -B research/mixed-rank-touching-envelope/verify.py
+/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/mixed-rank-touching-envelope
+/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/mixed-rank-touching-envelope --check-source-history
+```
+
+The first two commands print a generated JSON receipt with package/input hashes,
+then `PASS_MIXED_RANK_TOUCHING_ENVELOPE`. They enumerate 696 factor contexts,
+4,176 certificates, 49,944 expanded support entries and 23,472 exact
+rational-power evaluations, with 26 rejection or mathematical failure controls.
+Two-factor contexts use every ordered pair of bases in 2..7, q in 2..5 and
+1<=p