|
| 1 | +/- |
| 2 | +Copyright 2026 Hyphaeic SPC. |
| 3 | +
|
| 4 | +Licensed under the Hyphaeic Public License, Version 1.0 (the |
| 5 | +"License"); you may not use this file except in compliance with |
| 6 | +the License. You may obtain a copy of the License at |
| 7 | +
|
| 8 | +https://github.com/hyphaeic/hpl |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 13 | +implied. See the License for the specific language governing |
| 14 | +permissions and limitations under the License. |
| 15 | +
|
| 16 | +# Adelic complex — gauge rigidity (the machine's boundary, machine-checked) |
| 17 | +
|
| 18 | +The boundary of the whole adelic project, proven. We asked: can an FDRS section with a |
| 19 | +*variable* base sequence `b = (b₀, b₁, …)` be glued to a `p`-adic place — a "synthetic |
| 20 | +prime" — preserving the place value? The honest answer is **no, except trivially**, and |
| 21 | +this file proves it. |
| 22 | +
|
| 23 | +The cumulative place value (the Baire-cylinder capacity / FDRS gauge) is |
| 24 | +`B_L = placeValue b L = ∏_{i<L} bᵢ`. The `p`-adic place value at depth `L` is `p^L`. The |
| 25 | +isometry/alignment condition — "the FDRS gauge matches `|·|_p`" — is `∀ L, B_L = p^L`. |
| 26 | +
|
| 27 | +> **`isometric_iff` (gauge rigidity).** `Isometric b p ↔ (∀ i, bᵢ = p)`. |
| 28 | +
|
| 29 | +So the gluing constraint **forces the constant base**: the only FDRS section aligned to a |
| 30 | +`p`-adic place *is* the constant-`p` one, which is the `p`-adic place itself. There is no |
| 31 | +genuine synthetic prime on `ℚ`. Any non-constant base is a **topological drain** |
| 32 | +(`not_isometric_of_ne`), and the drain opens at the *first* deviation |
| 33 | +(`gauge_deviates`) — a ledger-level safety interlock. |
| 34 | +
|
| 35 | +**Honest naming.** This is FDRS-*gauge* rigidity — the necessary condition for a base |
| 36 | +sequence to reproduce the `p`-adic place value. It is **not** Ostrowski's theorem (which |
| 37 | +classifies *all* absolute values of `ℚ`, and is the *background* fact guaranteeing the |
| 38 | +classical places are then the only ones). What is proven here is that the FDRS machine |
| 39 | +*respects* that boundary, constructively and import-free. |
| 40 | +
|
| 41 | +**Self-containment** (`placeValue_constRadix`): the constant-`p` FDRS gauge *is* `p^L`, so |
| 42 | +the machine measures `p`-adic precision with the FDRS-native `placeValue` — no `PadicInt` |
| 43 | +import for the metric (the only `ℚ_p` reference in the corpus is M0d's *soundness target*, |
| 44 | +as `ℝ` is for `emit_traps`). The constant-`p` section is the isometry-preserving drop-in |
| 45 | +for the `p`-adic place. Leaf module. No `sorry`; axiom-clean. |
| 46 | +-/ |
| 47 | +import FdrsFormal.Core.Primitives.PlaceValue |
| 48 | +import Mathlib.Tactic |
| 49 | + |
| 50 | +namespace FdrsFormal.Modes.Adelic |
| 51 | + |
| 52 | +open FdrsFormal.Core.Primitives |
| 53 | + |
| 54 | +/-- The constant radix sequence `bᵢ ≡ p` (a `RadixSeq` needs `p ≥ 2`). -/ |
| 55 | +def constRadix (p : ℕ) (hp : 2 ≤ p) : RadixSeq := ⟨fun _ => p, fun _ => hp⟩ |
| 56 | + |
| 57 | +@[simp] theorem constRadix_apply (p : ℕ) (hp : 2 ≤ p) (i : ℕ) : |
| 58 | + (constRadix p hp) i = p := rfl |
| 59 | + |
| 60 | +/-- **Gauge-alignment predicate.** An FDRS section with base `b` is aligned to the p-adic |
| 61 | +place `p` when its cumulative place value `B_L = ∏ bᵢ` equals the p-adic place value `p^L` |
| 62 | +at every depth — the precise sense of "the FDRS gauge matches `|·|_p`". -/ |
| 63 | +def Isometric (b : RadixSeq) (p : ℕ) : Prop := ∀ L, placeValue b L = p ^ L |
| 64 | + |
| 65 | +/-- **THE GAUGE RIGIDITY THEOREM.** An FDRS section is gauge-aligned to the p-adic place |
| 66 | +`p` **iff** its base sequence is the *constant* sequence `p`. The gluing constraint forces |
| 67 | +the classical place — there is no genuine "synthetic prime" on `ℚ`: any non-constant base |
| 68 | +breaks the alignment. (FDRS-gauge rigidity — the necessary condition to reproduce the |
| 69 | +p-adic place value; Ostrowski is the background fact that the classical places are then the |
| 70 | +only places of `ℚ`.) -/ |
| 71 | +theorem isometric_iff (b : RadixSeq) (p : ℕ) : Isometric b p ↔ ∀ i, b i = p := by |
| 72 | + constructor |
| 73 | + · -- alignment ⟹ constant base: cancel `p^i` from `p^i · bᵢ = p^{i+1} = p^i · p` |
| 74 | + intro hiso i |
| 75 | + have hp0 : 0 < p := by |
| 76 | + have h := hiso 1; rw [pow_one] at h; rw [← h]; exact placeValue.pos 1 |
| 77 | + have h1 := hiso (i + 1) |
| 78 | + rw [placeValue.succ, hiso i, pow_succ] at h1 |
| 79 | + exact Nat.eq_of_mul_eq_mul_left (pow_pos hp0 i) h1 |
| 80 | + · -- constant base ⟹ alignment: induction, `B_{L+1} = B_L · p = p^L · p = p^{L+1}` |
| 81 | + intro hb L |
| 82 | + induction L with |
| 83 | + | zero => simp |
| 84 | + | succ L ih => rw [placeValue.succ, ih, hb L, pow_succ] |
| 85 | + |
| 86 | +/-- **Self-containment / the isometry-preserving drop-in.** The constant-`p` FDRS gauge IS |
| 87 | +the p-adic place value: `placeValue (constRadix p) L = p^L`. So the adelic machine measures |
| 88 | +p-adic precision with the FDRS-native `placeValue` gauge — no `PadicInt` import needed for |
| 89 | +the metric. The constant-`p` FDRS section is an exact, alignment-preserving replacement for |
| 90 | +the p-adic place value. -/ |
| 91 | +theorem placeValue_constRadix (p : ℕ) (hp : 2 ≤ p) (L : ℕ) : |
| 92 | + placeValue (constRadix p hp) L = p ^ L := |
| 93 | + (isometric_iff (constRadix p hp) p).mpr (fun _ => rfl) L |
| 94 | + |
| 95 | +/-- **The drain theorem (failure mode).** Any base that deviates from the constant `p` |
| 96 | +(`∃ i, bᵢ ≠ p`) is **not** gauge-aligned — a "topological drain" that would break the |
| 97 | +product-formula conservation. The aligned sections are the single point `b ≡ p`. -/ |
| 98 | +theorem not_isometric_of_ne (b : RadixSeq) (p : ℕ) (h : ∃ i, b i ≠ p) : |
| 99 | + ¬ Isometric b p := fun hiso => by |
| 100 | + obtain ⟨i, hi⟩ := h; exact hi ((isometric_iff b p).mp hiso i) |
| 101 | + |
| 102 | +/-- **The drain opens at the first deviation (the ledger-level interlock).** If the gauge |
| 103 | +is still aligned up to depth `i` (`B_i = p^i`) but `bᵢ ≠ p`, then the gauge *fails* at |
| 104 | +depth `i+1` (`B_{i+1} ≠ p^{i+1}`). A non-constant base is detectable — and rejectable — at |
| 105 | +exactly the depth it deviates, before any product-formula violation can propagate. -/ |
| 106 | +theorem gauge_deviates (b : RadixSeq) (p : ℕ) (hp : 0 < p) (i : ℕ) (hi : b i ≠ p) |
| 107 | + (h : placeValue b i = p ^ i) : placeValue b (i + 1) ≠ p ^ (i + 1) := by |
| 108 | + rw [placeValue.succ, h, pow_succ] |
| 109 | + exact fun heq => hi (Nat.eq_of_mul_eq_mul_left (pow_pos hp i) heq) |
| 110 | + |
| 111 | +/-! ## Demo — the only aligned base for `p = 5` is the constant `5` (exact ℕ) -/ |
| 112 | + |
| 113 | +-- The constant-5 FDRS gauge is exactly the 5-adic place values `5^L`: |
| 114 | +#eval (List.range 6).map (placeValue (constRadix 5 (by norm_num))) -- [1, 5, 25, 125, 625, 3125] |
| 115 | +#eval (List.range 6).map (fun L => 5 ^ L) -- [1, 5, 25, 125, 625, 3125] |
| 116 | +-- a drain: the non-constant base `bᵢ = i+2` deviates from `5` immediately, so its gauge |
| 117 | +-- `B₁ = b₀ = 2 ≠ 5 = 5¹` — `not_isometric_of_ne`/`gauge_deviates` reject it. |
| 118 | +#eval placeValue ⟨fun i => i + 2, fun i => Nat.le_add_left 2 i⟩ 1 -- 2 (≠ 5¹ = 5: a drain) |
| 119 | + |
| 120 | +end FdrsFormal.Modes.Adelic |
0 commit comments