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

Total products #459

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Total products #459

wants to merge 8 commits into from

Conversation

TOTBWF
Copy link
Collaborator

@TOTBWF TOTBWF commented Feb 2, 2025

Description

This PR implements total products in displayed categories, as a step towards a nice definition of Hadamard products.

Checklist

Before submitting a merge request, please check the items below:

  • I've read the contributing guidelines.
  • The imports of new modules have been sorted with support/sort-imports.hs (or nix run --experimental-features nix-command -f . sort-imports).
  • All new code blocks have "agda" as their language.

If your change affects many files without adding substantial content, and
you don't want your name to appear on those pages (for example, treewide
refactorings or reformattings), start the commit message and PR title with chore:.

@TOTBWF TOTBWF requested review from ncfavier and plt-amy February 2, 2025 20:29
@Lavenza
Copy link
Member

Lavenza commented Feb 2, 2025

Comment on lines +48 to +77
record is-total-product
{x y p} {x' : Ob[ x ]} {y' : Ob[ y ]} {p' : Ob[ p ]}
{π₁ : Hom p x} {π₂ : Hom p y}
(prod : is-product B π₁ π₂)
(π₁' : Hom[ π₁ ] p' x') (π₂' : Hom[ π₂ ] p' y')
: Type (ob ⊔ ℓb ⊔ oe ⊔ ℓe)
where
no-eta-equality
open is-product prod
field
⟨_,_⟩'
: ∀ {a a'} {f : Hom a x} {g : Hom a y}
→ (f' : Hom[ f ] a' x') (g' : Hom[ g ] a' y')
→ Hom[ ⟨ f , g ⟩ ] a' p'
π₁∘⟨⟩'
: ∀ {a a'} {f : Hom a x} {g : Hom a y}
→ {f' : Hom[ f ] a' x'} {g' : Hom[ g ] a' y'}
→ π₁' ∘' ⟨ f' , g' ⟩' ≡[ π₁∘⟨⟩ ] f'
π₂∘⟨⟩'
: ∀ {a a'} {f : Hom a x} {g : Hom a y}
→ {f' : Hom[ f ] a' x'} {g' : Hom[ g ] a' y'}
→ π₂' ∘' ⟨ f' , g' ⟩' ≡[ π₂∘⟨⟩ ] g'
unique'
: ∀ {a a'} {f : Hom a x} {g : Hom a y}
→ {f' : Hom[ f ] a' x'} {g' : Hom[ g ] a' y'}
→ {other : Hom a p} {p1 : π₁ ∘ other ≡ f} {p2 : π₂ ∘ other ≡ g}
→ {other' : Hom[ other ] a' p'}
→ (p1' : (π₁' ∘' other') ≡[ p1 ] f')
→ (p2' : (π₂' ∘' other') ≡[ p2 ] g')
→ other' ≡[ unique p1 p2 ] ⟨ f' , g' ⟩'
Copy link
Member

Choose a reason for hiding this comment

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

can we clean up these type signatures slightly e.g. using variables, or passing to a parametrised module? that's a lot of code to dump on readers.

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.

4 participants