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

[ fix #577 ] generic n-ary functions and products #608

Merged
merged 44 commits into from May 31, 2019
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7a95b51
[ fix #577 ] n-ary (un)curry, cong, and subst
gallais Feb 12, 2019
1013134
[ fix ] special case for 1 in Product
gallais Feb 13, 2019
10aef8e
[ refactor ] Cleaning up Relation.Nullary.Decidable via Core
gallais Feb 13, 2019
e3c2494
[ new ] generic projection
gallais Feb 13, 2019
d54fa4c
[ new ] generic remove and insert
gallais Feb 14, 2019
d0e626b
[ doc ] and reorganizing argument order based on this experiment
gallais Feb 14, 2019
7aedbbe
[ new ] generic update at k-th position
gallais Feb 14, 2019
b5eb698
[ new ] generic map under k arguments
gallais Feb 14, 2019
e15721a
[ fix ] rename map to compose
gallais Feb 14, 2019
a714eaf
[ new ] map under n sets, hole at a k-th position
gallais Feb 14, 2019
eaeea27
[ new ] generic constant function
gallais Feb 14, 2019
fe142e0
[ doc ] short descriptions of new functions
gallais Feb 14, 2019
72174fc
[ doc ] for all of the generic functions
gallais Feb 14, 2019
9272c88
[ new ] generic hole
gallais Feb 14, 2019
edc9fae
[ fix doc ] type annotation for hole + extra example
gallais Feb 14, 2019
4d35219
[ fix doc ] There's no Fin involved in hole anymore
gallais Feb 14, 2019
5ad8770
[ refactor ] compose in hole-style
gallais Feb 14, 2019
ff0b121
[ fix ] comments
gallais Feb 26, 2019
2953af2
[ new ] n-ary quantifiers
gallais Mar 3, 2019
5533c8b
Merge branch 'master' into eqN
gallais Mar 7, 2019
50dd771
Merge branch 'master' into eqN
gallais Mar 7, 2019
ed9534f
Merge branch 'master' into eqN
gallais Apr 23, 2019
0ad7ed2
[ new ] n-ary implication
gallais Apr 23, 2019
25a8b82
[ new ] pointwise implication, conjunction, disjunction
gallais Apr 23, 2019
39847b1
[ doc ] updating comments, adding new examples
gallais Apr 23, 2019
8225f8d
Merge branch 'master' into eqN
gallais Apr 23, 2019
9434529
[ fix ] no need to take the n explicitly in subst
gallais May 9, 2019
1ac18cc
Merge branch 'master' into eqN
gallais May 9, 2019
cdb1842
[ typo ] in the comments
gallais May 9, 2019
bfc8160
[ cleanup ] using variables in README.N-ary
gallais May 9, 2019
cb523e6
[ fix ] fixity for quantifiers
gallais May 9, 2019
e503937
[ opinonated ] reverting the fixity order
gallais May 9, 2019
1aa8aaa
Merge branch 'master' into eqN
gallais May 11, 2019
fb2ecd2
Merge branch 'master' into eqN
gallais May 12, 2019
c9123e5
[ new ] ressurected Product⊤, renamed toLevel to ⨆
gallais May 13, 2019
9fc4ec7
[ typo ] in the README's comments
gallais May 14, 2019
dea324e
[ cleanup ] definitions of quantifiers
gallais May 14, 2019
5819ea2
Merge branch 'master' into eqN
MatthewDaggitt May 15, 2019
6cc2aac
[ cleanup ] introduce notation for Arrows n
gallais May 16, 2019
94de1d8
[ refactor ] lifting is an operation on its own
gallais May 16, 2019
072b967
Merge branch 'master' into eqN
gallais May 20, 2019
6b56290
[ refactor ] splitting up into (Function.Relation).Nary
gallais May 20, 2019
f284c1c
[ fix ] typo
gallais May 20, 2019
5fc53d4
Merge branch 'master' into eqN
gallais May 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/Data/Product/N-ary/Heterogeneous.agda
Expand Up @@ -313,32 +313,33 @@ infix 5 Π[_]
------------------------------------------------------------------------
-- n-ary pointwise liftings

lift₂ : ∀ n {ls r s t} {as : Sets n ls} {R : Set r} {S : Set s} {T : Set t} →
(R → S → T) → as ⇉ R → as ⇉ S → as ⇉ T
lift₂ zero op f g = op f g
lift₂ (suc n) op f g = λ x → lift₂ n op (f x) (g x)

gallais marked this conversation as resolved.
Show resolved Hide resolved
-- implication

infixr 6 _⇒_
_⇒_ : ∀ {n} {ls r s} {as : Sets n ls} →
as ⇉ Set r → as ⇉ Set s → as ⇉ Set (r ⊔ s)
_⇒_ {zero} f g = f → g
_⇒_ {suc n} f g x = f x ⇒ g x
_⇒_ = lift₂ _ (λ A B → A → B)

-- conjunction

infixr 7 _∩_
_∩_ : ∀ {n} {ls r s} {as : Sets n ls} →
as ⇉ Set r → as ⇉ Set s → as ⇉ Set (r ⊔ s)
_∩_ {zero} f g = f × g
_∩_ {suc n} f g x = f x ∩ g x
_∩_ = lift₂ _ _×_

-- disjunction

infixr 8 _∪_
_∪_ : ∀ {n} {ls r s} {as : Sets n ls} →
as ⇉ Set r → as ⇉ Set s → as ⇉ Set (r ⊔ s)
_∪_ {zero} f g = f ⊎ g
_∪_ {suc n} f g x = f x ∪ g x
_∪_ = lift₂ _ _⊎_

-- negation

∁ : ∀ {n ls r} {as : Sets n ls} → as ⇉ Set r → as ⇉ Set r
∁ {zero} f = ¬ f
∁ {suc n} f x = ∁ (f x)
∁ = mapₙ _ ¬_