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
102 changes: 102 additions & 0 deletions formal/MOMENT_TAIL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Actual moment-to-event-tail composition

Scientific effect: NONE. Dylan Roy — delegated AI work; actual performer OpenAI /
GPT-6 Astra Pro, 2026-10-05. This is an additive successor to the frozen 29-target
package in Math-#273, not a claim that the stack is merged or this new scope aligned.

## Source identity and design

Consumed predecessor: `d6g8k5htny-coder/Math-` at
`dce1b197be3431673289905259be38b450e9b898`. The original four Lean modules, all
29 theorem statements/proofs, gate and toolchain remain unchanged.
`WeightedLaw.lean` SHA256 is
`f31dfd2cd048cc0c0446c54c46d89c9cdd5d7bb9d76e9d8d16b7c034f351d736`.

The scalar P02-LM-009 source is the preserved fifth-power threshold, exponent40
identity and fourth-to-cubic ledger in `formal/ResearchFormalCoreR1/ProbabilityCompanionsV2.lean`
at that predecessor, SHA256
`338452a0c2ba24d016059354d543cc995b8cb29c9d4a41d98bb93499f5f8cb8f`.
The actual measure inequality is mathlib's
`MeasureTheory.mul_meas_ge_le_integral_of_nonneg` in
`Mathlib/MeasureTheory/Integral/Bochner/Basic.lean`, pinned mathlib
`d13f23b723b8a846827a245b89c10fc7d3f11612`; Lean remains v4.34.1.
This note gives a new explicit composition of those statements. It does not claim
a recovered full P02-LM-009 probability proof or a Gaussian supremum theorem.

## Exact derivation

For positive r and epsilon, define A = {x : epsilon < r R(x)^5}.
Its measurable-set property is proved from Measurable R. On A,

0 < epsilon/r < R^5, hence (epsilon/r)^8 <= R^40.

A genuinely integrable fortieth power with integral at most M gives, by Markov,

mu(A) <= M / (epsilon/r)^8 = (M/epsilon^8) r^8.

No nonnegativity of R is needed: membership in A supplies the positive threshold;
the fortieth power is nonnegative everywhere. Strict-boundary and negative-R
examples are tested. The generic Markov lemma is on a finite measure, not only
a probability; finite measure makes conversion of event masses to real numbers
monotone without turning an infinite mass into zero.

If the same probability measure and weight additionally satisfy W in L2,
W >= 0 almost everywhere, integral W^2 <= cW r^4, and cZ r^2 <= integral W,
with cW >= 0 and cZ > 0, the already constructed weighted probability law obeys

P_W(A) <= C r^4, C = (sqrt(cW)/cZ) sqrt(M/epsilon^8).

On 0 < r <= 1 this implies P_W(A) <= C r^3. Probability of P_W is proved as
part of each conclusion. W may depend arbitrarily on R and A; no independence
or replacement of a conditioned law by another law is introduced.

## Seven new audited targets (36 total)

| Suffix in ResearchFormalCoreR1 | Exact coverage |
|---|---|
| p02_lm009_markov_event | Event-contained-in-threshold Markov bound under actual integrability/nonnegativity and finite measure. |
| p02_lm009_badJet_measurable | Measurability of the strict bad event. |
| p02_lm009_badJet_subset | Event implies the fortieth-power threshold, including signed R. |
| p02_lm009_moment40_tail | Supplied integral fortieth-moment bound yields the actual eighth-order event tail. |
| p02_lm009_moment40_weighted_r4 | Actual weighted-law probability property and the stronger fourth-order bound. |
| p02_lm009_moment40_weighted_r3 | Cubic consequence on 0 < r <= 1. |
| p02_lm009_moment40_family_r3 | A single nonnegative C for 0 < r <= r0, only from uniformly supplied family premises with 0 < r0 <= 1. |

The family theorem explicitly quantifies possibly different mu_r,W_r,R_r under a
common measurable space, with the SAME mu_r for every moment/normalizer/event
at each r. M,cW,cZ,epsilon are fixed outside the r quantifier. It does not deduce
uniformity from unrelated pointwise constants. The witness C is displayed above.

## Retained open obligations

The input moment bound M, the weight second-moment bound, lower normalizer,
measurability/model construction and their constant uniformity must still be
proved for the concrete Gaussian field and typed Palm interpretation. No bound
on a derivative supremum, GT5 repair, Kac-Rice identification, full good event,
P0.2 or parent persistence theorem is supplied. The bad event here is exactly
one strict scalar threshold, not every component of the program's good event.
The older modules' exclusion notes remain true descriptions of those modules;
this new module supplies only the explicit moment-to-event implication.

