Skip to content

Conversation

@plt-amy
Copy link
Member

@plt-amy plt-amy commented Sep 20, 2025

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).

part .sfnd .μ-assoc = ext! λ where
  a .def (x , (y , z))  (x , y) , z
  a .inv ((x , y) , z)  x , (y , z)
  a .elt (x , (y , z))  refl

@plt-amy plt-amy requested a review from TOTBWF September 20, 2025 15:21
@Lavenza
Copy link
Member

Lavenza commented Sep 20, 2025

Pull request preview

Changed pages

Copy link
Collaborator

@TOTBWF TOTBWF left a 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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of glue

Copy link
Member

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)?

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)
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants