-
Notifications
You must be signed in to change notification settings - Fork 299
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(data/list/basic): repeat injectivity #6337
Conversation
pechersky
commented
Feb 21, 2021
src/data/list/basic.lean
Outdated
@@ -474,6 +474,35 @@ by cases n; refl | |||
@[simp] theorem join_repeat_nil (n : ℕ) : join (repeat [] n) = @nil α := | |||
by induction n; [refl, simp only [*, repeat, join, append_nil]] | |||
|
|||
lemma repeat_inj_left {a b : α} {n : ℕ} (npos : 0 < n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like *_left_inj
and *_right_inj
are more common in the library, and the example at our naming conventions page is sub_right_inj
, so I'd recommend switching the naming over to that.
This convention might be confusing given all the other things named with left
and right
at the very end, but that's something we should discuss on Zulip if someone feels strongly about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed lemmas, added function.injective
versions, and golfed the proofs.
Thanks! Feel free to merge if you're happy with Yury's changes. |
✌️ pechersky can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
Pull request successfully merged into master. Build succeeded: |
Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>