## Verification and audit

The unchanged gate must build/recheck/audit all36 targets and its five existing
negative controls. A proof file or Python pass is not a kernel receipt. Twelve
focused tests include243 exact finite tail cases and972 weighted-event cases.
Countermodels expose omission of epsilon^-8, substitution of the20th for40th
moment, an incorrect r^16 rate, and strict-boundary/null-atom cases. They are
falsification checks, not continuum proof or an independent alignment review.
The prior weighted-law test now binds precisely targets20:29; the extension
binds targets29:36 and total36, with the unchanged gate still enforcing complete
source inventory. Every old proof byte remains frozen. Any successful audit
must state actual identity/exposure and exact new manifest/scope, not silently
transfer a previous29-target review to36 targets.

## Initial compiler readback

The first hosted run37315764990 failed before kernel evidence. The threshold
subset proof needed an explicit `change` from set membership to its inequality
goal; a `simpa only` list did not reduce that membership. The compiler-only
repair states this goal explicitly and removes a redundant `ring` after
`field_simp`. Every theorem type is unchanged. The original output is preserved
in `evidence/moment-tail-initial-build-failure.log`; it is not a success receipt.
6 changes: 5 additions & 1 deletion formal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cd ..
python formal/gate.py --execute
```

The source-only command does not run Lean. The execute command fails unless the pinned project builds, `leanchecker` rechecks the package, all 29 declarations have transitive axiom reports restricted to propext/Classical.choice/Quot.sound, and five executable negative controls are rejected. It writes logs and a receipt in `.lake/formal-evidence/`; the workflow uploads them even on failure. A receipt from arbitrary input is not trusted evidence: use the successful read-only workflow and checked Git commit.
The source-only command does not run Lean. The execute command fails unless the pinned project builds, `leanchecker` rechecks the package, all 36 declarations have transitive axiom reports restricted to propext/Classical.choice/Quot.sound, and five executable negative controls are rejected. It writes logs and a receipt in `.lake/formal-evidence/`; the workflow uploads them even on failure. A receipt from arbitrary input is not trusted evidence: use the successful read-only workflow and checked Git commit.

Sources: [scope](SCOPE.md), [glossary](GLOSSARY.md), [manifest](manifest.json), [blueprint source](blueprint/src/content.tex). The original GP-FOR-192 bytes are preserved under originals/*.lean.txt; separately named V2 companions carry the documented compiler-only repairs in [COMPATIBILITY.md](COMPATIBILITY.md). No historical Status.lean or claimed status is imported. [Alignment contract](SCOPE.md#review-contract) remains distinct from kernel evidence.

Expand All @@ -30,6 +30,10 @@ The additive [MeasureBridge](MEASURE_BRIDGE.md) contributes five same-law measur

The additive [WeightedLaw](WEIGHTED_LAW.md) contributes nine declarations. It constructs the normalized nonnegative density measure, proves total mass one and the event-ratio identity, and applies the retained transfer bounds to its actual event probabilities. It also proves absolute continuity, almost-everywhere invariance, and zero/unit-weight controls. The original 20 theorem statements and proofs are unchanged; concrete Palm-model identification and field estimates remain separate.

## Moment-to-tail composition

The additive [MomentTail](MOMENT_TAIL.md) contributes seven declarations. It proves the actual Markov step from an integrable fortieth-moment bound to the strict fifth-power event's eighth-order probability bound, then the constructed weighted law's fourth-order and cubic bounds. A family theorem supplies one constant only when the model premises are explicitly uniform. Concrete Gaussian/Palm moments and normalizers are not proved by this implication.

## Next agents

Read the current source-bound PR and exact head first; main #95 is historical rollout context. A non-OpenAI alignment reviewer should inspect all assumptions, the source correspondence and the explicit nonclaims. An independent engineering reviewer should attack omitted targets, imports carrying custom axioms, stale scope/hash/review records and altered toolchains. A probability formalizer should next identify the constructed weighted law with the concrete typed Palm model and discharge its same-law moment/lower-normalizer interface. Do not import GP214's upper bound as the lower bound. The MeasureBridge source is supplied but has no self-awarded kernel or alignment status. Coordinate before editing; a review request is not a claim that a reviewer is active.
Expand Down
1 change: 1 addition & 0 deletions formal/ResearchFormalCoreR1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ import ResearchFormalCoreR1.AlgebraV2
import ResearchFormalCoreR1.ProbabilityCompanionsV2
import ResearchFormalCoreR1.MeasureBridge
import ResearchFormalCoreR1.WeightedLaw
import ResearchFormalCoreR1.MomentTail
151 changes: 151 additions & 0 deletions formal/ResearchFormalCoreR1/MomentTail.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
import ResearchFormalCoreR1.WeightedLaw

/-!
# From a genuine fortieth moment to a weighted bad-event bound

This module supplies Markov's measure-theoretic step. It does not prove a
fortieth-moment estimate for a Gaussian jet, or a concrete Palm normalizer.
All law/weight/jet objects and uniform family premises remain explicit.
-/

namespace ResearchFormalCoreR1

open MeasureTheory
open scoped ENNReal

set_option autoImplicit false

variable {Ω : Type*} [MeasurableSpace Ω]

/-- The exact strict threshold event used by the fifth-power jet ledger. -/
def badJetEvent (R : Ω → ℝ) (r ε : ℝ) : Set Ω :=
{x | ε < r * R x ^ 5}

/-- Markov for any event contained in a positive superlevel set, on a finite
measure. Integrability prevents totalized divergent integrals from being used. -/
theorem p02_lm009_markov_event
(μ : Measure Ω) [IsFiniteMeasure μ] (Y : Ω → ℝ) (A : Set Ω)
(hY : Integrable Y μ) (hY0 : 0 ≤ᵐ[μ] Y)
(a : ℝ) (ha : 0 < a) (hsub : A ⊆ {x | a ≤ Y x}) :
(μ A).toReal ≤ (∫ x, Y x ∂μ) / a := by
have hm : (μ A).toReal ≤ (μ {x | a ≤ Y x}).toReal :=
ENNReal.toReal_mono (by finiteness) (measure_mono hsub)
have hmarkov := mul_meas_ge_le_integral_of_nonneg hY0 hY a
apply (le_div_iff₀ ha).2
calc
(μ A).toReal * a = a * (μ A).toReal := by ring
_ ≤ a * (μ {x | a ≤ Y x}).toReal := mul_le_mul_of_nonneg_left hm ha.le
_ ≤ ∫ x, Y x ∂μ := by simpa only [measureReal_def] using hmarkov

/-- Actual measurability of the bad event from measurability of the jet norm. -/
theorem p02_lm009_badJet_measurable
(R : Ω → ℝ) (hR : Measurable R) (r ε : ℝ) :
MeasurableSet (badJetEvent R r ε) := by
unfold badJetEvent
exact measurableSet_lt measurable_const (by fun_prop)

/-- The event itself implies the needed positive fifth-power threshold, even
for signed R; no global sign assumption on R is necessary. -/
theorem p02_lm009_badJet_subset
(R : Ω → ℝ) (r ε : ℝ) (hr : 0 < r) (hε : 0 < ε) :
badJetEvent R r ε ⊆ {x | (ε / r) ^ 8 ≤ R x ^ 40} := by
intro x hx
change ε < r * R x ^ 5 at hx
change (ε / r) ^ 8 ≤ R x ^ 40
have ht := p02_lm009_bad_event_threshold r (R x) ε hr hx
have hp := pow_le_pow_left₀ (le_of_lt (div_pos hε hr)) ht.le 8
simpa only [p02_lm009_power40_identity] using hp

/-- A supplied integrable fortieth-moment bound gives the actual eighth-order
event tail, with the exact epsilon denominator and no independence hypothesis. -/
theorem p02_lm009_moment40_tail
(μ : Measure Ω) [IsProbabilityMeasure μ] (R : Ω → ℝ)
(r ε M : ℝ) (hr : 0 < r) (hε : 0 < ε)
(hRi : Integrable (fun x => R x ^ 40) μ)
(hMbound : (∫ x, R x ^ 40 ∂μ) ≤ M) :
(μ (badJetEvent R r ε)).toReal ≤ (M / ε ^ 8) * r ^ 8 := by
have hnonneg : 0 ≤ᵐ[μ] (fun x => R x ^ 40) := by
apply Filter.Eventually.of_forall
intro x
positivity
have ha : 0 < (ε / r) ^ 8 := pow_pos (div_pos hε hr) 8
calc
(μ (badJetEvent R r ε)).toReal ≤ (∫ x, R x ^ 40 ∂μ) / (ε / r) ^ 8 :=
p02_lm009_markov_event μ (fun x => R x ^ 40) (badJetEvent R r ε)
hRi hnonneg ((ε / r) ^ 8) ha (p02_lm009_badJet_subset R r ε hr hε)
_ ≤ M / (ε / r) ^ 8 := div_le_div_of_nonneg_right hMbound ha.le
_ = (M / ε ^ 8) * r ^ 8 := by
field_simp [ne_of_gt hr, ne_of_gt hε]

/-- The constructed weighted probability law satisfies the stronger fourth-
order tail. The model's moment and positive lower-normalizer bounds are premises. -/
theorem p02_lm009_moment40_weighted_r4
(μ : Measure Ω) [IsProbabilityMeasure μ] (W R : Ω → ℝ)
(hW : MemLp W 2 μ) (hW0 : 0 ≤ᵐ[μ] W) (hR : Measurable R)
(r ε M cW cZ : ℝ) (hr : 0 < r) (hε : 0 < ε)
(hM : 0 ≤ M) (hcW : 0 ≤ cW) (hcZ : 0 < cZ)
(hRi : Integrable (fun x => R x ^ 40) μ)
(hMbound : (∫ x, R x ^ 40 ∂μ) ≤ M)
(hsecond : (∫ x, W x ^ 2 ∂μ) ≤ cW * r ^ 4)
(hlower : cZ * r ^ 2 ≤ ∫ x, W x ∂μ) :
IsProbabilityMeasure (weightedLaw μ W) ∧
(weightedLaw μ W (badJetEvent R r ε)).toReal ≤
((Real.sqrt cW / cZ) * Real.sqrt (M / ε ^ 8)) * r ^ 4 := by
have hA := p02_lm009_badJet_measurable R hR r ε
have ht := p02_lm009_moment40_tail μ R r ε M hr hε hRi hMbound
have hK : 0 ≤ M / ε ^ 8 := by positivity
have hs : Real.sqrt ((μ (badJetEvent R r ε)).toReal) ≤
Real.sqrt (M / ε ^ 8) * r ^ 4 := by
calc
_ ≤ Real.sqrt ((M / ε ^ 8) * r ^ 8) := Real.sqrt_le_sqrt ht
_ = _ := by
rw [Real.sqrt_mul hK]
rw [show r ^ 8 = (r ^ 4) ^ 2 by ring, Real.sqrt_sq (pow_nonneg hr.le 4)]
obtain ⟨hp, hb⟩ := p02_lm008_probability_transfer μ W (badJetEvent R r ε)
hW hW0 hA r cW cZ hr hcW hcZ hsecond hlower
refine ⟨hp, hb.trans ?_⟩
calc
_ ≤ (Real.sqrt cW / cZ) * (Real.sqrt (M / ε ^ 8) * r ^ 4) :=
mul_le_mul_of_nonneg_left hs (by positivity)
_ = _ := by ring

/-- Cubic consequence on the explicit domain 0 < r ≤ 1. -/
theorem p02_lm009_moment40_weighted_r3
(μ : Measure Ω) [IsProbabilityMeasure μ] (W R : Ω → ℝ)
(hW : MemLp W 2 μ) (hW0 : 0 ≤ᵐ[μ] W) (hR : Measurable R)
(r ε M cW cZ : ℝ) (hr : 0 < r) (hr1 : r ≤ 1) (hε : 0 < ε)
(hM : 0 ≤ M) (hcW : 0 ≤ cW) (hcZ : 0 < cZ)
(hRi : Integrable (fun x => R x ^ 40) μ)
(hMbound : (∫ x, R x ^ 40 ∂μ) ≤ M)
(hsecond : (∫ x, W x ^ 2 ∂μ) ≤ cW * r ^ 4)
(hlower : cZ * r ^ 2 ≤ ∫ x, W x ∂μ) :
IsProbabilityMeasure (weightedLaw μ W) ∧
(weightedLaw μ W (badJetEvent R r ε)).toReal ≤
((Real.sqrt cW / cZ) * Real.sqrt (M / ε ^ 8)) * r ^ 3 := by
obtain ⟨hp, hb⟩ := p02_lm009_moment40_weighted_r4 μ W R hW hW0 hR
r ε M cW cZ hr hε hM hcW hcZ hRi hMbound hsecond hlower
exact ⟨hp, p02_lm009_palm_r4_to_r3 _ _ r (by positivity) hr.le hr1 hb⟩

/-- A uniform family conclusion only when all law-specific bounds are supplied
uniformly. This proves the quantifier assembly, not the existence of model bounds. -/
theorem p02_lm009_moment40_family_r3
(μ : ℝ → Measure Ω) [∀ r, IsProbabilityMeasure (μ r)]
(W R : ℝ → Ω → ℝ) (r0 ε M cW cZ : ℝ)
(hr0 : 0 < r0 ∧ r0 ≤ 1) (hε : 0 < ε)
(hM : 0 ≤ M) (hcW : 0 ≤ cW) (hcZ : 0 < cZ)
(hdata : ∀ r, 0 < r → r ≤ r0 →
MemLp (W r) 2 (μ r) ∧ (0 ≤ᵐ[μ r] W r) ∧ Measurable (R r) ∧
Integrable (fun x => R r x ^ 40) (μ r) ∧
(∫ x, R r x ^ 40 ∂(μ r)) ≤ M ∧
(∫ x, W r x ^ 2 ∂(μ r)) ≤ cW * r ^ 4 ∧
cZ * r ^ 2 ≤ ∫ x, W r x ∂(μ r)) :
∃ C : ℝ, 0 ≤ C ∧ ∀ r, 0 < r → r ≤ r0 →
IsProbabilityMeasure (weightedLaw (μ r) (W r)) ∧
(weightedLaw (μ r) (W r) (badJetEvent (R r) r ε)).toReal ≤ C * r ^ 3 := by
refine ⟨(Real.sqrt cW / cZ) * Real.sqrt (M / ε ^ 8), by positivity, ?_⟩
intro r hr hrr0
obtain ⟨hW, hW0, hR, hRi, hMb, hsecond, hlower⟩ := hdata r hr hrr0
exact p02_lm009_moment40_weighted_r3 (μ r) (W r) (R r) hW hW0 hR
r ε M cW cZ hr (hrr0.trans hr0.2) hε hM hcW hcZ hRi hMb hsecond hlower

end ResearchFormalCoreR1
16 changes: 15 additions & 1 deletion formal/SCOPE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ manifest and scope require a fresh separately authenticated alignment review.

## Additive weighted probability law (nine further declarations)

The total inventory is now 29 theorem targets. [WEIGHTED_LAW.md](WEIGHTED_LAW.md)
This retained layer has 29 theorem targets. [WEIGHTED_LAW.md](WEIGHTED_LAW.md)
is the hash-bound exact scope for the new `WeightedLaw.lean` module. It consumes
all earlier formal source unchanged and supplies the abstract PT1 construction
excluded by MeasureBridge: an integrable a.e.-nonnegative weight with positive
Expand All @@ -55,6 +55,20 @@ construction alone is added here. The executable gate and five negative controls
are unchanged, and all nine new targets enter its transitive axiom inventory.
No existing review is silently rebound to the changed manifest or scope.

## Additive moment-to-tail composition (seven further declarations)

The current total is 36 theorem targets. [MOMENT_TAIL.md](MOMENT_TAIL.md) is the
hash-bound scope for `MomentTail.lean`: actual finite-measure Markov inequality,
strict-event measurability/threshold inclusion, the fortieth-moment-to-eighth-order
event tail, fourth-order and cubic weighted probability bounds, and an explicit
uniform-family assembly. The event is exactly {epsilon < r R^5}, not the entire
research good-event complement. Its moment bound, the weight's second moment,
positive lower normalizer and uniform-family premises remain assumptions.
No concrete Gaussian jet/Palm construction, derivative-supremum bound, P0.2 or
parent theorem is established. All earlier29 proof bytes, the executable gate
and its five rejection controls are unchanged. Existing package-level alignment
records do not automatically cover these new targets or changed scope.

## Review contract
The source manifest is an evidence sidecar, not another scientific register. A trusted successful workflow establishes kernel evidence only for these target declarations and their displayed hypotheses, relative to Lean's kernel/standard foundations/toolchain. Independent review must compare each Lean statement and definition to this scope note and the source actually cited. Review author, provider, family and agent must be explicit. Validate an authenticated record with `python formal/gate.py --alignment review.json`; then the existing controlling gate must decide whether its wider requirements are met. The validator does not authenticate a review merely because a JSON string names a reviewer.

Expand Down
Loading
Loading