Skip to content

refactor: QuantumInfo line lengths <100characters#1195

Open
jstoobysmith wants to merge 3 commits into
leanprover-community:masterfrom
jstoobysmith:QuantumInfoLines
Open

refactor: QuantumInfo line lengths <100characters#1195
jstoobysmith wants to merge 3 commits into
leanprover-community:masterfrom
jstoobysmith:QuantumInfoLines

Conversation

@jstoobysmith

Copy link
Copy Markdown
Member

This was done entirely using Claude Opus 4.8.

AI summary

Wrap QuantumInfo source lines to 100 characters

Reformats every file under ./QuantumInfo so no line exceeds 100 characters, by redistributing existing content across multiple lines. Pure formatting change — comments wrapped at word boundaries; Lean code broken at safe points (binder groups, after binary operators / :=, deeper-indented tactic continuations, inside bracketed argument lists) per the project's house style. 61 files changed.

Lemmas / definitions added or removed

None. No declarations were added, removed, or modified. Verified mechanically: the set of theorem/lemma/def/abbrev/instance/structure/class/inductive declarations is identical before and after (2146 in both), and the whitespace- and comment-stripped token stream of all 61 files matches the previous revision exactly, except for the semantics-preserving edits noted below.

Only non-whitespace edits (all semantics-preserving)

Reviewer map

Review in this order; spend the most time on the first group (densest wrapping decisions), and on the "non-whitespace edits" files above:

  1. Largest / densest wrapsEntropy/Relative.lean, ForMathlib/HermitianMat/CFC.lean, ForMathlib/Majorization.lean, ForMathlib/Matrix.lean, ResourceTheory/SteinsLemma.lean, Entropy/SSA.lean, States/Mixed/MState.lean.
  2. MediumForMathlib/LimSupInf.lean, ForMathlib/HermitianMat/LogExp.lean, ForMathlib/HermitianMat/Rpow.lean, ForMathlib/HermitianMat/Inner.lean, Channels/Unbundled.lean, ForMathlib/Isometry.lean, States/Entanglement.lean, Entropy/DPI.lean.
  3. Remainder — the other ~40 files (small, mechanical splits).

Tip: review with whitespace ignored (git diff -w / "Hide whitespace" on GitHub) — most hunks collapse to nothing, leaving only the genuine edits called out above for scrutiny.

Known exception

One line remains >100 chars: ForMathlib/HayataGroup/TraceInequality/LownerHeinzCore.lean:10, a Lean import whose module path is a single unsplittable token (already over-length before this PR).

claude and others added 2 commits June 17, 2026 05:49
Reflow every line in ./QuantumInfo to fit within 100 characters by
distributing existing content across multiple lines, without changing any
code semantics.

- Comments (line `--`, doc `/-- -/`, block `/- -/`, module `/-! -/`) are
  wrapped at word boundaries, preserving indentation and markdown structure.
- Lean code is broken only at safe points following the project's style:
  binder groups on their own indented lines, breaks after/before binary
  operators and `:=`, tactic continuations indented deeper than the tactic,
  and splits inside bracketed argument lists / anonymous constructors.

Only newlines and indentation were inserted (plus `-- ` prefixes on split
line comments and one Lean string gap); no identifiers, tokens, ordering,
or semantics were altered. Verified by comparing whitespace/comment-marker
stripped content against the previous revision for all 61 files.

The single remaining >100-character line is an unavoidable Lean `import`
path (LownerHeinzCore.lean) whose module name cannot be split.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T425WBh66LvJVDWpjUSjFV
Reformat line breaks for improved code readability
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for this PR, which will now be reviewed.
If submitting to ./Physlib or ./QuantumInfo, please
see our review guidelines
if you are not familiar with the process. You should expect a back and forth
with a reviewer before your PR is merged. See also that link for how to
add appropriate labels to your PR. The PR will also go through a number
of automated checks. You can learn more about these here,
including how to run them locally.

If you are submitting to ./PhyslibAlpha there will be a lighter review process,
though your PR must still pass the automated checks.

If you want to bring attention to this PR, please write a message on this
thread of the Lean Zulip.

@jstoobysmith jstoobysmith requested a review from Timeroot June 17, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants