-
Notifications
You must be signed in to change notification settings - Fork 251
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: two easy lemmas about List.Lex #6395
Conversation
Mathlib/Data/List/Lex.lean
Outdated
@@ -61,6 +61,19 @@ theorem not_nil_right (r : α → α → Prop) (l : List α) : ¬Lex r l [] := | |||
fun. | |||
#align list.lex.not_nil_right List.Lex.not_nil_right | |||
|
|||
theorem nil_left_or_nil_eq {r : α → α → Prop} (l : List α) : List.Lex r [] l ∨ [] = l := by |
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.
Can you add a version assuming IsRefl r
that says List.Lex r [] l
?
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.
That result is not true. List.Lex
is not reflexive even though r
is.
Indeed, we have: List.Lex.not_nil_right : ¬List.Lex r l []
, in particular ¬List.Lex r [] []
✌️ dagurtomas can now approve this pull request. To approve and merge a pull request, simply reply with |
Mathlib/Data/List/Lex.lean
Outdated
refine' ⟨fun h ↦ _, List.Lex.rel⟩ | ||
by_contra h' | ||
cases h | ||
· apply not_nil_right r []; assumption | ||
· apply h'; assumption | ||
theorem singleton_iff {r : α → α → Prop} (a b : α) : List.Lex r [a] [b] ↔ r a b := | ||
⟨fun | rel h => h, List.Lex.rel⟩ |
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.
by_contra
was overkill :)
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
bors r+ |
Proves that `[]` is the "bottom element" for `List.Lex r` for any relation `r` and that `List.Lex r [a] [b]` iff `r a b` Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Proves that `[]` is the "bottom element" for `List.Lex r` for any relation `r` and that `List.Lex r [a] [b]` iff `r a b` Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Nobeling's theorem: the Z-module of locally constant maps from a profinite set to the integers is free. - [x] depends on: #6360 - [x] depends on: #6373 - [x] depends on: #6395 - [x] depends on: #6396 - [x] depends on: #6432 - [x] depends on: #6520 - [x] depends on: #6578 - [x] depends on: #6589 - [x] depends on: #6722 - [x] depends on: #7829 - [x] depends on: #7895 - [x] depends on: #7896 - [x] depends on: #7897 - [x] depends on: #7899
Nobeling's theorem: the Z-module of locally constant maps from a profinite set to the integers is free. - [x] depends on: #6360 - [x] depends on: #6373 - [x] depends on: #6395 - [x] depends on: #6396 - [x] depends on: #6432 - [x] depends on: #6520 - [x] depends on: #6578 - [x] depends on: #6589 - [x] depends on: #6722 - [x] depends on: #7829 - [x] depends on: #7895 - [x] depends on: #7896 - [x] depends on: #7897 - [x] depends on: #7899
Proves that
[]
is the "bottom element" forList.Lex r
for any relationr
and thatList.Lex r [a] [b]
iffr a b