From 271521e1709e4c69cd24ded1f1abd7b5d3bf610c Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Mon, 16 Nov 2026 16:06:01 +0800 Subject: [PATCH 1/8] NOR-23: formal exact coordinate audit and hypergeometric miss count --- MathCan/NOR23CoordinateAudit.lean | 220 ++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 MathCan/NOR23CoordinateAudit.lean diff --git a/MathCan/NOR23CoordinateAudit.lean b/MathCan/NOR23CoordinateAudit.lean new file mode 100644 index 00000000..52416d0a --- /dev/null +++ b/MathCan/NOR23CoordinateAudit.lean @@ -0,0 +1,220 @@ +import MathCan.NOR22ModularFutureCommitments +import Mathlib.Data.Finset.Powerset +import Mathlib.Data.Finset.Card + +/-! +# NOR-23: exact coordinate audits, hypergeometric budgets and adaptive evasion + +An authentic coordinate witness supplies exact target values at a finite +sample of positions. A mismatch proves the candidate false. If k if i = j then original i + 1 else original i + refine ⟨altered, ?_, ?_⟩ + · intro same + have h : altered j = original j := congrFun same j + have heq : original j + 1 = original j := by + simpa [altered] using h + omega + · intro i hi + have hij : i ≠ j := by + intro h + exact unseen (h ▸ hi) + change original i = altered i + simp [altered, hij] + +/-- Every budget strictly smaller than the finite coordinate universe + leaves at least one coordinate uninspected. -/ +theorem strict_subfull_budget_has_unseen_coordinate + [Fintype Coordinate] + (checked : Finset Coordinate) + (budget : checked.card < Fintype.card Coordinate) : + ∃ j : Coordinate, j ∉ checked := by + classical + by_contra hnone + have every : ∀ j : Coordinate, j ∈ checked := by + intro j + by_contra hj + exact hnone ⟨j, hj⟩ + have included : (Finset.univ : Finset Coordinate) ⊆ checked := by + intro j _ + exact every j + have countBound : Fintype.card Coordinate ≤ checked.card := by + simpa using (Finset.card_le_card included) + omega + +/-- An informed adversary can choose a one-coordinate alteration after + seeing any strict-subfull audit budget and evade all exact checks. -/ +theorem adaptive_attacker_has_undetected_alternate_future + [Fintype Coordinate] + (checked : Finset Coordinate) + (original : Coordinate → Int) + (budget : checked.card < Fintype.card Coordinate) : + ∃ altered : Coordinate → Int, + altered ≠ original ∧ agreesOn checked original altered := by + obtain ⟨j, unseen⟩ := + strict_subfull_budget_has_unseen_coordinate checked budget + exact invisible_single_coordinate_override checked original j unseen + +/-- An authenticated witness signal returns the actual coefficient at + inspected coordinates and no information elsewhere. -/ +noncomputable def revealedCoordinates + (checked : Finset Coordinate) + (target : Coordinate → Int) : Coordinate → Option Int := by + classical + exact fun i => if i ∈ checked then some (target i) else none + +/-- Two distinct targets agreeing on all checked positions supply the + same entire witness transcript to the public verifier. -/ +theorem identical_audit_transcripts_of_checked_agreement + (checked : Finset Coordinate) + (a b : Coordinate → Int) + (matches : agreesOn checked a b) : + revealedCoordinates checked a = revealedCoordinates checked b := by + classical + funext i + by_cases hi : i ∈ checked + · simp [revealedCoordinates, hi, matches i hi] + · simp [revealedCoordinates, hi] + +/-- Exact coordinate testimony cannot identify different hidden worlds + when their public sources and revealed coordinate values coincide. + A selector that can abstain still cannot be exact on both. -/ +theorem identical_public_and_partial_witness_worlds + (checked : Finset Coordinate) + (selector : (Public × (Coordinate → Option Int)) → + Option (Coordinate → Int)) + (public : Public) + (a b : Coordinate → Int) + (matches : agreesOn checked a b) + (different : a ≠ b) : + selector (public, revealedCoordinates checked a) ≠ some a ∨ + selector (public, revealedCoordinates checked b) ≠ some b := by + have same := + identical_audit_transcripts_of_checked_agreement checked a b matches + rw [← same] + exact MathCan.NOR21ObservationCompleteness.identical_public_worlds_cannot_both_be_future_correct + selector (public, revealedCoordinates checked a) a b different + +/-- The exact count of distinct k-coordinate challenge sets from an + n-coordinate universe equals the binomial coefficient choose(n,k). -/ +theorem total_k_coordinate_challenges + (universe : Finset Coordinate) (k : Nat) : + (Finset.powersetCard k universe).card = + Nat.choose universe.card k := by + exact Finset.card_powersetCard k universe + +/-- The number of k-subsets that avoid a fixed r-subset attack is exactly + choose(n-r,k). The attacker subset is fixed before the draw. -/ +theorem fixed_attack_undetected_challenge_count + (universe altered : Finset Coordinate) + (isSubset : altered ⊆ universe) + (k : Nat) : + (Finset.powersetCard k (universe \ altered)).card = + Nat.choose (universe.card - altered.card) k := by + classical + calc + (Finset.powersetCard k (universe \ altered)).card = + Nat.choose (universe \ altered).card k := + Finset.card_powersetCard k (universe \ altered) + _ = Nat.choose (universe.card - altered.card) k := by + rw [Finset.card_sdiff_of_subset isSubset] + +/-- The exact fraction of uniformly drawn k-subsets that miss a fixed + r-subset attack, expressed as a rational ratio of finite counts. + The applied experiment restricts to 0 ≤ k ≤ n, so the denominator + (choose(n,k)) is positive. -/ +theorem exact_hypergeometric_miss_fraction + (universe altered : Finset Coordinate) + (isSubset : altered ⊆ universe) + (k : Nat) : + ((Finset.powersetCard k (universe \ altered)).card : ℚ) / + ((Finset.powersetCard k universe).card : ℚ) = + (Nat.choose (universe.card - altered.card) k : ℚ) / + (Nat.choose universe.card k : ℚ) := by + rw [fixed_attack_undetected_challenge_count universe altered isSubset k, + total_k_coordinate_challenges universe k] + +#print axioms checked_disagreement_definitively_rejects +#print axioms audit_agreement_monotone +#print axioms complete_exact_audit_iff_target_equality +#print axioms invisible_single_coordinate_override +#print axioms strict_subfull_budget_has_unseen_coordinate +#print axioms adaptive_attacker_has_undetected_alternate_future +#print axioms identical_audit_transcripts_of_checked_agreement +#print axioms identical_public_and_partial_witness_worlds +#print axioms total_k_coordinate_challenges +#print axioms fixed_attack_undetected_challenge_count +#print axioms exact_hypergeometric_miss_fraction + +end MathCan.NOR23CoordinateAudit From 416653ea9d65bb62cfd306beb08a18b78ed917d7 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Mon, 16 Nov 2026 16:06:21 +0800 Subject: [PATCH 2/8] NOR-23: register coordinate-audit module in MathCan build --- MathCan.lean | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MathCan.lean b/MathCan.lean index d984a1f4..c4e738ea 100644 --- a/MathCan.lean +++ b/MathCan.lean @@ -103,3 +103,5 @@ import MathCan.NOR20BigintWidthBounds import MathCan.NOR21ObservationCompleteness import MathCan.NOR22ModularFutureCommitments + +import MathCan.NOR23CoordinateAudit From e7361c034b10331a06a2cfa2640a3c91619bd7d7 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Mon, 16 Nov 2026 16:06:47 +0800 Subject: [PATCH 3/8] NOR-23: document exact hypergeometric sample-count mathematics and trusted witness scope --- research/nor23/FINITE_COORDINATE_WITNESS.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 research/nor23/FINITE_COORDINATE_WITNESS.md diff --git a/research/nor23/FINITE_COORDINATE_WITNESS.md b/research/nor23/FINITE_COORDINATE_WITNESS.md new file mode 100644 index 00000000..0e957289 --- /dev/null +++ b/research/nor23/FINITE_COORDINATE_WITNESS.md @@ -0,0 +1,17 @@ +# NOR-23: authentic exact-coordinate witnesses and finite audit information + +Companion to the registered experiment [Compactification-Theory/NOR-23](https://github.com/MoralityLabAI/Compactification-Theory/blob/research/nor23-randomized-coordinate-audit-20261116/research/nor23_coordinate_audit/REGISTRATION.md), following the merged NOR-21 observation-completeness proof and NOR-22 modular-fingerprint boundary. + +The formal module [MathCan/NOR23CoordinateAudit.lean](../../MathCan/NOR23CoordinateAudit.lean) defines an exact witness \`agreesOn S f g\` for candidate target f, true target g and a finite inspected coordinate set S. Its theorems establish: + +- Any mismatch at an inspected coordinate is conclusive evidence of an incorrect candidate output. +- Checking every coordinate of a finite target is equivalent to target-function equality. +- Given any uninspected coordinate, construct an explicitly different target that agrees with the original at every inspected position. In particular, any audit budget smaller than the finite universe permits an adaptive one-position evasion. +- Identical complete public input and identical authenticated sampled target coefficients cannot distinguish these two hidden worlds to a deterministic possibly-abstaining selector. +- The **exact number** of k-coordinate samples drawn from an n-coordinate universe is \(\binom{n}{k}\). With a fixed r-coordinate attack, the number of samples that miss every changed coordinate is \(\binom{n-r}{k}\). This gives the exact finite fraction \(\binom{n-r}{k}/\binom{n}{k}\) for uniform k-subset sampling independent of a fixed prior attack. + +The combinatorial equation itself is kernel-proven using Mathlib \`Finset.card_powersetCard\` and \`Finset.card_sdiff_of_subset\`, with arbitrary finite coordinate types. Its interpretation as a probability presumes a uniform sampler and an attack chosen independently before sampling. **The Lean model does not prove that an external witness is authentic, that a PRNG is unpredictable, or that real theorem-proving goals belong to the RRC25 program family.** Those assumptions are stated explicitly in the applied preregistration. + +The experimental grid samples 12 genuinely distinct synthetic sources, observation degrees 512/1024 and output lengths 769/1537. For each source and audit budget k in {0,1,4,16,64}, it uses 4096 deterministic random k-subsets and two nonzero alteration magnitudes on radii r in {1,4,16}. A blind attack fixes its r altered coordinates before challenge sampling. A stronger informed attacker sees the sample first and can place altered coordinates in the complement. The 12 source identities, not the many paired challenge/world decisions, are the relevant independent-source unit. + +The source protocol and success conditions were committed before the first data generation. Any observed outcomes should be appended only after the original fixture and full-grade bytes have been preserved with SHA-256 and passed a separate independent replay audit. From 13f89cd1f82ed6f25b7aba49255da2f131772305 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Mon, 16 Nov 2026 16:07:05 +0800 Subject: [PATCH 4/8] NOR-23: CI kernel compilation and axiom audit --- .../workflows/nor23-coordinate-audit-lean.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/nor23-coordinate-audit-lean.yml diff --git a/.github/workflows/nor23-coordinate-audit-lean.yml b/.github/workflows/nor23-coordinate-audit-lean.yml new file mode 100644 index 00000000..d4bea957 --- /dev/null +++ b/.github/workflows/nor23-coordinate-audit-lean.yml @@ -0,0 +1,47 @@ +name: NOR-23 kernel coordinate audit, finite sample counts and adaptive evasion + +on: + push: + paths: + - 'MathCan/NOR23CoordinateAudit.lean' + - 'MathCan.lean' + - 'research/nor23/**' + - '.github/workflows/nor23-coordinate-audit-lean.yml' + pull_request: + paths: + - 'MathCan/NOR23CoordinateAudit.lean' + - 'MathCan.lean' + - 'research/nor23/**' + - '.github/workflows/nor23-coordinate-audit-lean.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + finite-coordinate-audit-kernel: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: leanprover/lean-action@v1 + with: + auto-config: false + build: true + build-args: MathCan + test: false + lint: false + use-mathlib-cache: false + - name: Kernel check audit mismatch, full equality, adaptive evasion, finite counts and axioms + shell: bash + run: | + set -euo pipefail + lake env lean MathCan/NOR23CoordinateAudit.lean | tee nor23-coordinate-audit-axioms.txt + if grep -Eq 'sorryAx|ofReduceBool|^error:|admit' nor23-coordinate-audit-axioms.txt; then + echo 'NOR23 unexpected admitted proof, compilation error or reduction marker' + exit 1 + fi + - uses: actions/upload-artifact@v4 + with: + name: nor23-exact-coordinate-audit-lean-axiom-inventory + path: nor23-coordinate-audit-axioms.txt From 711877ba13735c953c6bddc74f266a6dca12e9ae Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Mon, 16 Nov 2026 16:11:30 +0800 Subject: [PATCH 5/8] NOR-23: replace Mathlib-only Finset proof with standalone Lean 4.35 binomial recurrence --- MathCan/NOR23CoordinateAudit.lean | 238 ++++++++++++++++-------------- 1 file changed, 126 insertions(+), 112 deletions(-) diff --git a/MathCan/NOR23CoordinateAudit.lean b/MathCan/NOR23CoordinateAudit.lean index 52416d0a..8d2d8b2e 100644 --- a/MathCan/NOR23CoordinateAudit.lean +++ b/MathCan/NOR23CoordinateAudit.lean @@ -1,40 +1,35 @@ import MathCan.NOR22ModularFutureCommitments -import Mathlib.Data.Finset.Powerset -import Mathlib.Data.Finset.Card /-! -# NOR-23: exact coordinate audits, hypergeometric budgets and adaptive evasion - -An authentic coordinate witness supplies exact target values at a finite -sample of positions. A mismatch proves the candidate false. If k