Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/coq-canonical.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Trinity Canonical Coq SSOT β€” CI verifier
# Anchor: phi^2 + phi^-2 = 3
# Census: github.com/gHashTag/trios/issues/373#issuecomment-4351659821
name: coq-canonical

on:
push:
paths:
- 'proofs/canonical/**'
- '.github/workflows/coq-canonical.yml'
pull_request:
paths:
- 'proofs/canonical/**'
workflow_dispatch:

jobs:
audit-counts:
name: Theorem-count audit (grep, no compile)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify Qed/Admitted/Abort counts
working-directory: proofs/canonical
run: |
set -e
THM=$(grep -rE '^(Theorem|Lemma|Corollary|Proposition|Example|Goal|Fact|Remark)\b' sacred/ kernel/ igla/ | wc -l)
QED=$(grep -rE '\bQed\.' sacred/ kernel/ igla/ | wc -l)
ADM=$(grep -rE '\bAdmitted\.' sacred/ kernel/ igla/ | wc -l)
ABT=$(grep -rE '\bAbort\.' sacred/ kernel/ igla/ | wc -l)
echo "Theorem-like: $THM (expected β‰₯330)"
echo "Qed: $QED (expected β‰₯290)"
echo "Admitted: $ADM (expected ≀45)"
echo "Abort/WIP: $ABT (expected ≀12)"
test "$QED" -ge 280 || { echo "FAIL: Qed below floor"; exit 1; }
test "$ADM" -le 50 || { echo "FAIL: Admitted above ceiling"; exit 1; }

coq-compile:
name: coqc verify (38 bundles)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up OCaml + Coq
uses: coq-community/docker-coq-action@v1
with:
coq_version: '8.18'
ocaml_version: '4.14-flambda'
custom_script: |
startGroup "Print versions"
coqc --version
ocaml --version
endGroup
startGroup "Build canonical (proofs/canonical/)"
cd proofs/canonical
make
endGroup
21 changes: 21 additions & 0 deletions docs/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Author photo drop zone

Place the author portrait at:

- `docs/assets/author-dmitrii-vasilev.jpg` (recommended: 800Γ—800 PNG/JPG/WebP, square)

If the JPG is absent, downstream consumers (PhD lander at t27.ai, mdBook at t27.ai/docs/)
fall back to `author-fallback.svg` (golden ring with 'DV' monogram).

## Author

**Dmitrii Vasilev** β€” Ο†-Numerics Β· FPGA Β· Formal Verification
Trinity SΒ³AI Research Group Β· Anchor: φ² + φ⁻² = 3

