Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions research/integer-carrier-height/PREDECESSOR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"repository": "CrocSwap/integer-mult-bounds",
"pull_request": 5787,
"commit": "08f0e5899254aa82288a91e70789049dc1f29690",
"author": "Richard Hoekstra",
"files": [
{
"retained_path": "retained/PROOF.md",
"origin_path": "research/pr5413-carrier-frontier/PROOF.md",
"git_blob": "5a1148d936dc6c1783fc2f993306697b1f5af7a5",
"sha256": "7e6dbcd2937601b107de31c1c2f64be886a4dde6741a30b7cc99bd59cc5528c8"
},
{
"retained_path": "retained/frontier.py",
"origin_path": "research/pr5413-carrier-frontier/frontier.py",
"git_blob": "8781900ee63d1e6191b382385733212784cd2686",
"sha256": "2d1837eed6e828298f4e02ca9105ed4595b2d305354477e42b97fb3ad20d27fc"
}
]
}
99 changes: 99 additions & 0 deletions research/integer-carrier-height/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# The minimum integer height of the fixed logarithmic guard

New proof produced by Nick Petalas. Apache-2.0.

## Statement and provenance

Fix p=322 and d=1/700000000000. For positive integer H, consider

(H+1)^p < 2^(d H). (1)

The minimum such H is

H* = 12040587444441491.

Every integer H>=H* satisfies (1), and every positive integer H<H* fails
it. The separate side condition H>8*1024 holds at H*.

Richard Hoekstra's PR #5787, head
08f0e5899254aa82288a91e70789049dc1f29690, supplies this guard through the
logarithmic majorant in retained/PROOF.md sections 2 and 3. Its fixed-kappa
case in retained/frontier.py has p=322, tested saving .003027288245 and
declared saving .003027288235. Its rule d=(s-k)/7 gives the d above.
It supplies sufficient grid height 12040700000000000 and expressly does
not claim the minimum integer height. Those source statements are premises
for the compiler interpretation, not new results proved in this package.

## Why two adjacent comparisons settle the whole domain

For real x>0 put r(x)=ln(1+x)/x. Differentiation gives

r'(x) = [x/(1+x) - ln(1+x)]/x^2 < 0.

The strict sign follows directly from

ln(1+x) = integral_0^x 1/(1+t) dt > x/(1+x).

Taking logarithms in (1) and dividing by H shows that (1) holds exactly
when r(H)<d ln(2)/p. Therefore the passing set is an upper interval.
It suffices to prove strict failure at H*-1 and strict success at H*.
There is no enumeration of the roughly 10^16 preceding heights and no
assumption that a sparse grid contains the first passing integer.

Define D(H)=d H-p log2(H+1). The exact checks prove

-36/10^15 < D(H*-1) < -35/10^15,
1354/10^15 < D(H*) < 1355/10^15.

Both brackets lie strictly on the required side of zero. Thus the
monotonicity argument proves the statement for every positive integer H.

## Primary rational logarithm enclosure

For a positive integer n, choose k=floor(log2 n), determined by its binary
length, and a=n/2^k in [1,2). Then

log2 n = k + ln(a)/ln(2).

For any rational a in [1,2], let z=(a-1)/(a+1), so 0<=z<=1/3. For N=80,

S_N = 2 sum_{j=0}^{N-1} z^(2j+1)/(2j+1),
0 <= ln(a)-S_N <= 2 z^(2N+1)/[(2N+1)(1-z^2)].

This follows from the convergent positive odd-power series and the
geometric upper bound on its tail. All terms and endpoints are exact
fractions. Endpoints are rounded outwards to multiples of 2^-220 by
integer floor and ceiling. Since the enclosure of ln(2) is strictly
positive, dividing the numerator's lower bound by the denominator's upper
bound, and conversely for the upper bound, preserves containment. A final
outward rounding preserves it again. Multiplication by p and subtraction
from d H produce the certified margin intervals.

The executable checks compare their signs with exact integer inequalities
(H+1)^(p q) versus 2^H for H=1..64, p=1..4 and q=1..4, where d=1/q.
These 1024 cases include equality and both strict signs. They corroborate
the enclosure implementation; the series argument supplies its proof.

## Separately implemented enclosure

independent.py imports no primary checker or predecessor code. It uses the
alternating series for ln(1+x) with 256 terms. For 0<=x<=1/2 the even
partial sum is a lower bound, and adding x^257/257 is an upper bound.
It computes ln(2)=ln(3/2)+ln(4/3). For normalized a>3/2 it uses
ln(a)=ln(2a/3)+ln(3/2), so every series argument remains in [1,3/2].
It proves the same two strict signs using exact fractions, without sharing
the positive-series tail or dyadic rounding implementation.

## Improvement and limits

The difference from the cited sufficient grid height is exactly
112555558509. This improves the isolated logarithmic guard at fixed p and
d. It is not another evaluation of a paid-moment root or a review of the
predecessor's complete application.

The result does not establish that the complete source compiler can be
instantiated at N=2^H*. In particular the changed finite-template counts,
precision and conjunction application, integer layout and physical
implementation need their own proof at that N. All source assumptions
remain. No global compiler optimum, complete multiplication theorem or
new kappa is claimed.
135 changes: 135 additions & 0 deletions research/integer-carrier-height/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Exact integer height for a logarithmic compiler guard

Scoped mathematical proof, produced by Nick Petalas. Apache-2.0.

