refactor: QuantumInfo line lengths <100characters#1195
Open
jstoobysmith wants to merge 3 commits into
Open
Conversation
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
Contributor
|
Thank you for this PR, which will now be reviewed. If you are submitting to ./PhyslibAlpha there will be a lighter review process, If you want to bring attention to this PR, please write a message on this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was done entirely using Claude Opus 4.8.
AI summary
Wrap
QuantumInfosource lines to 100 charactersReformats every file under
./QuantumInfoso 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/inductivedeclarations 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)
Channels/CPTP.lean,States/Mixed/MState.lean— 4 places where a;tactic separator became a newline (equivalent in Lean 4; the following tactic stays at the same indentation column).Capacity/Capacity.lean,ForMathlib/HermitianMat/CFC.lean— onevariable [..] [..]command split into twovariablelines (equivalent).Channels/Dual.lean,States/Mixed/MState.lean— a few trailing-- commentsmoved onto their own line above the code (comments are inert).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:
Entropy/Relative.lean,ForMathlib/HermitianMat/CFC.lean,ForMathlib/Majorization.lean,ForMathlib/Matrix.lean,ResourceTheory/SteinsLemma.lean,Entropy/SSA.lean,States/Mixed/MState.lean.ForMathlib/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.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 Leanimportwhose module path is a single unsplittable token (already over-length before this PR).