Skip to content

[Merged by Bors] - chore: adaptations for the multi-goal linter#14939

Closed
grunweg wants to merge 3 commits intomasterfrom
MR-multigoal-fixes
Closed

[Merged by Bors] - chore: adaptations for the multi-goal linter#14939
grunweg wants to merge 3 commits intomasterfrom
MR-multigoal-fixes

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Jul 20, 2024


I really don't care which colour we paint this bikeshed in - if you prefer fixing this in a different style, I'm all ears!

Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 20, 2024

PR summary fec7d8aeda

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

refine (norm_sum_le _ _).trans <| (sum_le_sum this).trans ?_
rw [← sum_mul]
trans μ.toBoxAdditive I * ε₁; swap; linarith
trans μ.toBoxAdditive I * ε₁; swap
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This "swap and handle side goal idiom" could also be replaced by "pick_goal 2 => linarith" or similar. Just tell me your favourite bikeshed colour :-)

(ψ : b ⟶ c) [p.IsHomLift f φ] [p.IsHomLift g ψ] : p.IsHomLift (f ≫ g) (φ ≫ ψ) := by
apply of_commSq
rw [p.map_comp]
on_goal 1 => rw [p.map_comp]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The line below applies to both goals; this rw just massages the first into the suitable form.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is obscure enough that it warrants a comment in the code. I would never have guessed that behaviour if I had to fix this proof because it broke for unrelated reasons.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, I've added a comment to this instance and the four other places with similar logic.

positivity
have := noAccidental hA
rw [Nat.floor_lt' (by positivity), inv_pos_lt_iff_one_lt_mul'] at hG
swap
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a positivity side goal: it feels clearer to me to solve that first.

Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jul 20, 2024

✌️ grunweg can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Jul 20, 2024
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jul 20, 2024

bors merge

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jul 20, 2024

If anybody feels like tweaking the comments from the last commit, feel free to propose a follow-up; I'll be happy to review it.

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jul 20, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: adaptations for the multi-goal linter [Merged by Bors] - chore: adaptations for the multi-goal linter Jul 20, 2024
@mathlib-bors mathlib-bors bot closed this Jul 20, 2024
@mathlib-bors mathlib-bors bot deleted the MR-multigoal-fixes branch July 20, 2024 10:12
@adomani adomani mentioned this pull request Aug 1, 2024
mathlib-bors bot pushed a commit that referenced this pull request Oct 21, 2024
A linter that makes sure that, when multiple goals are present, they are enclosed in `·`s.

Adaptations (the order is chronological, there should be no dependency among them):
* #12338,
* #12361,
* #12372,
* #12560,
* #12834,
* #12381,
* #12908,
* #14939,

plus many many more that this comment is too small to contain.



Co-authored-by: Michael Rothgang <rothgami@math.hu-berlin.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants