auto-task(OperatorAlgebra): add API-map.yaml for the observable-algebra API - #1555
auto-task(OperatorAlgebra): add API-map.yaml for the observable-algebra API#1555Alex-Zughaid wants to merge 1 commit into
Conversation
…ra API Co-authored-by: Claude <noreply@anthropic.com>
|
Thank you for this pull-request (PR). If this is your first PR, welcome to the community! Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.
Tip: The easiest way to get have a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your chages. If you have any problems or questions, please reach out to the community on the Zulip. |
|
It looks like some other small changes got mixed into this PR and are causing the build to fail - could you please isolate the API-map addition? |
Summary
Adds
Physlib/QuantumMechanics/OperatorAlgebra/API-map.yaml, a new in-repo tracker for theObservable algebra API (
Physlib/QuantumMechanics/OperatorAlgebra/). The map is generatedentirely from the directory's single Lean file,
Basic.lean. No matching GitHubAPIissueexists for this directory (see "No matching issue" below), so the map is grounded only in the
code. No Lean source is touched;
lake buildon this target stays green (a YAML-only change).The directory has no
API-map.yamlyet, was added in the most recent commit onmaster(
e3e9d9b, "feat(OperatorAlgebra): start the operator algebra formalization (#1550)"), and isnot being edited by any open PR — see "Open-PR check" below.
Links below pin commit
e3e9d9bso line numbers are stable.
Open-PR check
gh pr list --repo leanprover-community/physlib --state open --limit 1000returned 30 open PRs.I checked every one's changed files for
API-map.yaml. Three PRs touch a map:docs(temperature): temperature API map→Physlib/Thermodynamics/Temperature/API-map.yamlfeat: Add API map for the SM→Physlib/Particles/StandardModel/API-map.yamlfeat(PhyslibAlpha): QuantumThermodynamics ...→PhyslibAlpha/QuantumThermodynamics/API-map.yamlNone touches
Physlib/QuantumMechanics/OperatorAlgebra/, so it was free to pick.No matching issue
gh issue list --repo leanprover-community/physlib --label API --limit 1000lists 25 openAPIissues; none is about operator/observable algebras, C⋆-algebras, POVMs, states or channels. I
also searched the issue tracker directly for
"operator algebra","observable","C*-algebra"and
"POVM"— all empty. The PR that introduced the directory, #1550, links no issue either. Perthe task rules ("if none exists, that's fine — generate the map from the directory alone"), the
map below is generated purely from
Basic.lean.Field-by-field justification (reviewer tick-box)
Title/OverviewGrounded in the module docstring, which is itself titled "Observable algebras":
Basic.lean#L11-L29Note: I deliberately titled this map "Observable algebra", not "Operator algebra" — the
directory is named
OperatorAlgebra, butPhyslib/QuantumMechanics/Operators/API-map.yamlalready uses the title "Operator algebra" for the unbounded-operator API (position, momentum,
uncertainty, ...), which is a different, sibling API. The module docstring here calls its own
subject "Observable algebras", so I used that to avoid a naming collision between the two maps.
ParentAPIsBasic.leanimports only Mathlib, nothing from Physlib:Basic.lean#L8-L9I also grepped the whole repo (
grep -rl "OperatorAlgebra" --include=*.lean Physlib) and no otherPhyslib file references this directory yet, so there is nothing to list as a parent (and nothing
downstream either — this is a fresh leaf).
ReferencesBasic.lean's module docstring (quoted above in full) has no references section, and no matchingGitHub issue exists to supply one — so no citation is invented.
Requirements
Every
locationbelow was checked against the code directly (Basic.leanhas 119 lines, alldeclarations read in full), and the target
lake build Physlib.QuantumMechanics.OperatorAlgebra.Basicwas run and completed successfully, confirming each declaration actually exists and type-checks.
✅
OperatorAlgebra, the key data structureBasic.lean#L37-L40✅
ObservableBasic.lean#L48-L52✅
PositiveElementBasic.lean#L54-L57✅
EffectBasic.lean#L59-L62✅
POVMBasic.lean#L64-L70✅
UnitaryBasic.lean#L72-L75✅
StateBasic.lean#L77-L84✅
ChannelBasic.lean#L86-L89✅
RepresentationBasic.lean#L110-L114❌ Elementary results in per-notion files — not yet present
The module docstring itself announces this as future work, and no such files exist yet:
Basic.lean#L28-L29Physlib/QuantumMechanics/OperatorAlgebra/currently contains onlyBasic.lean(
find Physlib/QuantumMechanics/OperatorAlgebra -type f), so this is unmet.Verification
python3 -c "import yaml; yaml.safe_load(open('Physlib/QuantumMechanics/OperatorAlgebra/API-map.yaml'))"succeeds.done: truelocation was read in full and cross-checked against the file (line rangesabove cover the entire 119-line file's non-copyright, non-import content).
lake build Physlib.QuantumMechanics.OperatorAlgebra.Basiccompletessuccessfully (3039/3039 jobs, including all of Mathlib after the recent 4.33 toolchain bump).
This is the only Lean file in the directory, and no
.leanfile was modified — only the newAPI-map.yamlwas added.