auto-task(Space): add API-map.yaml tracking the Space API#1341
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thank you for this PR, which will now be reviewed. If submitting to ./Physlib or ./QuantumInfo, please see our review guidelines if you are not familiar with the process. You should expect a back and forth with a reviewer before your PR is merged. See also that link for how to add appropriate labels to your PR. The PR will also go through a number of automated checks. You can learn more about these here, including how to run them locally. If you are submitting to ./PhyslibAlpha there will be a lighter review process, though your PR must still pass the automated checks. If you want to bring attention to this PR, please write a message on this thread of the Lean Zulip. Important: If a reviewer adds an |
Summary
Adds
Physlib/SpaceAndTime/Space/API-map.yaml, a new in-repo tracker for the Space API(
Physlib/SpaceAndTime/Space/). The map is generated from the directory's Lean files, withGitHub issue #854 "API: Space"
used only as a reference for the intended scope. No Lean source is touched;
lake buildstays green (a YAML-only change).
The directory has no
API-map.yamlyet and is not being edited by any open PR (a scan of openPRs found none adding or editing an
API-map.yaml; the only Space-adjacent open PRs are #1116,first-step GalileanGroup API, and #1327, pendulum configuration-space, neither of which touches
this directory's map).
Links below pin commit
843373266f73adaccb4db401c545fdef9810f78eso line numbers are stable.A note on the issue checklist vs. the code
Per the task rules, every
doneflag was decided by reading the code, not by trusting theissue's checkboxes. Two requirements the issue lists as unchecked are in fact implemented and
are marked
done: true:NormedAddTorsorfromEuclideanSpace— issue- [ ], but the instance exists inBasic.lean.- [ ], but the rotation action exists underEuclideanGroup/.The two manifold-target derivative requirements (functions/distributions from
Spacetomanifolds) are genuinely absent from the directory and are marked
done: false.Also, issue #854 lists its "Parent APIs" as #911 (Galilean group). By the actual import graph the
dependency runs the other way — the Galilean-group API builds on
Space, not vice versa — soParentAPIsinstead lists the APIsSpaceactually imports and uses (Distribution, Time, Lorentzvectors).
Field-by-field justification (reviewer tick-box)
Title/OverviewGrounded in the
Basic.leanmodule docstring and theSpacestructure(
Basic.lean#L79-L87):and in the
Module.leandocstring, which scopes the vector-space/norm/inner-product structure(
Module.lean#L18-L22).Issue #854's "Key data structure": "a structure with a single value corresponding to a map from
Fin n to Real. This corresponds to flat space."
ParentAPIsDetermined from the directory's imports and usages:
→d[ℝ]distribution type is used throughout, e.g.distOfFunction(
DistOfFunction.lean#L59-L81).(
CrossProduct.lean#L100-L106).Lorentz.Vectorcomponents of distributions(
DistOfFunction.lean#L191-L199).ReferencesThis is a real reference cited both in issue #854's "References" section and in the
Basic.lean"Implementation details" docstring
(
Basic.lean#L27-L30):No literature reference is invented.
Requirements
✅
Space dis definedBasic.lean#L84-L87Issue #854: "The key data structure ... is a structure with a single value corresponding to a map
from Fin n to Real. ... - [x] Is defined".
✅ Vector space (
ℝ-module) onSpace dModule.lean#L132-L133and
Module.lean#L202-L203Issue #854: "- [x] the instance of a vector space".
✅ Norm, inner product and metric
Module.lean#L268-L269and
Basic.lean#L234-L235Grounded in the
Module.leandocstring (norm, inner product) andBasic.lean(metric); not aseparate issue checklist item, but a main structure genuinely provided.
✅ Origin (zero) and Euclidean chart
Origin.lean#L28-L29and
Origin.lean#L56-L58✅ Smooth-manifold structure
Basic.lean#L276-L280✅ Basis vectors
Module.lean#L360-L361Issue #854: "- [x] basis vectors".
✅
VSubinstance toEuclideanSpaceBasic.lean#L177-L178Issue #854: "- [x] The API shall contain a
VSubinstance toEuclideanSpace."✅
NormedAddTorsorfromEuclideanSpace(issue unchecked, but implemented)Basic.lean#L225-L226Issue #854 lists "- [ ] The API shall contain an
NormAddTorsorinstance fromEuclideanSpace"as unchecked, but the instance is present, so it is
done: true.✅ Translations
Basic.lean#L162-L169and
Translations.lean#L96-L99Issue #854: "- [x] translations".
✅ Action of the group of rotations (issue unchecked, but implemented)
EuclideanGroup/Action.lean#L49-L52and
EuclideanGroup/Basic.lean#L172-L175The
Action.leandocstring "specialises it to the rotations" androtation_smul_eq(Action.lean#L97)
record the rotation-group action on
Space. Issue #854 lists "- [ ] the action of the group ofrotations" as unchecked; the code provides it, so it is
done: true.✅ Relation between Spaces of different dimensions
Slice.lean#L56-L58and
Module.lean#L639-L640Issue #854: "- [x] relation between Spaces of different dimensions".
✅
LengthUnitLengthUnit.lean#L29-L34The
val-with-length-unit design is described in theBasic.leandocstring ("a given (butarbitrary) choice of length unit"); a main structure genuinely provided, not a separate issue
checklist item.
✅ Cross product on
EuclideanSpace ℝ (Fin 3)CrossProduct.lean#L49-L53Grounded in the
CrossProduct.lean"Key results" docstring; a main structure genuinely provided.✅ Derivatives of functions
Space → normed spaceDerivatives/Basic.lean#L67-L73Issue #854: "- [x] derivatives of functions from space to normed spaces".
❌ Derivatives of functions
Space → manifoldIssue #854 lists this as
- [ ]. The directory hasderiv_eq_mfderiv(Derivatives/Basic.lean#L104-L107)
which re-expresses the derivative of a
Space → Mmap (Ma normed space) viamfderiv, butthere is no derivative operator for functions whose codomain is a general manifold. Marked
done: false.✅ Constructing distributions from functions
IsDistBounded.lean#L86-L95and
DistOfFunction.lean#L59-L62Also
distConst(DistConst.lean#L46-L49)
and
constantSliceDist(ConstantSliceDist.lean#L586-L591).
A main structure genuinely provided that underpins the distribution-derivative requirement below.
✅ Derivatives of distributions
Space → normed spaceDerivatives/Basic.lean#L490-L493With
distGrad(Grad.lean#L510),
distDiv(Div.lean#L177),
distCurl(Curl.lean#L702).
Issue #854: "- [x] derivatives of distributions from Space to normed spaces".
❌ Derivatives of distributions
Space → manifoldIssue #854 lists this as
- [ ]; not present in the directory (no distribution-derivativeoperator with a manifold codomain). Marked
done: false.Verification
ruby -e 'require "yaml"; ...'→ valid YAML; top-level keys exactlyversion, Title, Overview, ParentAPIs, References, Requirements(no extra keys);18 requirements, 16
done: true, 2done: false; everydone: truehas a reallocationand everydone: falsehaslocation: N/A.done: truedeclaration was confirmed in the source at the line numbers above(
grep/read across the 11 top-level files and theDerivatives/andEuclideanGroup/subdirectories).
lake build→ a YAML-only addition cannot affect the Lean build graph, so the build staysgreen.
.leanfile, other map, docstring, or the GitHub issue was modified.