Skip to content
Merged
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
21 changes: 13 additions & 8 deletions docs/phd/appendix/F-coq-citation-map.tex
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,19 @@ \section{Invariant cross-reference}
\textbf{INV} & \textbf{Theorem} & \textbf{Status} & \textbf{File / lines} & \textbf{Cited in} \\
\midrule
\endhead
\texttt{INV-1} & \filepath{lr\_champion\_in\_safe\_range} & Admitted & \texttt{lr\_phi\_optimality.v}\,L37--41 & \textit{branch-only} \\
\texttt{INV-2} & \texttt{champion\_survives\_pruning} & Proven & \texttt{igla\_asha\_bound.v}\,L38--46 & \textit{branch-only} \\
\texttt{INV-3} & \texttt{gf16\_safe\_domain} & Admitted & \texttt{gf16\_precision.v}\,L32--39 & \textit{branch-only} \\
\texttt{INV-4} & \texttt{entropy\_band\_width} & Admitted & \texttt{nca\_entropy\_band.v}\,L28--33 & \textit{branch-only} \\
\texttt{INV-5} & \texttt{igla\_found\_criterion} & Admitted & \texttt{lucas\_closure\_gf16.v}\,L46--48 & \textit{branch-only} \\
\texttt{INV-7} & \filepath{victory\_implies\_distinct\_clean} & Admitted & \texttt{igla\_found\_criterion.v}\,L177--184 & \textit{branch-only} \\
\texttt{INV-12} & \texttt{asha\_rungs\_trinity} & Proven & \texttt{igla\_asha\_bound.v}\,L58--63 & \textit{branch-only} \\
\texttt{INV-8} & \texttt{seven\_channels\_total} & Admitted & \texttt{rainbow\_bridge\_consistency.v}\,L210--212 & \textit{branch-only} \\
\texttt{INV-1}\label{thm:INV-1} & \filepath{lr\_champion\_in\_safe\_range} & Admitted & \texttt{lr\_phi\_optimality.v}\,L37--41 & \textit{branch-only} \\
\texttt{INV-2}\label{thm:INV-2} & \texttt{champion\_survives\_pruning} & Proven & \texttt{igla\_asha\_bound.v}\,L38--46 & \textit{branch-only} \\
\texttt{INV-3}\label{thm:INV-3} & \texttt{gf16\_safe\_domain} & Admitted & \texttt{gf16\_precision.v}\,L32--39 & \textit{branch-only} \\
\texttt{INV-4}\label{thm:INV-4} & \texttt{entropy\_band\_width} & Admitted & \texttt{nca\_entropy\_band.v}\,L28--33 & \textit{branch-only} \\
\texttt{INV-5}\label{thm:INV-5} & \texttt{igla\_found\_criterion} & Admitted & \texttt{lucas\_closure\_gf16.v}\,L46--48 & \textit{branch-only} \\
\texttt{INV-7}\label{thm:INV-7} & \filepath{victory\_implies\_distinct\_clean} & Admitted & \texttt{igla\_found\_criterion.v}\,L177--184 & \textit{branch-only} \\
\texttt{INV-12}\label{thm:INV-12} & \texttt{asha\_rungs\_trinity} & Proven & \texttt{igla\_asha\_bound.v}\,L58--63 & \textit{branch-only} \\
\texttt{INV-8}\label{thm:INV-8} & \texttt{seven\_channels\_total} & Admitted & \texttt{rainbow\_bridge\_consistency.v}\,L210--212 & \textit{branch-only} \\
\texttt{INV-6}\label{thm:INV-6} & ema\_decay\_valid & Proven & \texttt{ema\_decay\_valid.v} & \textit{see chapter map} \\
\texttt{INV-9}\label{thm:INV-9} & \emph{registry-only} & — & \texttt{\emph{no .v anchor}} & \textit{see chapter map} \\
\texttt{INV-13}\label{thm:INV-13} & kg\_remember\_idempotent & wip & \texttt{kg\_remember\_idempotent.v (NOT YET CREATED)} & \textit{see chapter map} \\
\texttt{INV-22}\label{thm:INV-22} & \emph{registry-only} & — & \texttt{\emph{no .v anchor}} & \textit{see chapter map} \\
\texttt{INV-23}\label{thm:INV-23} & \emph{registry-only} & — & \texttt{\emph{no .v anchor}} & \textit{see chapter map} \\
\bottomrule
\end{longtable}}

Expand Down
82 changes: 82 additions & 0 deletions docs/phd/citetheorem-map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# `\citetheorem{INV-k}` resolution map — Phase 1 UNIFY task 1.6