For the fixed guard in Richard Hoekstra's
[PR #5787](https://github.com/CrocSwap/integer-mult-bounds/pull/5787),

```text
(H+1)^322 < 2^(H/700000000000), H a positive integer,
```

the minimum height is exactly **12040587444441491**. Every larger integer
height passes, and every smaller positive integer height fails. This is
**112555558509** below the cited sufficient grid height 12040700000000000.
The separate guard H>8192 also holds.

The new step removes the restriction H=ceil(j/d) for this inequality. It
does not audit the predecessor's complete caller, or claim that its full
application has already been instantiated at the smaller height. The
selected frontier and kappa do not change.

## Proof and evidence

[PROOF.md](PROOF.md) proves that ln(1+H)/H strictly decreases for H>0.
Consequently exact opposite signs at two adjacent integers settle the
entire positive integer domain. For D(H)=H/700000000000-322 log2(H+1),
the checker proves the rational brackets

```text
-36/10^15 < D(12040587444441490) < -35/10^15
1354/10^15 < D(12040587444441491) < 1355/10^15
```

verify.py uses an exact positive odd-power logarithm series and outward
dyadic rounding. independent.py uses a separately implemented alternating
Mercator series and imports no primary or predecessor executable.

Local CPython 3.12.15 warning-strict checks pass both adjacent comparisons,
1024 small exact integer-power comparisons, 65 exact power-of-two logarithms
and 17 rejection controls. These are finite checks supporting the written
all-height proof. They are not proof-kernel or independent human review.

## Reproduce

From the repository root:

```sh
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/integer-carrier-height/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/integer-carrier-height/independent.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/integer-carrier-height
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/integer-carrier-height --check-source-history
```

Any CPython 3.12 interpreter can replace the local executable path. The
standalone scripts use only the standard library and work without Git.
An optional `verify.py --receipt /absolute/output/path` writes a generated
receipt binding every package file's SHA256. Ordinary checks write nothing.

Expected markers:

```text
PASS_INTEGER_CARRIER_HEIGHT minimum=12040587444441491 reduction=112555558509 small_exact=1024 controls=13
PASS_INDEPENDENT_INTEGER_HEIGHT minimum=12040587444441491 adjacent_signs=2 exact_powers=65 controls=4
```

## Sources and credit

Richard Hoekstra's PR #5787 at exact head
08f0e5899254aa82288a91e70789049dc1f29690 supplies the fixed parameters,
the complete paid-tail application and the explicit unclaimed integer-height
boundary. Its PROOF.md and frontier.py are retained verbatim in retained/.
[PREDECESSOR.json](PREDECESSOR.json) records their origin paths, Git blobs
and SHA256 hashes. They were retrieved from the repository contents API at
that exact head. The checker verifies both hashes and source parameter
literals, but never executes the predecessor code or reruns its result.
Retaining these two interface sources makes replay independent of an
unmerged commit's availability. The source-history preflight separately
checks the ancestor provenance in SOURCES.json.

The source retains zxv's logarithmic compiler, Jacob Alan Sussman's mixed
flow, Chris R/Clear1nsight's #5413 caller and exact arithmetic, Dillon
Amburgey's provider, Ali Romman's controller, Cao Yifan's native word,
Cinna Davis's helper/product lineage and their cumulative notices.
The new integer-height theorem and checkers are produced by Nick Petalas.
Independent human and formal proof-kernel review are unclaimed.

The upstream checkpoint is de5ec2e7a6074068452f45b1a191b5c72832df4a,
priority revision 8. TASK.json records the changed scope from an audit card
to original parameter optimization, the overlap limits and next question.
The [advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19217785)
states the same guard-only scope.

## Limitations

This proves the exact threshold of one fixed logarithmic inequality. It
does not minimize over p, d, compiler geometries, paid profiles or suppliers.
The full changed-height finite-template, precision, conjunction, layout and
physical implementation obligations remain open. No predecessor supplier
replay, selected cold replay, Lean build or complete multiplication theorem
is supplied. No scientific obligation is delegated to CI alone.

The new checkers use managed Python fractions. Their fixed series lengths,
64-bit height domain, fixed small control domains and at-most-32-file receipt
inventory bound the work. Runtime allocation remains a managed-language
deviation from Power of Ten's static-storage rule. No recursion, dynamic
code execution, numerical logarithm library or optimization-sensitive Python
assertion is used in the new checkers. Retained code is an immutable cited
source and is not executed.

## Open next questions

Can the full PR #5787 finite-template and precision application be instantiated
at this exact height? Start by deriving its height-dependent counts,
rounding, precision and conjunction guards at H=12040587444441491, with every
paid tail retained. A complete changed-N application and any required layout
integrality are missing. This package's logarithmic threshold alone does
not settle those obligations.

## Related open work

- [#5787](https://github.com/CrocSwap/integer-mult-bounds/pull/5787) supplies
the complete #5413 carrier application and sufficient grid height. This
package proves the minimum integer height for its fixed logarithmic guard.
- [#5899](https://github.com/CrocSwap/integer-mult-bounds/pull/5899) determines
a different PR5756 tail-gate block-length threshold. It does not compute
this #5413 integer-height guard, and is not a predecessor of this result.

Merged PRs #5462 and #5468 refine the #5413 saving and its gap-parametric
precision. They retain sufficient height grids and do not compute this
fixed guard's minimum integer height. This package changes neither result.

## CI notes

Hosted replay is pending. All registered scientific commands run locally;
no hosted scientific pass is claimed in advance.
18 changes: 18 additions & 0 deletions research/integer-carrier-height/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schema_version": 1,
"base_commit": "de5ec2e7a6074068452f45b1a191b5c72832df4a",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "581f8d87008354eb5b869f7ed9de1317ad837ce8",
"sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
}
]
}
Loading
Loading