Draft
Conversation
Member
Changed pages
|
TOTBWF
previously approved these changes
Sep 22, 2025
Collaborator
TOTBWF
left a comment
There was a problem hiding this comment.
This is a really great change! Part-ext has always annoyed me.
We should also be able to use this trick for Inductive instances as well, though I'm not sure how this would play out in practice. Definitely warrants an experiment!
Comment on lines
-66
to
+71
| part-map-id x = part-ext id id λ _ _ → | ||
| ↯-indep x | ||
| part-map-id x = part-ext id id λ _ _ → ↯-indep x | ||
|
|
||
| part-map-∘ | ||
| : ∀ (f : B → C) (g : A → B) | ||
| → ∀ (x : ↯ A) → part-map (f ∘ g) x ≡ part-map f (part-map g x) | ||
| part-map-∘ f g x = part-ext id id λ _ _ → | ||
| ap (f ∘ g) (↯-indep x) | ||
| part-map-∘ f g x = part-ext id id λ _ _ → ap (f ∘ g) (↯-indep x) |
Collaborator
There was a problem hiding this comment.
While we are at it, the type of part-ext should probably be changed to be ∀ xd → x .elt xs ≡ x .elt (to xd): this would let us avoid a lot of uses of ↯-indep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just an idea for how extensionality could work for some types of record. Unfortunately the nice syntax where you use an extended lambda like below needs a workaround for agda/agda#8112 (which we can do somewhat generically, by just blocking checking the extended lambda ourselves).