-
Notifications
You must be signed in to change notification settings - Fork 245
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
New property merge-is-superlist #1950
Conversation
I think these functions are incorrectly named; |
@Taneb wrote:
Thanks for the comment, now I am using |
Nice! Thanks for the response to reviews... I fully sympathise with the difficulty of finding names, here where they are imported from deep below the hierarchy (and |
Regarding |
@jamesmckinna I couldn't find it. Could you make an issue for it, because I think it's important to have and also doesn't need to be done in this PR (I think it might need stronger preconditions on the lists) |
Yeah, |
Re: 'up to permutation' Is that not what is being captured by |
@jamesmckinna wrote:
No, sublists are order-preserving, so the bigger list just inflates the smaller list by new elements, but the relative order of the old elements stays the same. (Up to permutation would be the "subset" concept for lists.)
I think if the PR is meaningful as such, it should be accepted as such (avoiding feature creep that kills PRs). |
|
||
module Data.List.Relation.Binary.Sublist.Setoid.Properties | ||
{c ℓ} (S : Setoid c ℓ) where | ||
|
||
open import Data.List.Base hiding (_∷ʳ_) | ||
open import Data.List.Relation.Unary.Any using (Any) | ||
open import Data.List.Relation.Binary.Sublist.Heterogeneous using () renaming (minimum to []⊆_) |
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.
Hmm best to not rename things unnecessarily? If you wanted to you could add an extra lemma named ⊆-minimum
here?
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.
OK, I'll change, even though it makes the proof less readable, because []⊆ xs
is unambiguous for [] ⊆ xs
, while minimum xs
would (in my intuitition) mean to extract the minimal element from list xs
(see Haskell's Foldable
s).
(I've deleted the |
I thought "linear history" still leaves two options: "rebase" and "squash", the first for well-engineered individual commits and the second for "commit followed by fixups". (So I put up a flag that "rebase" would be a bad option here...) In my experience, Github's default is whatever you used the last time... |
8813e04
to
921d9df
Compare
Looks good to me. We'll need a CHANGELOG entry though. |
@andreasabel any chance you could add a CHANGELOG entry as @gallais requests and then I'll merge this in? |
Proofs that both lists involved in a merge are sublists of the result of the merge.
921d9df
to
16ea829
Compare
@MatthewDaggitt : Sorry, I missed the last comments. Btw, why is CHANGELOG.md excluded from fix-whitespace? |
Fine to merge now, @MatthewDaggitt ? |
Unsure... I guess because it's not code? |
Thanks for merging!
Technically, markdown has this obscure (and imo ill-designed) feature that two trailing spaces force a line break (a |
Proofs that both lists involved in a merge are sublists of the result of the merge.