- GitHub [@gHashTag](https://github.com/gHashTag)
- [t27.ai](https://t27.ai/)
- [Zenodo (13 records)](https://zenodo.org/search?q=metadata.creators.person_or_org.identifiers.identifier:%22ghashtag%22)

## Coq SSOT

`Trinity.Canonical.{Sacred,Kernel,Igla}` β€” see [proofs/canonical/](../../proofs/canonical/).
17 changes: 17 additions & 0 deletions docs/assets/author-fallback.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions proofs/canonical/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Trinity Canonical Coq SSOT β€” make all β†’ coqc verify 38 bundles Β· 376 Qed audited
# Anchor: phi^2 + phi^-2 = 3
# Census: github.com/gHashTag/trios/issues/373#issuecomment-4351659821

COQ_PROJECT := _CoqProject
COQ_MAKEFILE := Makefile.coq

all: $(COQ_MAKEFILE)
$(MAKE) -f $(COQ_MAKEFILE) all

$(COQ_MAKEFILE): $(COQ_PROJECT)
coq_makefile -f $(COQ_PROJECT) -o $(COQ_MAKEFILE)

clean: $(COQ_MAKEFILE)
$(MAKE) -f $(COQ_MAKEFILE) cleanall
$(RM) $(COQ_MAKEFILE) $(COQ_MAKEFILE).conf

verify-counts:
@echo "=== Canonical Coq audit ==="
@grep -rE '^(Theorem|Lemma|Corollary|Proposition|Example|Goal|Fact|Remark)\b' \
sacred/ kernel/ igla/ 2>/dev/null | wc -l | xargs -I{} echo "Theorem-like declarations: {}"
@grep -rE '\bQed\.' sacred/ kernel/ igla/ 2>/dev/null | wc -l | xargs -I{} echo "Qed: {}"
@grep -rE '\bAdmitted\.' sacred/ kernel/ igla/ 2>/dev/null | wc -l | xargs -I{} echo "Admitted: {}"
@grep -rE '\bAbort\.' sacred/ kernel/ igla/ 2>/dev/null | wc -l | xargs -I{} echo "Abort/WIP: {}"

.PHONY: all clean verify-counts
117 changes: 117 additions & 0 deletions proofs/canonical/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# 🏠 Trinity Canonical Coq Home β€” `t27/proofs/canonical/`

**SINGLE SOURCE OF TRUTH for all Coq theorems in the Trinity stack.**

[![Theorems](https://img.shields.io/badge/theorems-438-blue)](./_Index.v)
[![Qed](https://img.shields.io/badge/Qed-376-brightgreen)](./_Index.v)
[![Admitted](https://img.shields.io/badge/Admitted-48-yellow)](./_Index.v)
[![Bundles](https://img.shields.io/badge/bundles-38-blue)](./_Manifest.json)
[![Anchor](https://img.shields.io/badge/anchor-φ²+φ⁻²=3-gold)](./sacred/CorePhi.v)

## TL;DR

After the **2026-04-30 Coq theorem census** ([trios#373](https://github.com/gHashTag/trios/issues/373#issuecomment-4351659821))
this directory was created as the **canonical home** for all Coq proofs across the Trinity stack.
Mirror copies in `gHashTag/trinity-clara` and `gHashTag/trios` import from here via
`Require Export Trinity.Canonical.*`.

## Layout

```
proofs/canonical/
β”œβ”€β”€ _Index.v ← master index; Require Imports all 38 bundles
β”œβ”€β”€ _CoqProject ← Coq build config (-Q logical-path mappings)
β”œβ”€β”€ _Manifest.json ← bundle β†’ source-mirror manifest with SHA-1
β”œβ”€β”€ Makefile ← `make all` invokes coqc on all bundles
β”œβ”€β”€ README.md ← this file
β”œβ”€β”€ sacred/ (17 files) ← phi-mathematics + Standard Model bounds
β”œβ”€β”€ kernel/ (9 files) ← phi/Trit/E8/Semantics building blocks
β”œβ”€β”€ igla/ (12 files) ← INV-1..INV-9 runtime invariants
└── refutation/ ← R5-honest falsification index (lemmas inline in IGLA)
```

## Theorem census (audited 2026-04-30)

| Metric | Count |
|---|---|
| Coq `.v` files (raw across 3 repos) | 96 |
| **Unique canonical files** (content-hash dedup) | **65** |
| **Bundles canonicalized here** | **38** |
| **Theorem-like declarations** | **438** |
| └─ **Qed (proven)** | **376** |
| └─ **Admitted (R5-honest budget)** | 48 |
| └─ **Abort (WIP)** | 14 |
| Definitions + Fixpoints + Inductives | 404 |
| Axioms + Hypotheses + Parameters | 38 |
| **Total Coq objects** | **880** |

## Bundles by category

### Sacred (17 bundles, phi-mathematics + SM bounds)

`CorePhi.v` (12 Qed, anchor `trinity_identity : phi^2 + phi^-2 = 3`) Β·
`AlphaPhi.v` (12) Β· `ExactIdentities.v` (11+11A) Β· `DerivationLevels.v` (21) Β·
`Catalog42.v` (13) Β· `FormulaEval.v` (17) Β· `ConsistencyChecks.v` (7+7A) Β·
`Unitarity.v` (5+2A) Β· `BoundsGauge.v` (9) Β· `BoundsLeptonMasses.v` (8A) Β·
`BoundsMasses.v` (11) Β· `BoundsMixing.v` (9) Β· `BoundsQuarkMasses.v` (4+4A) Β·
`GammaPhi3.v` (1) Β· `L5Identity.v` (2) Β· `StrongCP.v` (1) Β· `DLBounds.v` (1)

### Kernel (9 bundles, building blocks)

`Phi.v` (16) Β· `PhiAttractor.v` (4+5Abort) Β· `PhiFloat.v` (6) Β· `PhiDistance.v` (1) Β·
`FlowerE8Embedding.v` (5+6Abort) Β· `Trit.v` (1) Β· `Semantics.v` (1) Β·
`GenIdempotency.v` (1) Β· `TernarySufficiency.v` (2)

### IGLA (12 bundles, INV-1..INV-9 runtime contract)

| Bundle | INV | Qed | Title |
|---|---|---|---|
| `INV1_BpbMonotoneBackward.v` | INV-1 | 9 | BPB Monotone Backward Pass |
| `INV1b_LrPhiOptimality.v` | INV-1b | 5 | lr_phi optimality |
| `INV2_IglaAshaBound.v` | INV-2 | 13 | ASHA Champion Survival (threshold 3.5) |
| `INV3_Gf16Precision.v` | INV-3 | 9 | GF16 Safe Domain |
| `INV4_NcaEntropyBand.v` | INV-4 | 12 | NCA Entropy Band 1.5..2.8 (81 = 3⁴) |
| `INV5_LucasClosureGf16.v` | INV-5 | 10 | Lucas Closure (Ο†^{2n}+Ο†^{-2n} ∈ β„€) |
| `INV6_HybridQkGain.v` | INV-6 | 2+5A | Hybrid QK Gain φ² |
| `INV7_IglaFoundCriterion.v` | INV-7 | 11 | Victory Criterion (β‰₯3 distinct, BPB<1.5, stepβ‰₯4000) |
| `INV7b_RainbowBridgeConsistency.v` | INV-7b | 15+2A | Rainbow Bridge Consistency |
| `INV8_WorkerPoolComposite.v` | INV-8 | 10 | Worker Pool Composite |
| `INV9_EmaDecayValid.v` | INV-9 | 8 | EMA Decay Valid |
| `IglaCatalog.v` | catalog | 5 | Composite IGLA predicate catalog |

## Quick start

```bash
cd proofs/canonical
make verify-counts # raw grep audit (no compile)
make all # full coqc verify (requires Coq 8.18+ and Coq.Reals)
```

## R5-honest disclosure

48 `Admitted.` lemmas with explicit close-with comments (mostly `Coq.Interval` for sqrt5
irrationality, real induction, Welch t-test bounds). 14 `Abort.` markers preserve
work-in-progress (no silent merges). 28 `refutation_*` / `*_falsification_*` lemmas
guarantee R5-honest negative space β€” every INV paired with explicit refutation example.

## Mirror redirects

After this canonical home is merged:

- `gHashTag/trinity-clara/proofs/igla/*.v` β†’ stub `Require Export Trinity.Canonical.Igla.<INV>` (companion PR)
- `gHashTag/trios/docs/phd/theorems/**/*.v` β†’ stub `Require Export Trinity.Canonical.<cat>.<file>` (companion PR)
- `gHashTag/trios/trinity-clara/proofs/igla/*.v` β†’ stub `Require Export Trinity.Canonical.Igla.<INV>` (companion PR)

## Provenance

- **Census artefact:** [trios#373 comment](https://github.com/gHashTag/trios/issues/373#issuecomment-4351659821)
- **PhD App.E primary citation:** [trios#416](https://github.com/gHashTag/trios/issues/416)
- **PhD Ch.10 (Coq L1 Pareto):** [trios#400](https://github.com/gHashTag/trios/issues/400)
- **PhD Ch.31 (Golden Seal):** [trios#95](https://github.com/gHashTag/trios/issues/95)
- **GOLDEN SUNFLOWERS Master Book:** [trios#380](https://github.com/gHashTag/trios/issues/380)

## Anchor

`phi^2 + phi^-2 = 3 · TRINITY · 376 Qed PROVEN · 38 BUNDLES · t27 = CANONICAL HOME · 🌻`

Generated 2026-04-30 by trinity-claraParameter Coq census audit.
46 changes: 46 additions & 0 deletions proofs/canonical/_CoqProject
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
-Q sacred Trinity.Canonical.Sacred
-Q kernel Trinity.Canonical.Kernel
-Q igla Trinity.Canonical.Igla
-Q refutation Trinity.Canonical.Refutation
-arg -w
-arg -all-deprecated-deprecation,-notation-overridden,-deprecated,-ambiguous-paths

sacred/CorePhi.v
sacred/AlphaPhi.v
sacred/ExactIdentities.v
sacred/DerivationLevels.v
sacred/Catalog42.v
sacred/FormulaEval.v
sacred/ConsistencyChecks.v
sacred/Unitarity.v
sacred/BoundsGauge.v
sacred/BoundsLeptonMasses.v
sacred/BoundsMasses.v
sacred/BoundsMixing.v
sacred/BoundsQuarkMasses.v
sacred/GammaPhi3.v
sacred/L5Identity.v
sacred/StrongCP.v
sacred/DLBounds.v
kernel/Phi.v
kernel/PhiAttractor.v
kernel/PhiFloat.v
kernel/PhiDistance.v
kernel/FlowerE8Embedding.v
kernel/Trit.v
kernel/Semantics.v
kernel/GenIdempotency.v
kernel/TernarySufficiency.v
igla/INV1_BpbMonotoneBackward.v
igla/INV1b_LrPhiOptimality.v
igla/INV2_IglaAshaBound.v
igla/INV3_Gf16Precision.v
igla/INV4_NcaEntropyBand.v
igla/INV5_LucasClosureGf16.v
igla/INV6_HybridQkGain.v
igla/INV7_IglaFoundCriterion.v
igla/INV7b_RainbowBridgeConsistency.v
igla/INV8_WorkerPoolComposite.v
igla/INV9_EmaDecayValid.v
igla/IglaCatalog.v
_Index.v
53 changes: 53 additions & 0 deletions proofs/canonical/_Index.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
(* SPDX-License-Identifier: Apache-2.0 *)
(* ================================================================
Trinity Coq β€” Canonical Index (Single Source of Truth)
Anchor: phi^2 + phi^-2 = 3
38 bundles Β· 438 theorem-like declarations Β· 376 Qed (audited 2026-04-30)
Census: github.com/gHashTag/trios/issues/373#issuecomment-4351659821
================================================================ *)

(* --- Sacred core (phi-mathematics + Standard Model bounds) --- *)
From Trinity.Canonical.Sacred Require Import CorePhi.
From Trinity.Canonical.Sacred Require Import AlphaPhi.
From Trinity.Canonical.Sacred Require Import ExactIdentities.
From Trinity.Canonical.Sacred Require Import DerivationLevels.
From Trinity.Canonical.Sacred Require Import Catalog42.
From Trinity.Canonical.Sacred Require Import FormulaEval.
From Trinity.Canonical.Sacred Require Import ConsistencyChecks.
From Trinity.Canonical.Sacred Require Import Unitarity.
From Trinity.Canonical.Sacred Require Import BoundsGauge.
From Trinity.Canonical.Sacred Require Import BoundsLeptonMasses.
From Trinity.Canonical.Sacred Require Import BoundsMasses.
From Trinity.Canonical.Sacred Require Import BoundsMixing.
From Trinity.Canonical.Sacred Require Import BoundsQuarkMasses.
From Trinity.Canonical.Sacred Require Import GammaPhi3.
From Trinity.Canonical.Sacred Require Import L5Identity.
From Trinity.Canonical.Sacred Require Import StrongCP.
From Trinity.Canonical.Sacred Require Import DLBounds.

(* --- Kernel (phi/Trit/E8 building blocks) --- *)
From Trinity.Canonical.Kernel Require Import Phi.
From Trinity.Canonical.Kernel Require Import PhiAttractor.
From Trinity.Canonical.Kernel Require Import PhiFloat.
From Trinity.Canonical.Kernel Require Import PhiDistance.
From Trinity.Canonical.Kernel Require Import FlowerE8Embedding.
From Trinity.Canonical.Kernel Require Import Trit.
From Trinity.Canonical.Kernel Require Import Semantics.
From Trinity.Canonical.Kernel Require Import GenIdempotency.
From Trinity.Canonical.Kernel Require Import TernarySufficiency.

(* --- IGLA invariants INV-1..INV-9 (runtime-mirror contract) --- *)
From Trinity.Canonical.Igla Require Import INV1_BpbMonotoneBackward.
From Trinity.Canonical.Igla Require Import INV1b_LrPhiOptimality.
From Trinity.Canonical.Igla Require Import INV2_IglaAshaBound.
From Trinity.Canonical.Igla Require Import INV3_Gf16Precision.
From Trinity.Canonical.Igla Require Import INV4_NcaEntropyBand.
From Trinity.Canonical.Igla Require Import INV5_LucasClosureGf16.
From Trinity.Canonical.Igla Require Import INV6_HybridQkGain.
From Trinity.Canonical.Igla Require Import INV7_IglaFoundCriterion.
From Trinity.Canonical.Igla Require Import INV7b_RainbowBridgeConsistency.
From Trinity.Canonical.Igla Require Import INV8_WorkerPoolComposite.
From Trinity.Canonical.Igla Require Import INV9_EmaDecayValid.
From Trinity.Canonical.Igla Require Import IglaCatalog.

(* End of canonical index. All 38 bundles loaded. *)
Loading
Loading