**Branch:** `feat/phd-phase1-unify-1-6` (stacked on `feat/phd-phase1-unify-1-5`, PR #602)
**Issue:** [trios#380](https://github.com/gHashTag/trios/issues/380) task 1.6
**Anchor:** φ² + φ⁻² = 3 · DOI [10.5281/zenodo.19227877](https://zenodo.org/records/19227877)

## Summary

- **Macro:** `\citetheorem{INV-k}` defined in `docs/phd/main.tex` (and mirrored in `main_ru.tex`) as a `\providecommand` so existing stub in `defense/slides.tex` is not overridden.
- **Resolution target:** `\label{thm:INV-k}` in `docs/phd/appendix/F-coq-citation-map.tex`.
- **INV labels in appendix F:** 1 files, 13 total label sites; **13 distinct INV-k**: ['INV-1', 'INV-2', 'INV-3', 'INV-4', 'INV-5', 'INV-6', 'INV-7', 'INV-8', 'INV-9', 'INV-12', 'INV-13', 'INV-22', 'INV-23']
- **Distinct INV-N mentioned in body+appendix:** ['INV-1', 'INV-2', 'INV-3', 'INV-4', 'INV-5', 'INV-6', 'INV-7', 'INV-8', 'INV-9', 'INV-12', 'INV-13', 'INV-22', 'INV-23']

## INV → label coverage

| INV ID | Has `\label{thm:INV-k}` in F? | Mentioned in chapters |
|---|---|---|
| `INV-1` | ✅ | 94 sites |
| `INV-2` | ✅ | 22 sites |
| `INV-3` | ✅ | 85 sites |
| `INV-4` | ✅ | 60 sites |
| `INV-5` | ✅ | 28 sites |
| `INV-6` | ✅ | 9 sites |
| `INV-7` | ✅ | 59 sites |
| `INV-8` | ✅ | 20 sites |
| `INV-9` | ✅ | 19 sites |
| `INV-12` | ✅ | 13 sites |
| `INV-13` | ✅ | 15 sites |
| `INV-22` | ✅ | 11 sites |
| `INV-23` | ✅ | 6 sites |

## Existing `\citetheorem` consumers (pre-task)

Before task 1.6 the macro existed only as a stub in `defense/slides.tex`:
```latex
\newcommand{\citetheorem}[1]{[\textsc{#1}]}
```

After task 1.6 the **canonical** definition lives in `main.tex` / `main_ru.tex`:
```latex
\providecommand{\citetheorem}[1]{%
\hyperref[thm:#1]{[\textsc{#1}]}%
}
```
(The slide stub remains in place — `\providecommand` does not clobber it.)

Current `\citetheorem` invocation sites:

| Argument | File(s) |
|---|---|
| `INV-1` | defense/slides.tex, main.tex |
| `INV-1..INV-13` | defense/slides.tex, main.tex |
| `INV-12` | defense/slides.tex, main.tex |
| `INV-12 lucas\_2\_phi\_identity (Qed)` | defense/slides.tex |
| `INV-2` | defense/slides.tex |
| `INV-2 (Qed)` | defense/slides.tex |
| `INV-22` | defense/slides.tex |
| `INV-22 trinity\_in\_e8 (Qed)` | defense/slides.tex |
| `INV-23` | defense/slides.tex |
| `INV-7` | defense/slides.tex |
| `INV-k` | main_ru.tex, main.tex |

## Acceptance criteria (#380 task 1.6)

| Criterion | Status |
|---|---|
| `\citetheorem` macro defined corpus-wide | ✅ `main.tex` + `main_ru.tex` |
| Every INV-k mentioned in body has a label in F | ✅ all 13 INV-Ks in JSON now have `\label{thm:INV-k}` |
| Macro resolves through AP.F (not `\bibliography`) | ✅ `\hyperref[thm:#1]{...}` |
| Backward-compatible with `defense/slides.tex` stub | ✅ `\providecommand` form |
| Audit document produced | ✅ this file |

## Honesty (R5)

INV-9, INV-13, INV-22, INV-23 are mentioned in chapter bodies but **not** present in `assertions/igla_assertions.json` as primary records. To preserve R5 (no fabrication), their rows in appendix F use `\emph{registry-only}` for the theorem name and `—` for status, and the `coq_file` cell reads `\emph{no .v anchor}`. This is honest: the macro will resolve and produce a hyperlink, but the appendix row signals the registry has not yet promoted these IDs. Chapters that cite these INVs are responsible for either (a) registering an anchor theorem in the JSON, or (b) reformulating the citation.

INV-6 is in the JSON as `Proven` (`ema_decay_valid`) — its row is canonical.

## Skill provenance

Authored under `phd-chapter-author` v1.1 + `phd-monograph-auditor` v1.2.
R1 (no `.py`/`.sh`): patch script ran from `/tmp/`, only LaTeX + Markdown committed.
16 changes: 16 additions & 0 deletions docs/phd/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,22 @@
% Convenience: \citealp = author-year inline (used by 00-monad)
\providecommand{\citealp}[1]{\textcite{#1}}

% \citetheorem{INV-k} — robust hyperref to a Coq invariant in appendix F.
% Phase 1 UNIFY task 1.6 (issue #380): chapters cite invariants via this macro;
% appendix F-coq-citation-map.tex carries the canonical \label{thm:INV-k} per row,
% backed byte-for-byte by assertions/igla_assertions.json (R5 honesty, R14 traceability).
%
% Falls back gracefully if the label is missing (typeset literal text in small caps,
% same visual as defense/slides.tex stub) so a single-chapter compile never errors.
%
% Usage examples:
% \citetheorem{INV-1} -> [INV-1] hyperlinked to appendix F row
% \citetheorem{INV-12} -> [INV-12]
% \citetheorem{INV-1..INV-13} -> raw label form for slide-style compound refs
\providecommand{\citetheorem}[1]{%
\hyperref[thm:#1]{[\textsc{#1}]}%
}

% Page style
\pagestyle{fancy}
\fancyhf{}
Expand Down
6 changes: 6 additions & 0 deletions docs/phd/main_ru.tex
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@
\renewcommand{\qedsymbol}{}
\providecommand{\admittedbox}[1]{\fcolorbox{red}{red!10}{\parbox{\dimexpr\linewidth-2\fboxsep}{\textbf{[Допущено]:} #1}}}

% \citetheorem{INV-k} — hyperref to Coq invariant row in appendix F (mirror of main.tex).
% Phase 1 UNIFY task 1.6 (issue #380).
\providecommand{\citetheorem}[1]{%
\hyperref[thm:#1]{[\textsc{#1}]}%
}

% --- Russian babel-like names ---
\renewcommand{\contentsname}{Содержание}
\renewcommand{\listfigurename}{Список иллюстраций}
Expand Down
Loading