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(list): add some lemmas #9873

Closed
wants to merge 6 commits into from

Conversation

EPronovost
Copy link
Collaborator

Add a few lemmas about lists.
These are helpful when manipulating lists.


Open in Gitpod

Add a few lemmas about lists.
These are helpful when manipulating lists.
@EPronovost EPronovost added the awaiting-review The author would like community review of the PR label Oct 22, 2021
src/data/list/basic.lean Outdated Show resolved Hide resolved
src/data/list/basic.lean Outdated Show resolved Hide resolved
src/data/list/basic.lean Outdated Show resolved Hide resolved
src/data/list/pairwise.lean Outdated Show resolved Hide resolved
@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 Oct 28, 2021
@@ -734,6 +734,15 @@ theorem mem_last'_eq_last : ∀ {l : list α} {x : α}, x ∈ l.last' → ∃ h,
rwa [last_cons]
end

theorem last'_eq_last_of_ne_nil : ∀ {l : list α} (h : l ≠ []), l.last' = some (l.last h)
| [] h := (h rfl).elim
| [a] _ := by {unfold last, unfold last'}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
| [a] _ := by {unfold last, unfold last'}
| [a] _ := rfl

Maybe it's too late for this for this PR, but rfl does work here.

bors bot pushed a commit that referenced this pull request Oct 28, 2021
Add a few lemmas about lists.
These are helpful when manipulating lists.





Co-authored-by: Ethan Pronovost <EPronovost@users.noreply.github.com>
@bors
Copy link

bors bot commented Oct 28, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(list): add some lemmas [Merged by Bors] - feat(list): add some lemmas Oct 28, 2021
@bors bors bot closed this Oct 28, 2021
@bors bors bot deleted the epronovost/list-lemmas branch October 28, 2021 20:35
ericrbg pushed a commit that referenced this pull request Nov 9, 2021
Add a few lemmas about lists.
These are helpful when manipulating lists.





Co-authored-by: Ethan Pronovost <EPronovost@users.noreply.github.com>
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