- 
                Notifications
    
You must be signed in to change notification settings  - Fork 85
 
defn: extensionality for ↯ #569
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: main
Are you sure you want to change the base?
Conversation
          
Changed pages
  | 
    
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.
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!
| -- | ||
| -- (c) Pattern match on the {l} argument to unblock the arguments. | ||
| 
               | 
          ||
| data Lock : Type where lock : Lock | 
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.
This is a nice trick!
| open Equiv (_ , eqv) renaming (η to eta ; ε to eps) using (zag) public | ||
| 
               | 
          ||
| defs : a .def ≡ b .def | ||
| defs i .∣_∣ = Glue ⌞ a ⌟ λ where | 
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.
Nice use of glue
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.
Isn't this just ua (_ , eqv) (~ i)?
| 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) | 
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.
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
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).