Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix focusing dots and semicolons #5699

Closed
wants to merge 4 commits into from
Closed

chore: fix focusing dots and semicolons #5699

wants to merge 4 commits into from

Conversation

Parcly-Taxel
Copy link
Collaborator

@Parcly-Taxel Parcly-Taxel commented Jul 4, 2023

This PR adds linter checks to ensure that

  • focusing dots are centred (·) and not isolated (mathport may sometimes produce examples of the second kind)
  • there are no instances of a space before a semicolon, the space being unnecessary here.

It also removes some redundant semicolons.


Open in Gitpod

This commit adds a linter check to ensure that focusing dots are centred
(·) and not isolated (mathport may sometimes produce examples of the
second kind).
@Parcly-Taxel Parcly-Taxel changed the title chore: fix focusing dots chore: fix focusing dots and semicolons Jul 4, 2023
scripts/lint-style.py Outdated Show resolved Hide resolved
test/Monotonicity.lean Outdated Show resolved Hide resolved
Comment on lines +496 to +501
hb (hx.symm ▸ ⟨y, mul_right_cancel₀ hp.1 <| by
rw [tsub_add_cancel_of_le (succ_le_of_lt hm0)] at hy
simp [hy, pow_add, mul_comm, mul_assoc, mul_left_comm]⟩)
finite_mul_aux hp ha hpx ⟨s, mul_right_cancel₀ hp.1 (by
rw [add_assoc, tsub_add_cancel_of_le (succ_le_of_lt hm0)]
simp_all [mul_comm, mul_assoc, mul_left_comm, pow_add])⟩
Copy link
Member

Choose a reason for hiding this comment

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

Idem dito for this kind of reformatting and reflowing of proofs.

Ideally a diff that touches > 30 files will be completely automatically generated by a script that fixes the syntax. Then we can have high confidence that the diff does one and does it well.

@semorrison semorrison added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Jul 4, 2023
@Parcly-Taxel Parcly-Taxel deleted the fixdots branch July 4, 2023 14:14
bors bot pushed a commit that referenced this pull request Jul 4, 2023
This is the second half of the changes originally in #5699, removing all occurrences of `;` _after_ a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:
```
find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;
```
The remaining cases were few enough in number that they were done manually.
kbuzzard pushed a commit that referenced this pull request Jul 6, 2023
This is the second half of the changes originally in #5699, removing all occurrences of `;` _after_ a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:
```
find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;
```
The remaining cases were few enough in number that they were done manually.
semorrison pushed a commit that referenced this pull request Aug 14, 2023
This is the second half of the changes originally in #5699, removing all occurrences of `;` _after_ a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:
```
find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;
```
The remaining cases were few enough in number that they were done manually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-conflict The PR has a merge conflict with master, and needs manual merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants