Skip to content

Commit d8da71b

Browse files
Docs pass 2: tighter cuts across all four files (526 → 213 lines)
REFACTOR_PLAYBOOK.md (261 → 55): - Decision tree (40 lines of ASCII art) → 8-row table - Verifiable-object consolidation 10-step procedure → 5 steps + sentence on automation - Each pitfall: one paragraph instead of 5-10 lines - Drop separators, sister-doc front matter SORRY_CATALOG.md (115 → 29): - Drop per-file tables — they duplicate the per-sorry docstring repair plans and drift fast (catalog claimed 32, CI says 42). - Keep classification definitions + per-module summary table. - Authoritative count lives in ci.yml; per-sorry repair plans live in each sorry's docstring; this file is now an at-a-glance summary only. NAMING_CONVENTION.md (91 → 84): - §1 prose tightened, "avoid these engineering suffixes" collapsed from 4-line bullet list to one sentence. CONVENTIONS.md (59 → 45): - Trim narrative padding, drop horizontal separators between sections, collapse a few multi-paragraph items into single paragraphs.
1 parent 683d3cb commit d8da71b

4 files changed

Lines changed: 71 additions & 384 deletions

File tree

docs/CONVENTIONS.md

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,45 @@
11
# OpenGA Conventions
22

3-
Canonical conventions for the mathematical objects in OpenGALib. Each entry cites the textbook source. **Conventions are non-negotiable once anchored** — disagreements are answered by citation, not by re-argument. The Lean source is authoritative when prose and code disagree.
3+
Canonical conventions, each with textbook source. **Non-negotiable once anchored** — disagreements are answered by citation. The Lean source is authoritative when prose and code disagree.
44

5-
---
5+
## Curvature sign
66

7-
## Curvature sign convention
8-
9-
OpenGA uses the **do Carmo** sign convention throughout the Riemannian and Comparison layers:
7+
OpenGA uses do Carmo's convention throughout Riemannian and Comparison:
108

119
$$R(X, Y) Z = \nabla_X \nabla_Y Z - \nabla_Y \nabla_X Z - \nabla_{[X, Y]} Z.$$
1210

13-
Ricci curvature is the trace of $R(\,\cdot\,, Y) Z$ in its first slot; sectional curvature of a 2-plane spanned by $X, Y$ is
11+
Ricci is the trace of $R(\,\cdot\,, Y) Z$ in its first slot; sectional curvature of the 2-plane spanned by $X, Y$ is
1412

1513
$$K(X, Y) = \frac{\langle R(X, Y) Y, X \rangle}{\langle X, X \rangle \langle Y, Y \rangle - \langle X, Y \rangle^2}.$$
1614

17-
Ground truth: do Carmo, *Riemannian Geometry*, Ch. 4 §2 (definition of $R$), Ch. 4 §3 (Ricci and sectional curvatures). This is the convention used by Petersen, Cheeger–Ebin, and the majority of the geometric-analysis literature.
15+
Ground truth: do Carmo, *Riemannian Geometry*, Ch. 4 §2–§3. Same convention as Petersen and Cheeger–Ebin.
1816

1917
Implementation: `OpenGALib/Riemannian/Curvature/RiemannCurvature.lean`.
2018

21-
---
22-
2319
## Length functional
2420

25-
The length of a continuous path in a pseudo-extended-metric space is the metric-side total variation:
21+
Length of a continuous path in a pseudo-extended-metric space is the metric-side total variation:
2622

2723
$$\operatorname{pathLength}(\gamma) := \operatorname{eVariationOn}(\gamma, [0, 1]).$$
2824

29-
Ground truth: Burago–Burago–Ivanov, *A Course in Metric Geometry*, §2.1.
30-
31-
This is OpenGA's canonical "length" primitive. It does not reference any smooth structure on the target space, so it applies uniformly to metric spaces, Riemannian manifolds (via the `OpenGALib/Bridges/RiemannianToLength` bridge), Alexandrov spaces, and limits of these.
32-
33-
Implementation: `OpenGALib.pathLength` in `OpenGALib/MetricGeometry/LengthSpace.lean`, wrapping Mathlib's `eVariationOn`.
25+
Ground truth: Burago–Burago–Ivanov §2.1.
3426

35-
The Mathlib tangent-integral length `Manifold.pathELength` (used inside `IsRiemannianManifold`) is a *separate* concept and lives only at the Riemannian boundary. Equality of the two on `` paths over Riemannian manifolds is the content of the `IsRiemannianManifold.toLengthSpace` bridge.
27+
Applies uniformly to metric spaces, Riemannian manifolds (via `Bridges/RiemannianToLength`), Alexandrov spaces, and limits. The Mathlib tangent-integral length `Manifold.pathELength` (used inside `IsRiemannianManifold`) is a *separate* concept; equality on `` paths is the content of `IsRiemannianManifold.toLengthSpace`.
3628

