diff --git a/LeanPool/VenNullClockRoundRates.lean b/LeanPool/VenNullClockRoundRates.lean index 4be66de226..c0147acd59 100644 --- a/LeanPool/VenNullClockRoundRates.lean +++ b/LeanPool/VenNullClockRoundRates.lean @@ -5,7 +5,7 @@ Authors: Mark Gladden -/ /- -Upstream NOTICE for the matching-rates subproject +Upstream NOTICE for the matching-rates, Split, and Mask formalizations C196 v0.3 manuscript and Lean formalization Copyright 2026 Mark Gladden @@ -15,6 +15,7 @@ Mark Gladden is the responsible maintainer. AI produced the Lean proofs under hi Lean source: VanGogh7777/c196-lean, matching-rates subproject. Commit: f14c11cca549acba4a3fcf832e7af005d2afd8ee +Split and Mask source: VanGogh7777/c196-lean, commit 53b4baa78554a9a734b8a187c86e99fe01bd66f7. -/ module @@ -40,6 +41,13 @@ public import LeanPool.VenNullClockRoundRates.VenRateUpperPositive public import LeanPool.VenNullClockRoundRates.VenRateUpperRoundRates public import LeanPool.VenNullClockRoundRates.VenRateUpperStrips public import LeanPool.VenNullClockRoundRates.VenRateUpperTaylor +public import LeanPool.VenNullClockRoundRates.LocalMask +public import LeanPool.VenNullClockRoundRates.LocalMaskAngular +public import LeanPool.VenNullClockRoundRates.LocalMaskGram +public import LeanPool.VenNullClockRoundRates.LocalMaskModel +public import LeanPool.VenNullClockRoundRates.LocalMaskSphereModel +public import LeanPool.VenNullClockRoundRates.ThreeRead +public import LeanPool.VenNullClockRoundRates.ThreeReadModel /-! # Matching masking rates for two-layer scans on normalized round area @@ -48,7 +56,8 @@ Source: url:https://github.com/VanGogh7777/c196-lean/blob/4f45e33dc5376b362e1360 Authors: Mark Gladden Status: verified Main declarations: `VenRateUpper.matching_round_class_rates`, - `VenRateUpper.smooth_round_common_profile_error` + `VenRateUpper.smooth_round_common_profile_error`, `VenSplit.split_certificate`, + `VenSplit.split_integral`, `VenSplit.reading_error`, `VenMask.sphere_local_masking` Tags: inverse problems, spherical measure, moment cancellation, Laplace transforms MSC: 28A25, 44A10 -/ diff --git a/LeanPool/VenNullClockRoundRates/Imports.lean b/LeanPool/VenNullClockRoundRates/Imports.lean index fd89308f77..286998d9c0 100644 --- a/LeanPool/VenNullClockRoundRates/Imports.lean +++ b/LeanPool/VenNullClockRoundRates/Imports.lean @@ -11,6 +11,11 @@ public import LeanPool.VenNullClockRoundRates.Filter public import LeanPool.VenNullClockRoundRates.Finite public import LeanPool.VenNullClockRoundRates.Geometry public import LeanPool.VenNullClockRoundRates.Layer +public import LeanPool.VenNullClockRoundRates.LocalMask +public import LeanPool.VenNullClockRoundRates.LocalMaskAngular +public import LeanPool.VenNullClockRoundRates.LocalMaskGram +public import LeanPool.VenNullClockRoundRates.LocalMaskModel +public import LeanPool.VenNullClockRoundRates.LocalMaskSphereModel public import LeanPool.VenNullClockRoundRates.Lower public import LeanPool.VenNullClockRoundRates.Pole public import LeanPool.VenNullClockRoundRates.RoundAreaBridge @@ -18,6 +23,8 @@ public import LeanPool.VenNullClockRoundRates.RoundAreaCutoffInputs public import LeanPool.VenNullClockRoundRates.RoundAreaPositiveStrips public import LeanPool.VenNullClockRoundRates.RoundAreaUpperHemisphere public import LeanPool.VenNullClockRoundRates.SphereModel +public import LeanPool.VenNullClockRoundRates.ThreeRead +public import LeanPool.VenNullClockRoundRates.ThreeReadModel public import LeanPool.VenNullClockRoundRates.VenRateUpperAssembly public import LeanPool.VenNullClockRoundRates.VenRateUpperBudget public import LeanPool.VenNullClockRoundRates.VenRateUpperBump diff --git a/LeanPool/VenNullClockRoundRates/LocalMask.lean b/LeanPool/VenNullClockRoundRates/LocalMask.lean new file mode 100644 index 0000000000..0a9e3aebcd --- /dev/null +++ b/LeanPool/VenNullClockRoundRates/LocalMask.lean @@ -0,0 +1,105 @@ +/- +Copyright (c) 2026 Mark Gladden. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: AbPh project (AI-generated Lean proofs) +-/ + +-- Modified for Lean Pool: adapted the module name and imports. + +module + +public import LeanPool.VenNullClockRoundRates.LocalMaskAngular +public import LeanPool.VenNullClockRoundRates.LocalMaskSphereModel +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +/-! The nonparallel-axis energy pair genuinely images an open set. An explicit +angular preimage uses positive square roots on a patch below (1,1). -/ +@[expose] public section +noncomputable section +open MeasureTheory Filter +open scoped Topology +namespace VenMask + +private def reverseEnergy (a : ℝ) : ℝ := Real.sqrt (1 - Real.sqrt a) + +private theorem energy_reverse {a : ℝ} (h : a ∈ Set.Ioo (0 : ℝ) 1) : + energy (reverseEnergy a) = a := by + have r := Real.sq_sqrt (sub_nonneg.mpr (Real.sqrt_le_one.mpr h.2.le)) + unfold energy reverseEnergy + rw [r] + simpa using Real.sq_sqrt h.1.le + +private theorem open_image (θ : ℝ) (hs : Real.sin θ ≠ 0) : + ∃ p : ℝ × ℝ, Set.range (fun y ↦ (firstEnergy y, secondEnergy θ y)) ∈ 𝓝 p := by + let X := fun p : ℝ × ℝ ↦ reverseEnergy p.1 + let Y := fun p : ℝ × ℝ ↦ (reverseEnergy p.2 - Real.cos θ * X p) / Real.sin θ + let D := fun p : ℝ × ℝ ↦ (X p)^2 + (Y p)^2 + have hc : Continuous D := by unfold D Y X reverseEnergy; fun_prop + have h1 : D (1,1) = 0 := by simp [D, X, Y, reverseEnergy] + have dio : ∀ᶠ p in 𝓝 ((1,1) : ℝ × ℝ), D p < 1 := + hc.continuousAt.eventually_lt continuousAt_const (by simp [h1]) + have diag : Tendsto (fun t : ℝ ↦ (t,t)) (𝓝 1) (𝓝 (1,1)) := + (continuous_id.prodMk continuous_id).continuousAt + have far : ∀ᶠ t in 𝓝[Set.Iio (1 : ℝ)] 1, D (t,t) < 1 := + (diag.eventually dio).filter_mono nhdsWithin_le_nhds + have pos : ∀ᶠ t in 𝓝[Set.Iio (1 : ℝ)] 1, 0 < t := + (lt_mem_nhds (zero_lt_one : (0:ℝ)<1)).filter_mono nhdsWithin_le_nhds + have lo : ∀ᶠ t in 𝓝[Set.Iio (1 : ℝ)] 1, t < 1 := self_mem_nhdsWithin + obtain ⟨t, ht0, ht1, htD⟩ := (pos.and (lo.and far)).exists + refine ⟨(t,t), ?_⟩ + have h0 : Set.Ioo (0:ℝ) 1 ∈ 𝓝 t := Ioo_mem_nhds ht0 ht1 + have hfst := (continuous_fst.continuousAt (x := (t,t))).tendsto.eventually h0 + have hsnd := (continuous_snd.continuousAt (x := (t,t))).tendsto.eventually h0 + have hd := (hc.continuousAt (x := (t,t))).eventually_lt continuousAt_const htD + filter_upwards [hfst,hsnd,hd] with p hf hg hdis + let y : UnitSphere := ⟨(X p, Y p, Real.sqrt (1 - D p)), by + change (X p)^2 + (Y p)^2 + (Real.sqrt (1-D p))^2 = 1 + rw [Real.sq_sqrt (by linarith)]; dsimp [D]; ring⟩ + refine ⟨y, Prod.ext ?_ ?_⟩ + · exact energy_reverse hf + · change energy (Real.cos θ * X p + Real.sin θ * Y p) = p.2 + have heq : Real.cos θ * X p + Real.sin θ * Y p = reverseEnergy p.2 := by + unfold Y; field_simp; ring + rw [heq]; exact energy_reverse hg + +private theorem energy_bounds {u : ℝ} (hu : u ^ 2 ≤ 1) : |energy u| ≤ 1 := by + unfold energy + rw [abs_of_nonneg (sq_nonneg _)] + nlinarith only [mul_nonneg (sq_nonneg u) (sub_nonneg.mpr hu), sq_nonneg u] + +/-- Actual nonaligned quadrupole axes on the unit sphere satisfy the +finite-scan obstruction; there is no open-image or Gram hypothesis. -/ +theorem sphere_local_masking : SphereMaskingCertificate := by + intro n μ _ _ x s θ₀ w₀ hw hs hm + let _ : OpensMeasurableSpace UnitSphere := inferInstanceAs + (OpensMeasurableSpace {q : ℝ × ℝ × ℝ // q.1^2 + q.2.1^2 + q.2.2^2 = 1}) + have h₁ : Continuous firstEnergy := by + change Continuous (fun y : {q : ℝ × ℝ × ℝ // _} ↦ (1 - y.val.1 ^ 2)^2); fun_prop + have h₂ (θ : ℝ) : Continuous (secondEnergy θ) := by + change Continuous (fun y : {q : ℝ × ℝ × ℝ // _} ↦ + (1 - (Real.cos θ * y.val.1 + Real.sin θ * y.val.2.1)^2)^2); fun_prop + have hθ (y : UnitSphere) : ContinuousAt (fun θ ↦ secondEnergy θ y) θ₀ := by + unfold secondEnergy energy; fun_prop + have hbound (θ : ℝ) (y : UnitSphere) : |firstEnergy y| ≤ 1 ∧ |secondEnergy θ y| ≤ 1 := by + have hlen := y.property + have hproj := Real.sin_sq_add_cos_sq θ + have alg : (Real.cos θ * y.val.1 + Real.sin θ * y.val.2.1)^2 + + (Real.sin θ * y.val.1 - Real.cos θ * y.val.2.1)^2 = + (Real.sin θ ^2 + Real.cos θ ^2)*(y.val.1^2+y.val.2.1^2) := by ring + rw [hproj, one_mul] at alg + constructor + · apply energy_bounds + nlinarith only [hlen, sq_nonneg y.val.2.1, sq_nonneg y.val.2.2] + · apply energy_bounds + nlinarith only [hlen, alg, sq_nonneg (Real.sin θ * y.val.1-Real.cos θ * y.val.2.1), + sq_nonneg y.val.2.2] + have H := exponential_local_masking μ x s (fun _ ↦ firstEnergy) secondEnergy θ₀ w₀ + hw hm (open_image _ hs) (fun θ ↦ ⟨h₁,h₂ θ⟩) (fun y ↦ ⟨continuousAt_const,hθ y⟩) hbound + filter_upwards [H] with θ hh + obtain ⟨c, hc, hr⟩ := hh + exact ⟨c, hc, fun i ↦ congrFun hr i⟩ +end VenMask diff --git a/LeanPool/VenNullClockRoundRates/LocalMaskAngular.lean b/LeanPool/VenNullClockRoundRates/LocalMaskAngular.lean new file mode 100644 index 0000000000..fc5c8b395f --- /dev/null +++ b/LeanPool/VenNullClockRoundRates/LocalMaskAngular.lean @@ -0,0 +1,136 @@ +/- +Copyright (c) 2026 Mark Gladden. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: AbPh project (AI-generated Lean proofs) +-/ + +-- Modified for Lean Pool: adapted the module name and imports. + +module + +public import LeanPool.VenNullClockRoundRates.LocalMaskGram +import Mathlib.MeasureTheory.Integral.IntegrableOn +import Mathlib.LinearAlgebra.Vandermonde +import Mathlib.Analysis.SpecialFunctions.Exp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity + +/-! Discharge moment independence and continuity in the concrete exponential +measurement family. A finite Vandermonde argument lives inside a regular +angular image patch. Bounded convergence is applied to unperturbed moments. -/ +@[expose] public section +noncomputable section +open MeasureTheory Filter Matrix +open scoped Topology +namespace VenMask +private theorem separating_slope {n : ℕ} (x s : Fin n → ℝ) + (h : Function.Injective fun i ↦ (x i, s i)) : + ∃ t : ℝ, Function.Injective (fun i ↦ x i + s i * t) := by + let bad := fun ij : Fin n × Fin n ↦ (x ij.2 - x ij.1) / (s ij.1 - s ij.2) + obtain ⟨t, ht⟩ := (Set.finite_range bad).exists_notMem + refine ⟨t, fun i j hij ↦ ?_⟩ + by_cases hs : s i = s j + · apply h + exact Prod.ext (by simpa [hs] using hij) hs + · exfalso + apply ht + refine ⟨(i,j), ?_⟩ + change (x j - x i) / (s i - s j) = t + apply (div_eq_iff (sub_ne_zero.mpr hs)).mpr + linarith only [hij] + +private theorem kernel_indep {Ω : Type} [TopologicalSpace Ω] [MeasurableSpace Ω] {n : ℕ} + (μ : Measure Ω) [μ.IsOpenPosMeasure] + (x s : Fin n → ℝ) (F G : Ω → ℝ) + (hmenu : Function.Injective fun i ↦ (x i, s i)) + (hpatch : ∃ p : ℝ × ℝ, Set.range (fun y ↦ (F y, G y)) ∈ 𝓝 p) + (hF : Continuous F) (hG : Continuous G) : + AEIndependent μ (kernel x s F G) := by + intro c hzero + have hc : Continuous (synthesis (kernel x s F G) c) := by + unfold synthesis kernel; fun_prop + have eqn := μ.eq_of_ae_eq hzero hc continuous_zero + obtain ⟨t, ht⟩ := separating_slope x s hmenu + obtain ⟨p, hp⟩ := hpatch + let line := fun (a : ℝ) (j : Fin n) ↦ (p.1 + a * j.val, p.2 + t * a * j.val) + have inPatch (j : Fin n) : ∀ᶠ a in 𝓝 (0 : ℝ), line a j ∈ Set.range (fun y ↦ (F y,G y)) := by + have hlin : ContinuousAt (fun a ↦ line a j) 0 := by unfold line; fun_prop + have h0 : line 0 j = p := by simp [line] + exact (h0 ▸ hlin.tendsto : Tendsto (fun a ↦ line a j) (𝓝 0) (𝓝 p)) hp + have hall := (eventually_all.mpr inPatch).filter_mono + (nhdsWithin_le_nhds : 𝓝[Set.Ioi (0 : ℝ)] 0 ≤ 𝓝 0) + have hpos : ∀ᶠ a in 𝓝[Set.Ioi (0 : ℝ)] 0, 0 < a := self_mem_nhdsWithin + obtain ⟨a, ha, hal⟩ := (hpos.and hall).exists + change 0 < a at ha + let base := fun i ↦ Real.exp (a * (x i + s i * t)) + let intercept := fun i ↦ Real.exp (x i * p.1 + s i * p.2) + have hinj : Function.Injective base := fun i j h ↦ + ht <| mul_left_cancel₀ ha.ne' (Real.exp_injective h) + have heq (j : Fin n) : ∑ i, (c i * intercept i) * (base i)^(j : ℕ) = 0 := by + obtain ⟨y, hy⟩ := hal j + have hf := congrArg Prod.fst hy + have hg := congrArg Prod.snd hy + change F y = p.1 + a*j.val at hf + change G y = p.2 + t*a*j.val at hg + have ev := congrFun eqn y + change ∑ i, c i * Real.exp (x i * F y + s i * G y) = 0 at ev + rw [← ev]; apply Finset.sum_congr rfl; intro i _ + rw [hf, hg] + have ar : x i * (p.1 + a * j.val) + s i * (p.2 + t * a * j.val) = + x i * p.1 + s i * p.2 + (j.val : ℝ) * (a * (x i + s i * t)) := by ring + rw [ar, Real.exp_add, Real.exp_nat_mul] + simp [base, intercept, mul_assoc] + have hz := Matrix.eq_zero_of_forall_pow_sum_mul_pow_eq_zero hinj heq + funext i + exact (mul_eq_zero.mp (congrFun hz i)).resolve_right (Real.exp_ne_zero _) +/-- Every distinct fixed finite menu of these scalar exponential readings is +locally maskable under the regular angular-image hypotheses. The *same* chosen +multiplier matches every read at the perturbed parameter. -/ +theorem exponential_local_masking : ExponentialMaskingCertificate := by + intro Ω Z _ _ _ _ _ n μ _ _ x s F G z₀ w₀ hw hm hp hc hparam he + let k := fun z ↦ kernel x s (F z) (G z) + let B := ∑ i, Real.exp (|x i| + |s i|) + have hk (z : Z) (i : Fin n) : Continuous (k z i) := by + obtain ⟨hf,hg⟩ := hc z + unfold k kernel; fun_prop + have hkpar (y : Ω) (i : Fin n) : ContinuousAt (fun z ↦ k z i y) z₀ := by + obtain ⟨hf,hg⟩ := hparam y + unfold k kernel; fun_prop + have hB (z : Z) (i : Fin n) (y : Ω) : |k z i y| ≤ B := by + dsimp [k,kernel]; rw [abs_of_pos (Real.exp_pos _)] + apply le_trans _ (Finset.single_le_sum (f := fun i ↦ Real.exp (|x i| + |s i|)) + (fun j _ ↦ (Real.exp_pos _).le) (Finset.mem_univ i)) + apply Real.exp_le_exp.mpr; apply add_le_add + · calc x i * F z y ≤ |x i * F z y| := le_abs_self _ + _ = |x i| * |F z y| := abs_mul _ _ + _ ≤ |x i| * 1 := mul_le_mul_of_nonneg_left (he z y).1 (abs_nonneg _) + _ = _ := mul_one _ + · calc s i * G z y ≤ |s i * G z y| := le_abs_self _ + _ = |s i| * |G z y| := abs_mul _ _ + _ ≤ |s i| * 1 := mul_le_mul_of_nonneg_left (he z y).2 (abs_nonneg _) + _ = _ := mul_one _ + have hBpos : 0 ≤ B := Finset.sum_nonneg fun i _ ↦ (Real.exp_pos _).le + have pb (z : Z) (i j : Fin n) (y : Ω) : ‖k z j y * k z i y‖ ≤ B * B := by + rw [Real.norm_eq_abs, abs_mul] + exact mul_le_mul (hB z j y) (hB z i y) (abs_nonneg _) hBpos + apply local_masking μ k z₀ w₀ B hw (.of_forall hB) + · exact .of_forall fun z i ↦ Integrable.of_bound (hk z i).aestronglyMeasurable B + (ae_of_all _ fun y ↦ hB z i y) + · exact .of_forall fun z i j ↦ Integrable.of_bound + ((hk z j).mul (hk z i)).aestronglyMeasurable (B*B) (ae_of_all _ (pb z i j)) + · exact kernel_indep μ x s (F z₀) (G z₀) hm hp (hc _).1 (hc _).2 + · apply continuousAt_pi.mpr; intro i; apply continuousAt_pi.mpr; intro j + apply continuousAt_of_dominated (bound := fun _ ↦ B*B) + (.of_forall fun z ↦ ((hk z j).mul (hk z i)).aestronglyMeasurable) + (.of_forall fun z ↦ ae_of_all _ (pb z i j)) (integrable_const _) + exact ae_of_all _ fun y ↦ (hkpar y j).mul (hkpar y i) + · apply continuousAt_pi.mpr; intro i + apply continuousAt_of_dominated (bound := fun _ ↦ |w₀| * B) + (.of_forall fun z ↦ (continuous_const.mul (hk z i)).aestronglyMeasurable) + (.of_forall fun z ↦ ae_of_all _ fun y ↦ ?_) (integrable_const _) + (ae_of_all _ fun y ↦ continuousAt_const.mul (hkpar y i)) + change |w₀ * k z i y| ≤ |w₀| * B + rw [abs_mul] + exact mul_le_mul_of_nonneg_left (hB z i y) (abs_nonneg _) +end VenMask diff --git a/LeanPool/VenNullClockRoundRates/LocalMaskGram.lean b/LeanPool/VenNullClockRoundRates/LocalMaskGram.lean new file mode 100644 index 0000000000..971937a534 --- /dev/null +++ b/LeanPool/VenNullClockRoundRates/LocalMaskGram.lean @@ -0,0 +1,120 @@ +/- +Copyright (c) 2026 Mark Gladden. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: AbPh project (AI-generated Lean proofs) +-/ + +-- Modified for Lean Pool: adapted the module name and imports. + +module + +public import LeanPool.VenNullClockRoundRates.LocalMaskModel +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Ring + +/-! Exact interpolation with a strict positivity margin. The invertibility +step is proved from the integral of the square, not stipulated. -/ +@[expose] public section +noncomputable section +open MeasureTheory Filter Matrix +open scoped Topology +namespace VenMask +variable {Ω : Type*} [MeasurableSpace Ω] {n : ℕ} +variable (μ : Measure Ω) (k : Fin n → Ω → ℝ) + +private theorem linInt (f : Fin n → Ω → ℝ) (g : Ω → ℝ) (c : Fin n → ℝ) + (h : ∀ i, Integrable (fun y ↦ f i y * g y) μ) : + Integrable (fun y ↦ synthesis f c y * g y) μ ∧ + (∫ y, synthesis f c y * g y ∂μ) = + ∑ j, c j * ∫ y, f j y * g y ∂μ := by + have eqn (y : Ω) : synthesis f c y * g y = ∑ i, c i * (f i y * g y) := by + simp [synthesis, Finset.sum_mul, mul_assoc] + have hint (i : Fin n) : Integrable (fun y ↦ c i * (f i y * g y)) μ := (h i).const_mul _ + simp_rw [eqn] + exact ⟨integrable_finsetSum _ fun i _ ↦ hint i, by + rw [integral_finsetSum _ fun i _ ↦ hint i] + simp only [integral_const_mul]⟩ + +/-- Independence modulo null sets implies that the finite response matrix +is a unit, with no matrix nondegeneracy assumption. -/ +theorem gram_isUnit + (h : ∀ i j, Integrable (fun y ↦ k j y * k i y) μ) + (hind : AEIndependent μ k) : IsUnit (gram μ k) := by + apply Matrix.mulVec_injective_iff_isUnit.mp + apply (injective_iff_map_eq_zero (gram μ k).mulVecLin).2 + intro c hc + change (gram μ k).mulVec c = 0 at hc + have inner (i : Fin n) : Integrable (fun y ↦ synthesis k c y * k i y) μ ∧ + (∫ y, synthesis k c y * k i y ∂μ) = 0 := by + obtain ⟨int, eqn⟩ := linInt μ k (k i) c (h i) + refine ⟨int, eqn.trans ?_⟩ + simpa [gram, Matrix.mulVec, dotProduct, mul_comm] using congrFun hc i + have outer (i : Fin n) : Integrable (fun y ↦ k i y * synthesis k c y) μ := by + simpa only [mul_comm] using (inner i).1 + obtain ⟨int, eqn⟩ := linInt μ k (synthesis k c) c outer + have inside (i : Fin n) : (∫ y, k i y * synthesis k c y ∂μ) = 0 := by + simpa only [mul_comm] using (inner i).2 + simp only [inside, mul_zero, Finset.sum_const_zero] at eqn + have hzero := (integral_eq_zero_iff_of_nonneg + (f := fun y ↦ synthesis k c y * synthesis k c y) + (fun y ↦ mul_self_nonneg _) int).mp eqn + apply hind + filter_upwards [hzero] with y hy + change synthesis k c y * synthesis k c y = 0 at hy + exact (mul_self_eq_zero.mp hy) + +private theorem perturb_read (c : Fin n → ℝ) (w : ℝ) + (hk : ∀ i, Integrable (k i) μ) + (h : ∀ i j, Integrable (fun y ↦ k j y * k i y) μ) : + read μ k (fun y ↦ w + synthesis k c y) = + read μ k (fun _ ↦ w) + (gram μ k).mulVec c := by + funext i + obtain ⟨hi, eqn⟩ := linInt μ k (k i) c (h i) + change (∫ y, (w + synthesis k c y) * k i y ∂μ) = _ + simp_rw [add_mul] + rw [integral_add ((hk i).const_mul _) hi, eqn] + simp [read, gram, Matrix.mulVec, dotProduct, mul_comm] + +omit [MeasurableSpace Ω] in +private theorem synthesis_bound (c : Fin n → ℝ) (B : ℝ) (hk : ∀ i y, |k i y| ≤ B) (y : Ω) : + |synthesis k c y| ≤ ∑ j, |c j| * B := + (Finset.abs_sum_le_sum_abs _ _).trans <| Finset.sum_le_sum fun i _ ↦ by + rw [abs_mul]; exact mul_le_mul_of_nonneg_left (hk i y) (abs_nonneg _) + +/-- A local change of geometry can be exactly erased across an arbitrary +finite list of measured kernels. The geometry enters through independence and +continuity of the *unperturbed* integrals; no masking field is assumed. -/ +theorem local_masking : LocalMaskingCertificate := by + intro Ω Z _ _ n μ k z₀ w₀ B hw hB hint hprod hind hG hread + let G := fun z ↦ gram μ (k z) + let d := fun z ↦ read μ (k z) (fun _ ↦ w₀) + let c := fun z ↦ ((G z)⁻¹).mulVec (d z₀ - d z) + have base : IsUnit (G z₀).det := + (G z₀).isUnit_iff_isUnit_det.mp (gram_isUnit μ _ hprod.self_of_nhds hind) + have hdet : ContinuousAt (fun z ↦ (G z).det) z₀ := + continuous_id.matrix_det.continuousAt.comp hG + have nearbyDet := hdet.eventually_ne base.ne_zero + have hInv : ContinuousAt (fun z ↦ (G z)⁻¹) z₀ := by + apply (continuousAt_matrix_inv (G z₀) ?_).comp hG + rw [Ring.inverse_eq_inv']; exact continuousAt_inv₀ base.ne_zero + have hrem : ContinuousAt (fun z ↦ d z₀ - d z) z₀ := continuousAt_const.sub hread + have hcoeff (i : Fin n) : ContinuousAt (fun z ↦ c z i) z₀ := by + change ContinuousAt (fun z ↦ ∑ j, (G z)⁻¹ i j * (d z₀ - d z) j) z₀ + have step (j : Fin n) : ContinuousAt (fun z ↦ (G z)⁻¹ i j * (d z₀ - d z) j) z₀ := + ((continuousAt_pi.mp (continuousAt_pi.mp hInv i)) j).mul (continuousAt_pi.mp hrem j) + fun_prop (disch := assumption) + have hc0 : c z₀ = 0 := by simp [c] + have habs : ContinuousAt (fun z ↦ ∑ j, |c z j| * B) z₀ := by + fun_prop (disch := assumption) + have small : ∀ᶠ z in 𝓝 z₀, (∑ j, |c z j| * B) < w₀ - 1 := by + apply habs.eventually_lt continuousAt_const + simpa [hc0] using sub_pos.mpr hw + filter_upwards [small, nearbyDet, hB, hint, hprod] with z hs hz hb hk hp + refine ⟨c z, fun y ↦ ?_, ?_⟩ + · have he := (abs_le.mp (synthesis_bound (k z) (c z) B hb y)).1 + linarith + · rw [perturb_read μ (k z) (c z) w₀ hk hp] + change d z + (G z).mulVec (((G z)⁻¹).mulVec (d z₀ - d z)) = d z₀ + rw [Matrix.mulVec_mulVec, Matrix.mul_nonsing_inv _ (isUnit_iff_ne_zero.mpr hz), + Matrix.one_mulVec, add_sub_cancel] +end VenMask diff --git a/LeanPool/VenNullClockRoundRates/LocalMaskModel.lean b/LeanPool/VenNullClockRoundRates/LocalMaskModel.lean new file mode 100644 index 0000000000..0c06ab3d6f --- /dev/null +++ b/LeanPool/VenNullClockRoundRates/LocalMaskModel.lean @@ -0,0 +1,87 @@ +/- +Copyright (c) 2026 Mark Gladden. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: AbPh project (AI-generated Lean proofs) +-/ + +-- Modified for Lean Pool: adapted the module name and imports. + +module + +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.MeasureTheory.Measure.OpenPos +public import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +public import Mathlib.MeasureTheory.Integral.Bochner.Basic +public import Mathlib.Topology.Instances.Matrix + +/-! Finite scalar reads as integrals of angular kernels against a common +multiplier. The number of distinct controls is arbitrary and finite. +A parameter may change the angle or other features of the kernel. -/ +@[expose] public section +noncomputable section +open MeasureTheory +open scoped Topology +namespace VenMask + +variable {Ω : Type*} [MeasurableSpace Ω] {n : ℕ} + +/-- The integrated weighted response of one control in the finite menu. -/ +def read (μ : Measure Ω) (k : Fin n → Ω → ℝ) (w : Ω → ℝ) (i : Fin n) : ℝ := + ∫ y, w y * k i y ∂μ + +/-- The finite linear combination of menu kernels with the given coefficients. -/ +def synthesis (k : Fin n → Ω → ℝ) (c : Fin n → ℝ) (y : Ω) : ℝ := + ∑ j, c j * k j y + +/-- The Gram matrix of the finite menu kernels under the observation measure. -/ +def gram (μ : Measure Ω) (k : Fin n → Ω → ℝ) : Matrix (Fin n) (Fin n) ℝ := + Matrix.of fun i j ↦ ∫ y, k j y * k i y ∂μ + +/-- Linear independence in the measured angular domain, not assumed +invertibility of the response matrix. The condition excludes redundant controls. -/ +def AEIndependent (μ : Measure Ω) (k : Fin n → Ω → ℝ) : Prop := + ∀ c, synthesis k c =ᵐ[μ] 0 → c = 0 + +/-- Exact local masking. For every nearby parameter there is a multiplier, +strictly above one everywhere, matching every original scalar read exactly. +The multiplier is exhibited as a constant plus a finite linear combination of +the new kernels; smooth kernels therefore give smooth multipliers. -/ +def LocalMaskingCertificate : Prop := + ∀ {Ω Z : Type} [MeasurableSpace Ω] [TopologicalSpace Z] {n : ℕ} + (μ : Measure Ω) (k : Z → Fin n → Ω → ℝ) (z₀ : Z) (w₀ B : ℝ), + 1 < w₀ → + (∀ᶠ z in 𝓝 z₀, ∀ i y, |k z i y| ≤ B) → + (∀ᶠ z in 𝓝 z₀, ∀ i, Integrable (k z i) μ) → + (∀ᶠ z in 𝓝 z₀, ∀ i j, Integrable (fun y ↦ k z j y * k z i y) μ) → + AEIndependent μ (k z₀) → + ContinuousAt (fun z ↦ gram μ (k z)) z₀ → + ContinuousAt (fun z ↦ read μ (k z) (fun _ ↦ w₀)) z₀ → + ∀ᶠ z in 𝓝 z₀, ∃ c : Fin n → ℝ, + (∀ y, 1 < w₀ + synthesis (k z) c y) ∧ + read μ (k z) (fun y ↦ w₀ + synthesis (k z) c y) = + read μ (k z₀) (fun _ ↦ w₀) +/-- The angular quadrupole energies of the lineage can be supplied for F,G. +An open patch in their joint image at the reference angle is the geometric +nondegeneracy condition. No moment independence is assumed in this version. -/ +def kernel (x s : Fin n → ℝ) (F G : Ω → ℝ) (i : Fin n) (y : Ω) : ℝ := + Real.exp (x i * F y + s i * G y) + +/-- Local masking for bounded continuous exponential kernels with distinct controls and an open +reference image. -/ +def ExponentialMaskingCertificate : Prop := + ∀ {Ω Z : Type} [TopologicalSpace Ω] [MeasurableSpace Ω] [OpensMeasurableSpace Ω] + [TopologicalSpace Z] [FirstCountableTopology Z] {n : ℕ} + (μ : Measure Ω) [IsFiniteMeasure μ] [μ.IsOpenPosMeasure] + (x s : Fin n → ℝ) (F G : Z → Ω → ℝ) (z₀ : Z) (w₀ : ℝ), + 1 < w₀ → + Function.Injective (fun i ↦ (x i, s i)) → + (∃ p : ℝ × ℝ, Set.range (fun y ↦ (F z₀ y, G z₀ y)) ∈ 𝓝 p) → + (∀ z, Continuous (F z) ∧ Continuous (G z)) → + (∀ y, ContinuousAt (fun z ↦ F z y) z₀ ∧ ContinuousAt (fun z ↦ G z y) z₀) → + (∀ z y, |F z y| ≤ 1 ∧ |G z y| ≤ 1) → + ∀ᶠ z in 𝓝 z₀, ∃ c : Fin n → ℝ, + (∀ y, 1 < w₀ + synthesis (kernel x s (F z) (G z)) c y) ∧ + read μ (kernel x s (F z) (G z)) + (fun y ↦ w₀ + synthesis (kernel x s (F z) (G z)) c y) = + read μ (kernel x s (F z₀) (G z₀)) (fun _ ↦ w₀) +end VenMask diff --git a/LeanPool/VenNullClockRoundRates/LocalMaskSphereModel.lean b/LeanPool/VenNullClockRoundRates/LocalMaskSphereModel.lean new file mode 100644 index 0000000000..e0e87cf84d --- /dev/null +++ b/LeanPool/VenNullClockRoundRates/LocalMaskSphereModel.lean @@ -0,0 +1,41 @@ +/- +Copyright (c) 2026 Mark Gladden. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: AbPh project (AI-generated Lean proofs) +-/ + +-- Modified for Lean Pool: adapted the imports and reused the shared sphere model. + +module + +public import LeanPool.VenNullClockRoundRates.SphereModel + +/-! The finite-menu observation interface for the shared unit-sphere model. -/ + +@[expose] public section + +noncomputable section + +open MeasureTheory Filter +open scoped Topology + +namespace VenMask + +/-- The exponential read kernel for one control in a finite menu. -/ +def sphereKernel {n : ℕ} (x s : Fin n → ℝ) (θ : ℝ) (i : Fin n) (y : UnitSphere) : ℝ := + Real.exp (x i * firstEnergy y + s i * secondEnergy θ y) + +/-- At every nonaligned angle, with any fixed list of distinct strength pairs, +one strictly positive hidden log-focusing suffices at each nearby angle to +match *all* of the reference mean reads exactly. The multiplier is an analytic +angular function (constant plus finite combinations of exponential kernels). -/ +def SphereMaskingCertificate : Prop := + ∀ {n : ℕ} (μ : Measure UnitSphere) [IsFiniteMeasure μ] [μ.IsOpenPosMeasure] + (x s : Fin n → ℝ) (θ₀ w₀ : ℝ), + 1 < w₀ → Real.sin θ₀ ≠ 0 → Function.Injective (fun i ↦ (x i, s i)) → + ∀ᶠ θ in 𝓝 θ₀, ∃ c : Fin n → ℝ, + let k := sphereKernel x s + let w := fun y ↦ w₀ + ∑ j, c j * k θ j y + (∀ y, 1 < w y) ∧ + (∀ i, (∫ y, w y * k θ i y ∂μ) = ∫ y, w₀ * k θ₀ i y ∂μ) +end VenMask diff --git a/LeanPool/VenNullClockRoundRates/ThreeRead.lean b/LeanPool/VenNullClockRoundRates/ThreeRead.lean new file mode 100644 index 0000000000..ae38fab453 --- /dev/null +++ b/LeanPool/VenNullClockRoundRates/ThreeRead.lean @@ -0,0 +1,204 @@ +/- +Copyright (c) 2026 Mark Gladden. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: AbPh project (AI-generated Lean proofs) +-/ + +-- Modified for Lean Pool: adapted the module name and imports. + +module + +public import LeanPool.VenNullClockRoundRates.ThreeReadModel +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring +import Mathlib.Tactic.NormNum + +/-! The positive three-read theorem, with the angular coefficient obtained by +polarizing the even marginal projection moments. No signed contrast, axis +overlap formula, or desired separating inequality is assumed. -/ +public section +noncomputable section +open MeasureTheory +namespace VenSplit +variable {Ω : Type*} [MeasurableSpace Ω] + +private inductive D | two | three | four +private def D.k : D → ℕ | .two => 2 | .three => 3 | .four => 4 +private structure T where + wt : ℝ + u : ℝ + v : ℝ + d : D + +private def val (p : T) (a b : ℝ) : ℝ := p.wt * (p.u*a+p.v*b)^(2*p.d.k) +private def avg (p : T) (c : ℝ) : ℝ := + p.wt * ((p.u^2+2*p.u*p.v*c+p.v^2)^p.d.k/(2*(p.d.k:ℝ)+1)) +private def vals : List T → ℝ → ℝ → ℝ + | [], _, _ => 0 | p::ps, a,b => val p a b + vals ps a b +private def avgs : List T → ℝ → ℝ + | [], _ => 0 | p::ps,c => avg p c + avgs ps c +/-- A polarization stencil for the squared difference of quartic energies. -/ +private def stencil : List T := [ + ⟨16/3,1,0,.two⟩, ⟨16/3,0,1,.two⟩, ⟨-2/3,1,1,.two⟩, ⟨-2/3,1,-1,.two⟩, + ⟨-64/15,1,0,.three⟩, ⟨-64/15,0,1,.three⟩, ⟨2/15,1,1,.three⟩, ⟨2/15,1,-1,.three⟩, + ⟨17/20,1,0,.four⟩, ⟨17/20,0,1,.four⟩, ⟨-17/630,1,1,.four⟩, ⟨-17/630,1,-1,.four⟩, + ⟨1/2520,2,1,.four⟩, ⟨1/2520,2,-1,.four⟩, ⟨1/2520,1,2,.four⟩, ⟨1/2520,1,-2,.four⟩] + +private theorem stencil_point (a b : ℝ) : (energy a - energy b)^2 = vals stencil a b := by + simp only [stencil, vals, val, D.k, energy] + ring + +private theorem stencil_avg (c : ℝ) : avgs stencil c = (16/315)*(1-c ^ 2)*(7+c ^ 2) := by + simp only [stencil, avgs, avg, D.k, Nat.cast_ofNat] + ring + +private theorem integrate_stencil {μ : Measure Ω} {A B : Ω → ℝ} {c : ℝ} + (h : AxisProjectionLaw μ A B c) (ps : List T) : + Integrable (fun y ↦ vals ps (A y) (B y)) μ ∧ + (∫ y, vals ps (A y) (B y) ∂μ) = avgs ps c := by + induction ps with + | nil => simp [vals, avgs] + | cons p ps ih => + have hlo : 2 ≤ p.d.k := by cases p.d <;> decide + have hhi : p.d.k ≤ 4 := by cases p.d <;> decide + obtain ⟨hi,he⟩ := h p.u p.v p.d.k hlo hhi + have hiv : Integrable (fun y ↦ val p (A y) (B y)) μ := hi.const_mul p.wt + refine ⟨hiv.add ih.1, ?_⟩ + change (∫ y, val p (A y) (B y) + vals ps (A y) (B y) ∂μ) = avg p c + avgs ps c + rw [integral_add hiv ih.1, ih.2] + simp only [val, integral_const_mul, he, avg] + +/-- Exact unweighted mismatch from ordinary one-direction spherical moments. -/ +theorem angular_mismatch {μ : Measure Ω} {A B : Ω → ℝ} {c : ℝ} + (h : AxisProjectionLaw μ A B c) : + Integrable (fun y ↦ (energy (A y) - energy (B y))^2) μ ∧ + (∫ y, (energy (A y) - energy (B y))^2 ∂μ) = (16/315)*(1-c ^ 2)*(7+c ^ 2) := by + simpa only [stencil_point, stencil_avg] using integrate_stencil h stencil + +private theorem exp_gap {a b : ℝ} (hb : 0 ≤ b) (hab : b ≤ a) : + a-b ≤ Real.exp a - Real.exp b := by + have hp := Real.add_one_le_exp (a-b) + have he := Real.one_le_exp hb + have hg := mul_nonneg (sub_nonneg.mpr he) (sub_nonneg.mpr hab) + have hm := mul_le_mul_of_nonneg_left hp (Real.exp_pos b).le + have hx : Real.exp b * Real.exp (a-b) = Real.exp a := by + rw [← Real.exp_add]; congr 1; ring + rw [hx] at hm + linarith + +private theorem exp_gap_sq {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + (a-b)^2 ≤ (Real.exp a - Real.exp b)^2 := by + rcases le_total b a with h|h + · have p := exp_gap hb h + have q := sq_le_sq' (by linarith : -(Real.exp a - Real.exp b) ≤ a-b) p + exact q + · have p := exp_gap ha h + have q := sq_le_sq' (by linarith : -(Real.exp b - Real.exp a) ≤ b-a) p + nlinarith + +private def quad (A B w : Ω → ℝ) (t : ℝ) (y : Ω) : ℝ := + w y * (Real.exp (t*energy (A y)) - Real.exp (t*energy (B y)))^2 + +omit [MeasurableSpace Ω] in +private theorem point_split (A B w : Ω → ℝ) (t : ℝ) (y : Ω) : + quad A B w t y = ray A B w (2*t) 0 y - 2*ray A B w t t y + ray A B w 0 (2*t) y := by + simp only [quad, ray, zero_mul, add_zero, zero_add] + have hh (e : ℝ) : Real.exp (2*t*e) = Real.exp (t*e)*Real.exp (t*e) := by + rw [← Real.exp_add]; congr 1; ring + rw [hh,hh,Real.exp_add] + ring + +private theorem integral_split {μ : Measure Ω} {A B w : Ω → ℝ} {t : ℝ} + (hI : ThreeIntegrable μ A B w t) : + Integrable (quad A B w t) μ ∧ (∫ y, quad A B w t y ∂μ) = split μ A B w t := by + obtain ⟨h0,hm,h2⟩ := hI + have hx : Integrable (fun y ↦ ray A B w (2*t) 0 y - 2*ray A B w t t y) μ := + h0.sub (hm.const_mul 2) + have hpt : quad A B w t = fun y ↦ ray A B w (2*t) 0 y - 2*ray A B w t t y + ray A B w 0 (2*t) y := + funext (point_split A B w t) + rw [hpt] + exact ⟨hx.add h2, by + rw [integral_add hx h2, integral_sub h0 (hm.const_mul 2), integral_const_mul] + rfl⟩ + +omit [MeasurableSpace Ω] in +private theorem ray_lower {A B w : Ω → ℝ} {t : ℝ} (ht : 0 ≤ t) + (hw : ∀ y, 1 ≤ w y) (y : Ω) : + t^2*(energy (A y) - energy (B y))^2 ≤ quad A B w t y := by + have ha : 0 ≤ energy (A y) := sq_nonneg _ + have hb : 0 ≤ energy (B y) := sq_nonneg _ + have h1 := exp_gap_sq (mul_nonneg ht ha) (mul_nonneg ht hb) + have h2 := mul_nonneg (sub_nonneg.mpr (hw y)) + (sq_nonneg (Real.exp (t*energy (A y))-Real.exp (t*energy (B y)))) + dsimp [quad]; nlinarith + +theorem split_lower_bound {μ : Measure Ω} {A B w : Ω → ℝ} {c t : ℝ} + (h : AxisProjectionLaw μ A B c) (ht : 0 ≤ t) (hw : ∀ y, 1 ≤ w y) + (hI : ThreeIntegrable μ A B w t) : margin t c ≤ split μ A B w t := by + obtain ⟨hL,hv⟩ := angular_mismatch h + obtain ⟨hQ,hq⟩ := integral_split hI + have hp := integral_mono (hL.const_mul (t^2)) hQ (ray_lower ht hw) + rw [integral_const_mul, hv, hq] at hp + change (16*t^2/315)*(1-c ^ 2)*(7+c ^ 2) ≤ _ + linarith + +private theorem aligned_zero {μ : Measure Ω} {A B w : Ω → ℝ} {c t : ℝ} + (h : AxisProjectionLaw μ A B c) (hal : c ^ 2 = 1) + (hI : ThreeIntegrable μ A B w t) : split μ A B w t = 0 := by + obtain ⟨hL,hv⟩ := angular_mismatch h + rw [hal] at hv + have hz : (∫ y, (energy (A y)-energy (B y))^2 ∂μ) = 0 := by linarith + have he := (integral_eq_zero_iff_of_nonneg (fun _ ↦ sq_nonneg _) hL).mp hz + rw [← (integral_split hI).2] + calc + _ = ∫ _, (0:ℝ) ∂μ := by + apply integral_congr_ae + filter_upwards [he] with y hy + have heq : energy (A y)=energy (B y) := by + change (energy (A y)-energy (B y))^2=0 at hy + nlinarith [sq_nonneg (energy (A y)-energy (B y))] + simp [quad, heq] + _ = _ := by simp + +/-- Deterministic control of the signed-contrast error, including correlated errors. -/ +theorem reading_error {hi mid lo x y z ε : ℝ} + (hx : |hi - x| ≤ ε) (hy : |mid - y| ≤ ε) (hz : |lo - z| ≤ ε) : + |contrast hi mid lo - contrast x y z| ≤ 4*ε := by + rw [abs_le] at * + dsimp [contrast]; constructor <;> linarith [hx.1,hx.2,hy.1,hy.2,hz.1,hz.2] + +/-- Three calibrated exponential readings: separation at the explicit uniform +angular margin, exact alignment equivalence, and a worst-case absolute-noise test. -/ +theorem split_certificate : SplitCertificate := by + intro Ω _ μ _ A B w c t h hc ht hw hI + have hlow := split_lower_bound h ht.le hw hI + have eqv : split μ A B w t = 0 ↔ c ^ 2=1 := by + refine ⟨?_,fun hal ↦ aligned_zero h hal hI⟩ + intro hz + by_contra hn + have hlt := lt_of_le_of_ne hc hn + have hm : 0 < margin t c := by + dsimp [margin]; exact mul_pos (mul_pos (by positivity) (sub_pos.mpr hlt)) (by positivity) + linarith + refine ⟨hlow,eqv,?_⟩ + intro hi mid lo ε hhi hmid hlo + have err := reading_error hhi hmid hlo + change |contrast hi mid lo - split μ A B w t| ≤ 4*ε at err + rw [abs_le] at err + constructor + · intro hgt hal + have hz := eqv.mpr hal + linarith [err.2] + · intro hm + linarith [err.1] + +/-- The three calibrated reads give the weighted exponential square. -/ +theorem split_integral {μ : Measure Ω} {A B w : Ω → ℝ} {t : ℝ} + (hI : ThreeIntegrable μ A B w t) : + split μ A B w t = + ∫ y, w y * (Real.exp (t * energy (A y)) - Real.exp (t * energy (B y))) ^ 2 ∂μ := by + exact (integral_split hI).2.symm + +end VenSplit +end diff --git a/LeanPool/VenNullClockRoundRates/ThreeReadModel.lean b/LeanPool/VenNullClockRoundRates/ThreeReadModel.lean new file mode 100644 index 0000000000..d6cd482f75 --- /dev/null +++ b/LeanPool/VenNullClockRoundRates/ThreeReadModel.lean @@ -0,0 +1,74 @@ +/- +Copyright (c) 2026 Mark Gladden. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: AbPh project (AI-generated Lean proofs) +-/ + +-- Modified for Lean Pool: adapted the module name and imports. + +module + +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.MeasureTheory.Integral.Bochner.Basic + +/-! The split-read model on an angular probability space. The projections `A,B` +are the two signed axis cosines. `AxisProjectionLaw` records the usual one-dimensional +even projection moments of a uniformly distributed point on the unit two-sphere: +the squared length of `u n + v m` is `u² + 2 u v c + v²`, with `c = n · m`. +These unweighted marginal moments are inputs, not measurements of the contrast. -/ +@[expose] public section +noncomputable section +open MeasureTheory +namespace VenSplit +variable {Ω : Type*} [MeasurableSpace Ω] + +/-- Quartic energy in the scalar coordinate along one control axis. -/ +def energy (a : ℝ) : ℝ := (1 - a^2)^2 + +/-- Pointwise weighted exponential response at the two calibrated strengths. -/ +def ray (A B w : Ω → ℝ) (x s : ℝ) (y : Ω) : ℝ := + w y * Real.exp (x * energy (A y) + s * energy (B y)) + +/-- The integrated read of the given weighted exponential response. -/ +def clock (μ : Measure Ω) (A B w : Ω → ℝ) (x s : ℝ) : ℝ := + ∫ y, ray A B w x s y ∂μ + +/-- The signed second difference of the three reads. -/ +def contrast (hi mid lo : ℝ) : ℝ := hi - 2 * mid + lo + +/-- The symmetric three-read contrast at strengths (2t, 0), (t, t), and (0, 2t). -/ +def split (μ : Measure Ω) (A B w : Ω → ℝ) (t : ℝ) : ℝ := + contrast (clock μ A B w (2*t) 0) (clock μ A B w t t) (clock μ A B w 0 (2*t)) + +/-- The explicit lower bound on the calibrated contrast in terms of the axis overlap. -/ +def margin (t c : ℝ) : ℝ := (16*t^2/315) * (1-c^2) * (7+c^2) + +/-- Supplied fourth, sixth, and eighth moments of every linear combination of the axes. -/ +def AxisProjectionLaw (μ : Measure Ω) (A B : Ω → ℝ) (c : ℝ) : Prop := + ∀ (u v : ℝ) (k : ℕ), 2 ≤ k → k ≤ 4 → + Integrable (fun y ↦ (u*A y + v*B y)^(2*k)) μ ∧ + (∫ y, (u*A y + v*B y)^(2*k) ∂μ) = + (u^2 + 2*u*v*c + v^2)^k / (2*(k : ℝ)+1) + +/-- Integrability of each weighted response used in the symmetric three-read contrast. -/ +def ThreeIntegrable (μ : Measure Ω) (A B w : Ω → ℝ) (t : ℝ) : Prop := + Integrable (ray A B w (2*t) 0) μ ∧ Integrable (ray A B w t t) μ ∧ + Integrable (ray A B w 0 (2*t)) μ + +/-- One calibrated symmetric design, not arbitrary finite designs. No claim of +reconstructing a nonaligned angle, or of constructing the acquisition protocol. -/ +def SplitCertificate : Prop := + ∀ {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] + (A B w : Ω → ℝ) (c t : ℝ), + AxisProjectionLaw μ A B c → c^2 ≤ 1 → 0 < t → (∀ y, 1 ≤ w y) → + ThreeIntegrable μ A B w t → + margin t c ≤ split μ A B w t ∧ + (split μ A B w t = 0 ↔ c^2 = 1) ∧ + (∀ (hi mid lo ε : ℝ), + |hi - clock μ A B w (2*t) 0| ≤ ε → + |mid - clock μ A B w t t| ≤ ε → + |lo - clock μ A B w 0 (2*t)| ≤ ε → + (contrast hi mid lo > 4*ε → c^2 ≠ 1) ∧ + (8*ε < margin t c → 4*ε < contrast hi mid lo)) +end VenSplit +end diff --git a/LeanPool/projects/ven-null-clock-round-rates.yaml b/LeanPool/projects/ven-null-clock-round-rates.yaml index 7d587b1420..852075928e 100644 --- a/LeanPool/projects/ven-null-clock-round-rates.yaml +++ b/LeanPool/projects/ven-null-clock-round-rates.yaml @@ -15,10 +15,16 @@ summary: >- control strengths and a positive separation scale at most one. The broad class permits two independently chosen profiles with individual integral budgets. The smooth witness uses one ambient-smooth profile at a fixed nonaligned angle, with a pointwise floor and cap. + Also proves a calibrated three-read certificate under a supplied projection-moment law + and exact finite-menu matching near a nonaligned reference angle. branch: main main_declarations: - VenRateUpper.matching_round_class_rates - VenRateUpper.smooth_round_common_profile_error + - VenSplit.split_certificate + - VenSplit.split_integral + - VenSplit.reading_error + - VenMask.sphere_local_masking main_results: - declaration: VenRateUpper.matching_round_class_rates source_ref: "C196 v0.3, §5, p. 5, Eqs. (33)–(34)" @@ -33,5 +39,26 @@ main_results: At fixed positive control strengths and any fixed nonaligned angle, every sufficiently large budget M admits one smooth profile for both hypotheses, satisfying 2 ≤ w_M ≤ M everywhere and giving error at most exp(−c log M log log M). + - declaration: VenSplit.split_certificate + source_ref: "C196 v0.3, Theorem 4, p. 4, Eqs. (24)–(28)" + informal: >- + For a probability measure with the supplied projection-moment law, c² ≤ 1 and t > 0, + use one profile w ≥ 1 and integrable reads at (2t, 0), (t, t), and (0, 2t). The theorem + proves the explicit split margin, alignment equivalence, and 4ε/8ε decision implications. + - declaration: VenSplit.split_integral + source_ref: "C196 v0.3, Theorem 4, p. 4, Eq. (27)" + informal: >- + Under the stated three-read integrability conditions, represents the calibrated split as + the shared-profile-weighted integral of the squared difference of the exponential factors. + - declaration: VenSplit.reading_error + source_ref: "C196 v0.3, Theorem 4, p. 4, Eq. (28)" + informal: >- + Three errors bounded in absolute value by ε give split error at most 4ε. + - declaration: VenMask.sphere_local_masking + source_ref: "C196 v0.3, Proposition 7, p. 6, Eq. (35)" + informal: >- + For a finite open-positive measure on the unit sphere, a fixed nonaligned reference angle, + a constant reference profile above one, and distinct controls, every sufficiently nearby + angle admits an explicit exponential-sum profile above one with all menu reads exactly matched. msc: ['28A25', '44A10'] tags: [inverse problems, spherical measure, moment cancellation, Laplace transforms]