From 38b52f917a62255943d85d8817cb7aa24d4d4c3c Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:06:46 -0500 Subject: [PATCH 01/14] test: pin C296 regular-point chart interface --- .../workflows/c296-regular-point-chart.yml | 36 ++++++ .../2026-10-20-c296-regular-point-chart.md | 111 ++++++++++++++++++ .../RegularPointChart.lean | 12 ++ .../RegularPointChartInterface.lean | 29 +++++ .../lakefile.toml | 18 +++ .../lean-toolchain | 1 + 6 files changed, 207 insertions(+) create mode 100644 .github/workflows/c296-regular-point-chart.yml create mode 100644 docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md create mode 100644 frontiers/regular_point_chart_20261020/RegularPointChart.lean create mode 100644 frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean create mode 100644 frontiers/regular_point_chart_20261020/lakefile.toml create mode 100644 frontiers/regular_point_chart_20261020/lean-toolchain diff --git a/.github/workflows/c296-regular-point-chart.yml b/.github/workflows/c296-regular-point-chart.yml new file mode 100644 index 000000000..63f805da7 --- /dev/null +++ b/.github/workflows/c296-regular-point-chart.yml @@ -0,0 +1,36 @@ +name: C296 regular-point chart + +on: + pull_request: + paths: + - "frontiers/regular_point_chart_20261020/**" + - ".github/workflows/c296-regular-point-chart.yml" + workflow_dispatch: + +permissions: + contents: read + +jobs: + red-interface: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + fetch-depth: 0 + - uses: leanprover/lean-action@f061402b660e0c34644504b324e830f2991d4865 + with: + auto-config: 'false' + build: 'false' + test: 'false' + lint: 'false' + use-mathlib-cache: 'true' + use-github-cache: 'false' + lake-package-directory: frontiers/regular_point_chart_20261020 + - name: Build the exact C296 interface + working-directory: frontiers/regular_point_chart_20261020 + run: | + set -euo pipefail + lean --version + lake build RegularPointChartInterface diff --git a/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md b/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md new file mode 100644 index 000000000..acef80fe0 --- /dev/null +++ b/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md @@ -0,0 +1,111 @@ +# C296 Regular-Point Chart Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Kernel-check the literal regular scalar chart at a noncritical point of the project space `E d`, without weakening C294's closed-superlevel local-path-connectivity premise. + +**Architecture:** Add one isolated Lean package based on Math- PR #487 head `7af365e8c8db1ae0275d4efe08a70a678f153ca2`. The package copies C294's exact `Lifetime.lean` input, proves only the strict-derivative/surjective-derivative chart interface, and carries positive, negative, and axiom-audit modules. A packet-specific GitHub workflow provides red-then-green hosted execution because the local runtime cannot read `/proc//exe` in this environment. + +**Tech Stack:** Lean 4.34.1; Mathlib `d13f23b723b8a846827a245b89c10fc7d3f11612`; GitHub Actions `leanprover/lean-action@f061402b660e0c34644504b324e830f2991d4865`. + +**Spec:** `frontiers/critical_level_attainment_20261020/SCOPE.md`, narrowed by C295 finding `Math-#487/6289066726` and C296 pickup `Math-#487/6289277782`. + +## Global Constraints + +- Preserve every existing C294/C293 byte; the new packet is additive. +- Scientific effect remains NONE; no formal or scientific registry promotion. +- Do not prove or suggest a critical-point Morse chart, quotient transport, half-space relative LPC, or removal of C294's `LocallyPathConnectedSpace` premise. +- Pin Lean 4.34.1, Mathlib `d13f23b723b8a846827a245b89c10fc7d3f11612`, and every hosted source head used as evidence. +- Treat the local `/proc//exe` denial as a stop for local Lean execution; do not patch or bypass it. + +## Review Focus + +- Noncriticality must be used to prove the scalar derivative is nonzero; the negative module omits exactly that premise. +- Continuous-linear-map versus linear-map coercion must preserve the exact derivative and range statement. +- First-coordinate equality is global as a function equality, while inverse/homeomorphism claims remain restricted to source/target. +- The base point and `(g x, 0)` must be proved members of the chart's source and target. +- No theorem may silently imply closed-superlevel local path connectivity at critical points. + +--- + +### Task 1: Hosted red test for the missing project chart + +**Files:** +- Create: `frontiers/regular_point_chart_20261020/lean-toolchain` +- Create: `frontiers/regular_point_chart_20261020/lakefile.toml` +- Create: `frontiers/regular_point_chart_20261020/Lifetime.lean` +- Create: `frontiers/regular_point_chart_20261020/RegularPointChart.lean` +- Test: `frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean` +- Create: `.github/workflows/c296-regular-point-chart.yml` + +**Interfaces:** +- Consumes: C294 `UniversalLaw.Spec.Lifetime.E`, `IsSmooth`, and `IsCriticalPoint` from the exact copied `Lifetime.lean`. +- Produces: a failing interface test naming the intended `regularPointChart` declaration and its source/target identities. + +- [ ] **Step 1: Write the failing interface test** + +The test imports `RegularPointChart` and invokes the wished-for chart plus first-coordinate, self, source-membership, and target-membership declarations at arbitrary `d`, `g`, and `x` under smoothness and noncriticality. + +- [ ] **Step 2: Run the hosted test to verify it fails** + +Run: open a draft PR from `codex/c296-regular-point-chart-20261020` to `codex/c294-critical-level-attainment-20261020` and wait for `c296-regular-point-chart`. + +Expected: FAIL at the exact red commit because `regularPointChart` (or its first intended helper) is unknown; setup/toolchain/source errors do not count as RED. + +- [ ] **Step 3: Commit the red harness** + +Commit message: `test: pin C296 regular-point chart interface` + +### Task 2: Minimal literal chart implementation + +**Files:** +- Modify: `frontiers/regular_point_chart_20261020/RegularPointChart.lean` +- Test: `frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean` +- Test: `frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean` +- Test: `frontiers/regular_point_chart_20261020/RegularPointChartAxiomAudit.lean` + +**Interfaces:** +- Consumes: `(hg 1).hasStrictFDerivAt`, `Module.Dual.range_eq_top_of_ne_zero`, and `HasStrictFDerivAt.implicitToOpenPartialHomeomorph` at the pinned Mathlib revision. +- Produces: `regularPointDerivative_range_eq_top`, `regularPointHasStrictFDerivAt`, `regularPointChart`, `regularPointChart_fst`, `regularPointChart_self`, `mem_regularPointChart_source`, and `mem_regularPointChart_target`. + +- [ ] **Step 1: Implement only the derivative and chart declarations required by the failing interface test** + +Use `fderiv ℝ g x` literally; derive strict differentiability from `IsSmooth`; convert noncriticality to a nonzero continuous linear functional, then to full scalar range; invoke the existing Mathlib chart. + +- [ ] **Step 2: Add the omitted-noncriticality interface rejection** + +The negative module must fail by leaving the required `¬ IsCriticalPoint d g x` argument unsupplied. The workflow must require a nonzero exit and a diagnostic mentioning `IsCriticalPoint`; timeout/import/syntax/unknown-production-identifier failures do not count. + +- [ ] **Step 3: Run hosted tests to verify they pass** + +Expected: positive modules build with warnings as errors; the negative module is rejected for the intended missing premise; named-module `leanchecker` and the axiom audit succeed. + +- [ ] **Step 4: Commit the minimal implementation** + +Commit message: `feat: instantiate the regular scalar chart` + +### Task 3: Freeze source identities and hand off review + +**Files:** +- Create: `frontiers/regular_point_chart_20261020/README.md` +- Create: `frontiers/regular_point_chart_20261020/SCOPE.md` +- Create: `frontiers/regular_point_chart_20261020/SOURCE_SHA256SUMS` +- Create: `frontiers/regular_point_chart_20261020/RESULTS.md` + +**Interfaces:** +- Consumes: exact green head, workflow run/job identities, test streams, and Git blob/SHA-256 identities. +- Produces: a source-bound reviewable packet and explicit release record; no acceptance or integration claim. + +- [ ] **Step 1: Record exact source, toolchain, positive/negative, axiom, and hosted-run identities** + +- [ ] **Step 2: Re-run the full hosted workflow at the frozen documentation head** + +Expected: all C296 jobs green at the new exact head; previous green evidence is stale if source bytes changed. + +- [ ] **Step 3: Commit documentation and request bounded nonauthor review** + +Commit message: `docs: freeze C296 execution scope` + +- [ ] **Step 4: Post result/release on Math-#487 and pointer on main#419** + +The release must state exact head, source blobs/digests, run IDs, negative-control reason, axiom scope, local platform denial, and all exclusions. diff --git a/frontiers/regular_point_chart_20261020/RegularPointChart.lean b/frontiers/regular_point_chart_20261020/RegularPointChart.lean new file mode 100644 index 000000000..b62a11d7d --- /dev/null +++ b/frontiers/regular_point_chart_20261020/RegularPointChart.lean @@ -0,0 +1,12 @@ +import Lifetime + +/-! +# Regular scalar chart at a noncritical point + +This module is intentionally empty in the C296 RED commit. The companion +interface names the exact declarations that the implementation must supply. +-/ + +namespace UniversalLaw.Spec.Lifetime + +end UniversalLaw.Spec.Lifetime diff --git a/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean b/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean new file mode 100644 index 000000000..00c3b848e --- /dev/null +++ b/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean @@ -0,0 +1,29 @@ +import RegularPointChart + +open scoped Topology + +namespace UniversalLaw.Spec.Lifetime + +variable {d : ℕ} {g : E d → ℝ} {x : E d} + +example (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : + OpenPartialHomeomorph (E d) (ℝ × (fderiv ℝ g x).ker) := + regularPointChart hg hx + +example (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) (y : E d) : + (regularPointChart hg hx y).1 = g y := + regularPointChart_fst hg hx y + +example (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : + regularPointChart hg hx x = (g x, 0) := + regularPointChart_self hg hx + +example (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : + x ∈ (regularPointChart hg hx).source := + mem_regularPointChart_source hg hx + +example (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : + (g x, 0) ∈ (regularPointChart hg hx).target := + mem_regularPointChart_target hg hx + +end UniversalLaw.Spec.Lifetime diff --git a/frontiers/regular_point_chart_20261020/lakefile.toml b/frontiers/regular_point_chart_20261020/lakefile.toml new file mode 100644 index 000000000..96f302070 --- /dev/null +++ b/frontiers/regular_point_chart_20261020/lakefile.toml @@ -0,0 +1,18 @@ +name = "c296_regular_point_chart" +version = "0.1.0" +defaultTargets = ["RegularPointChartInterface"] + +[[require]] +name = "mathlib" +git = "https://github.com/leanprover-community/mathlib4.git" +rev = "d13f23b723b8a846827a245b89c10fc7d3f11612" + +[[lean_lib]] +name = "Lifetime" +srcDir = "../critical_level_attainment_20261020/final-project" + +[[lean_lib]] +name = "RegularPointChart" + +[[lean_lib]] +name = "RegularPointChartInterface" diff --git a/frontiers/regular_point_chart_20261020/lean-toolchain b/frontiers/regular_point_chart_20261020/lean-toolchain new file mode 100644 index 000000000..ba8ebf2db --- /dev/null +++ b/frontiers/regular_point_chart_20261020/lean-toolchain @@ -0,0 +1 @@ +leanprover/lean4:v4.34.1 From 73f879c6b3f56cb555c00cf010a7cbb642263980 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:09:11 -0500 Subject: [PATCH 02/14] test: pin C296 Lake dependency closure --- .../lake-manifest.json | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 frontiers/regular_point_chart_20261020/lake-manifest.json diff --git a/frontiers/regular_point_chart_20261020/lake-manifest.json b/frontiers/regular_point_chart_20261020/lake-manifest.json new file mode 100644 index 000000000..8ceb35d8b --- /dev/null +++ b/frontiers/regular_point_chart_20261020/lake-manifest.json @@ -0,0 +1,118 @@ +{ + "version": "1.2.0", + "packagesDir": ".lake/packages", + "packages": [ + { + "name": "plausible", + "url": "https://github.com/leanprover-community/plausible", + "type": "git", + "subDir": null, + "scope": "leanprover-community", + "rev": "118aa17ee84656b8bd727fef7c458ee8c833385c", + "manifestFile": "lake-manifest.json", + "inputRev": "main", + "inherited": true, + "configFile": "lakefile.toml" + }, + { + "name": "LeanSearchClient", + "url": "https://github.com/leanprover-community/LeanSearchClient", + "type": "git", + "subDir": null, + "scope": "leanprover-community", + "rev": "ddf04cf3949fa556442341e87d47f9f6e6074707", + "manifestFile": "lake-manifest.json", + "inputRev": "main", + "inherited": true, + "configFile": "lakefile.toml" + }, + { + "name": "importGraph", + "url": "https://github.com/leanprover-community/import-graph", + "type": "git", + "subDir": null, + "scope": "leanprover-community", + "rev": "e928b72544873815af278d38681b31c0293588e3", + "manifestFile": "lake-manifest.json", + "inputRev": "main", + "inherited": true, + "configFile": "lakefile.toml" + }, + { + "name": "proofwidgets", + "url": "https://github.com/leanprover-community/ProofWidgets4", + "type": "git", + "subDir": null, + "scope": "leanprover-community", + "rev": "106ff4fafc74ef4ac99d81dbf3ab399118f497a5", + "manifestFile": "lake-manifest.json", + "inputRev": "main", + "inherited": true, + "configFile": "lakefile.lean" + }, + { + "name": "aesop", + "url": "https://github.com/leanprover-community/aesop", + "type": "git", + "subDir": null, + "scope": "leanprover-community", + "rev": "355695d523e41d0554926416cba2a2b3544fbbc9", + "manifestFile": "lake-manifest.json", + "inputRev": "master", + "inherited": true, + "configFile": "lakefile.toml" + }, + { + "name": "Qq", + "url": "https://github.com/leanprover-community/quote4", + "type": "git", + "subDir": null, + "scope": "leanprover-community", + "rev": "6a489d9af5d0c47e5b259e2e8bcdfc1811b5a259", + "manifestFile": "lake-manifest.json", + "inputRev": "master", + "inherited": true, + "configFile": "lakefile.toml" + }, + { + "name": "batteries", + "url": "https://github.com/leanprover-community/batteries", + "type": "git", + "subDir": null, + "scope": "leanprover-community", + "rev": "f2effa3d803fda822b1f97b806c47cf2adfbcbc2", + "manifestFile": "lake-manifest.json", + "inputRev": "main", + "inherited": true, + "configFile": "lakefile.toml" + }, + { + "name": "Cli", + "url": "https://github.com/leanprover/lean4-cli", + "type": "git", + "subDir": null, + "scope": "leanprover", + "rev": "e92c9f15fdfacc8536f31cfb3b7ad26c3c8cd204", + "manifestFile": "lake-manifest.json", + "inputRev": "v4.34.0", + "inherited": true, + "configFile": "lakefile.toml" + }, + { + "name": "mathlib", + "url": "https://github.com/leanprover-community/mathlib4.git", + "type": "git", + "subDir": null, + "scope": "", + "rev": "d13f23b723b8a846827a245b89c10fc7d3f11612", + "manifestFile": "lake-manifest.json", + "inputRev": "d13f23b723b8a846827a245b89c10fc7d3f11612", + "inherited": false, + "configFile": "lakefile.lean" + } + ], + "name": "c296_regular_point_chart", + "lakeDir": ".lake", + "fixedToolchain": true +} + From 9873446f5728799ef3d12808df65344827ac4754 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:13:03 -0500 Subject: [PATCH 03/14] feat: instantiate the regular scalar chart --- .../workflows/c296-regular-point-chart.yml | 26 ++++++++- .../2026-10-20-c296-regular-point-chart.md | 6 +- .../RegularPointChart.lean | 56 ++++++++++++++++++- .../RegularPointChartAxiomAudit.lean | 9 +++ .../WithoutNoncriticality.lean | 13 +++++ 5 files changed, 102 insertions(+), 8 deletions(-) create mode 100644 frontiers/regular_point_chart_20261020/RegularPointChartAxiomAudit.lean create mode 100644 frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean diff --git a/.github/workflows/c296-regular-point-chart.yml b/.github/workflows/c296-regular-point-chart.yml index 63f805da7..32dc942ea 100644 --- a/.github/workflows/c296-regular-point-chart.yml +++ b/.github/workflows/c296-regular-point-chart.yml @@ -11,7 +11,7 @@ permissions: contents: read jobs: - red-interface: + regular-point-chart: runs-on: ubuntu-latest timeout-minutes: 30 steps: @@ -28,9 +28,29 @@ jobs: use-mathlib-cache: 'true' use-github-cache: 'false' lake-package-directory: frontiers/regular_point_chart_20261020 - - name: Build the exact C296 interface + - name: Build and kernel-check the exact C296 interface working-directory: frontiers/regular_point_chart_20261020 run: | set -euo pipefail lean --version - lake build RegularPointChartInterface + lake build RegularPointChart RegularPointChartInterface + lake env lean --wfail RegularPointChart.lean + lake env lean --wfail RegularPointChartInterface.lean + lake env leanchecker RegularPointChart + lake env leanchecker RegularPointChartInterface + lake env lean RegularPointChartAxiomAudit.lean + - name: Require omission of noncriticality to be rejected + working-directory: frontiers/regular_point_chart_20261020 + run: | + set -euo pipefail + set +e + lake env lean WithoutNoncriticality.lean > negative.stdout 2> negative.stderr + status=$? + set -e + cat negative.stdout + cat negative.stderr >&2 + test "$status" -ne 0 + grep -Eq 'IsCriticalPoint|noncritical|regularPointChart' negative.stderr + if grep -Eq 'Unknown identifier.*regularPointChart' negative.stderr; then + exit 1 + fi diff --git a/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md b/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md index acef80fe0..df80a639f 100644 --- a/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md +++ b/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md @@ -42,17 +42,17 @@ - Consumes: C294 `UniversalLaw.Spec.Lifetime.E`, `IsSmooth`, and `IsCriticalPoint` from the exact copied `Lifetime.lean`. - Produces: a failing interface test naming the intended `regularPointChart` declaration and its source/target identities. -- [ ] **Step 1: Write the failing interface test** +- [x] **Step 1: Write the failing interface test** The test imports `RegularPointChart` and invokes the wished-for chart plus first-coordinate, self, source-membership, and target-membership declarations at arbitrary `d`, `g`, and `x` under smoothness and noncriticality. -- [ ] **Step 2: Run the hosted test to verify it fails** +- [x] **Step 2: Run the hosted test to verify it fails** Run: open a draft PR from `codex/c296-regular-point-chart-20261020` to `codex/c294-critical-level-attainment-20261020` and wait for `c296-regular-point-chart`. Expected: FAIL at the exact red commit because `regularPointChart` (or its first intended helper) is unknown; setup/toolchain/source errors do not count as RED. -- [ ] **Step 3: Commit the red harness** +- [x] **Step 3: Commit the red harness** Commit message: `test: pin C296 regular-point chart interface` diff --git a/frontiers/regular_point_chart_20261020/RegularPointChart.lean b/frontiers/regular_point_chart_20261020/RegularPointChart.lean index b62a11d7d..77a75a461 100644 --- a/frontiers/regular_point_chart_20261020/RegularPointChart.lean +++ b/frontiers/regular_point_chart_20261020/RegularPointChart.lean @@ -3,10 +3,62 @@ import Lifetime /-! # Regular scalar chart at a noncritical point -This module is intentionally empty in the C296 RED commit. The companion -interface names the exact declarations that the implementation must supply. +The construction is the finite-dimensional scalar specialization of Mathlib's +strict implicit-function chart. It uses noncriticality only to prove that the +derivative has full range. -/ namespace UniversalLaw.Spec.Lifetime +variable {d : ℕ} {g : E d → ℝ} {x : E d} + +/-- At a noncritical point, the scalar derivative has full range. -/ +theorem regularPointDerivative_range_eq_top (hx : ¬ IsCriticalPoint d g x) : + (fderiv ℝ g x).range = ⊤ := by + have hne : (fderiv ℝ g x).toLinearMap ≠ 0 := by + intro hzero + apply hx + unfold IsCriticalPoint + ext y + have hy := LinearMap.congr_fun hzero y + simpa using hy + exact Module.Dual.range_eq_top_of_ne_zero hne + +/-- Smoothness supplies the strict derivative used by the chart. -/ +theorem regularPointHasStrictFDerivAt (hg : IsSmooth d g) : + HasStrictFDerivAt g (fderiv ℝ g x) x := + (hg 1).hasStrictFDerivAt (by norm_num) + +/-- The literal local scalar chart at a noncritical point. -/ +noncomputable def regularPointChart (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : + OpenPartialHomeomorph (E d) (ℝ × (fderiv ℝ g x).ker) := + (regularPointHasStrictFDerivAt hg).implicitToOpenPartialHomeomorph + g (fderiv ℝ g x) (regularPointDerivative_range_eq_top hx) + +/-- The chart's first coordinate is exactly `g`, globally as a function equality. -/ +@[simp] +theorem regularPointChart_fst (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) (y : E d) : + (regularPointChart hg hx y).1 = g y := by + exact HasStrictFDerivAt.implicitToOpenPartialHomeomorph_fst + (regularPointHasStrictFDerivAt hg) (regularPointDerivative_range_eq_top hx) y + +/-- The chart sends the base point to `(g x, 0)`. -/ +@[simp] +theorem regularPointChart_self (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : + regularPointChart hg hx x = (g x, 0) := by + exact HasStrictFDerivAt.implicitToOpenPartialHomeomorph_self + (regularPointHasStrictFDerivAt hg) (regularPointDerivative_range_eq_top hx) + +/-- The base point belongs to the chart source. -/ +theorem mem_regularPointChart_source (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : + x ∈ (regularPointChart hg hx).source := by + exact HasStrictFDerivAt.mem_implicitToOpenPartialHomeomorph_source + (regularPointHasStrictFDerivAt hg) (regularPointDerivative_range_eq_top hx) + +/-- The image base point belongs to the chart target. -/ +theorem mem_regularPointChart_target (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : + (g x, 0) ∈ (regularPointChart hg hx).target := by + exact HasStrictFDerivAt.mem_implicitToOpenPartialHomeomorph_target + (regularPointHasStrictFDerivAt hg) (regularPointDerivative_range_eq_top hx) + end UniversalLaw.Spec.Lifetime diff --git a/frontiers/regular_point_chart_20261020/RegularPointChartAxiomAudit.lean b/frontiers/regular_point_chart_20261020/RegularPointChartAxiomAudit.lean new file mode 100644 index 000000000..2d77d7678 --- /dev/null +++ b/frontiers/regular_point_chart_20261020/RegularPointChartAxiomAudit.lean @@ -0,0 +1,9 @@ +import RegularPointChart + +#print axioms UniversalLaw.Spec.Lifetime.regularPointDerivative_range_eq_top +#print axioms UniversalLaw.Spec.Lifetime.regularPointHasStrictFDerivAt +#print axioms UniversalLaw.Spec.Lifetime.regularPointChart +#print axioms UniversalLaw.Spec.Lifetime.regularPointChart_fst +#print axioms UniversalLaw.Spec.Lifetime.regularPointChart_self +#print axioms UniversalLaw.Spec.Lifetime.mem_regularPointChart_source +#print axioms UniversalLaw.Spec.Lifetime.mem_regularPointChart_target diff --git a/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean b/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean new file mode 100644 index 000000000..471e2a456 --- /dev/null +++ b/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean @@ -0,0 +1,13 @@ +import RegularPointChart + +namespace UniversalLaw.Spec.Lifetime + +variable {d : ℕ} {g : E d → ℝ} {x : E d} + +-- This must be rejected: smoothness alone does not provide the required +-- `¬ IsCriticalPoint d g x` argument. +example (hg : IsSmooth d g) : + OpenPartialHomeomorph (E d) (ℝ × (fderiv ℝ g x).ker) := + regularPointChart hg + +end UniversalLaw.Spec.Lifetime From 88ae37d916bb2223a85bcfff21c018417d205b47 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:16:06 -0500 Subject: [PATCH 04/14] test: mark C296 chart harness noncomputable --- .../RegularPointChartInterface.lean | 2 ++ .../regular_point_chart_20261020/WithoutNoncriticality.lean | 2 ++ 2 files changed, 4 insertions(+) diff --git a/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean b/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean index 00c3b848e..b47a77ed4 100644 --- a/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean +++ b/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean @@ -4,6 +4,8 @@ open scoped Topology namespace UniversalLaw.Spec.Lifetime +noncomputable section + variable {d : ℕ} {g : E d → ℝ} {x : E d} example (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : diff --git a/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean b/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean index 471e2a456..3cab9eb9c 100644 --- a/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean +++ b/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean @@ -2,6 +2,8 @@ import RegularPointChart namespace UniversalLaw.Spec.Lifetime +noncomputable section + variable {d : ℕ} {g : E d → ℝ} {x : E d} -- This must be rejected: smoothness alone does not provide the required From f096fcae370707d05c85ef81dfa32bb6aa493912 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:21:01 -0500 Subject: [PATCH 05/14] test: close C296 noncomputable harness scopes --- .../RegularPointChartInterface.lean | 2 ++ .../regular_point_chart_20261020/WithoutNoncriticality.lean | 2 ++ 2 files changed, 4 insertions(+) diff --git a/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean b/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean index b47a77ed4..4885f7a0e 100644 --- a/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean +++ b/frontiers/regular_point_chart_20261020/RegularPointChartInterface.lean @@ -28,4 +28,6 @@ example (hg : IsSmooth d g) (hx : ¬ IsCriticalPoint d g x) : (g x, 0) ∈ (regularPointChart hg hx).target := mem_regularPointChart_target hg hx +end + end UniversalLaw.Spec.Lifetime diff --git a/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean b/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean index 3cab9eb9c..dd97a6073 100644 --- a/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean +++ b/frontiers/regular_point_chart_20261020/WithoutNoncriticality.lean @@ -12,4 +12,6 @@ example (hg : IsSmooth d g) : OpenPartialHomeomorph (E d) (ℝ × (fderiv ℝ g x).ker) := regularPointChart hg +end + end UniversalLaw.Spec.Lifetime From 7f607054a9611d2d6978562bb5ae0aec3f40b4d6 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:24:36 -0500 Subject: [PATCH 06/14] ci: use Lean 4.34 warning escalation --- .github/workflows/c296-regular-point-chart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c296-regular-point-chart.yml b/.github/workflows/c296-regular-point-chart.yml index 32dc942ea..9a9b83c49 100644 --- a/.github/workflows/c296-regular-point-chart.yml +++ b/.github/workflows/c296-regular-point-chart.yml @@ -34,8 +34,8 @@ jobs: set -euo pipefail lean --version lake build RegularPointChart RegularPointChartInterface - lake env lean --wfail RegularPointChart.lean - lake env lean --wfail RegularPointChartInterface.lean + lake env lean -E warning RegularPointChart.lean + lake env lean -E warning RegularPointChartInterface.lean lake env leanchecker RegularPointChart lake env leanchecker RegularPointChartInterface lake env lean RegularPointChartAxiomAudit.lean From 4aaddf42c474eee783f08b0350e705cea2cff181 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:28:09 -0500 Subject: [PATCH 07/14] ci: match C296 negative diagnostic stream --- .github/workflows/c296-regular-point-chart.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/c296-regular-point-chart.yml b/.github/workflows/c296-regular-point-chart.yml index 9a9b83c49..4fd6f02ca 100644 --- a/.github/workflows/c296-regular-point-chart.yml +++ b/.github/workflows/c296-regular-point-chart.yml @@ -44,13 +44,12 @@ jobs: run: | set -euo pipefail set +e - lake env lean WithoutNoncriticality.lean > negative.stdout 2> negative.stderr + lake env lean WithoutNoncriticality.lean > negative.log 2>&1 status=$? set -e - cat negative.stdout - cat negative.stderr >&2 + cat negative.log test "$status" -ne 0 - grep -Eq 'IsCriticalPoint|noncritical|regularPointChart' negative.stderr - if grep -Eq 'Unknown identifier.*regularPointChart' negative.stderr; then + grep -Eq 'IsCriticalPoint|noncritical|regularPointChart' negative.log + if grep -Eq 'Unknown identifier.*regularPointChart' negative.log; then exit 1 fi From 72edcf5b93be45c29f2d10a26f7d8e861a48f528 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:32:47 -0500 Subject: [PATCH 08/14] docs: freeze C296 execution scope --- .../2026-10-20-c296-regular-point-chart.md | 10 ++-- .../regular_point_chart_20261020/README.md | 35 +++++++++++++ .../regular_point_chart_20261020/RESULTS.md | 49 +++++++++++++++++++ .../regular_point_chart_20261020/SCOPE.md | 42 ++++++++++++++++ .../SOURCE_SHA256SUMS | 9 ++++ 5 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 frontiers/regular_point_chart_20261020/README.md create mode 100644 frontiers/regular_point_chart_20261020/RESULTS.md create mode 100644 frontiers/regular_point_chart_20261020/SCOPE.md create mode 100644 frontiers/regular_point_chart_20261020/SOURCE_SHA256SUMS diff --git a/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md b/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md index df80a639f..f09c352f4 100644 --- a/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md +++ b/docs/superpowers/plans/2026-10-20-c296-regular-point-chart.md @@ -68,19 +68,19 @@ Commit message: `test: pin C296 regular-point chart interface` - Consumes: `(hg 1).hasStrictFDerivAt`, `Module.Dual.range_eq_top_of_ne_zero`, and `HasStrictFDerivAt.implicitToOpenPartialHomeomorph` at the pinned Mathlib revision. - Produces: `regularPointDerivative_range_eq_top`, `regularPointHasStrictFDerivAt`, `regularPointChart`, `regularPointChart_fst`, `regularPointChart_self`, `mem_regularPointChart_source`, and `mem_regularPointChart_target`. -- [ ] **Step 1: Implement only the derivative and chart declarations required by the failing interface test** +- [x] **Step 1: Implement only the derivative and chart declarations required by the failing interface test** Use `fderiv ℝ g x` literally; derive strict differentiability from `IsSmooth`; convert noncriticality to a nonzero continuous linear functional, then to full scalar range; invoke the existing Mathlib chart. -- [ ] **Step 2: Add the omitted-noncriticality interface rejection** +- [x] **Step 2: Add the omitted-noncriticality interface rejection** The negative module must fail by leaving the required `¬ IsCriticalPoint d g x` argument unsupplied. The workflow must require a nonzero exit and a diagnostic mentioning `IsCriticalPoint`; timeout/import/syntax/unknown-production-identifier failures do not count. -- [ ] **Step 3: Run hosted tests to verify they pass** +- [x] **Step 3: Run hosted tests to verify they pass** Expected: positive modules build with warnings as errors; the negative module is rejected for the intended missing premise; named-module `leanchecker` and the axiom audit succeed. -- [ ] **Step 4: Commit the minimal implementation** +- [x] **Step 4: Commit the minimal implementation** Commit message: `feat: instantiate the regular scalar chart` @@ -96,7 +96,7 @@ Commit message: `feat: instantiate the regular scalar chart` - Consumes: exact green head, workflow run/job identities, test streams, and Git blob/SHA-256 identities. - Produces: a source-bound reviewable packet and explicit release record; no acceptance or integration claim. -- [ ] **Step 1: Record exact source, toolchain, positive/negative, axiom, and hosted-run identities** +- [x] **Step 1: Record exact source, toolchain, positive/negative, axiom, and hosted-run identities** - [ ] **Step 2: Re-run the full hosted workflow at the frozen documentation head** diff --git a/frontiers/regular_point_chart_20261020/README.md b/frontiers/regular_point_chart_20261020/README.md new file mode 100644 index 000000000..f6af6b350 --- /dev/null +++ b/frontiers/regular_point_chart_20261020/README.md @@ -0,0 +1,35 @@ +# C296: regular scalar chart at a noncritical point + +C296 instantiates Mathlib's finite-dimensional implicit-function chart for the +literal C294 project space `E d` and a smooth scalar function `g : E d → ℝ` at +a point `x` satisfying `¬ IsCriticalPoint d g x`. + +The production module proves that the derivative has full scalar range, derives +the strict derivative from the project's `IsSmooth` predicate, and exposes an +`OpenPartialHomeomorph (E d) (ℝ × (fderiv ℝ g x).ker)`. Its first coordinate is +exactly `g`; it sends `x` to `(g x, 0)`; and those points are members of the +chart's source and target. + +This is a local regular-point tool only. It does not construct a chart at a +critical point, prove a Morse normal form, transport local path connectivity +through a quotient or half-space, or remove C294's explicit +`LocallyPathConnectedSpace` premise. Scientific effect is **NONE**. + +## Reproduction + +From this directory, with the pinned toolchain available: + +```text +lake build RegularPointChart RegularPointChartInterface +lake env lean -E warning RegularPointChart.lean +lake env lean -E warning RegularPointChartInterface.lean +lake env leanchecker RegularPointChart +lake env leanchecker RegularPointChartInterface +lake env lean RegularPointChartAxiomAudit.lean +``` + +`WithoutNoncriticality.lean` is a negative fixture and must fail with a type +mismatch requiring `¬ IsCriticalPoint`. See `RESULTS.md` for hosted identities +and `SCOPE.md` for the exact boundary. + +[Owner mandate](https://github.com/d6g8k5htny-coder/main/blob/b665307520948308a53d190d7341bf301df3b3a2/governance/OWNER_MANDATE_20261015.md) · [Standing delegation](https://github.com/d6g8k5htny-coder/main/blob/main/governance/OP-AUTONOMY-20260923-v2.1.md) diff --git a/frontiers/regular_point_chart_20261020/RESULTS.md b/frontiers/regular_point_chart_20261020/RESULTS.md new file mode 100644 index 000000000..719488d47 --- /dev/null +++ b/frontiers/regular_point_chart_20261020/RESULTS.md @@ -0,0 +1,49 @@ +# C296 hosted results + +## Source identities + +- base and PR target: Math- PR #487 head + `7af365e8c8db1ae0275d4efe08a70a678f153ca2`; +- implementation GREEN head: `4aaddf42c474eee783f08b0350e705cea2cff181`; +- production Git blob: `77a75a4611040973ad355aff40555a808f1816e7`; +- positive-interface blob: `4885f7a0e8fdb7f1d3ab308991b043c438dbb8ef`; +- negative-control blob: `dd97a6073da0ea9bf87a19cb910daea2b46ca365`; +- axiom-audit blob: `2d77d76781209655c1a02478f5dccc827d573a78`; +- exact external C294 `Lifetime.lean` blob: + `f2508f7f2e3fd42f22f5aa52bc5ead5ff9e73b9a`; +- Lean `v4.34.1`, commit `5045d0056413266e57c625dcd7c365b10e377c52`; +- Mathlib `d13f23b723b8a846827a245b89c10fc7d3f11612`; +- workflow action `leanprover/lean-action@f061402b660e0c34644504b324e830f2991d4865`. + +`SOURCE_SHA256SUMS` binds the complete implementation, interface/control, +toolchain/dependency, workflow, and consumed C294 source bytes. + +## Verified execution + +GitHub Actions run +[39415169578](https://github.com/d6g8k5htny-coder/Math-/actions/runs/39415169578), +job `118602321184`, succeeded at the implementation GREEN head. + +- `Lifetime`, `RegularPointChart`, and `RegularPointChartInterface` built; +- production and interface passed Lean `-E warning` rechecks; +- standalone `leanchecker` passed for both named new modules; +- all seven audited declarations reported only `propext`, + `Classical.choice`, and `Quot.sound`; +- the omitted-noncriticality fixture exited nonzero with the intended type + mismatch: `regularPointChart hg` still required + `¬ IsCriticalPoint d g ...`; +- the exact GREEN-head repository downstream hard gate passed in run + [39415169606](https://github.com/d6g8k5htny-coder/Math-/actions/runs/39415169606). + +Earlier runs preserve setup and harness failures rather than suppressing them: +`39412669016`, `39413381712`, `39413746410`, `39414329053`, and +`39414753347`. The valid RED is run `39412930269`, job `118594890340`, which +built the exact consumed source and rejected the missing chart declarations. + +## Limits + +Local Lean execution was unavailable because the downloaded Lean 4.34.1 runtime +could not read `/proc//exe` in this environment. No runtime patch or bypass +was attempted. Hosted checks are execution evidence, not scientific acceptance, +external independent replay, correspondence review, or authorization to merge. +Scientific effect remains **NONE**. diff --git a/frontiers/regular_point_chart_20261020/SCOPE.md b/frontiers/regular_point_chart_20261020/SCOPE.md new file mode 100644 index 000000000..6021c2aba --- /dev/null +++ b/frontiers/regular_point_chart_20261020/SCOPE.md @@ -0,0 +1,42 @@ +# C296 scope + +## Exact claim + +For arbitrary `d`, `g : E d → ℝ`, and `x : E d`, the packet consumes: + +- `hg : IsSmooth d g`; +- `hx : ¬ IsCriticalPoint d g x`. + +It proves the literal derivative range equality, the strict derivative, and the +regular scalar chart with its first-coordinate, base-point, source-membership, +and target-membership identities. The derivative is exactly +`fderiv ℝ g x`; it is not replaced by an abstract equivalent. + +## Logical boundary + +Noncriticality is used to show that the continuous linear functional is +nonzero, then `Module.Dual.range_eq_top_of_ne_zero` yields scalar surjectivity. +Smoothness at order one supplies `HasStrictFDerivAt`. Mathlib's existing +`HasStrictFDerivAt.implicitToOpenPartialHomeomorph` supplies the chart. + +The equality of the first coordinate with `g` is global as an equality of the +underlying chart function. Inverse and homeomorphism properties remain +restricted to the chart source and target. No global product decomposition is +claimed. + +## Explicit exclusions + +- no chart or normal form at a critical point; +- no Morse lemma formalization; +- no proof that a closed superlevel is locally path connected; +- no quotient, half-space, or relative-LPC transport; +- no removal or weakening of C294 premises; +- no stochastic, persistence-pairing, registry, acceptance, or integration + transition. + +`WithoutNoncriticality.lean` omits only `hx`. A qualifying negative result is a +nonzero Lean exit with a type mismatch exposing `¬ IsCriticalPoint`; timeout, +setup, syntax, import, or unknown-production-identifier errors do not qualify. + +The exact C294 `Lifetime.lean` is consumed in place through a read-only Lake +library. Existing C294 bytes are not copied or modified. diff --git a/frontiers/regular_point_chart_20261020/SOURCE_SHA256SUMS b/frontiers/regular_point_chart_20261020/SOURCE_SHA256SUMS new file mode 100644 index 000000000..54c1c894d --- /dev/null +++ b/frontiers/regular_point_chart_20261020/SOURCE_SHA256SUMS @@ -0,0 +1,9 @@ +1ff2d19ee045175a510d994ad539476e1d5df98247ec4b4d6267fedc7909f996 ../../.github/workflows/c296-regular-point-chart.yml +90f4892608e953ecc696bb32ea159d1c178ceb8a1c6edfd11acfceb14af462c6 ../critical_level_attainment_20261020/final-project/Lifetime.lean +5568c8d6e03f7064cd5924ebe2814ae746100505ae31789d5c975902528f9fa2 RegularPointChart.lean +d87cc945b859472417ce9ef1c197a34f5ea4b63e65a857ce24316f435288e051 RegularPointChartInterface.lean +da7256bbe6baa41e2fda6888d80b72dce73c27eac5ad641ad9b875243370acf7 WithoutNoncriticality.lean +b1cfc6126c9885e30a4b3d8eac3e96b57e92f88930faa5e6eacbf06fb3ed78b8 RegularPointChartAxiomAudit.lean +3c154a9b908e97ae98c8f2ac0062be391bde49c13f8d436fedbbc8b1b9d88213 lakefile.toml +a5f438c3066ea36abd201994397d4b75234b7fff52d2ef8de9dea64f874baf6b lake-manifest.json +d5edba4e4b8faad9c1baeadb265716d20d03be4d1a2647dc5e35b0c0325bea7b lean-toolchain From 6c033631123682f1a1c2553b598041a72af26776 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:56:05 -0500 Subject: [PATCH 09/14] test(C296): add fail-closed negative classifier --- .../scripts/classify_negative.sh | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 frontiers/regular_point_chart_20261020/scripts/classify_negative.sh diff --git a/frontiers/regular_point_chart_20261020/scripts/classify_negative.sh b/frontiers/regular_point_chart_20261020/scripts/classify_negative.sh new file mode 100644 index 000000000..669b92b9f --- /dev/null +++ b/frontiers/regular_point_chart_20261020/scripts/classify_negative.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [[ "$#" -ne 2 ]]; then + echo "usage: $0 LOG EXIT_STATUS" >&2 + exit 2 +fi + +log="$1" +status="$2" + +[[ "$status" =~ ^[0-9]+$ ]] || { + echo "negative classifier: invalid exit status" >&2 + exit 2 +} + +if [[ "$status" -eq 0 ]]; then + echo "negative classifier: fixture unexpectedly succeeded" >&2 + exit 1 +fi + +if [[ "$status" -eq 124 || "$status" -eq 137 || "$status" -eq 143 ]]; then + echo "negative classifier: rejected timeout/termination exit status" >&2 + exit 1 +fi + +if grep -Eiq \ + 'unknown (module|package|identifier)|invalid import|failed to (resolve|load|fetch|clone|download)|cannot find|no such file|file not found|command not found|fatal: unable to access|could not resolve host|HTTP[^[:alnum:]]*(403|404|5[0-9][0-9])|parser error|syntax error|invalid syntax|unexpected (token|identifier|end)|expected token|timed? ?out|timeout|killed|out of memory|oom|memory exhausted|resource temporarily unavailable|no space left|signal 9|exit code 137' \ + "$log"; then + echo "negative classifier: rejected setup/syntax/resource failure" >&2 + exit 1 +fi + +grep -Eq 'WithoutNoncriticality\.lean:[0-9]+:[0-9]+: error: Type mismatch' "$log" +grep -Fq '¬ IsCriticalPoint' "$log" +grep -Fq '→ OpenPartialHomeomorph' "$log" + +echo "negative classifier: intended missing-noncriticality type mismatch" From cd57f0c8d72404d747c617a52372b2112033c170 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:56:10 -0500 Subject: [PATCH 10/14] test(C296): add negative-classifier mutations --- .../scripts/test_negative_classifier.sh | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh diff --git a/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh b/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh new file mode 100644 index 000000000..9d5219708 --- /dev/null +++ b/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +set -euo pipefail + +classifier="$(dirname "$0")/classify_negative.sh" +tmp="$(mktemp -d)" +trap 'rm -rf "$tmp"' EXIT + +expect_pass() { + local name="$1" status="$2" log="$3" + if ! bash "$classifier" "$log" "$status"; then + echo "expected pass: $name" >&2 + exit 1 + fi +} + +expect_fail() { + local name="$1" status="$2" log="$3" + if bash "$classifier" "$log" "$status"; then + echo "expected rejection: $name" >&2 + exit 1 + fi +} + +cat > "$tmp/intended.log" <<'EOF' +WithoutNoncriticality.lean:13:2: error: Type mismatch + regularPointChart hSmooth ?_ x +has type + ¬ IsCriticalPoint g x → OpenPartialHomeomorph (E d) (ℝ × ker) +EOF +expect_pass intended 1 "$tmp/intended.log" + +cat > "$tmp/syntax-token.log" <<'EOF' +WithoutNoncriticality.lean:13:2: error: unexpected token 'end'; expected term +-- IsCriticalPoint regularPointChart +EOF +expect_fail syntax-token 1 "$tmp/syntax-token.log" + +cat > "$tmp/resource-token.log" <<'EOF' +regularPointChart noncritical +lake env lean: Killed +fatal: out of memory +EOF +expect_fail resource-token 137 "$tmp/resource-token.log" + +cat > "$tmp/setup-token.log" <<'EOF' +noncritical regularPointChart +error: unknown module prefix 'Mathlib' +EOF +expect_fail setup-token 1 "$tmp/setup-token.log" + +expect_fail unexpected-success 0 "$tmp/intended.log" +expect_fail resource-exit-status 137 "$tmp/intended.log" + +echo "negative classifier mutation tests: PASS" From 3181a4da3034a283a27a5751766e997c4a65278b Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 06:56:21 -0500 Subject: [PATCH 11/14] fix(C296): fail closed on negative diagnostics --- .github/workflows/c296-regular-point-chart.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/c296-regular-point-chart.yml b/.github/workflows/c296-regular-point-chart.yml index 4fd6f02ca..72f647d0e 100644 --- a/.github/workflows/c296-regular-point-chart.yml +++ b/.github/workflows/c296-regular-point-chart.yml @@ -39,6 +39,11 @@ jobs: lake env leanchecker RegularPointChart lake env leanchecker RegularPointChartInterface lake env lean RegularPointChartAxiomAudit.lean + - name: Mutation-test the negative diagnostic classifier + working-directory: frontiers/regular_point_chart_20261020 + run: | + set -euo pipefail + bash scripts/test_negative_classifier.sh - name: Require omission of noncriticality to be rejected working-directory: frontiers/regular_point_chart_20261020 run: | @@ -48,8 +53,4 @@ jobs: status=$? set -e cat negative.log - test "$status" -ne 0 - grep -Eq 'IsCriticalPoint|noncritical|regularPointChart' negative.log - if grep -Eq 'Unknown identifier.*regularPointChart' negative.log; then - exit 1 - fi + bash scripts/classify_negative.sh negative.log "$status" From 97d6065ff4701dd39ad7ae2900d679487c466feb Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 07:00:32 -0500 Subject: [PATCH 12/14] fix(C296): accept Lean negation spacing --- .../regular_point_chart_20261020/scripts/classify_negative.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontiers/regular_point_chart_20261020/scripts/classify_negative.sh b/frontiers/regular_point_chart_20261020/scripts/classify_negative.sh index 669b92b9f..a481c4eda 100644 --- a/frontiers/regular_point_chart_20261020/scripts/classify_negative.sh +++ b/frontiers/regular_point_chart_20261020/scripts/classify_negative.sh @@ -32,7 +32,7 @@ if grep -Eiq \ fi grep -Eq 'WithoutNoncriticality\.lean:[0-9]+:[0-9]+: error: Type mismatch' "$log" -grep -Fq '¬ IsCriticalPoint' "$log" +grep -Eq '¬[[:space:]]*IsCriticalPoint' "$log" grep -Fq '→ OpenPartialHomeomorph' "$log" echo "negative classifier: intended missing-noncriticality type mismatch" From 98ecc54a332674e94c5700b5f44bc9cd47299353 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 07:00:40 -0500 Subject: [PATCH 13/14] test(C296): mirror exact Lean negation spacing --- .../scripts/test_negative_classifier.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh b/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh index 9d5219708..66bb0dd35 100644 --- a/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh +++ b/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh @@ -25,7 +25,7 @@ cat > "$tmp/intended.log" <<'EOF' WithoutNoncriticality.lean:13:2: error: Type mismatch regularPointChart hSmooth ?_ x has type - ¬ IsCriticalPoint g x → OpenPartialHomeomorph (E d) (ℝ × ker) + ¬IsCriticalPoint d g x → OpenPartialHomeomorph (E d) (ℝ × ker) EOF expect_pass intended 1 "$tmp/intended.log" From 762a6f30e7131b7b2cc02ad2d80113de9263bd4c Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Tue, 20 Oct 2026 07:43:27 -0500 Subject: [PATCH 14/14] test: exercise every C296 negative classifier guard --- .../scripts/test_negative_classifier.sh | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh b/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh index 66bb0dd35..cd0bc960a 100644 --- a/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh +++ b/frontiers/regular_point_chart_20261020/scripts/test_negative_classifier.sh @@ -51,4 +51,64 @@ expect_fail setup-token 1 "$tmp/setup-token.log" expect_fail unexpected-success 0 "$tmp/intended.log" expect_fail resource-exit-status 137 "$tmp/intended.log" +expect_usage() { + local name="$1" status="$2" log="$3" rc=0 + bash "$classifier" "$log" "$status" || rc=$? + if [[ "$rc" -ne 2 ]]; then + echo "expected usage error (exit 2): $name" >&2 + exit 1 + fi +} + +# Each control below keeps all three intended markers, so only the check +# under test can reject it. +with_intended() { + local out="$1"; shift + cat "$tmp/intended.log" > "$out" + printf '%s\n' "$@" >> "$out" +} + +for sig in \ + "error: unknown package 'Mathlib'" \ + "error: invalid import: Foo" \ + "error: failed to fetch dependency" \ + "error: cannot find module Foo" \ + "no such file or directory" \ + "error: file not found: Foo.lean" \ + "lake: command not found" \ + "fatal: unable to access 'https://example.invalid/'" \ + "could not resolve host: example.invalid" \ + "HTTP 403" \ + "parser error" \ + "syntax error" \ + "invalid syntax" \ + "unexpected identifier" \ + "expected token" \ + "operation timed out" \ + "lake env lean: Killed" \ + "fatal: out of memory" \ + "OOM" \ + "memory exhausted" \ + "resource temporarily unavailable" \ + "no space left on device" \ + "terminated by signal 9" \ + "exit code 137"; do + with_intended "$tmp/signature.log" "$sig" + expect_fail "intended-plus: $sig" 1 "$tmp/signature.log" +done + +for st in 124 143; do + expect_fail "resource-exit-status-$st" "$st" "$tmp/intended.log" +done + +sed '/error: Type mismatch/d' "$tmp/intended.log" > "$tmp/no-mismatch.log" +expect_fail missing-type-mismatch 1 "$tmp/no-mismatch.log" +sed 's/error: Type mismatch/error: unsolved goals/' "$tmp/intended.log" > "$tmp/other-error.log" +expect_fail other-error-kind 1 "$tmp/other-error.log" +sed 's/¬IsCriticalPoint/IsCriticalPoint/' "$tmp/intended.log" > "$tmp/no-negation.log" +expect_fail missing-negated-premise 1 "$tmp/no-negation.log" +sed 's/→ OpenPartialHomeomorph/→ PartialEquiv/' "$tmp/intended.log" > "$tmp/no-chart.log" +expect_fail missing-chart-codomain 1 "$tmp/no-chart.log" +expect_usage non-numeric-status x "$tmp/intended.log" + echo "negative classifier mutation tests: PASS"