37-
---
29+
Implementation: `OpenGALib.pathLength` in `OpenGALib/MetricGeometry/LengthSpace.lean`, wrapping `eVariationOn`.
3830

3931
## Geodesic existence
4032

41-
A `GeodesicSpace` is a length space in which the path-length infimum is attained between every pair of points. The class only asserts existence — neither uniqueness nor regularity is part of the OpenGA definition.
33+
`GeodesicSpace` = length space in which the path-length infimum is attained between every pair of points. Existence only — neither uniqueness nor regularity is part of the definition.
4234

43-
Ground truth: Burago–Burago–Ivanov §2.5.5.
44-
45-
The Hopf–Rinow theorem (complete Riemannian manifolds are geodesic spaces) belongs to Layer 3a; Layer 1 is metric-only.
35+
Ground truth: Burago–Burago–Ivanov §2.5.5. Hopf–Rinow (complete Riemannian ⇒ geodesic) belongs to Layer 3a; Layer 1 is metric-only.
4636

4737
Implementation: `OpenGALib.GeodesicSpace` in `OpenGALib/MetricGeometry/GeodesicSpace.lean`.
4838

49-
---
50-
5139
## Metric measure space
5240

53-
A `MetricMeasureSpace M` is a `structure` carrying a `PseudoEMetricSpace M` together with a `MeasureTheory.Measure M`. The metric and measure are stored as data (not as typeclasses) so a single carrier may host multiple metric-measure structures.
54-
55-
Ground truth: Gromov, *Metric Structures for Riemannian and Non-Riemannian Spaces*, §3¹⁄₂.5 (mm-spaces); Burago–Burago–Ivanov §1.7.
41+
`MetricMeasureSpace M` = `structure` carrying a `PseudoEMetricSpace M` together with a `MeasureTheory.Measure M`. Both stored as data (not typeclasses), so a single carrier may host multiple metric-measure structures. No regularity / σ-finiteness / Radon hypotheses baked in — added at the use site, matching Mathlib's `MeasureTheory.Measure` discipline.
5642

57-
No regularity / σ-finiteness / Radon hypotheses are baked into the structure. Stronger hypotheses are added at the use site, matching Mathlib's `MeasureTheory.Measure` discipline.
43+
Ground truth: Gromov §3¹⁄₂.5 (mm-spaces); Burago–Burago–Ivanov §1.7.
5844

5945
Implementation: `MetricMeasureSpace` in `OpenGALib/MetricGeometry/MetricMeasureSpace.lean`.

docs/NAMING_CONVENTION.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,18 @@ Lib-wide rules for definitions, theorems, file structure. Goal: code reads like
44

55
## 1. Object suffixes (definitions)
66

7-
Use the smallest mathematical-meaning suffix that describes the object's *type*.
7+
Use the smallest math-meaning suffix that describes the object's *type*.
88

99
| Suffix | Meaning | Example |
1010
|---|---|---|
1111
| `Endo` | endomorphism `V → V` | `curvatureEndo`, `ricciEndo` |
12-
| `Tensor` | tensor (typically `(0,k)`-tensor as bilinear form) | `ricciTensor`, `metricTensor` |
12+
| `Tensor` | tensor (typically `(0,k)` as bilinear form) | `ricciTensor`, `metricTensor` |
1313
| `Bilin` | bilinear form, when `Tensor` is ambiguous | `koszulBilin` |
14-
| `Sharp` | musical isomorphism $\sharp$ (raise indices via metric) | `ricciSharp` |
15-
| `Flat` | musical isomorphism $\flat$ (lower indices via metric) | `gradFlat` |
14+
| `Sharp` / `Flat` | musical iso $\sharp$ / $\flat$ | `ricciSharp`, `gradFlat` |
1615
| `Dual` | dual vector / dual operation | `metricDual` |
17-
| `Form` | when the math name is "X form" | `quadraticForm` (avoid bare `Form` for tensors) |
16+
| `Form` | when the math name is "X form" | `quadraticForm` |
1817

19-
**Avoid these engineering suffixes**:
20-
21-
* `TraceMap`, `Map`, `Func`, `Fn`, `Function`
22-
* `At` / `AtPoint` / `Pt` (when the basepoint is just an argument)
23-
* `Tower`, `Stack`, `Wrapper`, `Aux`, `Bundle` (when not literally a vector bundle)
24-
25-
If the object truly *is* a function, name it like the function (e.g. `gradient`, not `gradientFunc`).
18+
Avoid engineering suffixes: `Map`, `Func`, `Fn`, `Function`, `At` / `AtPoint` / `Pt` (when basepoint is just an argument), `Tower`, `Stack`, `Wrapper`, `Aux`, `Bundle` (when not literally a vector bundle). If the object truly *is* a function, name it like one (`gradient`, not `gradientFunc`).
2619

2720
## 2. Theorem suffixes (Mathlib convention)
2821

0 commit comments

Comments
 (0)