Skip to content

Improve how references are used throughout Physlib - #1613

Merged
jstoobysmith merged 24 commits into
leanprover-community:masterfrom
Alex-Zughaid:references-standardization
Sep 9, 2026
Merged

Improve how references are used throughout Physlib#1613
jstoobysmith merged 24 commits into
leanprover-community:masterfrom
Alex-Zughaid:references-standardization

Conversation

@Alex-Zughaid

Copy link
Copy Markdown
Contributor
  • References section at the top of the file
  • Each reference must appear in the BibTex file
  • The bib ID should appear next to the reference within the Lean files, however we still keep name/author etc. to ensure human readability
  • Added check_references.py which uses regex to check these rules are followed (Similar to lint_bib.sh in mathlib)
  • if you have no references but have a ##References section add * None to make prevent the regex from breaking.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

  1. Some automated checks will be run on your PR. You can see the results of these checks at the buttom of your PR page. If any of these checks fail, you will need to fix the issues before your PR can be merged. You can learn more about these here, including how to run them locally, which is sometimes quicker than relying on the GitHub Actions. If you have never had a PR merged before, you may have to wait for a reviewer to manually start these checks (this is for security).

  2. A reviewer will look at your PR and may ask you to make changes. This may happen a couple of days after you submit your PR, so you may need to be patient. But it should not be longer than that - if it is please bring it to the attention of the community on the Zulip. The level of review will depend on where your PR is submitted. If it is submitted to ./Physlib or ./QuantumInfo, the review will be more thorough than if it is submitted to ./PhyslibAlpha. You can find out more about what the review process is looking for in our review guidelines. If a reviewer adds an awaiting-author label to your PR, address the review comments, then please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

  3. The reviewer will either approve your PR, or request more changes (in which case we return to step 2). Once your PR is approved, it will be merged by a maintainer, this should happen shortly after approval, though you may get more comments at this stage.

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.

@github-actions github-actions Bot added the large label Sep 3, 2026
@Alex-Zughaid

Copy link
Copy Markdown
Contributor Author

Very big PR - important files are references.bib and check_references.py

@jstoobysmith

Copy link
Copy Markdown
Member

Could you make a comment on the relevant Zulip channel about this?

@Alex-Zughaid
Alex-Zughaid force-pushed the references-standardization branch from ae204b4 to 7b696c0 Compare September 3, 2026 15:51
Comment thread .axiomatic/search_lean/.gitignore Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Delete this file and all .axiomatic

Comment thread docs/references.bib Outdated
note = {title not stated in the citing module(s)}
}

@misc{arxiv_1401_5084,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These should be filled out correctly.

@morrison-daniel morrison-daniel 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.

Can't attest to the linter files but I checked the references and they look good, with a few suggestions.

Comment thread Physlib/Relativity/Fermions/Weyl/DualLeftHanded.lean Outdated
Comment thread Physlib/Relativity/LorentzGroup/Boosts/Generalized.lean Outdated
Comment thread Physlib/Relativity/LorentzGroup/Boosts/Generalized.lean Outdated
Comment thread Physlib/StringTheory/FTheory/SU5/Fluxes/Basic.lean Outdated
Comment thread Physlib/StringTheory/FTheory/SU5/Quanta/Basic.lean Outdated
Comment thread Physlib/StringTheory/FTheory/SU5/Quanta/FiveQuanta.lean Outdated
Comment thread Physlib/StringTheory/FTheory/SU5/Quanta/IsViable.lean Outdated
Comment thread Physlib/StringTheory/FTheory/SU5/Quanta/TenQuanta.lean Outdated
Comment thread Physlib/StringTheory/FTheory/SU5/Basic.lean Outdated
@morrison-daniel

Copy link
Copy Markdown
Collaborator

The style is much more uniform but we should probably discuss what should/shouldn't be in the reference section of the module. As it is now, the style guide is:

  1. References section in the module doc-string, either as ##References (old doc-strings) or iv. References (new table of contents style)
  2. If no references simply write * None.
  3. References are of the style `* , <title> (arXiv:XXXX.XXXX [if applicable, else empty]), <specific sections, equations, problems of note, usually for textbooks>. [ref: <bib_reference>]

The variations on point 3 are

  • Authors may not be present
  • Titles are sometimes italicized
  • Sometimes a link is included when available

I could go either way on author inclusion, it would probably nice to include them but they are in the full bib file so I think we could remove them and rely on the link to the full reference. Removing would help keep it shorter and I think the doc-strings are already too long.

Again, italics is probably more correct but this isn't an actual citation. No italics is much more common, but we just need to pick one. I would say no formatting just to keep it simple.

Link is another one I'm not sure about since they're very convenient but take up space. Many are arXiv links, but many arXiv refs just use the arXiv:XXXX.XXXX label which is perhaps sufficient since arXiv is well-known and easy to find. Maybe one proposal could be to only use the axXiv ID for arXiv papers and include a full link to harder to find refs like lecture notes hosted on a personal website.

I think what we have here is already an improvement and I don't want to hold this up with more discussion so I'd be happy to merge this and make edits when we hash out some details.

Alex-Zughaid and others added 11 commits September 7, 2026 21:59
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>
Co-authored-by: Daniel Morrison <39346894+morrison-daniel@users.noreply.github.com>

@morrison-daniel morrison-daniel 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.

I'm happy at this point so I'll leave the approval and mark this as ready-to-merge. @jstoobysmith if you're happy go ahead and merge.

@morrison-daniel morrison-daniel added the ready-to-merge This PR is approved and will be merged shortly label Sep 8, 2026
@jstoobysmith
jstoobysmith merged commit 715f2ac into leanprover-community:master Sep 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

large ready-to-merge This PR is approved and will be merged shortly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants