leanprover-community / leanprover-community/physlib

Incorrect documentation for realLorentzTensor in Basic.lean

Open Beginner friendly
#1,538 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help-wanted
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.