leanprover-community / leanprover-community/physlib
Incorrect documentation for realLorentzTensor in Basic.lean
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 750
- Forks
- 191
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 75
Description
⚠️ Found by a local LLM, not a human. This was flagged by an automated documentation-mistake finder (
qwen3:14b) and passed 10/10 independent verification runs before filing, but it has not been reviewed by a person. Please check it's a genuine error before acting on it.
Summary
The documentation in Physlib/Relativity/Tensors/RealTensor/Basic.lean (around line 67) is incorrect.
Current text
/-- The tensor structure for complex Lorentz tensors. -/
Why this is wrong
The docstring for realLorentzTensor incorrectly claims it defines "complex Lorentz tensors", but the declaration's name and surrounding context clearly indicate it is for real tensors. The file's comments explicitly mention "Real Lorentz tensors" and the definition uses Lorentz.ContrMod/Lorentz.CoMod, which are real vector spaces.
This discrepancy arises because the docstring was not updated when the definition was renamed from a complex variant to a real one. The correction aligns the documentation with the actual purpose of realLorentzTensor, which is consistent with the file's focus on real tensor structures and the use of ℝ as the scalar field in its type signature.
Suggested correction
/-- The tensor structure for real Lorentz tensors. -/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open Physlib/Relativity/Tensors/RealTensor/Basic.lean around line 67 and inspect the realLorentzTensor declaration and its surrounding comments. Confirm that the docstring describes real rather than complex Lorentz tensors, then update the wording and verify the file remains valid.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100