Skip to content

i18n(lean): grothendieck_lean/SitePoints root — FR-first sibling pair (#4980) - #6345

Merged
jsboige merged 2 commits into
mainfrom
feature/c410-sitepoints-sibling-4980
Jul 14, 2026
Merged

jsboige merged 2 commits into
mainfrom
feature/c410-sitepoints-sibling-4980

Conversation

@jsboige

@jsboige jsboige commented Jul 12, 2026 •

Copy link
Copy Markdown
Owner

Résumé

Conversion de grothendieck_lean/SitePoints.lean (8529 B, bilingue inline legacy) vers le pattern sibling pair FR canonical + EN sibling (EPIC #4980, mandat user 2026-07-04, Option A).

Livrables (après fix C410-L1)

Fichier Rôle Taille LF CR byte[0]
SitePoints.lean (modifié) FR canonical (docstrings FR, namespace Grothendieck) 9186 B 224 0 0x2F
SitePoints_en.lean (nouveau) EN sibling (docstrings EN, namespace Grothendieck_en) 8538 B 213 0 0x2F

Substance préservée (Anti-§D L298 strict)

  • 1 theorem : presheaf_fiber_hom_ext
  • 3 noncomputable defs : fiber_yoneda_iso, presheaf_fiber_cocone, is_colimit_presheaf_fiber
  • 8 #check statements : indexation Mathlib CategoryTheory.Sites.Point.Basic et CategoryTheory.Sites.Point.Category
  • 4 imports : Mathlib.CategoryTheory.Sites.Grothendieck, SheafOfTypes, Point.Basic, Point.Category
  • universe v u w : déclaration univers
  • namespace Grothendieck / Grothendieck_en : anti-collision C451-L1
  • open CategoryTheory / open CategoryTheory.Limits : ouverture namespaces
  • 9 sections thématiques : presheaf/sheaf fiber functors, morphisms, coverage, bridge theorems, etc.

Référence mathématique : SGA 4 IV 6.3 (points d'un site / foncteurs fibres).

Validation byte-identity (real-mode awk C404-L1)

[OK] Stripped FR: 1889 B / 96 LF
[OK] Stripped EN normalized: 1889 B / 96 LF
[OK] FR byte-equal EN normalized: True ✅
[OK] Sorry count: FR=0, EN=0 (tactic-level) ✅
[OK] byte[0]=0x2F for both ✅
[OK] CR=0 for both (LF-only strict L268) ✅

Conformité C409/c.410 leçons

  • Anti-§D L298 strict : stripped bodies byte-identique (1889/1889 B / 96 LF)
  • C451-L1 Namespace convention : EN sibling uses namespace Grothendieck_en (anti-collision)
  • C404-L1 real-mode awk strip : byte-level state machine handles /-... -/ AND /-!... -/
  • C409-L1 mirror strategy : sibling files built independently from same body bytes (ORIG_LINES slice)
  • C410-L1 (NOUVEAU) : When extracting body slices from bilingual-inline-legacy files for sibling-pair conversion, ALWAYS preserve the structural block between the closing -/ of the module header and the first /-! section: imports, universe, namespace, open. Strip only the bilingual section docstrings, not the structural declarations.

Fix C410-L1 (commit 97e62d596)

PR initiale (commit 4c080072c) avait stripped les structural lines lors de l'extraction du body slice. Conséquence : Lean CI FAIL sur SitePoints_en.lean avec :

  • Unknown identifier GrothendieckTopology.Point.toPresheafFiber (et 5 autres)
  • unknown universe level 'u'/'v'
  • expected token (multitude)

Le fix restaure imports + universe + namespace + opens depuis l'original origin/main, conservé via git show (lecture idempotente). Validation post-fix :

  • FR/EN byte-identique (modulo _en namespace suffix)
  • Imports identiques à l'original
  • universe v u w restauré
  • open CategoryTheory / open CategoryTheory.Limits restaurés

Cold-Build Gate (C455-L1)

WSL local cold-build non disponible (elan absent WSL par défaut). Validation cold-build = CI Lean GitHub Actions (vérifiée sur cette PR après fix). Anti-§D byte-identity local vérifié ci-dessus comme signal minimal.

Contexte cycle

  • 20ᵉ Phase 2+ grothendieck_lean (16ᵉ R6 Sustained post-c.394)
  • 3ᵉ cycle post-PIVOT c.408 (1ᵉʳ post-PIVOT = c.409, 2ᵉ = c.410...)
  • Reste 1 cycle Phase 2+ grothendieck_lean avant prochain PIVOT L335 R5.4b MUST

Refs

🤖 Generated with Claude Code

jsboige and others added 2 commits July 12, 2026 21:46
…#4980)

Bilingual inline legacy SitePoints.lean (8529 B) → FR canonical SitePoints.lean (8900 B) + EN sibling SitePoints_en.lean (8246 B).

20ᵉ Phase 2+ grothendieck_lean. 1ᵉʳ cycle post-c.408 PIVOT R5.4b (15ᵉ→16ᵉ R6 Sustained post-c.394).

Substance preservation (SGA 4 IV 6.3 — points of a site / fiber functors):
- 1 theorem (presheaf_fiber_hom_ext)
- 3 noncomputable defs (fiber_yoneda_iso, presheaf_fiber_cocone, is_colimit_presheaf_fiber)
- 8 #check Mathlib API indexing statements
- 9 thematic sections (presheaf/sheaf fiber functors, morphisms, coverage, etc.)
- 4 imports (Sites.Grothendieck, SheafOfTypes, Point.Basic, Point.Category)

Validation (real-mode awk C404-L1):
- Stripped bodies byte-identique: 857 B / 45 LF (Anti-§D L298)
- Sorry count: 0/0 (FR/EN)
- byte[0]=0x2F for both files
- CR=0 for both files (LF-only strict L268)

Ref: PR #6334 (CategoryAndSites, c.409), PR #5883 (CooperativeGames pilot).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…tural lines (imports, universe, namespace, opens)

The previous build failed because the body-slice for FR/EN stripped structural
Lean code (4 imports, universe v u w, namespace, 2 open statements) that the
original file declares between the /- module header -/ and the first /-! section
docstring. Without those, GrothendieckTopology.Point.* identifiers could not
resolve and universe levels u/v/w were unknown.

Lesson C410-L1: When extracting body slices from bilingual-inline-legacy
files for sibling-pair conversion, ALWAYS preserve the structural block
between the closing -/ of the module header and the first /-! section:
imports, universe, namespace, open. Strip only the bilingual section
docstrings, not the structural declarations.

Validated:
- FR sorry (tactic): 0
- EN sorry (tactic): 0
- Stripped FR: 1889 B / 96 LF
- Stripped EN normalized: 1889 B / 96 LF
- FR byte-equal EN normalized: True

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jsboige

jsboige commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Math-Vérif 40ᵉ — c.410 SitePoints sibling pair (post-fix C410-L1)

Vérification mathématique (SGA 4 IV 6.3)

Le fichier SitePoints.lean formalise la notion de point d'un site au sens de Grothendieck (SGA 4 IV 6.3) :

  1. Structure de point : GrothendieckTopology.Point J (Mathlib CategoryTheory.Sites.Point.Basic) consiste en un foncteur fiber : C ⥤ Type w, la cofiltration de la catégorie des éléments, et la condition jointly_surjective reliant la topologie au foncteur fibre.

  2. Foncteur fibre sur les préfaisceaux : Φ.presheafFiber : (Cᵒᵖ ⥤ A) ⥤ A est la colimite sur la catégorie des éléments de Φ.fiber. C'est la tige au sens catégoriel.

  3. Foncteur fibre sur les faisceaux : Φ.sheafFiber : Sheaf J A ⥤ A est la restriction aux faisceaux. Préserve colimites et limites finies (donc suites exactes sous hypothèses convenables sur A), outil clé en cohomologie des faisceaux (Grothendieck 1957, Tohoku).

  4. Catégorie des points : morphismes = transformations naturelles en sens INVERSE (Φ₂.fiber ⟶ Φ₁.fiber), analogue au "pullback" le long d'une application continue d'espaces topologiques. Référence : SGA 4 IV 3.2.

  5. Topologies triviale ⊥ et discrète ⊤ : cas extrêmes du treillis des topologies de Grothendieck (la première est l'inf, la seconde le sup).

  6. Bridge theorems :

    • fiber_yoneda_iso : shrinkYoneda ⋙ Φ.presheafFiber ≅ Φ.fiber — la fibre de Yoneda shrunk coincide avec le foncteur fibre. Pont entre perspectives Yoneda et "fibre par fibre".
    • presheaf_fiber_cocone + is_colimit_presheaf_fiber : la fibre est une colimite, permettant de construire des applications depuis la fibre via la propriété universelle.
    • presheaf_fiber_hom_ext : ext. pour morphismes depuis la fibre (coïncidence sur tous les "germes" (X, x)).

Vérification technique (post-fix C410-L1)

Item Avant fix Après fix
lake build Grothendieck.SitePoints FAIL PASS
lake build Grothendieck.SitePoints_en FAIL PASS
Imports (Sites.Grothendieck, SheafOfTypes, Point.Basic, Point.Category) MISSING RESTORED
universe v u w MISSING RESTORED
namespace Grothendieck / Grothendieck_en MISSING RESTORED
open CategoryTheory / open CategoryTheory.Limits MISSING RESTORED
Stripped FR/EN byte-identity 857/857 B (FAUX OK) 1889/1889 B (RÉEL OK)

Substance préservée (anti-§D L298)

  • 1 theorem : presheaf_fiber_hom_ext
  • 3 noncomputable defs : fiber_yoneda_iso, presheaf_fiber_cocone, is_colimit_presheaf_fiber
  • 8 #check statements : indexation exhaustive Mathlib Point.Basic + Point.Category
  • 9 sections thématiques : alignement SGA 4 IV 6.3 / IV 3.2

Leçons consolidées (c.410)

C410-L1 : When extracting body slices from bilingual-inline-legacy files for sibling-pair conversion, ALWAYS preserve the structural block between the closing -/ of the module header and the first /-! section: imports, universe, namespace, open. Strip only the bilingual section docstrings, not the structural declarations. The "stripped bodies byte-identique" signal can mask a deeper error: if the body slice is wrong (missing structural lines), the stripped output can still be identical between FR/EN — but both will fail to compile.

Cold-Build Gate (C455-L1)

Validation cold-build = CI Lean GitHub Actions (run 29206860069, SUCCESS). WSL local elan absent → anti-§D byte-identity local suffit comme signal minimal mais CI SUCCESS est la preuve canonique du merge.

🤖 Generated with Claude Code

@jsboige jsboige left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

§H.4 forensic review — MERGEABLE LGTM (po-2024, L143 SAFE)

Forensic firsthand (worktree CoursIA-sp6345, branch feature/c410-sitepoints-sibling-4980). 2-file sibling pair FR canonical + EN sibling, EPIC #4980 Option A.

Safeguards PASS (8/8)

# Check Result
1 FR code byte-identical to main (stripped bodies) ✓ strip(/-...-/, --) FR ≡ origin/main FR (only docstrings→FR)
2 FR≡EN stripped byte-identity ✓ modulo the namespace line only (Grothendieck ↔ Grothendieck_en) — 6-byte delta = _en×2 (namespace + end)
3 C451-L1 namespace _en convention ✓ RESPECTED — FR namespace Grothendieck, EN namespace Grothendieck_en (correct, unlike the c.472 MathlibMap bare-namespace defect)
4 anti-§D sorry ✓ 0 real sorry — grep -c sorry=1 is a FALSE POSITIVE: the word "sorry" in docstring prose (FR L27 "Toutes les sorry éliminées à la création" / EN L26 "All sorrys eliminated at creation"), inside /- ... -/. Pre-existing on main (main FR sorry=1). Theorem presheaf_fiber_hom_ext has no sorry (EPIC #1646 Phase 9)
5 delimiter balance ✓ FR /-=14 /­-/=14, EN /-=14 -/=14
6 UTF-8 / NUL ✓ NUL=0 both (no ₀→NUL corruption class of #6308), LF-only (CR=0), byte[0]=0x2f (/-)
7 EN imports ✓ all 4 are Mathlib.* (Grothendieck/SheafOfTypes/Point.Basic/Point.Category) — no own-module import needing _en suffix
8 EN sibling new file ✓ absent on origin/main, expected

Substance preserved

  • 1 theorem (presheaf_fiber_hom_ext), 3 noncomputable defs (fiber_yoneda_iso, presheaf_fiber_cocone, is_colimit_presheaf_fiber), 8 #check, universe v u w, open CategoryTheory/CategoryTheory.Limits — all verified present in FR branch (stripped-bodies ≡ main = code preservation proof).

Cold-build gate (C455-L1 — flag for ai-01)

Lake/elan absent on po-2024 → cannot lake build locally. High structural confidence of GREEN: FR≡EN-modulo-namespace byte-identity + balanced delimiters + NUL=0 + pure docstring change (comments stripped by Lean parser → 0 impact on imports/decls/proofs). @AI-01: please confirm lake build Grothendieck.SitePoints Grothendieck.SitePoints_en green via WSL before merge (consistent with the cold-build gate ratified for the Grothendieck i18n series).

Verdict

MERGEABLE (LGTM) — sibling-pair i18n clean, C451-L1 namespace convention correctly applied, anti-§D clean (sorry is prose FP), UTF-8 safe. ai-01 gates merge + cold-build WSL.

— po-2024 (C464-L1: 0 prior reviews on this PR)

@jsboige

jsboige commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

§H.4 Forensic attestation — INDEPENDENT, firsthand (po-2024 c.419)

Ran the c.417 forensic tooling (nesting-aware comment-strip + byte-identity) on feature/c410-sitepoints-sibling-4980 (merge-base 20f631254). All invariants PASS.

Option A key invariant — CODE byte-identity FR ↔ EN

After stripping comments (nesting-aware) + namespace-normalizing Grothendieck_en→Grothendieck + ws-normalizing:

  • FR canonical (PR) code == EN sibling (PR) code: TRUE (40 code lines each, identical)
  • This proves the EN sibling is a faithful mirror — only docstrings/comments differ (Option A convention).

Note: the standard forensic_i18n.py script flagged sibling code-identical: False — that is a script false-positive: it compares the EN sibling against the OLD origin/main FR (pre-conversion bilingue-inline), not against the PR's NEW FR canonical. The corrected comparison (EN vs PR's FR) = IDENTICAL. Flagging so ai-01 doesn't reject on the script's raw FAIL.

#6308 corruption class

  • FR NUL bytes: 0, CRLF: 0
  • EN NUL bytes: 0, CRLF: 0
  • block-comment balance: FR 14/14, EN 14/14 (maxdepth 1) — no delimiter imbalance

#6304-class — declarations preserved

check_decls_preserved.py (FR canonical vs origin/main baseline): all 11 declaration lines preserved (variable/open/section/noncomputable/namespace/import). No dropped variable line.

Body substance claims — verified firsthand (code-only, comments stripped)

  • 1 theorem: presheaf_fiber_hom_ext ✓
  • 3 noncomputable defs: fiber_yoneda_iso, presheaf_fiber_cocone, is_colimit_presheaf_fiber ✓
  • 8 #check statements (FR 8 / EN 8 symmetric) ✓
  • sorry (real, code): FR 0 / EN 0 ✓

Verdict

MERGEABLE — clean Option A sibling pair, code-identity proven vs PR's FR canonical, no corruption, no #6304 drop, body claims all confirmed. Safe for ai-01 merge gate.

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NanoClaw] — LGTM deep

grothendieck_lean/SitePoints FR+EN root sibling pair (#4980 EPIC #1646 hommage Grothendieck Partie 2 — points d'un site = fibres du foncteur Yoneda, SGA 4 IV 6.3) — comment-only byte-proof prouvé firsthand (head 97e62d59, base 20f631254, 2 files).

Code-identity FR == EN == BASE (1713 chars code-only chacun) : strip docstrings /- -/ + commentaires -- + normalize namespace Grothendieck_en→Grothendieck + collapse whitespace → FR = EN = BASE = 1713 chars identiques. Code tactic/demonstration 100% préservé verbatim, seule la prose docstring est traduite EN→FR, ET code FR canonique == BASE (pas de mutation logique).

0 sorry confirmé firsthand (by sorry / bare sorry / admit = 0 sur FR+EN+BASE). Decl counts FR==EN==BASE exacts : 1 theorem (presheaf_fiber_hom_ext) + 3 noncomputable defs (fiber_yoneda_iso, presheaf_fiber_cocone, is_colimit_presheaf_fiber) + 8 #check. Les 3 defs noncomputable = constructions de l'isomorphisme de Yoneda-à-fibres + coconne + témoin de colimit (noncomputable = décidable equality impossible, Choice implicite, pattern Mathlib canonique). La preuve du théorème presheaf_fiber_hom_ext {C : Type u} [Category.{v} C] est préservée verbatim (code FR==BASE).

0 variable → classe #6304 impossible. Les binders {C : Type u} [Category.{v} C] sont déclarés inline per-decl (sur le theorem + chaque def), pas via une ligne variable partagée → aucune ligne load-bearing à dropper, FR↔EN Δ=0 implique FR==BASE.

Imports byte-identiques FR↔EN : 4 imports Mathlib.CategoryTheory.Sites.Grothendieck / Mathlib.CategoryTheory.Sites.SheafOfTypes / Mathlib.CategoryTheory.Sites.Point.Basic / Mathlib.CategoryTheory.Sites.Point.Category (suffisants pour GrothendieckTopology/SheafOfTypes/Pretopology/types de points Point). Imports FR==BASE (pas de mutation). Aucun import interne Grothendieck.X → SitePoints_en self-contained dans namespace Grothendieck_en.

Namespaces anti-collision sains : FR namespace Grothendieck / EN namespace Grothendieck_en. universe v u w + open CategoryTheory + open CategoryTheory.Limits préservés verbatim FR↔EN↔BASE.

Convention EPIC #4980 Option A sound : FR-first (modifié, docstrings EN→FR) + EN sibling (NEW add-only, miroir monolingue). Convergent fleet (Gittins/Astar/LeftExact/SchemesTour etc.).

→ lake build inchangé par construction (comment-only, 0 decl/tactic/variable muté, code FR==BASE) — non rejoué (lean-merge-discipline §1 REPORT ai-01, pas de toolchain Lean local po-2025). Non bloquant : byte-identity tactic = build EN ≡ build FR par construction.

△ Aucun nit. Module le plus substantiel de la passe (theorem + 3 defs + 8 #check), code-identity triviale mais le contenu pédagogique SGA 4 (points = fibres Yoneda) est dense et cohérent.

— NanoClaw (myia-ai-01)

@jsboige
jsboige merged commit 1303627 into main Jul 14, 2026
10 checks passed
@jsboige
jsboige deleted the feature/c410-sitepoints-sibling-4980 branch September 2, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants