Skip to content

Operator spacing and docstring clarity in the hashing modules - #26

Merged
daira merged 2 commits into
mainfrom
hashing-style
Aug 13, 2026
Merged

Operator spacing and docstring clarity in the hashing modules#26
daira merged 2 commits into
mainfrom
hashing-style

Conversation

@daira

@daira daira commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Style and documentation cleanup of the modules added in #19, split out of the indifferentiability counting-interface branch (#25) so that PR's review is not dominated by formatting noise.

The style commit applies the binding-reflecting operator spacing convention across the hashing modules: exponentiation is tight (u^2, xdiv^3, 2^k) except when both operands are long and parenthesized, as in the Euler-criterion show lines; * and / are tight between short atomic operands, with uniform spacing along chains of the same operator (2*lam*hL, but 3 * A * x^2). + and - are tight only when adding or subtracting 1 from a short atom (ta+1, k-1). Chained exponentiation is parenthesized to reflect its right associativity (b2k^(2^j), not b2k^2^j), and one application operand gained parentheses where a tight caret would misread ((I.xnum x₁)^2). Comments and docstrings are included in the pass. The generated VeluCertificates.lean already follows the convention and is untouched.

The docs commit rewords docstrings that had the form "conclusion: argument", leaving the relationship implicit; they now join the two with "by", "because", or "so" as the relationship warrants.

🤖 Claude Opus 4.8

daira and others added 2 commits August 13, 2026 16:32
Exponentiation is tight (u^2, xdiv^3, 2^k), except when both operands are
long and parenthesized, as in the Euler-criterion show lines. * and / are
tight between short atomic operands, with uniform spacing along chains of
the same operator (2*lam*hL, but 3 * A * x^2). + and - are tight only when
adding or subtracting 1 from a short atom (ta+1). One application operand
gained parentheses where a tight caret would have misread: (I.xnum x₁)^2.
The modules added on the hashing branch had drifted into spacing every
operator; comments and docstrings are included in the pass. The generated
VeluCertificates.lean already follows the convention and is untouched.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Several docstrings had the form "conclusion: argument", leaving the
relationship between the two implicit. Join them with "by", "because", or
"so" as the relationship warrants.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

@daira daira left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-ACK

@daira
daira marked this pull request as ready for review August 13, 2026 15:36
@daira
daira merged commit 6ade50d into main Aug 13, 2026
8 checks passed
@daira
daira deleted the hashing-style branch August 13, 2026 15:38
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.

1 participant