leanprover-community / leanprover-community/physlib

Incorrect 'complex' documentation for real Lorentz tensors in Metrics/Basic.lean

Open Beginner friendly
#1,532 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/Metrics/Basic.lean (around line 33) is incorrect.

Current text
/-- The metric `ηᵢᵢ` as a complex Lorentz tensor. -/
Why this is wrong

The documentation for coMetric and contrMetric in physlib/Physlib/Relativity/Tensors/RealTensor/Metrics/Basic.lean incorrectly describes these tensors as "complex Lorentz tensors". This is wrong because both declarations use the type ℝT, which explicitly denotes real-valued tensors. The term "complex" contradicts the type's definition and the context of the file, which focuses on real tensor structures.

The correction changes "complex" to "real", aligning the documentation with the actual type ℝT and the mathematical context of Lorentz tensors in relativity. This ensures consistency between the code's type system and its semantic description, avoiding confusion for users relying on accurate documentation.

Suggested correction
/-- The metric `ηᵢᵢ` as a real Lorentz tensor. -/

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/Metrics/Basic.lean around line 33 and inspect the coMetric and contrMetric documentation alongside their ℝT types. Correct the wording so the tensors are described as real Lorentz tensors, then verify the file remains consistent with the surrounding real-tensor documentation.

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
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.