-
Notifications
You must be signed in to change notification settings - Fork 248
Some lemmata for non-empty lists #2730
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
base: master
Are you sure you want to change the base?
Conversation
These look like good additions! Can you update |
ad38846
to
f4737f0
Compare
Ok, I updated the changelog as well. :) |
I also migrated some additional lemmas from |
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.
A few nits, but otherwise this is looking nice.
[Not a big fan of rewrite
, but it's not a showstopper.]
Thank you for the review. :) I integrated the requested changes. I also got rid of the |
faf831c
to
f387ebc
Compare
f387ebc
to
658a9b0
Compare
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.
Happy with this; apart from two small naming issues (and related completeness question).
@@ -260,6 +260,7 @@ Additions to existing modules | |||
|
|||
* In `Data.List.Properties`: | |||
```agda | |||
length-++-≤ : ∀ (xs : List A) → length xs ≤ length (xs ++ ys) |
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.
Feels like this should have a ˡ
suffix and we should have the ʳ
variant too.
∷⁺→∷ : (x List⁺.∷ xs) ≡ (y List⁺.∷ ys) → | ||
(x List.∷ xs) ≡ (y List.∷ ys) | ||
length-⁺++⁺ : (xs ys : List⁺ A) → length (xs ⁺++⁺ ys) ≡ length xs + length ys | ||
length-⁺++⁺-≤ : (xs ys : List⁺ A) → length xs ≤ length (xs ⁺++⁺ ys) |
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.
Same remark about suffixes.
These are some lemmata we needed in our project Vatras for reasoning on non-empty lists. It seemed these lemmata could be generally useful to other people as well.
-- PR is part of Zurihac 2025