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

[Merged by Bors] - feat(lint): improved ge_or_gt linter #3810

Closed
wants to merge 6 commits into from

Conversation

fpvandoorn
Copy link
Member

@fpvandoorn fpvandoorn commented Aug 15, 2020

The linter will now correctly accepts occurrences of f (≥) and ∃ x ≥ t, b
The linter will still raise a false positive on ∃ x y ≥ t, b (with 2+ bound variables in a single binder that involves >/≥)
In contrast to the previous version of the linter, this one does check hypotheses.
This should reduce the @[nolint ge_or_gt] attributes from ~160 to ~10.


Until #3808 and #3809 are merged, the linter will raise many errors.

@fpvandoorn fpvandoorn added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Aug 15, 2020
@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Aug 15, 2020
@fpvandoorn fpvandoorn changed the title feat(lint): improved ge_or_gt linter [deps: 3808, 3809] feat(lint): improved ge_or_gt linter [deps: 3809] Aug 16, 2020
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Aug 16, 2020
@fpvandoorn fpvandoorn added awaiting-review The author would like community review of the PR and removed blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. labels Aug 16, 2020
@fpvandoorn fpvandoorn changed the title feat(lint): improved ge_or_gt linter [deps: 3809] feat(lint): improved ge_or_gt linter Aug 16, 2020
@@ -1262,7 +1262,7 @@ lemma remove_nth_insert_nth (n:ℕ) (l : list α) : (l.insert_nth n a).remove_nt
by rw [remove_nth_eq_nth_tail, insert_nth, modify_nth_tail_modify_nth_tail_same];
from modify_nth_tail_id _ _

lemma insert_nth_remove_nth_of_ge : ∀n m as, n < length as → m ≥ n
lemma insert_nth_remove_nth_of_ge : ∀n m as, n < length as → n ≤ m
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the name be changed too?

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe... However, insert_nth_remove_nth_of_le already exists, with n and m in the other order.

@robertylewis
Copy link
Member

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Aug 17, 2020
bors bot pushed a commit that referenced this pull request Aug 17, 2020
The linter will now correctly accepts occurrences of `f (≥)` and `∃ x ≥ t, b`
The linter will still raise a false positive on `∃ x y ≥ t, b` (with 2+ bound variables in a single binder that involves `>/≥`)
In contrast to the previous version of the linter, this one *does* check hypotheses.
This should reduce the `@[nolint ge_or_gt]` attributes from ~160 to ~10.
@bors
Copy link

bors bot commented Aug 17, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(lint): improved ge_or_gt linter [Merged by Bors] - feat(lint): improved ge_or_gt linter Aug 17, 2020
@bors bors bot closed this Aug 17, 2020
@bors bors bot deleted the ge_gt_linter branch August 17, 2020 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants