Skip to content
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

composed bifunctor instances #2011

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions theories/WildCat/Bifunctor.v
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,15 @@ Proof.
exact _.
Defined.

Global Instance is1functor_uncurry_uncurry_left {A B C D E}
(F : A -> B -> C) (G : C -> D -> E)
`{Is1Cat A, Is1Cat B, Is1Cat C, Is1Cat D, Is1Cat E,
!Is0Bifunctor F, !Is1Bifunctor F, !Is0Bifunctor G, !Is1Bifunctor G}
: Is1Functor (uncurry (uncurry (fun x y z => G (F x y) z))).
Proof.
exact _.
Defined.

Global Instance is0functor_uncurry_uncurry_right {A B C D E}
(F : A -> B -> D) (G : C -> D -> E)
`{IsGraph A, IsGraph B, IsGraph C, IsGraph D, IsGraph E,
Expand All @@ -366,6 +375,21 @@ Proof.
exact (fmap11 G h (fmap11 F f g)).
Defined.

Global Instance is1functor_uncurry_uncurry_right {A B C D E}
(F : A -> B -> D) (G : C -> D -> E)
`{Is1Cat A, Is1Cat B, Is1Cat C, Is1Cat D, Is1Cat E,
!Is0Bifunctor F, !Is1Bifunctor F, !Is0Bifunctor G, !Is1Bifunctor G}
: Is1Functor (uncurry (uncurry (fun x y z => G x (F y z)))).
Proof.
snrapply Build_Is1Functor.
- intros cab cab' [[h f] g] [[h' f'] g'] [[q p] r].
exact (fmap22 G q (fmap22 F p r)).
- intros cab.
exact (fmap12 G _ (fmap11_id F _ _) $@ fmap11_id G _ _).
- intros cab cab' cab'' [[h f] g] [[h' f'] g'].
exact (fmap12 G _ (fmap11_comp F _ _ _ _) $@ fmap11_comp G _ _ _ _).
Defined.

Definition fmap11_square {A B C : Type} `{Is1Cat A, Is1Cat B, Is1Cat C}
(F : A -> B -> C) `{!Is0Bifunctor F, !Is1Bifunctor F}
{a00 a20 a02 a22 : A} {f10 : a00 $-> a20} {f12 : a02 $-> a22}
Expand Down
Loading