leanprover-community/physlib

Comment claims equivalence between `ContrℝModule` and complex-valued vectors

Offen

#1.508 geöffnet am 11.08.2026

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Lean (139 Forks)auto 404
good first issue

Repository-Metriken

Stars
 (642 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Summary

The documentation in Physlib/Relativity/Tensors/RealTensor/Vector/Pre/Modules.lean (around line 46) is incorrect.

Current text

/-- The equivalence between `ContrℝModule` and `Fin 1 ⊕ Fin d → ℂ`. -/

Why this is wrong

The documentation comment above def toFin1dℝFun asserts an equivalence between ContrℝModule and vectors valued in . This contradicts the actual definition of the structure, which is named ContrMod rather than ContrℝModule. Additionally, the file header explicitly describes these as "Real Lorentz vectors", indicating a real field.

The implementation defines toFin1dℝFun mapping between ContrMod d and functions into , not . Consequently, the scalar field in the type signature of the equivalence is incorrect in the comment.

Updating this comment to reference ContrMod and aligns the documentation with the code's reality regarding real Lorentz vector modules.

Suggested correction

/-- The equivalence between `ContrMod` and `Fin 1 ⊕ Fin d → ℝ`. -/

Found with a local LLM pass over Physlib documentation (qwen3.5:9b); 10 of 10 independent verification runs agreed this is a genuine error before filing. Please sanity-check before merging.

Contributor Guide