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: indentation before | #2581

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

mo271
Copy link

@mo271 mo271 commented Sep 25, 2023

This fixes indentation before | in places where the amount of spaces was not 0 or 2.

I suppose this is the non-controversial part of #2580. Deciding for either 0 or 2 to make it consistent would be a much larger change.

This fixes indentation before `|` in places where the amount of spaces
was not 0 or 2.
@@ -187,7 +187,7 @@ instance [One α] [One β] : One (α × β) where
one := (1, 1)

theorem Product.ext : {p q : α × β} → p.1 = q.1 → p.2 = q.2 → p = q
| (a, b), (c, d) => by simp_all
Copy link
Contributor

Choose a reason for hiding this comment

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

This whole file uses four-space indentation

Copy link
Author

@mo271 mo271 Sep 26, 2023

Choose a reason for hiding this comment

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

yes, and curly braces and semi-colons.

Do you propose to not change the indentation before | in this file or to make the style of this file and KyleAlgAbbrev to match the rest of the repo?
There are currently only 69 occurance of by \{\n , one of them seems deliberate (because of the comment "Same example for curly braces and semicolons aficionados")

Copy link
Contributor

Choose a reason for hiding this comment

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

I can't speak for the lean4 developers, but I think the most sensible choice is either:

  • Leave the file alone (reverting the changes here), adapt the rule to "one indentation level" rather than two spaces
  • Make a separate PR to clean up files with four-space indents.

@@ -163,7 +163,7 @@ instance [One α] [One β] : One (α × β) where
one := (1, 1)

theorem Product.ext : {p q : α × β} → p.1 = q.1 → p.2 = q.2 → p = q
| (a, b), (c, d) => by simp_all
| (a, b), (c, d) => by simp_all
Copy link
Contributor

Choose a reason for hiding this comment

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

As does this one.

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