From mechvel at scico.botik.ru Wed Jan 1 13:02:27 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 01 Jan 2020 15:02:27 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 1 In-Reply-To: References: Message-ID: <47e4b3a5599c272e7b14c08394e2a99f@scico.botik.ru> On 2019-12-22 14:41, Andres Sicard Ramirez wrote: > Dear all, > > The Agda Team is very pleased to announce the first release candidate > of Agda 2.6.1. We plan to release 2.6.1 in three weeks. > [..] There are two large files in my program where this candidate Agda acts a bit strangely. When it finds in such a file a termination checking problem, it hangs for long (I do not know, may be loops infinitely). Then I interrupt it and comment out somewhat the trailing half of the file. And then, it reports fast "Termination checking failed", and I proceed with fixing the source by reducing the part commented out. In many places it forced me to add values for implicits (where Agda 2.6.0.1 did not). Like this: +ms-step> {a} {b} {e} {e'} {_} {mons'} e>e' instead of +ms-step> e>e'. These two features are not of so a great importance. I continue testing. -- SM From mechvel at scico.botik.ru Wed Jan 1 13:58:35 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 01 Jan 2020 15:58:35 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 1 In-Reply-To: References: <6c6f7b69cc89d190542c37f1f8c296f8@scico.botik.ru> <64b56afa-0b32-ba7e-8652-56c213341285@cs.ru.nl> Message-ID: On 2019-12-31 21:27, mechvel at scico.botik.ru wrote: > On 2019-12-31 18:25, Guillaume Allais wrote: >> I'll add to that: if you perform all the recursive calls at the >> same time as `with comparePP e e'` then you should be able to get >> a terminating version of the function. >> >> I am saying "should" because the example is not self-contained and >> as such it is impossible to test. >> > > A sigh of releaf! > The following is recognized as terminating: > > ------------------------------------------------ > open import Data.List using (List; []; _?_) > open import Data.Nat using (?; _<_) > open import Data.Nat.Properties using (_ open import Relation.Nullary using (Dec; yes; no) > > g : List ? ? List ? ? List ? > g [] ys = ys > g xs [] = xs > g (x ? xs) (y ? ys) = aux (x (x ? (g xs (y ? ys))) > where > aux : Dec (x < y) ? List ? ? List ? ? List ? > aux (yes _) zs _ = zs > aux (no _) _ us = us > ----------------------------------------------- > > So that we avoid a complication of introducing a counter. Still there remains a certain complication in the "dependent" case. Consider ------------------------------------------------------------- open import Data.List using (List; []; _?_; [_]) open import Data.Nat using (?; _<_; _?_; _?_) open import Data.Nat.Properties using (_> On 31/12/2019 12:23, Jesper Cockx wrote: >>> From the changelog: >>> >>> The "with inlining" feature of the termination checker has been >>> removed. As >>>> a consequence, some functions defined using with are no longer >>>> accepted as >>>> terminating. See Issue #59 for why this feature was originally >>>> introduced >>>> and #3604 for why it had to be removed. >>>> >>> >>> It is likely that your function no longer passes the termination >>> checker >>> because this feature was removed. There were several issues with the >>> implementation of this feature and no-one was willing to maintain it, >>> so >>> unfortunately it had to be removed. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From guillaume.allais at ens-lyon.org Wed Jan 1 14:18:16 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Wed, 1 Jan 2020 13:18:16 +0000 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 1 In-Reply-To: References: <6c6f7b69cc89d190542c37f1f8c296f8@scico.botik.ru> <64b56afa-0b32-ba7e-8652-56c213341285@cs.ru.nl> Message-ID: <90827e78-45b1-e9b3-b811-653e712d9dd7@ens-lyon.org> This is what I would have written: ==================================================================== open import Data.List.Base using (List; []; _?_; [_]) open import Data.Nat.Base using (?; _<_; _?_; _?_) open import Data.Nat.Properties using (_ On 2019-12-31 21:27, mechvel at scico.botik.ru wrote: >> On 2019-12-31 18:25, Guillaume Allais wrote: >>> I'll add to that: if you perform all the recursive calls at the >>> same time as `with comparePP e e'` then you should be able to get >>> a terminating version of the function. >>> >>> I am saying "should" because the example is not self-contained and >>> as such it is impossible to test. >>> >> >> A sigh of releaf! >> The following is recognized as terminating: >> >> ------------------------------------------------ >> open import Data.List using (List; []; _?_) >> open import Data.Nat using (?; _<_) >> open import Data.Nat.Properties using (_> open import Relation.Nullary using (Dec; yes; no) >> >> g : List ? ? List ? ? List ? >> g []?????? ys?????? =? ys >> g xs?????? []?????? =? xs >> g (x ? xs) (y ? ys) =? aux (x > ??????????????????????????????????? (x ? (g xs (y ? ys))) >> ? where >> ? aux : Dec (x < y) ? List ? ? List ? ? List ? >> ? aux (yes _) zs _? =? zs >> ? aux (no _)? _? us =? us >> ----------------------------------------------- >> >> So that we avoid a complication of introducing a counter. > > > Still there remains a certain complication in the "dependent" case. > Consider > > ------------------------------------------------------------- > open import Data.List using (List; []; _?_; [_]) > open import Data.Nat using (?; _<_; _?_; _?_) > open import Data.Nat.Properties using (_ open import Relation.Nullary using (Dec; yes; no) > > g : (x y : ?) ? x ? y ? ? > g x y _ =? x ? y > > f : List ? ? List ? ? List ? > f []?????? ys?????? =? ys > f xs?????? []?????? =? xs > f (x ? xs) (y ? ys) =? aux (x ? where > ? aux : Dec (x < y) ? List ? > ? aux (yes _)? =? y ? (f (x ? xs) ys) > ? aux (no x?y) =? (g x y x?y) ? (f xs (y ? ys)) > ------------------------------------------------------------- > > The RHS of the second clause for? aux? depends on the value? x?y. > So that we cannot set? (g x y x?y) ? (f xs (y ? ys)) > as the third argument for new? aux, > because the value? x?y? is not in the scope > (and imagine that g analizes the value x?y). > However the following is type-checked: > > -------------------------------------------------------------- > f : List ? ? List ? ? List ? > f []?????? ys?????? =? ys > f xs?????? []?????? =? xs > f (x ? xs) (y ? ys) =? aux (x ??????????????????????????????????? (aux' (x ? where > ? aux : Dec (x < y) ? List ? ? List ? ? List ? > ? aux (yes _)? xs _? =? xs > ? aux (no x?y) _? xs =? xs > > ? aux' : Dec (x < y) ? List ? > ? aux' (no x?y) =? (g x y x?y) ? (f xs (y ? ys)) > ? aux' (yes _)? =? []?????????????????????????? -- inaccessible > -------------------------------------------------------------- > > This does not look so nice, but it is nicer that introducing a counter > for termination proof. > > What people think of this, what can be a better solution? > > Thanks, > > -- > SM > > > > >>> On 31/12/2019 12:23, Jesper Cockx wrote: >>>> From the changelog: >>>> >>>> The "with inlining" feature of the termination checker has been removed. As >>>>> a consequence, some functions defined using with are no longer accepted as >>>>> terminating. See Issue #59 for why this feature was originally introduced >>>>> and #3604 for why it had to be removed. >>>>> >>>> >>>> It is likely that your function no longer passes the termination checker >>>> because this feature was removed. There were several issues with the >>>> implementation of this feature and no-one was willing to maintain it, so >>>> unfortunately it had to be removed. >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at scico.botik.ru Wed Jan 1 15:50:49 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 01 Jan 2020 17:50:49 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 1 In-Reply-To: <90827e78-45b1-e9b3-b811-653e712d9dd7@ens-lyon.org> References: <6c6f7b69cc89d190542c37f1f8c296f8@scico.botik.ru> <64b56afa-0b32-ba7e-8652-56c213341285@cs.ru.nl> <90827e78-45b1-e9b3-b811-653e712d9dd7@ens-lyon.org> Message-ID: <8a0fb9a579583f492ce382dc0ea4e7f1@scico.botik.ru> On 2020-01-01 16:18, Guillaume Allais wrote: > This is what I would have written: > > ==================================================================== > open import Data.List.Base using (List; []; _?_; [_]) > open import Data.Nat.Base using (?; _<_; _?_; _?_) > open import Data.Nat.Properties using (_ open import Relation.Nullary using (Dec; yes; no) > > g : (x y : ?) ? x ? y ? ? > g x y _ = x ? y > > f : List ? ? List ? ? List ? > f [] ys = ys > f xs [] = xs > f (x ? xs) (y ? ys) with (x ... | yes x ... | no x?y | fy | fn = g x y x?y ? fn > ==================================================================== I see. Thank you. We have so easily bypassed this fundamental type checker restriction. May be, this means that the type checker is going to recover and prohibit this also? :-) -- SM > On 01/01/2020 12:58, mechvel at scico.botik.ru wrote: >> On 2019-12-31 21:27, mechvel at scico.botik.ru wrote: >>> On 2019-12-31 18:25, Guillaume Allais wrote: >>>> I'll add to that: if you perform all the recursive calls at the >>>> same time as `with comparePP e e'` then you should be able to get >>>> a terminating version of the function. >>>> >>>> I am saying "should" because the example is not self-contained and >>>> as such it is impossible to test. >>>> >>> >>> A sigh of releaf! >>> The following is recognized as terminating: >>> >>> ------------------------------------------------ >>> open import Data.List using (List; []; _?_) >>> open import Data.Nat using (?; _<_) >>> open import Data.Nat.Properties using (_>> open import Relation.Nullary using (Dec; yes; no) >>> >>> g : List ? ? List ? ? List ? >>> g []?????? ys?????? =? ys >>> g xs?????? []?????? =? xs >>> g (x ? xs) (y ? ys) =? aux (x >> ??????????????????????????????????? (x ? (g xs (y ? ys))) >>> ? where >>> ? aux : Dec (x < y) ? List ? ? List ? ? List ? >>> ? aux (yes _) zs _? =? zs >>> ? aux (no _)? _? us =? us >>> ----------------------------------------------- >>> >>> So that we avoid a complication of introducing a counter. >> >> >> Still there remains a certain complication in the "dependent" case. >> Consider >> >> ------------------------------------------------------------- >> open import Data.List using (List; []; _?_; [_]) >> open import Data.Nat using (?; _<_; _?_; _?_) >> open import Data.Nat.Properties using (_> open import Relation.Nullary using (Dec; yes; no) >> >> g : (x y : ?) ? x ? y ? ? >> g x y _ =? x ? y >> >> f : List ? ? List ? ? List ? >> f []?????? ys?????? =? ys >> f xs?????? []?????? =? xs >> f (x ? xs) (y ? ys) =? aux (x > ? where >> ? aux : Dec (x < y) ? List ? >> ? aux (yes _)? =? y ? (f (x ? xs) ys) >> ? aux (no x?y) =? (g x y x?y) ? (f xs (y ? ys)) >> ------------------------------------------------------------- >> >> The RHS of the second clause for? aux? depends on the value? x?y. >> So that we cannot set? (g x y x?y) ? (f xs (y ? ys)) >> as the third argument for new? aux, >> because the value? x?y? is not in the scope >> (and imagine that g analizes the value x?y). >> However the following is type-checked: >> >> -------------------------------------------------------------- >> f : List ? ? List ? ? List ? >> f []?????? ys?????? =? ys >> f xs?????? []?????? =? xs >> f (x ? xs) (y ? ys) =? aux (x > ??????????????????????????????????? (aux' (x > ? where >> ? aux : Dec (x < y) ? List ? ? List ? ? List ? >> ? aux (yes _)? xs _? =? xs >> ? aux (no x?y) _? xs =? xs >> >> ? aux' : Dec (x < y) ? List ? >> ? aux' (no x?y) =? (g x y x?y) ? (f xs (y ? ys)) >> ? aux' (yes _)? =? []?????????????????????????? -- inaccessible >> -------------------------------------------------------------- >> >> This does not look so nice, but it is nicer that introducing a counter >> for termination proof. >> >> What people think of this, what can be a better solution? >> >> Thanks, >> >> -- >> SM >> >> >> >> >>>> On 31/12/2019 12:23, Jesper Cockx wrote: >>>>> From the changelog: >>>>> >>>>> The "with inlining" feature of the termination checker has been >>>>> removed. As >>>>>> a consequence, some functions defined using with are no longer >>>>>> accepted as >>>>>> terminating. See Issue #59 for why this feature was originally >>>>>> introduced >>>>>> and #3604 for why it had to be removed. >>>>>> >>>>> >>>>> It is likely that your function no longer passes the termination >>>>> checker >>>>> because this feature was removed. There were several issues with >>>>> the >>>>> implementation of this feature and no-one was willing to maintain >>>>> it, so >>>>> unfortunately it had to be removed. >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> From mechvel at scico.botik.ru Wed Jan 1 21:42:29 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 01 Jan 2020 23:42:29 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 1 In-Reply-To: References: Message-ID: <2f1d2e51b4cfe7caeb71d89a37a0c79b@scico.botik.ru> On 2019-12-22 14:41, Andres Sicard Ramirez wrote: > Dear all, > > The Agda Team is very pleased to announce the first release candidate > of Agda 2.6.1. We plan to release 2.6.1 in three weeks. > [..] I have tested it on two my application programs, under ghc-8.6.3, MAlonzo. It looks all right. -- SM From joey.eremondi at gmail.com Fri Jan 3 20:27:47 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Fri, 3 Jan 2020 11:27:47 -0800 Subject: [Agda] How experimental is Cumulativity? Message-ID: I see that Cumulativity is listed as an experimental feature in 2.6.1. Is this "the compiler might crash or reject valid programs" experimental? Or "Cumulativity might make Agda unsound" experimental? How much can I trust proofs that use cumulative Agda? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Sat Jan 4 15:07:11 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Sat, 4 Jan 2020 15:07:11 +0100 Subject: [Agda] How experimental is Cumulativity? In-Reply-To: References: Message-ID: Hi Joey, The note that it is experimental mainly refers to the fact that there is no proper solver yet for level (in)equalities, so there will be (possibly quite frequent) cases where you have to fill in implicit level arguments that Agda is able to infer without --cumulativity. That being said, it is also a new feature in Agda and it hasn't been tested very extensively yet so there may also still be bugs of the "make Agda unsound" kind. Running Agda with the --double-check flag enabled might catch some of these bugs when they occur. -- Jesper ps: If anyone is interested in implementing a proper solver for universe levels, please get in touch! There may be some interesting research questions lurking there. On Fri, Jan 3, 2020 at 8:28 PM Joey Eremondi wrote: > I see that Cumulativity is listed as an experimental feature in 2.6.1. Is > this "the compiler might crash or reject valid programs" experimental? Or > "Cumulativity might make Agda unsound" experimental? How much can I trust > proofs that use cumulative Agda? > > Thanks! > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon at jonmsterling.com Sat Jan 4 15:34:25 2020 From: jon at jonmsterling.com (Jon Sterling) Date: Sat, 04 Jan 2020 09:34:25 -0500 Subject: [Agda] How experimental is Cumulativity? In-Reply-To: References: Message-ID: Jesper, Is the cumulativity support based on "material subtyping" (I mean, elements of one universe really being elements of another universe) or is it based on elaboration of coercions? In the past I advocated this material subtyping, but these days I have been won over to coercions... mainly due to my suffering as I try to find models of type theory in places where it is no longer feasible to rely on the set-theoretic trickery which makes material cumulativity acceptable in, for instance, presheaf models a la Coquand. It also seems like the combination of material subtyping and unification may be a bit difficult to negotiate; I am curious how Agda's implementation deals with this, if it needs to. Best, Jon On Sat, Jan 4, 2020, at 9:07 AM, Jesper Cockx wrote: > Hi Joey, > > The note that it is experimental mainly refers to the fact that there > is no proper solver yet for level (in)equalities, so there will be > (possibly quite frequent) cases where you have to fill in implicit > level arguments that Agda is able to infer without --cumulativity. That > being said, it is also a new feature in Agda and it hasn't been tested > very extensively yet so there may also still be bugs of the "make Agda > unsound" kind. Running Agda with the --double-check flag enabled might > catch some of these bugs when they occur. > > -- Jesper > > ps: If anyone is interested in implementing a proper solver for > universe levels, please get in touch! There may be some interesting > research questions lurking there. > > On Fri, Jan 3, 2020 at 8:28 PM Joey Eremondi wrote: > > I see that Cumulativity is listed as an experimental feature in 2.6.1. Is this "the compiler might crash or reject valid programs" experimental? Or "Cumulativity might make Agda unsound" experimental? How much can I trust proofs that use cumulative Agda? > > > > Thanks! > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From Jesper at sikanda.be Sat Jan 4 17:23:38 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Sat, 4 Jan 2020 17:23:38 +0100 Subject: [Agda] How experimental is Cumulativity? In-Reply-To: References: Message-ID: Hi Jon, It's using material subtyping, so there's no coercions involved in the resulting terms. You make a good point about the difficulty of finding models, but I felt inserting actual coercions would be too hard to work with in practical programming (essentially not much better than using Lift in non-cumulative Agda). Perhaps a different approach where the coercion from Set_i to Set_{i+k} commutes with other type formers would be another viable solution if the current approach doesn't work. You're correct that the interaction between material subtyping and unification is quite tricky, currently Agda applies a few heuristics to simplify equations between universe levels. If you are interested, you can take a look at the functions `equalLevel` and `leqLevel` in Conversion.hs ( https://github.com/agda/agda/blob/dcb0f82f90fe44114d43303524a6fab5051bdaa2/src/full/Agda/TypeChecking/Conversion.hs#L1384 and https://github.com/agda/agda/blob/dcb0f82f90fe44114d43303524a6fab5051bdaa2/src/full/Agda/TypeChecking/Conversion.hs#L1244) and `simplifyLevelConstraint` in LevelConstraints.hs ( https://github.com/agda/agda/blob/dcb0f82f90fe44114d43303524a6fab5051bdaa2/src/full/Agda/TypeChecking/LevelConstraints.hs#L25). Really what we need is a good solver for level constraints. I think the problem is quite similar to the analogous one for sized types (which also is implemented using material subtyping), so my hope is that one solver could be general enough to handle both subsystems. -- Jesper On Sat, Jan 4, 2020 at 3:35 PM Jon Sterling wrote: > Jesper, > > Is the cumulativity support based on "material subtyping" (I mean, > elements of one universe really being elements of another universe) or is > it based on elaboration of coercions? > > In the past I advocated this material subtyping, but these days I have > been won over to coercions... mainly due to my suffering as I try to find > models of type theory in places where it is no longer feasible to rely on > the set-theoretic trickery which makes material cumulativity acceptable in, > for instance, presheaf models a la Coquand. > > It also seems like the combination of material subtyping and unification > may be a bit difficult to negotiate; I am curious how Agda's implementation > deals with this, if it needs to. > > Best, > Jon > > > On Sat, Jan 4, 2020, at 9:07 AM, Jesper Cockx wrote: > > Hi Joey, > > > > The note that it is experimental mainly refers to the fact that there > > is no proper solver yet for level (in)equalities, so there will be > > (possibly quite frequent) cases where you have to fill in implicit > > level arguments that Agda is able to infer without --cumulativity. That > > being said, it is also a new feature in Agda and it hasn't been tested > > very extensively yet so there may also still be bugs of the "make Agda > > unsound" kind. Running Agda with the --double-check flag enabled might > > catch some of these bugs when they occur. > > > > -- Jesper > > > > ps: If anyone is interested in implementing a proper solver for > > universe levels, please get in touch! There may be some interesting > > research questions lurking there. > > > > On Fri, Jan 3, 2020 at 8:28 PM Joey Eremondi > wrote: > > > I see that Cumulativity is listed as an experimental feature in 2.6.1. > Is this "the compiler might crash or reject valid programs" experimental? > Or "Cumulativity might make Agda unsound" experimental? How much can I > trust proofs that use cumulative Agda? > > > > > > Thanks! > > > _______________________________________________ > > > Agda mailing list > > > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon at jonmsterling.com Sat Jan 4 19:20:24 2020 From: jon at jonmsterling.com (Jon Sterling) Date: Sat, 04 Jan 2020 13:20:24 -0500 Subject: [Agda] How experimental is Cumulativity? In-Reply-To: References: Message-ID: Indeed, very good points :) I hope that someone will contribute a nice solver. Let me provide a few more remarks on cumulativity below which may be of interest. The version of type theory in which level coercions commute with type formers should be equivalent at the level of syntax (presentation) to the version where the coercions are omitted, so I expect this approach to be viable... (What I mean is, the subsumption rule can be viewed as a presentation of an actual / algebraically well-defined type theory which has sufficiently many equations on coercions.) For this reason, I take this style to be a _definition_ of cumulativity, considering that from an algebraic perspective, subtyping must be regarded as a notation and not as an objective construct. But, I have found that even these "algebraically cumulative" hierarchies are likewise difficult to find in the wild, not much easier to model than the "materially" cumulative universes. The main advantage of the algebraic version of cumulativity is that it is well-defined mathematically (i.e. doesn't refer to raw terms), so it can be studied objectively. For this reason, I am in the process of changing my tune and eating a bit of crow on my previous pronouncements; I increasingly think that those Lift types from Agda are good, but what we need a type theory in which they are built in, and in which the elaborator automatically inserts the appropriate coercions. With "Lift" types, there is an obvious "normal form" for the types of type theory, in which Lift is pushed to the leaves; the normalization I am referring to is 2-dimensional, in the sense that its trace exhibits an isomorphism between a type and its "normal form". I conjecture that these isomorphisms are coherent too, but I have not proved it. I believe that this approach could be used in an elaborator, leading to a core type theory which is not so different from Agda's, but with a surface language which is significantly easier to use. The main _noticeable_ difference between these weak hierarchies and the very strict algebraic-but-cumulative hierarchy in which coercions commute with connectives is to be detected when you form a dependent type _over_ the universe. Then, without some form of univalence, certain operations become impossible to define which had previously been definable in the context of the strict cumulativity. It remains to be seen whether this is a problem in practice. Another relevant point is that taking cumulativity seriously should also involve a de-emphasis of the prevalent style of considering many universe level variables simultaneously. Cumulativity becomes unbelievably hard to deal with when you have many generic universe levels i,j,k... (requiring sophisticated solvers), but the ironic thing is that as soon as you have some form of cumulativity, it is sufficient to consider only _one_ generic universe level in practice. Best wishes, Jon On Sat, Jan 4, 2020, at 11:23 AM, Jesper Cockx wrote: > Hi Jon, > > It's using material subtyping, so there's no coercions involved in the > resulting terms. You make a good point about the difficulty of finding > models, but I felt inserting actual coercions would be too hard to work > with in practical programming (essentially not much better than using > Lift in non-cumulative Agda). Perhaps a different approach where the > coercion from Set_i to Set_{i+k} commutes with other type formers would > be another viable solution if the current approach doesn't work. > > You're correct that the interaction between material subtyping and > unification is quite tricky, currently Agda applies a few heuristics to > simplify equations between universe levels. If you are interested, you > can take a look at the functions `equalLevel` and `leqLevel` in > Conversion.hs > (https://github.com/agda/agda/blob/dcb0f82f90fe44114d43303524a6fab5051bdaa2/src/full/Agda/TypeChecking/Conversion.hs#L1384 and https://github.com/agda/agda/blob/dcb0f82f90fe44114d43303524a6fab5051bdaa2/src/full/Agda/TypeChecking/Conversion.hs#L1244) and `simplifyLevelConstraint` in LevelConstraints.hs (https://github.com/agda/agda/blob/dcb0f82f90fe44114d43303524a6fab5051bdaa2/src/full/Agda/TypeChecking/LevelConstraints.hs#L25). Really what we need is a good solver for level constraints. I think the problem is quite similar to the analogous one for sized types (which also is implemented using material subtyping), so my hope is that one solver could be general enough to handle both subsystems. > > -- Jesper > > > > On Sat, Jan 4, 2020 at 3:35 PM Jon Sterling wrote: > > Jesper, > > > > Is the cumulativity support based on "material subtyping" (I mean, elements of one universe really being elements of another universe) or is it based on elaboration of coercions? > > > > In the past I advocated this material subtyping, but these days I have been won over to coercions... mainly due to my suffering as I try to find models of type theory in places where it is no longer feasible to rely on the set-theoretic trickery which makes material cumulativity acceptable in, for instance, presheaf models a la Coquand. > > > > It also seems like the combination of material subtyping and unification may be a bit difficult to negotiate; I am curious how Agda's implementation deals with this, if it needs to. > > > > Best, > > Jon > > > > > > On Sat, Jan 4, 2020, at 9:07 AM, Jesper Cockx wrote: > > > Hi Joey, > > > > > > The note that it is experimental mainly refers to the fact that there > > > is no proper solver yet for level (in)equalities, so there will be > > > (possibly quite frequent) cases where you have to fill in implicit > > > level arguments that Agda is able to infer without --cumulativity. That > > > being said, it is also a new feature in Agda and it hasn't been tested > > > very extensively yet so there may also still be bugs of the "make Agda > > > unsound" kind. Running Agda with the --double-check flag enabled might > > > catch some of these bugs when they occur. > > > > > > -- Jesper > > > > > > ps: If anyone is interested in implementing a proper solver for > > > universe levels, please get in touch! There may be some interesting > > > research questions lurking there. > > > > > > On Fri, Jan 3, 2020 at 8:28 PM Joey Eremondi wrote: > > > > I see that Cumulativity is listed as an experimental feature in 2.6.1. Is this "the compiler might crash or reject valid programs" experimental? Or "Cumulativity might make Agda unsound" experimental? How much can I trust proofs that use cumulative Agda? > > > > > > > > Thanks! > > > > _______________________________________________ > > > > Agda mailing list > > > > Agda at lists.chalmers.se > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > > > Agda mailing list > > > Agda at lists.chalmers.se > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda From maxsnew at gmail.com Mon Jan 6 23:44:15 2020 From: maxsnew at gmail.com (Max New) Date: Mon, 6 Jan 2020 17:44:15 -0500 Subject: [Agda] MSFP 2020 - Final Call for Papers Message-ID: Eighth Workshop on MATHEMATICALLY STRUCTURED FUNCTIONAL PROGRAMMING Saturday 25th April 2020, Dublin, Ireland A satellite workshop of ETAPS 2020 https://msfp-workshop.github.io/msfp2020/ ** Deadline: 9th January (abstract), 16th January (paper) ** The eighth workshop on Mathematically Structured Functional Programming is devoted to the derivation of functionality from structure. It is a celebration of the direct impact of Theoretical Computer Science on programs as we write them today. Modern programming languages, and in particular functional languages, support the direct expression of mathematical structures, equipping programmers with tools of remarkable power and abstraction. Where would Haskell be without monads? Functional reactive programming without temporal logic? Call-by-push-value without adjunctions? The list goes on. This workshop is a forum for researchers who seek to reflect mathematical phenomena in data and control. The first MSFP workshop was held in Kuressaare, Estonia, in July 2006, affiliated with MPC 2006 and AMAST 2006. The second MSFP workshop was held in Reykjavik, Iceland as part of ICALP 2008. The third MSFP workshop was held in Baltimore, USA, as part of ICFP 2010. The fourth workshop was held in Tallinn, Estonia, as part of ETAPS 2012. The fifth workshop was held in Grenoble, France, as part of ETAPS 2014. The sixth MSFP Workshop was held in April 2016, in Eindhoven, Netherlands, as part of ETAPS 2016. The seventh MSFP Workshop was held in July 2018, in Oxford, UK, as part of FLoC 2018. Important Dates: ================ Abstract deadline: 9th January (Thursday) Paper deadline: 16th January (Thursday) Notification: 27th February (Thursday) Final version: 26th March (Thursday) Workshop: 25th April (Saturday) Invited Speakers: ================= - Pierre-Marie P?drot, Inria Rennes-Bretagne-Atlantique, France - Second invited speaker TBC Program Committee: ================== Stephanie Balzer - CMU, USA Kwanghoon Choi - Chonnam, South Korea Ralf Hinze - Kaiserslautern, Germany Marie Kerjean - Inria Nantes, France Sam Lindley - Edinburgh and Imperial, UK (co-chair) Max New - Northeastern, USA (co-chair) Fredrik Nordvall-Forsberg - Strathclyde, UK Alberto Pardo - Montevideo, Uruguay Exequiel Rivas Gadda - Inria Paris, France Claudio Russo - DFINITY, UK Tarmo Uustalu - Reykjavik, Iceland Nicolas Wu - Imperial, UK Maaike Zwart - Oxford, UK Submission: =========== Submissions are welcomed on, but by no means restricted to, topics such as: structured effectful computation structured recursion structured corecursion structured tree and graph operations structured syntax with variable binding structured datatype-genericity structured search structured representations of functions structured quantum computation structure directed optimizations structured types structure derived from programs and data Please contact the programme chairs Sam Lindley (Sam.Lindley at ed.ac.uk) and Max New (maxnew at ccs.neu.edu) if you have any questions about the scope of the workshop. We accept two categories of submission: full papers of no more than 15 pages that will appear in the proceedings, and extended abstracts of no more than 2 pages that we will post on the website, but which do not constitute formal publications and will not appear in the proceedings. References and appendices are not included in page limits. Appendices may not be read by reviewers. Submissions must report previously unpublished work and not be submitted concurrently to another conference with refereed proceedings. Accepted papers must be presented at the workshop by one of the authors. The proceedings will be published under the auspices of EPTCS with a Creative Commons license. A short abstract should be submitted a week in advance of the paper deadline (for both full paper and extended abstract submissions). We are using EasyChair to manage submissions. To submit a paper, use this link: https://easychair.org/conferences/?conf=msfp2020 -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Achten at cs.ru.nl Tue Jan 7 09:25:10 2020 From: P.Achten at cs.ru.nl (Peter Achten) Date: Tue, 7 Jan 2020 09:25:10 +0100 Subject: [Agda] [TFP'20] draft paper deadline open (January 10 2020) Trends in Functional Programming 2020, 13-14 February, Krakow, Poland Message-ID: <41abbe01-5078-1727-cd06-49c1c7c06a68@cs.ru.nl> ------------------------------------------------------------------------- ???????????????????? Final call for papers ??????? 21st Symposium on Trends in Functional Programming ????????????????????????? tfp2020.org ------------------------------------------------------------------------- Did you miss the deadline to submit a paper to Trends in Functional Programming http://www.cse.chalmers.se/~rjmh/tfp/? No worries -- it's not too late! Submission is open until January 10th 2020, for a presentation slot at the event and post-symposium reviewing. The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions. * TFP is moving to new winter dates, to provide an FP forum in between the ? annual ICFP events. * TFP offers a supportive reviewing process designed to help less experienced ? authors succeed, with two rounds of review, both before and after the ? symposium itself. Authors have an opportunity to address reviewers' concerns ? before final decisions on publication in the proceedings. * TFP offers two "best paper" awards, the John McCarthy award for best paper, ? and the David Turner award for best student paper. * This year we are particularly excited to co-locate with Lambda Days in ? beautiful Krakow. Lambda Days is a vibrant developer conference with hundreds ? of attendees and a lively programme of talks on functional programming in ? practice. TFP will be held in the same venue, and participants will be able ? to session-hop between the two events. Important Dates --------------- Submission deadline for pre-symposium review:?? 15th November, 2019? -- passed -- Submission deadline for draft papers:?????????? 10th January, 2020 Symposium dates:??????????????????????????????? 13-14th February, 2020 Visit tfp2020.org for more information. From Jesper at sikanda.be Wed Jan 8 14:43:51 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 8 Jan 2020 14:43:51 +0100 Subject: [Agda] PhD Position in in Theory and Implementation of Dependently Typed Programming Languages Message-ID: Hello Agdakers, I'm very excited to announce that I'm hiring a PhD student to work with me at TU Delft on the theory and implementation of Agda. If you are (know someone who could be) interested, you can find more information at http://pl.ewi.tudelft.nl/hiring/2020-phd-student-dependent-types/. Best regards, Jesper -------------- next part -------------- An HTML attachment was scrubbed... URL: From henning at basold.eu Wed Jan 8 22:39:10 2020 From: henning at basold.eu (Henning Basold) Date: Wed, 8 Jan 2020 22:39:10 +0100 Subject: [Agda] CMCS 2020: Final Call for Papers (extended deadlines) Message-ID: <4b878a69-b5ed-7b31-adbe-629511eadbf4@basold.eu> Call for Papers The 15th International Workshop on Coalgebraic Methods in Computer Science (CMCS'20) Dublin, Ireland, 25 - 26 April 2020 (co-located with ETAPS 2020) www.coalg.org/cmcs20 Objectives and scope -------------------- Established in 1998, the CMCS workshops aim to bring together researchers with a common interest in the theory of coalgebras, their logics, and their applications. As the workshop series strives to maintain breadth in its scope, areas of interest include neighbouring fields as well. Topics of interest include, but are not limited to, the following: - the theory of coalgebras (including set theoretic and categorical approaches); - coalgebras as computational and semantical models (for programming languages, dynamical systems, term rewriting, etc.); - coalgebras in (functional, object-oriented, concurrent, and constraint) programming; - coalgebraic data types, type systems and behavioural typing; - coinductive definition and proof principles for coalgebras (including "up-to" techniques); - coalgebras and algebras; - coalgebras and (modal) logic; - coalgebraic specification and verification; - coalgebra and control theory (notably of discrete event and hybrid systems); - coalgebra in quantum computing; - coalgebra and game theory; - tools exploiting coalgebraic techniques. Venue and event --------------- CMCS'20 will be held in Dublin, Ireland, co-located with ETAPS 2020 on 25 - 26 April 2020. Keynote Speaker --------------- Yde Venema (ILLC, University of Amsterdam, The Netherlands) Invited Speakers ---------------- Nathana?l Fijalkow (CNRS, LaBRI, University of Bordeaux, France) Koko Muroya (RIMS, Kyoto University, Japan) Invited Tutorial Speakers ------------------------- There will be a special session on probabilistic couplings, with invited tutorials by: Marco Gaboardi (University at Buffalo, US) Justin Hsu (University of Wisconsin-Madison, US) Important dates --------------------------- Abstract regular papers 15 January 2020 Submission regular papers 17 January 2020 Notification regular papers 17 February 2020 Camera-ready copy 28 February 2020 Submission short contributions 4 March 2020 Notification short contributions 11 March 2020 Programme committee ------------------- Henning Basold, Leiden University, the Netherlands Nick Bezhanishvili, University of Amsterdam, the Netherlands Corina Cirstea, University of Southampton, United Kingdom Mai Gehrke, CNRS and Universit? C?te d'Azur, France Helle Hvid Hansen, Delft University of Technology, The Netherlands Shin-Ya Katsumata, National Institute of Informatics, Japan Bartek Klin, Warsaw University, Poland Ekaterina Komendantskaya, Heriot-Watt University, United Kingdom Barbara K?nig, University of Duisburg-Essen, Germany Dexter Kozen, Cornell University, USA Clemens Kupke, University of Strathclyde, United Kingdom Alexander Kurz, Chapman University, USA Daniela Petrisan, Universit? Paris 7, France Andrei Popescu, Middlesex University London, United Kingdom Damien Pous, CNRS and ENS Lyon, France Jurriaan Rot, UCL and Radboud University, The Netherlands Davide Sangiorgi, University of Bologna, Italy Ana Sokolova, University of Salzburg, Austria David Sprunger, National Institute of Informatics, Japan Henning Urbat, University of Erlangen-Nuremberg, Germany Fabio Zanasi, University College London, United Kingdom Publicity chair --------------- Henning Basold, Leiden University, The Netherlands PC co-chairs -------------- Daniela Petrisan, Universit? Paris 7, France Jurriaan Rot, UCL and Radboud University, The Netherlands Steering committee ------------------ Filippo Bonchi, University of Pisa, Italy Marcello Bonsangue, Leiden University, The Netherlands Corina Cirstea, University of Southampton, United Kingdom Ichiro Hasuo, National Institute of Informatics, Japan Bart Jacobs, Radboud University Nijmegen, The Netherlands Bartek Klin, University of Warsaw, Poland Alexander Kurz, Chapman University, USA Marina Lenisa, University of Udine, Italy Stefan Milius (chair), University of Erlangen-Nuremberg, Germany Larry Moss, Indiana University, USA Dirk Pattinson, Australian National University, Australia Lutz Schr?der, University of Erlangen-Nuremberg, Germany Alexandra Silva, University College London, United Kingdom Submission guidelines --------------------- We solicit two types of contributions: regular papers and short contributions. Regular papers must be original, unpublished, and not submitted for publication elsewhere. They should not exceed 20 pages in length in Springer LNCS style. Short contributions may describe work in progress, or summarise work submitted to a conference or workshop elsewhere. They should be no more than two pages. Regular papers and short contributions should be submitted electronically as a PDF file via the Easychair system at http://www.easychair.org/conferences/?conf=cmcs2020. The proceedings of CMCS 2020 will include all accepted regular papers and will be published post-conference as a Springer volume in the IFIP-LNCS series. Accepted short contributions will be bundled in a technical report. -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 6454 bytes Desc: not available URL: From bove at chalmers.se Fri Jan 10 13:30:44 2020 From: bove at chalmers.se (Ana Bove) Date: Fri, 10 Jan 2020 09:30:44 -0300 Subject: [Agda] LSFA 2020 Second call for papers Message-ID: LSFA 2020 15th Workshop on Logical and Semantic Frameworks, with Applications 26-28 August 2020, Salvador, Brazil http://lsfa2020.ufba.br Logical and semantic frameworks are formal languages used to represent logics, languages and systems. These frameworks provide foundations for the formal specification of systems and programming languages, supporting tool development and reasoning. Previous editions of LSFA took place in Natal (2019), Fortaleza (2018), Bras?lia (2017), Porto (2016), Natal (2015), Bras?lia (2014), S?o Paulo (2013), Rio de Janeiro (2012), Belo Horizonte (2011), Natal (2010), Bras?lia (2009), Salvador (2008), Ouro Preto (2007), and Natal (2006). Seehttp://lsfa.cic.unb.br for more information. Previous proceedings were published by EPTCS and ENTCS. Previous LSFA special issues have been published in journals such as Journal of Algorithms, The Logic Journal of the IGPL and Theoretical Computer Science (see http://lsfa.cic.unb.br). TOPICS OF INTEREST Topics of interest include, but are not limited to: * Specification languages and meta-languages * Formal semantics of languages and logical systems * Logical frameworks * Semantic frameworks * Type theory * Proof theory * Automated deduction * Implementation of logical or semantic frameworks * Applications of logical or semantic frameworks * Computational and logical properties of semantic frameworks * Logical aspects of computational complexity * Lambda and combinatory calculi * Process calculi SUBMISSION AND PUBLICATION Contributions should be written in English and submitted in the form of full papers with a maximum of 13 pages excluding references. Beyond full regular papers, we encourage submissions such as system descriptions, proof pearls, rough diamonds (preliminary results and work in progress), original surveys, or overviews of research projects, where the focus is more on elegance and dissemination than on novelty. Papers belonging to this second category are expected to be short, that is, of a maximum of 6 pages excluding references. For both paper categories, additional technical material can be provided in a clearly marked appendix which will be read by reviewers at their discretion. Contributions must also be unpublished and not submitted simultaneously for publication elsewhere. The papers should be prepared in LaTeX using the generic ENTCS package (http://www.entcs.org/prelim.html). The submission should be in the form of a PDF file uploaded to Easychair: https://easychair.org/conferences/?conf=lsfa2020 At least one of the authors should register for the workshop. All accepted papers will be available online during the workshop; full papers will be published at ENTCS, and short papers will be collected in an informal volume. For the publication of the proceedings there will be a cost to authors of USD 50 at registration time. IMPORTANT DATES: * Abstract deadline: March 16 * Submission deadline: March 23 * Notification to Authors: May 12 * Proceedings version due: Jun 12 * LSFA 2020: August 26-28 INVITED SPEAKERS * Mauricio Ayala-Rinc?n, University of Bras?lia (joint speaker with WBL 20) * Eduardo Bonelli, Stevens Institute of Technology * Delia Kesner, IRIF, Universit? Paris Diderot PROGRAM COMMITTEE CO-CHAIRS * Cl?udia Nalon, University of Bras?lia * Giselle Reis, CMU-Qatar PROGRAM COMMITTEE * Beniamino Accattoli, INRIA (Saclay) * Sandra Alves, University of Porto * Mario Benevides, UFRJ * Ana Bove, Chalmers * Manuela Busaniche, CONICET Santa Fe * Marco Cerami, UFBA * Amy Felty, University of Ottawa * Maribel Fernandez, King's College London * Francicleber Ferreira, UFC * Renata de Freitas, UFF * Edward Hermann Haeusler, PUC-Rio * Lourdes del Carmen Gonz?lez Huesca, UNAM * Oleg Kiselyov, Tohoku University * Jo?o Marcos, UFRN * Alberto Momigliano, University of Milano * Daniele Nantes, UnB * Carlos Olarte, UFRN * Revantha Ramanayake,TU Wien * Camilo Rocha, PUJ * Nora Szasz, Universidad ORT * Ivan Varzinczak, Universit? d'Artois * Daniel Ventura, UFG * Renata Wassermann, USP -- -- Ana Bove, Docent email: bove(at)chalmers.se Phone: (46) (31) 772 10 20 http://www.cse.chalmers.se/~bove Department of Computer Science and Engineering Chalmers Univ. of Technology and Univ. of Gothenburg From pierre.lescanne at ens-lyon.fr Fri Jan 10 16:51:50 2020 From: pierre.lescanne at ens-lyon.fr (Pierre Lescanne (en)) Date: Fri, 10 Jan 2020 16:51:50 +0100 Subject: [Agda] a tutorial for proof by coinduction Message-ID: Does there exist a tutorial for proofs by coinduction ? I am looking for something a little like Chapter 13 of the Coq'Art ? -- Regards, --------------------------- Pierre Lescanne (Emeritus Professor) LIP / ?cole normale sup?rieure de Lyon 46 all?e d'Italie 69364 LYON Cedex 07, France t?l: +33 6 85 70 94 31 http://perso.ens-lyon.fr/pierre.lescanne/ --------------------------- From m.escardo at cs.bham.ac.uk Fri Jan 10 18:18:35 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 10 Jan 2020 17:18:35 +0000 Subject: [Agda] Precedence of arrow Message-ID: What is the precedence of -> for (dependent) function type formation? Thanks, Martin From guillaume.allais at ens-lyon.org Sat Jan 11 13:06:28 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Sat, 11 Jan 2020 12:06:28 +0000 Subject: [Agda] Precedence of arrow In-Reply-To: References: Message-ID: <1d5c898d-df8e-124b-f13b-9ba593002b6e@ens-lyon.org> Hi Martin, `->` is directly handled in the parser so it will be lower than any precedence you may declare with an `infix(l/r)`. Best, -- gallais On 10/01/2020 17:18, Martin Escardo wrote: > What is the precedence of -> for (dependent) function type formation? > > Thanks, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From pierre.lescanne at ens-lyon.fr Tue Jan 14 12:21:47 2020 From: pierre.lescanne at ens-lyon.fr (Pierre Lescanne (en)) Date: Tue, 14 Jan 2020 12:21:47 +0100 Subject: [Agda] a tutorial for proof by coinduction In-Reply-To: References: Message-ID: <9c8c2edb-5708-c4d2-d9f0-719be7cfe21c@ens-lyon.fr> I have a specific question. Here are two formalisations of coinductive binary trees mutual record BT (A : Set) : Set where coinductive field u : A ? Node A record Node (A : Set) : Set where coinductive field ? ? : BT A record BT' (A : Set) : Set where coinductive field node : A ? (BT' A ? BT' A ) open BT open Node open BT' ------------- Now I define three objects/spine/ : one is in BT and two are in BT'. Those in BT' are not accepted, I suspect that this is due to the termination checker, which prefers/record/ over/product/. Am I right ? Or am I mistaking ? ------------- mutual spine : BT ? spine = record {u = inj? spineN} spineN : Node ? ? spineN = spine ? spineN = record{u = inj? 0} mutual spine' : BT' ? spine' = record {node = inj? (spine'' , record{node = inj? 0})} spine'' : BT' ? spine'' = record {node = inj? (spine' , record{node = inj? 0})} spine? : BT' ? spine? = record {node = inj? (spine? , record{node = inj? 0})} -- Regards, --------------------------- Pierre Lescanne (Emeritus Professor) LIP / ?cole normale sup?rieure de Lyon 46 all?e d'Italie 69364 LYON Cedex 07, France t?l: +33 6 85 70 94 31 http://perso.ens-lyon.fr/pierre.lescanne/ --------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Tue Jan 14 12:34:28 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Tue, 14 Jan 2020 11:34:28 +0000 Subject: [Agda] a tutorial for proof by coinduction In-Reply-To: <9c8c2edb-5708-c4d2-d9f0-719be7cfe21c@ens-lyon.fr> References: <9c8c2edb-5708-c4d2-d9f0-719be7cfe21c@ens-lyon.fr> Message-ID: <35258202-ca4b-f6d6-5de0-b1e6696aaf21@ens-lyon.org> Hi Pierre, Note that if you use copatterns to define the trees in BT' just like you did for BT then the termination checker is perfectly happy: ==================================================================== mutual spine' : BT' ? node spine' = inj? (spine'' , record{node = inj? 0}) spine'' : BT' ? spine'' = record {node = inj? (spine' , record{node = inj? 0})} spine? : BT' ? node spine? = inj? (spine? , record{node = inj? 0}) ==================================================================== My guess is that the copattern version is accepted because copatterns prevent eager unfolding. In comparison, a definition with a mere `record {}` expression on the RHS is open to things being unfolded forever. Cheers, gallais On 14/01/2020 11:21, Pierre Lescanne (en) wrote: > I have a specific question.? Here are two formalisations of coinductive binary > trees > > mutual > ? record BT (A : Set) : Set where > ??? coinductive > ??? field > ????? u : A ? Node A > ????? ? record Node (A : Set) : Set where > ??? coinductive > ??? field > ????? ? ? : BT A > > record BT' (A : Set) : Set where > ? coinductive > ? field > ??? node : A ? (BT' A ? BT' A ) > > open BT > open Node > open BT' > > ------------- > Now I define three objects/spine/? : one is in BT and two are in BT'.? Those in > BT' are not accepted, I suspect that this is due to the termination checker, > which prefers/record/? over/product/. > Am I right ? Or am I mistaking ? > ------------- > > mutual > ? spine : BT ? > ? spine = record {u = inj? spineN} > ? ? spineN : Node ? > ? ? spineN = spine > ? ? spineN = record{u = inj? 0} > > mutual > ? spine' : BT' ? > ? spine' = record {node = inj? (spine'' , record{node = inj? 0})} > ? ? spine'' : BT' ? > ? spine'' = record {node = inj? (spine' , record{node = inj? 0})} > > spine? : BT' ? > spine? = record {node = inj? (spine? , record{node = inj? 0})} > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From P.Achten at cs.ru.nl Tue Jan 14 16:34:19 2020 From: P.Achten at cs.ru.nl (Peter Achten) Date: Tue, 14 Jan 2020 16:34:19 +0100 Subject: [Agda] [TFP'20] call for participation: Trends in Functional Programming 2020, 13-14 February, Krakow, Poland Message-ID: <333a864c-03d9-8255-83eb-8a3b131c130c@cs.ru.nl> ------------------------------------------------------------------------- ??????????????????? Call for participation ??????? 21st Symposium on Trends in Functional Programming ????????????????????????? tfp2020.org ------------------------------------------------------------------------- The list of accepted papers is available at http://www.cse.chalmers.se/~rjmh/tfp/ The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions. * TFP is moving to new winter dates, to provide an FP forum in between the ? annual ICFP events. * TFP offers a supportive reviewing process designed to help less experienced ? authors succeed, with two rounds of review, both before and after the ? symposium itself. Authors have an opportunity to address reviewers' concerns ? before final decisions on publication in the proceedings. * TFP offers two "best paper" awards, the John McCarthy award for best paper, ? and the David Turner award for best student paper. * This year we are particularly excited to co-locate with Lambda Days in ? beautiful Krakow. Lambda Days is a vibrant developer conference with hundreds ? of attendees and a lively programme of talks on functional programming in ? practice. TFP will be held in the same venue, and participants will be able ? to session-hop between the two events. Important Dates --------------- Submission deadline for pre-symposium review:?? 15th November,??? 2019? -- passed -- Submission deadline for draft papers:?????????? 10th January,???? 2020? -- passed -- Registration (regular):???????????????????????? 2nd February,??? 2020 Registration (late):??????????????????????????? 13th February,??? 2020 Symposium dates:??????????????????????????????? 13-14th February, 2020 Visit tfp2020.org for more information. From tarmo at cs.ioc.ee Wed Jan 15 02:36:12 2020 From: tarmo at cs.ioc.ee (Tarmo Uustalu) Date: Wed, 15 Jan 2020 01:36:12 +0000 Subject: [Agda] ETAPS Test of Time Award 2020, call for nominations Message-ID: <20200115013612.3f8761c5@cs.ioc.ee> The ETAPS Test of Time Award recognizes outstanding papers published more than 10 years in the past in one of the constituent conferences of ETAPS. The Award recognises the impact of excellent research results that have been published at ETAPS. Nominations 2020 Nominations for the 2020 ETAPS Test of Time Award are solicited from the ETAPS community. A nomination should include the title and publication details of the nominated paper, explain the influence it has had since publication, and why it merits the award. It should be phrased in terms that are understandable by the members of the award committee and suitable for use in the award citation, and should be endorsed by at least 2 people other than the person submitting the nomination. Self-nominations are not allowed. Nominations should be sent by Monday 2 March 2020 to the chair of the award committee, Don Sannella . Award committee The 2020 award committee consists of Rance Cleaveland, Ugo Dal Lago, Marieke Huisman, Tiziana Margaria, Don Sannella (chair), Gabriele Taentzer and Peter Thiemann. From tarmo at cs.ioc.ee Wed Jan 15 02:49:34 2020 From: tarmo at cs.ioc.ee (Tarmo Uustalu) Date: Wed, 15 Jan 2020 01:49:34 +0000 Subject: [Agda] First ETAPS Doctoral Dissertation Award, final call for nominations Message-ID: <20200115014934.2cabe511@cs.ioc.ee> First ETAPS Doctoral Dissertation Award ================================= The European Joint Conferences on Theory and Practice of Software Association has established a Doctoral Dissertation Award to promote and recognize outstanding dissertations in the research areas covered by the four main ETAPS conferences (ESOP, FASE, FoSSaCS, and TACAS). Doctoral dissertations are evaluated with respect to originality, relevance, and impact to the field, as well as the quality of writing. The award winner will receive a monetary prize and will be recognized at the ETAPS Banquet. Eligibility ----------- Eligible for the award is any PhD student whose doctoral dissertation is in the scope of the ETAPS conferences and who completed their doctoral degree at a European academic institution in the period from January 1st, 2019 to December 31st, 2019. Nominations ----------- Award candidates should be nominated by their supervisor. Members of the Award Committee are not allowed to nominate their own PhD students for the award. Nominations consist of a single PDF file (extension .pdf) containing: * name and email address of the candidate * a short curriculum vitae of the candidate * name and email address of the supervisor * an endorsement letter from the supervisor * the final version of the doctoral dissertation * institution and department that has awarded the doctorate * a document certifying that the doctoral degree was successfully completed within the eligibility period * a report from at least one examiner of the dissertation who is not affiliated with the candidate's institution All documents must be written in English. Nominations are welcome regardless of whether results that are part of the dissertation have been published at ETAPS. Nominations should be submitted via EasyChair: https://easychair.org/conferences/?conf=etapsdda2020 The deadline for nominations is January 19th, 2020. Award Committee --------------- Caterina Urban (chair) Amal Ahmed (representing ESOP) Dirk Beyer (representing TACAS) Andrew Pitts (representing FoSSaCS) Perdita Stevens (representing FASE) Marieke Huisman From mechvel at scico.botik.ru Wed Jan 15 13:58:19 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 15 Jan 2020 15:58:19 +0300 Subject: [Agda] delaying computation to run time Message-ID: <39db0ea6ed0f8a83ec80a83c6beb97cd@scico.botik.ru> People, I am testing a certain method by arranging ---------------------------------------------Test2.agda ---------- foo : List Pol -- a data for computation foo = case varPols of \ { (z ? y ? x ? []) ? (2 * z * y ^ 2 + 4 * x + 1) ? ... } main = (readFiniteFile "data.txt") >>= putStrLn ? toCostring ? test foo 100 ? stringToNat -- In another file --------------------------- test : List Pol ? ? ? ? ? String test fs n e = let fs' = map (_^ e) fs -- fs (rs , ps , gs , bsE) = gBasis-ext n fs' in concatStr ... ------------------------------------------------------------------ e : Nat is a dummy value being read from file, and to be put as 1. So that it will hold fs' == fs. e is introduced because without inputting it, the example would be computed at the type check time, which will be very expensive (gBasis-ext is expensive to compute). Will it? Now, after > agda -c $agdaLibOpt --ghc-flag -rtsopts Test2.agda it is checked, compiled and linked. Then > time ./Test2 +RTS -M14G -RTS computes and prints the result in 50 seconds. And in the next program version I have forgotten to apply "map (_^ e) fs", so that e is being read, but is not used in the body of `test'. And still the type checking, compilation, computation, printing and timing are the same. I think that gBasis-ext still evaluates only at the run time. So that it occurs sufficient to read something from file and to set the type of this value in the signature, without using this value in the function body. Is this so? Is this a reliable approach? (this is on Agda-2.6.0.1). Thanks, ------ Sergei From nad at cse.gu.se Wed Jan 15 14:25:55 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 15 Jan 2020 14:25:55 +0100 Subject: [Agda] delaying computation to run time In-Reply-To: <39db0ea6ed0f8a83ec80a83c6beb97cd@scico.botik.ru> References: <39db0ea6ed0f8a83ec80a83c6beb97cd@scico.botik.ru> Message-ID: <1507e85c-157f-2307-e730-ffb367bce5e8@cse.gu.se> On 2020-01-15 13:58, mechvel at scico.botik.ru wrote: > e is introduced because without inputting it, the example would be computed at the type > check time, which will be very expensive (gBasis-ext is expensive to compute). > Will it? Agda does not normalise all "CAFs". Here is a simple example: module Example where open import Agda.Builtin.Nat data Tree : Set where leaf : Tree node : Tree ? Tree ? Tree perfect-tree-of-depth : Nat ? Tree perfect-tree-of-depth zero = leaf perfect-tree-of-depth (suc n) = node t t where t = perfect-tree-of-depth n example : Tree example = perfect-tree-of-depth 1_000_000_000 The GHC and JS backends compile example to the following two pieces of Haskell/JavaScript code: d18 = coe d8 (coe (1000000000 :: Integer)) exports["example"] = exports["perfect-tree-of-depth"](agdaRTS.primIntegerFromString("1000000000")); -- /NAD From mechvel at scico.botik.ru Wed Jan 15 19:45:05 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 15 Jan 2020 21:45:05 +0300 Subject: [Agda] delaying computation to run time In-Reply-To: <1507e85c-157f-2307-e730-ffb367bce5e8@cse.gu.se> References: <39db0ea6ed0f8a83ec80a83c6beb97cd@scico.botik.ru> <1507e85c-157f-2307-e730-ffb367bce5e8@cse.gu.se> Message-ID: On 2020-01-15 16:25, Nils Anders Danielsson wrote: > On 2020-01-15 13:58, mechvel at scico.botik.ru wrote: >> e is introduced because without inputting it, the example would be >> computed at the type >> check time, which will be very expensive (gBasis-ext is expensive to >> compute). >> Will it? > > Agda does not normalise all "CAFs". Here is a simple example: > > module Example where > > open import Agda.Builtin.Nat > > data Tree : Set where > leaf : Tree > node : Tree ? Tree ? Tree > > perfect-tree-of-depth : Nat ? Tree > perfect-tree-of-depth zero = leaf > perfect-tree-of-depth (suc n) = node t t > where > t = perfect-tree-of-depth n > > example : Tree > example = perfect-tree-of-depth 1_000_000_000 > > The GHC and JS backends compile example to the following two pieces of > Haskell/JavaScript code: > > d18 = coe d8 (coe (1000000000 :: Integer)) > > exports["example"] = > exports["perfect-tree-of-depth"](agdaRTS.primIntegerFromString("1000000000")); Does CAF abbreviate a Constant Applicative Form ? Is s below a CAF ? ------------------------ size : Tree ? ? size leaf = 1 size (node t t') = size t + size t' example = perfect-tree-of-depth 50 s = size example ------------------------ I observe that under the above context the program ---------------------------------------- main : IO ? main = putStrLn (toCostring (show? s)) ---------------------------------------- is type-checked and compiled fast, and runs very long at the run time (because (size example) loops about 2^50 steps when computed). On the other hand, if we add to the program ----------------------- lemma : (s + 1) ? s ? 1 lemma = refl ----------------------- then it is type-checked very long. Probably it computes s ... Is `lemma' a CAF ? Thanks, ------ Sergei lemma : (s + 1) ? s ? 1 lemma = refl main : IO ? main = putStrLn (toCostring (show? n)) --------------------------------------- From nad at cse.gu.se Thu Jan 16 12:49:01 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Thu, 16 Jan 2020 12:49:01 +0100 Subject: [Agda] delaying computation to run time In-Reply-To: References: <39db0ea6ed0f8a83ec80a83c6beb97cd@scico.botik.ru> <1507e85c-157f-2307-e730-ffb367bce5e8@cse.gu.se> Message-ID: <796466bb-6526-96e2-6c1c-cf81d15486c8@cse.gu.se> On 2020-01-15 19:45, mechvel at scico.botik.ru wrote: > Does CAF abbreviate a Constant Applicative Form ? Yes. Perhaps I should have used the term "closed top-level expression" instead. -- /NAD From william.lawrence.harrison at gmail.com Thu Jan 16 15:52:16 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Thu, 16 Jan 2020 09:52:16 -0500 Subject: [Agda] Coinductive records and separate files in Agda Message-ID: Hi- I?m not able to separate the definition of a coinductive record type from definitions using that type. I?ve attached two files giving a minimal example of the issue. I?m trying to determine if I?m doing something wrong or if I?ve discovered a bug/feature. The first file (Records1.agda) gives the usual definition of a stream using coinductive record syntax and a non-coinductive record; respectively, these are Stream and Derp. I can define within Record1 particular Streams (e.g., zeros below): record Stream {?} (A : Set ?) : Set ? where coinductive field headStr : A tailStr : Stream A open Stream; S = Stream zeros : Stream ? headStr zeros = 0 tailStr zeros = zeros record Derp (A B : Set) : Set where field fld1 : A fld2 : B In the second file (Records2.agda), I load Records1 (hiding zeros): open import Records1 hiding (zeros) -- Use of non-coinductive record in this file works fine: foo : Derp ? ? foo = record { fld1 = 0 ; fld2 = 1 } -- The identical zeros definition generates an odd error: zeros : Stream ? headStr zeros = 0 tailStr zeros = zeros That error is: /Records2.agda:12,1-14 Could not parse the left-hand side headStr zeros Operators used in the grammar: None when scope checking the left-hand side headStr zeros in the definition of zeros Am I doing something wrong here? Is there some way to separate coinductive record type declarations and particular values of those types in distinct files? If it matters, I?m using Agda 2.6.0.1, although I?ve seen this same behavior in earlier versions of Agda. Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Records1.agda Type: application/octet-stream Size: 322 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Records2.agda Type: application/octet-stream Size: 564 bytes Desc: not available URL: From Jesper at sikanda.be Thu Jan 16 16:03:34 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 16 Jan 2020 16:03:34 +0100 Subject: [Agda] Coinductive records and separate files in Agda In-Reply-To: References: Message-ID: Hi Bill, I think you need to write "open Stream public" instead of "open Stream" if you want the fields to be in scope in other modules (or you can re-open the record in the other module). Maybe the error message could be improved to indicate that there is a projection with name headStr but it is only in scope under its qualified name. -- Jesper On Thu, Jan 16, 2020 at 3:53 PM William Harrison < william.lawrence.harrison at gmail.com> wrote: > Hi- > > I?m not able to separate the definition of a coinductive record type > from definitions using that type. I?ve attached two files giving a minimal > example of the issue. I?m trying to determine if I?m doing something wrong > or if I?ve discovered a bug/feature. > > The first file (Records1.agda) gives the usual definition of a stream > using coinductive record syntax and a non-coinductive record; respectively, > these are Stream and Derp. I can define within Record1 particular Streams > (e.g., zeros below): > > record Stream {?} (A : Set ?) : Set ? where > coinductive > field headStr : A > tailStr : Stream A > open Stream; S = Stream > > zeros : Stream ? > headStr zeros = 0 > tailStr zeros = zeros > > record Derp (A B : Set) : Set where > field > fld1 : A > fld2 : B > > In the second file (Records2.agda), I load Records1 (hiding zeros): > > open import Records1 hiding (zeros) > > -- Use of non-coinductive record in this file works fine: > foo : Derp ? ? > foo = record { fld1 = 0 ; fld2 = 1 } > > -- The identical zeros definition generates an odd error: > zeros : Stream ? > headStr zeros = 0 > tailStr zeros = zeros > > That error is: > > /Records2.agda:12,1-14 > Could not parse the left-hand side headStr zeros > Operators used in the grammar: > None > when scope checking the left-hand side headStr zeros in the > definition of zeros > > Am I doing something wrong here? Is there some way to separate coinductive > record type declarations and particular values of those types in distinct > files? If it matters, I?m using Agda 2.6.0.1, although I?ve seen this same > behavior in earlier versions of Agda. > > Thanks, > Bill > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Sat Jan 18 23:08:31 2020 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Sun, 19 Jan 2020 00:08:31 +0200 Subject: [Agda] When I try to reduce, I get a meta. (Reflection). Message-ID: Can you find the error in this code : ```agda module test where open import Agda.Builtin.Reflection open import Reflection open import Prelude.Nat open import Prelude.Bool open import Prelude.Unit open import Prelude.List pat : Term pat = pat-lam [ clause [ arg (arg-info visible relevant) (var "ii") ] (def (quote Bool) []) ] [ arg (arg-info visible relevant) (var 0 []) ] macro mm : Term ? TC ? mm hole = do inContext (arg (arg-info visible relevant) (def (quote Nat) []) ? []) (do t ? reduce pat typeError (termErr t ? termErr pat ? []) ) test : ? test = mm ``` Why do I get a meta instead of actually reducing : ``` .../test.agda:27,8-10 _22 _ (? { ii ? Bool }) _ when checking that the expression unquote mm has type ? ``` -------------- next part -------------- An HTML attachment was scrubbed... URL: From apostolis.xekoukoulotakis at gmail.com Sun Jan 19 20:01:18 2020 From: apostolis.xekoukoulotakis at gmail.com (Apostolis Xekoukoulotakis) Date: Sun, 19 Jan 2020 21:01:18 +0200 Subject: [Agda] When I try to reduce, I get a meta. (Reflection). In-Reply-To: References: Message-ID: Let me give some context into this question because there may be easier solutions. When I ask to get the definition of a function, I get a list of clauses. Each clause has a list of patterns and a term "t". If I wanted to manipulate the term t (with functions that the reflection api provides) , I would have to introduce the context of that particular function. Thus given the type of the function and the patterns of the clause, I need to compute the context. Since types are dependent, for each pattern, a specific term that represents this pattern needs to substitute the variable with index 0, of the next type (in Pi a b). So, instead of performing a substitution, I instead want to enclose the type with a lambda and then provide as argument the term I have created from the specific pattern. This is the pat variable in the test. It just happens that the type does not depend in the previous variable. Maybe there is an easier solution. It is important to note though, that neither the type system or the documentation or the error message provides any information that could help me correct any mistake I made in the above code. Maybe this should be a github issue. On Sun, Jan 19, 2020 at 12:08 AM Apostolis Xekoukoulotakis < apostolis.xekoukoulotakis at gmail.com> wrote: > Can you find the error in this code : > > ```agda > > module test where > > open import Agda.Builtin.Reflection > open import Reflection > open import Prelude.Nat > open import Prelude.Bool > open import Prelude.Unit > open import Prelude.List > > pat : Term > pat = pat-lam [ clause [ arg (arg-info visible relevant) (var "ii") ] (def > (quote Bool) []) ] [ arg (arg-info visible relevant) (var 0 []) ] > > macro > mm : Term ? TC ? > mm hole > = do > inContext (arg (arg-info visible relevant) (def (quote Nat) []) ? > []) > (do > t ? reduce pat > typeError (termErr t ? termErr pat ? []) > ) > > test : ? > test = mm > ``` > > Why do I get a meta instead of actually reducing : > ``` > .../test.agda:27,8-10 > _22 _ (? { ii ? Bool }) _ > when checking that the expression unquote mm has type ? > ``` > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Mon Jan 20 12:13:47 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 20 Jan 2020 14:13:47 +0300 Subject: [Agda] tracing & profiling Message-ID: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> Dear Agda developers, I have a complex program written in Agda, and have difficulties in finding which function takes the most of the run-time cost. For n = 16 it evaluates fast and correct. For n = 17 is hangs for more than hour, and I interrupt it. The "same" algorithm in Haskell evaluates fast for all n. In Glasgow Haskell, I sometimes used tracing, and sometimes used profiling with setting cost centers. These two really helped a lot. In Agda, I currently make various versions for the program that return the list of the computation _states_, with printing out the first n states. This needs effort in changing signatures, and leads to some other complications. Probably tracing and/or profiling is not the main current feature (problem) for Agda to design, but is something of this sort already possible? Thanks, ------ Sergei From guillaume.allais at ens-lyon.org Mon Jan 20 14:12:09 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Mon, 20 Jan 2020 13:12:09 +0000 Subject: [Agda] tracing & profiling In-Reply-To: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> References: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> Message-ID: <79feebab-0916-0132-ae89-0dc9cf68118b@ens-lyon.org> Hi Sergei, If by tracing you mean using `Debug.Trace` then we do have such facilities in the standard library: https://agda.github.io/agda-stdlib/Debug.Trace.html Thanks to the rewrite rules, it will not change the compile time behaviour of your program. We also have a quick tutorial of the feature in the README: https://agda.github.io/agda-stdlib/README.Debug.Trace.html Cheers, -- gallais On 20/01/2020 11:13, mechvel at scico.botik.ru wrote: > Dear Agda developers, > > I have a complex program written in Agda, and have difficulties in finding > which function takes the most of the run-time cost. > For n = 16 it evaluates fast and correct. For n = 17 is hangs for more than hour, > and I interrupt it. > The "same" algorithm in Haskell evaluates fast for all? n. > > In Glasgow Haskell, I sometimes used tracing, and sometimes used profiling with > setting cost centers. These two really helped a lot. > > In Agda, I currently make various versions for the program that return the list of > the computation _states_, with printing out the first? n? states. > This needs effort in changing signatures, and leads to some other complications. > > Probably? tracing and/or profiling? is not the main current feature (problem) > for Agda > to design, but is something of this sort already possible? > > Thanks, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Graham.Hutton at nottingham.ac.uk Mon Jan 20 16:08:58 2020 From: Graham.Hutton at nottingham.ac.uk (Graham Hutton) Date: Mon, 20 Jan 2020 15:08:58 +0000 Subject: [Agda] 10 PhD studentships in Nottingham for Home/EU applicants Message-ID: <91033EC1-5636-4CF1-9728-828A79A1A4BF@nottingham.ac.uk> Dear all, The School of Computer Science at the University of Nottingham is seeking applications for 10 fully-funded PhD studentships for Home/EU students: https://tinyurl.com/ten-phds-2020 Applicants in the area of the Functional Programming Laboratory (https://tinyurl.com/fp-notts) are strongly encouraged! If you are interested in applying, please contact a potential supervisor as soon as possible (the application deadline is 6th March): Thorsten Altenkirch - constructive logic, proof assistants, homotopy type theory, category theory, lambda calculus. Venanzio Capretta - type theory, mathematical logic, corecursive structures, proof assistants, category theory, epistemic logic. Graham Hutton - not taking on any new students this year, but you may find these notes useful: https://tinyurl.com/scbkxkr Henrik Nilsson - functional reactive programming, domain- specific languages, generalised notions of computation. These positions are only open to Home/EU applicants. An advert for international students was posted earlier and is now closed. Best wishes, Graham +-----------------------------------------------------------+ 10 Fully-Funded International PhD Studentships School of Computer Science University of Nottingham, UK https://tinyurl.com/ten-phds-2020 Applications are invited for 10 fully-funded PhD studentships for Home/EU students in the School of Computer Science at the University of Nottingham, starting on 1st October 2020. The topics for the studentships are open, but should relate to the interests of one of the School?s research groups: Agents Lab; Computational Optimisation and Learning Lab; Computer Vision Lab; Functional Programming; Intelligent Modelling and Analysis; Mixed Reality Lab; Data Driven Algorithms, Systems and Design and Uncertainty in Data and Decision Making The studentships are for three and a half years and include a stipend of ?15,009 per year and tuition fees. Applicants are normally expected to have a first-class Masters or Bachelors degree in Computer Science or a related discipline, and must obtain the support of a potential supervisor in the School prior to submitting their application. Initial contact with supervisors should be made at least two weeks prior to the closing date for applications. Eligible successful applicants are expected to apply for a EU VC Scholarship. Informal enquiries may be addressed to Kathleen.Fennemore at nottingham.ac.uk. To apply, please submit the following items by email to: Marc.Williams at nottingham.ac.uk: (1) a copy of your CV, including your actual or expected degree class(es), and results of all University examinations; (2) an example of your technical writing, such as a project report or dissertation; (3) contact details for two academic referees. (4) a research proposal ? max 2 x sides A4 You may also include a covering letter but this is optional. Closing date for applications: Friday 6 March 2020. +-----------------------------------------------------------+ This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From nad at cse.gu.se Mon Jan 20 20:35:17 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 20 Jan 2020 20:35:17 +0100 Subject: [Agda] tracing & profiling In-Reply-To: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> References: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> Message-ID: <888238f5-e985-b79c-a688-ce933d2cd4f6@cse.gu.se> On 2020-01-20 12:13, mechvel at scico.botik.ru wrote: > Probably tracing and/or profiling is not the main current feature > (problem) for Agda to design, but is something of this sort already > possible? If you use the GHC backend, then you can presumably use GHC's profiling capabilities. However, Agda generates code with names like du348, so it might be hard to read the resulting profiles. (I guess it shouldn't be too hard to generate more readable names. Pull requests are welcome.) -- /NAD From ulf.norell at gmail.com Mon Jan 20 21:06:01 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Mon, 20 Jan 2020 21:06:01 +0100 Subject: [Agda] tracing & profiling In-Reply-To: <888238f5-e985-b79c-a688-ce933d2cd4f6@cse.gu.se> References: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> <888238f5-e985-b79c-a688-ce933d2cd4f6@cse.gu.se> Message-ID: On Mon, Jan 20, 2020 at 8:35 PM Nils Anders Danielsson wrote: > If you use the GHC backend, then you can presumably use GHC's profiling > capabilities. However, Agda generates code with names like du348, so it > might be hard to read the resulting profiles. (I guess it shouldn't be > too hard to generate more readable names. Pull requests are welcome.) > See https://github.com/agda/agda-ghc-names / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Mon Jan 20 21:15:49 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 20 Jan 2020 21:15:49 +0100 Subject: [Agda] tracing & profiling In-Reply-To: References: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> <888238f5-e985-b79c-a688-ce933d2cd4f6@cse.gu.se> Message-ID: <32f7da75-51d4-2176-82b4-6363cbca1748@cse.gu.se> On 2020-01-20 21:06, Ulf Norell wrote: > See https://github.com/agda/agda-ghc-names I think it would be better if Agda made an attempt to generate more or less readable names directly (while respecting Haskell's lexical syntax). -- /NAD From mechvel at scico.botik.ru Tue Jan 21 14:31:19 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 21 Jan 2020 16:31:19 +0300 Subject: [Agda] tracing & profiling In-Reply-To: <79feebab-0916-0132-ae89-0dc9cf68118b@ens-lyon.org> References: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> <79feebab-0916-0132-ae89-0dc9cf68118b@ens-lyon.org> Message-ID: <5cb3277668b6f4e2be6ad53be2cba356@scico.botik.ru> Yes, this Debug.Trace.trace in the Agda lib prints what it is needed, and is helpful. Thank you. -- SM On 2020-01-20 16:12, Guillaume Allais wrote: > Hi Sergei, > > If by tracing you mean using `Debug.Trace` then we do have such > facilities > in the standard library: > https://agda.github.io/agda-stdlib/Debug.Trace.html > Thanks to the rewrite rules, it will not change the compile time > behaviour > of your program. > > We also have a quick tutorial of the feature in the README: > https://agda.github.io/agda-stdlib/README.Debug.Trace.html > > Cheers, > -- > gallais > > On 20/01/2020 11:13, mechvel at scico.botik.ru wrote: >> Dear Agda developers, >> >> I have a complex program written in Agda, and have difficulties in >> finding >> which function takes the most of the run-time cost. >> For n = 16 it evaluates fast and correct. For n = 17 is hangs for more >> than hour, >> and I interrupt it. >> The "same" algorithm in Haskell evaluates fast for all? n. >> >> In Glasgow Haskell, I sometimes used tracing, and sometimes used >> profiling with >> setting cost centers. These two really helped a lot. >> >> In Agda, I currently make various versions for the program that return >> the list of >> the computation _states_, with printing out the first? n? states. >> This needs effort in changing signatures, and leads to some other >> complications. >> >> Probably? tracing and/or profiling? is not the main current feature >> (problem) >> for Agda >> to design, but is something of this sort already possible? >> >> Thanks, >> >> ------ >> Sergei >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Tue Jan 21 14:34:57 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 21 Jan 2020 16:34:57 +0300 Subject: [Agda] tracing & profiling In-Reply-To: <32f7da75-51d4-2176-82b4-6363cbca1748@cse.gu.se> References: <33b10fc555799246200cceadc8d6d599@scico.botik.ru> <888238f5-e985-b79c-a688-ce933d2cd4f6@cse.gu.se> <32f7da75-51d4-2176-82b4-6363cbca1748@cse.gu.se> Message-ID: Thanks to people, Meanwhile I use Debug.Trace of Agda lib. But I shall keep the profiling tool in mind. ------ Sergei On 2020-01-20 23:15, Nils Anders Danielsson wrote: > On 2020-01-20 21:06, Ulf Norell wrote: >> See https://github.com/agda/agda-ghc-names > > I think it would be better if Agda made an attempt to generate more or > less readable names directly (while respecting Haskell's lexical > syntax). From mathijs at bluescreen303.nl Tue Jan 21 23:41:24 2020 From: mathijs at bluescreen303.nl (Mathijs Kwik) Date: Tue, 21 Jan 2020 23:41:24 +0100 Subject: [Agda] Struggling with irrelevance Message-ID: Hi all, I recently played around a bit with irrelevance annotations and with compile time vs runtime presence of certain elements by looking at the generated Haskell code via MAlonzo. I observed that while in haskell it's quite easy to purposefully lose reference to a type variable through this construct: ``` data Any (f : k -> Type) where Any :: f t -> Any f ``` The agda equivalent ``` data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) where any : {t : k} ? f t ? Any f ``` leads to this runtime representation: ``` name42 = "Any" d42 a0 a1 a2 a3 = () data T42 = C48 AgdaAny AgdaAny ``` so the {t : k} actually sticks around at runtime. Of course by instantiating `f` to `id` k turns into Set, erasing t at runtime (but still wasting a "space" in the constructor), but for other `f` choices (like `Vec String`) t becomes a natural number and is passed around at runtime constantly and I can even match on it to regain knowledge about the full type of `f t`. This effectively turns the `Any` construct into a sigma / dependent product, albeit one that doesn't advertise the type that completes the incomplete `f` in its type (but in many cases, this can be known because of `f` anyway). I tried adding an irrelevance annotation: .{t :k} -> f t -> Any f But this is rejected because `t` gets used in `f t`. I would expect "some vector with unknown length" to be something we would want to be able to express. And to regain knowledge of its length, we would have to traverse the entire spine (as with lists). So is there no way to get the haskell-like behaviour where we actually lose that piece of type information and can no longer depend/match on it? And most importantly: not move around the information at runtime. --- My other case where irrelevance doesn't really help me the way I expect it would: ``` data OneMore : Rel ? 0? where onemore : {n : ?} ? OneMore n (suc n) data SucList : Set where sucList : (xs : List ?) (ys : List ?) .{p : Pointwise OneMore xs ys} ? SucList t5a : SucList t5a = sucList (42 ? 43 ? []) (43 ? 44 ? []) {onemore ? (onemore ? [])} t5b : SucList ? Bool t5b (sucList [] []) = true t5b (sucList (zero ? xs) (zero ? ys) {p}) = {!!} t5b (sucList (zero ? xs) (suc y ? ys) {p}) = {!!} t5b (sucList (suc x ? xs) (zero ? ys) {p}) = {!!} t5b (sucList (suc x ? xs) (suc y ? ys) {p}) = {!!} ``` Here, I want to mandate that a SucList contains 2 lists of the same length, where members of the second list are always the member of the first list plus one (yes, a bit contrived). Of course I don't want any of that to exist at run time, so I mark the proof irrelevant, but the typechecker still enforces the invariant everywhere I want to create or modify a SucList. I also managed to turn this into instance arguments by creating an instance-arguments-and-implicits-only version of Pointwise, so generating the proof by hand is no longer needed, but left that out of this example. But now, I run into problems then I want to match a SucList. Agda thinks all these cases at t5b are fine, which of course shouldn't be the case. Luckily, it does pick up on the fact that both lists need to be equal length, but the "one more" invariant seems unknown. Of course I can mark the proof relevant again and start matching on that, to have the type checker see which cases are impossible, but I'd rather not do that, as these Pointwise proof chains then end up being passed around at run time. I was hoping that these irrelevant arguments (like this proof type) would still be useable by the type checker to rule out faulty cases and see shapes or other arguments. Otherwise, there really isn't much use for irrelevance for me. Or did I misunderstand these concepts and opt for other means to get things erased at run time? Or are there workarounds or additional things to learn/add to make these cases work the way I would like them to work? Kind regards, Mathijs PS: I couldn't resist the subject-line although this might get advertisers to label me as entering an early midlife crisis :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Wed Jan 22 09:52:04 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 22 Jan 2020 09:52:04 +0100 Subject: [Agda] Struggling with irrelevance In-Reply-To: References: Message-ID: Hi Mathijs, I the first example you can use run-time irrelevance (written `@0` or `@erased`): ``` data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) where any : {@0 t : k} ? f t ? Any f ``` This gets compiled to ``` name10 = "Any" d10 a0 a1 a2 a3 = () newtype T10 = C22 AgdaAny ``` In the second case you need to take care to only pattern match on the proof in irrelevant contexts. To rule out the impossible cases you can use `Data.Empty.Irrelevant.?-elim`. For instance, ``` t5b (sucList (zero ? xs) (zero ? ys) {p}) = ?-elim (case p of ? { (() ? _) }) ``` Similarly, when you need to deconstruct the proof for the recursive cases, the pattern matching must happen inside the irrelevant argument: ``` t5b (sucList (zero ? xs) (suc y ? ys) {p}) = t5b (sucList xs ys {case p of ? { (_ ? p) ? p }}) ``` Hope this helps with your struggles. / Ulf On Tue, Jan 21, 2020 at 11:41 PM Mathijs Kwik wrote: > Hi all, > > I recently played around a bit with irrelevance annotations and with > compile time vs runtime presence of certain elements by looking at the > generated Haskell code via MAlonzo. > > I observed that while in haskell it's quite easy to purposefully lose > reference to a type variable through this construct: > > ``` > data Any (f : k -> Type) where > Any :: f t -> Any f > ``` > > The agda equivalent > > ``` > data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) > where > any : {t : k} ? f t ? Any f > ``` > > leads to this runtime representation: > > ``` > name42 = "Any" > d42 a0 a1 a2 a3 = () > data T42 = C48 AgdaAny AgdaAny > ``` > > so the {t : k} actually sticks around at runtime. Of course by > instantiating `f` to `id` k turns into Set, erasing t at runtime (but still > wasting a "space" in the constructor), but for other `f` choices (like `Vec > String`) t becomes a natural number and is passed around at runtime > constantly and I can even match on it to regain knowledge about the full > type of `f t`. > > This effectively turns the `Any` construct into a sigma / dependent > product, albeit one that doesn't advertise the type that completes the > incomplete `f` in its type (but in many cases, this can be known because of > `f` anyway). > > I tried adding an irrelevance annotation: .{t :k} -> f t -> Any f > But this is rejected because `t` gets used in `f t`. > > I would expect "some vector with unknown length" to be something we would > want to be able to express. And to regain knowledge of its length, we would > have to traverse the entire spine (as with lists). So is there no way to > get the haskell-like behaviour where we actually lose that piece of type > information and can no longer depend/match on it? And most importantly: not > move around the information at runtime. > > > --- > > My other case where irrelevance doesn't really help me the way I expect it > would: > > ``` > data OneMore : Rel ? 0? where > onemore : {n : ?} ? OneMore n (suc n) > > data SucList : Set where > sucList : (xs : List ?) (ys : List ?) .{p : Pointwise OneMore xs ys} ? > SucList > > t5a : SucList > t5a = sucList (42 ? 43 ? []) (43 ? 44 ? []) {onemore ? (onemore ? [])} > > t5b : SucList ? Bool > t5b (sucList [] []) = true > t5b (sucList (zero ? xs) (zero ? ys) {p}) = {!!} > t5b (sucList (zero ? xs) (suc y ? ys) {p}) = {!!} > t5b (sucList (suc x ? xs) (zero ? ys) {p}) = {!!} > t5b (sucList (suc x ? xs) (suc y ? ys) {p}) = {!!} > ``` > > Here, I want to mandate that a SucList contains 2 lists of the same > length, where members of the second list are always the member of the first > list plus one (yes, a bit contrived). Of course I don't want any of that to > exist at run time, so I mark the proof irrelevant, but the typechecker > still enforces the invariant everywhere I want to create or modify a > SucList. I also managed to turn this into instance arguments by creating an > instance-arguments-and-implicits-only version of Pointwise, so generating > the proof by hand is no longer needed, but left that out of this example. > > But now, I run into problems then I want to match a SucList. Agda thinks > all these cases at t5b are fine, which of course shouldn't be the case. > Luckily, it does pick up on the fact that both lists need to be equal > length, but the "one more" invariant seems unknown. Of course I can mark > the proof relevant again and start matching on that, to have the type > checker see which cases are impossible, but I'd rather not do that, as > these Pointwise proof chains then end up being passed around at run time. > > I was hoping that these irrelevant arguments (like this proof type) would > still be useable by the type checker to rule out faulty cases and see > shapes or other arguments. Otherwise, there really isn't much use for > irrelevance for me. > > Or did I misunderstand these concepts and opt for other means to get > things erased at run time? > Or are there workarounds or additional things to learn/add to make these > cases work the way I would like them to work? > > > Kind regards, > Mathijs > > PS: I couldn't resist the subject-line although this might get advertisers > to label me as entering an early midlife crisis :) > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathijs at bluescreen303.nl Wed Jan 22 16:34:27 2020 From: mathijs at bluescreen303.nl (Mathijs Kwik) Date: Wed, 22 Jan 2020 16:34:27 +0100 Subject: [Agda] Struggling with irrelevance In-Reply-To: References: Message-ID: Interesting. The @0 annotation works fine, thanks. Only thing I'm wondering is how I could have found this myself. Neither the manual nor the release notes make note of this facility. Grepping the sources, I found there are other annotations, such as @erased, which makes me wonder what other nice gems I'm missing out on :) Your second suggestion seems to works fine! I'm wondering though why Data.Empty.Irrelevant exists at all. Why not just make the default version in Data.Empty use irrelevance? Or even: shouldn't all \bot occurrences be treated as irrelevant automatically? Thanks, Mathijs On Wed, Jan 22, 2020 at 9:52 AM Ulf Norell wrote: > Hi Mathijs, > > I the first example you can use run-time irrelevance (written `@0` or > `@erased`): > > ``` > data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) > where > any : {@0 t : k} ? f t ? Any f > ``` > This gets compiled to > ``` > name10 = "Any" > d10 a0 a1 a2 a3 = () > newtype T10 = C22 AgdaAny > ``` > > In the second case you need to take care to only pattern match on the > proof in irrelevant contexts. To rule out the impossible cases you can use > `Data.Empty.Irrelevant.?-elim`. For instance, > ``` > t5b (sucList (zero ? xs) (zero ? ys) {p}) = ?-elim (case p of ? { (() ? _) > }) > ``` > > Similarly, when you need to deconstruct the proof for the recursive cases, > the pattern matching must happen inside the irrelevant argument: > ``` > t5b (sucList (zero ? xs) (suc y ? ys) {p}) = t5b (sucList xs ys {case p of > ? { (_ ? p) ? p }}) > ``` > > Hope this helps with your struggles. > > / Ulf > > > On Tue, Jan 21, 2020 at 11:41 PM Mathijs Kwik > wrote: > >> Hi all, >> >> I recently played around a bit with irrelevance annotations and with >> compile time vs runtime presence of certain elements by looking at the >> generated Haskell code via MAlonzo. >> >> I observed that while in haskell it's quite easy to purposefully lose >> reference to a type variable through this construct: >> >> ``` >> data Any (f : k -> Type) where >> Any :: f t -> Any f >> ``` >> >> The agda equivalent >> >> ``` >> data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) >> where >> any : {t : k} ? f t ? Any f >> ``` >> >> leads to this runtime representation: >> >> ``` >> name42 = "Any" >> d42 a0 a1 a2 a3 = () >> data T42 = C48 AgdaAny AgdaAny >> ``` >> >> so the {t : k} actually sticks around at runtime. Of course by >> instantiating `f` to `id` k turns into Set, erasing t at runtime (but still >> wasting a "space" in the constructor), but for other `f` choices (like `Vec >> String`) t becomes a natural number and is passed around at runtime >> constantly and I can even match on it to regain knowledge about the full >> type of `f t`. >> >> This effectively turns the `Any` construct into a sigma / dependent >> product, albeit one that doesn't advertise the type that completes the >> incomplete `f` in its type (but in many cases, this can be known because of >> `f` anyway). >> >> I tried adding an irrelevance annotation: .{t :k} -> f t -> Any f >> But this is rejected because `t` gets used in `f t`. >> >> I would expect "some vector with unknown length" to be something we would >> want to be able to express. And to regain knowledge of its length, we would >> have to traverse the entire spine (as with lists). So is there no way to >> get the haskell-like behaviour where we actually lose that piece of type >> information and can no longer depend/match on it? And most importantly: not >> move around the information at runtime. >> >> >> --- >> >> My other case where irrelevance doesn't really help me the way I expect >> it would: >> >> ``` >> data OneMore : Rel ? 0? where >> onemore : {n : ?} ? OneMore n (suc n) >> >> data SucList : Set where >> sucList : (xs : List ?) (ys : List ?) .{p : Pointwise OneMore xs ys} ? >> SucList >> >> t5a : SucList >> t5a = sucList (42 ? 43 ? []) (43 ? 44 ? []) {onemore ? (onemore ? [])} >> >> t5b : SucList ? Bool >> t5b (sucList [] []) = true >> t5b (sucList (zero ? xs) (zero ? ys) {p}) = {!!} >> t5b (sucList (zero ? xs) (suc y ? ys) {p}) = {!!} >> t5b (sucList (suc x ? xs) (zero ? ys) {p}) = {!!} >> t5b (sucList (suc x ? xs) (suc y ? ys) {p}) = {!!} >> ``` >> >> Here, I want to mandate that a SucList contains 2 lists of the same >> length, where members of the second list are always the member of the first >> list plus one (yes, a bit contrived). Of course I don't want any of that to >> exist at run time, so I mark the proof irrelevant, but the typechecker >> still enforces the invariant everywhere I want to create or modify a >> SucList. I also managed to turn this into instance arguments by creating an >> instance-arguments-and-implicits-only version of Pointwise, so generating >> the proof by hand is no longer needed, but left that out of this example. >> >> But now, I run into problems then I want to match a SucList. Agda thinks >> all these cases at t5b are fine, which of course shouldn't be the case. >> Luckily, it does pick up on the fact that both lists need to be equal >> length, but the "one more" invariant seems unknown. Of course I can mark >> the proof relevant again and start matching on that, to have the type >> checker see which cases are impossible, but I'd rather not do that, as >> these Pointwise proof chains then end up being passed around at run time. >> >> I was hoping that these irrelevant arguments (like this proof type) would >> still be useable by the type checker to rule out faulty cases and see >> shapes or other arguments. Otherwise, there really isn't much use for >> irrelevance for me. >> >> Or did I misunderstand these concepts and opt for other means to get >> things erased at run time? >> Or are there workarounds or additional things to learn/add to make these >> cases work the way I would like them to work? >> >> >> Kind regards, >> Mathijs >> >> PS: I couldn't resist the subject-line although this might get >> advertisers to label me as entering an early midlife crisis :) >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Wed Jan 22 17:35:49 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 22 Jan 2020 17:35:49 +0100 Subject: [Agda] Struggling with irrelevance In-Reply-To: References: Message-ID: Run-time irrelevance is a relatively new feature, which is only officially supported in the upcoming 2.6.1 release. It hasn't been properly documented yet. See https://github.com/agda/agda/issues/3855 / Ulf On Wed, Jan 22, 2020 at 4:34 PM Mathijs Kwik wrote: > Interesting. > > The @0 annotation works fine, thanks. Only thing I'm wondering is how I > could have found this myself. Neither the manual nor the release notes make > note of this facility. Grepping the sources, I found there are other > annotations, such as @erased, which makes me wonder what other nice gems > I'm missing out on :) > > Your second suggestion seems to works fine! I'm wondering though why > Data.Empty.Irrelevant exists at all. Why not just make the default version > in Data.Empty use irrelevance? Or even: shouldn't all \bot occurrences be > treated as irrelevant automatically? > > Thanks, > Mathijs > > On Wed, Jan 22, 2020 at 9:52 AM Ulf Norell wrote: > >> Hi Mathijs, >> >> I the first example you can use run-time irrelevance (written `@0` or >> `@erased`): >> >> ``` >> data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) >> where >> any : {@0 t : k} ? f t ? Any f >> ``` >> This gets compiled to >> ``` >> name10 = "Any" >> d10 a0 a1 a2 a3 = () >> newtype T10 = C22 AgdaAny >> ``` >> >> In the second case you need to take care to only pattern match on the >> proof in irrelevant contexts. To rule out the impossible cases you can use >> `Data.Empty.Irrelevant.?-elim`. For instance, >> ``` >> t5b (sucList (zero ? xs) (zero ? ys) {p}) = ?-elim (case p of ? { (() ? >> _) }) >> ``` >> >> Similarly, when you need to deconstruct the proof for the recursive >> cases, the pattern matching must happen inside the irrelevant argument: >> ``` >> t5b (sucList (zero ? xs) (suc y ? ys) {p}) = t5b (sucList xs ys {case p >> of ? { (_ ? p) ? p }}) >> ``` >> >> Hope this helps with your struggles. >> >> / Ulf >> >> >> On Tue, Jan 21, 2020 at 11:41 PM Mathijs Kwik >> wrote: >> >>> Hi all, >>> >>> I recently played around a bit with irrelevance annotations and with >>> compile time vs runtime presence of certain elements by looking at the >>> generated Haskell code via MAlonzo. >>> >>> I observed that while in haskell it's quite easy to purposefully lose >>> reference to a type variable through this construct: >>> >>> ``` >>> data Any (f : k -> Type) where >>> Any :: f t -> Any f >>> ``` >>> >>> The agda equivalent >>> >>> ``` >>> data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) >>> where >>> any : {t : k} ? f t ? Any f >>> ``` >>> >>> leads to this runtime representation: >>> >>> ``` >>> name42 = "Any" >>> d42 a0 a1 a2 a3 = () >>> data T42 = C48 AgdaAny AgdaAny >>> ``` >>> >>> so the {t : k} actually sticks around at runtime. Of course by >>> instantiating `f` to `id` k turns into Set, erasing t at runtime (but still >>> wasting a "space" in the constructor), but for other `f` choices (like `Vec >>> String`) t becomes a natural number and is passed around at runtime >>> constantly and I can even match on it to regain knowledge about the full >>> type of `f t`. >>> >>> This effectively turns the `Any` construct into a sigma / dependent >>> product, albeit one that doesn't advertise the type that completes the >>> incomplete `f` in its type (but in many cases, this can be known because of >>> `f` anyway). >>> >>> I tried adding an irrelevance annotation: .{t :k} -> f t -> Any f >>> But this is rejected because `t` gets used in `f t`. >>> >>> I would expect "some vector with unknown length" to be something we >>> would want to be able to express. And to regain knowledge of its length, we >>> would have to traverse the entire spine (as with lists). So is there no way >>> to get the haskell-like behaviour where we actually lose that piece of type >>> information and can no longer depend/match on it? And most importantly: not >>> move around the information at runtime. >>> >>> >>> --- >>> >>> My other case where irrelevance doesn't really help me the way I expect >>> it would: >>> >>> ``` >>> data OneMore : Rel ? 0? where >>> onemore : {n : ?} ? OneMore n (suc n) >>> >>> data SucList : Set where >>> sucList : (xs : List ?) (ys : List ?) .{p : Pointwise OneMore xs ys} ? >>> SucList >>> >>> t5a : SucList >>> t5a = sucList (42 ? 43 ? []) (43 ? 44 ? []) {onemore ? (onemore ? [])} >>> >>> t5b : SucList ? Bool >>> t5b (sucList [] []) = true >>> t5b (sucList (zero ? xs) (zero ? ys) {p}) = {!!} >>> t5b (sucList (zero ? xs) (suc y ? ys) {p}) = {!!} >>> t5b (sucList (suc x ? xs) (zero ? ys) {p}) = {!!} >>> t5b (sucList (suc x ? xs) (suc y ? ys) {p}) = {!!} >>> ``` >>> >>> Here, I want to mandate that a SucList contains 2 lists of the same >>> length, where members of the second list are always the member of the first >>> list plus one (yes, a bit contrived). Of course I don't want any of that to >>> exist at run time, so I mark the proof irrelevant, but the typechecker >>> still enforces the invariant everywhere I want to create or modify a >>> SucList. I also managed to turn this into instance arguments by creating an >>> instance-arguments-and-implicits-only version of Pointwise, so generating >>> the proof by hand is no longer needed, but left that out of this example. >>> >>> But now, I run into problems then I want to match a SucList. Agda thinks >>> all these cases at t5b are fine, which of course shouldn't be the case. >>> Luckily, it does pick up on the fact that both lists need to be equal >>> length, but the "one more" invariant seems unknown. Of course I can mark >>> the proof relevant again and start matching on that, to have the type >>> checker see which cases are impossible, but I'd rather not do that, as >>> these Pointwise proof chains then end up being passed around at run time. >>> >>> I was hoping that these irrelevant arguments (like this proof type) >>> would still be useable by the type checker to rule out faulty cases and see >>> shapes or other arguments. Otherwise, there really isn't much use for >>> irrelevance for me. >>> >>> Or did I misunderstand these concepts and opt for other means to get >>> things erased at run time? >>> Or are there workarounds or additional things to learn/add to make these >>> cases work the way I would like them to work? >>> >>> >>> Kind regards, >>> Mathijs >>> >>> PS: I couldn't resist the subject-line although this might get >>> advertisers to label me as entering an early midlife crisis :) >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Wed Jan 22 17:36:39 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 22 Jan 2020 17:36:39 +0100 Subject: [Agda] Struggling with irrelevance In-Reply-To: References: Message-ID: On 2020-01-22 16:34, Mathijs Kwik wrote: > Neither the manual nor the release notes make note of this facility. It has not been released yet. > Why not just make the default version in Data.Empty use irrelevance? "Redefine Bottom to make use of Prop?" https://github.com/agda/agda-stdlib/issues/645 -- /NAD From mechvel at scico.botik.ru Fri Jan 24 11:02:46 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 24 Jan 2020 13:02:46 +0300 Subject: [Agda] equality on Char Message-ID: Dear standard library developers, In my certain old program it is written open import Data.Char.Unsafe using () renaming (_?_ to _?c_) open import Data.String.Unsafe using (_?_) I recall that probably ".Unsafe" was appended in order to guarantee the equality to be solved fast on Char and String. But lib-1.2 does not find this modules. How is this feature treated in lib-1.2 ? Thanks, ------ Sergei From james.wood.100 at strath.ac.uk Fri Jan 24 11:11:15 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Fri, 24 Jan 2020 10:11:15 +0000 Subject: [Agda] equality on Char In-Reply-To: References: Message-ID: Hi Sergei, These are now just safe [0], and can be found in Data.Char and Data.String. Regards, James [0]: https://github.com/agda/agda-stdlib/pull/640 On 24/01/2020 10:02, mechvel at scico.botik.ru wrote: > Dear standard library developers, > > In my certain old program it is written > > ? open import Data.Char.Unsafe using () renaming (_?_ to _?c_) > ? open import Data.String.Unsafe using (_?_) > > I recall that probably ".Unsafe" was appended in order to guarantee the > equality to be solved > fast on Char and String. > But lib-1.2 does not find this modules. > How is this feature treated in lib-1.2 ? > > Thanks, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Fri Jan 24 11:53:44 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 24 Jan 2020 13:53:44 +0300 Subject: [Agda] equality on Char In-Reply-To: References: Message-ID: <6a7df40a4eddce420f6208b67205da25@scico.botik.ru> On 2020-01-24 13:11, James Wood wrote: > Hi Sergei, > > These are now just safe [0], and can be found in Data.Char and > Data.String. > [..] I need the following functions for a certain parser to run not too slow: -------------------------------------------------------------- delimiters : List Char delimiters = ' ' ? ',' ? ';' ? '(' ? ')' ? '[' ? ']' ? '{' ? '}' ? '<' ? '>' ? '/' ? [] open Membership CharProp.?-setoid using (_?_) delimiter? : Decidable (_? delimiters) delimiter? c = any (c ??_) delimiters isRegularChar : Char ? Set -- a decimal digit or a latin letter or a isRegularChar c = -- a punctuation sign 33 ? n ? n ? 126 where n = Char.to? c regularChar? : Decidable isRegularChar regularChar? c = let n = Char.to? c in case ((33 ?? n) ,? (n ?? 126)) of \ { (yes le , yes le') ? yes (le , le') ; (no nle , _ ) ? no (nle ? proj?) ; (_ , no nle ) ? no (nle ? proj?) } -------------------------------------------------------------- Needs this ?? on Char or ? ? ?-setoid or ?-setoid ? Can "n ?? 126" take about 126 match attempts at run-time? May be to use ??, Hi all, I'm trying to follow this blog post [1] about rewriting rules, specifically the part about encoding observational equality. I'm having trouble with convincing Agda that `cong-?` is a valid rewrite rule. In particular, if I try to typecheck the following bit {-# OPTIONS --rewriting --prop #-} module Test where open import Agda.Primitive open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite variable ? ?? ?? ?? ?? : Level infix 6 _?_ postulate _?_ : {A : Set ??} {B : Set ??} ? A ? B ? Prop (?? ? ??) postulate cong-? : {A : Set ??} {B : Set ??} ? {P : A ? Set ??} {Q : B ? Set ??} ? (f : (x : A) ? P x) (g : (y : B) ? Q y) ? ((? x ? f x) ? (? y ? g y)) ? ((x : A) (y : B) (x?y : x ? y) ? f x ? g y) {-# REWRITE cong-? #-} Agda complaints that "cong-? is not a legal rewrite rule, since the following variables are not bound by the left hand side: ??, ??". I'm a bit confused since the rule is copied verbatim from the blog post. But in any case, I don't really understand what is the problem here, or why ??, ?? are an issue but not, say, ??, ??. Could somebody clarify this for me? I'm on Agda version 2.6.0.1. Thanks [1] https://jesper.sikanda.be/posts/hack-your-type-theory.html -- Filippo Sestini This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From Jesper at sikanda.be Fri Jan 24 15:34:51 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 24 Jan 2020 15:34:51 +0100 Subject: [Agda] Unbound level variables in rewrite rule In-Reply-To: <3C8AA017-144C-4F30-9101-FE0E1A13B9B6@nottingham.ac.uk> References: <3C8AA017-144C-4F30-9101-FE0E1A13B9B6@nottingham.ac.uk> Message-ID: Hi Filippo, I'm sorry, I should probably have mentioned in the blog post that you should use the development version of 2.6.1 for some of the examples. Specifically, the problem you run into seems to be https://github.com/agda/agda/issues/4020, which has been fixed in the development version. -- Jesper On Fri, Jan 24, 2020 at 3:11 PM Filippo Sestini < Filippo.Sestini at nottingham.ac.uk> wrote: > Hi all, > > I'm trying to follow this blog post [1] about rewriting rules, > specifically the part about encoding observational equality. > > I'm having trouble with convincing Agda that `cong-?` is a valid rewrite > rule. In particular, if I try to typecheck the following bit > > {-# OPTIONS --rewriting --prop #-} > > module Test where > > open import Agda.Primitive > open import Agda.Builtin.Equality > open import Agda.Builtin.Equality.Rewrite > > variable > ? ?? ?? ?? ?? : Level > > infix 6 _?_ > postulate > _?_ : {A : Set ??} {B : Set ??} ? A ? B ? Prop (?? ? ??) > > postulate > cong-? : {A : Set ??} {B : Set ??} > ? {P : A ? Set ??} {Q : B ? Set ??} > ? (f : (x : A) ? P x) (g : (y : B) ? Q y) > ? ((? x ? f x) ? (? y ? g y)) > ? ((x : A) (y : B) (x?y : x ? y) ? f x ? g y) > {-# REWRITE cong-? #-} > > Agda complaints that "cong-? is not a legal rewrite rule, since the > following variables are not bound by the left hand side: ??, ??". > > I'm a bit confused since the rule is copied verbatim from the blog post. > But in any case, I don't really understand what is the problem here, or why > ??, ?? are an issue but not, say, ??, ??. > > Could somebody clarify this for me? I'm on Agda version 2.6.0.1. > > Thanks > > [1] https://jesper.sikanda.be/posts/hack-your-type-theory.html > > -- > Filippo Sestini > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sestini.filippo at gmail.com Fri Jan 24 15:38:19 2020 From: sestini.filippo at gmail.com (Filippo Sestini) Date: Fri, 24 Jan 2020 14:38:19 +0000 Subject: [Agda] Unbound level variables in rewrite rule In-Reply-To: References: <3C8AA017-144C-4F30-9101-FE0E1A13B9B6@nottingham.ac.uk> Message-ID: Hi Jesper, I see! No worries, and many thanks for the reply. Cheers -- Filippo ?On 1/24/20, 2:35 PM, "Agda on behalf of Jesper Cockx" wrote: Hi Filippo, I'm sorry, I should probably have mentioned in the blog post that you should use the development version of 2.6.1 for some of the examples. Specifically, the problem you run into seems to be https://github.com/agda/agda/issues/4020, which has been fixed in the development version. -- Jesper On Fri, Jan 24, 2020 at 3:11 PM Filippo Sestini wrote: Hi all, I'm trying to follow this blog post [1] about rewriting rules, specifically the part about encoding observational equality. I'm having trouble with convincing Agda that `cong-?` is a valid rewrite rule. In particular, if I try to typecheck the following bit {-# OPTIONS --rewriting --prop #-} module Test where open import Agda.Primitive open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite variable ? ?? ?? ?? ?? : Level infix 6 _?_ postulate _?_ : {A : Set ??} {B : Set ??} ? A ? B ? Prop (?? ? ??) postulate cong-? : {A : Set ??} {B : Set ??} ? {P : A ? Set ??} {Q : B ? Set ??} ? (f : (x : A) ? P x) (g : (y : B) ? Q y) ? ((? x ? f x) ? (? y ? g y)) ? ((x : A) (y : B) (x?y : x ? y) ? f x ? g y) {-# REWRITE cong-? #-} Agda complaints that "cong-? is not a legal rewrite rule, since the following variables are not bound by the left hand side: ??, ??". I'm a bit confused since the rule is copied verbatim from the blog post. But in any case, I don't really understand what is the problem here, or why ??, ?? are an issue but not, say, ??, ??. Could somebody clarify this for me? I'm on Agda version 2.6.0.1. Thanks [1] https://jesper.sikanda.be/posts/hack-your-type-theory.html -- Filippo Sestini This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda From mathijs at bluescreen303.nl Sat Jan 25 15:42:56 2020 From: mathijs at bluescreen303.nl (Mathijs Kwik) Date: Sat, 25 Jan 2020 15:42:56 +0100 Subject: [Agda] Struggling with irrelevance In-Reply-To: References: Message-ID: I learned a lot by playing around with the pointers you gave me. I think I hit a bug (reported https://github.com/agda/agda/issues/4398 ) which is always fun. I have the feeling I still don't really grasp irrelevance itself (as opposed to runtime irrelevance). Have a look at this contrived heterogenous list alternative: ``` data Some (f : k ? Set ??) : Set (?? ? ??) where some : {@0 t : k} ? f t ? Some f data HList3 (f : k ? Set ??) : List k ? Set (?? ? ??) where [] : HList3 f [] _?_ : (sf : Some f) ? ? {t} {@0 ft : f t} {{p : sf ? some ft}} {xs} ? HList3 f xs ? HList3 f (t ? xs) t3a : HList3 id (? ? Bool ? []) t3a = some 43 ? some false ? [] t3b : HList3 id (? ? Bool ? []) ? ? t3b (_?_ (some x) {{p = refl}} hl3) = x ``` It's clunky, but it works. Equality proofs disappear from runtime anyway (taking care or {{p}}) and @0 removes {ft} as well, leaving HList3 without any runtime overhead (apart from the "some" constructor). However, I would expect to be able to mark {ft} and {{p}} as irrelevant as well (not just runtime irrelevant), but I run into 2 separate issues: a) when marking them both irrelevant, agda complains p is using ft, which I would expect should be allowed if p itself is irrelevant as well. b) I can no longer match p as refl, which matches the documented rules, but I don't understand it. I see why matching on irrelevant arguments kind of show they *are* relevant, but in the case of refl, it is the only valid constructor for ?, so I'm only showing agda how I know x is the right type and not really using the proof for any type of (relevant) computation. What an I missing here? Kind regards, Mathijs On Wed, Jan 22, 2020 at 9:52 AM Ulf Norell wrote: > Hi Mathijs, > > I the first example you can use run-time irrelevance (written `@0` or > `@erased`): > > ``` > data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) > where > any : {@0 t : k} ? f t ? Any f > ``` > This gets compiled to > ``` > name10 = "Any" > d10 a0 a1 a2 a3 = () > newtype T10 = C22 AgdaAny > ``` > > In the second case you need to take care to only pattern match on the > proof in irrelevant contexts. To rule out the impossible cases you can use > `Data.Empty.Irrelevant.?-elim`. For instance, > ``` > t5b (sucList (zero ? xs) (zero ? ys) {p}) = ?-elim (case p of ? { (() ? _) > }) > ``` > > Similarly, when you need to deconstruct the proof for the recursive cases, > the pattern matching must happen inside the irrelevant argument: > ``` > t5b (sucList (zero ? xs) (suc y ? ys) {p}) = t5b (sucList xs ys {case p of > ? { (_ ? p) ? p }}) > ``` > > Hope this helps with your struggles. > > / Ulf > > > On Tue, Jan 21, 2020 at 11:41 PM Mathijs Kwik > wrote: > >> Hi all, >> >> I recently played around a bit with irrelevance annotations and with >> compile time vs runtime presence of certain elements by looking at the >> generated Haskell code via MAlonzo. >> >> I observed that while in haskell it's quite easy to purposefully lose >> reference to a type variable through this construct: >> >> ``` >> data Any (f : k -> Type) where >> Any :: f t -> Any f >> ``` >> >> The agda equivalent >> >> ``` >> data Any {?? ?? : Level} {k : Set ??} (f : k ? Set ??) : Set (?? ? ??) >> where >> any : {t : k} ? f t ? Any f >> ``` >> >> leads to this runtime representation: >> >> ``` >> name42 = "Any" >> d42 a0 a1 a2 a3 = () >> data T42 = C48 AgdaAny AgdaAny >> ``` >> >> so the {t : k} actually sticks around at runtime. Of course by >> instantiating `f` to `id` k turns into Set, erasing t at runtime (but still >> wasting a "space" in the constructor), but for other `f` choices (like `Vec >> String`) t becomes a natural number and is passed around at runtime >> constantly and I can even match on it to regain knowledge about the full >> type of `f t`. >> >> This effectively turns the `Any` construct into a sigma / dependent >> product, albeit one that doesn't advertise the type that completes the >> incomplete `f` in its type (but in many cases, this can be known because of >> `f` anyway). >> >> I tried adding an irrelevance annotation: .{t :k} -> f t -> Any f >> But this is rejected because `t` gets used in `f t`. >> >> I would expect "some vector with unknown length" to be something we would >> want to be able to express. And to regain knowledge of its length, we would >> have to traverse the entire spine (as with lists). So is there no way to >> get the haskell-like behaviour where we actually lose that piece of type >> information and can no longer depend/match on it? And most importantly: not >> move around the information at runtime. >> >> >> --- >> >> My other case where irrelevance doesn't really help me the way I expect >> it would: >> >> ``` >> data OneMore : Rel ? 0? where >> onemore : {n : ?} ? OneMore n (suc n) >> >> data SucList : Set where >> sucList : (xs : List ?) (ys : List ?) .{p : Pointwise OneMore xs ys} ? >> SucList >> >> t5a : SucList >> t5a = sucList (42 ? 43 ? []) (43 ? 44 ? []) {onemore ? (onemore ? [])} >> >> t5b : SucList ? Bool >> t5b (sucList [] []) = true >> t5b (sucList (zero ? xs) (zero ? ys) {p}) = {!!} >> t5b (sucList (zero ? xs) (suc y ? ys) {p}) = {!!} >> t5b (sucList (suc x ? xs) (zero ? ys) {p}) = {!!} >> t5b (sucList (suc x ? xs) (suc y ? ys) {p}) = {!!} >> ``` >> >> Here, I want to mandate that a SucList contains 2 lists of the same >> length, where members of the second list are always the member of the first >> list plus one (yes, a bit contrived). Of course I don't want any of that to >> exist at run time, so I mark the proof irrelevant, but the typechecker >> still enforces the invariant everywhere I want to create or modify a >> SucList. I also managed to turn this into instance arguments by creating an >> instance-arguments-and-implicits-only version of Pointwise, so generating >> the proof by hand is no longer needed, but left that out of this example. >> >> But now, I run into problems then I want to match a SucList. Agda thinks >> all these cases at t5b are fine, which of course shouldn't be the case. >> Luckily, it does pick up on the fact that both lists need to be equal >> length, but the "one more" invariant seems unknown. Of course I can mark >> the proof relevant again and start matching on that, to have the type >> checker see which cases are impossible, but I'd rather not do that, as >> these Pointwise proof chains then end up being passed around at run time. >> >> I was hoping that these irrelevant arguments (like this proof type) would >> still be useable by the type checker to rule out faulty cases and see >> shapes or other arguments. Otherwise, there really isn't much use for >> irrelevance for me. >> >> Or did I misunderstand these concepts and opt for other means to get >> things erased at run time? >> Or are there workarounds or additional things to learn/add to make these >> cases work the way I would like them to work? >> >> >> Kind regards, >> Mathijs >> >> PS: I couldn't resist the subject-line although this might get >> advertisers to label me as entering an early midlife crisis :) >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Mon Jan 27 22:57:41 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 28 Jan 2020 00:57:41 +0300 Subject: [Agda] type checking in real-world algebra Message-ID: <69feb389af906f4304e8ba42b41ab907@scico.botik.ru> Dear Agda developers, I am trying to apply Agda to the verified computation in a real-world algebra. And have problems with the type checker performance in Agda 2.6.0.1. Over-commRing.agda implements arithmetic of multivariate polynomials (Pol) with coefficients in an arbitrary CommutativeRing. Also it implements parsing (Read, read) of a polynomial from String and from a list of lexemes (Lexeme = String). ParseTest.agda tests parsing for the polynomials over the coefficient domain ? = Fraction ? -- rational numbers built by applying a generic fraction constructor Fraction. It uses the module Over-commRing parameterized by the instances related to ?: ?-field, ?-Show, ?-Read. ParseTest.agda is small, and it has ... Lexemes = List String open Pol.Over-commRing ?-field ?-Show ?-Read vars n?0 ppo public using (Pol; 0?; readMonPol) debug : Lexemes ? Pol debug lexs with readMonPol lexs ... | inj? (f , _) = f ... | inj? _ = 0? -- zero Pol For the coefficients of ?, Over-commRing.readMonPol parses a monic polynomial like this: "(-2/41)*x*z^2" --> "(" ? "-2/41" ? ")" ? "*" ? "x" ? "*" ? "z" ? "^" ? "2" ? [] --> inj? (a * x' * z' ^ 2 , remainingLexemes), where a = -2/41 : ?, x' and z' : Pol are the variables "x" and "z" converted to Pol, _*_ and _^_ are the operations on Pol. Over-commRing.agda and all the needed modules are type-checked earlier, and I run > agda $agdaLibOpt +RTS -M20G -RTS Pol/ParseTest.agda It reaches all the 20G memory, hangs for 15 minutes, and I interrupt it. after changing the implementation to = aux (readMonPol lexs) where aux : (Pol ? Lexemes) ? String ? Pol aux (inj? (f , _)) = f aux (inj? _) = 0? it type-checks in 27 sec in 3 Gb memory. Further, if this debug of `with' is moved to the module Over-commRing, there it becomes for arbitrary coefficients, and this version is type-checked reasonably fast. The above `debug' does not involve any complex computation, but it uses complex type expressions and nested substitution for module parameters. I have the two observations on this. (I) Substituting the instances of generic structures (Group, Ring ...) for ?, Fraction ?, Pol (Fraction ?) and trying to type-check there a simple function often leads to the performance problem in the type check. (II) In such cases, using `with' aggravates this problem greatly. It is better to introduce a function instead. What people, please, think of this? Thanks, ------ Sergei From Filippo.Sestini at nottingham.ac.uk Thu Jan 30 12:30:54 2020 From: Filippo.Sestini at nottingham.ac.uk (Filippo Sestini) Date: Thu, 30 Jan 2020 11:30:54 +0000 Subject: [Agda] Rewrite rules for both Set and Prop Message-ID: <4D68AAEE-A2B3-42A8-B28E-4CBA3C681A87@nottingham.ac.uk> Hi all, I'm trying to encode an equality type in Agda using rewrite rules. I want the type to be a strict proposition, so I value it in the Prop universe. However, this also means that among the equations that I want to encode as rewrite rules, some will end up being between elements of a Set (for example, when rewriting the eq type itself) and some will be between elements of a Prop (for example, the elements of the identity type itself). I'm struggling to find a way to do this with Agda's rewriting system. As far as I know there is no way to define an identity type that works for both types in Set and in Prop. One could define two different identity types for each, but unfortunately Agda doesn't seem to allow declaring two different relations for BUILTIN REWRITE. Am I missing something here? Does anybody know a way out of this? Thank you -- Filippo Sestini This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From Jesper at sikanda.be Thu Jan 30 13:08:20 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 30 Jan 2020 13:08:20 +0100 Subject: [Agda] Rewrite rules for both Set and Prop In-Reply-To: <4D68AAEE-A2B3-42A8-B28E-4CBA3C681A87@nottingham.ac.uk> References: <4D68AAEE-A2B3-42A8-B28E-4CBA3C681A87@nottingham.ac.uk> Message-ID: Hi Filippo, You're correct that you currently cannot do this, as there's no way to define types that are polymorphic over both Set and Prop ( https://github.com/agda/agda/issues/3328), and you can only have one rewriting relation. However, I don't understand why you would want rewrite rules to rewrite elements of a Prop, since they are anyway all equal? -- Jesper On Thu, Jan 30, 2020 at 12:31 PM Filippo Sestini < Filippo.Sestini at nottingham.ac.uk> wrote: > Hi all, > > I'm trying to encode an equality type in Agda using rewrite rules. > I want the type to be a strict proposition, so I value it in the Prop > universe. > However, this also means that among the equations that I want to encode as > rewrite rules, some will end up being between elements of a Set (for > example, when rewriting the eq type itself) and some will be between > elements of a Prop (for example, the elements of the identity type itself). > > I'm struggling to find a way to do this with Agda's rewriting system. As > far as I know there is no way to define an identity type that works for > both types in Set and in Prop. One could define two different identity > types for each, but unfortunately Agda doesn't seem to allow declaring two > different relations for BUILTIN REWRITE. > > Am I missing something here? Does anybody know a way out of this? > > Thank you > -- > Filippo Sestini > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Thu Jan 30 16:33:27 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 30 Jan 2020 16:33:27 +0100 Subject: [Agda] Rewrite rules for both Set and Prop In-Reply-To: <266E4664-476D-4584-B9BA-6BD9E5358564@nottingham.ac.uk> References: <4D68AAEE-A2B3-42A8-B28E-4CBA3C681A87@nottingham.ac.uk> <266E4664-476D-4584-B9BA-6BD9E5358564@nottingham.ac.uk> Message-ID: Hi Filippo, Matching rewrite rules is done up to definitional equality, so in your example both foo and bar should typecheck. Since bar doesn't, it seems you've found a bug in the implementation, congratulations! It's now fixed in the development version of Agda, see https://github.com/agda/agda/issues/4410. Thanks for the example. -- Jesper On Thu, Jan 30, 2020 at 2:33 PM Filippo Sestini < Filippo.Sestini at nottingham.ac.uk> wrote: > Hi Jesper, > > The problem as I see it is that even though all elements of a Prop are > definitionally equal, there might be some other rewrite rules defined > elsewhere that involve elements of a Prop as arguments, in a way that they > are only triggered when such propositional arguments are of a certain > shape. The "canonical" example would be when defining computation rules > that only compute on canonical forms. > > Let me give a quick example. Suppose we have the following > > postulate > P : Prop > p : P > f : P -> P > > g : {A : Set} -> P -> A -> A > eq : ?{A} {x : A} -> g p x ? x > > {-# REWRITE eq #-} > > module _ {A : Set} {x : A} {y : P} where > > foo : g p x ? x > foo = refl > > bar : g (f y) x ? x > bar = refl > > Here, "foo" typechecks just fine, because the arguments of "g" in "g p x" > match the rewrite rule "eq". However, "bar" doesn't because although "f y" > is indeed definitionally equal to "p", it is still syntactically different > from "p" so the previous rewrite rule doesn't get triggered. Of course Agda > has no way to figure out that "p" is what is needed here, but I though that > if we had a way to add the following rule > > postulate > f-eq : {x : P} -> f x ? p > > then the "bar" example above would work. Any thoughts? > > Cheers > -- > Filippo > > ?On 1/30/20, 12:08 PM, "Jesper Cockx" wrote: > > Hi Filippo, > > > You're correct that you currently cannot do this, as there's no way to > define types that are polymorphic over both Set and Prop ( > https://github.com/agda/agda/issues/3328), and you can only have one > rewriting relation. However, I don't understand why you would want > rewrite rules to rewrite elements of a Prop, since they are anyway all > equal? > > > -- Jesper > > > > On Thu, Jan 30, 2020 at 12:31 PM Filippo Sestini < > Filippo.Sestini at nottingham.ac.uk> wrote: > > > Hi all, > > I'm trying to encode an equality type in Agda using rewrite rules. > I want the type to be a strict proposition, so I value it in the Prop > universe. > However, this also means that among the equations that I want to > encode as rewrite rules, some will end up being between elements of a Set > (for example, when rewriting the eq type itself) and some will be between > elements of a Prop (for example, the elements > of the identity type itself). > > I'm struggling to find a way to do this with Agda's rewriting system. > As far as I know there is no way to define an identity type that works for > both types in Set and in Prop. One could define two different identity > types for each, but unfortunately Agda doesn't > seem to allow declaring two different relations for BUILTIN REWRITE. > > Am I missing something here? Does anybody know a way out of this? > > Thank you > -- > Filippo Sestini > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Thu Jan 30 20:11:24 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Thu, 30 Jan 2020 20:11:24 +0100 Subject: [Agda] type checking in real-world algebra In-Reply-To: <69feb389af906f4304e8ba42b41ab907@scico.botik.ru> References: <69feb389af906f4304e8ba42b41ab907@scico.botik.ru> Message-ID: <1871cec2-fd9c-8ded-b9cc-7a93d3f322d2@cse.gu.se> On 2020-01-27 22:57, mechvel at scico.botik.ru wrote: > I have the two observations on this. > > (I) Substituting the instances of generic structures (Group, Ring ...) > for ?, Fraction ?, Pol (Fraction ?) and trying to type-check there > a simple function often leads to the performance problem in the > type check. > (II) In such cases, using `with' aggravates this problem greatly. > It is better to introduce a function instead. > > What people, please, think of this? https://agda.readthedocs.io/en/v2.6.0.1/language/with-abstraction.html#performance-considerations -- /NAD From icfp.publicity at googlemail.com Thu Jan 30 22:10:26 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Thu, 30 Jan 2020 16:10:26 -0500 Subject: [Agda] Call for Papers: PACMPL issue ICFP 2020 Message-ID: <5e334642ac4fe_7e7b2afcc21785b097875@homer.mail> PACMPL Volume 4, Issue ICFP 2020 Call for Papers accepted papers to be invited for presentation at The 25th ACM SIGPLAN International Conference on Functional Programming Jersey City, USA http://icfp20.sigplan.org/ ### Important dates Submissions due: 3 March 2020 (Tuesday) Anywhere on Earth https://icfp20.hotcrp.com Author response: 21 April (Tuesday) - 24 Apri (Friday) 14:00 UTC Notification: 8 May (Friday) Final copy due: 1 July (Wednesday) Conference: 18 August (Sunday) - 23 August (Friday) ### About PACMPL Proceedings of the ACM on Programming Languages (PACMPL ) is a Gold Open Access journal publishing research on all aspects of programming languages, from design to implementation and from mathematical formalisms to empirical studies. Each issue of the journal is devoted to a particular subject area within programming languages and will be announced through publicized Calls for Papers, like this one. ### Scope [PACMPL](https://pacmpl.acm.org/) issue ICFP 2020 seeks original papers on the art and science of functional programming. Submissions are invited on all topics from principles to practice, from foundations to features, and from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects, concurrency, or parallelism. Topics of interest include (but are not limited to): * Language Design: concurrency, parallelism, and distribution; modules; components and composition; metaprogramming; macros; pattern matching; type systems; type inference; dependent types; session types; gradual typing; refinement types; interoperability; domain-specific languages; imperative programming; object-oriented programming; logic programming; probabilistic programming; reactive programming; generic programming; bidirectional programming. * Implementation: abstract machines; virtual machines; interpretation; compilation; compile-time and run-time optimization; garbage collection and memory management; runtime systems; multi-threading; exploiting parallel hardware; interfaces to foreign functions, services, components, or low-level machine resources. * Software-Development Techniques: algorithms and data structures; design patterns; specification; verification; validation; proof assistants; debugging; testing; tracing; profiling; build systems; program synthesis. * Foundations: formal semantics; lambda calculus; program equivalence; rewriting; type theory; logic; category theory; monads; continuations; control; state; effects; names and binding; program verification. * Analysis and Transformation: control flow; data flow; abstract interpretation; partial evaluation; program calculation. * Applications: symbolic computing; formal-methods tools; artificial intelligence; systems programming; distributed systems and web programming; hardware design; databases; XML processing; scientific and numerical computing; graphical user interfaces; graphics and multimedia; GPU programming; scripting; system administration; security. * Education: teaching introductory programming; parallel programming; mathematical proof; algebra. Submissions will be evaluated according to their relevance, correctness, significance, originality, and clarity. Each submission should explain its contributions in both general and technical terms, clearly identifying what has been accomplished, explaining why it is significant, and comparing it with previous work. The technical content should be accessible to a broad audience. PACMPL issue ICFP 2020 also welcomes submissions in two separate categories ? Functional Pearls and Experience Reports ? that must be marked as such when submitted and that need not report original research results. Detailed guidelines on both categories are given at the end of this call. Please contact the principal editor if you have questions or are concerned about the appropriateness of a topic. ### Preparation of submissions **Deadline**: The deadline for submissions is **Tuesday, March 3, 2020**, Anywhere on Earth (). This deadline will be strictly enforced. **Formatting**: Submissions must be in PDF format, printable in black and white on US Letter sized paper, and interpretable by common PDF tools. All submissions must adhere to the "ACM Small" template that is available (in both LaTeX and Word formats) from . For authors using LaTeX, a lighter-weight package, including only the essential files, is available from . There is a limit of **25 pages for a full paper or Functional Pearl** and **12 pages for an Experience Report**; in either case, the bibliography will not be counted against these limits. Submissions that exceed the page limits or, for other reasons, do not meet the requirements for formatting, will be summarily rejected. Supplementary material can and should be **separately** submitted (see below). See also PACMPL's Information and Guidelines for Authors at . **Submission**: Submissions will be accepted at Improved versions of a paper may be submitted at any point before the submission deadline using the same web interface. **Author Response Period**: Authors will have a 72-hour period, starting at 14:00 UTC on **Tuesday, April 21, 2020**, to read reviews and respond to them. **Supplementary Material**: Authors have the option to attach supplementary material to a submission, on the understanding that reviewers may choose not to look at it. This supplementary material should **not** be submitted as part of the main document; instead, it should be uploaded as a **separate** PDF document or tarball. Supplementary material should be uploaded **at submission time**, not by providing a URL in the paper that points to an external repository. Authors are free to upload both anonymized and non-anonymized supplementary material. Anonymized supplementary material will be visible to reviewers immediately; non-anonymized supplementary material will be revealed to reviewers only after they have submitted their review of the paper and learned the identity of the author(s). **Authorship Policies**: All submissions are expected to comply with the ACM Policies for Authorship that are detailed at . **Republication Policies**: Each submission must adhere to SIGPLAN's republication policy, as explained on the web at . ### Review Process This section outlines the two-stage process with lightweight double-blind reviewing that will be used to select papers for PACMPL issue ICFP 2020. We anticipate that there will be a need to clarify and expand on this process, and we will maintain a list of frequently asked questions and answers on the conference website to address common concerns. **PACMPL issue ICFP 2020 will employ a two-stage review process.** The first stage in the review process will assess submitted papers using the criteria stated above and will allow for feedback and input on initial reviews through the author response period mentioned previously. At the review meeting, a set of papers will be conditionally accepted and all other papers will be rejected. Authors will be notified of these decisions on **May 8, 2020**. Authors of conditionally accepted papers will be provided with committee reviews (just as in previous conferences) along with a set of mandatory revisions. After four weeks (June 5, 2020), the authors will provide a second submission. The second and final reviewing phase assesses whether the mandatory revisions have been adequately addressed by the authors and thereby determines the final accept/reject status of the paper. The intent and expectation is that the mandatory revisions can be addressed within four weeks and hence that conditionally accepted papers will in general be accepted in the second phase. The second submission should clearly identify how the mandatory revisions were addressed. To that end, the second submission must be accompanied by a cover letter mapping each mandatory revision request to specific parts of the paper. The cover letter will facilitate a quick second review, allowing for confirmation of final acceptance within two weeks. Conversely, the absence of a cover letter will be grounds for the paper?s rejection. **PACMPL issue ICFP 2020 will employ a lightweight double-blind reviewing process.** To facilitate this, submitted papers must adhere to two rules: 1. **author names and institutions must be omitted**, and 2. **references to authors' own related work should be in the third person** (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing the paper more difficult (e.g., important background references should not be omitted or anonymized). In addition, authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. ### Information for Authors of Accepted Papers * As a condition of acceptance, final versions of all papers must adhere to the new ACM Small format. The page limit for the final versions of papers will be increased by two pages to help authors respond to reviewer comments and mandatory revisions: **27 pages plus bibliography for a regular paper or Functional Pearl, 14 pages plus bibliography for an Experience Report**. * Authors of accepted submissions will be required to agree to one of the three ACM licensing options: open access on payment of a fee (**recommended**, and SIGPLAN can cover the cost as described next); copyright transfer to ACM; or retaining copyright but granting ACM exclusive publication rights. Further information about ACM author rights is available from . * PACMPL is a Gold Open Access journal. It will be archived in ACM?s Digital Library, but no membership or fee is required for access. Gold Open Access has been made possible by generous funding through ACM SIGPLAN, which will cover all open access costs in the event authors cannot. Authors who can cover the costs may do so by paying an Article Processing Charge (APC). PACMPL, SIGPLAN, and ACM Headquarters are committed to exploring routes to making Gold Open Access publication both affordable and sustainable. * ACM offers authors a range of copyright options, one of which is Creative Commons CC-BY publication; this is the option recommended by the PACMPL editorial board. A reasoned argument in favour of this option can be found in the article [Why CC-BY?](https://oaspa.org/why-cc-by/) published by OASPA, the Open Access Scholarly Publishers Association. * We intend that the papers will be freely available for download from the ACM Digital Library in perpetuity via the OpenTOC mechanism. * ACM Author-Izer is a unique service that enables ACM authors to generate and post links on either their home page or institutional repository for visitors to download the definitive version of their articles from the ACM Digital Library at no charge. Downloads through Author-Izer links are captured in official ACM statistics, improving the accuracy of usage and impact measurements. Consistently linking to the definitive version of an ACM article should reduce user confusion over article versioning. After an article has been published and assigned to the appropriate ACM Author Profile pages, authors should visit to learn how to create links for free downloads from the ACM DL. * The official publication date is the date the papers are made available in the ACM Digital Library. This date may be up to *two weeks prior* to the first day of the conference. The official publication date affects the deadline for any patent filings related to published work. * At least one author of each accepted submission will be expected to attend and present that paper at the conference. The schedule for presentations will be determined and shared with authors after the full program has been selected. Presentations will be videotaped and released online if the presenter consents. In extraordinary circumstances, at the discretion of the principal editor, alternative presentation methods may be approved for specific papers. The canonical example is where all authors are denied visas to the ICFP host country, in which case a nonauthor may be deputized to present, or various electronic substitutes may be considered. We list these options in the interest of transparency, but please keep in mind that, most years, no exceptions are granted. This option is not meant, e.g., to excuse cases where authors find themselves double-booked with other meetings (so, at the time of submitting a paper, please do keep the days of the conference reserved on at least one author?s calendar). ### Artifact Evaluation Authors of papers that are conditionally accepted in the first phase of the review process will be encouraged (but not required) to submit supporting materials for Artifact Evaluation. These items will then be reviewed by an Artifact Evaluation Committee, separate from the paper Review Committee, whose task is to assess how the artifacts support the work described in the associated paper. Papers that go through the Artifact Evaluation process successfully will receive a seal of approval printed on the papers themselves. Authors of accepted papers will be encouraged to make the supporting materials publicly available upon publication of the papers, for example, by including them as "source materials" in the ACM Digital Library. An additional seal will mark papers whose artifacts are made available, as outlined in the ACM guidelines for artifact badging. Participation in Artifact Evaluation is voluntary and will not influence the final decision regarding paper acceptance. ### Special categories of papers In addition to research papers, PACMPL issue ICFP solicits two kinds of papers that do not require original research contributions: Functional Pearls, which are full papers, and Experience Reports, which are limited to half the length of a full paper. Authors submitting such papers should consider the following guidelines. #### Functional Pearls A Functional Pearl is an elegant essay about something related to functional programming. Examples include, but are not limited to: * a new and thought-provoking way of looking at an old idea * an instructive example of program calculation or proof * a nifty presentation of an old or new data structure * an interesting application of functional programming techniques * a novel use or exposition of functional programming in the classroom While pearls often demonstrate an idea through the development of a short program, there is no requirement or expectation that they do so. Thus, they encompass the notions of theoretical and educational pearls. Functional Pearls are valued as highly and judged as rigorously as ordinary papers, but using somewhat different criteria. In particular, a pearl is not required to report original research, but, it should be concise, instructive, and entertaining. A pearl is likely to be rejected if its readers get bored, if the material gets too complicated, if too much specialized knowledge is needed, or if the writing is inelegant. The key to writing a good pearl is polishing. A submission that is intended to be treated as a pearl must be marked as such on the submission web page, and should contain the words "Functional Pearl" somewhere in its title or subtitle. These steps will alert reviewers to use the appropriate evaluation criteria. Pearls will be combined with ordinary papers, however, for the purpose of computing the conference's acceptance rate. #### Experience Reports The purpose of an Experience Report is to help create a body of published, refereed, citable evidence that functional programming really works -- or to describe what obstacles prevent it from working. Possible topics for an Experience Report include, but are not limited to: * insights gained from real-world projects using functional programming * comparison of functional programming with conventional programming in the context of an industrial project or a university curriculum * project-management, business, or legal issues encountered when using functional programming in a real-world project * curricular issues encountered when using functional programming in education * real-world constraints that created special challenges for an implementation of a functional language or for functional programming in general An Experience Report is distinguished from a normal PACMPL issue ICFP paper by its title, by its length, and by the criteria used to evaluate it. * Both in the papers and in any citations, the title of each accepted Experience Report must end with the words "(Experience Report)" in parentheses. The acceptance rate for Experience Reports will be computed and reported separately from the rate for ordinary papers. * Experience Report submissions can be at most 12 pages long, excluding bibliography. * Each accepted Experience Report will be presented at the conference, but depending on the number of Experience Reports and regular papers accepted, authors of Experience reports may be asked to give shorter talks. * Because the purpose of Experience Reports is to enable our community to accumulate a body of evidence about the efficacy of functional programming, an acceptable Experience Report need not add to the body of knowledge of the functional-programming community by presenting novel results or conclusions. It is sufficient if the Report states a clear thesis and provides supporting evidence. The thesis must be relevant to ICFP, but it need not be novel. The review committee will accept or reject Experience Reports based on whether they judge the evidence to be convincing. Anecdotal evidence will be acceptable provided it is well argued and the author explains what efforts were made to gather as much evidence as possible. Typically, more convincing evidence is obtained from papers which show how functional programming was used than from papers which only say that functional programming was used. The most convincing evidence often includes comparisons of situations before and after the introduction or discontinuation of functional programming. Evidence drawn from a single person's experience may be sufficient, but more weight will be given to evidence drawn from the experience of groups of people. An Experience Report should be short and to the point: it should make a claim about how well functional programming worked on a particular project and why, and produce evidence to substantiate this claim. If functional programming worked in this case in the same ways it has worked for others, the paper need only summarize the results — the main part of the paper should discuss how well it worked and in what context. Most readers will not want to know all the details of the project and its implementation, but the paper should characterize the project and its context well enough so that readers can judge to what degree this experience is relevant to their own projects. The paper should take care to highlight any unusual aspects of the project. Specifics about the project are more valuable than generalities about functional programming; for example, it is more valuable to say that the team delivered its software a month ahead of schedule than it is to say that functional programming made the team more productive. If the paper not only describes experience but also presents new technical results, or if the experience refutes cherished beliefs of the functional-programming community, it may be better to submit it as a full paper, which will be judged by the usual criteria of novelty, originality, and relevance. The principal editor will be happy to advise on any concerns about which category to submit to. ### ICFP Organizers General Chair: Stephanie Weirich (University of Pennsylvania, USA) Artifact Evaluation Co-Chairs: Ben Lippmeier (UNSW, Australia) Brent Yorgey (Hendrix College, USA) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organiser: Igor Lukanin (Kontur, Russia) Publicity and Web Chair: Sam Tobin-Hochstadt (Indiana University, USA) Student Research Competition Chair: Youyou Cong (Tokyo Institute of Technology, Japan) Workshops Co-Chair: Leonidas Lampropoulos (University of Maryland, USA) Jennifer Hackett (University of Nottingham, UK) Conference Manager: Annabel Satin (P.C.K.) ### PACMPL Volume 4, Issue ICFP 2020 Principal Editor: Adam Chlipala (MIT, USA) Review Committee: Andreas Abel (Gothenburg University, Sweden) Nada Amin (Harvard University, USA) Edwin Brady (University of St. Andrews, UK) William E. Byrd (University of Alabama at Birmingham, USA) David Darais (University of Vermont) Richard A. Eisenberg (Bryn Mawr College, USA) Matthew Fluet (Rochester Institute of Technology, USA) Makoto Hamana (Gunma University, Japan) Fritz Henglein (Department of Computer Science, University of Copenhagen (DIKU) and Deon Digital, Denmark) Jan Hoffmann (Carnegie Mellon University, USA) Robbert Krebbers (Delft University of Technology, Netherlands) Neel Krishnaswami (Computer Laboratory, University of Cambridge, UK) Geoffrey Mainland (Drexel University, USA) Magnus O. Myreen (Chalmers University of Technology, Sweden) Atsushi Ohori (Tohoku University, Japan) Frank Piessens (KU Leuven, Belgium) Nadia Polikarpova (University of California San Diego, USA) Jonathan Protzenko (Microsoft Research, USA) Jerome Simeon (Clause, France) KC Sivaramakrishnan (IIT Madras, India) External Review Committee: Danel Ahman (University of Ljubljana, Slovenia) Aws Albarghouthi (University of Wisconsin-Madison, USA) Kenichi Asai (Ochanomizu University, Japan) Patrick Bahr (IT University of Copenhagen, Denmark) Stephanie Balzer (Carnegie Mellon University, USA) Jean-Philippe Bernardy (University of Gothenburg, Sweden) Sandrine Blazy (Univ Rennes-IRISA, France) Benjamin Canou (OCamlPro, France) Giuseppe Castagna (CNRS - Universit? de Paris, France) Jesper Cockx (TU Delft, Netherlands) Youyou Cong (Tokyo Institute of Technology, Japan) Leonardo De Moura (Microsoft Research, USA) Sebastian Erdweg (JGU Mainz, Germany) Ronald Garcia (University of British Columbia, Canada) Jennifer Hackett (University of Nottingham, UK) Troels Henriksen (University of Copenhagen, Denmark) Gabriele Keller (Utrecht University, Netherlands) Delia Kesner (IRIF, France / University of Paris Diderot, France) Shriram Krishnamurthi (Brown University, United States) Jan Midtgaard (University of Southern Denmark, Denmark) Andrey Mokhov (Jane Street, USA) J. Garrett Morris (University of Kansas, USA) Stefan Muller (Carnegie Mellon University, USA) Rasmus Ejlers M?gelberg (IT University of Copenhagen, Denmark) Cyrus Omar (University of Chicago, USA) Dominic Orchard (University of Kent, UK) Ivan Perez (NIA / NASA Formal Methods) Brigitte Pientka (McGill University, Canada) Juan Pedro Bol?var Puente (Independent Consultant, Sinusoidal Engineering) Norman Ramsey (Tufts University, USA) Christine Rizkallah (UNSW Sydney, Australia) Tiark Rompf (Purdue University, USA) Guido Salvaneschi (Technische Universit?t Darmstadt, Germany) Tom Schrijvers (KU Leuven, Belgium) Chung-chieh Shan (Indiana University, USA) Vincent St-Amour (Northwestern University, USA) Aaron Stump (The University of Iowa, USA) Nicolas Tabareau (Inria, France) Ross Tate (Cornell University, USA) Dimitrios Vytiniotis (DeepMind, UK) John Wiegley (DFINITY, USA) Beta Ziliani (FAMAF, UNC and CONICET, Argentina) From psperatto at vera.com.uy Sun Feb 2 01:19:25 2020 From: psperatto at vera.com.uy (Patricia Peratto) Date: Sat, 1 Feb 2020 21:19:25 -0300 (UYT) Subject: [Agda] consistency In-Reply-To: <896275908.811916.1580602684651.JavaMail.zimbra@vera.com.uy> Message-ID: <1485059706.812078.1580602765889.JavaMail.zimbra@vera.com.uy> Can not be defined as an axiom that different constructors create different terms? To prove 0<>1 without using bottom. To be consistent. Regards, Patricia Peratto -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathijs at bluescreen303.nl Sun Feb 2 12:43:52 2020 From: mathijs at bluescreen303.nl (Mathijs Kwik) Date: Sun, 2 Feb 2020 12:43:52 +0100 Subject: [Agda] [2.6.1] erasure and irrelevance unpredictable Message-ID: Hi All, I've created an open sum type with no runtime overhead (basically an int as a tag and an Any) and am now moving on to my next quest: open products (key/value pairs with differently-typed values). The general idea is to index a list-like structure with a (String, k) list (for remembering the types of the values per key). By mandating the list of keys(+types) to be statically known, code should be able to compile to int-indexed lookups/updates into an array (I know Agda doesn't have those, but I can postulate them to the compiler backends), which I simplify in the code below to just use lists. To do this, I need some clever erasure and/or irrelevance annotations, so I've been trying to develop some intuition surrounding these and on how agda erases things for runtime use by itself. Let's first show some code (for latest agda 2.6.1 from git): ``` open import Level using (Level; _?_) open import Data.Fin using (Fin; zero; suc) open import Data.List using (List; []; _?_; length; lookup) open import Data.Nat using (?; zero; suc; _<_; ?-pred) open import Data.String using (String; _?_) open import Data.Product using (_?_; _,_; proj?; proj?) module twt.IrrelevanceQuestions {?? ?? : Level} {k : Set ??} where variable f : k ? Set ?? t : k ts : List (String ? k) data OpenProduct (f : k ? Set ??) : List (String ? k) ? Set (?? ? ??) where [] : OpenProduct f [] _?_?_ : (key : String) ? f t ? OpenProduct f ts ? OpenProduct f ((key , t) ? ts) -- from standard-library, but with irrelevance from?< : ? {m n} ? .(m < n) ? Fin n from?< {zero} {suc n} m?n = zero from?< {suc m} {suc n} m?n = suc (from?< (?-pred m?n)) idx : (n : ?) ? {@erased ts : List (String ? k)} -- (1) ? (@erased p : n < length ts) -- (2) ? OpenProduct f ts ? f (proj? (lookup ts (from?< p))) idx zero _ (_ ? x ? _) = x idx (suc n) p (_ ? _ ? op) = idx n (?-pred p) op ``` The OpenProduct nicely becomes: `data T18 = C22 | C26 AgdaAny T18` - in other words a list of unknown (at runtime) types. It's nice to see even the key (String) is automatically understood to be erasable (as it remains tracked in the type index) Now, this version of `idx` works, but the road to get there was bumpy so I want to verify the behaviour I'm seeing before submitting potential bugs. I started out with (1) and (2) just as normal (no @erased or implicit dot), in fact, I started out without (1) at all, as it is already declared in the variables section. However, I then found it compiled into `[MAlonzo.Code.Agda.Builtin.Sigma.T14] -> Integer -> T18 -> AgdaAny`. So that's question (A): why does agda insist on keeping `ts` around? The generated code doesn't really use it other than to traverse it (while traversing the openproduct itself) and never inspects the contents. So I marked (1) irrelevant, but then (2) complains about using ts (which is true) so I mark (2) irrelevant as well, but the complaint remains. So question (B): shouldn't irrelevant arguments be allowed to depend on each other? Then I @erased (1) and kept (2) irrelevant. Interesting error: ``` Failed to solve the following constraints: _n_66 = Data.List.foldr (? _ ? suc) 0 ts : ? Data.List.foldr (? _ ? suc) 0 ts = _n_66 : ? ``` question (C): why does this error happen? It seems to me that both `n` and `length ts` are known statically at call-time so the @erased attribute shouldn't mess this up, and besided... the result of the call to ?-pred is irrelevant itself. So I hope to get some insights into why (A) (B) and (C) happen. Are any of these described behaviours bugs I should file? Kind regards, Mathijs -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Feb 2 15:53:30 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 2 Feb 2020 14:53:30 +0000 Subject: [Agda] status of inlining agda code Message-ID: <9A63FE0C-8B83-4F59-9891-123FEE103002@nottingham.ac.uk> Hi, What is the status of inline agda code in latex. In the wiki something called \AgdaRef is described but if I understand this correctly this only works for a single identifier. If I want to discuss f 3 in some text, do I have to write $\AgdaFunction{f}\,3$ or is there a better solution? Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Sun Feb 2 22:37:57 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Sun, 2 Feb 2020 22:37:57 +0100 Subject: [Agda] status of inlining agda code In-Reply-To: <9A63FE0C-8B83-4F59-9891-123FEE103002@nottingham.ac.uk> References: <9A63FE0C-8B83-4F59-9891-123FEE103002@nottingham.ac.uk> Message-ID: On 2020-02-02 15:53, Thorsten Altenkirch wrote: > If I want to discuss f 3 in some text, do I have to write > $\AgdaFunction{f}\,3$ or is there a better solution? If f is in scope, then you can use a code environment with the option inline (or inline*): https://agda.readthedocs.io/en/latest/tools/generating-latex.html#inline-code However, this is a bit clunky: Consider the application \begin{code}[hide] _ = \end{code} \begin{code}[inline] f 3 \end{code}. If Agda cannot infer the type of the application, then you can give it manually: We know that \begin{code}[hide] _ : ? _ = \end{code} \begin{code}[inline*] f 3 \end{code} must be? -- /NAD From Thorsten.Altenkirch at nottingham.ac.uk Sun Feb 2 23:56:54 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 2 Feb 2020 22:56:54 +0000 Subject: [Agda] status of inlining agda code In-Reply-To: References: <9A63FE0C-8B83-4F59-9891-123FEE103002@nottingham.ac.uk> Message-ID: <1C5DA147-A49A-4614-83B3-0544480E0B86@exmail.nottingham.ac.uk> Thank you, Nisse. Here is another question: I sometimes want to display different versions of the same program (with the same name). However, Agda won?t let me. What is the best workaround for this? I guess I could put the first version in a different module but then the indentation is different. Thorsten On 02/02/2020, 21:37, "Nils Anders Danielsson" wrote: >On 2020-02-02 15:53, Thorsten Altenkirch wrote: >> If I want to discuss f 3 in some text, do I have to write >> $\AgdaFunction{f}\,3$ or is there a better solution? > >If f is in scope, then you can use a code environment with the option >inline (or inline*): > > https://agda.readthedocs.io/en/latest/tools/generating-latex.html#inline-code > >However, this is a bit clunky: > > Consider the application > \begin{code}[hide] > _ = > \end{code} > \begin{code}[inline] > f 3 > \end{code}. > >If Agda cannot infer the type of the application, then you can give it >manually: > > We know that > \begin{code}[hide] > _ : ? > _ = > \end{code} > \begin{code}[inline*] > f 3 > \end{code} > must be? > >-- >/NAD This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From nad at cse.gu.se Mon Feb 3 18:47:43 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 3 Feb 2020 18:47:43 +0100 Subject: [Agda] status of inlining agda code In-Reply-To: <1C5DA147-A49A-4614-83B3-0544480E0B86@exmail.nottingham.ac.uk> References: <9A63FE0C-8B83-4F59-9891-123FEE103002@nottingham.ac.uk> <1C5DA147-A49A-4614-83B3-0544480E0B86@exmail.nottingham.ac.uk> Message-ID: <40e342a0-b5fa-7f9e-d1b4-e57ec13da6ed@cse.gu.se> On 2020-02-02 23:56, Thorsten Altenkirch wrote: > I sometimes want to display different versions of the same program > (with the same name). However, Agda won?t let me. What is the best > workaround for this? I guess I could put the first version in a > different module but then the indentation is different. Did you try it? The following should work: \begin{code}[hide] module Hidden where \end{code} \begin{code} A : Set? A = Set \end{code} \begin{code} A : Set? A = Set \end{code} -- /NAD From Thorsten.Altenkirch at nottingham.ac.uk Tue Feb 4 19:42:32 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 4 Feb 2020 18:42:32 +0000 Subject: [Agda] agda latex mode Message-ID: <9B5D8D56-9835-46BB-BFA1-2FAB8B4CD201@nottingham.ac.uk> I need to typeset some agda code for explanatory purposes in a lagda file, hence I don't want to type check it or include the definitions. Now instead of hand translating agda code into Math I can let agda do the work and then copy the output from the late files that agda produces into my original file. However, the problem is that I seem to need the code environment in the output but if I use it agda will try to translate it. Hence my question is there a dummy version of code which I can use for this purpose? E.g. I want to typeset something like \begin{code} \>[2]\AgdaFunction{proj?}\AgdaSpace{}% \AgdaSymbol{:}\AgdaSpace{}% \AgdaSymbol{\{}\AgdaBound{A}\AgdaSpace{}% \AgdaBound{B}\AgdaSpace{}% \AgdaSymbol{:}\AgdaSpace{}% \AgdaPrimitiveType{Set}\AgdaSymbol{\}}\AgdaSpace{}% \AgdaSymbol{?}\AgdaSpace{}% \AgdaBound{A}\AgdaSpace{}% \AgdaOperator{\AgdaRecord{?}}\AgdaSpace{}% \AgdaBound{B}\AgdaSpace{}% \AgdaSymbol{?}\AgdaSpace{}% \AgdaBound{A}\<% \end{code} in my .lagda file. But obviously I can't do that. If there is an even better way to achieve this I would also be interested. Maybe I better use lhs2tex afer all? Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From nad at cse.gu.se Tue Feb 4 20:25:34 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 4 Feb 2020 20:25:34 +0100 Subject: [Agda] agda latex mode In-Reply-To: <9B5D8D56-9835-46BB-BFA1-2FAB8B4CD201@nottingham.ac.uk> References: <9B5D8D56-9835-46BB-BFA1-2FAB8B4CD201@nottingham.ac.uk> Message-ID: <411ec1ff-5228-e5c8-34a6-001b00e93d08@cse.gu.se> On 2020-02-04 19:42, Thorsten Altenkirch wrote: > However, the problem is that I seem to need the code environment in > the output but if I use it agda will try to translate it. I'm not sure why you want to do this, but Agda looks for "\begin{code}"/"\end{code}" without any extra whitespace, so you could add some spaces: \begin {code} \>[2]\AgdaFunction{proj?}\AgdaSpace{}% \AgdaSymbol{:}\AgdaSpace{}% \AgdaSymbol{\{}\AgdaBound{A}\AgdaSpace{}% \AgdaBound{B}\AgdaSpace{}% \AgdaSymbol{:}\AgdaSpace{}% \AgdaPrimitiveType{Set}\AgdaSymbol{\}}\AgdaSpace{}% \AgdaSymbol{?}\AgdaSpace{}% \AgdaBound{A}\AgdaSpace{}% \AgdaOperator{\AgdaRecord{?}}\AgdaSpace{}% \AgdaBound{B}\AgdaSpace{}% \AgdaSymbol{?}\AgdaSpace{}% \AgdaBound{A}\<% \end {code} I don't guarantee that this hack will work forever. -- /NAD From nad at cse.gu.se Fri Feb 7 11:24:33 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 7 Feb 2020 11:24:33 +0100 Subject: [Agda] Contributing: good first issues In-Reply-To: <434f853c-f24b-15d5-6d07-a1f781ffe22a@cse.gu.se> References: <46192a2d155444203ade32ae6e6b28aa24e9bcc4.camel@dimjasevic.net> <434f853c-f24b-15d5-6d07-a1f781ffe22a@cse.gu.se> Message-ID: On 2019-12-16 12:34, Nils Anders Danielsson wrote: > There is also "help wanted". Now there are 17 open issues labelled "help wanted": https://github.com/agda/agda/labels/help%20wanted -- /NAD From psperatto at vera.com.uy Fri Feb 7 19:09:31 2020 From: psperatto at vera.com.uy (Patricia Peratto) Date: Fri, 7 Feb 2020 15:09:31 -0300 (UYT) Subject: [Agda] consistency In-Reply-To: References: <1485059706.812078.1580602765889.JavaMail.zimbra@vera.com.uy> Message-ID: <211827679.395970.1581098971226.JavaMail.zimbra@vera.com.uy> By example, to prove 0<>1 one uses universes. And uses the Bottom Set and the True set together with substitutivity. If you put as an axiom that different constructors give different elements in the same set, you don't need to use Bottom. Regards, Patricia. ----- Mensaje original ----- De: "Nils Anders Danielsson" Para: "Patricia Peratto" Enviados: Viernes, 7 de Febrero 2020 7:23:19 Asunto: Re: [Agda] consistency On 2020-02-02 01:19, Patricia Peratto wrote: > Can not be defined as an axiom that different > constructors create different terms? > > To prove 0<>1 without using bottom. > To be consistent. I don't understand what you mean. If you can rephrase your question and resend it to the list, then perhaps you will get an answer. -- /NAD From james.wood.100 at strath.ac.uk Sat Feb 8 00:32:31 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Fri, 7 Feb 2020 23:32:31 +0000 Subject: [Agda] consistency In-Reply-To: <211827679.395970.1581098971226.JavaMail.zimbra@vera.com.uy> References: <1485059706.812078.1580602765889.JavaMail.zimbra@vera.com.uy> <211827679.395970.1581098971226.JavaMail.zimbra@vera.com.uy> Message-ID: <615c72e8-b515-6ef7-7724-2f88b810f03b@strath.ac.uk> Hi Patricia, Plain Agda minus K is meant to be consistent with homotopy type theory, in which it is false that constructors are injective (due to higher inductive types). Thus there is not much motivation to support injectivity of (most) constructors other than the practical benefit of being able to match a proof of 0 ? 1 with the absurd pattern. Perhaps you are looking for a size-limited system that nonetheless supports absurd patterns? As far as I'm aware, all practical proof assistants assume countably infinitely many universes. Regards, James On 07/02/2020 18:09, Patricia Peratto wrote: > By example, to prove 0<>1 one uses universes. > And uses the Bottom Set and the True set together > with substitutivity. > > If you put as an axiom that different constructors > give different elements in the same set, you > don't need to use Bottom. > > > Regards, > Patricia. > > ----- Mensaje original ----- > De: "Nils Anders Danielsson" > Para: "Patricia Peratto" > Enviados: Viernes, 7 de Febrero 2020 7:23:19 > Asunto: Re: [Agda] consistency > > On 2020-02-02 01:19, Patricia Peratto wrote: >> Can not be defined as an axiom that different >> constructors create different terms? >> >> To prove 0<>1 without using bottom. >> To be consistent. > > I don't understand what you mean. If you can rephrase your question and > resend it to the list, then perhaps you will get an answer. > From lar307trd at gmail.com Sun Feb 9 16:41:29 2020 From: lar307trd at gmail.com (Vox Veritatis) Date: Sun, 9 Feb 2020 08:41:29 -0700 Subject: [Agda] Getting started: Emacs Message-ID: Hi all, Is there any video (or some other kind of information) on how to use Emacs when writing proofs in Agda? I seem to only find PDF documents about the proof language plus several videos on the same topic. But nothing about how to use Emacs to make progress. For example: suppose one writes a partial proof, how does one see the status? What goals are closed? What is the binding engine supposed to be? Can I set that once and for all, instead of being asked about it all the time? This kind of stuff... For a newcomer to both Emacs and Agda, having to deal with the interface might be more of a challenge than the proof language itself. Any help would be appreciated! -------------- next part -------------- An HTML attachment was scrubbed... URL: From wadler at inf.ed.ac.uk Sun Feb 9 20:45:38 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Sun, 9 Feb 2020 16:45:38 -0300 Subject: [Agda] Getting started: Emacs In-Reply-To: References: Message-ID: My textbook (at plfa.inf.ed.ac.uk) has a few sections on using Agda interactively from Emacs: https://plfa.github.io/Naturals/#writing-definitions-interactively https://plfa.github.io/Induction/#building-proofs-interactively Please let me know if those are helpful to you (or not). Cheers, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Sun, 9 Feb 2020 at 12:42, Vox Veritatis wrote: > > Hi all, > > Is there any video (or some other kind of information) on how to use Emacs when writing proofs in Agda? I seem to only find PDF documents about the proof language plus several videos on the same topic. But nothing about how to use Emacs to make progress. For example: suppose one writes a partial proof, how does one see the status? What goals are closed? What is the binding engine supposed to be? Can I set that once and for all, instead of being asked about it all the time? This kind of stuff... > > For a newcomer to both Emacs and Agda, having to deal with the interface might be more of a challenge than the proof language itself. > > Any help would be appreciated! > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From fdhzs2010 at hotmail.com Sun Feb 9 21:10:14 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Sun, 9 Feb 2020 20:10:14 +0000 Subject: [Agda] Getting started: Emacs In-Reply-To: References: , Message-ID: Hi Vox, to add more resources that I know, Conor McBride uploaded his lectures on Agda on Youtube (CS410): https://www.youtube.com/channel/UCWx63QH5IevL6gsP9stpG_w/search?query=410 I personally have watched all the videos and found them very good. in particular, he talked about not only Agda but also the Emacs gestures he used (though I don't understand why he preferred ascii to unicode). The Agda doc also has section about Emacs mode: https://agda.readthedocs.io/en/v2.6.0.1/tools/emacs-mode.html I personally have a very customized Agda setup in Emacs, which I can also share if you are interested. Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Philip Wadler Sent: February 9, 2020 2:45 PM To: Vox Veritatis Cc: Agda mailing list Subject: Re: [Agda] Getting started: Emacs My textbook (at plfa.inf.ed.ac.uk) has a few sections on using Agda interactively from Emacs: https://plfa.github.io/Naturals/#writing-definitions-interactively https://plfa.github.io/Induction/#building-proofs-interactively Please let me know if those are helpful to you (or not). Cheers, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Sun, 9 Feb 2020 at 12:42, Vox Veritatis wrote: > > Hi all, > > Is there any video (or some other kind of information) on how to use Emacs when writing proofs in Agda? I seem to only find PDF documents about the proof language plus several videos on the same topic. But nothing about how to use Emacs to make progress. For example: suppose one writes a partial proof, how does one see the status? What goals are closed? What is the binding engine supposed to be? Can I set that once and for all, instead of being asked about it all the time? This kind of stuff... > > For a newcomer to both Emacs and Agda, having to deal with the interface might be more of a challenge than the proof language itself. > > Any help would be appreciated! > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.lawrence.harrison at gmail.com Sun Feb 9 22:36:58 2020 From: william.lawrence.harrison at gmail.com (william.lawrence.harrison at gmail.com) Date: Sun, 9 Feb 2020 16:36:58 -0500 Subject: [Agda] Getting started: Emacs In-Reply-To: References: Message-ID: <024AD0DF-A317-4C47-B631-5BE1167A60FF@gmail.com> There?s a list of tutorials in the Agda docs, to: https://agda.readthedocs.io/en/v2.6.0.1/getting-started/tutorial-list.html In addition to Phil?s and Conor?s, I found Thorsten Altenkirch?s to be really useful. Bill > On Feb 9, 2020, at 3:10 PM, Jason -Zhong Sheng- Hu wrote: > > Hi Vox, > > to add more resources that I know, Conor McBride uploaded his lectures on Agda on Youtube (CS410): https://www.youtube.com/channel/UCWx63QH5IevL6gsP9stpG_w/search?query=410 > > I personally have watched all the videos and found them very good. in particular, he talked about not only Agda but also the Emacs gestures he used (though I don't understand why he preferred ascii to unicode). > > The Agda doc also has section about Emacs mode: https://agda.readthedocs.io/en/v2.6.0.1/tools/emacs-mode.html > > I personally have a very customized Agda setup in Emacs, which I can also share if you are interested. > > Thanks, > Jason Hu > https://hustmphrrr.github.io/ > > From: Agda on behalf of Philip Wadler > Sent: February 9, 2020 2:45 PM > To: Vox Veritatis > Cc: Agda mailing list > Subject: Re: [Agda] Getting started: Emacs > > My textbook (at plfa.inf.ed.ac.uk) has a few sections on using Agda > interactively from Emacs: > https://plfa.github.io/Naturals/#writing-definitions-interactively > https://plfa.github.io/Induction/#building-proofs-interactively > Please let me know if those are helpful to you (or not). Cheers, -- P > > . \ Philip Wadler, Professor of Theoretical Computer Science, > . /\ School of Informatics, University of Edinburgh > . / \ and Senior Research Fellow, IOHK > . http://homepages.inf.ed.ac.uk/wadler/ > > On Sun, 9 Feb 2020 at 12:42, Vox Veritatis wrote: > > > > Hi all, > > > > Is there any video (or some other kind of information) on how to use Emacs when writing proofs in Agda? I seem to only find PDF documents about the proof language plus several videos on the same topic. But nothing about how to use Emacs to make progress. For example: suppose one writes a partial proof, how does one see the status? What goals are closed? What is the binding engine supposed to be? Can I set that once and for all, instead of being asked about it all the time? This kind of stuff... > > > > For a newcomer to both Emacs and Agda, having to deal with the interface might be more of a challenge than the proof language itself. > > > > Any help would be appreciated! > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From lar307trd at gmail.com Mon Feb 10 23:14:21 2020 From: lar307trd at gmail.com (Vox Veritatis) Date: Mon, 10 Feb 2020 15:14:21 -0700 Subject: [Agda] Getting started: couple more questions Message-ID: A big thank you to all those who got me on a good track, including Philip, Jason and Bill! I have a couple more questions, if anyone can help: 1) When pressing C-c-x-c, Emacs asks for "Backend". Are there several options to this? For hello-world I typed "GHC" and it appears to work, but what if no output is produced? Also, is there a way to set the "Backend" so that one doesn't need to type it all the time? And 2) Being familiar with Jupyter, I also installed the agda_kernel for Jupyter and the agda-extension. Everything seemed fine (the kernel is loaded) until I typed an example from the agda_kernel page in one cell. When pressing "Shift-Enter" all I get is "the cell has to be evaluated first...". Never saw this before. This happens even if the cell contains a "magic" command, like "%autosave 300" - which works in any other Jupyter notebook, irrespective of the kernel. Vox -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Tue Feb 11 13:21:29 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 11 Feb 2020 13:21:29 +0100 Subject: [Agda] Getting started: couple more questions In-Reply-To: References: Message-ID: <28d99417-e10b-be08-5125-463dc7ff96f0@ifi.lmu.de> Welcome, Vox! > 1) When pressing C-c-x-c, Emacs asks for "Backend". Unless you want to compile your code (e.g. to Haskell via GHC), you are probably better off with C-c C-l which just "loads" your Agda file, i.e., type-checks it and allows interactive edition. To set a default backed, do M-x customize-group RET agda2 and there set the "Agda2 Backend" variable. Then "Apply and Save" this customization buffer. On 2020-02-10 23:14, Vox Veritatis wrote: > A big thank you to all those who got me on a good track, including > Philip, Jason and Bill! > > I have a couple more questions, if anyone can help: > > 1) When pressing C-c-x-c, Emacs asks for "Backend". Are there several > options to this? For hello-world I typed "GHC" and it appears to work, > but what if no output is produced? Also, is there a way to set the > "Backend" so that one doesn't need to type it all the time? > > And 2) Being familiar with Jupyter, I also installed the agda_kernel for > Jupyter and the agda-extension. Everything seemed fine (the kernel is > loaded) until I typed an example from the agda_kernel page in one cell. > When pressing "Shift-Enter" all I get is "the cell has to be evaluated > first...". Never saw this before. This happens even if the cell contains > a "magic" command, like "%autosave 300" - which works in any other > Jupyter notebook, irrespective of the kernel. > > Vox > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From nad at cse.gu.se Tue Feb 11 15:06:51 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 11 Feb 2020 15:06:51 +0100 Subject: [Agda] Getting started: couple more questions In-Reply-To: References: Message-ID: <72049923-15dc-c38a-3e0a-121067c49fb0@cse.gu.se> On 2020-02-10 23:14, Vox Veritatis wrote: > 1) When pressing C-c-x-c, Emacs asks for "Backend". Are there several > options to this? Yes, use the tab key to see all the options. -- /NAD From henning at basold.eu Sun Feb 16 11:23:09 2020 From: henning at basold.eu (Henning Basold) Date: Sun, 16 Feb 2020 11:23:09 +0100 Subject: [Agda] TEASE-LP (co-located with ETAPS 2020): Second call for contributions Message-ID: <1da1bebb-615a-a66c-14eb-0d6803772a8a@basold.eu> Call for Contributions Workshop on Trends, Extensions, Applications and Semantics of Logic Programming (TEASE-LP 2020) Dublin, Ireland, 25 April 2020 (co-located with ETAPS 2020) www.coalg.org/tease-lp Logic programming is a framework for expressing programs, propositions and relations as Horn clause theories, with the purpose of performing automatic inference in these theories. Horn clause theories are famous for their well-understood declarative semantics, in which models of logic programs are given inductively or coinductively. At the same time, Horn clauses give rise to efficient inference procedures, usually involving resolution. Logic programming found applications in type inference, verification, and AI. While logic programming was originally conceived for describing simple facts, it was extended to account for much more complex theories. This includes higher-order theories, inductive and coinductive data, and stochastic/probabilistic theories. The aim of this workshop is to bring together researchers that work on extensions of logic programming and inference methods, and to foster an exchange of methods and applications that have emerged in different communities. Invited Speakers --------------------------- * Keynote: Luke Ong, University of Oxford, GBR * Tutorial: Uli Sattler, University of Manchester, GBR Venue and Event --------------------------- TEASE-LP 2020 will be held in Dublin, Ireland, co-located with ETAPS 2020 on 25 April 2020. Important Dates --------------------------- Abstract submission: Wednesday, 04 March 2020 AoE Notification: Wednesday, 25 March 2020 AoE Camera-ready copy: Wednesday, 1 April 2020 AoE Workshop: Saturday, 25 April 2020 Topics --------------------------- The central idea of this workshop is to discuss the theory of logic programming and associated topics that have as well the goal to automatically infer knowledge and proofs. Our intention is to bring together researchers that work on the numerous topics that contribute to automatic proof inference and foster an exchange that may lead to advances in the theory of logic programming. Topics of interest include, but are not limited to, the following: * Proof theory (e.g. focalised and uniform proofs), * Logic programming beyond the classical Horn clause theories (e.g. coinduction, higher-order Horn clauses, probabilities, categorical logic, inductive LP), * Extensions of logic programming (e.g. DataLog, description logic, relational programming), * Advanced implementations (e.g. ?Prolog, ELPI, miniKanren), * Type theory (e.g. polarised ?-calculus, proofs-as-programs, types for logic programming), * Semantics (e.g. classical, categorical, algebraic, coalgebraic), and * Applications. Programme Committee --------------------------- Henning Basold (chair), Leiden University, NLD Nikolaj Bj?rner, Microsoft Research, USA William Byrd, University of Alabama at Birmingham, USA Gopal Gupta, The University of Texas at Dallas, USA Ekaterina Komendantskaya (chair), Heriot-Watt University, GBR James Lipton, Wesleyan University, USA Dale Miller, INRIA and LIX/Ecole Polytechnique, FRA Gopalan Nadathur, University of Minnesota, USA Frank Pfenning, Carnegie Mellon University, USA Hiroshi Unno, University of Tsukuba, JPN Noam Zeilberger, University of Birmingham, GBR Submission Instructions --------------------------- Since the aim of the workshop is to foster exchange and discussions on trends, extensions, applications and semantics of logic programming, we invite presentations of possibly already published as well as ongoing work. Submissions should be abstracts of at most two pages in EPTCS style (http://style.eptcs.org/) and will be only be published in the informal pre-proceedings and on the website of the workshop. Post-proceedings volume may be solicited by the PC, based on the quality of contributions. Contributions should be submitted via the Easychair system: https://easychair.org/my/conference?conf=teaselp2020 All contributions will be refereed by the programme committee and it is expected that at least one of the authors will be present during the workshop. -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 6454 bytes Desc: not available URL: From sergey.goncharov at fau.de Mon Feb 17 19:03:06 2020 From: sergey.goncharov at fau.de (Sergey Goncharov) Date: Mon, 17 Feb 2020 19:03:06 +0100 Subject: [Agda] Termination checking with Lexicographic recursive calls Message-ID: Dear all, the following definitions of mutually recursive function h? and h? are not accepted without the TERMINATING pragma, although the recursive calls are arranged lexicographically, i.e. either the first argument decreases, or it remains the same and the second one decreases. This is analogous the the implementation of the Ackermann function from the Agda documentation, where it works. Any ideas why the following is not accepted? I've managed to amend these definitions, by adding an explicit parameter of a suitable well-order type, mimicking the lexicographic descend in a straightforward way, and then the code is accepted, but I am still dubious why I had to do it. Many thanks for any eventual hints! Sergey {-# OPTIONS --without-K #-} open import Data.Nat open import Data.Nat.Properties open import Data.Product open import Relation.Binary.PropositionalEquality open import Data.Nat open import Function open import Data.Empty using (?-elim) -- ----- ?? : ? ? ? ?? 0 = 0 ?? (suc n) = ?? n + (suc n) {-# TERMINATING #-} h? : ? (n k : ?) ? (k ? n) ? ???? (?? n + k) ? n ? k h? : ? (n k : ?) ? (k ? n) ? ???? (?? n + k) ? k h? zero k p rewrite n?0?n?0 p = refl h? (suc n) zero p rewrite +-identity? (?? n + suc n) | +-suc (?? n) n with (???? (?? n + n)) | inspect ???? (?? n + n) h? (suc n) zero p | zero | [ eq ] = cong suc (h? n n ?-refl) h? (suc n) zero p | suc m | [ eq ] = ?-elim (1+n?0 (trans (sym eq) (trans (h? n n ?-refl) (n?n?0 n)))) h? (suc n) (suc k) p rewrite +-suc (?? n + suc n) k with (???? (?? n + suc n + k)) | inspect ???? (?? n + suc n + k) h? (suc n) (suc k) p | zero | [ eq ] = ?-elim (1+n?n (?-trans (m?n?0?m?n {suc n} {k} (trans (sym (h? (suc n) k (?-trans (n?1+n k) p))) eq)) (?-pred p))) h? (suc n) (suc k) p | suc m | [ eq ] = suc-injective (trans (sym eq) (trans (h? (suc n) k (?-trans (n?1+n k) p)) (+-?-assoc 1 (?-pred p)))) h? zero k p rewrite n?0?n?0 p = refl h? (suc n) zero p rewrite +-identity? (?? n + suc n) | +-suc (?? n) n | h? n n ?-refl | n?n?0 n = refl h? (suc n) (suc k) p rewrite +-suc (?? n + suc n) k | h? (suc n) k (?-trans (n?1+n k) p) with (suc n ? k) | inspect (suc n ?_) k ... | 0 | [ eq ] = ?-elim (1+n?n (?-trans (m?n?0?m?n{suc n}{k} eq) (?-pred p))) where h = ?-trans (m?n?0?m?n{suc n}{k} eq) (?-pred p) ... | suc m | [ eq ] = cong suc (h? (suc n) k (?-trans (n?1+n k) p)) -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5384 bytes Desc: S/MIME Cryptographic Signature URL: From nad at cse.gu.se Tue Feb 18 13:04:43 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 18 Feb 2020 13:04:43 +0100 Subject: [Agda] Termination checking with Lexicographic recursive calls In-Reply-To: References: Message-ID: <33684b13-db73-a240-655c-f64cfe062665@cse.gu.se> On 2020-02-17 19:03, Sergey Goncharov wrote: > Any ideas why the following is not accepted? > h? (suc n) (suc k) p rewrite +-suc (?? n + suc n) k with (???? (?? n + suc n + k)) | inspect ???? (?? n + suc n + k) > h? (suc n) (suc k) p | zero | [ eq ] = ?-elim (1+n?n (?-trans (m?n?0?m?n {suc n} {k} (trans (sym (h? (suc n) k (?-trans (n?1+n k) p))) eq)) (?-pred p))) Auxiliary functions are generated when you use rewrite or with. In this case the auxiliary functions get n and k as arguments, and then you call h? with suc?n as one of the arguments. Your code is not self-contained, but I suspect that you can make it work by using --termination-depth=2. -- /NAD From sergey.goncharov at fau.de Tue Feb 18 13:27:42 2020 From: sergey.goncharov at fau.de (Sergey Goncharov) Date: Tue, 18 Feb 2020 13:27:42 +0100 Subject: [Agda] Termination checking with Lexicographic recursive calls In-Reply-To: <33684b13-db73-a240-655c-f64cfe062665@cse.gu.se> References: <33684b13-db73-a240-655c-f64cfe062665@cse.gu.se> Message-ID: Dear Nils, OK, thanks! Indeed, it works with --termination-depth=2. I sort of expected that the problem could be the recursive calls before the equality sign, but eliminating such calls does not seem to be enough, because the with-abstraction can occur also after the equality sign. That I did not expect. I believe, I had a version of this example, when precisely only the latter happened, but the termination checker still did not accept it. Why do you say that the example is not self-contained? It uses the standard library -- otherwise it is complete. Best, Sergey On 18/02/2020 13:04, Nils Anders Danielsson wrote: > On 2020-02-17 19:03, Sergey Goncharov wrote: >> Any ideas why the following is not accepted? > >> h? (suc n) (suc k) p rewrite +-suc (?? n + suc n) k with (???? (?? n + suc n + k)) | inspect ???? (?? n + suc n + k) >> h? (suc n) (suc k) p | zero | [ eq ] = ?-elim (1+n?n (?-trans (m?n?0?m?n {suc n} {k} (trans (sym (h? (suc n) k (?-trans (n?1+n k) p))) eq)) (?-pred p))) > > Auxiliary functions are generated when you use rewrite or with. In this > case the auxiliary functions get n and k as arguments, and then you call > h? with suc?n as one of the arguments. > > Your code is not self-contained, but I suspect that you can make it work > by using --termination-depth=2. > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5384 bytes Desc: S/MIME Cryptographic Signature URL: From sergey.goncharov at fau.de Tue Feb 18 13:46:39 2020 From: sergey.goncharov at fau.de (Sergey Goncharov) Date: Tue, 18 Feb 2020 13:46:39 +0100 Subject: [Agda] Termination checking with Lexicographic recursive calls In-Reply-To: References: <33684b13-db73-a240-655c-f64cfe062665@cse.gu.se> Message-ID: <3ea1d9b5-c450-e97a-018f-be9163ac5ebf@fau.de> > because the with-abstraction can occur also after the equality > sign. sorry, that is nonsense. "with" can only be before the equality sign. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5384 bytes Desc: S/MIME Cryptographic Signature URL: From nad at cse.gu.se Wed Feb 19 11:58:48 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 19 Feb 2020 11:58:48 +0100 Subject: [Agda] Termination checking with Lexicographic recursive calls In-Reply-To: References: <33684b13-db73-a240-655c-f64cfe062665@cse.gu.se> Message-ID: <2dc754ef-6e29-ee99-ebe4-95c1ee437c32@cse.gu.se> On 2020-02-18 13:27, Sergey Goncharov wrote: > Why do you say that the example is not self-contained? It uses the > standard library -- otherwise it is complete. Perhaps we are using different versions of the standard library. I'm using the branch called "experimental". -- /NAD From matthewdaggitt at gmail.com Wed Feb 19 12:04:30 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Wed, 19 Feb 2020 19:04:30 +0800 Subject: [Agda] Termination checking with Lexicographic recursive calls In-Reply-To: <2dc754ef-6e29-ee99-ebe4-95c1ee437c32@cse.gu.se> References: <33684b13-db73-a240-655c-f64cfe062665@cse.gu.se> <2dc754ef-6e29-ee99-ebe4-95c1ee437c32@cse.gu.se> Message-ID: > > Perhaps we are using different versions of the standard library. I'm > using the branch called "experimental". > Looking at the code, I can't see why it shouldn't work on experimental? What's the error you're getting Nils? On Wed, Feb 19, 2020 at 6:58 PM Nils Anders Danielsson wrote: > On 2020-02-18 13:27, Sergey Goncharov wrote: > > Why do you say that the example is not self-contained? It uses the > > standard library -- otherwise it is complete. > > Perhaps we are using different versions of the standard library. I'm > using the branch called "experimental". > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergey.goncharov at fau.de Wed Feb 19 13:53:44 2020 From: sergey.goncharov at fau.de (Sergey Goncharov) Date: Wed, 19 Feb 2020 13:53:44 +0100 Subject: [Agda] Termination checking with Lexicographic recursive calls In-Reply-To: References: <33684b13-db73-a240-655c-f64cfe062665@cse.gu.se> <2dc754ef-6e29-ee99-ebe4-95c1ee437c32@cse.gu.se> Message-ID: > Perhaps we are using different versions of the standard library. I'm > using the branch called "experimental". > > > Looking at the code, I can't see why it shouldn't work on experimental? > What's the error you're getting Nils? > Ah, it is my bad, I forgot to include the definitions of ???? and ???? : ------------------------------------ ???? ???? : ? ? ? ???? 0 = 0 ???? (suc n) with (???? n) ???? (suc n) | zero = suc (???? n) ???? (suc n) | suc m = m ???? 0 = 0 ???? (suc n) with (???? n) ???? (suc n) | zero = 0 ???? (suc n) | suc _ = suc (???? n). ------------------------------------ These form the inverse of the Cantor pairing function.. Sorry for that. Sergey -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5384 bytes Desc: S/MIME Cryptographic Signature URL: From panosked251 at gmail.com Sat Feb 22 15:51:13 2020 From: panosked251 at gmail.com (Panos Ked) Date: Sat, 22 Feb 2020 14:51:13 +0000 Subject: [Agda] Agda Documentation Message-ID: Greetings, I was looking for the documentation of the API's routes to Emacs. I was wondering if someone can link it to me. Thank you very much for your co-operation and help. Kind regards, Panagiotis Kedikoglou -------------- next part -------------- An HTML attachment was scrubbed... URL: From paba at itu.dk Mon Feb 24 20:19:08 2020 From: paba at itu.dk (Patrick Bahr) Date: Mon, 24 Feb 2020 19:19:08 +0000 Subject: [Agda] TERMGRAPH 2020: Call for papers Message-ID: ======================================================================= Call for Papers TERMGRAPH 2020 Eleventh International Workshop on Computing with Terms and Graphs termgraph.org.uk/2020 Paris, France Co-located with FSCD & IJCAR 2020, June 29 - July 5, 2020 ======================================================================= Graphs and graph transformation systems are used in many areas within Computer Science: to represent data structures and algorithms, to define computation models, as a general modelling tool to study complex systems, etc. Topics of interest for TERMGRAPH encompass all aspects of term and graph rewriting, and applications of graph transformations in programming, automated reasoning and symbolic computation, including: * Theory of first-order and higher-order term and graph rewriting * Graph grammars * Graph-based models of computation * Graph-based programming languages and modelling frameworks * Applications in functional and logic programming * Applications in automated reasoning and symbolic computation * Term/graph rewriting tools: case studies and system descriptions * Implementation issues The aim of this workshop is to bring together researchers working in these different domains and to foster their interaction, to provide a forum for presenting new ideas and work in progress, and to enable newcomers to learn about current activities in this area. Important Dates: Submission deadline: 15 April 2020 Notification: 15 May 2020 PreProceedings version: 24 May 2020 Submissions and Publication: Authors are invited to submit an extended abstract in PDF format of max. 8 pages in EPTCS style (http://style.eptcs.org/). This may include both original work and tutorials on any of the abovementioned topics; work in progress is also welcome. Submission is through Easychair: https://easychair.org/conferences/?conf=termgraph2020 Preliminary proceedings will be available at the workshop. After the workshop, authors will be invited to submit a longer version of their work (typically a 15-pages paper) for publication in EPTCS. These submissions will undergo a second round of refereeing. Programme Committee: Beniamino Accattoli Zena Ariola Patrick Bahr (chair) Clemens Grabmayer Makoto Hamana Wolfram Kahl Fr?d?ric Prost Femke van Raamsdonk David Sabel Contact: Patrick Bahr From nad at cse.gu.se Tue Feb 25 12:11:11 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 25 Feb 2020 12:11:11 +0100 Subject: [Agda] Agda Documentation In-Reply-To: References: Message-ID: <76a91bfa-1958-3806-525b-7fed46b4db73@cse.gu.se> On 2020-02-22 15:51, Panos Ked wrote: > I was looking for the documentation of the API's routes to Emacs. I > was wondering if someone can link it to me. Thank you very much for > your co-operation and help. See the following pull request due to Ting-gian LUA for some information: Adds JSON support https://github.com/agda/agda/pull/3186 -- /NAD From claudio.sacerdoticoen at unibo.it Tue Feb 25 16:43:56 2020 From: claudio.sacerdoticoen at unibo.it (Claudio Sacerdoti Coen) Date: Tue, 25 Feb 2020 15:43:56 +0000 Subject: [Agda] CFP: Logical Frameworks and Meta-Languages: Theory and Practice (LFMTP 2020), with special session in honour of Frank Pfenning Message-ID: Logical Frameworks and Meta-Languages: Theory and Practice LFMTP 2020 Paris, France 29 June 2020 Affiliated with FSCD 2020 and IJCAR 2020 https://lfmtp.org/workshops/2020/ Abstract submission deadline: 5 April 2020 Paper submission deadline: 11 April 2020 SPECIAL SESSION IN HONOUR OF Frank Pfenning To celebrate the 60th birthday of Frank Pfenning and his great many contributions to the topics of LFMTP, one session will be devoted to talks by collaborators and friends of Frank. ABOUT LFMTP Logical frameworks and meta-languages form a common substrate for representing, implementing and reasoning about a wide variety of deductive systems of interest in logic and computer science. Their design, implementation and their use in reasoning tasks, ranging from the correctness of software to the properties of formal systems, have been the focus of considerable research over the last two decades. This workshop will bring together designers, implementors and practitioners to discuss various aspects impinging on the structure and utility of logical frameworks, including the treatment of variable binding, inductive and co-inductive reasoning techniques and the expressiveness and lucidity of the reasoning process. LFMTP 2020 will provide researchers a forum to present state-of-the-art techniques and discuss progress in areas such as the following: * Encoding and reasoning about the meta-theory of programming languages, process calculi and related formally specified systems. * Formalisation of model-theoretic and proof-theoretic semantics of logics. * Theoretical and practical issues concerning the treatment of variable binding, especially the representation of, and reasoning about, datatypes defined from binding signatures. * Design and implementation of systems and tools related to meta- languages and logical frameworks IMPORTANT DATES All deadlines are established as the end of day (23:59) AoE. * Abstract submission deadline: 5 April 2020 * Submission deadline: 11 April 2020 * Notification to authors: 13 May 2020 * Final version due: 22 May 2020 * Workshop: 29 June 2020 SUBMISSION INFORMATION In addition to regular papers, we accept the submission of "work in progress" reports, in a broad sense. Those do not need to report fully polished research results, but should be of interest for the community at large. Submitted papers should be in PDF, formatted using the EPTCS LaTeX style. The length is restricted to 15 pages for regular papers and 8 pages for "Work in Progress" papers. Submission is via EasyChair: https://easychair.org/my/conference?conf=lfmtp2020 All submissions will be peer-reviewed and the authors of those accepted will be invited to present their papers at the workshop. POST-PROCEEDINGS After the workshop we will publish post-proceedings in the Electronic Proceedings in Theoretical Computer Science (EPTCS) series. Accepted regular papers will be published in the post-proceedings. Authors of selected work-in-progress papers will be invited to submit the full versions of their papers for publication in the post- proceedings, subject to another round of review. PROGRAM COMMITTEE David Baelde, LSV, ENS Paris-Saclay & Inria Paris Fr?d?ric Blanqui, INRIA Alberto Ciaffaglione, University of Udine Dennis M?ller, Friedrich-Alexander-University Erlangen-N?rnberg Michael Norrish, Data61 Carlos Olarte, Universidade Federal do Rio Grande do Norde Claudio Sacerdoti Coen, University of Bologna (PC Co-Chair) Ulrich Sch?pp, fortiss GmbH Alwen Tiu, Australian National University (PC Co-Chair) Tjark Weber, Uppsala University -- Prof. Claudio Sacerdoti Coen Department of Computer Science and Engineering University of Bologna From bove at chalmers.se Thu Feb 27 17:38:27 2020 From: bove at chalmers.se (Ana Bove) Date: Thu, 27 Feb 2020 17:38:27 +0100 Subject: [Agda] CFP: LSFA 2020 Message-ID: <851480de-4d23-03f2-7353-2d12779c4fe4@chalmers.se> LSFA 2020 15th Workshop on Logical and Semantic Frameworks, with Applications 26-28 August 2020, Salvador, Brazil http://lsfa2020.ufba.br Logical and semantic frameworks are formal languages used to represent logics, languages and systems. These frameworks provide foundations for the formal specification of systems and programming languages, supporting tool development and reasoning. Previous editions of LSFA took place in Natal (2019), Fortaleza (2018), Bras?lia (2017), Porto (2016), Natal (2015), Bras?lia (2014), S?o Paulo (2013), Rio de Janeiro (2012), Belo Horizonte (2011), Natal (2010), Bras?lia (2009), Salvador (2008), Ouro Preto (2007), and Natal (2006). Seehttp://lsfa.cic.unb.br for more information. Previous proceedings were published by EPTCS and ENTCS. Previous LSFA special issues have been published in journals such as Journal of Algorithms, The Logic Journal of the IGPL and Theoretical Computer Science (seehttp://lsfa.cic.unb.br). TOPICS OF INTEREST Topics of interest include, but are not limited to: * Specification languages and meta-languages * Formal semantics of languages and logical systems * Logical frameworks * Semantic frameworks * Type theory * Proof theory * Automated deduction * Implementation of logical or semantic frameworks * Applications of logical or semantic frameworks * Computational and logical properties of semantic frameworks * Logical aspects of computational complexity * Lambda and combinatory calculi * Process calculi SUBMISSION AND PUBLICATION Contributions should be written in English and submitted in the form of full papers with a maximum of 13 pages excluding references. Beyond full regular papers, we encourage submissions such as system descriptions, proof pearls, rough diamonds (preliminary results and work in progress), original surveys, or overviews of research projects, where the focus is more on elegance and dissemination than on novelty. Papers belonging to this second category are expected to be short, that is, of a maximum of 6 pages excluding references. For both paper categories, additional technical material can be provided in a clearly marked appendix which will be read by reviewers at their discretion. Contributions must also be unpublished and not submitted simultaneously for publication elsewhere. The papers should be prepared in LaTeX using the generic ENTCS package (http://www.entcs.org/prelim.html). The submission should be in the form of a PDF file uploaded to Easychair: https://easychair.org/conferences/?conf=lsfa2020 At least one of the authors should register for the workshop. All accepted papers will be available online during the workshop; full papers will be published at ENTCS, and short papers will be collected in an informal volume. For the publication of the proceedings there will be a cost to authors of USD 50 at registration time. IMPORTANT DATES: * Abstract deadline: March 16 * Submission deadline: March 23 * Notification to Authors: May 12 * Proceedings version due: Jun 12 * LSFA 2020: August 26-28 INVITED SPEAKERS * Mauricio Ayala-Rinc?n, University of Bras?lia (joint speaker with WBL 20) * Eduardo Bonelli, Stevens Institute of Technology * Delia Kesner, IRIF, Universit? Paris Diderot PROGRAM COMMITTEE CO-CHAIRS * Cl?udia Nalon, University of Bras?lia * Giselle Reis, CMU-Qatar PROGRAM COMMITTEE * Beniamino Accattoli, INRIA (Saclay) * Sandra Alves, University of Porto * Mario Benevides, UFF * Ana Bove, Chalmers * Manuela Busaniche, CONICET-UNL Santa Fe * Marco Cerami, UFBA * Amy Felty, University of Ottawa * Maribel Fernandez, King's College London * Francicleber Ferreira, UFC * Renata de Freitas, UFF * Edward Hermann Haeusler, PUC-Rio * Lourdes del Carmen Gonz?lez Huesca, UNAM * Oleg Kiselyov, Tohoku University * Jo?o Marcos, UFRN * Alberto Momigliano, University of Milano * Daniele Nantes, UnB * Carlos Olarte, UFRN * Revantha Ramanayake,TU Wien * Camilo Rocha, PUJ * Nora Szasz, Universidad ORT * Ivan Varzinczak, Universit? d'Artois * Daniel Ventura, UFG * Renata Wassermann, USP From jsiek at indiana.edu Sat Feb 29 06:04:56 2020 From: jsiek at indiana.edu (Siek, Jeremy) Date: Sat, 29 Feb 2020 05:04:56 +0000 Subject: [Agda] recursion, lexicographic ordering Message-ID: <17C53C5B-2B00-4A55-801A-CD09977810FF@indiana.edu> I would like to define a function (Martello and Montanari?s unification algorithm) whose termination measure is a lexicographic ordering of three numbers. I get the impression that there is support for this kind of thing in the standard library, in Induction.WellFounded.Lexicographic. However, I?m at a loss trying to figure out how to use it. Any examples or pointers to documentation or tutorials would be much appreciated. Thank you, Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Sat Feb 29 09:08:30 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Sat, 29 Feb 2020 16:08:30 +0800 Subject: [Agda] recursion, lexicographic ordering In-Reply-To: <17C53C5B-2B00-4A55-801A-CD09977810FF@indiana.edu> References: <17C53C5B-2B00-4A55-801A-CD09977810FF@indiana.edu> Message-ID: Hi Jeremy, So I've been meaning to get rid of `Induction.WellFounded.Lexicographic` for a while as it doesn't mesh with the rest of the library very well. Your question might actually provide me the impetus to do so! Give me a few hours to upload a new branch to the standard library with some small changes and I'll get back to you with the best way to do so. Best, Matthew On Sat, Feb 29, 2020 at 1:05 PM Siek, Jeremy wrote: > I would like to define a function (Martello and Montanari?s unification > algorithm) > whose termination measure is a lexicographic ordering of three numbers. > I get the impression that there is support for this kind of thing in the > standard library, in Induction.WellFounded.Lexicographic. > However, I?m at a loss trying to figure out how to use it. > Any examples or pointers to documentation or tutorials > would be much appreciated. > > Thank you, > Jeremy > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Sat Feb 29 10:07:53 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Sat, 29 Feb 2020 17:07:53 +0800 Subject: [Agda] recursion, lexicographic ordering In-Reply-To: References: <17C53C5B-2B00-4A55-801A-CD09977810FF@indiana.edu> Message-ID: Hi Jeremy, Okay, I've written out an example of how you'd use the WellFounded part of the standard library to prove termination below. I haven't gone into the fine details of how `Acc` and `WellFounded` work as there's plenty of excellent resources out there already, e.g. here . Note that the latest official version of the standard library (v1.2) is missing the proof `?-wellFounded` in `Data.Product.Relation.Binary.Lex.Strict`, as I've just added it to the ` lexicographic-product ` branch. The proof will however be available in the upcoming v1.3 release. In the meantime I think the easiest way for you to solve this problem is to copy the updated file into your own library and give it a new name such as `MyStrictLexProduct.agda` and import that instead of `Data.Product.Relation.Binary.Lex.Strict`. You can then delete it and switch back when v1.3 releases. ```agda module Test where open import Data.Nat open import Data.Nat.Induction using (Acc; acc; <-wellFounded) open import Data.Nat.Properties using (?-refl) open import Data.Sum using (inj?; inj?) open import Data.Product open import Data.Product.Relation.Binary.Lex.Strict open import Induction.WellFounded using (WellFounded) open import Relation.Binary open import Relation.Binary.PropositionalEquality using (_?_; refl) -- Define the order over the 3-tuples using two applications of `?-Lex` from `Data.Product.Relation.Binary.Lex.Strict`: _ wrote: > Hi Jeremy, > So I've been meaning to get rid of `Induction.WellFounded.Lexicographic` > for a while as it doesn't mesh with the rest of the library very well. Your > question might actually provide me the impetus to do so! > > Give me a few hours to upload a new branch to the standard library with > some small changes and I'll get back to you with the best way to do so. > Best, > Matthew > > > On Sat, Feb 29, 2020 at 1:05 PM Siek, Jeremy wrote: > >> I would like to define a function (Martello and Montanari?s unification >> algorithm) >> whose termination measure is a lexicographic ordering of three numbers. >> I get the impression that there is support for this kind of thing in the >> standard library, in Induction.WellFounded.Lexicographic. >> However, I?m at a loss trying to figure out how to use it. >> Any examples or pointers to documentation or tutorials >> would be much appreciated. >> >> Thank you, >> Jeremy >> >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fdhzs2010 at hotmail.com Sat Feb 29 12:56:32 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Sat, 29 Feb 2020 11:56:32 +0000 Subject: [Agda] recursion, lexicographic ordering In-Reply-To: References: <17C53C5B-2B00-4A55-801A-CD09977810FF@indiana.edu> , Message-ID: Hi Matthew, Jeremy, I believe the APIs for well-founded induction from the stdlib are very difficult to use. I improved the APIs in my own project, which provides a nice and straightforward nobrainer wrapper. a running example is https://hustmphrrr.github.io/popl20-artifact/agda/DsubEquivSimpler.html#13825 for completeness: <:?-trans-narrow : ? T ? trans-on T ? narrow-on T <:?-trans-narrow = wfRec _ aux where open Measure <-wellFounded Typ-measure aux : ? T ? (? T? ? Typ-measure T? < Typ-measure T ? trans-on T? ? narrow-on T?) ? trans-on T ? narrow-on T aux T rec = -- details omitted As you can see, it opens up a module `Measure` which expose `wfRec` which accomplishes the well-founded induction and I only had to implement the induction body, which is the `aux` function. when I showed this code to my supervisor for the first time, he was able to get the big picture of it so I guess it also improves readability too. This example does not use lexicographically well-founded induction, but it turns out I also prepared a variant for that: https://hustmphrrr.github.io/popl20-artifact/agda/Utils.html#2958 APIs like this can be quite handy. probably I should see if these APIs still work in the latest stdlib and PR it this weekends. Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Matthew Daggitt Sent: February 29, 2020 4:07 AM To: Siek, Jeremy Cc: agda list Subject: Re: [Agda] recursion, lexicographic ordering Hi Jeremy, Okay, I've written out an example of how you'd use the WellFounded part of the standard library to prove termination below. I haven't gone into the fine details of how `Acc` and `WellFounded` work as there's plenty of excellent resources out there already, e.g. here. Note that the latest official version of the standard library (v1.2) is missing the proof `?-wellFounded` in `Data.Product.Relation.Binary.Lex.Strict`, as I've just added it to the `lexicographic-product` branch. The proof will however be available in the upcoming v1.3 release. In the meantime I think the easiest way for you to solve this problem is to copy the updated file into your own library and give it a new name such as `MyStrictLexProduct.agda` and import that instead of `Data.Product.Relation.Binary.Lex.Strict`. You can then delete it and switch back when v1.3 releases. ```agda module Test where open import Data.Nat open import Data.Nat.Induction using (Acc; acc; <-wellFounded) open import Data.Nat.Properties using (?-refl) open import Data.Sum using (inj?; inj?) open import Data.Product open import Data.Product.Relation.Binary.Lex.Strict open import Induction.WellFounded using (WellFounded) open import Relation.Binary open import Relation.Binary.PropositionalEquality using (_?_; refl) -- Define the order over the 3-tuples using two applications of `?-Lex` from `Data.Product.Relation.Binary.Lex.Strict`: _> wrote: Hi Jeremy, So I've been meaning to get rid of `Induction.WellFounded.Lexicographic` for a while as it doesn't mesh with the rest of the library very well. Your question might actually provide me the impetus to do so! Give me a few hours to upload a new branch to the standard library with some small changes and I'll get back to you with the best way to do so. Best, Matthew On Sat, Feb 29, 2020 at 1:05 PM Siek, Jeremy > wrote: I would like to define a function (Martello and Montanari?s unification algorithm) whose termination measure is a lexicographic ordering of three numbers. I get the impression that there is support for this kind of thing in the standard library, in Induction.WellFounded.Lexicographic. However, I?m at a loss trying to figure out how to use it. Any examples or pointers to documentation or tutorials would be much appreciated. Thank you, Jeremy _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sat Feb 29 14:12:45 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 29 Feb 2020 13:12:45 +0000 Subject: [Agda] let vs where Message-ID: Hi, Can somebody remind me for what (historical ?) reasons ?where? allows pattern matching but not ?let?? What are the obstacles to fixing this? Thanks, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Sat Feb 29 14:09:30 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Sat, 29 Feb 2020 14:09:30 +0100 Subject: [Agda] let vs where In-Reply-To: References: Message-ID: Hi Thorsten, 'Let' statements are part of the term syntax of Agda and are desugared during typechecking (by inlining). In contrast, 'where' statements are part of the syntax for *declarations* so they cannot appear inside terms directly. Pattern matching is not part of the term syntax of Agda (unlike Coq where eliminators can appear in terms), so in general pattern matching can only happen at the declaration level. The exception to this rule are pattern matching lambdas, which are actually implemented internally by lifting the whole expression to an (anonymous) top-level definition. It should probably be possible to extend let-expressions with the same trick. However, this would mean pattern-matching let's would be generative, i.e. two syntactically equal let-expressions might not be definitionally equal since they are desugared to two separate anonymous definitions internally. Another more drastic solution would be to extend Agda's internal syntax with some kind of pattern-matching construct, e.g. eliminators or case trees. But this would basically require a complete overhaul of Agda's internals, so I do not expect this will happen in the forseeable future (perhaps it could be part of the mythical Agda 3.0). -- Jesper On Sat, Feb 29, 2020 at 2:13 PM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > Hi, > > > > Can somebody remind me for what (historical ?) reasons ?where? allows > pattern matching but not ?let?? What are the obstacles to fixing this? > > > > Thanks, > > Thorsten > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sat Feb 29 15:34:31 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 29 Feb 2020 14:34:31 +0000 Subject: [Agda] let vs where In-Reply-To: References: Message-ID: Ah thank you. I see actually I can use let arbitrary deep in an expression while where is only allowed on the top level, right? Yes, building pattern matching into the syntax would make sense. I also like to use local case expressions, where the definitional equality is extended when checking the right hand side of a case expression (we called this the ?smart case?. Thorsten From: Jesper Cockx Date: Saturday, 29 February 2020 at 14:09 To: Thorsten Altenkirch Cc: agda list Subject: Re: [Agda] let vs where Hi Thorsten, 'Let' statements are part of the term syntax of Agda and are desugared during typechecking (by inlining). In contrast, 'where' statements are part of the syntax for declarations so they cannot appear inside terms directly. Pattern matching is not part of the term syntax of Agda (unlike Coq where eliminators can appear in terms), so in general pattern matching can only happen at the declaration level. The exception to this rule are pattern matching lambdas, which are actually implemented internally by lifting the whole expression to an (anonymous) top-level definition. It should probably be possible to extend let-expressions with the same trick. However, this would mean pattern-matching let's would be generative, i.e. two syntactically equal let-expressions might not be definitionally equal since they are desugared to two separate anonymous definitions internally. Another more drastic solution would be to extend Agda's internal syntax with some kind of pattern-matching construct, e.g. eliminators or case trees. But this would basically require a complete overhaul of Agda's internals, so I do not expect this will happen in the forseeable future (perhaps it could be part of the mythical Agda 3.0). -- Jesper On Sat, Feb 29, 2020 at 2:13 PM Thorsten Altenkirch > wrote: Hi, Can somebody remind me for what (historical ?) reasons ?where? allows pattern matching but not ?let?? What are the obstacles to fixing this? Thanks, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiek at indiana.edu Sat Feb 29 18:12:26 2020 From: jsiek at indiana.edu (Siek, Jeremy) Date: Sat, 29 Feb 2020 17:12:26 +0000 Subject: [Agda] recursion, lexicographic ordering In-Reply-To: References: <17C53C5B-2B00-4A55-801A-CD09977810FF@indiana.edu> Message-ID: <0431182B-4978-43F5-AAAF-60827A9C60E3@indiana.edu> Dear Matthew, Thank you so much! I now have a terminating implementation of Martello and Montanari?s classic unification algorithm. This is for a graduate course in programming languages at Indiana University based on PLFA: https://jsiek.github.io/B522-PL-Foundations/ Cheers, Jeremy On Feb 29, 2020, at 4:07 AM, Matthew Daggitt > wrote: Hi Jeremy, Okay, I've written out an example of how you'd use the WellFounded part of the standard library to prove termination below. I haven't gone into the fine details of how `Acc` and `WellFounded` work as there's plenty of excellent resources out there already, e.g. here. Note that the latest official version of the standard library (v1.2) is missing the proof `?-wellFounded` in `Data.Product.Relation.Binary.Lex.Strict`, as I've just added it to the `lexicographic-product` branch. The proof will however be available in the upcoming v1.3 release. In the meantime I think the easiest way for you to solve this problem is to copy the updated file into your own library and give it a new name such as `MyStrictLexProduct.agda` and import that instead of `Data.Product.Relation.Binary.Lex.Strict`. You can then delete it and switch back when v1.3 releases. ```agda module Test where open import Data.Nat open import Data.Nat.Induction using (Acc; acc; <-wellFounded) open import Data.Nat.Properties using (?-refl) open import Data.Sum using (inj?; inj?) open import Data.Product open import Data.Product.Relation.Binary.Lex.Strict open import Induction.WellFounded using (WellFounded) open import Relation.Binary open import Relation.Binary.PropositionalEquality using (_?_; refl) -- Define the order over the 3-tuples using two applications of `?-Lex` from `Data.Product.Relation.Binary.Lex.Strict`: _> wrote: Hi Jeremy, So I've been meaning to get rid of `Induction.WellFounded.Lexicographic` for a while as it doesn't mesh with the rest of the library very well. Your question might actually provide me the impetus to do so! Give me a few hours to upload a new branch to the standard library with some small changes and I'll get back to you with the best way to do so. Best, Matthew On Sat, Feb 29, 2020 at 1:05 PM Siek, Jeremy > wrote: I would like to define a function (Martello and Montanari?s unification algorithm) whose termination measure is a lexicographic ordering of three numbers. I get the impression that there is support for this kind of thing in the standard library, in Induction.WellFounded.Lexicographic. However, I?m at a loss trying to figure out how to use it. Any examples or pointers to documentation or tutorials would be much appreciated. Thank you, Jeremy _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda __________________________________________ Jeremy G. Siek > Professor Luddy School of Informatics, Computing, and Engineering Indiana University Bloomington http://homes.soic.indiana.edu/jsiek/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From en14078 at bristol.ac.uk Sat Feb 29 20:26:24 2020 From: en14078 at bristol.ac.uk (Ed Nutting) Date: Sat, 29 Feb 2020 19:26:24 +0000 Subject: [Agda] Agda on Github Pages Message-ID: <53542dad-85af-9eac-d83d-778d5ae90085@bristol.ac.uk> Hello Agda users, Wondering whether you can use Literate Agda Markdown as part of a Github Pages website? I've created a template repository to show how: https://github.com/EdNutting/github-pages-agda/ Demo: https://ednutting.github.io/github-pages-agda/ Please feel free to suggest improvements - particularly the 'how-to' instructions. This setup provides Agda 2.6.0.1. I'll add future versions of Agda as they're released. Supporting older versions is probably possible if people require it. Happy blogging! Ed Nutting PhD student, University of Bristol My ongoing PhD project: Proving a new hardware garbage collector in Agda - ping me if interested. P.s. If you know how to simplify the setup while retaining the efficiency of the continuous integration, please let me know. From Thorsten.Altenkirch at nottingham.ac.uk Sun Mar 1 14:19:20 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 1 Mar 2020 13:19:20 +0000 Subject: [Agda] why coinductive? Message-ID: Hi, I am just writing some lecture notes hence I noticed something else. Why do we have to say coinductive when defining a recursive record, aka a coinductive type? This seems asymmetric because we don?t have t say anything when defining a recursive sum (like the natural numbers)? Is this just a relic from the days that records couldn?t be recursive or is there a technical reason? Btw, I really would like to have destructors for coinductive types (another asymmetry). Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.basold at liacs.leidenuniv.nl Sun Mar 1 15:25:24 2020 From: h.basold at liacs.leidenuniv.nl (Henning Basold) Date: Sun, 1 Mar 2020 15:25:24 +0100 Subject: [Agda] why coinductive? In-Reply-To: References: Message-ID: Hi Thorsten, I think this is about ?-expansion, which is disabled by default for recursive records: https://agda.readthedocs.io/en/v2.5.4/language/record-types.html#eta-expansion Having ? for recursive coinductive types would make definitional equality undecidable: https://cronfa.swan.ac.uk/Record/cronfa38822 About the destructors, or rather what I would call observations, this asymmetry is there because dependencies in the domain of observations of coinductive types usually don't change because people use an explicit equality instead. For instance, instead of record List (A : Set) : ? ??Set where coinductive hd : {n : ?} ??List A (s n) ??A tl : {n : ?} ? List A (s n) ??List A n people would write record List (A : Set) (n : ?) : Set where coinductive hd : {k : ?} ? (n == s k) ??A tl : {k : ?} ? (n == s k) ??List A k (Note that, if you change ? to conatural numbers, then this example becomes more interesting). These two types are isomorphic via an adjunction. Thus, it does not matter if we make the domain explicit or not, assuming that this is what your question was getting at. For inductive types, we prefer the first version, where dependencies in the codomain of constructors can change, as this simplifies pattern matching. The standard example there would be data Vec (A : Set) : ? ??Set where coinductive [] : Vec A 0 _::_ : A ? {n : ?} ? Vec A n ??List A (s n) vs data Vec (A : Set) (n : ?) :?Set where coinductive [] : {k : ?} ? (n == 0) ??Vec A n _::_ : A ? {k : ?} ? (n == s k) ??Vec A k ??List A n Cheers, Henning On 01/03/2020 14:19, Thorsten Altenkirch wrote: > Hi, > > ? > > I am just writing some lecture notes hence I noticed something else. Why > do we have to say coinductive when defining a recursive record, aka a > coinductive type? This seems asymmetric because we don?t have t say > anything when defining a recursive sum (like the natural numbers)? Is > this just a relic from the days that records couldn?t be recursive or is > there a technical reason? > > ? > > Btw, I really would like to have destructors for coinductive types > (another asymmetry). > > ? > > Thorsten > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 2472 bytes Desc: not available URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Mar 1 22:32:10 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 1 Mar 2020 21:32:10 +0000 Subject: [Agda] why coinductive? In-Reply-To: References: Message-ID: <543C947E-B2F9-49E6-9906-1947C9D70F85@nottingham.ac.uk> Hi Henning, I think this is about ?-expansion, which is disabled by default for recursive records: https://agda.readthedocs.io/en/v2.5.4/language/record-types.html#eta-expansion You are right, I forgot. Btw, one could have eta-expansion for sums but it seems that eta-expansion for records is more popular. Having ? for recursive coinductive types would make definitional equality undecidable: https://cronfa.swan.ac.uk/Record/cronfa38822 About the destructors, or rather what I would call observations, I prefer destructors because it is nicely dual to constructors. this asymmetry is there because dependencies in the domain of observations of coinductive types usually don't change because people use an explicit equality instead. For instance, instead of record List (A : Set) : ? ??Set where coinductive hd : {n : ?} ??List A (s n) ??A tl : {n : ?} ? List A (s n) ??List A n people would write record List (A : Set) (n : ?) : Set where coinductive hd : {k : ?} ? (n == s k) ??A tl : {k : ?} ? (n == s k) ??List A k (Note that, if you change ? to conatural numbers, then this example becomes more interesting). Indeed. I don?t understand the argument because one could apply the dual trick for inductive types as you say yourself below. These two types are isomorphic via an adjunction. Thus, it does not matter if we make the domain explicit or not, assuming that this is what your question was getting at. For inductive types, we prefer the first version, where dependencies in the codomain of constructors can change, as this simplifies pattern matching. The standard example there would be data Vec (A : Set) : ? ??Set where coinductive [] : Vec A 0 _::_ : A ? {n : ?} ? Vec A n ??List A (s n) vs data Vec (A : Set) (n : ?) :?Set where coinductive [] : {k : ?} ? (n == 0) ??Vec A n _::_ : A ? {k : ?} ? (n == s k) ??Vec A k ??List A n My proposal is that we can should be able to write record List (A : Set) : ? ??Set where coinductive destructor hd : {n : ?} ?? List A (suc n) ?? A tl : {n : ?} ? List A (suc n) ?? List A n That is ?destructor? is an alternative to field which would be still allowed to ensure backwards compatibility. As far as I can see copatternmatching should work nicely and we should be able to write: map : {A B : Set} ? (A ? B) ? {n : ?} ? List A n ? List B n hd (map f x) = f (hd x) tl (map f x) = map f (tl x) There should be no need to abuse any equality types. Thorsten On 01/03/2020 14:19, Thorsten Altenkirch wrote: > Hi, > > > > I am just writing some lecture notes hence I noticed something else. Why > do we have to say coinductive when defining a recursive record, aka a > coinductive type? This seems asymmetric because we don?t have t say > anything when defining a recursive sum (like the natural numbers)? Is > this just a relic from the days that records couldn?t be recursive or is > there a technical reason? > > > > Btw, I really would like to have destructors for coinductive types > (another asymmetry). > > > > Thorsten > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.basold at liacs.leidenuniv.nl Mon Mar 2 10:03:35 2020 From: h.basold at liacs.leidenuniv.nl (Henning Basold) Date: Mon, 2 Mar 2020 10:03:35 +0100 Subject: [Agda] why coinductive? In-Reply-To: <543C947E-B2F9-49E6-9906-1947C9D70F85@nottingham.ac.uk> References: <543C947E-B2F9-49E6-9906-1947C9D70F85@nottingham.ac.uk> Message-ID: Hi Thorsten, On 01/03/2020 22:32, Thorsten Altenkirch wrote: > Hi Henning, > > ? > > ??? I think this is about ?-expansion, which is disabled by default for > > ??? recursive records: > > ??? > https://agda.readthedocs.io/en/v2.5.4/language/record-types.html#eta-expansion > > ??? > > You are right, I forgot. Btw, one could have eta-expansion for sums but > it seems that eta-expansion for records is more popular. > What do you mean by that? That every map f : A + B ??C is of the form ?{in? x ??f (in? x), in? x ??f (in? x)} ? > ? > > ??? Having ? for recursive coinductive types would make definitional > > ??? equality undecidable: https://cronfa.swan.ac.uk/Record/cronfa38822 > > ??? > > ????About the destructors, or rather what I would call observations, > > ? > > I prefer destructors because it is nicely dual to constructors. > I prefer observation because "destructor" sounds, well, destructive ;) That is probably also my C++-trained mind, which expects a destructor to end an object's life! > ? > > this > > ??? asymmetry is there because dependencies in the domain of observations of > > ??? coinductive types usually don't change because people use an explicit > > ??? equality instead. For instance, instead of > > ??? > > ????record List (A : Set) : ? ??Set where > > ??? coinductive > > ????? hd : {n : ?} ??List A (s n) ??A > > ????? tl : {n : ?} ? List A (s n) ??List A n > > ??? > > ????people would write > > ??? > > ????record List (A : Set) (n : ?) : Set where > > ??? coinductive > > ????? hd : {k : ?} ? (n == s k) ??A > > ????? tl : {k : ?} ? (n == s k) ??List A k > > ??? > > ????(Note that, if you change ? to conatural numbers, then this example > > ??? becomes more interesting). > > ? > > Indeed. I don?t understand the argument because one could apply the dual > trick for inductive types as you say yourself below. > I'm not saying that this is the way it should be. In fact, I have previously argued in favour of your suggestion, see for example slide 10 here: https://liacs.leidenuniv.nl/~basoldh/talks/AIM23-talk.pdf > ? > > My proposal is that we can should be able to write > > ? > > record List (A : Set) : ? ??Set where > > ? coinductive > > ? destructor > > ??? hd : {n : ?} ?? List A (suc n) ?? A > > ??? tl : {n : ?} ? List A (suc n) ?? List A n > > ? > > That is ?destructor? is an alternative to field which would be still > allowed to ensure backwards compatibility. > This backwards compatibility option is nice! Although, it should be possible to detect this automatically. Perhaps, as an alternative, we reuse the "codata" declaration, which is doing nothing but record ... where coinductive and allows the declared type to be used in the domain of its observations. > ? > > As far as I can see copatternmatching should work nicely and we should > be able to write: > > ? > > map : {A B : Set} ? (A ? B) ? {n : ?} ? List A n ? List B n > > hd (map f x) = f (hd x) > > tl (map f x) = map f (tl x) > > ? > > There should be no need to abuse any equality types. > Indeed, the equality could be used under the hood. Although, I have to say that one often needs to use bisimilarity rather than equality, see again the slides above. Henning > ? > > Thorsten > > ??? > > ? > > ????On 01/03/2020 14:19, Thorsten Altenkirch wrote: > > ??? > Hi, > > ??? > > > ????>? > > ????> > > ????> I am just writing some lecture notes hence I noticed something > else. Why > > ??? > do we have to say coinductive when defining a recursive record, aka a > > ??? > coinductive type? This seems asymmetric because we don?t have t say > > ??? > anything when defining a recursive sum (like the natural numbers)? Is > > ??? > this just a relic from the days that records couldn?t be recursive > or is > > ??? > there a technical reason? > > ??? > > > ????>? > > ????> > > ????> Btw, I really would like to have destructors for coinductive types > > ???> (another asymmetry). > > ??? > > > ????>? > > ????> > > ????> Thorsten > > ??? > > > ????> This message and any attachment are intended solely for the addressee > > ??? > and may contain confidential information. If you have received this > > ??? > message in error, please contact the sender and delete the email and > > ??? > attachment. > > ????> > > ????> Any views or opinions expressed by the author of this email do not > > ??? > necessarily reflect the views of the University of Nottingham. Email > > ??? > communications with the University of Nottingham may be monitored > > ????> where permitted by law. > > ??? > > > ????> > > ????> > > ????> > > ????> _______________________________________________ > > ??? > Agda mailing list > > ??? > Agda at lists.chalmers.se > > ??? > https://lists.chalmers.se/mailman/listinfo/agda > > ??? > > > ???? > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 2472 bytes Desc: not available URL: From Thorsten.Altenkirch at nottingham.ac.uk Mon Mar 2 11:17:39 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Mon, 2 Mar 2020 10:17:39 +0000 Subject: [Agda] why coinductive? In-Reply-To: References: <543C947E-B2F9-49E6-9906-1947C9D70F85@nottingham.ac.uk> Message-ID: <0ED9EBEB-033D-4814-A02D-38347E6BC067@nottingham.ac.uk> > You are right, I forgot. Btw, one could have eta-expansion for sums but > it seems that eta-expansion for records is more popular. > What do you mean by that? That every map f : A + B ??C is of the form ?{in? x ??f (in? x), in? x ??f (in? x)} ? You need a bit more - see our LICS 2001 paper http://www.cs.nott.ac.uk/~psztxa/publ/lics01.pdf A problem is that eta equality for coproducts is computationally more expensive and it only works for non-empty coproducts. > > Having ? for recursive coinductive types would make definitional > > equality undecidable: https://cronfa.swan.ac.uk/Record/cronfa38822 > > > > About the destructors, or rather what I would call observations, > > > > I prefer destructors because it is nicely dual to constructors. > I prefer observation because "destructor" sounds, well, destructive ;) That is probably also my C++-trained mind, which expects a destructor to end an object's life! Ok, I guess we can discuss this forever but tail : Stream A -> Stream A isn't really an observation. Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From h.basold at liacs.leidenuniv.nl Mon Mar 2 11:37:12 2020 From: h.basold at liacs.leidenuniv.nl (Henning Basold) Date: Mon, 2 Mar 2020 11:37:12 +0100 Subject: [Agda] why coinductive? In-Reply-To: <0ED9EBEB-033D-4814-A02D-38347E6BC067@nottingham.ac.uk> References: <543C947E-B2F9-49E6-9906-1947C9D70F85@nottingham.ac.uk> <0ED9EBEB-033D-4814-A02D-38347E6BC067@nottingham.ac.uk> Message-ID: <650dc453-4fb6-4441-6aa0-39c113e74ed3@liacs.leidenuniv.nl> On 02/03/2020 11:17, Thorsten Altenkirch wrote: > > You are right, I forgot. Btw, one could have eta-expansion for sums but > > it seems that eta-expansion for records is more popular. > > > > What do you mean by that? That every map f : A + B ??C is of the form > ?{in? x ??f (in? x), in? x ??f (in? x)} ? > > You need a bit more - see our LICS 2001 paper > http://www.cs.nott.ac.uk/~psztxa/publ/lics01.pdf > > A problem is that eta equality for coproducts is computationally more expensive and it only works for non-empty coproducts. > I see. Thanks for the reference! > > I prefer observation because "destructor" sounds, well, destructive ;) > That is probably also my C++-trained mind, which expects a destructor to > end an object's life! > > Ok, I guess we can discuss this forever but tail : Stream A -> Stream A isn't really an observation. > I guess, like any naming scheme. However, even in quantum physics one talks about states and observations, even though making an observation has a detrimental effect on a state. Moreover, observations there do not give you the full information to recover the state either. In the end, we will probably just stick to our personal preferences :) Henning > Thorsten -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 2472 bytes Desc: not available URL: From abela at chalmers.se Mon Mar 2 23:57:18 2020 From: abela at chalmers.se (Andreas Abel) Date: Mon, 2 Mar 2020 23:57:18 +0100 Subject: [Agda] PPDP 2020 Call For Papers Message-ID: <500ab6eb-7d6a-589e-c3b3-61b1750d100a@chalmers.se> PPDP 2020 Call For Papers ========================= The 22nd International Symposium on Principles and Practice of Declarative Programming, [PPDP 2020](http://www.cse.chalmers.se/~abel/ppdp20/), held 8-10 September 2020 at the University of Bologna, Italy. TL;DR Abstract deadline: 11 May; paper deadline: 15 May. Scope ----- The PPDP 2020 symposium brings together researchers from the declarative programming communities, including those working in the functional, logic, answer-set, and constraint handling programming paradigms. The goal is to stimulate research in the use of logical formalisms and methods for analyzing, performing, specifying, and reasoning about computations, including mechanisms for concurrency, security, static analysis, and verification. Submissions are invited on all topics related to declarative programming, from principles to practice, from foundations to applications. Topics of interest include, but are not limited to: - Language Design: domain-specific languages; interoperability; concurrency, parallelism and distribution; modules; functional languages; reactive languages; languages with objects; languages for quantum computing; languages inspired by biological and chemical computation; metaprogramming. - Declarative languages in artificial intelligence: logic programming; database languages; knowledge representation languages; probabilistic languages; differentiable languages. - Implementations: abstract machines; interpreters; compilation; compile-time and run-time optimization; memory management. - Foundations: types; logical frameworks; monads and effects; semantics. - Analysis and Transformation: partial evaluation; abstract interpretation; control flow; data flow; information flow; termination analysis; resource analysis; type inference and type checking; verification; validation; debugging; testing. - Tools and Applications: programming and proof environments; verification tools; case studies in proof assistants or interactive theorem provers; certification; novel applications of declarative programming inside and outside of CS; declarative programming pearls; practical experience reports and industrial application; education. The PC chair will be happy to advise on the appropriateness of a topic. PPDP will take place 8-10 September 2020 at the University of Bologna, Italy, co-located with the 29th Int'l Symp. on Logic-Based Program Synthesis and Transformation (LOPSTR 2020) and the International conference on [Microservices 2020](https://www.conf-micro.services/2020/). Submission Categories --------------------- Submissions can be made in three categories: - regular Research Papers, - System Descriptions, and - Experience Reports. Submissions of Research Papers must present original research which is unpublished and not submitted elsewhere. They must not exceed 12 pages ACM style 2-column (including figures, but excluding bibliography). Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Research papers will be judged on originality, significance, correctness, clarity, and readability. Submission of System Descriptions must describe a working system whose description has not been published or submitted elsewhere. They must not exceed 10 pages and should contain a link to a working system. System Descriptions must be marked as such at the time of submission and will be judged on originality, significance, usefulness, clarity, and readability. Submissions of Experience Reports are meant to help create a body of published, refereed, citable evidence where declarative programming such as functional, logic, answer-set, constraint programming, etc., is used in practice. They must not exceed 5 pages **including references**. Experience Reports must be marked as such at the time of submission and need not report original research results. They will be judged on significance, usefulness, clarity, and readability. Possible topics for an Experience Report include, but are not limited to: - insights gained from real-world projects using declarative programming - comparison of declarative programming with conventional programming in the context of an industrial project or a university curriculum - curricular issues encountered when using declarative programming in education - real-world constraints that created special challenges for an implementation of a declarative language or for declarative programming in general - novel use of declarative programming in the classroom - programming pearl that illustrates a nifty new data structure or programming technique. Supplementary material may be provided via a link to an extended version of the submission (recommended), or in a clearly marked appendix beyond the above-mentioned page limits. Reviewers are not required to study extended versions or any material beyond the respective page limit. Material beyond the page limit will not be included in the final published version. Format of a submission ---------------------- For each paper category, you must use the most recent version of the "Current ACM Master Template" which is available at . The most recent version at the time of writing is 1.70. You must use the LaTeX sigconf proceedings template as the conference organizers are unable to process final submissions in other formats. In case of problems with the templates, contact [ACM's TeX support team at Aptara](mailto:acmtexsupport at aptaracorp.com). Authors should note [ACM's statement on author's rights](http://authors.acm.org/) which apply to final papers. Submitted papers should meet the requirements of [ACM's plagiarism policy](http://www.acm.org/publications/policies/plagiarism_policy). Requirements for publication ---------------------------- At least one author of each accepted submission will be expected to attend and present the work at the conference. The PC chair may retract a paper that is not presented. The PC chair may also retract a paper if complaints about the paper's correctness are raised which cannot be resolved by the final paper deadline. Important dates --------------- -------------------------------- ----- ---- ---------- Title and abstract registration: 11 May 2020 (AoE) Paper submission: 15 May 2020 (AoE) Rebuttal period (48 hours): 22-23 June 2020 (AoE) Author notification: 3 July 2020 Final paper version: 24 July 2020 Conference: 8-10 Sept 2020 -------------------------------- ----- ---- ---------- Organization ------------ ------------------------- -------------------- --------------------- Program committee chair: Andreas Abel, Gothenburg University General chair: Maurizio Gabbrielli, University of Bologna Steering committee chair: James Cheney, Edinburgh University ------------------------- -------------------- --------------------- -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From abela at chalmers.se Tue Mar 3 01:19:21 2020 From: abela at chalmers.se (Andreas Abel) Date: Tue, 3 Mar 2020 01:19:21 +0100 Subject: [Agda] PPDP 2020 Call For Papers (corrected link) Message-ID: <28e04a85-aba2-fd9a-9341-e08e82f72895@chalmers.se> PPDP 2020 Call For Papers ========================= The 22nd International Symposium on Principles and Practice of Declarative Programming, [PPDP 2020](http://www.cse.chalmers.se/~abela/ppdp20/), (**corrected**) held 8-10 September 2020 at the University of Bologna, Italy. TL;DR Abstract deadline: 11 May; paper deadline: 15 May. Scope ----- The PPDP 2020 symposium brings together researchers from the declarative programming communities, including those working in the functional, logic, answer-set, and constraint handling programming paradigms. The goal is to stimulate research in the use of logical formalisms and methods for analyzing, performing, specifying, and reasoning about computations, including mechanisms for concurrency, security, static analysis, and verification. Submissions are invited on all topics related to declarative programming, from principles to practice, from foundations to applications. Topics of interest include, but are not limited to: - Language Design: domain-specific languages; interoperability; concurrency, parallelism and distribution; modules; functional languages; reactive languages; languages with objects; languages for quantum computing; languages inspired by biological and chemical computation; metaprogramming. - Declarative languages in artificial intelligence: logic programming; database languages; knowledge representation languages; probabilistic languages; differentiable languages. - Implementations: abstract machines; interpreters; compilation; compile-time and run-time optimization; memory management. - Foundations: types; logical frameworks; monads and effects; semantics. - Analysis and Transformation: partial evaluation; abstract interpretation; control flow; data flow; information flow; termination analysis; resource analysis; type inference and type checking; verification; validation; debugging; testing. - Tools and Applications: programming and proof environments; verification tools; case studies in proof assistants or interactive theorem provers; certification; novel applications of declarative programming inside and outside of CS; declarative programming pearls; practical experience reports and industrial application; education. The PC chair will be happy to advise on the appropriateness of a topic. PPDP will take place 8-10 September 2020 at the University of Bologna, Italy, co-located with the 29th Int'l Symp. on Logic-Based Program Synthesis and Transformation (LOPSTR 2020) and the International conference on [Microservices 2020](https://www.conf-micro.services/2020/). Submission Categories --------------------- Submissions can be made in three categories: - regular Research Papers, - System Descriptions, and - Experience Reports. Submissions of Research Papers must present original research which is unpublished and not submitted elsewhere. They must not exceed 12 pages ACM style 2-column (including figures, but excluding bibliography). Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Research papers will be judged on originality, significance, correctness, clarity, and readability. Submission of System Descriptions must describe a working system whose description has not been published or submitted elsewhere. They must not exceed 10 pages and should contain a link to a working system. System Descriptions must be marked as such at the time of submission and will be judged on originality, significance, usefulness, clarity, and readability. Submissions of Experience Reports are meant to help create a body of published, refereed, citable evidence where declarative programming such as functional, logic, answer-set, constraint programming, etc., is used in practice. They must not exceed 5 pages **including references**. Experience Reports must be marked as such at the time of submission and need not report original research results. They will be judged on significance, usefulness, clarity, and readability. Possible topics for an Experience Report include, but are not limited to: - insights gained from real-world projects using declarative programming - comparison of declarative programming with conventional programming in the context of an industrial project or a university curriculum - curricular issues encountered when using declarative programming in education - real-world constraints that created special challenges for an implementation of a declarative language or for declarative programming in general - novel use of declarative programming in the classroom - programming pearl that illustrates a nifty new data structure or programming technique. Supplementary material may be provided via a link to an extended version of the submission (recommended), or in a clearly marked appendix beyond the above-mentioned page limits. Reviewers are not required to study extended versions or any material beyond the respective page limit. Material beyond the page limit will not be included in the final published version. Format of a submission ---------------------- For each paper category, you must use the most recent version of the "Current ACM Master Template" which is available at . The most recent version at the time of writing is 1.70. You must use the LaTeX sigconf proceedings template as the conference organizers are unable to process final submissions in other formats. In case of problems with the templates, contact [ACM's TeX support team at Aptara](mailto:acmtexsupport at aptaracorp.com). Authors should note [ACM's statement on author's rights](http://authors.acm.org/) which apply to final papers. Submitted papers should meet the requirements of [ACM's plagiarism policy](http://www.acm.org/publications/policies/plagiarism_policy). Requirements for publication ---------------------------- At least one author of each accepted submission will be expected to attend and present the work at the conference. The PC chair may retract a paper that is not presented. The PC chair may also retract a paper if complaints about the paper's correctness are raised which cannot be resolved by the final paper deadline. Important dates --------------- -------------------------------- ----- ---- ---------- Title and abstract registration: 11 May 2020 (AoE) Paper submission: 15 May 2020 (AoE) Rebuttal period (48 hours): 22-23 June 2020 (AoE) Author notification: 3 July 2020 Final paper version: 24 July 2020 Conference: 8-10 Sept 2020 -------------------------------- ----- ---- ---------- Organization ------------ ------------------------- -------------------- --------------------- Program committee chair: Andreas Abel, Gothenburg University General chair: Maurizio Gabbrielli, University of Bologna Steering committee chair: James Cheney, Edinburgh University ------------------------- -------------------- --------------------- -- Andreas Abel Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From jasongross9 at gmail.com Tue Mar 3 20:43:30 2020 From: jasongross9 at gmail.com (Jason Gross) Date: Tue, 3 Mar 2020 14:43:30 -0500 Subject: [Agda] Why dependent type theory? Message-ID: I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it" So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved? I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices. Thanks, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From colin.s.gordon at gmail.com Tue Mar 3 21:45:00 2020 From: colin.s.gordon at gmail.com (Colin Stebbins Gordon) Date: Tue, 3 Mar 2020 15:45:00 -0500 Subject: [Agda] [lean-user] Why dependent type theory? In-Reply-To: References: Message-ID: You might be interested in Lamport and Paulson's "Should Your Specification Language Be Typed?" (https://dl.acm.org/doi/10.1145/319301.319317). Lamport's publications page includes some commentary on how the paper came to be. -Colin On Tue, Mar 3, 2020, 14:44 Jason Gross wrote: > I'm in the process of writing my thesis on proof assistant performance > bottlenecks (with a focus on Coq), and there's a large class of performance > bottlenecks that come from (mis)using the power of dependent types. So in > writing the introduction, I want to provide some justification for the > design decision of using dependent types, rather than, say, set theory or > classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can > come up with are "it's fun" and "lots of people do it" > > So I'm asking these mailing lists: why do we base proof assistants on > dependent type theory? What are the trade-offs involved? > I'm interested both in explanations and arguments given on list, as well > as in references to papers that discuss these sorts of choices. > > Thanks, > Jason > > -- > You received this message because you are subscribed to the Google Groups > "lean-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to lean-user+unsubscribe at googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/lean-user/CAKObCaqa5NZvJvU_ZpZek%2BOnVEOQETiYpisbgJXhPchMn6PLcQ%40mail.gmail.com > > . > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jasongross9 at gmail.com Tue Mar 3 22:31:18 2020 From: jasongross9 at gmail.com (Jason Gross) Date: Tue, 3 Mar 2020 16:31:18 -0500 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: > Which bottlenecks are you referring to? Are they intrinsically tied to dependent types, or they are related to the treatment of propositions and equality in systems such as Coq? The main bottleneck that I'm referring to here (though not the only one of my thesis) is the one that is due to the fact that arbitrary conversion problems can happen during typechecking. This is used to great advantage in proof by reflection (where all of the work is done in checking that a proof of "true = true" has the type "some-check = true"). But it also causes performance issues if you're not careful. To take a toy example, consider two different definitions of factorial: n! = n * (n - 1)!, and n! = (n - 1)! * n. Suppose you have two different ways of computing a vector (length-indexed list) of permutations, one which defines the length in terms of the first factorial, and the other one which defines the length in terms of the second factorial. Suppose you now try to prove that the two methods give the same result on any concrete list of length of length 10. Just to check that this goal is valid, Coq is now trying to compute 10! as a natural number. This example is a bit contrived, but less egregious versions of this issue abound, and when doing verified engineering at scale, these issues can add up in hard-to-predict ways. I have a real-world example where changing the input size just a little bit caused `reflexivity` to take over 400 hours, rather than just a couple of minutes. On Tue, Mar 3, 2020, 16:00 Viktor Kun?ak wrote: > I would be also curious to hear answers to this questions! > ("Lots of people do it" seems like a very compelling answer.) > > Which bottlenecks are you referring to? Are they intrinsically tied to > dependent types, or they are related to the treatment of propositions and > equality in systems such as Coq? > > There are type systems overlayed on top of initially untyped languages > (e.g. the language of Alloy Analyzer) and there are gradual types and > designs like TypeScript for to initially untyped programming languages. > ACL2 theorem prover for pure LISP, SPASS theorem prover for first-order > logic, and "TLA+ model checking made symbolic" model checker for TLA+ all > include techniques to recover types from an initially untyped language. > > Best regards, > > Viktor > > On Tue, Mar 3, 2020 at 8:44 PM Jason Gross wrote: > >> I'm in the process of writing my thesis on proof assistant performance >> bottlenecks (with a focus on Coq), and there's a large class of performance >> bottlenecks that come from (mis)using the power of dependent types. So in >> writing the introduction, I want to provide some justification for the >> design decision of using dependent types, rather than, say, set theory or >> classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can >> come up with are "it's fun" and "lots of people do it" >> >> So I'm asking these mailing lists: why do we base proof assistants on >> dependent type theory? What are the trade-offs involved? >> I'm interested both in explanations and arguments given on list, as well >> as in references to papers that discuss these sorts of choices. >> >> Thanks, >> Jason >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Tue Mar 3 22:38:59 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 3 Mar 2020 22:38:59 +0100 Subject: [Agda] Fwd: [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: (I somehow only replied to coq-club) ---------- Forwarded message --------- From: Jesper Cockx Date: Tue, Mar 3, 2020 at 10:37 PM Subject: Re: [Coq-Club] Why dependent type theory? To: coq-club Club Hi Jason, There's many reasons for me to choose a dependently typed language: - From a philosophical point of view, dependently typed languages are the only kind of language that have been given a meaning explanation (in the sense of Martin-L?f). This is important because it means I can grasp the meaning of each rule/axiom on a fundamental level, something that I never managed for set theory. - From a practical point of view, in a dependently typed language I don't have to learn and use separate languages for writing programs and for writing proofs about them. In fact, by giving the write types to my programs I often do not need to give any proofs at all (i.e. correct-by-construction programming). - Dependent type theory is constructive so I do not have to assume classical principles when I do not need them. - Since expressions at the type level can compute in dependent type theory, there are many equalities that I do not need to reason about explicitly but just hold by definition/computation (although not as many as I would want). As for other interactive theorem provers not based on dependent type theory, such as Isabelle or HOL4, I am mainly jealous of their excellent integration with automated theorem proving tools (e.g. sledgehammer) and their huge mathematical libraries. In a dependently typed languages, it is much harder to get everyone to agree on a definition because there are so many different ways to encode a concept. This has the effect that libraries are a lot more fragmented and everything is done in a more ad-hoc manner. Another weak point of current implementations of dependent type theory is abstraction: you *can* make a definition abstract but that means it becomes an inert lump that stubbornly refuses to compute, so you lose most of the benefits of working with a dependently typed language. But I see these as reasons to continue to improve dependently typed languages rather than to abandon them. -- Jesper On Tue, Mar 3, 2020 at 10:00 PM Viktor Kun?ak wrote: > I would be also curious to hear answers to this questions! > ("Lots of people do it" seems like a very compelling answer.) > > Which bottlenecks are you referring to? Are they intrinsically tied to > dependent types, or they are related to the treatment of propositions and > equality in systems such as Coq? > > There are type systems overlayed on top of initially untyped languages > (e.g. the language of Alloy Analyzer) and there are gradual types and > designs like TypeScript for to initially untyped programming languages. > ACL2 theorem prover for pure LISP, SPASS theorem prover for first-order > logic, and "TLA+ model checking made symbolic" model checker for TLA+ all > include techniques to recover types from an initially untyped language. > > Best regards, > > Viktor > > On Tue, Mar 3, 2020 at 8:44 PM Jason Gross wrote: > >> I'm in the process of writing my thesis on proof assistant performance >> bottlenecks (with a focus on Coq), and there's a large class of performance >> bottlenecks that come from (mis)using the power of dependent types. So in >> writing the introduction, I want to provide some justification for the >> design decision of using dependent types, rather than, say, set theory or >> classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can >> come up with are "it's fun" and "lots of people do it" >> >> So I'm asking these mailing lists: why do we base proof assistants on >> dependent type theory? What are the trade-offs involved? >> I'm interested both in explanations and arguments given on list, as well >> as in references to papers that discuss these sorts of choices. >> >> Thanks, >> Jason >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From psperatto at vera.com.uy Tue Mar 3 22:48:14 2020 From: psperatto at vera.com.uy (Patricia Peratto) Date: Tue, 3 Mar 2020 18:48:14 -0300 (UYT) Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: <447738666.2754527.1583272094298.JavaMail.zimbra@vera.com.uy> In my particular case I have been interested in type theory because allows definitions of primitive recursive functions that are terminating. Regards. ----- Mensaje original ----- De: "Jason Gross" Para: "coq-club" , "agda-list" , "lean-user" , "Coq Discourse" Enviados: Martes, 3 de Marzo 2020 18:31:18 Asunto: Re: [Coq-Club] Why dependent type theory? > Which bottlenecks are you referring to? Are they intrinsically tied to dependent types, or they are related to the treatment of propositions and equality in systems such as Coq? The main bottleneck that I'm referring to here (though not the only one of my thesis) is the one that is due to the fact that arbitrary conversion problems can happen during typechecking. This is used to great advantage in proof by reflection (where all of the work is done in checking that a proof of "true = true" has the type "some-check = true"). But it also causes performance issues if you're not careful. To take a toy example, consider two different definitions of factorial: n! = n * (n - 1)!, and n! = (n - 1)! * n. Suppose you have two different ways of computing a vector (length-indexed list) of permutations, one which defines the length in terms of the first factorial, and the other one which defines the length in terms of the second factorial. Suppose you now try to prove that the two methods give the same result on any concrete list of length of length 10. Just to check that this goal is valid, Coq is now trying to compute 10! as a natural number. This example is a bit contrived, but less egregious versions of this issue abound, and when doing verified engineering at scale, these issues can add up in hard-to-predict ways. I have a real-world example where changing the input size just a little bit caused `reflexivity` to take over 400 hours, rather than just a couple of minutes. On Tue, Mar 3, 2020, 16:00 Viktor Kun?ak < vkuncak at gmail.com > wrote: I would be also curious to hear answers to this questions! ("Lots of people do it" seems like a very compelling answer.) Which bottlenecks are you referring to? Are they intrinsically tied to dependent types, or they are related to the treatment of propositions and equality in systems such as Coq? There are type systems overlayed on top of initially untyped languages (e.g. the language of Alloy Analyzer) and there are gradual types and designs like TypeScript for to initially untyped programming languages. ACL2 theorem prover for pure LISP, SPASS theorem prover for first-order logic, and " TLA+ model checking made symbolic " model checker for TLA+ all include techniques to recover types from an initially untyped language. Best regards, Viktor On Tue, Mar 3, 2020 at 8:44 PM Jason Gross < jasongross9 at gmail.com > wrote:
I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it" So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved? I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices. Thanks, Jason
-------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Tue Mar 3 23:14:14 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 04 Mar 2020 01:14:14 +0300 Subject: [Agda] Why dependent type theory? In-Reply-To: References: Message-ID: <7f3a36d19de9423bdd93da80bb55b3a1@scico.botik.ru> On 2020-03-03 22:43, Jason Gross wrote: > I'm in the process of writing my thesis on proof assistant performance > bottlenecks (with a focus on Coq), and there's a large class of > performance bottlenecks that come from (mis)using the power of > dependent types. So in writing the introduction, I want to provide > some justification for the design decision of using dependent types, > rather than, say, set theory or classical logic (as in, e.g., > Isabelle/HOL). And the only reasons I can come up with are "it's fun" > and "lots of people do it" > > So I'm asking these mailing lists: why do we base proof assistants on > dependent type theory? What are the trade-offs involved? > I'm interested both in explanations and arguments given on list, as > well as in references to papers that discuss these sorts of choices. > For example, mathematicians write: "In any field F there is an inversion operation for a nonzero elements: inv : F\{0} -> F ". With dependent types, the type of inv is expressed as (x : F) -> x /= 0# -> F This type depends on the value x, and this value can change during some computation. And I do not know how to express as a type this mathematical notion. There are many such examples. Also dependent types are good for constructive proofs. For example, consider a theorem "For any prime number p there exists a prime q greater than p". With dependent types, we prove a stronger statement: "This provided below algorithm A takes any prime number p and returns a prime q greater than p". If one cannot invent a constructive proof, but can prove the thing in a classical logic, then one can add the postulate of excluded third and write a classical proof in Agda. Regards, ------ Sergei From steven at steshaw.org Tue Mar 3 23:32:24 2020 From: steven at steshaw.org (Steven Shaw) Date: Wed, 4 Mar 2020 08:32:24 +1000 Subject: [Agda] Why dependent type theory? In-Reply-To: References: Message-ID: I really enjoyed the following video with Thorsten Altenkirch which speaks informally about Type Theory and Set Theory: https://youtu.be/qT8NyyRgLDQ The follow-up video has some further commentary https://youtu.be/SknxggwRPzU . Since you're writing a thesis with a focus on Coq, I'm sure you understand the details. You might enjoy the informal distinctions between Type Theory and Constructive Mathematics vs Set Theory and Classical Logic. I would summarise that Constructive Mathematics (using Type Theory) is better because it provides more confidence in your proofs. Best, Steve. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Tue Mar 3 23:42:50 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 04 Mar 2020 01:42:50 +0300 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> On 2020-03-04 00:31, Jason Gross wrote: >> Which bottlenecks are you referring to? Are they intrinsically tied > to dependent types, or they are related to the treatment of > propositions and equality in systems such as Coq? > > The main bottleneck that I'm referring to here (though not the only > one of my thesis) is the one that is due to the fact that arbitrary > conversion problems can happen during typechecking. This is used to > great advantage in proof by reflection (where all of the work is done > in checking that a proof of "true = true" has the type "some-check = > true"). But it also causes performance issues if you're not careful. > To take a toy example, consider two different definitions of > factorial: n! = n * (n - 1)!, and n! = (n - 1)! * n. Suppose you have > two different ways of computing a vector (length-indexed list) of > permutations, one which defines the length in terms of the first > factorial, and the other one which defines the length in terms of the > second factorial. Suppose you now try to prove that the two methods > give the same result on any concrete list of length of length 10. > Just to check that this goal is valid, Coq is now trying to compute > 10! as a natural number. This example is a bit contrived, but less > egregious versions of this issue abound, and when doing verified > engineering at scale, these issues can add up in hard-to-predict ways. > I have a real-world example where changing the input size just a > little bit caused `reflexivity` to take over 400 hours, rather than > just a couple of minutes. > > On Tue, Mar 3, 2020, 16:00 Viktor Kun?ak wrote: > >> I would be also curious to hear answers to this questions! >> ("Lots of people do it" seems like a very compelling answer.) >> >> Which bottlenecks are you referring to? Are they intrinsically tied >> to dependent types, or they are related to the treatment of >> propositions and equality in systems such as Coq? >> There is a problem of the type checking cost in Agda, and probably in Coq too. I do not know of whether it is fundamental or technical. And I have not seen an answer to this question, so far. On practice, it looks like this: Agda can type-check only a small part of the computer algebra library of methods (with full proofs). With implementing it further, with increasing the hierarchy level of parameterized modules, the type check cost seems to grow exponentially in the level. So, after implementing in Agda an average textbook on computer algebra (where is known a constructive proof for each statement), say, of 500 pages, it will not be type-checked in 100 years. Probably, this is a difficult technical problem that will be practically solved during several years. Regards, ----- Sergei >> There are type systems overlayed on top of initially untyped >> languages (e.g. the language of Alloy Analyzer) and there are >> gradual types and designs like TypeScript for to initially untyped >> programming languages. ACL2 theorem prover for pure LISP, SPASS >> theorem prover for first-order logic, and "TLA+ model checking made >> symbolic" model checker for TLA+ all include techniques to recover >> types from an initially untyped language. >> >> Best regards, >> >> Viktor >> >> On Tue, Mar 3, 2020 at 8:44 PM Jason Gross >> wrote: >> >>> I'm in the process of writing my thesis on proof assistant >>> performance bottlenecks (with a focus on Coq), and there's a large >>> class of performance bottlenecks that come from (mis)using the >>> power of dependent types. So in writing the introduction, I want >>> to provide some justification for the design decision of using >>> dependent types, rather than, say, set theory or classical logic >>> (as in, e.g., Isabelle/HOL). And the only reasons I can come up >>> with are "it's fun" and "lots of people do it" >>> >>> So I'm asking these mailing lists: why do we base proof assistants >>> on dependent type theory? What are the trade-offs involved? >>> I'm interested both in explanations and arguments given on list, >>> as well as in references to papers that discuss these sorts of >>> choices. >>> >>> Thanks, >>> Jason > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From steven at steshaw.org Tue Mar 3 23:43:41 2020 From: steven at steshaw.org (Steven Shaw) Date: Wed, 4 Mar 2020 08:43:41 +1000 Subject: [Agda] Why dependent type theory? In-Reply-To: References: Message-ID: An additional advantage of Type Theory is that it maintains the abstraction barrier, whereas, in Set Theory, you can look inside to see how your mathematical objects are encoded as sets. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Tue Mar 3 23:45:14 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Tue, 3 Mar 2020 22:45:14 +0000 Subject: [Agda] Why dependent type theory? In-Reply-To: References: Message-ID: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> Dependent types are good for pure mathematics (classical or constructive). They are the natural home to define group, ring, metric space, topological space, poset, lattice, category, etc, and study them. Mathematicians that use(d) dependent types include Voevodsky (in Coq) and Kevin Buzzard (in Lean), among others. Kevin and his team defined, in particular, perfectoid spaces in dependent type theory. Martin On 03/03/2020 19:43, jasongross9 at gmail.com wrote: > I'm in the process of writing my thesis on proof assistant performance > bottlenecks (with a focus on Coq), and there's a large class of > performance bottlenecks that come from (mis)using the power of dependent > types.? So in writing the introduction, I want to provide some > justification for the design decision of using dependent types, rather > than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). > And the only reasons I can come up with are "it's fun" and "lots of > people do it" > > So I'm asking these mailing lists: why do we base proof assistants on > dependent type theory?? What are the trade-offs involved? > I'm interested both in explanations and arguments given on list, as well > as in references to papers that discuss these sorts of choices. > > Thanks, > Jason > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From jasongross9 at gmail.com Wed Mar 4 00:04:23 2020 From: jasongross9 at gmail.com (Jason Gross) Date: Tue, 3 Mar 2020 18:04:23 -0500 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> References: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> Message-ID: I'm confused by this. Are you saying that in Agda typechecking is exponential in the number of files? Or exponential in the number of nested abstractions? Or something else? Do you have a toy example demonstrating this behavior? On Tue, Mar 3, 2020, 17:42 wrote: > On 2020-03-04 00:31, Jason Gross wrote: > >> Which bottlenecks are you referring to? Are they intrinsically tied > > to dependent types, or they are related to the treatment of > > propositions and equality in systems such as Coq? > > > > The main bottleneck that I'm referring to here (though not the only > > one of my thesis) is the one that is due to the fact that arbitrary > > conversion problems can happen during typechecking. This is used to > > great advantage in proof by reflection (where all of the work is done > > in checking that a proof of "true = true" has the type "some-check = > > true"). But it also causes performance issues if you're not careful. > > To take a toy example, consider two different definitions of > > factorial: n! = n * (n - 1)!, and n! = (n - 1)! * n. Suppose you have > > two different ways of computing a vector (length-indexed list) of > > permutations, one which defines the length in terms of the first > > factorial, and the other one which defines the length in terms of the > > second factorial. Suppose you now try to prove that the two methods > > give the same result on any concrete list of length of length 10. > > Just to check that this goal is valid, Coq is now trying to compute > > 10! as a natural number. This example is a bit contrived, but less > > egregious versions of this issue abound, and when doing verified > > engineering at scale, these issues can add up in hard-to-predict ways. > > I have a real-world example where changing the input size just a > > little bit caused `reflexivity` to take over 400 hours, rather than > > just a couple of minutes. > > > > On Tue, Mar 3, 2020, 16:00 Viktor Kun?ak wrote: > > > >> I would be also curious to hear answers to this questions! > >> ("Lots of people do it" seems like a very compelling answer.) > >> > >> Which bottlenecks are you referring to? Are they intrinsically tied > >> to dependent types, or they are related to the treatment of > >> propositions and equality in systems such as Coq? > >> > > There is a problem of the type checking cost in Agda, and probably in > Coq too. > I do not know of whether it is fundamental or technical. And I have not > seen an answer to this question, so far. On practice, it looks like > this: > Agda can type-check only a small part of the computer algebra library of > methods (with full proofs). With implementing it further, with > increasing the hierarchy level of parameterized modules, the type > check cost seems to grow exponentially in the level. > So, after implementing in Agda an average textbook on computer algebra > (where is known a constructive proof for each statement), say, of 500 > pages, it will not be type-checked in 100 years. > > Probably, this is a difficult technical problem that will be practically > solved during several years. > > Regards, > > ----- > Sergei > > > > >> There are type systems overlayed on top of initially untyped > >> languages (e.g. the language of Alloy Analyzer) and there are > >> gradual types and designs like TypeScript for to initially untyped > >> programming languages. ACL2 theorem prover for pure LISP, SPASS > >> theorem prover for first-order logic, and "TLA+ model checking made > >> symbolic" model checker for TLA+ all include techniques to recover > >> types from an initially untyped language. > >> > >> Best regards, > >> > >> Viktor > >> > >> On Tue, Mar 3, 2020 at 8:44 PM Jason Gross > >> wrote: > >> > >>> I'm in the process of writing my thesis on proof assistant > >>> performance bottlenecks (with a focus on Coq), and there's a large > >>> class of performance bottlenecks that come from (mis)using the > >>> power of dependent types. So in writing the introduction, I want > >>> to provide some justification for the design decision of using > >>> dependent types, rather than, say, set theory or classical logic > >>> (as in, e.g., Isabelle/HOL). And the only reasons I can come up > >>> with are "it's fun" and "lots of people do it" > >>> > >>> So I'm asking these mailing lists: why do we base proof assistants > >>> on dependent type theory? What are the trade-offs involved? > >>> I'm interested both in explanations and arguments given on list, > >>> as well as in references to papers that discuss these sorts of > >>> choices. > >>> > >>> Thanks, > >>> Jason > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at kenkubota.de Tue Mar 3 22:25:19 2020 From: mail at kenkubota.de (Ken Kubota) Date: Tue, 3 Mar 2020 22:25:19 +0100 Subject: [Agda] Why dependent type theory? In-Reply-To: References: Message-ID: <64FB3287-7E87-4C13-9063-0538A780788D@kenkubota.de> Within type theory certain mathematical ideas can be expressed with dependent types only. In particular, if the type of the result returned by a function depends on the argument, dependent types are required. The example I chose is a function that returns the first unit vector of a given dimension: https://www.owlofminerva.net/files/formulae.pdf#page=12 Let me quote from an earlier email available at https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/bvVem1BZCQAJ : But it is also clear that HOL's type system (and therefore Isabelle/HOL's type system) is poor. Freek Wiedijk on the (current) HOL family: ?There is one important reason why the HOLs are not yet attractive enough to be taken to be the QED system: ? The HOL type system is too poor. As we already argued in the previous section, it is too weak to properly do abstract algebra. But it is worse than that. In the HOL type system there are no dependent types, nor is there any form of subtyping. (Mizar and Coq both have dependent types and some form of subtyping. In Mizar the subtyping is built into the type system. In Coq a similar effect is accomplished through the use of automatic coercions.) For formal mathematics it is essential to both have dependent types and some form of subtyping.? [Wiedijk, 2007, p. 130, emphasis as in the original] https://owlofminerva.net/files/fom_2018.pdf#page=10 For example, in HOL or Isabelle/HOL group theory cannot be expressed naturally (since type abstraction is missing), not even mentioning functions involving dependent types like that returning the first unit vector of a given dimension as mentioned above. Note that there are also formulations of dependent type theory with classical foundations, see: https://owlofminerva.net/files/fom_2018.pdf#page=1 I would consider type theory superior to set theory as type theory is a systematic approach, whereas the axioms of set theory are historically contingent. Kind regards, Ken Kubota ____________________________________________________ Ken Kubota doi.org/10.4444/100 > Am 03.03.2020 um 20:43 schrieb Jason Gross : > > I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it" > > So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved? > I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices. > > Thanks, > Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott.morrison at gmail.com Wed Mar 4 00:41:51 2020 From: scott.morrison at gmail.com (Scott Morrison) Date: Tue, 3 Mar 2020 15:41:51 -0800 Subject: [Agda] [lean-user] Why dependent type theory? In-Reply-To: References: Message-ID: The paper http://home.in.tum.de/~immler/documents/immler2018manifolds.pdf has some interesting discussion of the difficulty they had with the lack of dependent types in setting up the basics of differential geometry in Isabell/HOL: > Following this approach, we avoid the need to define the type R^n > parametrized by a natural number n, which is impossible in Isabelle/HOL?s > simple type theory. Kevin Buzzard makes an interesting challenge at https://xenaproject.wordpress.com/2020/02/09/where-is-the-fashionable-mathematics/ to non-dependently typed theorem provers: > Does this mean that there are entire areas of mathematics which are off > limits to his system? I conjecture yes. Prove me wrong. Can you define the > Picard group of a scheme in Isabelle/HOL? I am not sure that it is even > possible to write this code in Isabelle/HOL in such a way that it will run in > finite time, because you have to take a tensor product of sheaves of modules > to define the multiplication, and a sheaf is a dependent type, and your clever > HOL workarounds will not let you use typeclasses to define module structures > on the modules which are values of the sheaves. (We don't have the Picard group of a scheme in _any_ theorem prover, today, as (far as I'm aware.) I won't say that Lean and Coq "come naturally" to mathematicians (having to learn intricacies such as typeclass resolution, and having 4 or 5 different types of brackets, are not selling points), but even though mathematicians don't officially know anything about type theory, in practice they already understand dependent types very well, but would be horrified to have to do without them. best regards, Scott Morrison On Tue, Mar 3, 2020 at 11:44 AM Jason Gross wrote: > > I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it" > > So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved? > I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices. > > Thanks, > Jason > > -- > You received this message because you are subscribed to the Google Groups "lean-user" group. > To unsubscribe from this group and stop receiving emails from it, send an email to lean-user+unsubscribe at googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/lean-user/CAKObCaqa5NZvJvU_ZpZek%2BOnVEOQETiYpisbgJXhPchMn6PLcQ%40mail.gmail.com. From Thorsten.Altenkirch at nottingham.ac.uk Wed Mar 4 10:42:19 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 4 Mar 2020 09:42:19 +0000 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: First of all I don?t like the word ?dependent type theory?. Dependent types are one important feature of modern Type Theory but hardly the only one. To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example {0,1} \cup {0,1,2,3} = {0,1,2,3} However, if we change the representation of the first set and use lets say {true,false} we get a different result: {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} Unlike \cup, + doesn?t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky?s univalence principle. There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain ?logic for free? and paedagogically helpful since it reduces logical reasoning to programming. There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn?t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this. Thorsten From: "coq-club-request at inria.fr" on behalf of Jason Gross Reply to: "coq-club at inria.fr" Date: Tuesday, 3 March 2020 at 19:44 To: coq-club , agda-list , "coq+miscellaneous at discoursemail.com" , lean-user Subject: [Coq-Club] Why dependent type theory? I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it" So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved? I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices. Thanks, Jason This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Mar 4 12:11:45 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 4 Mar 2020 11:11:45 +0000 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: Good point. However, this is on a different level. While you can replace one object with another that behaves the same this doesn't mean that you can replace one piece of program text with another that produces an object that behaves the same. Clearly replacing program text must be an intensional operation. When you design your software or proof you need to take care that you support the right kind of parametrisation. Having types is essential but it doesn't mean that good design comes for free. As far as the dependency of code from arbitrary implementation choices is concerned I agree that we need to be more flexible about the distinction of strict and definitional equality. Thorsten ?On 04/03/2020, 10:39, "Pierre-Marie P?drot" wrote: On 04/03/2020 10:42, Thorsten Altenkirch wrote: > To me the most important feature of Type Theory is the support of > abstraction in Mathematics and computer science. Using types instead of > sets means that you can hide implementation choices which is essential > if you want to build towers of abstraction. Set theory fails here badly. This is true, but I am also afraid that "dependent type theory" is a regression on that point, compared to, say, ML. Conversion is a fanciful abstraction-breaker that is a well-known source of non-modularity in dependently-typed languages. Worse, there is not even a proper way to abstract over it, except for monstruosities such as Extensional Type Theory, where you throw the baby with the bathwater. The weak type system of ML is a strength in this setting. As long as you don't touch the interface, you can mess with the implementation and it will still compile. (Running properly is another story.) PMP This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From mechvel at scico.botik.ru Wed Mar 4 12:22:14 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 04 Mar 2020 14:22:14 +0300 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: References: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> Message-ID: On 2020-03-04 02:04, Jason Gross wrote: > I'm confused by this. Are you saying that in Agda typechecking is > exponential in the number of files? Or exponential in the number of > nested abstractions? Or something else? Do you have a toy example > demonstrating this behavior? > No toy example, so far, but I think such can be provided. I have a real-world example of the DoCon-A library for algebra: http://www.botik.ru/pub/local/Mechveliani/docon-A/2.02/ This is a small part of the intended general purpose library for algebra (for algebra methods, it is very small, but comparing to the Agda practice, it is large). It is written in install.txt "for the -M15G key (15 Gb heap) installation takes about 50 minutes on a 3 GHz personal computer. " It looks like the type checker has exponential cost in the depth of the tree of the introduced parametric module instances. There is a hierarchy of "classes" (classical abstract structures): Magma, (commutative)Semigroup, (Commutative)Monoid, (Commutative)Group, ... , (Commutative)Ring, Field, IntegralDomain, EuclideanDomain, GCDDomain, LeftModuleOverARing ... -- this tree depth may grow up to, may be, about 25. And there are domain constructors: integer, vector, fraction, polynomial, residueRing ... And these constructors are provided with instances of some of the above abstract structures. These instances include implementation for their needed operations, with proofs. The type checker deals with a hierarchy of such instances. And it performs evaluation (normalization ...) with very large terms representing these instances. For example, the Integer domain has may be 20 instances in it, and this large term is substituted many times on other terms, because almost every domain uses some features of the Integer domain. Anyway there appear internally very large terms that repeat many times, and their embracing terms need to normalize. Further, the domain Vector (EuclideanRingResidue f (Polynomial (Fraction Integer))) (D) is supplied with five instances of Magma, five instances of Semigroup, five instances of CommutativeSemigroup, five instances of Monoid, five instances of CommutativeMonoid, and also many other instances. And the class operations in these instances (and their proofs) are implemented each in its individual way. The number of different instances of the classical operations grows exponentially in the constructor depth for the domains like (D). I do not expect that in mathematical textbooks appear domain constructs as (D) of the level greater than 10. But Agda has practical difficulties with the level of about 4. Because each construct like (D) is further substituted to different parametric modules. Because the method M1 uses one item from (D), so it is implemented in the environment of a parametric program module to which (D) is substituted for a parameter, the method M2 uses another item from (D), and so on. And large subterms get internally copied. In a mathematical textbook, all these substitutions are mentioned or presumed, and are understood by the reader. So the informal "rigorous" proofs fit, say, 200 pages (~ 100 Kb of memory). But when a type checker tries to understand these constructions, it creates many copies of large subterms and spends the cost in normalizing them. And formal proofs take 15 Gb memory to check. First, this copy eagerness can probably be reduced (probably, this is not easy to implement). Second, something can be needed to arrange in the style of the application programs. There is a paper of Coq about this style, I recall A.Mahboubi is among the authors. So, there is a fundamental restriction -- which hopefully can be handled by introducing a certain programming style (I never looked into this). And also there is probably something to fix in the type checker in Agda. Regards, ------ Sergei >> There is a problem of the type checking cost in Agda, and probably >> in Coq too. >> I do not know of whether it is fundamental or technical. And I have >> not seen an answer to this question, so far. On practice, it looks >> like >> this: >> Agda can type-check only a small part of the computer algebra >> library of >> methods (with full proofs). With implementing it further, with >> increasing the hierarchy level of parameterized modules, the type >> check cost seems to grow exponentially in the level. >> So, after implementing in Agda an average textbook on computer >> algebra >> (where is known a constructive proof for each statement), say, of >> 500 pages, it will not be type-checked in 100 years. >> >> Probably, this is a difficult technical problem that will be >> practically solved during several years. From Thorsten.Altenkirch at nottingham.ac.uk Wed Mar 4 12:34:47 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 4 Mar 2020 11:34:47 +0000 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <3d1940aa-aacc-4be0-4bb6-a324d4aecb22@ut.ee> References: <3d1940aa-aacc-4be0-4bb6-a324d4aecb22@ut.ee> Message-ID: First of all there is a difference between ?type theory? and ?Type Theory?. The former refers to the theory of types as used in programming while the latter refers to type theory within the tradition started by Per Martin-Loef, incorporating among others concepts dependent types, universes, inductive types, etc. Now it is correct to say that using capital letters cannot hide the fact that there is more than one instance of Type Theory because it is an evolving concept. However, the same applies to set theory, there are many variants of it and in a discussion you may have to state to which one you refer. However, as for set theory, there are some remarks you can make about ?Type Theory? in general and then it is not necessary to make an exact reference to a particular formal system. In my email I made some general remarks but then referred to univalence which refers to Homotopy Type Theory, again there is more then one formal system but at least it narrows down the scope. Thorsten From: Dominique Unruh Date: Wednesday, 4 March 2020 at 11:25 To: "coq-club at inria.fr" , Thorsten Altenkirch , agda-list , "coq+miscellaneous at discoursemail.com" , lean-user Subject: Re: [Coq-Club] Why dependent type theory? Hi, following up with Thorsten's command about the word "dependent type theory", I would like to add a few observations I had in this discussion: ? I think the word "type theory" itself is unclear in this context. At least several of the emails seem to use different but related ideas of what that means: o It could mean "something where everything has a type" (i.e., not the usual ZF). Then HOL would be type theory. (Thorsten's email quoted below makes sense in that setting because HOL avoids the problem described there.) o It could mean the above with dependent types (but not necessary the Curry-Howard thing from the next item) o It could mean "a system where we use the same language for propositions and proofs via Curry-Howard isomorphism" (I believe this will then also need dependent types since otherwise the proof terms are not powerful enough) o It could mean a system with strong normalization (so that everything terminates), at least some of the answers seem to see this as part of the meaning of "type theory". Of course, there are many interaction between the different concepts, but if we talk about the costs or benefits of adopting type theory, it becomes quite important which aspect of it we are adopting. (E.g., if we have, say, a good reason why we need the second point, and a big cost for getting the four point, then it is important not to just say "type theory has the following good reason and the following cost".) Maybe when discussing *why* type theory, we should prefix our answers by what we mean by type theory (e.g., one of the above). Otherwise it will be very confusing (at least to me). Another question is also the context in which we want to use it: ? Programming (with all the associated things like verification, type checking, etc.) ? Math These have different requirements, so making explicit which domain we are thinking of in our answer might make things clearer as well. Just my personal thoughts, but I hope they may help to add some clarity to the discussion. Best wishes, Dominique. On 3/4/20 11:42 AM, Thorsten Altenkirch wrote: First of all I don?t like the word ?dependent type theory?. Dependent types are one important feature of modern Type Theory but hardly the only one. To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example {0,1} \cup {0,1,2,3} = {0,1,2,3} However, if we change the representation of the first set and use lets say {true,false} we get a different result: {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} Unlike \cup, + doesn?t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky?s univalence principle. There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain ?logic for free? and paedagogically helpful since it reduces logical reasoning to programming. There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn?t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this. Thorsten From: "coq-club-request at inria.fr" on behalf of Jason Gross Reply to: "coq-club at inria.fr" Date: Tuesday, 3 March 2020 at 19:44 To: coq-club , agda-list , "coq+miscellaneous at discoursemail.com" , lean-user Subject: [Coq-Club] Why dependent type theory? I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it" So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved? I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices. Thanks, Jason This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Mar 4 12:49:46 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 4 Mar 2020 11:49:46 +0000 Subject: [Agda] [Coq-Club] Why dependent type theory? (resend) Message-ID: <9591854F-2DA3-4E42-8B1F-8B46016DA1D6@nottingham.ac.uk> First of all there is a difference between ?type theory? and ?Type Theory?. The former refers to the theory of types as used in programming while the latter refers to type theory within the tradition started by Per Martin-Loef, incorporating among others concepts dependent types, universes, inductive types, etc. Now it is correct to say that using capital letters cannot hide the fact that there is more than one instance of Type Theory because it is an evolving concept. However, the same applies to set theory, there are many variants of it and in a discussion you may have to state to which one you refer. However, as for set theory, there are some remarks you can make about ?Type Theory? in general and then it is not necessary to make an exact reference to a particular formal system. In my email I made some general remarks but then referred to univalence which refers to Homotopy Type Theory, again there is more then one formal system but at least it narrows down the scope. Thorsten From: Dominique Unruh Date: Wednesday, 4 March 2020 at 11:25 To: "coq-club at inria.fr" , Thorsten Altenkirch , agda-list , "coq+miscellaneous at discoursemail.com" , lean-user Subject: Re: [Coq-Club] Why dependent type theory? Hi, following up with Thorsten's command about the word "dependent type theory", I would like to add a few observations I had in this discussion: ? I think the word "type theory" itself is unclear in this context. At least several of the emails seem to use different but related ideas of what that means: o It could mean "something where everything has a type" (i.e., not the usual ZF). Then HOL would be type theory. (Thorsten's email quoted below makes sense in that setting because HOL avoids the problem described there.) o It could mean the above with dependent types (but not necessary the Curry-Howard thing from the next item) o It could mean "a system where we use the same language for propositions and proofs via Curry-Howard isomorphism" (I believe this will then also need dependent types since otherwise the proof terms are not powerful enough) o It could mean a system with strong normalization (so that everything terminates), at least some of the answers seem to see this as part of the meaning of "type theory". Of course, there are many interaction between the different concepts, but if we talk about the costs or benefits of adopting type theory, it becomes quite important which aspect of it we are adopting. (E.g., if we have, say, a good reason why we need the second point, and a big cost for getting the four point, then it is important not to just say "type theory has the following good reason and the following cost".) Maybe when discussing *why* type theory, we should prefix our answers by what we mean by type theory (e.g., one of the above). Otherwise it will be very confusing (at least to me). Another question is also the context in which we want to use it: ? Programming (with all the associated things like verification, type checking, etc.) ? Math These have different requirements, so making explicit which domain we are thinking of in our answer might make things clearer as well. Just my personal thoughts, but I hope they may help to add some clarity to the discussion. Best wishes, Dominique. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre-marie.pedrot at inria.fr Wed Mar 4 11:39:14 2020 From: pierre-marie.pedrot at inria.fr (=?UTF-8?Q?Pierre-Marie_P=c3=a9drot?=) Date: Wed, 4 Mar 2020 11:39:14 +0100 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: On 04/03/2020 10:42, Thorsten Altenkirch wrote: > To me the most important feature of Type Theory is the support of > abstraction in Mathematics and computer science. Using? types instead of > sets means that you can hide implementation choices which is essential > if you want to build towers of abstraction. Set theory fails here badly. This is true, but I am also afraid that "dependent type theory" is a regression on that point, compared to, say, ML. Conversion is a fanciful abstraction-breaker that is a well-known source of non-modularity in dependently-typed languages. Worse, there is not even a proper way to abstract over it, except for monstruosities such as Extensional Type Theory, where you throw the baby with the bathwater. The weak type system of ML is a strength in this setting. As long as you don't touch the interface, you can mess with the implementation and it will still compile. (Running properly is another story.) PMP -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From pierre-marie.pedrot at inria.fr Wed Mar 4 11:57:08 2020 From: pierre-marie.pedrot at inria.fr (=?UTF-8?Q?Pierre-Marie_P=c3=a9drot?=) Date: Wed, 4 Mar 2020 11:57:08 +0100 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: On 03/03/2020 22:31, Jason Gross wrote: > The main bottleneck that I'm referring to here (though not the only one > of my thesis) is the one that is due to the fact that arbitrary > conversion problems can happen during typechecking.? This is used to > great advantage in proof by reflection (where all of the work is done in > checking that a proof of "true = true" has the type "some-check = > true").? But it also causes performance issues if you're not careful. Without going fully reflexive, I have been told several times that the computational nature of conversion was actually increasing the performances compared to systems that do not feature it. In particular, the meme-y "proving 2 + 2 = 4 requires on the order of 10? symbols" has some hint of truth in conversionless theories. Computation allows for much more compact proofs, hence more efficient to typecheck. Memory is not free. (Note that I have no empirical proof of that, I am merely conveying hearsay.) Obviously, you can write (almost) arbitrary computations in conversion, but then, I find it somewhat strange to complain about it. You can write superexponential algorithms in C++, but that's not a valid reason to rant against the language. I really wonder why people blame dependently-typed languages instead of their own inefficient programs. PMP -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From unruh at ut.ee Wed Mar 4 12:25:16 2020 From: unruh at ut.ee (Dominique Unruh) Date: Wed, 4 Mar 2020 13:25:16 +0200 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: <3d1940aa-aacc-4be0-4bb6-a324d4aecb22@ut.ee> Hi, following up with Thorsten's command about the word "dependent type theory", I would like to add a few observations I had in this discussion: * I think the word "type theory" itself is unclear in this context. At least several of the emails seem to use different but related ideas of what that means: o It could mean "something where everything has a type" (i.e., not the usual ZF). Then HOL would be type theory. (Thorsten's email quoted below makes sense in that setting because HOL avoids the problem described there.) o It could mean the above with dependent types (but not necessary the Curry-Howard thing from the next item) o It could mean "a system where we use the same language for propositions and proofs via Curry-Howard isomorphism" (I believe this will then also need dependent types since otherwise the proof terms are not powerful enough) o It could mean a system with strong normalization (so that everything terminates), at least some of the answers seem to see this as part of the meaning of "type theory". Of course, there are many interaction between the different concepts, but if we talk about the costs or benefits of adopting type theory, it becomes quite important which aspect of it we are adopting. (E.g., if we have, say, a good reason why we need the second point, and a big cost for getting the four point, then it is important not to just say "type theory has the following good reason and the following cost".) Maybe when discussing *why* type theory, we should prefix our answers by what we mean by type theory (e.g., one of the above). Otherwise it will be very confusing (at least to me). Another question is also the context in which we want to use it: * Programming (with all the associated things like verification, type checking, etc.) * Math These have different requirements, so making explicit which domain we are thinking of in our answer might make things clearer as well. Just my personal thoughts, but I hope they may help to add some clarity to the discussion. Best wishes, Dominique. On 3/4/20 11:42 AM, Thorsten Altenkirch wrote: > > First of all I don?t like the word ?dependent type theory?. Dependent > types are one important feature of modern Type Theory but hardly the > only one. > > To me the most important feature of Type Theory is the support of > abstraction in Mathematics and computer science. Using? types instead > of sets means that you can hide implementation choices which is > essential if you want to build towers of abstraction. Set theory fails > here badly. Just as a very simple example: in set theory you have the > notion of union, so for example > > {0,1} ?\cup {0,1,2,3} = {0,1,2,3} > > However, if we change the representation of the first set and use lets > say {true,false} we get a different result: > > {true , false} ?\cup {0,1,2,3} = {true,false,0,1,2,3} > > This means that \cup exposes implementation details because the > results are not equivalent upto renaming. In Type Theory we have the > notion of sum, sometimes called disjoint union, which is well behaved > > {0,1} ?+ {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} > > {true , false} ?+ {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 > 2,in2 3} > > Unlike \cup, + doesn?t reveal any implementation details it is a > purely structural operation. Having only structural operations means > that everything you do is stable under equivalence, that is you can > replace one object with another one that behaves the same. This is the > essence of Voevodsky?s univalence principle. > > There are other nice aspects of Type Theory. From a constructive point > of view (which should come naturally to a computer scientists) the > proporsitions as types explanation provides a very natural way to > obtain ?logic for free? and paedagogically helpful since it reduces > logical reasoning to programming. > > There are performance issues with implementations of Type Theory, > however, in my experience (mainly agda) the execution of functions at > compile time isn?t one of them. In my experience the main problem is > to deal with a loss of sharing when handling equational constraints > which can blow up the time needed for type checking. I think this is > an engineering problem and there are some suggestions how to fix this. > > Thorsten > > *From: *"coq-club-request at inria.fr" on > behalf of Jason Gross > *Reply to: *"coq-club at inria.fr" > *Date: *Tuesday, 3 March 2020 at 19:44 > *To: *coq-club , agda-list > , "coq+miscellaneous at discoursemail.com" > , lean-user > > *Subject: *[Coq-Club] Why dependent type theory? > > I'm in the process of writing my thesis on proof assistant performance > bottlenecks (with a focus on Coq), and there's a large class of > performance bottlenecks that come from (mis)using the power of > dependent types.? So in writing the introduction, I want to provide > some justification for the design decision of using dependent types, > rather than, say, set theory or classical logic (as in, e.g., > Isabelle/HOL).? And the only reasons I can come up with are "it's fun" > and "lots of people do it" > > So I'm asking these mailing lists: why do we base proof assistants on > dependent type theory?? What are the trade-offs involved? > > I'm interested both in explanations and arguments given on list, as > well as in references to papers that discuss these sorts of choices. > > Thanks, > > Jason > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From avigad at cmu.edu Wed Mar 4 16:59:51 2020 From: avigad at cmu.edu (Jeremy Avigad) Date: Wed, 4 Mar 2020 10:59:51 -0500 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <3d1940aa-aacc-4be0-4bb6-a324d4aecb22@ut.ee> References: <3d1940aa-aacc-4be0-4bb6-a324d4aecb22@ut.ee> Message-ID: Dear all, A long time ago I wrote a mathematician's perspective on why dependent type theory is useful for formalizing mathematics: http://bulletin.eatcs.org/index.php/beatcs/article/view/81 When I wrote it, I was a newbie to DTT, on sabbatical in France working on the formalization of the Feit Thompson theorem. (It was like a school report, "what I did on my sabbatical.") More recently I have given some survey talks along these lines: http://www.andrew.cmu.edu/user/avigad/Talks/fields_type_theory.pdf http://www.andrew.cmu.edu/user/avigad/Talks/san_diego.pdf The first was meant for a general audience of mathematicians and logicians, the second for a general audience of mathematicians. There is also a discussion of DTT starting on slide 40 here, with a nice quotation from a core mathematician, S?bastien Gou?zel: http://www.andrew.cmu.edu/user/avigad/Talks/london.pdf You can still find the quotation on his web page. There is an excellent paper by Kevin Buzzard, Johan Commelin, and Patrick Massot, on formalizing perfectoid spaces: https://arxiv.org/pdf/1910.12320.pdf The last paragraph of the first page addresses the importance of DTT. The short story is that some sort of dependent type theory is useful, and possibly indispensable, for formalizing mathematics. But it also brings a lot of headaches, so it is best to use it judiciously. Mathematics don't care about inductively defined structures beyond the natural numbers, and don't really care much for elaborate forms of induction and recursion. But dealing with all kinds of structures and morphisms between them is absolutely essential, and often these structures depend on parameters. Any reasonable system for formalizing mathematics has to provide mechanisms to support reasoning about them. Best wishes, Jeremy On Wed, Mar 4, 2020 at 6:29 AM Dominique Unruh wrote: > Hi, > > following up with Thorsten's command about the word "dependent type > theory", I would like to add a few observations I had in this discussion: > > - I think the word "type theory" itself is unclear in this context. At > least several of the emails seem to use different but related ideas of what > that means: > - It could mean "something where everything has a type" (i.e., not > the usual ZF). Then HOL would be type theory. (Thorsten's email quoted > below makes sense in that setting because HOL avoids the problem described > there.) > - It could mean the above with dependent types (but not necessary > the Curry-Howard thing from the next item) > - It could mean "a system where we use the same language for > propositions and proofs via Curry-Howard isomorphism" (I believe this will > then also need dependent types since otherwise the proof terms are not > powerful enough) > - It could mean a system with strong normalization (so that > everything terminates), at least some of the answers seem to see this as > part of the meaning of "type theory". > > Of course, there are many interaction between the different concepts, but > if we talk about the costs or benefits of adopting type theory, it becomes > quite important which aspect of it we are adopting. (E.g., if we have, say, > a good reason why we need the second point, and a big cost for getting the > four point, then it is important not to just say "type theory has the > following good reason and the following cost".) > > Maybe when discussing *why* type theory, we should prefix our answers by > what we mean by type theory (e.g., one of the above). Otherwise it will be > very confusing (at least to me). > > Another question is also the context in which we want to use it: > > - Programming (with all the associated things like verification, type > checking, etc.) > - Math > > These have different requirements, so making explicit which domain we are > thinking of in our answer might make things clearer as well. > > Just my personal thoughts, but I hope they may help to add some clarity to > the discussion. > > Best wishes, > Dominique. > > > > On 3/4/20 11:42 AM, Thorsten Altenkirch wrote: > > First of all I don?t like the word ?dependent type theory?. Dependent > types are one important feature of modern Type Theory but hardly the only > one. > > > > To me the most important feature of Type Theory is the support of > abstraction in Mathematics and computer science. Using types instead of > sets means that you can hide implementation choices which is essential if > you want to build towers of abstraction. Set theory fails here badly. Just > as a very simple example: in set theory you have the notion of union, so > for example > > > > {0,1} \cup {0,1,2,3} = {0,1,2,3} > > > > However, if we change the representation of the first set and use lets say > {true,false} we get a different result: > > > > {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} > > > > This means that \cup exposes implementation details because the results > are not equivalent upto renaming. In Type Theory we have the notion of sum, > sometimes called disjoint union, which is well behaved > > > > {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} > > > > {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} > > > > Unlike \cup, + doesn?t reveal any implementation details it is a purely > structural operation. Having only structural operations means that > everything you do is stable under equivalence, that is you can replace one > object with another one that behaves the same. This is the essence of > Voevodsky?s univalence principle. > > > > There are other nice aspects of Type Theory. From a constructive point of > view (which should come naturally to a computer scientists) the > proporsitions as types explanation provides a very natural way to obtain > ?logic for free? and paedagogically helpful since it reduces logical > reasoning to programming. > > > > There are performance issues with implementations of Type Theory, however, > in my experience (mainly agda) the execution of functions at compile time > isn?t one of them. In my experience the main problem is to deal with a loss > of sharing when handling equational constraints which can blow up the time > needed for type checking. I think this is an engineering problem and there > are some suggestions how to fix this. > > > > Thorsten > > > > > > > > *From: *"coq-club-request at inria.fr" > on behalf of > Jason Gross > *Reply to: *"coq-club at inria.fr" > > *Date: *Tuesday, 3 March 2020 at 19:44 > *To: *coq-club , agda-list > , > "coq+miscellaneous at discoursemail.com" > > > , lean-user > > *Subject: *[Coq-Club] Why dependent type theory? > > > > I'm in the process of writing my thesis on proof assistant performance > bottlenecks (with a focus on Coq), and there's a large class of performance > bottlenecks that come from (mis)using the power of dependent types. So in > writing the introduction, I want to provide some justification for the > design decision of using dependent types, rather than, say, set theory or > classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can > come up with are "it's fun" and "lots of people do it" > > > > So I'm asking these mailing lists: why do we base proof assistants on > dependent type theory? What are the trade-offs involved? > > I'm interested both in explanations and arguments given on list, as well > as in references to papers that discuss these sorts of choices. > > > > Thanks, > > Jason > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Wed Mar 4 17:33:23 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 04 Mar 2020 19:33:23 +0300 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <60dc62e6-7888-058a-8e13-fd31e361ed5a@mpi-sws.org> References: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> <60dc62e6-7888-058a-8e13-fd31e361ed5a@mpi-sws.org> Message-ID: On 2020-03-04 19:06, Ralf Jung wrote: > My first guess would that this has something to do with the exponential > blow-up > that I discussed in > . > It looks like this. Following this paper, we can define a direct product of rings, denote it _*_, and put G = Z * Z * Z * Z * Z * Z * Z * Z (I) for the ring Z for Integer. And it may occur that this will be a hard type checking example for Agda. If so, this will be just a toy example, Jason asked for. This needs testing. Thanks, ------ Sergei > > On 04.03.20 00:04, Jason Gross wrote: >> I'm confused by this.? Are you saying that in Agda typechecking is >> exponential >> in the number of files?? Or exponential in the number of nested >> abstractions?? >> Or something else?? Do you have a toy example demonstrating this >> behavior? >> >> On Tue, Mar 3, 2020, 17:42 > > wrote: >> >> On 2020-03-04 00:31, Jason Gross wrote: >> >> Which bottlenecks are you referring to? Are they intrinsically >> tied >> > to dependent types, or they are related to the treatment of >> > propositions and equality in systems such as Coq? >> > >> > The main bottleneck that I'm referring to here (though not the >> only >> > one of my thesis) is the one that is due to the fact that >> arbitrary >> > conversion problems can happen during typechecking.? This is >> used to >> > great advantage in proof by reflection (where all of the work is >> done >> > in checking that a proof of "true = true" has the type >> "some-check = >> > true").? But it also causes performance issues if you're not >> careful. >> > To take a toy example, consider two different definitions of >> > factorial: n! = n * (n - 1)!, and n! = (n - 1)! * n.? Suppose >> you have >> > two different ways of computing a vector (length-indexed list) >> of >> > permutations, one which defines the length in terms of the first >> > factorial, and the other one which defines the length in terms >> of the >> > second factorial.? Suppose you now try to prove that the two >> methods >> > give the same result on any concrete list of length of length >> 10. >> > Just to check that this goal is valid, Coq is now trying to >> compute >> > 10! as a natural number.? This example is a bit contrived, but >> less >> > egregious versions of this issue abound, and when doing verified >> > engineering at scale, these issues can add up in hard-to-predict >> ways. >> >? I have a real-world example where changing the input size just >> a >> > little bit caused `reflexivity` to take over 400 hours, rather >> than >> > just a couple of minutes. >> > >> > On Tue, Mar 3, 2020, 16:00 Viktor Kun?ak > > wrote: >> > >> >> I would be also curious to hear answers to this questions! >> >> ("Lots of people do it" seems like a very compelling answer.) >> >> >> >> Which bottlenecks are you referring to? Are they intrinsically >> tied >> >> to dependent types, or they are related to the treatment of >> >> propositions and equality in systems such as Coq? >> >> >> >> There is a problem of the type checking cost in Agda, and probably >> in >> Coq too. >> I do not know of whether it is fundamental or technical. And I >> have not >> seen an answer to this question, so far. On practice, it looks >> like >> this: >> Agda can type-check only a small part of the computer algebra >> library of >> methods (with full proofs). With implementing it further, with >> increasing the hierarchy level of parameterized modules, the type >> check cost seems to grow exponentially in the level. >> So, after implementing in Agda an average textbook on computer >> algebra >> (where is known a constructive proof for each statement), say, of >> 500 >> pages, it will not be type-checked in 100 years. >> >> Probably, this is a difficult technical problem that will be >> practically >> solved during several years. >> >> Regards, >> >> ----- >> Sergei >> >> >> >> >> There are type systems overlayed on top of initially untyped >> >> languages (e.g. the language of Alloy Analyzer) and there are >> >> gradual types and designs like TypeScript for to initially >> untyped >> >> programming languages. ACL2 theorem prover for pure LISP, SPASS >> >> theorem prover for first-order logic, and "TLA+ model checking >> made >> >> symbolic" model checker for TLA+ all include techniques to >> recover >> >> types from an initially untyped language. >> >> >> >> Best regards, >> >> >> >> Viktor >> >> >> >> On Tue, Mar 3, 2020 at 8:44 PM Jason Gross >> > > >> >> wrote: >> >> >> >>> I'm in the process of writing my thesis on proof assistant >> >>> performance bottlenecks (with a focus on Coq), and there's a >> large >> >>> class of performance bottlenecks that come from (mis)using the >> >>> power of dependent types.? So in writing the introduction, I >> want >> >>> to provide some justification for the design decision of using >> >>> dependent types, rather than, say, set theory or classical >> logic >> >>> (as in, e.g., Isabelle/HOL).? And the only reasons I can come >> up >> >>> with are "it's fun" and "lots of people do it" >> >>> >> >>> So I'm asking these mailing lists: why do we base proof >> assistants >> >>> on dependent type theory?? What are the trade-offs involved? >> >>> I'm interested both in explanations and arguments given on >> list, >> >>> as well as in references to papers that discuss these sorts of >> >>> choices. >> >>> >> >>> Thanks, >> >>> Jason >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> From ulf.norell at gmail.com Wed Mar 4 17:52:59 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 4 Mar 2020 17:52:59 +0100 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> <60dc62e6-7888-058a-8e13-fd31e361ed5a@mpi-sws.org> Message-ID: On Wed, Mar 4, 2020 at 5:33 PM wrote: > > It looks like this. > Following this paper, we can define a direct product of rings, denote it > _*_, > and put > G = Z * Z * Z * Z * Z * Z * Z * Z (I) > > for the ring Z for Integer. > And it may occur that this will be a hard type checking example for > Agda. > This will certainly not be a hard type checking problem for Agda. Depending on how you define _*_ and Z computing with G can of course blow up. / Ulf > On 04.03.20 00:04, Jason Gross wrote: > >> I'm confused by this. Are you saying that in Agda typechecking is > >> exponential > >> in the number of files? Or exponential in the number of nested > >> abstractions? > >> Or something else? Do you have a toy example demonstrating this > >> behavior? > >> > >> On Tue, Mar 3, 2020, 17:42 >> > wrote: > >> > >> On 2020-03-04 00:31, Jason Gross wrote: > >> >> Which bottlenecks are you referring to? Are they intrinsically > >> tied > >> > to dependent types, or they are related to the treatment of > >> > propositions and equality in systems such as Coq? > >> > > >> > The main bottleneck that I'm referring to here (though not the > >> only > >> > one of my thesis) is the one that is due to the fact that > >> arbitrary > >> > conversion problems can happen during typechecking. This is > >> used to > >> > great advantage in proof by reflection (where all of the work is > >> done > >> > in checking that a proof of "true = true" has the type > >> "some-check = > >> > true"). But it also causes performance issues if you're not > >> careful. > >> > To take a toy example, consider two different definitions of > >> > factorial: n! = n * (n - 1)!, and n! = (n - 1)! * n. Suppose > >> you have > >> > two different ways of computing a vector (length-indexed list) > >> of > >> > permutations, one which defines the length in terms of the first > >> > factorial, and the other one which defines the length in terms > >> of the > >> > second factorial. Suppose you now try to prove that the two > >> methods > >> > give the same result on any concrete list of length of length > >> 10. > >> > Just to check that this goal is valid, Coq is now trying to > >> compute > >> > 10! as a natural number. This example is a bit contrived, but > >> less > >> > egregious versions of this issue abound, and when doing verified > >> > engineering at scale, these issues can add up in hard-to-predict > >> ways. > >> > I have a real-world example where changing the input size just > >> a > >> > little bit caused `reflexivity` to take over 400 hours, rather > >> than > >> > just a couple of minutes. > >> > > >> > On Tue, Mar 3, 2020, 16:00 Viktor Kun?ak >> > wrote: > >> > > >> >> I would be also curious to hear answers to this questions! > >> >> ("Lots of people do it" seems like a very compelling answer.) > >> >> > >> >> Which bottlenecks are you referring to? Are they intrinsically > >> tied > >> >> to dependent types, or they are related to the treatment of > >> >> propositions and equality in systems such as Coq? > >> >> > >> > >> There is a problem of the type checking cost in Agda, and probably > >> in > >> Coq too. > >> I do not know of whether it is fundamental or technical. And I > >> have not > >> seen an answer to this question, so far. On practice, it looks > >> like > >> this: > >> Agda can type-check only a small part of the computer algebra > >> library of > >> methods (with full proofs). With implementing it further, with > >> increasing the hierarchy level of parameterized modules, the type > >> check cost seems to grow exponentially in the level. > >> So, after implementing in Agda an average textbook on computer > >> algebra > >> (where is known a constructive proof for each statement), say, of > >> 500 > >> pages, it will not be type-checked in 100 years. > >> > >> Probably, this is a difficult technical problem that will be > >> practically > >> solved during several years. > >> > >> Regards, > >> > >> ----- > >> Sergei > >> > >> > >> > >> >> There are type systems overlayed on top of initially untyped > >> >> languages (e.g. the language of Alloy Analyzer) and there are > >> >> gradual types and designs like TypeScript for to initially > >> untyped > >> >> programming languages. ACL2 theorem prover for pure LISP, SPASS > >> >> theorem prover for first-order logic, and "TLA+ model checking > >> made > >> >> symbolic" model checker for TLA+ all include techniques to > >> recover > >> >> types from an initially untyped language. > >> >> > >> >> Best regards, > >> >> > >> >> Viktor > >> >> > >> >> On Tue, Mar 3, 2020 at 8:44 PM Jason Gross > >> >> > > >> >> wrote: > >> >> > >> >>> I'm in the process of writing my thesis on proof assistant > >> >>> performance bottlenecks (with a focus on Coq), and there's a > >> large > >> >>> class of performance bottlenecks that come from (mis)using the > >> >>> power of dependent types. So in writing the introduction, I > >> want > >> >>> to provide some justification for the design decision of using > >> >>> dependent types, rather than, say, set theory or classical > >> logic > >> >>> (as in, e.g., Isabelle/HOL). And the only reasons I can come > >> up > >> >>> with are "it's fun" and "lots of people do it" > >> >>> > >> >>> So I'm asking these mailing lists: why do we base proof > >> assistants > >> >>> on dependent type theory? What are the trade-offs involved? > >> >>> I'm interested both in explanations and arguments given on > >> list, > >> >>> as well as in references to papers that discuss these sorts of > >> >>> choices. > >> >>> > >> >>> Thanks, > >> >>> Jason > >> > _______________________________________________ > >> > Agda mailing list > >> > Agda at lists.chalmers.se > >> > https://lists.chalmers.se/mailman/listinfo/agda > >> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Wed Mar 4 18:07:41 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 04 Mar 2020 20:07:41 +0300 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: References: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> Message-ID: <48ebb3dac3bf63c71c765591b0b16b4f@scico.botik.ru> On 2020-03-04 14:22, mechvel at scico.botik.ru wrote: > On 2020-03-04 02:04, Jason Gross wrote: >> I'm confused by this. Are you saying that in Agda typechecking is >> exponential in the number of files? Or exponential in the number of >> nested abstractions? Or something else? Do you have a toy example >> demonstrating this behavior? >> > > > No toy example, so far, but I think such can be provided. > > I have a real-world example of the DoCon-A library for algebra: > > http://www.botik.ru/pub/local/Mechveliani/docon-A/2.02/ > > This is a small part of the intended general purpose library for > algebra > (for algebra methods, it is very small, but comparing to the Agda > practice, it is large). > > It is written in install.txt > "for the -M15G key (15 Gb heap) installation takes about 50 minutes > on a > 3 GHz personal computer. > " I am sorry. I need to add the following. This as about the Agda versions of about 2017. It may occur that the current Agda version improves something there. This needs testing, needs more effort in porting the library. I use the last Agda versions, but on certain smaller projects. ------ Sergei > > It looks like the type checker has exponential cost in the depth of > the tree of the > introduced parametric module instances. > > There is a hierarchy of "classes" (classical abstract structures): > Magma, (commutative)Semigroup, (Commutative)Monoid, (Commutative)Group, > ... , > (Commutative)Ring, Field, IntegralDomain, EuclideanDomain, GCDDomain, > LeftModuleOverARing ... > -- this tree depth may grow up to, may be, about 25. > > And there are domain constructors: integer, vector, fraction, > polynomial, residueRing ... > And these constructors are provided with instances of some of the > above abstract structures. > These instances include implementation for their needed operations, > with proofs. > > The type checker deals with a hierarchy of such instances. And it > performs evaluation > (normalization ...) with very large terms representing these instances. > For example, the Integer domain has may be 20 instances in it, and > this large term is > substituted many times on other terms, because almost every domain > uses some features of > the Integer domain. Anyway there appear internally very large terms > that repeat many > times, and their embracing terms need to normalize. > Further, the domain > > Vector (EuclideanRingResidue f (Polynomial (Fraction Integer))) > (D) > > is supplied with five instances of Magma, five instances of Semigroup, > five instances of CommutativeSemigroup, five instances of Monoid, > five instances of CommutativeMonoid, and also many other instances. > And the class operations in these instances (and their proofs) are > implemented > each in its individual way. > The number of different instances of the classical operations grows > exponentially > in the constructor depth for the domains like (D). > > I do not expect that in mathematical textbooks appear domain constructs > as (D) > of the level greater than 10. > But Agda has practical difficulties with the level of about 4. > Because each construct like (D) is further substituted to different > parametric modules. > Because the method M1 uses one item from (D), so it is implemented in > the environment of > a parametric program module to which (D) is substituted for a > parameter, > the method M2 uses another item from (D), and so on. And large > subterms get internally copied. > > In a mathematical textbook, all these substitutions are mentioned or > presumed, and are > understood by the reader. So the informal "rigorous" proofs fit, say, > 200 pages > (~ 100 Kb of memory). > But when a type checker tries to understand these constructions, it > creates many copies of large subterms and spends the cost in > normalizing them. > And formal proofs take 15 Gb memory to check. > > First, this copy eagerness can probably be reduced (probably, this is > not easy to implement). > Second, something can be needed to arrange in the style of the > application programs. > There is a paper of Coq about this style, I recall A.Mahboubi is among > the authors. > > So, there is a fundamental restriction -- which hopefully can be > handled by introducing a certain > programming style (I never looked into this). > And also there is probably something to fix in the type checker in > Agda. From jung at mpi-sws.org Wed Mar 4 17:06:08 2020 From: jung at mpi-sws.org (Ralf Jung) Date: Wed, 4 Mar 2020 17:06:08 +0100 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> Message-ID: <60dc62e6-7888-058a-8e13-fd31e361ed5a@mpi-sws.org> My first guess would that this has something to do with the exponential blow-up that I discussed in . ; Ralf On 04.03.20 00:04, Jason Gross wrote: > I'm confused by this.? Are you saying that in Agda typechecking is exponential > in the number of files?? Or exponential in the number of nested abstractions?? > Or something else?? Do you have a toy example demonstrating this behavior? > > On Tue, Mar 3, 2020, 17:42 > wrote: > > On 2020-03-04 00:31, Jason Gross wrote: > >> Which bottlenecks are you referring to? Are they intrinsically tied > > to dependent types, or they are related to the treatment of > > propositions and equality in systems such as Coq? > > > > The main bottleneck that I'm referring to here (though not the only > > one of my thesis) is the one that is due to the fact that arbitrary > > conversion problems can happen during typechecking.? This is used to > > great advantage in proof by reflection (where all of the work is done > > in checking that a proof of "true = true" has the type "some-check = > > true").? But it also causes performance issues if you're not careful. > > To take a toy example, consider two different definitions of > > factorial: n! = n * (n - 1)!, and n! = (n - 1)! * n.? Suppose you have > > two different ways of computing a vector (length-indexed list) of > > permutations, one which defines the length in terms of the first > > factorial, and the other one which defines the length in terms of the > > second factorial.? Suppose you now try to prove that the two methods > > give the same result on any concrete list of length of length 10. > > Just to check that this goal is valid, Coq is now trying to compute > > 10! as a natural number.? This example is a bit contrived, but less > > egregious versions of this issue abound, and when doing verified > > engineering at scale, these issues can add up in hard-to-predict ways. > >? I have a real-world example where changing the input size just a > > little bit caused `reflexivity` to take over 400 hours, rather than > > just a couple of minutes. > > > > On Tue, Mar 3, 2020, 16:00 Viktor Kun?ak > wrote: > > > >> I would be also curious to hear answers to this questions! > >> ("Lots of people do it" seems like a very compelling answer.) > >> > >> Which bottlenecks are you referring to? Are they intrinsically tied > >> to dependent types, or they are related to the treatment of > >> propositions and equality in systems such as Coq? > >> > > There is a problem of the type checking cost in Agda, and probably in > Coq too. > I do not know of whether it is fundamental or technical. And I have not > seen an answer to this question, so far. On practice, it looks like > this: > Agda can type-check only a small part of the computer algebra library of > methods (with full proofs). With implementing it further, with > increasing the hierarchy level of parameterized modules, the type > check cost seems to grow exponentially in the level. > So, after implementing in Agda an average textbook on computer algebra > (where is known a constructive proof for each statement), say, of 500 > pages, it will not be type-checked in 100 years. > > Probably, this is a difficult technical problem that will be practically > solved during several years. > > Regards, > > ----- > Sergei > > > > >> There are type systems overlayed on top of initially untyped > >> languages (e.g. the language of Alloy Analyzer) and there are > >> gradual types and designs like TypeScript for to initially untyped > >> programming languages. ACL2 theorem prover for pure LISP, SPASS > >> theorem prover for first-order logic, and "TLA+ model checking made > >> symbolic" model checker for TLA+ all include techniques to recover > >> types from an initially untyped language. > >> > >> Best regards, > >> > >> Viktor > >> > >> On Tue, Mar 3, 2020 at 8:44 PM Jason Gross > > >> wrote: > >> > >>> I'm in the process of writing my thesis on proof assistant > >>> performance bottlenecks (with a focus on Coq), and there's a large > >>> class of performance bottlenecks that come from (mis)using the > >>> power of dependent types.? So in writing the introduction, I want > >>> to provide some justification for the design decision of using > >>> dependent types, rather than, say, set theory or classical logic > >>> (as in, e.g., Isabelle/HOL).? And the only reasons I can come up > >>> with are "it's fun" and "lots of people do it" > >>> > >>> So I'm asking these mailing lists: why do we base proof assistants > >>> on dependent type theory?? What are the trade-offs involved? > >>> I'm interested both in explanations and arguments given on list, > >>> as well as in references to papers that discuss these sorts of > >>> choices. > >>> > >>> Thanks, > >>> Jason > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > -- Website: https://people.mpi-sws.org/~jung/ From aldrovandi at math.fsu.edu Wed Mar 4 23:02:40 2020 From: aldrovandi at math.fsu.edu (Ettore Aldrovandi) Date: Wed, 4 Mar 2020 17:02:40 -0500 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: [reposting, alternate ?from:? header] Hi, I think the example below is not mathematically correct. The problem is that \cup is not the same as \sqcup. The latter is of course a coproduct in the category of sets, whereas the former is a push-out, so a colimit of a more complicated diagram. In the line > {0,1} \cup {0,1,2,3} = {0,1,2,3} of course the two sets {0,1} and {0,1,2,3} are not disjoint, whereas in the line > {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} the union is actually disjoint, i.e. a coproduct. In the example with the sum, > {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} > > {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} in the first line {0,1} is actually made disjoint from {0,1,2,3}. To turn this around, suppose you do a push-out {true, false} \coprod_{0,1} {0,1,2,3} where you use the maps f : {0,1} -> {true, false} and i : {0,1} ->{0,1,2,3} . Then, since f is an isomorphism, you get something isomorphic to the union. So, this example doesn?t really show that \cup exposes the implementation. But part of this example becomes possible because in sets we have naively ?disembodied? elements leading to constructions of this sort? ?I guess, I?m just learning this stuff myself. (First post here, actually!) Best, ?Ettore > On Mar 4, 2020, at 04:42, Thorsten Altenkirch > wrote: > > First of all I don?t like the word ?dependent type theory?. Dependent types are one important feature of modern Type Theory but hardly the only one. > > To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example > > {0,1} \cup {0,1,2,3} = {0,1,2,3} > > However, if we change the representation of the first set and use lets say {true,false} we get a different result: > > {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} > > This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved > > {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} > > {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} > > Unlike \cup, + doesn?t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky?s univalence principle. > > There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain ?logic for free? and paedagogically helpful since it reduces logical reasoning to programming. > > There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn?t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this. > > Thorsten > > > > From: "coq-club-request at inria.fr " > on behalf of Jason Gross > > Reply to: "coq-club at inria.fr " > > Date: Tuesday, 3 March 2020 at 19:44 > To: coq-club >, agda-list >, "coq+miscellaneous at discoursemail.com " >, lean-user > > Subject: [Coq-Club] Why dependent type theory? > > I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it" > > So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved? > I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices. > > Thanks, > Jason > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.pagano at gmail.com Thu Mar 5 15:41:49 2020 From: miguel.pagano at gmail.com (Miguel Pagano) Date: Thu, 5 Mar 2020 11:41:49 -0300 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: On Wed, 4 Mar 2020 at 06:42, Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > First of all I don?t like the word ?dependent type theory?. Dependent > types are one important feature of modern Type Theory but hardly the only > one. > > > > To me the most important feature of Type Theory is the support of > abstraction in Mathematics and computer science. Using types instead of > sets means that you can hide implementation choices which is essential if > you want to build towers of abstraction. Set theory fails here badly. > I've been involved in formalizations projects both in Agda and Isabelle/ZF. In my experience in Isabelle/ZF one can hide some implementation details; for instance, one can change the relation used for an inductive proof without affecting the rest of the argument. On the other hand, the lack of types was, at certain points, frustrating: the "typing" information should be stated explicitly as hypotheses on each lemma. One shortcoming in Agda is how to capture classes, as in "classes of models of some equational theory": the issue (it might be my ignorance) is that each concept has a level (there might be more than one level if the construction is interesting) and one can at most "kind" but not type the class of instances of that concept. Best regards, M. -------------- next part -------------- An HTML attachment was scrubbed... URL: From josef.urban at gmail.com Thu Mar 5 09:26:42 2020 From: josef.urban at gmail.com (Josef Urban) Date: Thu, 5 Mar 2020 09:26:42 +0100 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: Message-ID: Chad Brown's FMM'19 keynote discussing "fake theorems" and combining HOL and set theory may be interesting in the context of this thread: http://grid01.ciirc.cvut.cz/~chad/host.pdf . I am biased but I think people should read him more. Best, Josef On Tue, Mar 3, 2020, 20:44 Jason Gross wrote: > I'm in the process of writing my thesis on proof assistant performance > bottlenecks (with a focus on Coq), and there's a large class of performance > bottlenecks that come from (mis)using the power of dependent types. So in > writing the introduction, I want to provide some justification for the > design decision of using dependent types, rather than, say, set theory or > classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can > come up with are "it's fun" and "lots of people do it" > > So I'm asking these mailing lists: why do we base proof assistants on > dependent type theory? What are the trade-offs involved? > I'm interested both in explanations and arguments given on list, as well > as in references to papers that discuss these sorts of choices. > > Thanks, > Jason > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.m.buzzard at gmail.com Thu Mar 5 12:24:45 2020 From: kevin.m.buzzard at gmail.com (Kevin Buzzard) Date: Thu, 5 Mar 2020 11:24:45 +0000 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> Message-ID: On Wed, 4 Mar 2020 at 07:18, Martin Escardo wrote: > Dependent types are good for pure mathematics (classical or > constructive). They are the natural home to define group, ring, metric > space, topological space, poset, lattice, category, etc, and study them. > Mathematicians that use(d) dependent types include Voevodsky (in Coq) > and Kevin Buzzard (in Lean), among others. Kevin and his team defined, > in particular, perfectoid spaces in dependent type theory. Martin > The BCM (Buzzard, Commelin, Massot) paper defined perfectoid spaces in Lean and looking forwards (in the sense of trying to attract "working mathematicians" into the area of formalisation) I think it's an interesting question as to whether this definition could be made in other systems in a way which is actually usable. My guess: I don't see why it couldn't be done in Coq (but of course the type theories of Lean and Coq are similar), although there is a whole bunch of noncomputable stuff embedded in the mathematics. I *suspect* that it would be a real struggle to do it in any of the HOL systems because a sheaf is a dependent type, but these HOL people are good at tricks for working around these things -- personally I would start with seeing whether one can set up a theory of sheaves of modules on a locally ringed space in a HOL system, because that will be the first stumbling block. And as for the HoTT systems, I have no feeling as to whether it is possible to do any serious mathematics other than category theory and synthetic homotopy theory -- my perception is that the user base are more interested in other kinds of questions. In particular, connecting back to the original question, a sheaf of modules on a locally-ringed space is a fundamental concept which shows up in a typical MSc or early PhD level algebraic geometry course (they were in the MSc algebraic geometry course I took), and if one wants to do this kind of mathematics in a theorem prover (and I do, as do several other people in the Lean community) then I *suspect* that it would be hard without dependent types. On the other hand I would love to be proved wrong. Kevin > > On 03/03/2020 19:43, jasongross9 at gmail.com wrote: > > I'm in the process of writing my thesis on proof assistant performance > > bottlenecks (with a focus on Coq), and there's a large class of > > performance bottlenecks that come from (mis)using the power of dependent > > types. So in writing the introduction, I want to provide some > > justification for the design decision of using dependent types, rather > > than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). > > And the only reasons I can come up with are "it's fun" and "lots of > > people do it" > > > > So I'm asking these mailing lists: why do we base proof assistants on > > dependent type theory? What are the trade-offs involved? > > I'm interested both in explanations and arguments given on list, as well > > as in references to papers that discuss these sorts of choices. > > > > Thanks, > > Jason > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Thu Mar 5 16:37:26 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 5 Mar 2020 15:37:26 +0000 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <16D629BB-7416-48D6-8181-415792B75D52@math.fsu.edu> References: <16D629BB-7416-48D6-8181-415792B75D52@math.fsu.edu> Message-ID: <1C1FAF13-1A51-414C-B701-F38B49348A11@nottingham.ac.uk> Hi Ettore, In set theory the union of two sets (written \cup) is the set which contains the elements which are in one set or the other. Hence I cannot see what is ?mathematically incorrect? in my example Cheers, Thorsten From: Ettore Aldrovandi Date: Wednesday, 4 March 2020 at 21:59 To: Thorsten Altenkirch Cc: "coq-club at inria.fr" , agda-list , "coq+miscellaneous at discoursemail.com" , lean-user Subject: Re: [Agda] [Coq-Club] Why dependent type theory? Hi, I think the example below is not mathematically correct. The problem is that \cup is not the same as \sqcup. The latter is of course a coproduct in the category of sets, whereas the former is a push-out, so a colimit of a more complicated diagram. In the line {0,1} \cup {0,1,2,3} = {0,1,2,3} of course the two sets {0,1} and {0,1,2,3} are not disjoint, whereas in the line {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} the union is actually disjoint, i.e. a coproduct. In the example with the sum, {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} in the first line {0,1} is actually made disjoint from {0,1,2,3}. To turn this around, suppose you do a push-out {true, false} \coprod_{0,1} {0,1,2,3} where you use the maps f : {0,1} -> {true, false} and i : {0,1} ->{0,1,2,3} . Then, since f is an isomorphism, you get something isomorphic to the union. So, this example doesn?t really show that \cup exposes the implementation. But part of this example becomes possible because in sets we have naively ?disembodied? elements leading to constructions of this sort? ?I guess, I?m just learning this stuff myself. (First post here, actually!) Best, ?Ettore On Mar 4, 2020, at 04:42, Thorsten Altenkirch > wrote: First of all I don?t like the word ?dependent type theory?. Dependent types are one important feature of modern Type Theory but hardly the only one. To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example {0,1} \cup {0,1,2,3} = {0,1,2,3} However, if we change the representation of the first set and use lets say {true,false} we get a different result: {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} Unlike \cup, + doesn?t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky?s univalence principle. There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain ?logic for free? and paedagogically helpful since it reduces logical reasoning to programming. There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn?t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this. Thorsten From: "coq-club-request at inria.fr" > on behalf of Jason Gross > Reply to: "coq-club at inria.fr" > Date: Tuesday, 3 March 2020 at 19:44 To: coq-club >, agda-list >, "coq+miscellaneous at discoursemail.com" >, lean-user > Subject: [Coq-Club] Why dependent type theory? I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq), and there's a large class of performance bottlenecks that come from (mis)using the power of dependent types. So in writing the introduction, I want to provide some justification for the design decision of using dependent types, rather than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). And the only reasons I can come up with are "it's fun" and "lots of people do it" So I'm asking these mailing lists: why do we base proof assistants on dependent type theory? What are the trade-offs involved? I'm interested both in explanations and arguments given on list, as well as in references to papers that discuss these sorts of choices. Thanks, Jason This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Thu Mar 5 16:39:13 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 5 Mar 2020 15:39:13 +0000 Subject: [Agda] [Coq-Club] Why dependent type theory? Message-ID: <7987BD74-FFAB-4925-83D1-AF6CDDB3BC93@nottingham.ac.uk> Hi Ettore, In set theory the union of two sets (written \cup) is the set which contains the elements which are in one set or the other. Hence I cannot see what is ?mathematically incorrect? in my example Cheers, Thorsten From: Ettore Aldrovandi Date: Wednesday, 4 March 2020 at 21:59 To: Thorsten Altenkirch Cc: "coq-club at inria.fr" , agda-list , "coq+miscellaneous at discoursemail.com" , lean-user Subject: Re: [Agda] [Coq-Club] Why dependent type theory? Hi, I think the example below is not mathematically correct. The problem is that \cup is not the same as \sqcup. The latter is of course a coproduct in the category of sets, whereas the former is a push-out, so a colimit of a more complicated diagram. In the line {0,1} \cup {0,1,2,3} = {0,1,2,3} of course the two sets {0,1} and {0,1,2,3} are not disjoint, whereas in the line {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} the union is actually disjoint, i.e. a coproduct. In the example with the sum, {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} in the first line {0,1} is actually made disjoint from {0,1,2,3}. To turn this around, suppose you do a push-out {true, false} \coprod_{0,1} {0,1,2,3} where you use the maps f : {0,1} -> {true, false} and i : {0,1} ->{0,1,2,3} . Then, since f is an isomorphism, you get something isomorphic to the union. So, this example doesn?t really show that \cup exposes the implementation. But part of this example becomes possible because in sets we have naively ?disembodied? elements leading to constructions of this sort? ?I guess, I?m just learning this stuff myself. (First post here, actually!) Best, ?Ettore On Mar 4, 2020, at 04:42, Thorsten Altenkirch > wrote: First of all I don?t like the word ?dependent type theory?. Dependent types are one important feature of modern Type Theory but hardly the only one. To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example {0,1} \cup {0,1,2,3} = {0,1,2,3} However, if we change the representation of the first set and use lets say {true,false} we get a different result: {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} Unlike \cup, + doesn?t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky?s univalence principle. There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain ?logic for free? and paedagogically helpful since it reduces logical reasoning to programming. There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn?t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this. Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aldrovandi at math.fsu.edu Thu Mar 5 17:31:41 2020 From: aldrovandi at math.fsu.edu (Ettore Aldrovandi) Date: Thu, 5 Mar 2020 11:31:41 -0500 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <7987BD74-FFAB-4925-83D1-AF6CDDB3BC93@nottingham.ac.uk> References: <7987BD74-FFAB-4925-83D1-AF6CDDB3BC93@nottingham.ac.uk> Message-ID: <23E50D98-3FF0-480C-8EA6-D8D8230EF118@math.fsu.edu> Hi Thorsten, of course you are correct about the union of two sets (\cup). What I thought was not correct as an example is the comparison between \cup and +, because those are two different constructions, the latter being a disjoint union, or \sqcup, if we want to use a different notation. I think I agree with the idea that types help hide the implementation, but the example as a whole does not support it because of \cup vs. \sqcup. From a categorical viewpoint, those are different types of colimits. The union, as in the rest of my example, is a colimit along the index category {* <- * -> *}, whereas the disjoint union is a colimit along { * *} . I hope this clarifies it. Sorry for the confusion, ?Ettore > On Mar 5, 2020, at 10:39, Thorsten Altenkirch > wrote: > > Hi Ettore, > > In set theory the union of two sets (written \cup) is the set which contains the elements which are in one set or the other. Hence I cannot see what is ?mathematically incorrect? in my example > > Cheers, > Thorsten > > From: Ettore Aldrovandi > > Date: Wednesday, 4 March 2020 at 21:59 > To: Thorsten Altenkirch > > Cc: "coq-club at inria.fr " >, agda-list >, "coq+miscellaneous at discoursemail.com " >, lean-user > > Subject: Re: [Agda] [Coq-Club] Why dependent type theory? > > Hi, > > I think the example below is not mathematically correct. The problem is that \cup is not the same as \sqcup. The latter is of course a coproduct in the category of sets, whereas the former is a push-out, so a colimit of a more complicated diagram. In the line > >> {0,1} \cup {0,1,2,3} = {0,1,2,3} > > of course the two sets {0,1} and {0,1,2,3} are not disjoint, whereas in the line > >> {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} > > the union is actually disjoint, i.e. a coproduct. In the example with the sum, > >> {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} >> >> {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} > > in the first line {0,1} is actually made disjoint from {0,1,2,3}. To turn this around, suppose you do a push-out > > {true, false} \coprod_{0,1} {0,1,2,3} > > where you use the maps f : {0,1} -> {true, false} and i : {0,1} ->{0,1,2,3} . Then, since f is an isomorphism, you get something isomorphic to the union. > > So, this example doesn?t really show that \cup exposes the implementation. But part of this example becomes possible because in sets we have naively ?disembodied? elements leading to constructions of this sort? > > ?I guess, I?m just learning this stuff myself. (First post here, actually!) > > Best, > > ?Ettore > > >> On Mar 4, 2020, at 04:42, Thorsten Altenkirch > wrote: >> >> First of all I don?t like the word ?dependent type theory?. Dependent types are one important feature of modern Type Theory but hardly the only one. >> >> To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example >> >> {0,1} \cup {0,1,2,3} = {0,1,2,3} >> >> However, if we change the representation of the first set and use lets say {true,false} we get a different result: >> >> {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} >> >> This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved >> >> {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} >> >> {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} >> >> Unlike \cup, + doesn?t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky?s univalence principle. >> >> There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain ?logic for free? and paedagogically helpful since it reduces logical reasoning to programming. >> >> There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn?t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this. >> >> Thorsten > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Thu Mar 5 21:01:02 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 5 Mar 2020 20:01:02 +0000 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <6CAEAF50-5464-45FE-8627-13DDFDA616A4@math.fsu.edu> References: <7987BD74-FFAB-4925-83D1-AF6CDDB3BC93@nottingham.ac.uk>, <6CAEAF50-5464-45FE-8627-13DDFDA616A4@math.fsu.edu> Message-ID: <0396F54A-C5A8-48A6-8375-D7DB08FAB1FF@exmail.nottingham.ac.uk> Hi Ettore, We can look at both operations in the context of set theory. The sum is just the disjoint union ie A+B = { (0,a) | a \in A } \cup { (1,b) | b \in B } Now + preserves isomorphism of sets but \cup doesn?t. Hence in set theory we have both structural operations and non-structural ones while in Type Theory all operations are structural, ie preserve isomorphisms. Thorsten Sent from my iPhone On 5 Mar 2020, at 16:32, Ettore Aldrovandi wrote: ? Hi Thorsten, of course you are correct about the union of two sets (\cup). What I thought was not correct as an example is the comparison between \cup and +, because those are two different constructions, the latter being a disjoint union, or \sqcup, if we want to use a different notation. I think I agree with the idea that types help hide the implementation, but the example as a whole does not support it because of \cup vs. \sqcup. From a categorical viewpoint, those are different types of colimits. The union, as in the rest of my example, is a colimit along the index category {* <- * -> *}, whereas the disjoint union is a colimit along { * *} . I hope this clarifies it. Sorry for the confusion, ?Ettore On Mar 5, 2020, at 10:39, Thorsten Altenkirch > wrote: Hi Ettore, In set theory the union of two sets (written \cup) is the set which contains the elements which are in one set or the other. Hence I cannot see what is ?mathematically incorrect? in my example Cheers, Thorsten From: Ettore Aldrovandi > Date: Wednesday, 4 March 2020 at 21:59 To: Thorsten Altenkirch > Cc: "coq-club at inria.fr" >, agda-list >, "coq+miscellaneous at discoursemail.com" >, lean-user > Subject: Re: [Agda] [Coq-Club] Why dependent type theory? Hi, I think the example below is not mathematically correct. The problem is that \cup is not the same as \sqcup. The latter is of course a coproduct in the category of sets, whereas the former is a push-out, so a colimit of a more complicated diagram. In the line {0,1} \cup {0,1,2,3} = {0,1,2,3} of course the two sets {0,1} and {0,1,2,3} are not disjoint, whereas in the line {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} the union is actually disjoint, i.e. a coproduct. In the example with the sum, {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} in the first line {0,1} is actually made disjoint from {0,1,2,3}. To turn this around, suppose you do a push-out {true, false} \coprod_{0,1} {0,1,2,3} where you use the maps f : {0,1} -> {true, false} and i : {0,1} ->{0,1,2,3} . Then, since f is an isomorphism, you get something isomorphic to the union. So, this example doesn?t really show that \cup exposes the implementation. But part of this example becomes possible because in sets we have naively ?disembodied? elements leading to constructions of this sort? ?I guess, I?m just learning this stuff myself. (First post here, actually!) Best, ?Ettore On Mar 4, 2020, at 04:42, Thorsten Altenkirch > wrote: First of all I don?t like the word ?dependent type theory?. Dependent types are one important feature of modern Type Theory but hardly the only one. To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example {0,1} \cup {0,1,2,3} = {0,1,2,3} However, if we change the representation of the first set and use lets say {true,false} we get a different result: {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} Unlike \cup, + doesn?t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky?s univalence principle. There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain ?logic for free? and paedagogically helpful since it reduces logical reasoning to programming. There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn?t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this. Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.mckinna at ed.ac.uk Fri Mar 6 18:39:49 2020 From: james.mckinna at ed.ac.uk (James McKinna) Date: Fri, 06 Mar 2020 17:39:49 +0000 Subject: [Agda] Why dependent type theory? In-Reply-To: References: Message-ID: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> Jason Gross, on Tue, 03 Mar 2020, you wrote: > So I'm asking these mailing lists: why do we base proof assistants on > dependent type theory? What are the trade-offs involved? > I'm interested both in explanations and arguments given on list, as well as > in references to papers that discuss these sorts of choices. Jason, With apologies to Richard Hamilton, to paraphrase your question: "just what is it about dependent type theory which makes today's proof assistants so different, so appealing?" (*) It's a great question, and lots of people, quite naturally, have replied with lots of competing/overlapping answers. I'd like to open out the discussion a bit, conscious that in doing so, Jeremy or others may wish to pull rank on history/philosophy of mathematics/science..., and aware that it might not find favour with all readers of these lists. TL:DR: -- the Kolmogorov (1931) 'Aufgabe' interpretation of intuitionistic logic (**), predating 'formulae-as-types' by 30--40 years; -- times (and Kuhnian paradigms) change; so does mathematics, and with it, mathematicians (or perhaps better: vice versa); with apologies to the Wiener Secession (***), "Der Zeit, ihre Mathematik; der Mathematik, ihre Freiheit"; -- what is a proof assistant for, anyway? if you ask that question, you might find how/why the answer biases towards (or away from!) a particular foundation; -- what is it about dependent type theory, anyway? Thorsten and Jeremy, among others, have made excellent points in this regard: the benefits of parametrised/indexed typing, type inference (esp. wrt implicit arguments, and (algebraic) structure), to which I would add: the analysis of equality, the distinction between theorem-proving for well-formedness vs. 'salient' proofs, and the observation that (although nowhere does it seem that de Bruijn actually ever said this in the collected Automath) "the ordinary language of mathematics is intrinsically dependently typed"; -- with a nod to Freek and Josef, "what might it be about (Tarski-Grothendieck) set theory which makes yesterday's proof assistant (Mizar), or tomorrow's (Egal) so appealing?" In particular, the ability of each those systems to support the kind of fine-grained typing supported by "type-theory-based proof assistants", simultaneously with set-theoretic/uni-typed foundations... More anon, I hope, James McKinna (*)https://en.wikipedia.org/wiki/Just_what_is_it_that_makes_today%27s_homes_so_different,_so_appealing%3F (**)http://homepages.inf.ed.ac.uk/jmckinna/kolmogorov-1932.pdf (***)https://en.wikipedia.org/wiki/Vienna_Secession -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From mechvel at scico.botik.ru Fri Mar 6 20:40:28 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 06 Mar 2020 22:40:28 +0300 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: <48ebb3dac3bf63c71c765591b0b16b4f@scico.botik.ru> References: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> <48ebb3dac3bf63c71c765591b0b16b4f@scico.botik.ru> Message-ID: <20821adde09c1708487653e1cb064441@scico.botik.ru> Continuing a sub-discussion about the type check performance, I add that I have tried now the current Development Agda version (March 5, 2020). I compare it to the last official version of 2.6.0.1 at a certain BFLib project (Binary Integer + General Fraction arithmetcic). This library is may be 5 times smaller than DoCon-A, but it is large in comparison to usual Agda application practice. It is applied > time agda $agdaLibOpt BRationalTest.agda +RTS -M -RTS (on ghc-8.8.3, Ubuntu Linux 18.04, 3 GHz personal computer) which type-checks everything in the given memory space. Development Agda type-checks it in the minimum of 1400 Mb memory, it is about 1.5 times less space eager and 20% faster. This gives a certain hope, assuming that 2.6.0.1 probably wins something relatively to the versions of 2017. This needs testing and effort in upgrading DoCon-A. Regards, ------ Sergei On 2020-03-04 20:07, mechvel at scico.botik.ru wrote: > On 2020-03-04 14:22, mechvel at scico.botik.ru wrote: >> On 2020-03-04 02:04, Jason Gross wrote: >>> I'm confused by this. Are you saying that in Agda typechecking is >>> exponential in the number of files? Or exponential in the number of >>> nested abstractions? Or something else? Do you have a toy example >>> demonstrating this behavior? >>> >> >> No toy example, so far, but I think such can be provided. >> >> I have a real-world example of the DoCon-A library for algebra: >> >> http://www.botik.ru/pub/local/Mechveliani/docon-A/2.02/ >> >> This is a small part of the intended general purpose library for >> algebra >> (for algebra methods, it is very small, but comparing to the Agda >> practice, it is large). >> >> It is written in install.txt >> "for the -M15G key (15 Gb heap) installation takes about 50 minutes >> on a >> 3 GHz personal computer. >> " > > > I am sorry. > > I need to add the following. > This as about the Agda versions of about 2017. > > It may occur that the current Agda version improves something there. > This needs testing, needs more effort in porting the library. > I use the last Agda versions, but on certain smaller projects. > From joey.eremondi at gmail.com Fri Mar 6 21:00:06 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Fri, 6 Mar 2020 12:00:06 -0800 Subject: [Agda] What to do when Rewrite fails? Message-ID: I'm in a situation where I'm using "agda --without k", and I'm working with a with decidable equality. In my proofs, a bunch of normalizations are stuck on "decEq i i". I have a proof of the form "uipDec : \forall i -> decEq i i \equiv yes refl", but when I try to "rewrite uipDec", I get: decEq i i != lhs of type Dec (i ? i) when checking that the type decEq i i != lhs of type Dec (i ? i) when checking that the type ... of the generated with function is well-formed I'm wondering, is there a way to manually do the rewrite? The problem is that "decEq i i" doesn't actually appear in the type, it's just what the evaluation gets stuck on, so I don't think I can use subst. Basically, other than rewrite (which is failing), I don't know how to tell Agda the value of a term that normalization is stuck on. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Fri Mar 6 22:05:04 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 6 Mar 2020 21:05:04 +0000 Subject: [Agda] Why dependent type theory? In-Reply-To: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> Message-ID: <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> The troubling aspect of proof assistants is that they not only implement proof checking (and definition checking, construction checking etc.) but that also that each of them proposes a new foundation of mathematics. Which is sometimes not precisely specified, as it is the case of e.g. Agda. (Which is why I, as an Agda user, I confine myself to a well-understood subset of Agda corresponding to a (particular) well-understood type theory. For mathematically minded users of proof assistants, like myself, this is a problem. We are not interested in formal proofs per se. We are interested in what we are talking about, with rigorously stated assumptions about our universe of discourse. Best, Martin On 06/03/2020 17:39, James McKinna wrote: > Jason Gross, on Tue, 03 Mar 2020, you wrote: > >> So I'm asking these mailing lists: why do we base proof assistants on >> dependent type theory?? What are the trade-offs involved? >> I'm interested both in explanations and arguments given on list, as >> well as >> in references to papers that discuss these sorts of choices. > > Jason, > > With apologies to Richard Hamilton, to paraphrase your question: > > ? "just what is it about dependent type theory which makes today's > proof assistants so different, so appealing?" (*) > > It's a great question, and lots of people, quite naturally, have replied > with lots of competing/overlapping answers. I'd like to open out the > discussion a bit, conscious that in doing so, Jeremy or others may wish > to pull rank on history/philosophy of mathematics/science..., and aware > that it might not find favour with all readers of these lists. > > TL:DR: > > -- the Kolmogorov (1931) 'Aufgabe' interpretation of intuitionistic > logic (**), predating 'formulae-as-types' by 30--40 years; > > -- times (and Kuhnian paradigms) change; so does mathematics, and with > it, mathematicians (or perhaps better: vice versa); with apologies to > the Wiener Secession (***), "Der Zeit, ihre Mathematik; der Mathematik, > ihre Freiheit"; > > -- what is a proof assistant for, anyway? if you ask that question, you > might find how/why the answer biases towards (or away from!) a > particular foundation; > > -- what is it about dependent type theory, anyway? Thorsten and Jeremy, > among others, have made excellent points in this regard: the benefits of > parametrised/indexed typing, type inference (esp. wrt implicit > arguments, and (algebraic) structure), to which I would add: the > analysis of equality, the distinction between theorem-proving for > well-formedness vs. 'salient' proofs, and the observation that (although > nowhere does it seem that de Bruijn actually ever said this in the > collected Automath) "the ordinary language of mathematics is > intrinsically dependently typed"; > > -- with a nod to Freek and Josef, "what might it be about > (Tarski-Grothendieck) set theory which makes yesterday's proof assistant > (Mizar), or tomorrow's (Egal) so appealing?" In particular, the ability > of each those systems to support the kind of fine-grained typing > supported by "type-theory-based proof assistants", simultaneously with > set-theoretic/uni-typed foundations... > > More anon, I hope, > > James McKinna > > (*)https://en.wikipedia.org/wiki/Just_what_is_it_that_makes_today%27s_homes_so_different,_so_appealing%3F > > > (**)http://homepages.inf.ed.ac.uk/jmckinna/kolmogorov-1932.pdf > > (***)https://en.wikipedia.org/wiki/Vienna_Secession > > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From m.escardo at cs.bham.ac.uk Fri Mar 6 22:38:44 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 6 Mar 2020 21:38:44 +0000 Subject: [Agda] Why dependent type theory? In-Reply-To: <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> Message-ID: <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> In other words, choose your proof assistant as a function of what you want to talk about *and* how you want to talk about it. Martin On 06/03/2020 21:05, Martin Escardo wrote: > The troubling aspect of proof assistants is that they not only implement > proof checking (and definition checking, construction checking etc.) but > that also that each of them proposes a new foundation of mathematics. > > Which is sometimes not precisely specified, as it is the case of e.g. > Agda. (Which is why I, as an Agda user, I confine myself to a > well-understood subset of Agda corresponding to a (particular) > well-understood type theory. > > For mathematically minded users of proof assistants, like myself, this > is a problem. We are not interested in formal proofs per se. We are > interested in what we are talking about, with rigorously stated > assumptions about our universe of discourse. > > Best, > Martin > > On 06/03/2020 17:39, James McKinna wrote: >> Jason Gross, on Tue, 03 Mar 2020, you wrote: >> >>> So I'm asking these mailing lists: why do we base proof assistants on >>> dependent type theory?? What are the trade-offs involved? >>> I'm interested both in explanations and arguments given on list, as >>> well as >>> in references to papers that discuss these sorts of choices. >> >> Jason, >> >> With apologies to Richard Hamilton, to paraphrase your question: >> >> ?? "just what is it about dependent type theory which makes today's >> proof assistants so different, so appealing?" (*) >> >> It's a great question, and lots of people, quite naturally, have >> replied with lots of competing/overlapping answers. I'd like to open >> out the discussion a bit, conscious that in doing so, Jeremy or others >> may wish to pull rank on history/philosophy of mathematics/science..., >> and aware that it might not find favour with all readers of these lists. >> >> TL:DR: >> >> -- the Kolmogorov (1931) 'Aufgabe' interpretation of intuitionistic >> logic (**), predating 'formulae-as-types' by 30--40 years; >> >> -- times (and Kuhnian paradigms) change; so does mathematics, and with >> it, mathematicians (or perhaps better: vice versa); with apologies to >> the Wiener Secession (***), "Der Zeit, ihre Mathematik; der >> Mathematik, ihre Freiheit"; >> >> -- what is a proof assistant for, anyway? if you ask that question, >> you might find how/why the answer biases towards (or away from!) a >> particular foundation; >> >> -- what is it about dependent type theory, anyway? Thorsten and >> Jeremy, among others, have made excellent points in this regard: the >> benefits of parametrised/indexed typing, type inference (esp. wrt >> implicit arguments, and (algebraic) structure), to which I would add: >> the analysis of equality, the distinction between theorem-proving for >> well-formedness vs. 'salient' proofs, and the observation that >> (although nowhere does it seem that de Bruijn actually ever said this >> in the collected Automath) "the ordinary language of mathematics is >> intrinsically dependently typed"; >> >> -- with a nod to Freek and Josef, "what might it be about >> (Tarski-Grothendieck) set theory which makes yesterday's proof >> assistant (Mizar), or tomorrow's (Egal) so appealing?" In particular, >> the ability of each those systems to support the kind of fine-grained >> typing supported by "type-theory-based proof assistants", >> simultaneously with set-theoretic/uni-typed foundations... >> >> More anon, I hope, >> >> James McKinna >> >> (*)https://en.wikipedia.org/wiki/Just_what_is_it_that_makes_today%27s_homes_so_different,_so_appealing%3F >> >> >> (**)http://homepages.inf.ed.ac.uk/jmckinna/kolmogorov-1932.pdf >> >> (***)https://en.wikipedia.org/wiki/Vienna_Secession >> >> > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From nad at cse.gu.se Fri Mar 6 22:39:13 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 6 Mar 2020 22:39:13 +0100 Subject: [Agda] What to do when Rewrite fails? In-Reply-To: References: Message-ID: On 2020-03-06 21:00, Joey Eremondi wrote: > I'm wondering, is there a way to manually do the rewrite? The problem > is that "decEq i i" doesn't actually appear in the type, it's just > what the evaluation gets stuck on, so I don't think I can use subst. > Basically, other than rewrite (which is failing), I don't know how to > tell Agda the value of a term that normalization is stuck on. If you could show us a (preferably small) self-contained piece of code, then it might be easier to help you. -- /NAD From fdhzs2010 at hotmail.com Sat Mar 7 02:21:22 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Sat, 7 Mar 2020 01:21:22 +0000 Subject: [Agda] add to the Agda group on Github Message-ID: Hi, It seems I don't have the permission to manage agda-categories library. Is that because I am not in the agda github group? I am not sure who to contact. could someone who has the authority add me to the group? Thanks, Jason Hu https://hustmphrrr.github.io/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Sat Mar 7 08:52:35 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Sat, 7 Mar 2020 08:52:35 +0100 Subject: [Agda] add to the Agda group on Github In-Reply-To: References: Message-ID: I've invited you. / Ulf On Sat, Mar 7, 2020 at 2:21 AM Jason -Zhong Sheng- Hu wrote: > Hi, > > It seems I don't have the permission to manage agda-categories library. Is > that because I am not in the agda github group? I am not sure who to > contact. could someone who has the authority add me to the group? > > *Thanks,* > *Jason Hu* > *https://hustmphrrr.github.io/ * > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Sat Mar 7 14:30:54 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 07 Mar 2020 16:30:54 +0300 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: <20821adde09c1708487653e1cb064441@scico.botik.ru> References: <8a0bb76a9ec254704f9eb268b1531ce0@scico.botik.ru> <48ebb3dac3bf63c71c765591b0b16b4f@scico.botik.ru> <20821adde09c1708487653e1cb064441@scico.botik.ru> Message-ID: <2cd3c9fedcea17e0cbd0c26c5bbb964c@scico.botik.ru> I tried an example with the direct product of many domains. It fails to "break" the Agda type checker (Development of March 5, 2020). This was --------------------------------------------------------- R? = (?? ?? (?? ?? (?? ?? (??? ?? (??? ?? ??))))) ?? ?? R = R? ?? R? open Semiring R using (Carrier; _?_; refl; 1#; *-monoid) open Monoid-theory *-monoid using (_^_) open Semiring-theory R using (sum; from?) res : Carrier res = (sum (1# ? 1# ? [])) ^ 3 theorem : res ? from? 8 theorem = refl {res} --------------------------------------------------------- It uses the semirings of ?, ?, ?? (binary natural), ?? (binary integer), ?? (fraction over Integer). This Test.agda is type-checked within the same minimum of 1 Gb space and in almost the same time (provided that all other needed modules of the applied and standard libraries are type-checked) almost independently on the number of the domains in the expression for R?. The domains in the direct product are too independent ... -- Sergei On 2020-03-06 22:40, mechvel at scico.botik.ru wrote: > Continuing a sub-discussion about the type check performance, > > I add that I have tried now the current Development Agda version > (March 5, 2020). > > I compare it to the last official version of 2.6.0.1 > at a certain BFLib project (Binary Integer + General Fraction > arithmetcic). > This library is may be 5 times smaller than DoCon-A, but it is large > in comparison to > usual Agda application practice. > > It is applied > > time agda $agdaLibOpt BRationalTest.agda +RTS -M -RTS > > (on ghc-8.8.3, Ubuntu Linux 18.04, 3 GHz personal computer) > > which type-checks everything in the given memory space. > Development Agda type-checks it in the minimum of 1400 Mb memory, > it is about 1.5 times less space eager and 20% faster. > > This gives a certain hope, assuming that 2.6.0.1 probably wins > something relatively to > the versions of 2017. > This needs testing and effort in upgrading DoCon-A. > > Regards, > > ------ > Sergei > > > > On 2020-03-04 20:07, mechvel at scico.botik.ru wrote: >> On 2020-03-04 14:22, mechvel at scico.botik.ru wrote: >>> On 2020-03-04 02:04, Jason Gross wrote: >>>> I'm confused by this. Are you saying that in Agda typechecking is >>>> exponential in the number of files? Or exponential in the number of >>>> nested abstractions? Or something else? Do you have a toy example >>>> demonstrating this behavior? >>>> >>> >>> No toy example, so far, but I think such can be provided. >>> >>> I have a real-world example of the DoCon-A library for algebra: >>> >>> http://www.botik.ru/pub/local/Mechveliani/docon-A/2.02/ >>> >>> This is a small part of the intended general purpose library for >>> algebra >>> (for algebra methods, it is very small, but comparing to the Agda >>> practice, it is large). >>> >>> It is written in install.txt >>> "for the -M15G key (15 Gb heap) installation takes about 50 >>> minutes on a >>> 3 GHz personal computer. >>> " >> >> >> I am sorry. >> >> I need to add the following. >> This as about the Agda versions of about 2017. >> >> It may occur that the current Agda version improves something there. >> This needs testing, needs more effort in porting the library. >> I use the last Agda versions, but on certain smaller projects. >> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From james.mckinna at ed.ac.uk Sun Mar 8 14:35:42 2020 From: james.mckinna at ed.ac.uk (James McKinna) Date: Sun, 08 Mar 2020 13:35:42 +0000 Subject: [Agda] Why dependent type theory? In-Reply-To: <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> Message-ID: <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> Martin, on Fri, 06 Mar 2020, you wrote: > In other words, choose your proof assistant as a function of what > you want to talk about *and* how you want to talk about it. Martin > > On 06/03/2020 21:05, Martin Escardo wrote: >> The troubling aspect of proof assistants is that they not only >> implement proof checking (and definition checking, construction >> checking etc.) but that also that each of them proposes a new >> foundation of mathematics. >> >> Which is sometimes not precisely specified, as it is the case of >> e.g. Agda. (Which is why I, as an Agda user, I confine myself to a >> well-understood subset of Agda corresponding to a (particular) >> well-understood type theory. >> >> For mathematically minded users of proof assistants, like myself, >> this is a problem. We are not interested in formal proofs per se. >> We are interested in what we are talking about, with rigorously >> stated assumptions about our universe of discourse. Martin, I largely agree with you (at least in terms of my practice as an Agda user; users of other proof assistants should look to their own consciences regarding well-known and less-well-known sources of potential inconsistency in (implementations of) their favourite foundations), but I had a mind a separation even at the level you allude to: -- that mathematicians are not/need not be bound by the restrictions/stipulations of a given foundational system; rather that they develop appropriate language/meta-language for their own eventual mathematical needs, and that such processes are very much historically bound, and subject to the dynamics of paradigm change in terms of the (greater) explanatory power of the paradigm within which they work; the example of Grothendieck developing a raft of categorical techniques in order to be able to successfully carry out his research programme in algebraic geometry being only one of the most familiar/famous/notorious; Kevin's and others' use of lean in the formalisation of perfectoid spaces suggest another such case, where the tool(s), and in particular their expressivity wrt the concepts being studied, made them more immediately ready-at-hand than any mere reduction to set theory (even if that were a possibility-in-principle with ZFC/TG implementations in Isabelle, Mizar or Egal); -- that concern for (consistency of such) foundations has, historically at least, typically lagged behind the mathematical developments; though against that, one might say that the Grothendieck school were precisely concerned with developing such foundations, hand-in-hand with the dazzling mathematics they carried out therein (an example of a much longer gap between the mathematical development, and putting it on satisfactory foundations might lie in the history of distributions from Heaviside to Schwartz; or the foundations of geometry after the discovery of non-Euclidean geometries...); the contemporary frenzy of activity on a number of fronts in higher-dimensional (categorical) algebra via homotopy type theory suggests a similar interplay between the development of 'mathematics-of' and 'foundations-for'. The Kolmogorov paper (as well as, for example, Lawvere's insistence on (a) 'logic' as somehow a conceptual secondary notion to the categorical structure which supports it, and indeed Brouwer's conception of logic as part of mathematics (and not the other way round, which perhaps seems strange to those who see the field of proof assistants as somehow the triumph of the logicist/formalist programme)) suggests that the logic of mathematical 'problems' (and their solutions) emerges from the domain of such problems. (What K points out as a "remarkable fact" is that such logic turns out to be (Heyting's formalisation of) Brouwer's intuitionistic logic, and such congruence would repeat itself 40 years later with the internal logic of toposes. ) It almost seems (to me at least), that the development and use of proof assistants has refocused our attention on the possibility that the 'Grundlagenstreit' was not a single historical moment, with a right/wrong outcome, but part of the dynamics of mathematical development: to each age its mathematics, and to each such mathematics, not only its freedom, but also its appropriate foundations. But that's not to say that we can, or should, be blas'e about such things. I'm sorry if my earlier post suggested otherwise. James. -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From b.a.w.spitters at gmail.com Sun Mar 8 15:25:06 2020 From: b.a.w.spitters at gmail.com (Bas Spitters) Date: Sun, 8 Mar 2020 15:25:06 +0100 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> Message-ID: Dear Kevin, The excitement about HoTT is that it has brought together several communities. Some are interested in homotopy theory and higher category theory, some (like Vladimir) want a new foundation for modern mathematics. Some combine those two by higher toposes. Some are trying to improve the previous generation of proof assistants. E.g. this influenced the design of quotients types in lean. By Curry-Howard this also influences the design of programming languages, like the cubical agda programming language (https://pure.itu.dk/portal/files/84649948/icfp19main_p164_p.pdf) If we consider HoTT as an extension of type theory with the univalence axiom, then *of course* everything that was done before can still be done. E.g. the proof of Feit-Thompson is constructive and thus also works in HoTT. (I can elaborate on this if needed.) In fact, classical logic is valid in the simplicial set model (https://www.math.uwo.ca/faculty/kapulkin/notes/LEM_in_sSet.pdf). Moreover, that model also interprets strict propositions, so one could even extend lean with univalence (I believe). It would be interesting to know whether this simplifies the definition of perfectoid spaces. Best regards, Bas On Thu, Mar 5, 2020 at 12:25 PM Kevin Buzzard wrote: > > > > On Wed, 4 Mar 2020 at 07:18, Martin Escardo wrote: >> >> Dependent types are good for pure mathematics (classical or >> constructive). They are the natural home to define group, ring, metric >> space, topological space, poset, lattice, category, etc, and study them. >> Mathematicians that use(d) dependent types include Voevodsky (in Coq) >> and Kevin Buzzard (in Lean), among others. Kevin and his team defined, >> in particular, perfectoid spaces in dependent type theory. Martin > > > The BCM (Buzzard, Commelin, Massot) paper defined perfectoid spaces in Lean > and looking forwards (in the sense of trying to attract "working mathematicians" > into the area of formalisation) I think it's an interesting question as to whether this definition > could be made in other systems in a way which is actually usable. My guess: I don't see why it couldn't > be done in Coq (but of course the type theories of Lean and Coq are similar), although > there is a whole bunch of noncomputable stuff embedded in the mathematics. > I *suspect* that it would be a real struggle to do it in any of the HOL systems > because a sheaf is a dependent type, but these HOL people are good at tricks > for working around these things -- personally I would start with seeing whether > one can set up a theory of sheaves of modules on a locally ringed space in a HOL > system, because that will be the first stumbling block. And as for the HoTT systems, > I have no feeling as to whether it is possible to do any serious mathematics other than > category theory and synthetic homotopy theory -- my perception is that > the user base are more interested in other kinds of questions. > > In particular, connecting back to the original question, a sheaf of modules on a > locally-ringed space is a fundamental concept which shows up in a typical MSc > or early PhD level algebraic geometry course (they were in the MSc algebraic > geometry course I took), and if one wants to do this kind of mathematics in a > theorem prover (and I do, as do several other people in the Lean community) > then I *suspect* that it would be hard without dependent types. On the other hand > I would love to be proved wrong. > > Kevin >> >> >> On 03/03/2020 19:43, jasongross9 at gmail.com wrote: >> > I'm in the process of writing my thesis on proof assistant performance >> > bottlenecks (with a focus on Coq), and there's a large class of >> > performance bottlenecks that come from (mis)using the power of dependent >> > types. So in writing the introduction, I want to provide some >> > justification for the design decision of using dependent types, rather >> > than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). >> > And the only reasons I can come up with are "it's fun" and "lots of >> > people do it" >> > >> > So I'm asking these mailing lists: why do we base proof assistants on >> > dependent type theory? What are the trade-offs involved? >> > I'm interested both in explanations and arguments given on list, as well >> > as in references to papers that discuss these sorts of choices. >> > >> > Thanks, >> > Jason >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> > >> >> -- >> Martin Escardo >> http://www.cs.bham.ac.uk/~mhe > > -- > You received this message because you are subscribed to the Google Groups "lean-user" group. > To unsubscribe from this group and stop receiving emails from it, send an email to lean-user+unsubscribe at googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/lean-user/CAH52Xb0X%3D06U2O7K%2BLGRXyPu%3DhaKxp2FcQr3SFK0f4jm8kv9mQ%40mail.gmail.com. From Thorsten.Altenkirch at nottingham.ac.uk Sun Mar 8 19:26:23 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 8 Mar 2020 18:26:23 +0000 Subject: [Agda] what is happening here? Message-ID: <7D6210B8-CC39-4222-B9D4-83F6C116C9DA@nottingham.ac.uk> I define record isMonoid {A : Set}(e : A)(_?_ : A ? A ? A) : Prp where field lneutr : {x : A} ? e ? x ? x rneutr : {x : A} ? x ? e ? x assoc : {x y z : A} ? (x ? y) ? z ? x ? (y ? z) and I have shown all 3 properties, in particular: assoc+ : {l m n : ?} ? (l + m) + n ? l + (m + n) but when I try isMonoid : isMonoid zero _+_ +isMonoid = record { lneutr = lneutr+ ; rneutr = rneutr+ ; assoc = assoc+ } I get some unsolved constraints, even though my proof and the goal are alpha-equivalent! Ok I can fix this by eta expanding: assoc = ? {x}{y}{z} ? assoc+ {x}{y}{z} But this shouldn?t be necessary. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Sun Mar 8 19:46:54 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Sun, 8 Mar 2020 19:46:54 +0100 Subject: [Agda] what is happening here? In-Reply-To: <7D6210B8-CC39-4222-B9D4-83F6C116C9DA@nottingham.ac.uk> References: <7D6210B8-CC39-4222-B9D4-83F6C116C9DA@nottingham.ac.uk> Message-ID: Hi Thorsten, The constraints you get are ?l + (?m + ?n) = l + (m + n) : ? ?l + ?m + ?n = l + m + n : ? You are right that ?l := l, ?m := m, ?n := n is the only solution, but this requires some non-trivial reasoning. For instance, the first constraint can be satisfied by ?l := 0, ?m := l, ?n := (m + n) so Agda would need to look at both constraints together to rule out this solution. / Ulf On Sun, Mar 8, 2020 at 7:26 PM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > I define > > > > record isMonoid {A : Set}(e : A)(_?_ : A ? A ? A) : Prp where > > field > > lneutr : {x : A} ? e ? x ? x > > rneutr : {x : A} ? x ? e ? x > > assoc : {x y z : A} ? (x ? y) ? z ? x ? (y ? z) > > > > and I have shown all 3 properties, in particular: > > > > assoc+ : {l m n : ?} ? (l + m) + n ? l + (m + n) > > > > but when I try > > > > isMonoid : isMonoid zero _+_ > > +isMonoid = record { > > lneutr = lneutr+ ; > > rneutr = rneutr+ ; > > assoc = assoc+ } > > > > I get some unsolved constraints, even though my proof and the goal are > alpha-equivalent! Ok I can fix this by eta expanding: > > > > assoc = ? {x}{y}{z} ? assoc+ {x}{y}{z} > > > > But this shouldn?t be necessary. > > > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Mar 8 22:48:40 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 8 Mar 2020 21:48:40 +0000 Subject: [Agda] what is happening here? In-Reply-To: References: <7D6210B8-CC39-4222-B9D4-83F6C116C9DA@nottingham.ac.uk> Message-ID: <835839CD-2CDD-436D-97C5-38BC023A30ED@nottingham.ac.uk> Ok, but shouldn?t it always work if there is a trivial solution, i.e. the goal matches given exactly (i.e. upto alpha conversion)? I mean one could always try ?exact? ? or is this a bad idea? Thorsteen From: Ulf Norell Date: Sunday, 8 March 2020 at 18:47 To: Thorsten Altenkirch Cc: agda-list Subject: Re: [Agda] what is happening here? Hi Thorsten, The constraints you get are ?l + (?m + ?n) = l + (m + n) : ? ?l + ?m + ?n = l + m + n : ? You are right that ?l := l, ?m := m, ?n := n is the only solution, but this requires some non-trivial reasoning. For instance, the first constraint can be satisfied by ?l := 0, ?m := l, ?n := (m + n) so Agda would need to look at both constraints together to rule out this solution. / Ulf On Sun, Mar 8, 2020 at 7:26 PM Thorsten Altenkirch > wrote: I define record isMonoid {A : Set}(e : A)(_?_ : A ? A ? A) : Prp where field lneutr : {x : A} ? e ? x ? x rneutr : {x : A} ? x ? e ? x assoc : {x y z : A} ? (x ? y) ? z ? x ? (y ? z) and I have shown all 3 properties, in particular: assoc+ : {l m n : ?} ? (l + m) + n ? l + (m + n) but when I try isMonoid : isMonoid zero _+_ +isMonoid = record { lneutr = lneutr+ ; rneutr = rneutr+ ; assoc = assoc+ } I get some unsolved constraints, even though my proof and the goal are alpha-equivalent! Ok I can fix this by eta expanding: assoc = ? {x}{y}{z} ? assoc+ {x}{y}{z} But this shouldn?t be necessary. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Mon Mar 9 01:25:12 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 9 Mar 2020 00:25:12 +0000 Subject: [Agda] Why dependent type theory? In-Reply-To: <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> Message-ID: <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> James, This resonates a bit with what Bourbaki wrote in "Introduction to the Theory of Sets", http://sites.mathdoc.fr/archives-bourbaki/feuilleter.php?chap=2_REDAC_E1: "... nowadays it is known to be possible, logically speaking, to derive practically the whole of known mathematics from a single source, the Theory of Sets. ... By so doing we do not claim to legislate for all time. It may happen at some future date that mathematicians will agree to use modes of reasoning which cannot be formalized in the language described here; according to some, the recent evolution of axiomatic homology theory would be a sign that this date is not so far. It would then be necessary, if not to change the language completely, at least to enlarge its rules of syntax. But this is for the future to decide." (I learned this quote from Thierry Coquand.) Martin On 08/03/2020 13:35, James McKinna wrote: > Martin, on Fri, 06 Mar 2020, you wrote: > >> In other words, choose your proof assistant as a function of what you >> want to talk about *and* how you want to talk about it. Martin >> >> On 06/03/2020 21:05, Martin Escardo wrote: >>> The troubling aspect of proof assistants is that they not only >>> implement proof checking (and definition checking, construction >>> checking etc.) but that also that each of them proposes a new >>> foundation of mathematics. >>> >>> Which is sometimes not precisely specified, as it is the case of e.g. >>> Agda. (Which is why I, as an Agda user, I confine myself to a >>> well-understood subset of Agda corresponding to a (particular) >>> well-understood type theory. >>> >>> For mathematically minded users of proof assistants, like myself, >>> this is a problem. We are not interested in formal proofs per se. We >>> are interested in what we are talking about, with rigorously stated >>> assumptions about our universe of discourse. > > Martin, > > I largely agree with you (at least in terms of my practice as an Agda > user; users of other proof assistants should look to their own > consciences regarding well-known and less-well-known sources of > potential inconsistency in (implementations of) their favourite > foundations), but I had a mind a separation even at the level you allude > to: > > -- that mathematicians are not/need not be bound by the > restrictions/stipulations of a given foundational system; rather that > they develop appropriate language/meta-language for their own eventual > mathematical needs, and that such processes are very much historically > bound, and subject to the dynamics of paradigm change in terms of the > (greater) explanatory power of the paradigm within which they work; the > example of Grothendieck developing a raft of categorical techniques in > order to be able to successfully carry out his research programme in > algebraic geometry being only one of the most familiar/famous/notorious; > Kevin's and others' use of lean in the formalisation of perfectoid > spaces suggest another such case, where the tool(s), and in particular > their expressivity wrt the concepts being studied, made them more > immediately ready-at-hand than any mere reduction to set theory (even if > that were a possibility-in-principle with ZFC/TG implementations in > Isabelle, Mizar or Egal); > > -- that concern for (consistency of such) foundations has, historically > at least, typically lagged behind the mathematical developments; though > against that, one might say that the Grothendieck school were precisely > concerned with developing such foundations, hand-in-hand with the > dazzling mathematics they carried out therein (an example of a much > longer gap between the mathematical development, and putting it on > satisfactory foundations might lie in the history of distributions from > Heaviside to Schwartz; or the foundations of geometry after the > discovery of non-Euclidean geometries...); the contemporary frenzy of > activity on a number of fronts in higher-dimensional (categorical) > algebra via homotopy type theory suggests a similar interplay between > the development of 'mathematics-of' and 'foundations-for'. > > The Kolmogorov paper (as well as, for example, Lawvere's insistence on > (a) 'logic' as somehow a conceptual secondary notion to the categorical > structure which supports it, and indeed Brouwer's conception of logic as > part of mathematics (and not the other way round, which perhaps seems > strange to those who see the field of proof assistants as somehow the > triumph of the logicist/formalist programme)) suggests that the logic of > mathematical 'problems' (and their solutions) emerges from the domain of > such problems. (What K points out as a "remarkable fact" is that such > logic turns out to be (Heyting's formalisation of) Brouwer's > intuitionistic logic, and such congruence would repeat itself 40 years > later with the internal logic of toposes. ) > > It almost seems (to me at least), that the development and use of proof > assistants has refocused our attention on the possibility that the > 'Grundlagenstreit' was not a single historical moment, with a > right/wrong outcome, but part of the dynamics of mathematical > development: to each age its mathematics, and to each such mathematics, > not only its freedom, but also its appropriate foundations. But that's > not to say that we can, or should, be blas'e about such things. I'm > sorry if my earlier post suggested otherwise. > > James. > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From asr at eafit.edu.co Mon Mar 9 02:55:52 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sun, 8 Mar 2020 20:55:52 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 2 In-Reply-To: References: Message-ID: Dear all, The Agda Team is very pleased to announce the second release candidate (RC2) of Agda 2.6.1. Installation ======= RC2 can be installed using the following instructions: $ cabal install https://hackage.haskell.org/package/Agda-2.6.0.1.20200307/candidate/Agda-2.6.0.1.20200307.tar.gz or $ cabal get https://hackage.haskell.org/package/Agda-2.6.0.1.20200307/candidate/Agda-2.6.0.1.20200307.tar.gz $ Agda-2.6.0.1.20200307.tar.gz $ cabal install You can also install RC2 using the Nix-style local builds and `cabal-install 3.0.0.0`. See https://agda.readthedocs.io/en/latest/getting-started/installation.html#installation-from-hackage in the user manual. GHC supported versions =============== RC2 has been tested with GHC 8.8.3, 8.6.5, 8.4.4, 8.2.2 and 8.0.2. Support for GHC 7.10.3 was removed. Standard library ========== For the time being, you can use the *master* branch of the standard library which is compatible with RC2. This branch is available at https://github.com/agda/agda-stdlib/ What is new, fixed issues and incompatibilities ============================ See https://hackage.haskell.org/package/Agda-2.6.0.1.20200307/candidate/changelog . Enjoy RC2 and please test as much as possible. -- Andr?s, on behalf of the Agda Team From asr at eafit.edu.co Mon Mar 9 04:19:41 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sun, 8 Mar 2020 22:19:41 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 2 In-Reply-To: References: Message-ID: On Sun, 8 Mar 2020 at 20:55, Andr?s Sicard-Ram?rez wrote: > RC2 can be installed using the following instructions: > > $ cabal get https://hackage.haskell.org/package/Agda-2.6.0.1.20200307/candidate/Agda-2.6.0.1.20200307.tar.gz > $ Agda-2.6.0.1.20200307.tar.gz > $ cabal install The correct instructions are: $ cabal get https://hackage.haskell.org/package/Agda-2.6.0.1.20200307/candidate/Agda-2.6.0.1.20200307.tar.gz $ cd Agda-2.6.0.1.20200307 $ cabal install Best regards, -- Andr?s From aldrovandi at math.fsu.edu Mon Mar 9 05:45:01 2020 From: aldrovandi at math.fsu.edu (Ettore Aldrovandi) Date: Mon, 9 Mar 2020 00:45:01 -0400 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: <0396F54A-C5A8-48A6-8375-D7DB08FAB1FF@exmail.nottingham.ac.uk> References: <7987BD74-FFAB-4925-83D1-AF6CDDB3BC93@nottingham.ac.uk> <6CAEAF50-5464-45FE-8627-13DDFDA616A4@math.fsu.edu> <0396F54A-C5A8-48A6-8375-D7DB08FAB1FF@exmail.nottingham.ac.uk> Message-ID: <20014569-9D37-45E8-8D98-D2FE51DC9A86@math.fsu.edu> Hi Thorsten, I agree + is well behaved. The problem with \cup (in the context of set theory) is the disembodied idea of element. To go back to your original example, with {1,2} and {1,2,3,4} I can think of 1 as both in the first and the second set, so they are not disjoint, whereas {t,f} has empty intersection with {1,2,3,4} so their union is disjoint. (In fact the definition of + below takes care of making A and B disjoint.) But I think the big defect, as I said, is the notion of ?belongs to,? more than the notion of union per se. And again, the union is not just a coproduct: if I can avail myself of elements and of the intersection, then the union of A and B should be the pushout over A \cap B. Of course this bites its own tail, because how do you get a clean definition of intersection? If you can work over a base, say S, then given A ?> S and B ?> S, then you can define A \cap B as a fibered product and then A \cup B as a pushout. I believe that this way it should be invariant under isomorphisms. The troubles with elements remain, however. ?Ettore > On Mar 5, 2020, at 15:01, Thorsten Altenkirch wrote: > > Hi Ettore, > > We can look at both operations in the context of set theory. The sum is just the disjoint union ie > A+B = { (0,a) | a \in A } \cup { (1,b) | b \in B } > Now + preserves isomorphism of sets but \cup doesn?t. Hence in set theory we have both structural operations and non-structural ones while in Type Theory all operations are structural, ie preserve isomorphisms. > > Thorsten > > > Sent from my iPhone > >> On 5 Mar 2020, at 16:32, Ettore Aldrovandi wrote: >> >> ? Hi Thorsten, >> >> of course you are correct about the union of two sets (\cup). What I thought was not correct as an example is the comparison between \cup and +, because those are two different constructions, the latter being a disjoint union, or \sqcup, if we want to use a different notation. >> >> I think I agree with the idea that types help hide the implementation, but the example as a whole does not support it because of \cup vs. \sqcup. From a categorical viewpoint, those are different types of colimits. The union, as in the rest of my example, is a colimit along the index category {* <- * -> *}, whereas the disjoint union is a colimit along { * *} . >> >> I hope this clarifies it. Sorry for the confusion, >> >> ?Ettore >> >> >>> On Mar 5, 2020, at 10:39, Thorsten Altenkirch > wrote: >>> >>> Hi Ettore, >>> >>> In set theory the union of two sets (written \cup) is the set which contains the elements which are in one set or the other. Hence I cannot see what is ?mathematically incorrect? in my example >>> >>> Cheers, >>> Thorsten >>> >>> From: Ettore Aldrovandi > >>> Date: Wednesday, 4 March 2020 at 21:59 >>> To: Thorsten Altenkirch > >>> Cc: "coq-club at inria.fr " >, agda-list >, "coq+miscellaneous at discoursemail.com " >, lean-user > >>> Subject: Re: [Agda] [Coq-Club] Why dependent type theory? >>> >>> Hi, >>> >>> I think the example below is not mathematically correct. The problem is that \cup is not the same as \sqcup. The latter is of course a coproduct in the category of sets, whereas the former is a push-out, so a colimit of a more complicated diagram. In the line >>> >>>> {0,1} \cup {0,1,2,3} = {0,1,2,3} >>> >>> of course the two sets {0,1} and {0,1,2,3} are not disjoint, whereas in the line >>> >>>> {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} >>> >>> the union is actually disjoint, i.e. a coproduct. In the example with the sum, >>> >>>> {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} >>>> >>>> {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} >>> >>> in the first line {0,1} is actually made disjoint from {0,1,2,3}. To turn this around, suppose you do a push-out >>> >>> {true, false} \coprod_{0,1} {0,1,2,3} >>> >>> where you use the maps f : {0,1} -> {true, false} and i : {0,1} ->{0,1,2,3} . Then, since f is an isomorphism, you get something isomorphic to the union. >>> >>> So, this example doesn?t really show that \cup exposes the implementation. But part of this example becomes possible because in sets we have naively ?disembodied? elements leading to constructions of this sort? >>> >>> ?I guess, I?m just learning this stuff myself. (First post here, actually!) >>> >>> Best, >>> >>> ?Ettore >>> >>> >>>> On Mar 4, 2020, at 04:42, Thorsten Altenkirch > wrote: >>>> >>>> First of all I don?t like the word ?dependent type theory?. Dependent types are one important feature of modern Type Theory but hardly the only one. >>>> >>>> To me the most important feature of Type Theory is the support of abstraction in Mathematics and computer science. Using types instead of sets means that you can hide implementation choices which is essential if you want to build towers of abstraction. Set theory fails here badly. Just as a very simple example: in set theory you have the notion of union, so for example >>>> >>>> {0,1} \cup {0,1,2,3} = {0,1,2,3} >>>> >>>> However, if we change the representation of the first set and use lets say {true,false} we get a different result: >>>> >>>> {true , false} \cup {0,1,2,3} = {true,false,0,1,2,3} >>>> >>>> This means that \cup exposes implementation details because the results are not equivalent upto renaming. In Type Theory we have the notion of sum, sometimes called disjoint union, which is well behaved >>>> >>>> {0,1} + {0,1,2,3} = {in1 0,in1 1,in2 0,in2 1,in2 2,in2 3} >>>> >>>> {true , false} + {0,1,2,3} = {in1 true,in1 false ,in2 0,in2 1,in2 2,in2 3} >>>> >>>> Unlike \cup, + doesn?t reveal any implementation details it is a purely structural operation. Having only structural operations means that everything you do is stable under equivalence, that is you can replace one object with another one that behaves the same. This is the essence of Voevodsky?s univalence principle. >>>> >>>> There are other nice aspects of Type Theory. From a constructive point of view (which should come naturally to a computer scientists) the proporsitions as types explanation provides a very natural way to obtain ?logic for free? and paedagogically helpful since it reduces logical reasoning to programming. >>>> >>>> There are performance issues with implementations of Type Theory, however, in my experience (mainly agda) the execution of functions at compile time isn?t one of them. In my experience the main problem is to deal with a loss of sharing when handling equational constraints which can blow up the time needed for type checking. I think this is an engineering problem and there are some suggestions how to fix this. >>>> >>>> Thorsten >>> >>> >>> This message and any attachment are intended solely for the addressee >>> and may contain confidential information. If you have received this >>> message in error, please contact the sender and delete the email and >>> attachment. >>> >>> Any views or opinions expressed by the author of this email do not >>> necessarily reflect the views of the University of Nottingham. Email >>> communications with the University of Nottingham may be monitored >>> where permitted by law. >>> >>> >>> >>> >> > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabriel.scherer at gmail.com Mon Mar 9 07:34:23 2020 From: gabriel.scherer at gmail.com (Gabriel Scherer) Date: Mon, 9 Mar 2020 07:34:23 +0100 Subject: [Agda] Why dependent type theory? In-Reply-To: <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> Message-ID: In this nice quote, foundations are considered from the perspective of expressive power: What if we find mathematics that *cannot* be formalized with our choice of foundations? In our experience with proof assistants, the discussion is generally not about expressive power (the possibility to formalize something at all) but about convenience, which in practice determines feasability: What if we find mathematics that cannot be formalized *in practice* by our proof assistant, due to our choice of foundations? It is not obvious to me whether this impact of foundations on practical usability of proof assistants is going to stay, or whether it is a problem of youth that will go away as we develop better assistants. I would rather hope the latter: that we can build proof assistants that are flexible enough to conveniently support a very broad range of mathematics. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at kenkubota.de Mon Mar 9 12:21:12 2020 From: mail at kenkubota.de (Ken Kubota) Date: Mon, 9 Mar 2020 12:21:12 +0100 Subject: [Agda] =?utf-8?q?Type_Theory_vs=2E_Set_Theory_=E2=80=93_Re=3A_?= =?utf-8?q?=5BCoq-Club=5D__Why_dependent_type_theory=3F?= In-Reply-To: <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> Message-ID: <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> There are two problems with this quote in favor of set theory. 1. The axioms of set theory are historically contingent, i.e., they only cover the mathematics practiced at a given time. For example, ZFC doesn?t cover large cardinals. An additional axiom is necessary. One can easily generalize this argument by establishing new mathematical fields not covered by a given set of axioms. As mentioned earlier: I would consider type theory superior to set theory as type theory is a systematic approach, whereas the axioms of set theory are historically contingent. https://groups.google.com/d/msg/lean-user/_A82awhFlcM/4odQJX3rCgAJ 2. It should be possible to derive all of mathematics from type theory (in particular, from a dependent type variant of Andrews' Q0). This claim is not only stronger as is covers all (!) of mathematics possibly expressible (instead of only "the whole of known [!] mathematics"). Q0 was specifically designed in this spirit ("to derive practically the whole of [...] mathematics from a single source"), what Andrews calls "expressiveness". The claim that a further developed variant of Q0 would be identical with (all of) mathematics was made earlier here: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/7fCLcrftCQAJ See also this contribution: Type Theory vs. Set Theory (HOL, Isabelle/HOL, Q0, and R0 vs. ZFC) https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2018-June/msg00000.html In short: While type theory is a systematic approach, set theory was an auxiliary solution useful for practical needs at that time. Jean van Heijenoort had expressed this very precisely: 9. Jean van Heijenoort on the development of type theory and set theory: ?In spite of the great advances that set theory was making, the very notion of set remained vague. The situation became critical after the appearance of the Burali-Forti paradox and intolerable after that of the Russell paradox, the latter involving the bare notions of set and element. One response to the challenge was Russell?s theory of types [...]. Another, coming at almost the same time, was Zermelo?s axiomatization of set theory. The two responses are extremely different; the former is a far-reaching theory of great significance for logic and even ontology, while the latter is an immediate answer to the pressing needs of the working mathematician.? [Heijenoort, 1967c, p. 199] https://owlofminerva.net/files/fom_2018.pdf#page=12 Kind regards, Ken Kubota ____________________________________________________ Ken Kubota doi.org/10.4444/100 > Am 09.03.2020 um 01:25 schrieb Martin Escardo : > > James, > > This resonates a bit with what Bourbaki wrote in "Introduction to the > Theory of Sets", > http://sites.mathdoc.fr/archives-bourbaki/feuilleter.php?chap=2_REDAC_E1: > > "... nowadays it is known to be possible, logically speaking, to derive > practically the whole of known mathematics from a single source, the > Theory of Sets. ... By so doing we do not claim to legislate for all > time. It may happen at some future date that mathematicians will agree > to use modes of reasoning which cannot be formalized in the language > described here; according to some, the recent evolution of axiomatic > homology theory would be a sign that this date is not so far. It would > then be necessary, if not to change the language completely, at least to > enlarge its rules of syntax. But this is for the future to decide." > > (I learned this quote from Thierry Coquand.) > > Martin > > On 08/03/2020 13:35, James McKinna wrote: >> Martin, on Fri, 06 Mar 2020, you wrote: >> >>> In other words, choose your proof assistant as a function of what you >>> want to talk about *and* how you want to talk about it. Martin >>> >>> On 06/03/2020 21:05, Martin Escardo wrote: >>>> The troubling aspect of proof assistants is that they not only >>>> implement proof checking (and definition checking, construction >>>> checking etc.) but that also that each of them proposes a new >>>> foundation of mathematics. >>>> >>>> Which is sometimes not precisely specified, as it is the case of e.g. >>>> Agda. (Which is why I, as an Agda user, I confine myself to a >>>> well-understood subset of Agda corresponding to a (particular) >>>> well-understood type theory. >>>> >>>> For mathematically minded users of proof assistants, like myself, >>>> this is a problem. We are not interested in formal proofs per se. We >>>> are interested in what we are talking about, with rigorously stated >>>> assumptions about our universe of discourse. > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Mon Mar 9 16:22:32 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 9 Mar 2020 16:22:32 +0100 Subject: [Agda] what is happening here? In-Reply-To: <835839CD-2CDD-436D-97C5-38BC023A30ED@nottingham.ac.uk> References: <7D6210B8-CC39-4222-B9D4-83F6C116C9DA@nottingham.ac.uk> <835839CD-2CDD-436D-97C5-38BC023A30ED@nottingham.ac.uk> Message-ID: <0f02e7bd-502a-8749-a86e-817922e2cceb@cse.gu.se> On 2020-03-08 22:48, Thorsten Altenkirch wrote: > Ok, but shouldn?t it always work if there is a trivial solution, i.e. > the goal matches given exactly (i.e. upto alpha conversion)? I don't think we should solve meta-variables unless there is a most general solution. This criterion ensures that if a reader of the code finds one way to solve the meta-variables, and the meta-variables are solved by Agda, then the solution found by the reader matches the one found by Agda (in the case of a non-unique most general solution the reader's solution might be more specific). I want it to be possible to read code without knowing the details of the unification algorithm. -- /NAD From effectfully at gmail.com Mon Mar 9 23:11:31 2020 From: effectfully at gmail.com (Roman) Date: Tue, 10 Mar 2020 01:11:31 +0300 Subject: [Agda] what is happening here? In-Reply-To: <0f02e7bd-502a-8749-a86e-817922e2cceb@cse.gu.se> References: <7D6210B8-CC39-4222-B9D4-83F6C116C9DA@nottingham.ac.uk> <835839CD-2CDD-436D-97C5-38BC023A30ED@nottingham.ac.uk> <0f02e7bd-502a-8749-a86e-817922e2cceb@cse.gu.se> Message-ID: Hi Thorsten, I think you're confused by the fact that Agda eagerly binds implicits. If I tweak your definitions a bit record isMonoid {A : Set}(e : A)(_?_ : A ? A ? A) : Set where field <...> assoc : ? -> {x y z : A} ? (x ? y) ? z ? x ? (y ? z) assoc+ : ? -> {l m n : ?} ? (l + m) + n ? l + (m + n) +isMonoid : isMonoid zero _+_ +isMonoid = record { lneutr = lneutr+ ; rneutr = rneutr+ ; assoc = assoc+ } then Agda happily accepts the code. The reason for that is that Agda elaborates your original example assoc = assoc+ to assoc {x} {y} {z} = assoc+ {_} {_} {_} and then Agda is unable to solve the wildcard metavariables. In my code above I introduce an explicit argument before the implicit ones, which prevents Agda from binding implicits eagerly, which makes the whole thing work as you'd expect. 2020-03-09 18:22 GMT+03:00, Nils Anders Danielsson : > On 2020-03-08 22:48, Thorsten Altenkirch wrote: >> Ok, but shouldn?t it always work if there is a trivial solution, i.e. >> the goal matches given exactly (i.e. upto alpha conversion)? > > I don't think we should solve meta-variables unless there is a most > general solution. This criterion ensures that if a reader of the code > finds one way to solve the meta-variables, and the meta-variables are > solved by Agda, then the solution found by the reader matches the one > found by Agda (in the case of a non-unique most general solution the > reader's solution might be more specific). I want it to be possible to > read code without knowing the details of the unification algorithm. > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From avigad at cmu.edu Tue Mar 10 01:55:35 2020 From: avigad at cmu.edu (Jeremy Avigad) Date: Mon, 9 Mar 2020 20:55:35 -0400 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> Message-ID: Friends, In a footnote in a survey article I mentioned in this thread, I wrote that Amrokaine Saibi credited Peter Aczel with the idea of using implicit arguments in dependent type theory. James McKinna pointed out to me that I got this wrong: Saibi explicitly credits Randy Pollack for that. The Saibi article is here: https://dl.acm.org/doi/10.1145/263699.263742. The Pollack article is here: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.30.7361. I feel bad for disseminating false history! I will correct the footnote in the arXiv version of the survey. Best wishes, Jeremy On Mon, Mar 9, 2020 at 2:30 AM Gabriel Scherer wrote: > In this nice quote, foundations are considered from the perspective of > expressive power: > What if we find mathematics that *cannot* be formalized with our choice > of foundations? > In our experience with proof assistants, the discussion is generally not > about expressive power (the possibility to formalize something at all) but > about convenience, which in practice determines feasability: > What if we find mathematics that cannot be formalized *in practice* by > our proof assistant, due to our choice of foundations? > > It is not obvious to me whether this impact of foundations on practical > usability of proof assistants is going to stay, or whether it is a problem > of youth that will go away as we develop better assistants. I would rather > hope the latter: that we can build proof assistants that are flexible > enough to conveniently support a very broad range of mathematics. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abela at chalmers.se Tue Mar 10 09:48:27 2020 From: abela at chalmers.se (Andreas Abel) Date: Tue, 10 Mar 2020 09:48:27 +0100 Subject: [Agda] Agda meeting postponed [Fwd: AIM XXXI Postponed] In-Reply-To: References: Message-ID: <362f5664-339d-db0d-3f24-7cb3b7ce162a@chalmers.se> The 31st Agda meeting (AIM XXXI) has been postponed to later this year due to insecurities concerning the development of the COVID-19 situation. Apology for the inconveniences if you have already arranged your trip. Best regards, Andreas -------- Forwarded Message -------- Subject: AIM XXXI Postponed Date: Tue, 10 Mar 2020 00:58:53 +0000 From: Wen Kokke Dear participants, It greatly saddens me to announce this, but unfortunately due to the ongoing COVID-19 pandemic, AIM XXXI is postponed, to be held later this year. I'm glad to say, it'll still be in Edinburgh. I'll announce the dates at a later time, as they will depend on the development of the pandemic and the availability of suitable venues in Edinburgh, Kind regards, Wen From Thorsten.Altenkirch at nottingham.ac.uk Tue Mar 10 12:10:00 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 10 Mar 2020 11:10:00 +0000 Subject: [Agda] =?utf-8?q?Type_Theory_vs=2E_Set_Theory_=E2=80=93_Re=3A_?= =?utf-8?q?=5BCoq-Club=5D__Why_dependent_type_theory=3F?= In-Reply-To: <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> Message-ID: <3A2A5A12-A376-4B65-97E5-38AE8219667C@nottingham.ac.uk> 2. It should be possible to derive all of mathematics from type theory (in particular, from a dependent type variant of Andrews' Q0). This claim is not only stronger as is covers all (!) of mathematics possibly expressible (instead of only "the whole of known [!] mathematics"). Q0 was specifically designed in this spirit ("to derive practically the whole of [...] mathematics from a single source"), what Andrews calls "expressiveness". The claim that a further developed variant of Q0 would be identical with (all of) mathematics was made earlier here: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/7fCLcrftCQAJ I don?t agree with this description. As set theory, type theory is an evolving system. For example a while ago we were using intensional type theory with uniqueness of identity proofs and now we have a much more extensional type theory with univalence and without uip. And also the question isn?t just wether we ?can derive? all Mathematics but can we structure mathematical constructions in a reasonable way. Otherwise we are left with the usual argument that all programs can be written in machine language. Am 09.03.2020 um 01:25 schrieb Martin Escardo >: James, This resonates a bit with what Bourbaki wrote in "Introduction to the Theory of Sets", http://sites.mathdoc.fr/archives-bourbaki/feuilleter.php?chap=2_REDAC_E1: "... nowadays it is known to be possible, logically speaking, to derive practically the whole of known mathematics from a single source, the Theory of Sets. ... By so doing we do not claim to legislate for all time. It may happen at some future date that mathematicians will agree to use modes of reasoning which cannot be formalized in the language described here; according to some, the recent evolution of axiomatic homology theory would be a sign that this date is not so far. It would then be necessary, if not to change the language completely, at least to enlarge its rules of syntax. But this is for the future to decide." (I learned this quote from Thierry Coquand.) Martin On 08/03/2020 13:35, James McKinna wrote: Martin, on Fri, 06 Mar 2020, you wrote: In other words, choose your proof assistant as a function of what you want to talk about *and* how you want to talk about it. Martin On 06/03/2020 21:05, Martin Escardo wrote: The troubling aspect of proof assistants is that they not only implement proof checking (and definition checking, construction checking etc.) but that also that each of them proposes a new foundation of mathematics. Which is sometimes not precisely specified, as it is the case of e.g. Agda. (Which is why I, as an Agda user, I confine myself to a well-understood subset of Agda corresponding to a (particular) well-understood type theory. For mathematically minded users of proof assistants, like myself, this is a problem. We are not interested in formal proofs per se. We are interested in what we are talking about, with rigorously stated assumptions about our universe of discourse. -- Martin Escardo http://www.cs.bham.ac.uk/~mhe This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Thu Mar 12 16:36:53 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 12 Mar 2020 15:36:53 +0000 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> Message-ID: <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> One problem here is that the equality one uses in Lean is the strict equality which is definitionally proof-irrelevant. This is a nice feature to have for set-level reasoning but it doesn't work on higher levels, i.e. reasoning about structures. Which is where the main power of HoTT is, equivalence is equality. I think it should be possible to have both features, that is simulate definitional proof-irrelevance which is basically "extensional" type theory on the set level via a powerful tactic but don't put this. Into the foundations of the proof system. This is a common problem that decisions which should only affect the surface are turned into core features. This is a shame because in many ways lean is a nice system but it is unusable if you want to do structural Mathematics. Thorsten ?On 08/03/2020, 14:25, "Agda on behalf of Bas Spitters" wrote: Dear Kevin, The excitement about HoTT is that it has brought together several communities. Some are interested in homotopy theory and higher category theory, some (like Vladimir) want a new foundation for modern mathematics. Some combine those two by higher toposes. Some are trying to improve the previous generation of proof assistants. E.g. this influenced the design of quotients types in lean. By Curry-Howard this also influences the design of programming languages, like the cubical agda programming language (https://pure.itu.dk/portal/files/84649948/icfp19main_p164_p.pdf) If we consider HoTT as an extension of type theory with the univalence axiom, then *of course* everything that was done before can still be done. E.g. the proof of Feit-Thompson is constructive and thus also works in HoTT. (I can elaborate on this if needed.) In fact, classical logic is valid in the simplicial set model (https://www.math.uwo.ca/faculty/kapulkin/notes/LEM_in_sSet.pdf). Moreover, that model also interprets strict propositions, so one could even extend lean with univalence (I believe). It would be interesting to know whether this simplifies the definition of perfectoid spaces. Best regards, Bas On Thu, Mar 5, 2020 at 12:25 PM Kevin Buzzard wrote: > > > > On Wed, 4 Mar 2020 at 07:18, Martin Escardo wrote: >> >> Dependent types are good for pure mathematics (classical or >> constructive). They are the natural home to define group, ring, metric >> space, topological space, poset, lattice, category, etc, and study them. >> Mathematicians that use(d) dependent types include Voevodsky (in Coq) >> and Kevin Buzzard (in Lean), among others. Kevin and his team defined, >> in particular, perfectoid spaces in dependent type theory. Martin > > > The BCM (Buzzard, Commelin, Massot) paper defined perfectoid spaces in Lean > and looking forwards (in the sense of trying to attract "working mathematicians" > into the area of formalisation) I think it's an interesting question as to whether this definition > could be made in other systems in a way which is actually usable. My guess: I don't see why it couldn't > be done in Coq (but of course the type theories of Lean and Coq are similar), although > there is a whole bunch of noncomputable stuff embedded in the mathematics. > I *suspect* that it would be a real struggle to do it in any of the HOL systems > because a sheaf is a dependent type, but these HOL people are good at tricks > for working around these things -- personally I would start with seeing whether > one can set up a theory of sheaves of modules on a locally ringed space in a HOL > system, because that will be the first stumbling block. And as for the HoTT systems, > I have no feeling as to whether it is possible to do any serious mathematics other than > category theory and synthetic homotopy theory -- my perception is that > the user base are more interested in other kinds of questions. > > In particular, connecting back to the original question, a sheaf of modules on a > locally-ringed space is a fundamental concept which shows up in a typical MSc > or early PhD level algebraic geometry course (they were in the MSc algebraic > geometry course I took), and if one wants to do this kind of mathematics in a > theorem prover (and I do, as do several other people in the Lean community) > then I *suspect* that it would be hard without dependent types. On the other hand > I would love to be proved wrong. > > Kevin >> >> >> On 03/03/2020 19:43, jasongross9 at gmail.com wrote: >> > I'm in the process of writing my thesis on proof assistant performance >> > bottlenecks (with a focus on Coq), and there's a large class of >> > performance bottlenecks that come from (mis)using the power of dependent >> > types. So in writing the introduction, I want to provide some >> > justification for the design decision of using dependent types, rather >> > than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). >> > And the only reasons I can come up with are "it's fun" and "lots of >> > people do it" >> > >> > So I'm asking these mailing lists: why do we base proof assistants on >> > dependent type theory? What are the trade-offs involved? >> > I'm interested both in explanations and arguments given on list, as well >> > as in references to papers that discuss these sorts of choices. >> > >> > Thanks, >> > Jason >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> > >> >> -- >> Martin Escardo >> http://www.cs.bham.ac.uk/~mhe > > -- > You received this message because you are subscribed to the Google Groups "lean-user" group. > To unsubscribe from this group and stop receiving emails from it, send an email to lean-user+unsubscribe at googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/lean-user/CAH52Xb0X%3D06U2O7K%2BLGRXyPu%3DhaKxp2FcQr3SFK0f4jm8kv9mQ%40mail.gmail.com. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From jon at jonmsterling.com Thu Mar 12 17:22:38 2020 From: jon at jonmsterling.com (Jon Sterling) Date: Thu, 12 Mar 2020 12:22:38 -0400 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> Message-ID: Dear Thorsten, I think you're on the right track about the idea that "proof irrelevance" for set-level stuff should in fact be only virtual and should instead be implemented by a nice tactic. As you know, we have spent a great deal of time investigating extensions of ITT with definitional proof irrelevance (for equality), and others have done so for SProp --- unfortunately, we have found that definitional proof irrelevance is actually very badly behaved _except_ in the presence of equality reflection. Section 8 of our recent paper explains the difficulties with proof irrelevance in ITT, even when you are only interested in sets: http://www.jonmsterling.com/pdfs/sag20.pdf. This is why I have been a bit dismayed by the rush to adopt things like SProp in all type theoretic proof assistants, at a time when most of us had not yet fully understood the problems. For the reasons we describe in our paper, I now strongly believe that even for set-level mathematics, one must not adopt proof irrelevance into the core (neither for equality, nor for a universe of propositions). It should, as Thorsten advocates, be implemented as some kind of coherence tactic that is so sophisticated that the user never sees it happening. However, it will be up to us type theorists to design such a tactic --- it is not totally obvious that this can be done in a way that the people who have become accustomed to systems like Lean would consider acceptable. I think we should try. Best, Jon On Thu, Mar 12, 2020, at 11:36 AM, Thorsten Altenkirch wrote: > One problem here is that the equality one uses in Lean is the strict > equality which is definitionally proof-irrelevant. This is a nice > feature to have for set-level reasoning but it doesn't work on higher > levels, i.e. reasoning about structures. Which is where the main power > of HoTT is, equivalence is equality. > > I think it should be possible to have both features, that is simulate > definitional proof-irrelevance which is basically "extensional" type > theory on the set level via a powerful tactic but don't put this. Into > the foundations of the proof system. This is a common problem that > decisions which should only affect the surface are turned into core > features. This is a shame because in many ways lean is a nice system > but it is unusable if you want to do structural Mathematics. > > Thorsten > > ?On 08/03/2020, 14:25, "Agda on behalf of Bas Spitters" > > wrote: > > Dear Kevin, > > The excitement about HoTT is that it has brought together several > communities. Some are interested in homotopy theory and higher > category theory, some (like Vladimir) want a new foundation for modern > mathematics. > Some combine those two by higher toposes. > > Some are trying to improve the previous generation of proof > assistants. E.g. this influenced the design of quotients types in > lean. > By Curry-Howard this also influences the design of programming > languages, like the cubical agda programming language > (https://pure.itu.dk/portal/files/84649948/icfp19main_p164_p.pdf) > > If we consider HoTT as an extension of type theory with the univalence > axiom, then *of course* everything that was done before can still be > done. > E.g. the proof of Feit-Thompson is constructive and thus also works in > HoTT. (I can elaborate on this if needed.) > > In fact, classical logic is valid in the simplicial set model > (https://www.math.uwo.ca/faculty/kapulkin/notes/LEM_in_sSet.pdf). > Moreover, that model also interprets strict propositions, so one could > even extend lean with univalence (I believe). > It would be interesting to know whether this simplifies the definition > of perfectoid spaces. > > Best regards, > > Bas > > On Thu, Mar 5, 2020 at 12:25 PM Kevin Buzzard > wrote: > > > > > > > > On Wed, 4 Mar 2020 at 07:18, Martin Escardo > wrote: > >> > >> Dependent types are good for pure mathematics (classical or > >> constructive). They are the natural home to define group, ring, > metric > >> space, topological space, poset, lattice, category, etc, and > study them. > >> Mathematicians that use(d) dependent types include Voevodsky (in > Coq) > >> and Kevin Buzzard (in Lean), among others. Kevin and his team > defined, > >> in particular, perfectoid spaces in dependent type theory. Martin > > > > > > The BCM (Buzzard, Commelin, Massot) paper defined perfectoid > spaces in Lean > > and looking forwards (in the sense of trying to attract "working > mathematicians" > > into the area of formalisation) I think it's an interesting > question as to whether this definition > > could be made in other systems in a way which is actually usable. > My guess: I don't see why it couldn't > > be done in Coq (but of course the type theories of Lean and Coq > are similar), although > > there is a whole bunch of noncomputable stuff embedded in the > mathematics. > > I *suspect* that it would be a real struggle to do it in any of > the HOL systems > > because a sheaf is a dependent type, but these HOL people are > good at tricks > > for working around these things -- personally I would start with > seeing whether > > one can set up a theory of sheaves of modules on a locally ringed > space in a HOL > > system, because that will be the first stumbling block. And as > for the HoTT systems, > > I have no feeling as to whether it is possible to do any serious > mathematics other than > > category theory and synthetic homotopy theory -- my perception is > that > > the user base are more interested in other kinds of questions. > > > > In particular, connecting back to the original question, a sheaf > of modules on a > > locally-ringed space is a fundamental concept which shows up in a > typical MSc > > or early PhD level algebraic geometry course (they were in the > MSc algebraic > > geometry course I took), and if one wants to do this kind of > mathematics in a > > theorem prover (and I do, as do several other people in the Lean > community) > > then I *suspect* that it would be hard without dependent types. > On the other hand > > I would love to be proved wrong. > > > > Kevin > >> > >> > >> On 03/03/2020 19:43, jasongross9 at gmail.com wrote: > >> > I'm in the process of writing my thesis on proof assistant > performance > >> > bottlenecks (with a focus on Coq), and there's a large class of > >> > performance bottlenecks that come from (mis)using the power of > dependent > >> > types. So in writing the introduction, I want to provide some > >> > justification for the design decision of using dependent > types, rather > >> > than, say, set theory or classical logic (as in, e.g., > Isabelle/HOL). > >> > And the only reasons I can come up with are "it's fun" and > "lots of > >> > people do it" > >> > > >> > So I'm asking these mailing lists: why do we base proof > assistants on > >> > dependent type theory? What are the trade-offs involved? > >> > I'm interested both in explanations and arguments given on > list, as well > >> > as in references to papers that discuss these sorts of choices. > >> > > >> > Thanks, > >> > Jason > >> > > >> > _______________________________________________ > >> > Agda mailing list > >> > Agda at lists.chalmers.se > >> > https://lists.chalmers.se/mailman/listinfo/agda > >> > > >> > >> -- > >> Martin Escardo > >> http://www.cs.bham.ac.uk/~mhe > > > > -- > > You received this message because you are subscribed to the > Google Groups "lean-user" group. > > To unsubscribe from this group and stop receiving emails from it, > send an email to lean-user+unsubscribe at googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/lean-user/CAH52Xb0X%3D06U2O7K%2BLGRXyPu%3DhaKxp2FcQr3SFK0f4jm8kv9mQ%40mail.gmail.com. > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From kevin.m.buzzard at gmail.com Fri Mar 13 09:13:04 2020 From: kevin.m.buzzard at gmail.com (Kevin Buzzard) Date: Fri, 13 Mar 2020 08:13:04 +0000 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> Message-ID: Hey Thorsten, On Thu, 12 Mar 2020 at 15:36, Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > [snip] > This is a shame because in many ways lean is a nice system but it is > unusable if you want to do structural Mathematics. > I do not recognise your objection. I agree that equality between types is an issue in Lean. What I do not understand is why this matters to mathematicians in practice. Since "working mathematicians" became involved with using Lean the collection of mathematical structures formalised in Lean and theorems about these structures has gone through the roof. Lean as a powerful and exponentially growing classical mathematical library, which covers essentially all of a first year undergraduate mathematics curriculum and is well over half way through the second year, as well as being much more advanced (MSc level) in other areas such as algebra. Maybe I just don't know what "structural mathematics" is, but Lean is certainly usable if you want to do the kind of mathematics which is actually happening in mathematics departments. I am hopeful that one day this will happen with one of the HoTT systems but at the minute the only areas where they appear to go deep are synthetic homotopy theory and category theory, topos theory, abstract higher category theory etc. I have this nagging worry that away from these areas the univalence axiom (and the way it seems to rule out Lean's powerful impredicative Prop and a useful equality taking values in that Prop) is more than a hindrance than a help. But I would love to be proved wrong. One thing that absolutely needs emphasizing is that classical logic is absolutely embedded in an undergraduate mathematics degree nowadays, and no "working mathematician" will take you seriously if you try to remove it. This is apparently an uncomfortable fact for some in the community but it is one which I think it is important to remind people of; mathematics departments went classical in several central areas, many many decades ago, and we are not going back. Yes I know the proof of the odd order theorem is constructive. And we don't care. This is a statement about finite objects and unrepresentative of what is actually happening in 2020. I think that Isabelle/HOL and HOL Light are evidence that for lots of mathematics (especially much of 19th and early 20th century mathematics) one does not even need dependent types, but I have this idea (again which I would love to be wrong about) suggesting that MSc level algebraic geometry and homological algebra are just too inconvenient to use without dependent types. In Lean we are moving onto Ext and Tor in the category of R-modules. I think it would be an extremely interesting project to see how these worked in practice in other systems. Going further -- what is absolutely clear is that to get a better understanding of what the truth actually is, regarding the difficulty formalising the actual mathematics going on in mathematics departments in central areas such as algebra, geometry, number theory, analysis etc, we need *actual data*. We need libraries which correspond to what is being taught in mainstream undergraduate mathematics courses, in all the systems, if we want to see what the actual truth is. Sure every undergraduate pure maths course can be formalised in every system, in theory. But can it be formalised in finite time in a usable way in practice? This is what we simply do not know and I believe that we can only find out by getting more working mathematicians on board. An interesting test with Lean will be what happens when Lean 4 is released. Lean 4 will not be backwards compatible with Lean 3 so the library will have to be ported from scratch, and it's got pretty big. The underlying type theory is not changing but the type class inference system is changing completely, and typeclasses are everywhere in Lean's maths library. I should finish by taking the time to advertise Gabriel Ebner's HoTT library in Lean 3: https://github.com/gebner/hott3 . It adds a [hott] attribute to the system and "disables" singleton elimination. What can one do with it? Nobody really knows. Maybe for you (Thorsten) it's the best of both worlds? Kevin > Thorsten > > ?On 08/03/2020, 14:25, "Agda on behalf of Bas Spitters" < > agda-bounces at lists.chalmers.se on behalf of b.a.w.spitters at gmail.com> > wrote: > > Dear Kevin, > > The excitement about HoTT is that it has brought together several > communities. Some are interested in homotopy theory and higher > category theory, some (like Vladimir) want a new foundation for modern > mathematics. > Some combine those two by higher toposes. > > Some are trying to improve the previous generation of proof > assistants. E.g. this influenced the design of quotients types in > lean. > By Curry-Howard this also influences the design of programming > languages, like the cubical agda programming language > (https://pure.itu.dk/portal/files/84649948/icfp19main_p164_p.pdf) > > If we consider HoTT as an extension of type theory with the univalence > axiom, then *of course* everything that was done before can still be > done. > E.g. the proof of Feit-Thompson is constructive and thus also works in > HoTT. (I can elaborate on this if needed.) > > In fact, classical logic is valid in the simplicial set model > (https://www.math.uwo.ca/faculty/kapulkin/notes/LEM_in_sSet.pdf). > Moreover, that model also interprets strict propositions, so one could > even extend lean with univalence (I believe). > It would be interesting to know whether this simplifies the definition > of perfectoid spaces. > > Best regards, > > Bas > > On Thu, Mar 5, 2020 at 12:25 PM Kevin Buzzard < > kevin.m.buzzard at gmail.com> wrote: > > > > > > > > On Wed, 4 Mar 2020 at 07:18, Martin Escardo > wrote: > >> > >> Dependent types are good for pure mathematics (classical or > >> constructive). They are the natural home to define group, ring, > metric > >> space, topological space, poset, lattice, category, etc, and study > them. > >> Mathematicians that use(d) dependent types include Voevodsky (in > Coq) > >> and Kevin Buzzard (in Lean), among others. Kevin and his team > defined, > >> in particular, perfectoid spaces in dependent type theory. Martin > > > > > > The BCM (Buzzard, Commelin, Massot) paper defined perfectoid spaces > in Lean > > and looking forwards (in the sense of trying to attract "working > mathematicians" > > into the area of formalisation) I think it's an interesting question > as to whether this definition > > could be made in other systems in a way which is actually usable. My > guess: I don't see why it couldn't > > be done in Coq (but of course the type theories of Lean and Coq are > similar), although > > there is a whole bunch of noncomputable stuff embedded in the > mathematics. > > I *suspect* that it would be a real struggle to do it in any of the > HOL systems > > because a sheaf is a dependent type, but these HOL people are good > at tricks > > for working around these things -- personally I would start with > seeing whether > > one can set up a theory of sheaves of modules on a locally ringed > space in a HOL > > system, because that will be the first stumbling block. And as for > the HoTT systems, > > I have no feeling as to whether it is possible to do any serious > mathematics other than > > category theory and synthetic homotopy theory -- my perception is > that > > the user base are more interested in other kinds of questions. > > > > In particular, connecting back to the original question, a sheaf of > modules on a > > locally-ringed space is a fundamental concept which shows up in a > typical MSc > > or early PhD level algebraic geometry course (they were in the MSc > algebraic > > geometry course I took), and if one wants to do this kind of > mathematics in a > > theorem prover (and I do, as do several other people in the Lean > community) > > then I *suspect* that it would be hard without dependent types. On > the other hand > > I would love to be proved wrong. > > > > Kevin > >> > >> > >> On 03/03/2020 19:43, jasongross9 at gmail.com wrote: > >> > I'm in the process of writing my thesis on proof assistant > performance > >> > bottlenecks (with a focus on Coq), and there's a large class of > >> > performance bottlenecks that come from (mis)using the power of > dependent > >> > types. So in writing the introduction, I want to provide some > >> > justification for the design decision of using dependent types, > rather > >> > than, say, set theory or classical logic (as in, e.g., > Isabelle/HOL). > >> > And the only reasons I can come up with are "it's fun" and "lots > of > >> > people do it" > >> > > >> > So I'm asking these mailing lists: why do we base proof > assistants on > >> > dependent type theory? What are the trade-offs involved? > >> > I'm interested both in explanations and arguments given on list, > as well > >> > as in references to papers that discuss these sorts of choices. > >> > > >> > Thanks, > >> > Jason > >> > > >> > _______________________________________________ > >> > Agda mailing list > >> > Agda at lists.chalmers.se > >> > https://lists.chalmers.se/mailman/listinfo/agda > >> > > >> > >> -- > >> Martin Escardo > >> http://www.cs.bham.ac.uk/~mhe > > > > -- > > You received this message because you are subscribed to the Google > Groups "lean-user" group. > > To unsubscribe from this group and stop receiving emails from it, > send an email to lean-user+unsubscribe at googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/lean-user/CAH52Xb0X%3D06U2O7K%2BLGRXyPu%3DhaKxp2FcQr3SFK0f4jm8kv9mQ%40mail.gmail.com > . > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Fri Mar 13 11:56:34 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 13 Mar 2020 13:56:34 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 2 In-Reply-To: References: Message-ID: On 2020-03-09 04:55, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the second release candidate > (RC2) of Agda 2.6.1. > > [..] I test it on ghc-8.8.3, Ubuntu Linux 18.04. After installing it and the master lib of March 13, the command > agda $agdaLibOpt TypeCheckAll.agda +RTS -M3G -RTS reports /home/mechvel/inAgda/bfLib/0.3/TypeCheckAll.agda:1,1-55 Failed to find source of module Codata.Musical.Costring in any of the following locations: /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda /home/mechvel/agda/stLib/masterMar13/src/Codata/Musical/Costring.agda /home/mechvel/agda/stLib/masterMar13/src/Codata/Musical/Costring.lagda /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda /home/mechvel/.cabal/share/x86_64-linux-ghc-8.8.3/Agda-2.6.0.1.20200307/lib/prim/Codata/Musical/Costring.agda /home/mechvel/.cabal/share/x86_64-linux-ghc-8.8.3/Agda-2.6.0.1.20200307/lib/prim/Codata/Musical/Costring.lagda when scope checking the declaration open import Codata.Musical.Costring using (toCostring) ----------------------------------------------------------- ~/.cabal/share has doc man x86_64-linux-ghc-8.8.3 Please, advise, ------ Sergei From Thorsten.Altenkirch at nottingham.ac.uk Fri Mar 13 14:33:19 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 13 Mar 2020 13:33:19 +0000 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> Message-ID: <87BED64F-0185-4BE2-9687-FA5B216A0A79@nottingham.ac.uk> Hey Thorsten, On Thu, 12 Mar 2020 at 15:36, Thorsten Altenkirch > wrote: [snip] This is a shame because in many ways lean is a nice system but it is unusable if you want to do structural Mathematics. I do not recognise your objection. You should ? it is basically the same as what I said in your talk in Nottingham (which was great btw). It seems to me that if you are working with structures, i.e. do structural Mathematics you need to understand what they are and they cannot be reduced to their encodings. Hence what is the equality of structures, if not their structural equality? If I remember correctly, in your talk at Nottingham you discussed a construction by Grothendieck where he used equivalence of structures as if it were equality. This seems to be an omission and you and your students were able to address this, I think by choosing a canonical representation. However, the funny thing was that you were using a system which doesn?t allow you to express any non-structural properties but because of the way equality is done in Lean you cannot exploit this. Hence my understanding of structural Mathematics is very simple: its objects are structures and equality of structures should be structural equality. E.g. equality of (univalent) categories should be equivalence of categories (Why univalent categories: because isomorphic objects should be equal). I don?t know what Mathematics is actually happening in Maths departments but you seem to agree that it can be done in Type Theory, e.g. in Lean. Indeed, in a way Type Theory is not far away from Mathematical practice (if we ignore the question of constructiveness for the moment). And it is different from set theory in that it structural by nature. I just find it strange if one cannot go the last step and exploit this fact. It seems somehow this is a blast from the past: because we cannot have univalence in set theory we don?t need it in type theory either? I agree that equality between types is an issue in Lean. What I do not understand is why this matters to mathematicians in practice. Since "working mathematicians" became involved with using Lean the collection of mathematical structures formalised in Lean and theorems about these structures has gone through the roof. Lean as a powerful and exponentially growing classical mathematical library, which covers essentially all of a first year undergraduate mathematics curriculum and is well over half way through the second year, as well as being much more advanced (MSc level) in other areas such as algebra. Maybe I just don't know what "structural mathematics" is, but Lean is certainly usable if you want to do the kind of mathematics which is actually happening in mathematics departments. I am hopeful that one day this will happen with one of the HoTT systems but at the minute the only areas where they appear to go deep are synthetic homotopy theory and category theory, topos theory, abstract higher category theory etc. I have this nagging worry that away from these areas the univalence axiom (and the way it seems to rule out Lean's powerful impredicative Prop and a useful equality taking values in that Prop) I am not aware that an impredicative Prop is inconsistent with HoTT. Indeed, Voevodsky put forward resizing which is equivalent to having an impredicative universe. is more than a hindrance than a help. But I would love to be proved wrong. One thing that absolutely needs emphasizing is that classical logic is absolutely embedded in an undergraduate mathematics degree nowadays, and no "working mathematician" will take you seriously if you try to remove it. This is apparently an uncomfortable fact for some in the community but it is one which I think it is important to remind people of; mathematics departments went classical in several central areas, many many decades ago, and we are not going back. Yes I know the proof of the odd order theorem is constructive. And we don't care. This is a statement about finite objects and unrepresentative of what is actually happening in 2020. Ok, this is a different topic (and I didn?t say anything about constructive Maths in my original posting). I think the sort of Maths you are doing is very much influenced by what you are using it or what it has been used for in the past. It seems to me that until recently natural science and hardware engineering was the main application of Mathematics and hence influenced what Mathematicians considered as important. The world is changing and computer science and information technology are becoming an important application of Mathematics. For historical reasons and also for reasons of funding a lot of the Maths for Computer Science is actually done at Computer Science departments. I am just thinking that you, the Mathematicians, maybe miss a trick here; and so do we, the Computer Scientists because we could profit more from the wisdom of Mathematicians like yourself. I think that Isabelle/HOL and HOL Light are evidence that for lots of mathematics (especially much of 19th and early 20th century mathematics) one does not even need dependent types, but I have this idea (again which I would love to be wrong about) suggesting that MSc level algebraic geometry and homological algebra are just too inconvenient to use without dependent types. In Lean we are moving onto Ext and Tor in the category of R-modules. I think it would be an extremely interesting project to see how these worked in practice in other systems. Going further -- what is absolutely clear is that to get a better understanding of what the truth actually is, regarding the difficulty formalising the actual mathematics going on in mathematics departments in central areas such as algebra, geometry, number theory, analysis etc, we need *actual data*. We need libraries which correspond to what is being taught in mainstream undergraduate mathematics courses, in all the systems, if we want to see what the actual truth is. Sure every undergraduate pure maths course can be formalised in every system, in theory. But can it be formalised in finite time in a usable way in practice? This is what we simply do not know and I believe that we can only find out by getting more working mathematicians on board. An interesting test with Lean will be what happens when Lean 4 is released. Lean 4 will not be backwards compatible with Lean 3 so the library will have to be ported from scratch, and it's got pretty big. The underlying type theory is not changing but the type class inference system is changing completely, and typeclasses are everywhere in Lean's maths library. I should finish by taking the time to advertise Gabriel Ebner's HoTT library in Lean 3: https://github.com/gebner/hott3 . It adds a [hott] attribute to the system and "disables" singleton elimination. What can one do with it? Nobody really knows. Maybe for you (Thorsten) it's the best of both worlds? Maybe. As I said to me it seems that too much surface stuff is moved into the core of systems like Lean. Thorsten Thorsten On 08/03/2020, 14:25, "Agda on behalf of Bas Spitters" on behalf of b.a.w.spitters at gmail.com> wrote: Dear Kevin, The excitement about HoTT is that it has brought together several communities. Some are interested in homotopy theory and higher category theory, some (like Vladimir) want a new foundation for modern mathematics. Some combine those two by higher toposes. Some are trying to improve the previous generation of proof assistants. E.g. this influenced the design of quotients types in lean. By Curry-Howard this also influences the design of programming languages, like the cubical agda programming language (https://pure.itu.dk/portal/files/84649948/icfp19main_p164_p.pdf) If we consider HoTT as an extension of type theory with the univalence axiom, then *of course* everything that was done before can still be done. E.g. the proof of Feit-Thompson is constructive and thus also works in HoTT. (I can elaborate on this if needed.) In fact, classical logic is valid in the simplicial set model (https://www.math.uwo.ca/faculty/kapulkin/notes/LEM_in_sSet.pdf). Moreover, that model also interprets strict propositions, so one could even extend lean with univalence (I believe). It would be interesting to know whether this simplifies the definition of perfectoid spaces. Best regards, Bas On Thu, Mar 5, 2020 at 12:25 PM Kevin Buzzard > wrote: > > > > On Wed, 4 Mar 2020 at 07:18, Martin Escardo > wrote: >> >> Dependent types are good for pure mathematics (classical or >> constructive). They are the natural home to define group, ring, metric >> space, topological space, poset, lattice, category, etc, and study them. >> Mathematicians that use(d) dependent types include Voevodsky (in Coq) >> and Kevin Buzzard (in Lean), among others. Kevin and his team defined, >> in particular, perfectoid spaces in dependent type theory. Martin > > > The BCM (Buzzard, Commelin, Massot) paper defined perfectoid spaces in Lean > and looking forwards (in the sense of trying to attract "working mathematicians" > into the area of formalisation) I think it's an interesting question as to whether this definition > could be made in other systems in a way which is actually usable. My guess: I don't see why it couldn't > be done in Coq (but of course the type theories of Lean and Coq are similar), although > there is a whole bunch of noncomputable stuff embedded in the mathematics. > I *suspect* that it would be a real struggle to do it in any of the HOL systems > because a sheaf is a dependent type, but these HOL people are good at tricks > for working around these things -- personally I would start with seeing whether > one can set up a theory of sheaves of modules on a locally ringed space in a HOL > system, because that will be the first stumbling block. And as for the HoTT systems, > I have no feeling as to whether it is possible to do any serious mathematics other than > category theory and synthetic homotopy theory -- my perception is that > the user base are more interested in other kinds of questions. > > In particular, connecting back to the original question, a sheaf of modules on a > locally-ringed space is a fundamental concept which shows up in a typical MSc > or early PhD level algebraic geometry course (they were in the MSc algebraic > geometry course I took), and if one wants to do this kind of mathematics in a > theorem prover (and I do, as do several other people in the Lean community) > then I *suspect* that it would be hard without dependent types. On the other hand > I would love to be proved wrong. > > Kevin >> >> >> On 03/03/2020 19:43, jasongross9 at gmail.com wrote: >> > I'm in the process of writing my thesis on proof assistant performance >> > bottlenecks (with a focus on Coq), and there's a large class of >> > performance bottlenecks that come from (mis)using the power of dependent >> > types. So in writing the introduction, I want to provide some >> > justification for the design decision of using dependent types, rather >> > than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). >> > And the only reasons I can come up with are "it's fun" and "lots of >> > people do it" >> > >> > So I'm asking these mailing lists: why do we base proof assistants on >> > dependent type theory? What are the trade-offs involved? >> > I'm interested both in explanations and arguments given on list, as well >> > as in references to papers that discuss these sorts of choices. >> > >> > Thanks, >> > Jason >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> > >> >> -- >> Martin Escardo >> http://www.cs.bham.ac.uk/~mhe > > -- > You received this message because you are subscribed to the Google Groups "lean-user" group. > To unsubscribe from this group and stop receiving emails from it, send an email to lean-user+unsubscribe at googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/lean-user/CAH52Xb0X%3D06U2O7K%2BLGRXyPu%3DhaKxp2FcQr3SFK0f4jm8kv9mQ%40mail.gmail.com. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Fri Mar 13 14:35:47 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 13 Mar 2020 13:35:47 +0000 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? Message-ID: <732D9A81-AAF5-4FC0-ABDD-1CA9D2B76D49@nottingham.ac.uk> Hey Thorsten, On Thu, 12 Mar 2020 at 15:36, Thorsten Altenkirch > wrote: [snip] This is a shame because in many ways lean is a nice system but it is unusable if you want to do structural Mathematics. I do not recognise your objection. You should ? it is basically the same as what I said in your talk in Nottingham (which was great btw). It seems to me that if you are working with structures, i.e. do structural Mathematics you need to understand what they are and they cannot be reduced to their encodings. Hence what is the equality of structures, if not their structural equality? If I remember correctly, in your talk at Nottingham you discussed a construction by Grothendieck where he used equivalence of structures as if it were equality. This seems to be an omission and you and your students were able to address this, I think by choosing a canonical representation. However, the funny thing was that you were using a system which doesn?t allow you to express any non-structural properties but because of the way equality is done in Lean you cannot exploit this. Hence my understanding of structural Mathematics is very simple: its objects are structures and equality of structures should be structural equality. E.g. equality of (univalent) categories should be equivalence of categories (Why univalent categories: because isomorphic objects should be equal). I don?t know what Mathematics is actually happening in Maths departments but you seem to agree that it can be done in Type Theory, e.g. in Lean. Indeed, in a way Type Theory is not far away from Mathematical practice (if we ignore the question of constructiveness for the moment). And it is different from set theory in that it structural by nature. I just find it strange if one cannot go the last step and exploit this fact. It seems somehow this is a blast from the past: because we cannot have univalence in set theory we don?t need it in type theory either? I agree that equality between types is an issue in Lean. What I do not understand is why this matters to mathematicians in practice. Since "working mathematicians" became involved with using Lean the collection of mathematical structures formalised in Lean and theorems about these structures has gone through the roof. Lean as a powerful and exponentially growing classical mathematical library, which covers essentially all of a first year undergraduate mathematics curriculum and is well over half way through the second year, as well as being much more advanced (MSc level) in other areas such as algebra. Maybe I just don't know what "structural mathematics" is, but Lean is certainly usable if you want to do the kind of mathematics which is actually happening in mathematics departments. I am hopeful that one day this will happen with one of the HoTT systems but at the minute the only areas where they appear to go deep are synthetic homotopy theory and category theory, topos theory, abstract higher category theory etc. I have this nagging worry that away from these areas the univalence axiom (and the way it seems to rule out Lean's powerful impredicative Prop and a useful equality taking values in that Prop) I am not aware that an impredicative Prop is inconsistent with HoTT. Indeed, Voevodsky put forward resizing which is equivalent to having an impredicative universe. is more than a hindrance than a help. But I would love to be proved wrong. One thing that absolutely needs emphasizing is that classical logic is absolutely embedded in an undergraduate mathematics degree nowadays, and no "working mathematician" will take you seriously if you try to remove it. This is apparently an uncomfortable fact for some in the community but it is one which I think it is important to remind people of; mathematics departments went classical in several central areas, many many decades ago, and we are not going back. Yes I know the proof of the odd order theorem is constructive. And we don't care. This is a statement about finite objects and unrepresentative of what is actually happening in 2020. Ok, this is a different topic (and I didn?t say anything about constructive Maths in my original posting). I think the sort of Maths you are doing is very much influenced by what you are using it or what it has been used for in the past. It seems to me that until recently natural science and hardware engineering was the main application of Mathematics and hence influenced what Mathematicians considered as important. The world is changing and computer science and information technology are becoming an important application of Mathematics. For historical reasons and also for reasons of funding a lot of the Maths for Computer Science is actually done at Computer Science departments. I am just thinking that you, the Mathematicians, maybe miss a trick here; and so do we, the Computer Scientists because we could profit more from the wisdom of Mathematicians like yourself. I think that Isabelle/HOL and HOL Light are evidence that for lots of mathematics (especially much of 19th and early 20th century mathematics) one does not even need dependent types, but I have this idea (again which I would love to be wrong about) suggesting that MSc level algebraic geometry and homological algebra are just too inconvenient to use without dependent types. In Lean we are moving onto Ext and Tor in the category of R-modules. I think it would be an extremely interesting project to see how these worked in practice in other systems. Going further -- what is absolutely clear is that to get a better understanding of what the truth actually is, regarding the difficulty formalising the actual mathematics going on in mathematics departments in central areas such as algebra, geometry, number theory, analysis etc, we need *actual data*. We need libraries which correspond to what is being taught in mainstream undergraduate mathematics courses, in all the systems, if we want to see what the actual truth is. Sure every undergraduate pure maths course can be formalised in every system, in theory. But can it be formalised in finite time in a usable way in practice? This is what we simply do not know and I believe that we can only find out by getting more working mathematicians on board. An interesting test with Lean will be what happens when Lean 4 is released. Lean 4 will not be backwards compatible with Lean 3 so the library will have to be ported from scratch, and it's got pretty big. The underlying type theory is not changing but the type class inference system is changing completely, and typeclasses are everywhere in Lean's maths library. I should finish by taking the time to advertise Gabriel Ebner's HoTT library in Lean 3: https://github.com/gebner/hott3 . It adds a [hott] attribute to the system and "disables" singleton elimination. What can one do with it? Nobody really knows. Maybe for you (Thorsten) it's the best of both worlds? Maybe. As I said to me it seems that too much surface stuff is moved into the core of systems like Lean. Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at kenkubota.de Fri Mar 13 17:06:30 2020 From: mail at kenkubota.de (Ken Kubota) Date: Fri, 13 Mar 2020 17:06:30 +0100 Subject: [Agda] =?utf-8?q?Concepts_within_Type_Theory_=E2=80=93_Re=3A_=5B?= =?utf-8?q?Coq-Club=5D__Type_Theory_vs=2E_Set_Theory_=E2=80=93_Re=3A_Why_d?= =?utf-8?q?ependent_type_theory=3F?= In-Reply-To: <3A2A5A12-A376-4B65-97E5-38AE8219667C@nottingham.ac.uk> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> <3A2A5A12-A376-4B65-97E5-38AE8219667C@nottingham.ac.uk> Message-ID: <790BE230-C96B-43FC-A206-C1AAAEE655D9@kenkubota.de> Hi Thorsten, > Am 10.03.2020 um 12:10 schrieb Thorsten Altenkirch : > > > 2. It should be possible to derive all of mathematics from type theory (in particular, from a dependent type variant of Andrews' Q0). > This claim is not only stronger as is covers all (!) of mathematics possibly expressible (instead of only "the whole of known [!] mathematics"). > Q0 was specifically designed in this spirit ("to derive practically the whole of [...] mathematics from a single source"), what Andrews calls "expressiveness". > The claim that a further developed variant of Q0 would be identical with (all of) mathematics was made earlier here: > https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/7fCLcrftCQAJ > > I don?t agree with this description. As set theory, type theory is an evolving system. For example a while ago we were using intensional type theory with uniqueness of identity proofs and now we have a much more extensional type theory with univalence and without uip. And also the question isn?t just wether we ?can derive? all Mathematics but can we structure mathematical constructions in a reasonable way. Otherwise we are left with the usual argument that all programs can be written in machine language. It seems that the traditions of type theory we represent are very different, so a reasonable answer should reflect the underlying basic design decisions. In the examples you mention intensional type theory, the univalence axiom, and the desire to "structure mathematical constructions in a reasonable way". My concept of type theory is in the tradition of Russell, Church, and Andrews ? in particular Andrews' Q0, which is an elegant reformulation of Church's type theory (1940, see: https://owlofminerva.net/sep-q0 ). The purpose of the types in this concept of type theory is mainly to preserve the dependencies such that (negative) self-reference causing paradoxes/antinomies is avoided, as discussed here: https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2018-June/msg00048.html This means that types are the result of simple operations such as lambda abstraction and lambda application (cf. wff constructions (b) and (c) at [Andrews 2002 (ISBN 1-4020-0763-9), p. 211]). Moreover, using Andrews' concept of "expressiveness" (also intuitively used by Church before), all mathematical concepts can be reduced ? naturally (not like in machine language) ? to a few basic notions: Q0 basically has a single variable binder (lambda), two primitive symbols and two primitive types, and a single rule of inference. R0 has only little more (some features required for type variables, type abstraction, and dependent types). Both are Hilbert-style systems (operating at the object language level only). The notion of type theory you refer to seems to intend more than just preventing (negative) self-reference. The univalence axiom, and the desire to ?structure mathematical constructions in a reasonable way? are motivated by philosophical or metamathematical considerations. These motivations have their legitimation, but shouldn?t be part of the formal language. For this reason I already object to the Pi type (as implemented in Lean), or dependent function type, which I consider a metamathematical notion: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/bvVem1BZCQAJ I believe that type abstraction is fully sufficient to express what the Pi type is supposed to express. How is type abstraction implemented in Lean, and where can I find the group definition? Concerning constructivism (intuitionism) and intensionality, these are philosophical debates with little relevance for mathematics nowadays. I fully agree to Kevin Buzzard?s argument that "within mathematics departments, the prevailing view is that Hilbert won the argument 100 years ago and we have not looked back since, despite what constructivists want us to believe." ? https://xenaproject.wordpress.com/2020/02/09/where-is-the-fashionable-mathematics/ Kind regards, Ken Kubota ____________________________________________________ Ken Kubota doi.org/10.4444/100 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Fri Mar 13 17:19:49 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 13 Mar 2020 16:19:49 +0000 Subject: [Agda] =?utf-8?q?=5BCoq-Club=5D_Concepts_within_Type_Theory_?= =?utf-8?b?4oCTIFJlOiAgVHlwZSBUaGVvcnkgdnMuIFNldCBUaGVvcnkg4oCTIFJlOiBX?= =?utf-8?q?hy_dependent_type_theory=3F?= In-Reply-To: <790BE230-C96B-43FC-A206-C1AAAEE655D9@kenkubota.de> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> <3A2A5A12-A376-4B65-97E5-38AE8219667C@nottingham.ac.uk> <790BE230-C96B-43FC-A206-C1AAAEE655D9@kenkubota.de> Message-ID: <0562D2FB-1DED-43A0-B4AE-9A3F999F2BFF@nottingham.ac.uk> This means that types are the result of simple operations such as lambda abstraction and lambda application (cf. wff constructions (b) and (c) at [Andrews 2002 (ISBN 1-4020-0763-9), p. 211]). This means you have a very intensional view of Mathematics centred around encodings. I think this is misleading because Mathematics is about abstraction and abstract concepts, encodings are only coincidental. Moreover, using Andrews' concept of "expressiveness" (also intuitively used by Church before), all mathematical concepts can be reduced ? naturally (not like in machine language) ? to a few basic notions: Q0 basically has a single variable binder (lambda), two primitive symbols and two primitive types, and a single rule of inference. R0 has only little more (some features required for type variables, type abstraction, and dependent types). Both are Hilbert-style systems (operating at the object language level only). This seems to be a view of mathematical foundations stuck in the middle of the last century. The notion of type theory you refer to seems to intend more than just preventing (negative) self-reference. The univalence axiom, and the desire to ?structure mathematical constructions in a reasonable way? are motivated by philosophical or metamathematical considerations. These motivations have their legitimation, but shouldn?t be part of the formal language. For this reason I already object to the Pi type (as implemented in Lean), or dependent function type, which I consider a metamathematical notion: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/bvVem1BZCQAJ I believe that type abstraction is fully sufficient to express what the Pi type is supposed to express. So you are only interested in some mathematical machine code but not in the high level notions. Such a view of mathematical foundation is akin to the view some programmers had (and maybe still have) that all what matters is machine code. To the contrary you can build the same foundations on different notions of machine code. The machine code is irrelevant, all what matters are the abstractions. How is type abstraction implemented in Lean, and where can I find the group definition? I have no idea about Lean, not do I know what you mean by ?type abstraction?. Polymorphism, that is constructions which are parametric in types are simply depdnent functions which have a universe as input. Concerning constructivism (intuitionism) and intensionality, these are philosophical debates with little relevance for mathematics nowadays. I fully agree to Kevin Buzzard?s argument that "within mathematics departments, the prevailing view is that Hilbert won the argument 100 years ago and we have not looked back since, despite what constructivists want us to believe." ? https://xenaproject.wordpress.com/2020/02/09/where-is-the-fashionable-mathematics/ I think you miss a trick or two here. Constructivism is highly relevant, especially in computer science when we want to marry computer science with mathematical constructions. Hilbert is already dead since a while and before the first computer has been build. The world is changing, maybe philosophers and mathematicians should take notice of this. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Fri Mar 13 20:49:13 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 13 Mar 2020 19:49:13 +0000 Subject: [Agda] =?utf-8?q?Concepts_within_Type_Theory_=E2=80=93_Re=3A_=5B?= =?utf-8?q?Coq-Club=5D_Type_Theory_vs=2E_Set_Theory_=E2=80=93_Re=3A_Why_de?= =?utf-8?q?pendent_type_theory=3F?= In-Reply-To: <790BE230-C96B-43FC-A206-C1AAAEE655D9@kenkubota.de> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> <3A2A5A12-A376-4B65-97E5-38AE8219667C@nottingham.ac.uk> <790BE230-C96B-43FC-A206-C1AAAEE655D9@kenkubota.de> Message-ID: On 13/03/2020 16:06, mail at kenkubota.de wrote: > Concerning constructivism (intuitionism) and intensionality, these are > philosophical debates with little relevance for mathematics nowadays. Constructive mathematics may be of little relevance for mathematics - and it is for mathematicians to decide for themselves, for their own consumption, whether this is really the case. But clearly constructive mathematics is relevant for computation. I understand that most mathematicians are not interested in computation, and this is fine (and in fact most computer scientists are not interested in constructive mathematics either). But we now have computers and we compute with them and we want to compute more, and constructive mathematics gives a tool to do that - among other tools, most of which are based on non-constructive mathematics, indeed. But regarding applications of constructive mathematics to computation, for example, a former PhD student of mine, Chuangjie Xu, constructed a sheaf topos (in dependent type theory, in its Agda incarnation), for the sole purpose of computing a number. Good luck using a Turing Machine or a Java program for defining and computing this number (which Agda computed under a minute). This number is the modulus of uniform continuity of an arbitrary function defined on the Cantor space in a certain kind of laguage (spoiler: this language can be chosen to be dependent type theory itself, among others). This may not be progress in mathematics, but it is certainly progress in computation / computability (and in logic, if mathematicians are suspicious of it as well): We can compute an integer, in theory and in practice (and fast), using a Grothendieck topos. Rather than coming up with a contrived Turing Machine, or an awkward Java program, or even an "elegant" Haskell program, just write a constructive proof - that is, a mathematical proof that is like a normal proof but doesn't use excluded middle. I think the mathematics and computer science communities should, at this point of history, be joining forces rather than arguing about the sex of the angels. There is only one mathematics, and it includes both non-constructive and constructive mathematics. You don't need to like both branches, in the same way that you don't need to like every branch of mathematics (and I am sure you don't). If you don't like one of them - and I have in mind Thorsten and Kevin, please keep quiet and do your own thing, instead of insisting that what you do is the ultimately good and correct and mainstream and accepted and blessed kind of mathematics. :-) Best, Martin From Thorsten.Altenkirch at nottingham.ac.uk Fri Mar 13 22:39:04 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 13 Mar 2020 21:39:04 +0000 Subject: [Agda] =?utf-8?q?Concepts_within_Type_Theory_=E2=80=93_Re=3A_=5B?= =?utf-8?q?Coq-Club=5D_Type_Theory_vs=2E_Set_Theory_=E2=80=93_Re=3A_Why_de?= =?utf-8?q?pendent_type_theory=3F?= In-Reply-To: References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> <3A2A5A12-A376-4B65-97E5-38AE8219667C@nottingham.ac.uk> <790BE230-C96B-43FC-A206-C1AAAEE655D9@kenkubota.de>, Message-ID: > There is only one mathematics, and it includes both non-constructive and constructive mathematics. You don't need to like both branches, in the same way that you don't need to like every branch of mathematics (and I am sure you don't). If you don't like one of them - and I have in mind Thorsten and Kevin, please keep quiet and do your own thing, instead of insisting that what you do is the ultimately good and correct and mainstream and accepted and blessed kind of mathematics. :-) I agree and I don?t think I ever was selling constructive math as the ultimate good but I suggested that there should be some awareness of constructive issues among Mathematicians. Thorsten > > Best, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From asr at eafit.edu.co Sat Mar 14 01:00:43 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Fri, 13 Mar 2020 19:00:43 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 2 In-Reply-To: References: Message-ID: On Fri, 13 Mar 2020 at 05:56, wrote: > > I test it on ghc-8.8.3, Ubuntu Linux 18.04. > After installing it and the master lib of March 13, the command > > > agda $agdaLibOpt TypeCheckAll.agda +RTS -M3G -RTS > > reports > /home/mechvel/inAgda/bfLib/0.3/TypeCheckAll.agda:1,1-55 > Failed to find source of module Codata.Musical.Costring in any of > the following locations: > /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda > /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda > /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda > /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda > /home/mechvel/agda/stLib/masterMar13/src/Codata/Musical/Costring.agda > /home/mechvel/agda/stLib/masterMar13/src/Codata/Musical/Costring.lagda > /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda > /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda I couldn't reproduce the problem. I guess the error is not related to the release candidate but to the "installation" of the master branch of the standard library. Which is the output of $ ls /home/mechvel/agda/stLib/masterMar13/src/Codata/Musical/Costring.agda ? -- Andr?s From mechvel at scico.botik.ru Sat Mar 14 05:31:22 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 14 Mar 2020 07:31:22 +0300 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 release candidate 2 In-Reply-To: References: Message-ID: <814a9e0cc32aa6ab892621da1968e907@scico.botik.ru> On 2020-03-14 03:00, Andr?s Sicard-Ram?rez wrote: > On Fri, 13 Mar 2020 at 05:56, wrote: >> >> I test it on ghc-8.8.3, Ubuntu Linux 18.04. >> After installing it and the master lib of March 13, the command >> >> > agda $agdaLibOpt TypeCheckAll.agda +RTS -M3G -RTS >> >> reports >> /home/mechvel/inAgda/bfLib/0.3/TypeCheckAll.agda:1,1-55 >> Failed to find source of module Codata.Musical.Costring in any of >> the following locations: >> /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda >> /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda >> /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda >> /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda >> >> /home/mechvel/agda/stLib/masterMar13/src/Codata/Musical/Costring.agda >> >> /home/mechvel/agda/stLib/masterMar13/src/Codata/Musical/Costring.lagda >> /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.agda >> /home/mechvel/inAgda/bfLib/0.3/Codata/Musical/Costring.lagda > > I couldn't reproduce the problem. I guess the error is not related to > the release candidate but to the "installation" of the master branch > of the standard library. > > Which is the output of > > $ ls > /home/mechvel/agda/stLib/masterMar13/src/Codata/Musical/Costring.agda > > ? I am sorry. I have put it into ..masterMarch13.., but have set ..masterMar13.. on the path. Now, it stops at this point: References: Message-ID: <8fa6cbdefa09e485172f8897fdff4e03@scico.botik.ru> On 2020-03-09 04:55, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the second release candidate > (RC2) of Agda 2.6.1. > > [..] I have tested it on ghc-8.8.3, MAlonzo, Ubuntu Linux 18.04 on a certain BFLib library for binary integers and general Fraction. The type check is 50% less space eager and 8% faster than in Agda -January 2, 2019, ghc-8.6.3. The run time performance is 5% higher on one example and 30% lower on another example (summing fractions with large denominators in binary system). Probably it is better than Agda-January. And what do it mean these 30% in the last example, it is difficult to tell now. Regards, ------ Sergei From mail at kenkubota.de Sat Mar 14 23:00:39 2020 From: mail at kenkubota.de (Ken Kubota) Date: Sat, 14 Mar 2020 23:00:39 +0100 Subject: [Agda] =?utf-8?q?=5BCoq-Club=5D_Concepts_within_Type_Theory_?= =?utf-8?b?4oCTIFJlOiAgVHlwZSBUaGVvcnkgdnMuIFNldCBUaGVvcnkg4oCTIFJlOiBX?= =?utf-8?q?hy_dependent_type_theory=3F?= In-Reply-To: <0562D2FB-1DED-43A0-B4AE-9A3F999F2BFF@nottingham.ac.uk> References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> <3A2A5A12-A376-4B65-97E5-38AE8219667C@nottingham.ac.uk> <790BE230-C96B-43FC-A206-C1AAAEE655D9@kenkubota.de> <0562D2FB-1DED-43A0-B4AE-9A3F999F2BFF@nottingham.ac.uk> Message-ID: > Am 13.03.2020 um 17:19 schrieb Thorsten Altenkirch : > > This means that types are the result of simple operations such as lambda abstraction and lambda application (cf. wff constructions (b) and (c) at [Andrews 2002 (ISBN 1-4020-0763-9), p. 211]). > > This means you have a very intensional view of Mathematics centred around encodings. I think this is misleading because Mathematics is about abstraction and abstract concepts, encodings are only coincidental. Of course, encoding is not a self-purpose. That all logical connectives can be defined in terms of the Sheffer stroke is coincidental and not of particular interest. But the concept of expressiveness (reducibility) used by Andrews (and intuitively by Church) is very natural, and for good reason many mathematicians endorse these formulations of higher-order logic (Church's type theory, Andrews' Q0, Gordon's HOL), and the implementations are widely used (HOL4, HOL Light, Isabelle/HOL). In this concept, the reduction to certain primitive symbols is very natural and reveals the inner logic of high level notions. > Moreover, using Andrews' concept of "expressiveness" (also intuitively used by Church before), all mathematical concepts can be reduced ? naturally (not like in machine language) ? to a few basic notions: > Q0 basically has a single variable binder (lambda), two primitive symbols and two primitive types, and a single rule of inference. > R0 has only little more (some features required for type variables, type abstraction, and dependent types). > Both are Hilbert-style systems (operating at the object language level only). > > This seems to be a view of mathematical foundations stuck in the middle of the last century. > > The notion of type theory you refer to seems to intend more than just preventing (negative) self-reference. > The univalence axiom, and the desire to ?structure mathematical constructions in a reasonable way? are motivated by philosophical or metamathematical considerations. > These motivations have their legitimation, but shouldn?t be part of the formal language. > > For this reason I already object to the Pi type (as implemented in Lean), or dependent function type, which I consider a metamathematical notion: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/bvVem1BZCQAJ > I believe that type abstraction is fully sufficient to express what the Pi type is supposed to express. > > So you are only interested in some mathematical machine code but not in the high level notions. Such a view of mathematical foundation is akin to the view some programmers had (and maybe still have) that all what matters is machine code. To the contrary you can build the same foundations on different notions of machine code. The machine code is irrelevant, all what matters are the abstractions. It is important to distinguish two different kinds of high level notions: Those that can be reduced naturally to primitive symbols, and those which try to express metamathematical ideas (which seems to be your notion). The latter shouldn't be implemented as primitive symbols in the basic formal language, but should be the result of metamathematical reasoning. > How is type abstraction implemented in Lean, and where can I find the group definition? > > I have no idea about Lean, not do I know what you mean by ?type abstraction?. Polymorphism, that is constructions which are parametric in types are simply depdnent functions which have a universe as input. Lambda as the single variable binder in formulations of higher-order logic (Church, Andrews, Gordon) traditionally can be used to bind _term variables_ only. Type abstraction allows for binding _type variables_ also. See https://owlofminerva.net/kubota/software-implementation-of-the-mathematical-logic-r0-available-for-download/ and https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2018-September/msg00045.html Kevin Buzzard has (like Freek Wiedijk) correctly stated that current classical higher-order logic is too weak to express certain mathematical concepts. The main reason is that the feature of type abstraction is missing. Gordon has suggested implementing this, but unfortunately this didn't happen in the current HOL systems (HOL4, HOL Light, Isabelle/HOL). Andrews and Melham did some work into this direction, but used the traditional quantifiers to bind type variables, not lambda. > Concerning constructivism (intuitionism) and intensionality, these are philosophical debates with little relevance for mathematics nowadays. > I fully agree to Kevin Buzzard?s argument that "within mathematics departments, the prevailing view is that Hilbert won the argument 100 years ago and we have not looked back since, despite what constructivists want us to believe." ? https://xenaproject.wordpress.com/2020/02/09/where-is-the-fashionable-mathematics/ > > I think you miss a trick or two here. Constructivism is highly relevant, especially in computer science when we want to marry computer science with mathematical constructions. Hilbert is already dead since a while and before the first computer has been build. The world is changing, maybe philosophers and mathematicians should take notice of this. The formulation of the formal system depends on the purpose. Even within mathematics different formulations are required: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/lArtWey5CQAJ (last part on the two-step approach). However, from a logical (mathematical) point of view I do not see any need for constructivism. > Cheers, > Thorsten Kind regards, Ken Kubota ____________________________________________________ Ken Kubota doi.org/10.4444/100 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Mar 15 17:12:01 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 15 Mar 2020 16:12:01 +0000 Subject: [Agda] =?utf-8?q?=5BCoq-Club=5D_Concepts_within_Type_Theory_?= =?utf-8?b?4oCTIFJlOiAgVHlwZSBUaGVvcnkgdnMuIFNldCBUaGVvcnkg4oCTIFJlOiBX?= =?utf-8?q?hy_dependent_type_theory=3F?= In-Reply-To: References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> <5A4889D8-3BD8-49E3-AFEE-ED1CEF457C2B@kenkubota.de> <3A2A5A12-A376-4B65-97E5-38AE8219667C@nottingham.ac.uk> <790BE230-C96B-43FC-A206-C1AAAEE655D9@kenkubota.de> <0562D2FB-1DED-43A0-B4AE-9A3F999F2BFF@nottingham.ac.uk> Message-ID: <1F748169-3FDE-4D03-A9BD-32C82702348B@nottingham.ac.uk> Am 13.03.2020 um 17:19 schrieb Thorsten Altenkirch >: This means that types are the result of simple operations such as lambda abstraction and lambda application (cf. wff constructions (b) and (c) at [Andrews 2002 (ISBN 1-4020-0763-9), p. 211]). This means you have a very intensional view of Mathematics centred around encodings. I think this is misleading because Mathematics is about abstraction and abstract concepts, encodings are only coincidental. Of course, encoding is not a self-purpose. That all logical connectives can be defined in terms of the Sheffer stroke is coincidental and not of particular interest. But the concept of expressiveness (reducibility) used by Andrews (and intuitively by Church) is very natural, and for good reason many mathematicians endorse these formulations of higher-order logic (Church's type theory, Andrews' Q0, Gordon's HOL), and the implementations are widely used (HOL4, HOL Light, Isabelle/HOL). In this concept, the reduction to certain primitive symbols is very natural and reveals the inner logic of high level notions. First of all it is important to realize that Type Theory in the sense of Church and HOL and Type Theory in the sense of Martin-Loef are some completely different ideas which are only superficially similar in that the share the word Type and use lambda terms to some degree. Type Theory ala Martin-Loef (MLTT) was intended as a foundation of constructive Mathematics, while the systems you refer to are based on very strong classical assumptions. The idea that there should be any sort of reduction from MLTT to Q0 or HOL is quite absurd. We understand reduction as explaining something, the notions you are used have no explanations from an intuitionistic point of view. This sort of reduction should be called complication, because it ?reduces? something I can understand to something I don?t. Moreover, using Andrews' concept of "expressiveness" (also intuitively used by Church before), all mathematical concepts can be reduced ? naturally (not like in machine language) ? to a few basic notions: Q0 basically has a single variable binder (lambda), two primitive symbols and two primitive types, and a single rule of inference. R0 has only little more (some features required for type variables, type abstraction, and dependent types). Both are Hilbert-style systems (operating at the object language level only). This seems to be a view of mathematical foundations stuck in the middle of the last century. The notion of type theory you refer to seems to intend more than just preventing (negative) self-reference. The univalence axiom, and the desire to ?structure mathematical constructions in a reasonable way? are motivated by philosophical or metamathematical considerations. These motivations have their legitimation, but shouldn?t be part of the formal language. For this reason I already object to the Pi type (as implemented in Lean), or dependent function type, which I consider a metamathematical notion: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/bvVem1BZCQAJ I believe that type abstraction is fully sufficient to express what the Pi type is supposed to express. So you are only interested in some mathematical machine code but not in the high level notions. Such a view of mathematical foundation is akin to the view some programmers had (and maybe still have) that all what matters is machine code. To the contrary you can build the same foundations on different notions of machine code. The machine code is irrelevant, all what matters are the abstractions. It is important to distinguish two different kinds of high level notions: Those that can be reduced naturally to primitive symbols, and those which try to express metamathematical ideas (which seems to be your notion). The latter shouldn't be implemented as primitive symbols in the basic formal language, but should be the result of metamathematical reasoning. This is the game you are playing which seems to be some sort of glass pearl game to me. Modern type theory is quite close to basic mathematical intuitions and is based on organizing mathematical objects as types ? it makes only sense to talk about elements of types. Propositions do not arise as primitive concepts but they can be understood as types which carry no information. A predicate over a type A is a function P : A -> Prop, and proving that a predicate holds universally is to exhibit an element of the Pi type: Pi x:A.P x. In this way Pi-types are not a ?metamathematical notation? but they are the very base of understanding the meaning of quantification. However, Pi-types have more applications, for example we can use it to give precise types to operations like matrix multiplication indexed by dimensions. Type Theory also is very successful to work with structural Mathematics in the sense of category theory. Understanding this is at the core of Homotopy Type Theory. Type Theory by its very nature only allows structural operations, that is we cannot observe encodings. The payback is in the univalence principle which basically says that structural equivalence (for example equivalence of categories) is equality. This notion of equality is a bit unusual in that equality in general is not a proposition but a structure, i.e. there is usually more than one isomorphism between sets. I think there is a deep connection between the constructive and structural nature of type theory, even though classical Mathematicians may be more interested in the latter. How is type abstraction implemented in Lean, and where can I find the group definition? I have no idea about Lean, not do I know what you mean by ?type abstraction?. Polymorphism, that is constructions which are parametric in types are simply depdnent functions which have a universe as input. Lambda as the single variable binder in formulations of higher-order logic (Church, Andrews, Gordon) traditionally can be used to bind _term variables_ only. Type abstraction allows for binding _type variables_ also. See https://owlofminerva.net/kubota/software-implementation-of-the-mathematical-logic-r0-available-for-download/ and https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2018-September/msg00045.html Kevin Buzzard has (like Freek Wiedijk) correctly stated that current classical higher-order logic is too weak to express certain mathematical concepts. The main reason is that the feature of type abstraction is missing. Gordon has suggested implementing this, but unfortunately this didn't happen in the current HOL systems (HOL4, HOL Light, Isabelle/HOL). Andrews and Melham did some work into this direction, but used the traditional quantifiers to bind type variables, not lambda. In MLTT or HOTT, type quantification is handled via the notion of a universe U. Quantification over a universe is handled like quantification over any other type. So for example List is simple a function U -> U, and a polymorphic function like reverse has a Pi type: Pi A : U, List U -> List U. Indeed here are 2 Pi-types at play here a dependent one Pi, and a non-dependent one -> which is a special case of the dependent one. Concerning constructivism (intuitionism) and intensionality, these are philosophical debates with little relevance for mathematics nowadays. I fully agree to Kevin Buzzard?s argument that "within mathematics departments, the prevailing view is that Hilbert won the argument 100 years ago and we have not looked back since, despite what constructivists want us to believe." ? https://xenaproject.wordpress.com/2020/02/09/where-is-the-fashionable-mathematics/ I think you miss a trick or two here. Constructivism is highly relevant, especially in computer science when we want to marry computer science with mathematical constructions. Hilbert is already dead since a while and before the first computer has been build. The world is changing, maybe philosophers and: mathematicians should take notice of this. The formulation of the formal system depends on the purpose. Even within mathematics different formulations are required: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/lArtWey5CQAJ (last part on the two-step approach). However, from a logical (mathematical) point of view I do not see any need for constructivism. We should strive to explain our notions, not just apply some formal reduction. Classical reasoning is based on the idea that mathematical objects behave like objects in the real world (actually maybe even the real world isn?t completely classical if we take quantum theory into account). This seems quite preposterous because they are really constructions in our head and an absolute notion of truth isn?t really available here. However, it turns out this is also unnecessary: instead of appealing to platonic truth we can just talk about evidence. That means a proposition is not something which is true or false, but a proposition is something you can have evidence for. The evidence can be expressed as a type and this is the core of the propositions as types explanation (sometimes called Curry-Howard equivalence). Once you go with this you find that there is another, intuitively appealing way to do Mathematics which provides much more explanatory power. It also links well with computer science or more generally with the need to link mathematical constructions to effective procedures. It is true that many main stream Mathematicians aren?t very concerned with intuitionism. Clearly this is a cultural phenomenon and to conclude that it should be so because it is so seems to be a fallacy. A good understanding of both classical and constructive notions should be at the core of a decent mathematical education. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Mar 15 17:18:16 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 15 Mar 2020 16:18:16 +0000 Subject: [Agda] =?utf-8?q?=5BCoq-Club=5D_Concepts_within_Type_Theory_?= =?utf-8?b?4oCTIFJlOiAgVHlwZSBUaGVvcnkgdnMuIFNldCBUaGVvcnkg4oCTIFJlOiBX?= =?utf-8?q?hy_dependent_type_theory=3F?= Message-ID: <37524413-2BDB-4F50-9458-FD43DB5D3B3D@nottingham.ac.uk> From: Agda on behalf of Ken Kubota Date: Saturday, 14 March 2020 at 22:00 Of course, encoding is not a self-purpose. That all logical connectives can be defined in terms of the Sheffer stroke is coincidental and not of particular interest. But the concept of expressiveness (reducibility) used by Andrews (and intuitively by Church) is very natural, and for good reason many mathematicians endorse these formulations of higher-order logic (Church's type theory, Andrews' Q0, Gordon's HOL), and the implementations are widely used (HOL4, HOL Light, Isabelle/HOL). In this concept, the reduction to certain primitive symbols is very natural and reveals the inner logic of high level notions. First of all it is important to realize that Type Theory in the sense of Church and HOL and Type Theory in the sense of Martin-Loef are some completely different ideas which are only superficially similar in that the share the word Type and use lambda terms. Type Theory ala Martin-Loef (MLTT) was intended as a foundation of constructive Mathematics, while the systems you refer to are based on very strong classical assumptions. The idea that there should be any sort of reduction from MLTT to Q0 or HOL is quite absurd. We understand reduction as explaining something, the notions you are used have no explanations from an intuitionistic point of view. This sort of reduction should be called complication, because it ?reduces? something I can understand to something I don?t. It is important to distinguish two different kinds of high level notions: Those that can be reduced naturally to primitive symbols, and those which try to express metamathematical ideas (which seems to be your notion). The latter shouldn't be implemented as primitive symbols in the basic formal language, but should be the result of metamathematical reasoning. This is the game you are playing which seems to be some sort of glass pearl game to me. Modern type theory is quite close to basic mathematical intuitions and is based on organizing mathematical objects as types ? it makes only sense to talk about elements of types. Propositions do not arise as primitive concepts but they can be understood as types which carry no information. A predicate over a type A is a function P : A -> Prop, and proving that a predicate holds universally is to exhibit an element of the Pi type: Pi x:A.P x. In this way Pi-types are not a ?metamathematical notation? but they are the very base of understanding the meaning of quantification. However, Pi-types have more applications, for example we can use it to give precise types to operations like matrix multiplication indexed by dimensions. Type Theory also is very successful to work with structural Mathematics in the sense of category theory. Understanding this is at the core of Homotopy Type Theory. Type Theory by its very nature only allows structural operations, that is we cannot observe encodings. The payback is in the univalence principle which basically says that structural equivalence (for example equivalence of categories) is equality. This notion of equality is a bit unusual in that equality in general is not a proposition but a structure, i.e. there is usually more than one isomorphism between sets. I think there is a deep connection between the constructive and structural nature of type theory, even though classical Mathematicians may be more interested in the latter. Lambda as the single variable binder in formulations of higher-order logic (Church, Andrews, Gordon) traditionally can be used to bind _term variables_ only. Type abstraction allows for binding _type variables_ also. See https://owlofminerva.net/kubota/software-implementation-of-the-mathematical-logic-r0-available-for-download/ and https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2018-September/msg00045.html Kevin Buzzard has (like Freek Wiedijk) correctly stated that current classical higher-order logic is too weak to express certain mathematical concepts. The main reason is that the feature of type abstraction is missing. Gordon has suggested implementing this, but unfortunately this didn't happen in the current HOL systems (HOL4, HOL Light, Isabelle/HOL). Andrews and Melham did some work into this direction, but used the traditional quantifiers to bind type variables, not lambda. In MLTT or HOTT, type quantification is handled via the notion of a universe U. Quantification over a universe is handled like quantification over any other type. So for example List is simple a function U -> U, and a polymorphic function like reverse has a Pi type: Pi A : U, List U -> List U. Indeed here are 2 Pi-types at play here a dependent one Pi, and a non-dependent one -> which is a special case of the dependent one. The formulation of the formal system depends on the purpose. Even within mathematics different formulations are required: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/lArtWey5CQAJ (last part on the two-step approach). However, from a logical (mathematical) point of view I do not see any need for constructivism. We should strive to explain our notions, not just apply some formal reduction. Classical reasoning is based on the idea that mathematical objects behave like objects in the real world (actually maybe even the real world isn?t completely classical if we take quantum theory into account). This seems quite preposterous because they are really constructions in our head and an absolute notion of truth isn?t really available here. However, it turns out this is also unnecessary: instead of appealing to platonic truth we can just talk about evidence. That means a proposition is not something which is true or false, but a proposition is something you can have evidence for. The evidence can be expressed as a type and this is the core of the propositions as types explanation (sometimes called Curry-Howard equivalence). Once you go with this you find that there is another, intuitively appealing way to do Mathematics which provides much more explanatory power. It also links well with computer science or more generally with the need to link mathematical constructions to effective procedures. It is true that many main stream Mathematicians aren?t very concerned with intuitionism. Clearly this is a cultural phenomenon and to conclude that it should be so because it is so seems to be a fallacy. A good understanding of both classical and constructive notions should be at the core of a decent mathematical education. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Mon Mar 16 06:49:30 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Mon, 16 Mar 2020 00:49:30 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 Message-ID: Dear all, The Agda Team is very pleased to announce the release of Agda 2.6.1. * GHC supported versions Agda 2.6.1 has been tested with GHC 8.8.3, 8.6.5, 8.4.4, 8.2.2 and 8.0.2. Support for GHC 7.10.3 was removed. * Installation cabal update && cabal install Agda * Standard library For the time being, you can use the *master* branch of the standard library which is compatible with Agda 2.6.1. This branch is available at https://github.com/agda/agda-stdlib/ * What is new, fixed issues and incompatibilities See http://hackage.haskell.org/package/Agda-2.6.1/changelog Enjoy Agda 2.6.1. -- Andr?s on behalf of the Agda Team From mietek at bak.io Mon Mar 16 19:40:51 2020 From: mietek at bak.io (=?UTF-8?Q?Mi=C3=ABtek_Bak?=) Date: Mon, 16 Mar 2020 19:40:51 +0100 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 In-Reply-To: References: Message-ID: <013f8628-a0d0-4fcf-b7ef-615f84c039a5@www.fastmail.com> Can we make it a rule that the standard library gets a release at the same time as Agda? The lack of an updated tag for agda-stdlib is currently blocking Agda 2.6.1 on Homebrew. https://github.com/Homebrew/homebrew-core/pull/51773/files#r393225880 -- MB On Mon, Mar 16, 2020, at 06:49, Andr?s Sicard-Ram?rez wrote: > Dear all, > > The Agda Team is very pleased to announce the release of Agda 2.6.1. > > * GHC supported versions > > Agda 2.6.1 has been tested with GHC 8.8.3, 8.6.5, 8.4.4, 8.2.2 and > 8.0.2. Support for GHC 7.10.3 was removed. > > * Installation > > cabal update && cabal install Agda > > * Standard library > > For the time being, you can use the *master* branch of the > standard library which is compatible with Agda 2.6.1. This branch is > available at > > https://github.com/agda/agda-stdlib/ > > * What is new, fixed issues and incompatibilities > > See http://hackage.haskell.org/package/Agda-2.6.1/changelog > > Enjoy Agda 2.6.1. > > -- > Andr?s on behalf of the Agda Team > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From asr at eafit.edu.co Mon Mar 16 19:52:38 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Mon, 16 Mar 2020 13:52:38 -0500 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 In-Reply-To: <013f8628-a0d0-4fcf-b7ef-615f84c039a5@www.fastmail.com> References: <013f8628-a0d0-4fcf-b7ef-615f84c039a5@www.fastmail.com> Message-ID: On Mon, 16 Mar 2020 at 13:41, Mi?tek Bak wrote: > > Can we make it a rule that the standard library gets a release at the same time as Agda? I think it isn't a good idea. Both releases procedures currently are complex and we don't need to add extra complexity. The team of standard library knew the plans for the Agda release and them we'll release a version of the standard library compatibles with Agda 2.6.1. soon. Best, -- Andr?s From avigad at cmu.edu Mon Mar 16 20:58:34 2020 From: avigad at cmu.edu (Jeremy Avigad) Date: Mon, 16 Mar 2020 15:58:34 -0400 Subject: [Agda] [Coq-Club] Why dependent type theory? In-Reply-To: References: <20200306173949.72783b6344wsbxmo@www.staffmail.ed.ac.uk> <15153a12-d074-5c56-4500-001d5893885e@cs.bham.ac.uk> <9d843aeb-9765-d3c6-73e0-eefab3f1e786@cs.bham.ac.uk> <20200308133542.18281t5c0mwvop8k@www.staffmail.ed.ac.uk> <71586caa-033a-6286-a2ce-c5febab52879@cs.bham.ac.uk> Message-ID: I'd like to post a correction to my previous correction regarding the origins of the use of implicit arguments in dependent type theory. In fact, Section 7.2 of the 1985 paper on the Calculus of Inductive Constructions by Thierry Coquand and G?rard Huet gives a very clear presentation of the idea of using implicit arguments: https://www.sciencedirect.com/science/article/pii/0890540188900053 Thierry Coquand pointed out to me that Appendix 9 of the thesis of Jutting (1977) describes a system AUT-SYNT that is a variation of Automath with implicit arguments. This appendix is reproduced in the book on Selected Papers on Automath: https://www.google.com/books/edition/Selected_Papers_on_Automath/6pObdqwF0coC It's nice to have the opportunity to call attention to these important sources. Best wishes, Jeremy On Mon, Mar 9, 2020 at 8:55 PM Jeremy Avigad wrote: > Friends, > > In a footnote in a survey article I mentioned in this thread, I wrote that > Amrokaine Saibi credited Peter Aczel with the idea of using > implicit arguments in dependent type theory. James McKinna pointed out to > me that I got this wrong: Saibi explicitly credits Randy Pollack for that. > The Saibi article is here: https://dl.acm.org/doi/10.1145/263699.263742. > The Pollack article is here: > http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.30.7361. > > I feel bad for disseminating false history! I will correct the footnote in > the arXiv version of the survey. > > Best wishes, > > Jeremy > > > > On Mon, Mar 9, 2020 at 2:30 AM Gabriel Scherer > wrote: > >> In this nice quote, foundations are considered from the perspective of >> expressive power: >> What if we find mathematics that *cannot* be formalized with our choice >> of foundations? >> In our experience with proof assistants, the discussion is generally not >> about expressive power (the possibility to formalize something at all) but >> about convenience, which in practice determines feasability: >> What if we find mathematics that cannot be formalized *in practice* by >> our proof assistant, due to our choice of foundations? >> >> It is not obvious to me whether this impact of foundations on practical >> usability of proof assistants is going to stay, or whether it is a problem >> of youth that will go away as we develop better assistants. I would rather >> hope the latter: that we can build proof assistants that are flexible >> enough to conveniently support a very broad range of mathematics. >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at kenkubota.de Mon Mar 16 22:13:57 2020 From: mail at kenkubota.de (Ken Kubota) Date: Mon, 16 Mar 2020 22:13:57 +0100 Subject: [Agda] =?utf-8?q?=5BCoq-Club=5D_Concepts_within_Type_Theory_?= =?utf-8?b?4oCTIFJlOiAgVHlwZSBUaGVvcnkgdnMuIFNldCBUaGVvcnkg4oCTIFJlOiBX?= =?utf-8?q?hy_dependent_type_theory=3F?= In-Reply-To: <37524413-2BDB-4F50-9458-FD43DB5D3B3D@nottingham.ac.uk> References: <37524413-2BDB-4F50-9458-FD43DB5D3B3D@nottingham.ac.uk> Message-ID: <1D9660AA-0C3B-4D10-8633-CF322D8ED6D8@kenkubota.de> > Am 15.03.2020 um 17:18 schrieb Thorsten Altenkirch : > > From: Agda > on behalf of Ken Kubota > > Date: Saturday, 14 March 2020 at 22:00 > > Of course, encoding is not a self-purpose. > That all logical connectives can be defined in terms of the Sheffer stroke is coincidental and not of particular interest. > But the concept of expressiveness (reducibility) used by Andrews (and intuitively by Church) is very natural, and for good reason many mathematicians endorse these formulations of higher-order logic (Church's type theory, Andrews' Q0, Gordon's HOL), and the implementations are widely used (HOL4, HOL Light, Isabelle/HOL). > In this concept, the reduction to certain primitive symbols is very natural and reveals the inner logic of high level notions. > > First of all it is important to realize that Type Theory in the sense of Church and HOL and Type Theory in the sense of Martin-Loef are some completely different ideas which are only superficially similar in that the share the word Type and use lambda terms. > > Type Theory ala Martin-Loef (MLTT) was intended as a foundation of constructive Mathematics, while the systems you refer to are based on very strong classical assumptions. The idea that there should be any sort of reduction from MLTT to Q0 or HOL is quite absurd. We understand reduction as explaining something, the notions you are used have no explanations from an intuitionistic point of view. This sort of reduction should be called complication, because it ?reduces? something I can understand to something I don?t. > There are some misunderstandings here. I didn't suggest reducing MLTT to Q0 or HOL. Of course I am well aware of the fact that classical foundations and constructive foundations are based on different ideas, see box 3.3. at https://owlofminerva.net/files/fom_2018.pdf#page=1 With reducing (in the sense of Andrews' expressiveness) I refer to establishing mathematical concepts ? naturally ? from a few primitive symbols and rules. For a trivial example I would refer to the definition of the logical connectives and the quantifiers by Church and Andrews, as can be seen at https://www.owlofminerva.net/files/formulae.pdf#page=359 and the following pages, or at https://owlofminerva.net/sep-q0 Another example is the single rule of Q0, from which all other rules are derived: Andrew M. Pitts on the natural deduction system HOL in comparison to the axiomatic (Hilbert- style) deductive system Q0: ?From a logical point of view, it would be better to have a simpler substitution primitive, such as ?Rule R? of Andrews? logic Q0, and then to derive more complex rules from it.? [Gordon and Melham, 1993, p. 213] ? https://owlofminerva.net/files/fom_2018.pdf#page=6 > It is important to distinguish two different kinds of high level notions: > Those that can be reduced naturally to primitive symbols, and those which try to express metamathematical ideas (which seems to be your notion). > The latter shouldn't be implemented as primitive symbols in the basic formal language, but should be the result of metamathematical reasoning. > > This is the game you are playing which seems to be some sort of glass pearl game to me. Modern type theory is quite close to basic mathematical intuitions and is based on organizing mathematical objects as types ? it makes only sense to talk about elements of types. Propositions do not arise as primitive concepts but they can be understood as types which carry no information. A predicate over a type A is a function P : A -> Prop, and proving that a predicate holds universally is to exhibit an element of the Pi type: Pi x:A.P x. In this way Pi-types are not a ?metamathematical notation? but they are the very base of understanding the meaning of quantification. However, Pi-types have more applications, for example we can use it to give precise types to operations like matrix multiplication indexed by dimensions. > My argument would be that what can be expressed by the Pi types could be expressed more naturally with type abstraction. It would be helpful to have the canonical definition of groups in Lean (using the Pi type) in order to compare it with others. The definition of groups in R0 can be found here: https://www.owlofminerva.net/files/formulae.pdf#page=362 In the Lean library I couldn't find the canonical definition (associativity, identity element, inverse element): https://github.com/leanprover-community/mathlib/tree/master/src/group_theory > Type Theory also is very successful to work with structural Mathematics in the sense of category theory. Understanding this is at the core of Homotopy Type Theory. Type Theory by its very nature only allows structural operations, that is we cannot observe encodings. The payback is in the univalence principle which basically says that structural equivalence (for example equivalence of categories) is equality. This notion of equality is a bit unusual in that equality in general is not a proposition but a structure, i.e. there is usually more than one isomorphism between sets. I think there is a deep connection between the constructive and structural nature of type theory, even though classical Mathematicians may be more interested in the latter. > > Lambda as the single variable binder in formulations of higher-order logic (Church, Andrews, Gordon) traditionally can be used to bind _term variables_ only. > Type abstraction allows for binding _type variables_ also. > See https://owlofminerva.net/kubota/software-implementation-of-the-mathematical-logic-r0-available-for-download/ > and https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2018-September/msg00045.html > Kevin Buzzard has (like Freek Wiedijk) correctly stated that current classical higher-order logic is too weak to express certain mathematical concepts. > The main reason is that the feature of type abstraction is missing. > Gordon has suggested implementing this, but unfortunately this didn't happen in the current HOL systems (HOL4, HOL Light, Isabelle/HOL). > Andrews and Melham did some work into this direction, but used the traditional quantifiers to bind type variables, not lambda. > > In MLTT or HOTT, type quantification is handled via the notion of a universe U. Quantification over a universe is handled like quantification over any other type. So for example List is simple a function U -> U, and a polymorphic function like reverse has a Pi type: Pi A : U, List U -> List U. Indeed here are 2 Pi-types at play here a dependent one Pi, and a non-dependent one -> which is a special case of the dependent one. > > The formulation of the formal system depends on the purpose. > Even within mathematics different formulations are required: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/lArtWey5CQAJ (last part on the two-step approach). > However, from a logical (mathematical) point of view I do not see any need for constructivism. > > We should strive to explain our notions, not just apply some formal reduction. Classical reasoning is based on the idea that mathematical objects behave like objects in the real world (actually maybe even the real world isn?t completely classical if we take quantum theory into account). This seems quite preposterous because they are really constructions in our head and an absolute notion of truth isn?t really available here. However, it turns out this is also unnecessary: instead of appealing to platonic truth we can just talk about evidence. That means a proposition is not something which is true or false, but a proposition is something you can have evidence for. The evidence can be expressed as a type and this is the core of the propositions as types explanation (sometimes called Curry-Howard equivalence). Once you go with this you find that there is another, intuitively appealing way to do Mathematics which provides much more explanatory power. It also links well with computer science or more generally with the need to link mathematical constructions to effective procedures. > > It is true that many main stream Mathematicians aren?t very concerned with intuitionism. Clearly this is a cultural phenomenon and to conclude that it should be so because it is so seems to be a fallacy. A good understanding of both classical and constructive notions should be at the core of a decent mathematical education. The question is what advantages constructive foundations can offer. The arguments and presentations usually mention some philosophical reasoning (intuitionism), a certain mode of expression (Curry-Howard isomorphism), or computational advantages. But from a mathematical (logical) point of view, I cannot see any advantage. The current constructive main implementations (Coq etc.) have dependent types, the current classical main implementations (HOL4, HOL Light, Isabelle/HOL) don't. But this an implementation issue, and not an issue of classical vs. constructive foundations. Therefore I favor classical foundations with dependent types, which seems to be what Kevin Buzzard is looking for, too. Kind regards, Ken Kubota ____________________________________________________ Ken Kubota doi.org/10.4444/100 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Tue Mar 17 00:42:47 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Tue, 17 Mar 2020 07:42:47 +0800 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 In-Reply-To: References: <013f8628-a0d0-4fcf-b7ef-615f84c039a5@www.fastmail.com> Message-ID: Hi Mietek, Yup the plan is always to release the new version of the standard library with Agda whenever the old version is incompatible. Unfortunately I had a grant deadline yesterday so couldn't get it out immediately. Will release it in the next few hours. Matthew On Tue, 17 Mar 2020, 02:53 Andr?s Sicard-Ram?rez, wrote: > On Mon, 16 Mar 2020 at 13:41, Mi?tek Bak wrote: > > > > Can we make it a rule that the standard library gets a release at the > same time as Agda? > > I think it isn't a good idea. Both releases procedures currently are > complex and we don't need to add extra complexity. The team of > standard library knew the plans for the Agda release and them we'll > release a version of the standard library compatibles with Agda 2.6.1. > soon. > > Best, > > > -- > Andr?s > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.m.buzzard at gmail.com Tue Mar 17 01:01:49 2020 From: kevin.m.buzzard at gmail.com (Kevin Buzzard) Date: Tue, 17 Mar 2020 00:01:49 +0000 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: <87BED64F-0185-4BE2-9687-FA5B216A0A79@nottingham.ac.uk> References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> <87BED64F-0185-4BE2-9687-FA5B216A0A79@nottingham.ac.uk> Message-ID: > > It seems to me that if you are working with structures, i.e. do structural > Mathematics you need to understand what they are and they cannot be reduced > to their encodings. Hence what is the equality of structures, if not their > structural equality? If I remember correctly, in your talk at Nottingham > you discussed a construction by Grothendieck where he used equivalence of > structures as if it were equality. This seems to be an omission and you and > your students were able to address this, I think by choosing a canonical > representation. However, the funny thing was that you were using a system > which doesn?t allow you to express any non-structural properties but > because of the way equality is done in Lean you cannot exploit this. > There is something subtle going on which I do not really understand, but it would not surprise me if there are plenty of people on these lists who do. Our problem with formalising the work of Grothendieck was that he assumed that objects which were "canonically" isomorphic were in fact equal. Canonical isomorphism is this weasel word which mathematicians often do not define properly, but in this particular case (we had a proof of P(A) and I could not deduce a proof of P(B) when B was "canonically" isomorphic to A) we solved the problem by noticing that in this particular case "canonically isomorphic" meant "satisfied the same universal property". We then changed our proof of P(A) to prove instead P(anything satisfying the universal property defining A), and then we were OK. I think it is interesting that at the point in my talk when I explained this, I said "and we couldn't believe it -- our proof barely needed changing" and you laughed and said something like "of course it didn't!". We are mathematicians learning how mathematics works :-) But we did not go "full univalence", we did not argue that isomorphic objects were equal, we only needed that "canonically" isomorphic objects were equal. In my experience of mathematics, this is the principle which is used. My fear of univalence is that because it goes a bit further, and that extra step seems to rule out some basic principles used in Lean's maths library and hence makes a whole bunch of mathematical proofs far more inconvenient to write. I am still learning about theorem provers but am urging my community to start formalising mathematics and this sort of thing is one of many issues which deserves to be better understood -- certainly by mathematicians! > I don?t know what Mathematics is actually happening in Maths departments > but you seem to agree that it can be done in Type Theory, e.g. in Lean. > Indeed, in a way Type Theory is not far away from Mathematical practice (if > we ignore the question of constructiveness for the moment). And it is > different from set theory in that it structural by nature. I just find it > strange if one cannot go the last step and exploit this fact. It seems > somehow this is a blast from the past: because we cannot have univalence in > set theory we don?t need it in type theory either? > I just do not know whether we need it in "Fields Medal mathematics" or whatever you want to call it, because so little "Fields Medal mathematics" is being done in theorem provers. I have this other life when I am going round maths departments arguing that current mathematical practice is extremely unhygenic, producing example after example where I think that pen and paper mathematics has got completely out of control. One thing I have learnt from a couple of years of doing this is that most mathematicians are (a) completely aware of the issues and (b) don't care. A mathematical historian told me that in fact mathematics has often been like this, basically saying that it is the nature of progress in mathematics research. Ok, this is a different topic (and I didn?t say anything about constructive > Maths in my original posting). I think the sort of Maths you are doing is > very much influenced by what you are using it or what it has been used for > in the past. It seems to me that until recently natural science and > hardware engineering was the main application of Mathematics and hence > influenced what Mathematicians considered as important. The world is > changing and computer science and information technology are becoming an > important application of Mathematics. For historical reasons and also for > reasons of funding a lot of the Maths for Computer Science is actually done > at Computer Science departments. I am just thinking that you, the > Mathematicians, maybe miss a trick here; and so do we, the Computer > Scientists because we could profit more from the wisdom of Mathematicians > like yourself. > Mathematics is an incredibly broad discipline nowadays, as you say, and serious mathematics is being done in plenty of places other than mathematics departments. The group of people I am trying to "represent", not necessarily by being one of them, but at least by having what I think is a good understanding of their desires, are those people who do not care about any of these applications, and just want to prove stuff like the p-adic Langlands conjectures, abstract conjectures saying that some class of infinite-dimensional objects coming from analysis are related to actions of an infinite group on some spaces coming from algebra -- results which I personally suspect will never have any applications to anything, but which are just intrinsically beautiful and are hence funded because part of the funding system in mathematics firmly believes in blue sky research. The people I'm talking about are beautifully caricatured in "The Ideal Mathematician" https://personalpages.manchester.ac.uk/staff/hung.bui/ideal.pdf by David and Hersh (in fact I slightly struggle to see what is so funny about that article because I so completely understand the point of view of the mathematician). In fact the only difference between some of the mathematicians I know doing "Fields Medal mathematics" and the "ideal mathematician" described in that article is that the areas the "Fields Medal mathematicians" actually work in areas which are taken *much* more seriously (like the p-adic Langlands philosophy), with very big communities containing powerful people who are making big decisions about where the funding is going within pure mathematics. These people might seem very extreme to many of the people reading these mailing lists -- most do not care about computation or constructivism, they spend their lives doing classical reasoning about intrinisically infinite objects, and they do not see the point of these proof assistants at all (and they also do not care about bugs in computer code because the only point of the computer is to check a gazillion examples to convince us that our deep conjectures are true, and we know they're true anyway). The reason that the computer proof community should be bending over backwards to accommodate these people is that *these people are the important ones* within pure mathematics, and many of them have very entrenched ideas about what is and isn't mathematics, and what is and what isn't important. Thorsten makes some excellent points about all the other places where mathematics is being used but it's the people at the top of this particular tree who I want. It is these people who should be telling us what kind of type theory should be being used, at least for the system or systems that I believe they will ultimately adopt. But until they notice that the systems exist it is very difficult to get clear answers -- or indeed any answers. > As I said to me it seems that too much surface stuff is moved into the core of systems like Lean. What Lean has going for it is that in practice it is turning out to be very easy to quickly formalise the kind of mathematics which these "top of the tree" pure mathematicians care about. However this might be because of some social phenomena rather than because of its underlying type theory. Kevin Thorsten On 08/03/2020, 14:25, "Agda on behalf of Bas Spitters" < agda-bounces at lists.chalmers.se on behalf of b.a.w.spitters at gmail.com> wrote: Dear Kevin, The excitement about HoTT is that it has brought together several communities. Some are interested in homotopy theory and higher category theory, some (like Vladimir) want a new foundation for modern mathematics. Some combine those two by higher toposes. Some are trying to improve the previous generation of proof assistants. E.g. this influenced the design of quotients types in lean. By Curry-Howard this also influences the design of programming languages, like the cubical agda programming language (https://pure.itu.dk/portal/files/84649948/icfp19main_p164_p.pdf) If we consider HoTT as an extension of type theory with the univalence axiom, then *of course* everything that was done before can still be done. E.g. the proof of Feit-Thompson is constructive and thus also works in HoTT. (I can elaborate on this if needed.) In fact, classical logic is valid in the simplicial set model (https://www.math.uwo.ca/faculty/kapulkin/notes/LEM_in_sSet.pdf). Moreover, that model also interprets strict propositions, so one could even extend lean with univalence (I believe). It would be interesting to know whether this simplifies the definition of perfectoid spaces. Best regards, Bas On Thu, Mar 5, 2020 at 12:25 PM Kevin Buzzard wrote: > > > > On Wed, 4 Mar 2020 at 07:18, Martin Escardo wrote: >> >> Dependent types are good for pure mathematics (classical or >> constructive). They are the natural home to define group, ring, metric >> space, topological space, poset, lattice, category, etc, and study them. >> Mathematicians that use(d) dependent types include Voevodsky (in Coq) >> and Kevin Buzzard (in Lean), among others. Kevin and his team defined, >> in particular, perfectoid spaces in dependent type theory. Martin > > > The BCM (Buzzard, Commelin, Massot) paper defined perfectoid spaces in Lean > and looking forwards (in the sense of trying to attract "working mathematicians" > into the area of formalisation) I think it's an interesting question as to whether this definition > could be made in other systems in a way which is actually usable. My guess: I don't see why it couldn't > be done in Coq (but of course the type theories of Lean and Coq are similar), although > there is a whole bunch of noncomputable stuff embedded in the mathematics. > I *suspect* that it would be a real struggle to do it in any of the HOL systems > because a sheaf is a dependent type, but these HOL people are good at tricks > for working around these things -- personally I would start with seeing whether > one can set up a theory of sheaves of modules on a locally ringed space in a HOL > system, because that will be the first stumbling block. And as for the HoTT systems, > I have no feeling as to whether it is possible to do any serious mathematics other than > category theory and synthetic homotopy theory -- my perception is that > the user base are more interested in other kinds of questions. > > In particular, connecting back to the original question, a sheaf of modules on a > locally-ringed space is a fundamental concept which shows up in a typical MSc > or early PhD level algebraic geometry course (they were in the MSc algebraic > geometry course I took), and if one wants to do this kind of mathematics in a > theorem prover (and I do, as do several other people in the Lean community) > then I *suspect* that it would be hard without dependent types. On the other hand > I would love to be proved wrong. > > Kevin >> >> >> On 03/03/2020 19:43, jasongross9 at gmail.com wrote: >> > I'm in the process of writing my thesis on proof assistant performance >> > bottlenecks (with a focus on Coq), and there's a large class of >> > performance bottlenecks that come from (mis)using the power of dependent >> > types. So in writing the introduction, I want to provide some >> > justification for the design decision of using dependent types, rather >> > than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). >> > And the only reasons I can come up with are "it's fun" and "lots of >> > people do it" >> > >> > So I'm asking these mailing lists: why do we base proof assistants on >> > dependent type theory? What are the trade-offs involved? >> > I'm interested both in explanations and arguments given on list, as well >> > as in references to papers that discuss these sorts of choices. >> > >> > Thanks, >> > Jason >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> > >> >> -- >> Martin Escardo >> http://www.cs.bham.ac.uk/~mhe > > -- > You received this message because you are subscribed to the Google Groups "lean-user" group. > To unsubscribe from this group and stop receiving emails from it, send an email to lean-user+unsubscribe at googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/lean-user/CAH52Xb0X%3D06U2O7K%2BLGRXyPu%3DhaKxp2FcQr3SFK0f4jm8kv9mQ%40mail.gmail.com . _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Tue Mar 17 04:49:47 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Tue, 17 Mar 2020 11:49:47 +0800 Subject: [Agda] [ANNOUNCE] Standard library v1.3 Message-ID: Dear all, The Agda Team is very pleased to announce the release of the standard library 1.3. The library has been tested using Agda 2.6.1. The new version of the library, CHANGELOG and README are available at http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary Highlights include: - Monoid and ring tactics that are capable of solving equalities without having to restate the equation. - Binary and rose trees. - Warnings when importing deprecated modules. Best wishes, Matthew, on behalf of the Agda Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From bove at chalmers.se Tue Mar 17 10:01:09 2020 From: bove at chalmers.se (Ana Bove) Date: Tue, 17 Mar 2020 10:01:09 +0100 Subject: [Agda] LSFA 2020 - Deadline Extension Message-ID: <29038ca9-5ed4-b890-4823-0ab8abe2f3f9@chalmers.se> LSFA 2020 15th Workshop on Logical and Semantic Frameworks, with Applications 26-28 August 2020, Salvador, Brazil http://lsfa2020.ufba.br Logical and semantic frameworks are formal languages used to represent logics, languages and systems. These frameworks provide foundations for the formal specification of systems and programming languages, supporting tool development and reasoning. Previous editions of LSFA took place in Natal (2019), Fortaleza (2018), Bras?lia (2017), Porto (2016), Natal (2015), Bras?lia (2014), S?o Paulo (2013), Rio de Janeiro (2012), Belo Horizonte (2011), Natal (2010), Bras?lia (2009), Salvador (2008), Ouro Preto (2007), and Natal (2006). Seehttp://lsfa.cic.unb.br for more information. Previous proceedings were published by EPTCS and ENTCS. Previous LSFA special issues have been published in journals such as Journal of Algorithms, The Logic Journal of the IGPL and Theoretical Computer Science (seehttp://lsfa.cic.unb.br). TOPICS OF INTEREST Topics of interest include, but are not limited to: * Specification languages and meta-languages * Formal semantics of languages and logical systems * Logical frameworks * Semantic frameworks * Type theory * Proof theory * Automated deduction * Implementation of logical or semantic frameworks * Applications of logical or semantic frameworks * Computational and logical properties of semantic frameworks * Logical aspects of computational complexity * Lambda and combinatory calculi * Process calculi SUBMISSION AND PUBLICATION Contributions should be written in English and submitted in the form of full papers with a maximum of 13 pages excluding references. Beyond full regular papers, we encourage submissions such as system descriptions, proof pearls, rough diamonds (preliminary results and work in progress), original surveys, or overviews of research projects, where the focus is more on elegance and dissemination than on novelty. Papers belonging to this second category are expected to be short, that is, of a maximum of 6 pages excluding references. For both paper categories, additional technical material can be provided in a clearly marked appendix which will be read by reviewers at their discretion. Contributions must also be unpublished and not submitted simultaneously for publication elsewhere. The papers should be prepared in LaTeX using the generic ENTCS package (http://www.entcs.org/prelim.html). The submission should be in the form of a PDF file uploaded to Easychair: https://easychair.org/conferences/?conf=lsfa2020 At least one of the authors should register for the workshop. All accepted papers will be available online during the workshop; full papers will be published at ENTCS, and short papers will be collected in an informal volume. For the publication of the proceedings there will be a cost to authors of USD 50 at registration time. IMPORTANT DATES: * Abstract deadline: March 30 (extended) * Submission deadline: April 06 (extended) * Notification to Authors: May 15 (extended) * Proceedings version due: Jun 12 * LSFA 2020: August 26-28 INVITED SPEAKERS * Mauricio Ayala-Rinc?n, University of Bras?lia (joint speaker with WBL 20) * Eduardo Bonelli, Stevens Institute of Technology * Delia Kesner, IRIF, Universit? Paris Diderot PROGRAM COMMITTEE CO-CHAIRS * Cl?udia Nalon, University of Bras?lia * Giselle Reis, CMU-Qatar PROGRAM COMMITTEE * Beniamino Accattoli, INRIA (Saclay) * Sandra Alves, University of Porto * Mario Benevides, UFF * Ana Bove, Chalmers * Manuela Busaniche, CONICET-UNL Santa Fe * Marco Cerami, UFBA * Amy Felty, University of Ottawa * Maribel Fernandez, King's College London * Francicleber Ferreira, UFC * Renata de Freitas, UFF * Edward Hermann Haeusler, PUC-Rio * Lourdes del Carmen Gonz?lez Huesca, UNAM * Oleg Kiselyov, Tohoku University * Jo?o Marcos, UFRN * Alberto Momigliano, University of Milano * Daniele Nantes, UnB * Carlos Olarte, UFRN * Revantha Ramanayake,TU Wien * Camilo Rocha, PUJ * Nora Szasz, Universidad ORT * Ivan Varzinczak, Universit? d'Artois * Daniel Ventura, UFG * Renata Wassermann, USP From b.a.w.spitters at gmail.com Tue Mar 17 10:37:14 2020 From: b.a.w.spitters at gmail.com (Bas Spitters) Date: Tue, 17 Mar 2020 10:37:14 +0100 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> <87BED64F-0185-4BE2-9687-FA5B216A0A79@nottingham.ac.uk> Message-ID: For reference, we (Kevin and the hott community) had a discussion about canonical isomorphisms here: https://groups.google.com/d/msg/homotopytypetheory/NhIhMd7SM_4/tKvejHGiAwAJ On Tue, Mar 17, 2020 at 1:02 AM Kevin Buzzard wrote: >> >> It seems to me that if you are working with structures, i.e. do structural Mathematics you need to understand what they are and they cannot be reduced to their encodings. Hence what is the equality of structures, if not their structural equality? If I remember correctly, in your talk at Nottingham you discussed a construction by Grothendieck where he used equivalence of structures as if it were equality. This seems to be an omission and you and your students were able to address this, I think by choosing a canonical representation. However, the funny thing was that you were using a system which doesn?t allow you to express any non-structural properties but because of the way equality is done in Lean you cannot exploit this. > > > There is something subtle going on which I do not really understand, but it would not surprise me if there are plenty of people on these lists who do. Our problem with formalising the work of Grothendieck was that he assumed that objects which were "canonically" isomorphic were in fact equal. Canonical isomorphism is this weasel word which mathematicians often do not define properly, but in this particular case (we had a proof of P(A) and I could not deduce a proof of P(B) when B was "canonically" isomorphic to A) we solved the problem by noticing that in this particular case "canonically isomorphic" meant "satisfied the same universal property". We then changed our proof of P(A) to prove instead P(anything satisfying the universal property defining A), and then we were OK. I think it is interesting that at the point in my talk when I explained this, I said "and we couldn't believe it -- our proof barely needed changing" and you laughed and said something like "of course it didn't!". We are mathematicians learning how mathematics works :-) But we did not go "full univalence", we did not argue that isomorphic objects were equal, we only needed that "canonically" isomorphic objects were equal. In my experience of mathematics, this is the principle which is used. My fear of univalence is that because it goes a bit further, and that extra step seems to rule out some basic principles used in Lean's maths library and hence makes a whole bunch of mathematical proofs far more inconvenient to write. I am still learning about theorem provers but am urging my community to start formalising mathematics and this sort of thing is one of many issues which deserves to be better understood -- certainly by mathematicians! > >> >> I don?t know what Mathematics is actually happening in Maths departments but you seem to agree that it can be done in Type Theory, e.g. in Lean. Indeed, in a way Type Theory is not far away from Mathematical practice (if we ignore the question of constructiveness for the moment). And it is different from set theory in that it structural by nature. I just find it strange if one cannot go the last step and exploit this fact. It seems somehow this is a blast from the past: because we cannot have univalence in set theory we don?t need it in type theory either? > > > I just do not know whether we need it in "Fields Medal mathematics" or whatever you want to call it, because so little "Fields Medal mathematics" is being done in theorem provers. I have this other life when I am going round maths departments arguing that current mathematical practice is extremely unhygenic, producing example after example where I think that pen and paper mathematics has got completely out of control. One thing I have learnt from a couple of years of doing this is that most mathematicians are (a) completely aware of the issues and (b) don't care. A mathematical historian told me that in fact mathematics has often been like this, basically saying that it is the nature of progress in mathematics research. > >> Ok, this is a different topic (and I didn?t say anything about constructive Maths in my original posting). I think the sort of Maths you are doing is very much influenced by what you are using it or what it has been used for in the past. It seems to me that until recently natural science and hardware engineering was the main application of Mathematics and hence influenced what Mathematicians considered as important. The world is changing and computer science and information technology are becoming an important application of Mathematics. For historical reasons and also for reasons of funding a lot of the Maths for Computer Science is actually done at Computer Science departments. I am just thinking that you, the Mathematicians, maybe miss a trick here; and so do we, the Computer Scientists because we could profit more from the wisdom of Mathematicians like yourself. > > > Mathematics is an incredibly broad discipline nowadays, as you say, and serious mathematics is being done in plenty of places other than mathematics departments. The group of people I am trying to "represent", not necessarily by being one of them, but at least by having what I think is a good understanding of their desires, are those people who do not care about any of these applications, and just want to prove stuff like the p-adic Langlands conjectures, abstract conjectures saying that some class of infinite-dimensional objects coming from analysis are related to actions of an infinite group on some spaces coming from algebra -- results which I personally suspect will never have any applications to anything, but which are just intrinsically beautiful and are hence funded because part of the funding system in mathematics firmly believes in blue sky research. The people I'm talking about are beautifully caricatured in "The Ideal Mathematician" https://personalpages.manchester.ac.uk/staff/hung.bui/ideal.pdf by David and Hersh (in fact I slightly struggle to see what is so funny about that article because I so completely understand the point of view of the mathematician). In fact the only difference between some of the mathematicians I know doing "Fields Medal mathematics" and the "ideal mathematician" described in that article is that the areas the "Fields Medal mathematicians" actually work in areas which are taken *much* more seriously (like the p-adic Langlands philosophy), with very big communities containing powerful people who are making big decisions about where the funding is going within pure mathematics. These people might seem very extreme to many of the people reading these mailing lists -- most do not care about computation or constructivism, they spend their lives doing classical reasoning about intrinisically infinite objects, and they do not see the point of these proof assistants at all (and they also do not care about bugs in computer code because the only point of the computer is to check a gazillion examples to convince us that our deep conjectures are true, and we know they're true anyway). The reason that the computer proof community should be bending over backwards to accommodate these people is that *these people are the important ones* within pure mathematics, and many of them have very entrenched ideas about what is and isn't mathematics, and what is and what isn't important. Thorsten makes some excellent points about all the other places where mathematics is being used but it's the people at the top of this particular tree who I want. It is these people who should be telling us what kind of type theory should be being used, at least for the system or systems that I believe they will ultimately adopt. But until they notice that the systems exist it is very difficult to get clear answers -- or indeed any answers. > > > As I said to me it seems that too much surface stuff is moved into the core of systems like Lean. > > > What Lean has going for it is that in practice it is turning out to be very easy to quickly formalise the kind of mathematics which these "top of the tree" pure mathematicians care about. However this might be because of some social phenomena rather than because of its underlying type theory. > > > Kevin > > > > > > > > > Thorsten > > On 08/03/2020, 14:25, "Agda on behalf of Bas Spitters" wrote: > > Dear Kevin, > > The excitement about HoTT is that it has brought together several > communities. Some are interested in homotopy theory and higher > category theory, some (like Vladimir) want a new foundation for modern > mathematics. > Some combine those two by higher toposes. > > Some are trying to improve the previous generation of proof > assistants. E.g. this influenced the design of quotients types in > lean. > By Curry-Howard this also influences the design of programming > languages, like the cubical agda programming language > (https://pure.itu.dk/portal/files/84649948/icfp19main_p164_p.pdf) > > If we consider HoTT as an extension of type theory with the univalence > axiom, then *of course* everything that was done before can still be > done. > E.g. the proof of Feit-Thompson is constructive and thus also works in > HoTT. (I can elaborate on this if needed.) > > In fact, classical logic is valid in the simplicial set model > (https://www.math.uwo.ca/faculty/kapulkin/notes/LEM_in_sSet.pdf). > Moreover, that model also interprets strict propositions, so one could > even extend lean with univalence (I believe). > It would be interesting to know whether this simplifies the definition > of perfectoid spaces. > > Best regards, > > Bas > > On Thu, Mar 5, 2020 at 12:25 PM Kevin Buzzard wrote: > > > > > > > > On Wed, 4 Mar 2020 at 07:18, Martin Escardo wrote: > >> > >> Dependent types are good for pure mathematics (classical or > >> constructive). They are the natural home to define group, ring, metric > >> space, topological space, poset, lattice, category, etc, and study them. > >> Mathematicians that use(d) dependent types include Voevodsky (in Coq) > >> and Kevin Buzzard (in Lean), among others. Kevin and his team defined, > >> in particular, perfectoid spaces in dependent type theory. Martin > > > > > > The BCM (Buzzard, Commelin, Massot) paper defined perfectoid spaces in Lean > > and looking forwards (in the sense of trying to attract "working mathematicians" > > into the area of formalisation) I think it's an interesting question as to whether this definition > > could be made in other systems in a way which is actually usable. My guess: I don't see why it couldn't > > be done in Coq (but of course the type theories of Lean and Coq are similar), although > > there is a whole bunch of noncomputable stuff embedded in the mathematics. > > I *suspect* that it would be a real struggle to do it in any of the HOL systems > > because a sheaf is a dependent type, but these HOL people are good at tricks > > for working around these things -- personally I would start with seeing whether > > one can set up a theory of sheaves of modules on a locally ringed space in a HOL > > system, because that will be the first stumbling block. And as for the HoTT systems, > > I have no feeling as to whether it is possible to do any serious mathematics other than > > category theory and synthetic homotopy theory -- my perception is that > > the user base are more interested in other kinds of questions. > > > > In particular, connecting back to the original question, a sheaf of modules on a > > locally-ringed space is a fundamental concept which shows up in a typical MSc > > or early PhD level algebraic geometry course (they were in the MSc algebraic > > geometry course I took), and if one wants to do this kind of mathematics in a > > theorem prover (and I do, as do several other people in the Lean community) > > then I *suspect* that it would be hard without dependent types. On the other hand > > I would love to be proved wrong. > > > > Kevin > >> > >> > >> On 03/03/2020 19:43, jasongross9 at gmail.com wrote: > >> > I'm in the process of writing my thesis on proof assistant performance > >> > bottlenecks (with a focus on Coq), and there's a large class of > >> > performance bottlenecks that come from (mis)using the power of dependent > >> > types. So in writing the introduction, I want to provide some > >> > justification for the design decision of using dependent types, rather > >> > than, say, set theory or classical logic (as in, e.g., Isabelle/HOL). > >> > And the only reasons I can come up with are "it's fun" and "lots of > >> > people do it" > >> > > >> > So I'm asking these mailing lists: why do we base proof assistants on > >> > dependent type theory? What are the trade-offs involved? > >> > I'm interested both in explanations and arguments given on list, as well > >> > as in references to papers that discuss these sorts of choices. > >> > > >> > Thanks, > >> > Jason > >> > > >> > _______________________________________________ > >> > Agda mailing list > >> > Agda at lists.chalmers.se > >> > https://lists.chalmers.se/mailman/listinfo/agda > >> > > >> > >> -- > >> Martin Escardo > >> http://www.cs.bham.ac.uk/~mhe > > > > -- > > You received this message because you are subscribed to the Google Groups "lean-user" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to lean-user+unsubscribe at googlegroups.com. > > To view this discussion on the web visit https://groups.google.com/d/msgid/lean-user/CAH52Xb0X%3D06U2O7K%2BLGRXyPu%3DhaKxp2FcQr3SFK0f4jm8kv9mQ%40mail.gmail.com. > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please contact the sender and delete the email and >> attachment. >> >> Any views or opinions expressed by the author of this email do not >> necessarily reflect the views of the University of Nottingham. Email >> communications with the University of Nottingham may be monitored >> where permitted by law. >> >> >> > -- > You received this message because you are subscribed to the Google Groups "lean-user" group. > To unsubscribe from this group and stop receiving emails from it, send an email to lean-user+unsubscribe at googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/lean-user/CAH52Xb2TFq%2BV6kwq22Nw%3DGSt4wAecB%2B7M7JKvrvb4OBds%3DRZQg%40mail.gmail.com. From herminie.pagel at gmail.com Tue Mar 17 15:48:44 2020 From: herminie.pagel at gmail.com (Herminie Pagel) Date: Tue, 17 Mar 2020 15:48:44 +0100 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 In-Reply-To: References: <013f8628-a0d0-4fcf-b7ef-615f84c039a5@www.fastmail.com> Message-ID: Thank you so much, Matthew. Agda 2.6.1 is already available on Homebrew, so I could finally install it. -- h Am Di., 17. M?rz 2020 um 00:43 Uhr schrieb Matthew Daggitt < matthewdaggitt at gmail.com>: > Hi Mietek, > Yup the plan is always to release the new version of the standard library > with Agda whenever the old version is incompatible. Unfortunately I had a > grant deadline yesterday so couldn't get it out immediately. Will release > it in the next few hours. > Matthew > > > On Tue, 17 Mar 2020, 02:53 Andr?s Sicard-Ram?rez, > wrote: > >> On Mon, 16 Mar 2020 at 13:41, Mi?tek Bak wrote: >> > >> > Can we make it a rule that the standard library gets a release at the >> same time as Agda? >> >> I think it isn't a good idea. Both releases procedures currently are >> complex and we don't need to add extra complexity. The team of >> standard library knew the plans for the Agda release and them we'll >> release a version of the standard library compatibles with Agda 2.6.1. >> soon. >> >> Best, >> >> >> -- >> Andr?s >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mietek at bak.io Tue Mar 17 16:50:34 2020 From: mietek at bak.io (=?utf-8?Q?Mi=C3=ABtek_Bak?=) Date: Tue, 17 Mar 2020 16:50:34 +0100 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 In-Reply-To: References: Message-ID: <629E5E9C-79D4-4503-BF9C-BAEC7DC45608@bak.io> Herminie, did you have any problems installing previous Agda versions from Homebrew? -- MB > On 17 Mar 2020, at 15:49, Herminie Pagel wrote: > > ? > Thank you so much, Matthew. Agda 2.6.1 is already available on Homebrew, so I could finally install it. > > -- h > >> Am Di., 17. M?rz 2020 um 00:43 Uhr schrieb Matthew Daggitt : >> Hi Mietek, >> Yup the plan is always to release the new version of the standard library with Agda whenever the old version is incompatible. Unfortunately I had a grant deadline yesterday so couldn't get it out immediately. Will release it in the next few hours. >> Matthew >> >> >>> On Tue, 17 Mar 2020, 02:53 Andr?s Sicard-Ram?rez, wrote: >>> On Mon, 16 Mar 2020 at 13:41, Mi?tek Bak wrote: >>> > >>> > Can we make it a rule that the standard library gets a release at the same time as Agda? >>> >>> I think it isn't a good idea. Both releases procedures currently are >>> complex and we don't need to add extra complexity. The team of >>> standard library knew the plans for the Agda release and them we'll >>> release a version of the standard library compatibles with Agda 2.6.1. >>> soon. >>> >>> Best, >>> >>> >>> -- >>> Andr?s >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From herminie.pagel at gmail.com Tue Mar 17 18:05:15 2020 From: herminie.pagel at gmail.com (Herminie Pagel) Date: Tue, 17 Mar 2020 18:05:15 +0100 Subject: [Agda] [ANNOUNCE] Agda 2.6.1 In-Reply-To: <629E5E9C-79D4-4503-BF9C-BAEC7DC45608@bak.io> References: <629E5E9C-79D4-4503-BF9C-BAEC7DC45608@bak.io> Message-ID: No, until now everything worked fine, but i started with 2.6.0.1... I will check now some files that did not typecheck with the previous version. Great that 2.6.1 was released! -- h Am Di., 17. M?rz 2020 um 16:50 Uhr schrieb Mi?tek Bak : > Herminie, did you have any problems installing previous Agda versions from > Homebrew? > > -- > MB > > > On 17 Mar 2020, at 15:49, Herminie Pagel wrote: > > ? > Thank you so much, Matthew. Agda 2.6.1 is already available on Homebrew, > so I could finally install it. > > -- h > > Am Di., 17. M?rz 2020 um 00:43 Uhr schrieb Matthew Daggitt < > matthewdaggitt at gmail.com>: > >> Hi Mietek, >> Yup the plan is always to release the new version of the standard >> library with Agda whenever the old version is incompatible. Unfortunately I >> had a grant deadline yesterday so couldn't get it out immediately. Will >> release it in the next few hours. >> Matthew >> >> >> On Tue, 17 Mar 2020, 02:53 Andr?s Sicard-Ram?rez, >> wrote: >> >>> On Mon, 16 Mar 2020 at 13:41, Mi?tek Bak wrote: >>> > >>> > Can we make it a rule that the standard library gets a release at the >>> same time as Agda? >>> >>> I think it isn't a good idea. Both releases procedures currently are >>> complex and we don't need to add extra complexity. The team of >>> standard library knew the plans for the Agda release and them we'll >>> release a version of the standard library compatibles with Agda 2.6.1. >>> soon. >>> >>> Best, >>> >>> >>> -- >>> Andr?s >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From monnier at iro.umontreal.ca Sun Mar 15 18:01:06 2020 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Sun, 15 Mar 2020 13:01:06 -0400 Subject: [Agda] [Coq-Club] [lean-user] Re: Why dependent type theory? In-Reply-To: <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> (Thorsten Altenkirch's message of "Thu, 12 Mar 2020 15:36:53 +0000") References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> Message-ID: > I think it should be possible to have both features, that is simulate > definitional proof-irrelevance which is basically "extensional" type theory > on the set level via a powerful tactic but don't put this into the > foundations of the proof system. I'm not sure how that can work. IIUC you're suggesting to distinguish the proof-relevant equality `Eq(T) A B` from the proof-irrelevant equality `isSet T ? Eq(T) A B`, and then arrange for tactics to automatically provide the `isSet T` proof. Personally, I'm not so much interested in proof-irrelevance as I'm interested in erasing proofs, and the above doesn't seem able to distinguish a proof that `?` is *equal* to `Nat` from one where `?` is *equivalent* to `Nat` (where *equal* means that an object of type `F ?` can be cast at no runtime cost to type `F Nat` where *equivalent* means that such a conversion can be made for all `F` but it's not guaranteed to be a no-op). Stefan From michel.levy.imag at free.fr Wed Mar 18 13:18:05 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Wed, 18 Mar 2020 13:18:05 +0100 Subject: [Agda] package agda-mode not working Message-ID: <59847f45-80c3-7e44-3aa2-2e9547646383@free.fr> I try to install the Agda prover on my laptop on Ubuntu 18.0,? by installing the package agda-mode. In your documentation, it is written : apt-get install agda-mode This should install Agda and the Emacs mode. But this package does not work : I don't see the commands agda and agda-mode and the mode emacs agda is not activated when I load in emacs the file f.agda. I have tried the other method, with cabal. But I have an error when I execute "cabal install Agda". -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Wed Mar 18 14:32:17 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 18 Mar 2020 16:32:17 +0300 Subject: [Agda] idiom brackets in 2.6.1 Message-ID: <9875fc7511cebd73966bde92027bacaa@scico.botik.ru> Can anybody, please, explain what does it mean the following? " Idiom brackets can accommodate none or multiple applications separated by a vertical bar `|` if there are two additional operations ```agda empty : ? {A} ? F A _<|>_ : ? {A} ? F A ? F A ? F A ``` i.e. an Alternative type class in Haskell. ". Please, give an example. What is an Alternative type class in Haskell ? In Agda ? Is it like this: f :: (Foo1 a) -> a -> a | (Foo2 a) -> a -> (a, a) - to declare f having two signatures? Thanks, ------ Sergei From godzbanebane at gmail.com Wed Mar 18 14:40:30 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Wed, 18 Mar 2020 15:40:30 +0200 Subject: [Agda] idiom brackets in 2.6.1 In-Reply-To: <9875fc7511cebd73966bde92027bacaa@scico.botik.ru> References: <9875fc7511cebd73966bde92027bacaa@scico.botik.ru> Message-ID: Hi! Alternative in Haskell traditionally refers to this typeclass - https://hackage.haskell.org/package/base-4.12.0.0/docs/Control-Applicative.html#t:Alternative . ======= Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Wed Mar 18 14:54:21 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 18 Mar 2020 13:54:21 +0000 Subject: [Agda] idiom brackets in 2.6.1 In-Reply-To: <9875fc7511cebd73966bde92027bacaa@scico.botik.ru> References: <9875fc7511cebd73966bde92027bacaa@scico.botik.ru> Message-ID: Hi Sergei, I haven't used them myself, but the documentation for idiom brackets is here: https://agda.readthedocs.io/en/v2.6.1/language/syntactic-sugar.html#idiom-brackets . They're probably more useful in programming than proving. Regards, James On 18 March 2020 13:32:17 GMT, mechvel at scico.botik.ru wrote: >Can anybody, please, explain what does it mean the following? > >" >Idiom brackets can accommodate none or multiple applications separated >by a vertical bar `|` > if there are two additional operations > ```agda > empty : ? {A} ? F A > _<|>_ : ? {A} ? F A ? F A ? F A > ``` > i.e. an Alternative type class in Haskell. >". > >Please, give an example. >What is an Alternative type class in Haskell ? In Agda ? > >Is it like this: > > f :: (Foo1 a) -> a -> a > > | (Foo2 a) -> a -> (a, a) > >- to declare f having two signatures? > >Thanks, > >------ >Sergei > > >_______________________________________________ >Agda mailing list >Agda at lists.chalmers.se >https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7Cdb12e08efccb4780914108d7cb40cb7e%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637201351459161057&sdata=vIvmJRfEwm2lwLRRKmRi%2BmEngLqzqRWEjpy2g81j5vc%3D&reserved=0 -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Wed Mar 18 15:29:42 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Wed, 18 Mar 2020 15:29:42 +0100 Subject: [Agda] failure of cabal install Agda Message-ID: I am lost with the installation of Agda. Below I give the log created by "cabal install Agda". michel at M1330:~/.cabal/logs$ more Agda-2.6.1.log cabal: Entering directory '/tmp/cabal-tmp-11975/Agda-2.6.1' [1 of 1] Compiling Main???????????? ( /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup /setup.hs, /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/Main.o ) Linking /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/setup ... Configuring Agda-2.6.1... Building Agda-2.6.1... Preprocessing library Agda-2.6.1... [? 1 of 369] Compiling Paths_Agda?????? ( dist/build/autogen/Paths_Agda.hs, dist /build/Paths_Agda.o ) [? 2 of 369] Compiling Agda.Version???? ( src/full/Agda/Version.hs, dist/build/A gda/Version.o ) [? 3 of 369] Compiling Agda.VersionCommit ( src/full/Agda/VersionCommit.hs, dist /build/Agda/VersionCommit.o ) src/full/Agda/VersionCommit.hs:5:1: error: ??? Failed to load interface for ?Development.GitRev? ??? There are files missing in the ?gitrev-1.3.1? package, ??? try running 'ghc-pkg check'. ??? Use -v to see a list of the files searched for. cabal: Leaving directory '/tmp/cabal-tmp-11975/Agda-2.6.1' Can you help me to solve this problem ? -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From asr at eafit.edu.co Wed Mar 18 16:05:23 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Wed, 18 Mar 2020 10:05:23 -0500 Subject: [Agda] failure of cabal install Agda In-Reply-To: References: Message-ID: Hi Michel, It seems you are mixing the installation of Agda from Ubuntu packages and from Hackage. Which is the output of $ sudo apt-get install agda-bin $ agda --version ? Best regards, On Wed, 18 Mar 2020 at 09:29, Michel Levy wrote: > I am lost with the installation of Agda. Below I give the log created by > "cabal install Agda". > > michel at M1330:~/.cabal/logs$ more Agda-2.6.1.log > cabal: Entering directory '/tmp/cabal-tmp-11975/Agda-2.6.1' > [1 of 1] Compiling Main ( > /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup > /setup.hs, /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/Main.o ) > Linking /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/setup ... > Configuring Agda-2.6.1... > Building Agda-2.6.1... > Preprocessing library Agda-2.6.1... > [ 1 of 369] Compiling Paths_Agda ( > dist/build/autogen/Paths_Agda.hs, dist > /build/Paths_Agda.o ) > [ 2 of 369] Compiling Agda.Version ( src/full/Agda/Version.hs, > dist/build/A > gda/Version.o ) > [ 3 of 369] Compiling Agda.VersionCommit ( > src/full/Agda/VersionCommit.hs, dist > /build/Agda/VersionCommit.o ) > > src/full/Agda/VersionCommit.hs:5:1: error: > Failed to load interface for ?Development.GitRev? > There are files missing in the ?gitrev-1.3.1? package, > try running 'ghc-pkg check'. > Use -v to see a list of the files searched for. > cabal: Leaving directory '/tmp/cabal-tmp-11975/Agda-2.6.1' > > Can you help me to solve this problem ? > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > La informaci?n contenida en este correo electr?nico est? dirigida > ?nicamente a su destinatario y puede contener informaci?n confidencial, > material privilegiado o informaci?n protegida por derecho de autor. Est? > prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, > difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este > mensaje por error, por favor contacte al remitente y elim?nelo. La > informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por > lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje > contenga. The information contained in this email is addressed to its > recipient only and may contain confidential information, privileged > material or information protected by copyright. Its prohibited any copy, > use, improper retention, modification, dissemination, distribution or total > or partial reproduction. If you receive this message by error, please > contact the sender and delete it. The information contained herein is the > sole responsibility of the sender therefore Universidad EAFIT is not > responsible for what the message contains. > -- Andr?s -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Wed Mar 18 17:08:04 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Wed, 18 Mar 2020 17:08:04 +0100 Subject: [Agda] failure of cabal install Agda In-Reply-To: References: Message-ID: Thank you really much for your help. Actually, I am not mixing the installation of Agda from Ubuntu and from Hackage, I have tried (and failed) successfully the two methods. The output of $ sudo apt-get install agda-bin $ agda --version is michel at M1330:~$ agda --version Agda version 2.5.3 Please, what other packages do I need to install to get a working Agda prover ? Le 18/03/2020 ? 16:05, Andr?s Sicard-Ram?rez a ?crit?: > Hi Michel, > > It seems you are mixing the installation of Agda from Ubuntu packages > and from Hackage. > > Which is the output of > > $ sudo apt-get install agda-bin > $ agda --version > > ? > > Best regards, > > On Wed, 18 Mar 2020 at 09:29, Michel Levy > wrote: > > I am lost with the installation of Agda. Below I give the log > created by > "cabal install Agda". > > michel at M1330:~/.cabal/logs$ more Agda-2.6.1.log > cabal: Entering directory '/tmp/cabal-tmp-11975/Agda-2.6.1' > [1 of 1] Compiling Main? ? ? ? ? ? ?( > /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup > /setup.hs, /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/Main.o ) > Linking /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/setup ... > Configuring Agda-2.6.1... > Building Agda-2.6.1... > Preprocessing library Agda-2.6.1... > [? 1 of 369] Compiling Paths_Agda? ? ? ?( > dist/build/autogen/Paths_Agda.hs, dist > /build/Paths_Agda.o ) > [? 2 of 369] Compiling Agda.Version? ? ?( src/full/Agda/Version.hs, > dist/build/A > gda/Version.o ) > [? 3 of 369] Compiling Agda.VersionCommit ( > src/full/Agda/VersionCommit.hs, dist > /build/Agda/VersionCommit.o ) > > src/full/Agda/VersionCommit.hs:5:1: error: > ? ? Failed to load interface for ?Development.GitRev? > ? ? There are files missing in the ?gitrev-1.3.1? package, > ? ? try running 'ghc-pkg check'. > ? ? Use -v to see a list of the files searched for. > cabal: Leaving directory '/tmp/cabal-tmp-11975/Agda-2.6.1' > > Can you help me to solve this problem ? > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > La informaci?n contenida en este correo electr?nico est? dirigida > ?nicamente a su destinatario y puede contener informaci?n > confidencial, material privilegiado o informaci?n protegida por > derecho de autor. Est? prohibida cualquier copia, utilizaci?n, > indebida retenci?n, modificaci?n, difusi?n, distribuci?n o > reproducci?n total o parcial. Si usted recibe este mensaje por > error, por favor contacte al remitente y elim?nelo. La informaci?n > aqu? contenida es responsabilidad exclusiva de su remitente por lo > tanto la Universidad EAFIT no se hace responsable de lo que el > mensaje contenga. The information contained in this email is > addressed to its recipient only and may contain confidential > information, privileged material or information protected by > copyright. Its prohibited any copy, use, improper retention, > modification, dissemination, distribution or total or partial > reproduction. If you receive this message by error, please contact > the sender and delete it. The information contained herein is the > sole responsibility of the sender therefore Universidad EAFIT is > not responsible for what the message contains. > > > > -- > Andr?s -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Wed Mar 18 17:15:03 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 18 Mar 2020 17:15:03 +0100 Subject: [Agda] failure of cabal install Agda In-Reply-To: References: Message-ID: <3c90f29c-0932-490f-1f72-a3d59fbd31a0@ifi.lmu.de> > There are files missing in the ?gitrev-1.3.1? package, > try running 'ghc-pkg check'. Have you tried this? If the gitrev package is broken, try to install it with cabal gitrev or cabal gitrev-1.3.1 On 2020-03-18 17:08, Michel Levy wrote: > Thank you really much for your help. Actually, I am not mixing the > installation of Agda from Ubuntu and from Hackage, I have tried (and > failed) successfully the two methods. > > The output of > > $ sudo apt-get install agda-bin > $ agda --version > > is > > michel at M1330:~$ agda --version > Agda version 2.5.3 > > Please, what other packages do I need to install to get a working Agda > prover ? > > Le 18/03/2020 ? 16:05, Andr?s Sicard-Ram?rez a ?crit?: >> Hi Michel, >> >> It seems you are mixing the installation of Agda from Ubuntu packages >> and from Hackage. >> >> Which is the output of >> >> $ sudo apt-get install agda-bin >> $ agda --version >> >> ? >> >> Best regards, >> >> On Wed, 18 Mar 2020 at 09:29, Michel Levy > > wrote: >> >> I am lost with the installation of Agda. Below I give the log >> created by >> "cabal install Agda". >> >> michel at M1330:~/.cabal/logs$ more Agda-2.6.1.log >> cabal: Entering directory '/tmp/cabal-tmp-11975/Agda-2.6.1' >> [1 of 1] Compiling Main? ? ? ? ? ? ?( >> /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup >> /setup.hs, /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/Main.o ) >> Linking /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/setup ... >> Configuring Agda-2.6.1... >> Building Agda-2.6.1... >> Preprocessing library Agda-2.6.1... >> [? 1 of 369] Compiling Paths_Agda? ? ? ?( >> dist/build/autogen/Paths_Agda.hs, dist >> /build/Paths_Agda.o ) >> [? 2 of 369] Compiling Agda.Version? ? ?( src/full/Agda/Version.hs, >> dist/build/A >> gda/Version.o ) >> [? 3 of 369] Compiling Agda.VersionCommit ( >> src/full/Agda/VersionCommit.hs, dist >> /build/Agda/VersionCommit.o ) >> >> src/full/Agda/VersionCommit.hs:5:1: error: >> ? ? Failed to load interface for ?Development.GitRev? >> ? ? There are files missing in the ?gitrev-1.3.1? package, >> ? ? try running 'ghc-pkg check'. >> ? ? Use -v to see a list of the files searched for. >> cabal: Leaving directory '/tmp/cabal-tmp-11975/Agda-2.6.1' >> >> Can you help me to solve this problem ? >> >> -- >> courriel : michel.levy.imag at free.fr >> mobile : 06 59 13 42 53 >> web : michel.levy.imag.free.fr >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> La informaci?n contenida en este correo electr?nico est? dirigida >> ?nicamente a su destinatario y puede contener informaci?n >> confidencial, material privilegiado o informaci?n protegida por >> derecho de autor. Est? prohibida cualquier copia, utilizaci?n, >> indebida retenci?n, modificaci?n, difusi?n, distribuci?n o >> reproducci?n total o parcial. Si usted recibe este mensaje por >> error, por favor contacte al remitente y elim?nelo. La informaci?n >> aqu? contenida es responsabilidad exclusiva de su remitente por lo >> tanto la Universidad EAFIT no se hace responsable de lo que el >> mensaje contenga. The information contained in this email is >> addressed to its recipient only and may contain confidential >> information, privileged material or information protected by >> copyright. Its prohibited any copy, use, improper retention, >> modification, dissemination, distribution or total or partial >> reproduction. If you receive this message by error, please contact >> the sender and delete it. The information contained herein is the >> sole responsibility of the sender therefore Universidad EAFIT is >> not responsible for what the message contains. >> >> >> >> -- >> Andr?s > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From michel.levy.imag at free.fr Wed Mar 18 17:26:22 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Wed, 18 Mar 2020 17:26:22 +0100 Subject: [Agda] failure of cabal install Agda In-Reply-To: <3c90f29c-0932-490f-1f72-a3d59fbd31a0@ifi.lmu.de> References: <3c90f29c-0932-490f-1f72-a3d59fbd31a0@ifi.lmu.de> Message-ID: <18ecd174-202d-52d8-a616-1c1c77320134@free.fr> I have try this michel at M1330:~$ cabal install gitrev Resolving dependencies... All the requested packages are already installed: gitrev-1.3.1 Use --reinstall if you want to reinstall anyway. And reinstall is not a command for cabal. Le 18/03/2020 ? 17:15, Andreas Abel a ?crit?: > > There are files missing in the ?gitrev-1.3.1? package, > >??? try running 'ghc-pkg check'. > > Have you tried this?? If the gitrev package is broken, try to install > it with > > ? cabal gitrev > > or > > ? cabal gitrev-1.3.1 > > On 2020-03-18 17:08, Michel Levy wrote: >> Thank you really much for your help. Actually, I am not mixing the >> installation of Agda from Ubuntu and from Hackage, I have tried (and >> failed) successfully the two methods. >> >> The output of >> >> $ sudo apt-get install agda-bin >> $ agda --version >> >> is >> >> michel at M1330:~$ agda --version >> Agda version 2.5.3 >> >> Please, what other packages do I need to install to get a working >> Agda prover ? >> >> Le 18/03/2020 ? 16:05, Andr?s Sicard-Ram?rez a ?crit?: >>> Hi Michel, >>> >>> It seems you are mixing the installation of Agda from Ubuntu >>> packages and from Hackage. >>> >>> Which is the output of >>> >>> $ sudo apt-get install agda-bin >>> $ agda --version >>> >>> ? >>> >>> Best regards, >>> >>> On Wed, 18 Mar 2020 at 09:29, Michel Levy >> > wrote: >>> >>> ??? I am lost with the installation of Agda. Below I give the log >>> ??? created by >>> ??? "cabal install Agda". >>> >>> ??? michel at M1330:~/.cabal/logs$ more Agda-2.6.1.log >>> ??? cabal: Entering directory '/tmp/cabal-tmp-11975/Agda-2.6.1' >>> ??? [1 of 1] Compiling Main? ? ? ? ? ? ?( >>> ??? /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup >>> ??? /setup.hs, /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/Main.o ) >>> ??? Linking /tmp/cabal-tmp-11975/Agda-2.6.1/dist/setup/setup ... >>> ??? Configuring Agda-2.6.1... >>> ??? Building Agda-2.6.1... >>> ??? Preprocessing library Agda-2.6.1... >>> ??? [? 1 of 369] Compiling Paths_Agda? ? ? ?( >>> ??? dist/build/autogen/Paths_Agda.hs, dist >>> ??? /build/Paths_Agda.o ) >>> ??? [? 2 of 369] Compiling Agda.Version? ? ?( src/full/Agda/Version.hs, >>> ??? dist/build/A >>> ??? gda/Version.o ) >>> ??? [? 3 of 369] Compiling Agda.VersionCommit ( >>> ??? src/full/Agda/VersionCommit.hs, dist >>> ??? /build/Agda/VersionCommit.o ) >>> >>> ??? src/full/Agda/VersionCommit.hs:5:1: error: >>> ??? ? ? Failed to load interface for ?Development.GitRev? >>> ??? ? ? There are files missing in the ?gitrev-1.3.1? package, >>> ??? ? ? try running 'ghc-pkg check'. >>> ??? ? ? Use -v to see a list of the files searched for. >>> ??? cabal: Leaving directory '/tmp/cabal-tmp-11975/Agda-2.6.1' >>> >>> ??? Can you help me to solve this problem ? >>> >>> ??? -- >>> ??? courriel : michel.levy.imag at free.fr >>> >>> ??? mobile : 06 59 13 42 53 >>> ??? web : michel.levy.imag.free.fr >>> ??? _______________________________________________ >>> ??? Agda mailing list >>> ??? Agda at lists.chalmers.se >>> ??? https://lists.chalmers.se/mailman/listinfo/agda >>> ??? La informaci?n contenida en este correo electr?nico est? dirigida >>> ??? ?nicamente a su destinatario y puede contener informaci?n >>> ??? confidencial, material privilegiado o informaci?n protegida por >>> ??? derecho de autor. Est? prohibida cualquier copia, utilizaci?n, >>> ??? indebida retenci?n, modificaci?n, difusi?n, distribuci?n o >>> ??? reproducci?n total o parcial. Si usted recibe este mensaje por >>> ??? error, por favor contacte al remitente y elim?nelo. La informaci?n >>> ??? aqu? contenida es responsabilidad exclusiva de su remitente por lo >>> ??? tanto la Universidad EAFIT no se hace responsable de lo que el >>> ??? mensaje contenga. The information contained in this email is >>> ??? addressed to its recipient only and may contain confidential >>> ??? information, privileged material or information protected by >>> ??? copyright. Its prohibited any copy, use, improper retention, >>> ??? modification, dissemination, distribution or total or partial >>> ??? reproduction. If you receive this message by error, please contact >>> ??? the sender and delete it. The information contained herein is the >>> ??? sole responsibility of the sender therefore Universidad EAFIT is >>> ??? not responsible for what the message contains. >>> >>> >>> >>> --? >>> Andr?s >> --? >> courriel : michel.levy.imag at free.fr >> mobile : 06 59 13 42 53 >> web : michel.levy.imag.free.fr >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From liang.ting.chen.tw at gmail.com Wed Mar 18 18:16:10 2020 From: liang.ting.chen.tw at gmail.com (Liang-Ting Chen) Date: Thu, 19 Mar 2020 01:16:10 +0800 Subject: [Agda] idiom brackets in 2.6.1 In-Reply-To: References: <9875fc7511cebd73966bde92027bacaa@scico.botik.ru> Message-ID: Hi, This syntactic sugar was first introduced to Haskell by Conor McBride https://personal.cis.strath.ac.uk/conor.mcbride/pub/she/idiom.html to extend the idiom bracket notation proposed by the paper ?Applicative Programming with Effects? https://www.cambridge.org/core/journals/journal-of-functional-programming/article/applicative-programming-with-effects/C80616ACD5687ABDC86D2B341E83D298 to support applicative functors with a ?choice? operation. It is also called ?MonadPlus? if the structure considered is indeed a monad. For example, functions `catchTC` and `typeError` (modulo error messages) form a Monad Plus on top of the TC monad in the Agda?s reflection framework. Hope this helps. Best wishes, Liang-Ting On Wed, 18 Mar 2020 at 22:04, James Wood wrote: > Hi Sergei, > > I haven't used them myself, but the documentation for idiom brackets is > here: > https://agda.readthedocs.io/en/v2.6.1/language/syntactic-sugar.html#idiom-brackets > . They're probably more useful in programming than proving. > > Regards, > James > > On 18 March 2020 13:32:17 GMT, mechvel at scico.botik.ru wrote: >> >> Can anybody, please, explain what does it mean the following? >> >> " >> Idiom brackets can accommodate none or multiple applications separated >> by a vertical bar `|` >> if there are two additional operations >> ```agda >> empty : ? {A} ? F A >> _<|>_ : ? {A} ? F A ? F A ? F A >> ``` >> i.e. an Alternative type class in Haskell. >> ". >> >> Please, give an example. >> What is an Alternative type class in Haskell ? In Agda ? >> >> Is it like this: >> >> f :: (Foo1 a) -> a -> a >> >> | (Foo2 a) -> a -> (a, a) >> >> - to declare f having two signatures? >> >> Thanks, >> ------------------------------ >> Sergei >> ------------------------------ >> Agda mailing list >> Agda at lists.chalmers.se >> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7Cdb12e08efccb4780914108d7cb40cb7e%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637201351459161057&sdata=vIvmJRfEwm2lwLRRKmRi%2BmEngLqzqRWEjpy2g81j5vc%3D&reserved=0 >> >> >> > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- ? LT -------------- next part -------------- An HTML attachment was scrubbed... URL: From asr at eafit.edu.co Wed Mar 18 18:24:12 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Wed, 18 Mar 2020 12:24:12 -0500 Subject: [Agda] failure of cabal install Agda In-Reply-To: References: Message-ID: On Wed, 18 Mar 2020 at 11:08, Michel Levy wrote: > The output of > $ sudo apt-get install agda-bin > $ agda --version > > is > > michel at M1330:~$ agda --version > Agda version 2.5.3 > > Ok. After running $ sudo apt-get install agda-mode $ emacs Foo.agda Did you see the Agda menu in Emacs? -- Andr?s -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Wed Mar 18 19:00:28 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Wed, 18 Mar 2020 19:00:28 +0100 Subject: [Agda] failure of cabal install Agda In-Reply-To: References: Message-ID: I don't see the Agda menu in Emacs After running $ sudo apt-get install agda-mode $ emacs Foo.agda But I have ALSO installed the agda package and now I see the emacs mode Agda. Le 18/03/2020 ? 18:24, Andr?s Sicard-Ram?rez a ?crit?: > > > On Wed, 18 Mar 2020 at 11:08, Michel Levy > wrote: > ? > > The output of > $ sudo apt-get install agda-bin > $ agda --version > > is > > michel at M1330:~$ agda --version > Agda version 2.5.3 > > Ok. > > After running > > $ sudo apt-get install agda-mode > $ emacs Foo.agda > > Did you see the Agda menu in Emacs? > > -- > Andr?s -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Mar 18 19:07:44 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 18 Mar 2020 18:07:44 +0000 Subject: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? In-Reply-To: References: <220154c9-f0a6-416d-364d-c090004397e8@cs.bham.ac.uk> <3F15AEB2-60B3-4BBE-800F-39270F4F36ED@nottingham.ac.uk> <87BED64F-0185-4BE2-9687-FA5B216A0A79@nottingham.ac.uk> Message-ID: <5346A78E-88FE-48CF-8A4E-81DFA326A5CD@nottingham.ac.uk> From: Kevin Buzzard Date: Tuesday, 17 March 2020 at 00:02 To: Thorsten Altenkirch Cc: agda-list , Coq Club , "coq+miscellaneous at discoursemail.com" , lean-user Subject: Re: [Agda] [lean-user] Re: [Coq-Club] Why dependent type theory? It seems to me that if you are working with structures, i.e. do structural Mathematics you need to understand what they are and they cannot be reduced to their encodings. Hence what is the equality of structures, if not their structural equality? If I remember correctly, in your talk at Nottingham you discussed a construction by Grothendieck where he used equivalence of structures as if it were equality. This seems to be an omission and you and your students were able to address this, I think by choosing a canonical representation. However, the funny thing was that you were using a system which doesn?t allow you to express any non-structural properties but because of the way equality is done in Lean you cannot exploit this. There is something subtle going on which I do not really understand, but it would not surprise me if there are plenty of people on these lists who do. Our problem with formalising the work of Grothendieck was that he assumed that objects which were "canonically" isomorphic were in fact equal. Canonical isomorphism is this weasel word which mathematicians often do not define properly, but in this particular case (we had a proof of P(A) and I could not deduce a proof of P(B) when B was "canonically" isomorphic to A) we solved the problem by noticing that in this particular case "canonically isomorphic" meant "satisfied the same universal property". We then changed our proof of P(A) to prove instead P(anything satisfying the universal property defining A), and then we were OK. I think it is interesting that at the point in my talk when I explained this, I said "and we couldn't believe it -- our proof barely needed changing" and you laughed and said something like "of course it didn't!". We are mathematicians learning how mathematics works :-) But we did not go "full univalence", we did not argue that isomorphic objects were equal, we only needed that "canonically" isomorphic objects were equal. In my experience of mathematics, this is the principle which is used. My fear of univalence is that because it goes a bit further, and that extra step seems to rule out some basic principles used in Lean's maths library and hence makes a whole bunch of mathematical proofs far more inconvenient to write. I am still learning about theorem provers but am urging my community to start formalising mathematics and this sort of thing is one of many issues which deserves to be better understood -- certainly by mathematicians! I am wondering whether this idea of ?canonical isomorphism? is just a bit of a stop gap which comes from set-theoretic thinking. I was laughing because anything you can do in type theory is stable under structural isomorphism. Hence certainly proofs can be transported along structural isomorphism. I just wonder if you have two mathematical objects which have all the same properties, then what would you call them if not equal? But more practically: indeed you are right if you accept this point (i.e. univalence) then you have to give up some properties of equality in particular that it is propositional, i..e a property. This can be annoying because it may mean that you have to deal with coherence issues when using equality, but I suspect you should be used to this. However, as long as you only deal with simple objects, i.e. as in the ?world of numbers? everything is fine and nothing changes. It is only when you leave the realm of ?set level Mathematics? and talk about structures (as in the Grothendieck example) you encounter equalities which are not propositions (but structures themselves). However, here comes a technical issue, which I think is overrated. Namely, Lean uses strict equality (I think I introduced this in a paper in ?99 to deal with extensionality) which means any two proofs of a proposition, e.g. a set level equality are ?definitionally equal?, i.e. the type system knows this. Now the problem is that being a proposition in HoTT is a proposition itself while for a strict Prop you need it to be a judgement, i.e. static. However, both concepts can coexist in the same system: you can have strict and weak Prop. The weak Prop gives you a subobject classifier but the strict Prop is more convenient to use and only gives you a quasi-topos, I think. So I think you can have your cake and eat it. Thorsten P.S. I agree with all the rest and appreciate that you want to reach the top of the tree Mathematicans. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersmortberg at gmail.com Fri Mar 20 12:01:51 2020 From: andersmortberg at gmail.com (Anders Mortberg) Date: Fri, 20 Mar 2020 12:01:51 +0100 Subject: [Agda] PhD positions in Computational Mathematics at Stockholm University Message-ID: The Department of Mathematics at Stockholm University invites applications for PhD positions in Computational Mathematics. A prospective student will have the opportunity to engage in exciting research related to type theory, HoTT/UF, constructive mathematics, programming language theory and category theoretic foundations. The student will be part of the newly founded Computational Mathematics division. It will also be possible to collaborate with other groups in the department, such as the Mathematical Logic group (with experts on constructive mathematics and type theory like Per Martin-L?f and Peter LeFanu Lumsdaine) and the Algebra, Geometry, Topology, and Combinatorics group. For further information and instructions on how to apply see https://www.su.se/english/about/working-at-su/phd?rmpage=job&rmjob=11944&rmlang=UK The deadline for application is April 23, 2020. Some potential project ideas can be found at https://www.math.su.se/english/education/phd-studies/research-projects/possible-research-projects-in-computational-mathematics-1.430102#m%C3%B6rtberg If you are interested in applying and have any questions feel free to contact me! -- Anders M?rtberg https://staff.math.su.se/anders.mortberg/ From michel.levy.imag at free.fr Sun Mar 22 12:38:00 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sun, 22 Mar 2020 12:38:00 +0100 Subject: [Agda] exercice of Peter Dybjer Message-ID: In the paper AgdaLectureNotes2018 of Peter Dybjer, there is this exercise page 19 Exercise: prove symmetry and transitivity using subst but without using pattern matching! I don't find the solution, can you help me to solve it ? -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Sun Mar 22 13:13:44 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Sun, 22 Mar 2020 13:13:44 +0100 Subject: [Agda] exercice of Peter Dybjer In-Reply-To: References: Message-ID: Hi Michel, Here's a hint for sym: starting from `x ? y`, if you can prove that `P z = z ? x` holds for `z = x`, then you can use `subst` to prove that it also holds for `z = y`. For `trans`, there is a similar trick but now you need to choose `P` to be an implication between two identity types. -- Jesper On Sun, Mar 22, 2020 at 12:38 PM Michel Levy wrote: > In the paper AgdaLectureNotes2018 > of > Peter Dybjer, there is this exercise page 19 > > Exercise: prove symmetry and transitivity using subst but without using > pattern matching! > > I don't find the solution, can you help me to solve it ? > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Sun Mar 22 16:20:51 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sun, 22 Mar 2020 15:20:51 +0000 Subject: [Agda] exercice of Peter Dybjer In-Reply-To: References: Message-ID: <088ff85a-51b2-4d7a-6053-d243aec74f43@strath.ac.uk> Hi Michel, To add to what Jesper said, you can also note that subst is the non-dependent eliminator of equality. Similarly to how any simple function over lists defined by pattern matching can be rewritten using foldr, any simple function matching on equality proofs can be rewritten mechanically in terms of subst. By ?simple?, I mean that the result type does not depend on the value being eliminated, and nothing too tricky is going on with respect to totality checking (this doesn't matter anyway for things just involving equality, because you're never doing anything recursive or corecursive). In the case where you do have dependency on the equality proof being eliminated (which is also a bit unusual, but comes up), you'd need the J eliminator. Regards, James On 22/03/2020 12:13, Jesper Cockx wrote: > Hi Michel, > > Here's a hint for sym: starting from `x ? y`, if you can prove that `P z > = z ? x` holds for `z = x`, then you can use `subst` to prove that it > also holds for `z = y`. For `trans`, there is a similar trick but now > you need to choose `P` to be an implication between two identity types. > > -- Jesper > > > > On Sun, Mar 22, 2020 at 12:38 PM Michel Levy > wrote: > > In the paper AgdaLectureNotes2018 > > of Peter Dybjer, there is this exercise page 19 > > Exercise: prove symmetry and transitivity using subst but without > using pattern matching! > > I don't find the solution, can you help me to solve it ? > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7Cec5e2aa521e9417d91be08d7ce5a840a%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637204760886970322&sdata=o%2BHXNEJ9eIC33S08AiR6%2B7wYM1eMcydBQJGY8XvDMSs%3D&reserved=0 > From sergey.goncharov at fau.de Mon Mar 23 02:25:25 2020 From: sergey.goncharov at fau.de (Sergey Goncharov) Date: Mon, 23 Mar 2020 02:25:25 +0100 Subject: [Agda] "Not in Scope" definitional equalities Message-ID: Hi All, I have the following problem: in course of a proof, as a part of the running context, I have: X = X? : Set (? ? ??) (not in scope) and when I try to resolve a hole in this context I get X !=< X? of type Set (? ? ??) when checking that the expression ... has type ... It is hard to provide more details, because the complete example is large, and as usual everything depends on everything else. But maybe someone could help me with a general understanding how these "not in scope" definitional equalities can be avoided, and why they are not effective anyway? Thanks, Sergey -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5384 bytes Desc: S/MIME Cryptographic Signature URL: From Jesper at sikanda.be Mon Mar 23 09:16:00 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Mon, 23 Mar 2020 09:16:00 +0100 Subject: [Agda] "Not in Scope" definitional equalities In-Reply-To: References: Message-ID: Hi Sergey, A part of the context of the form `X = X? : Set (? ? ??) (not in scope)` can mean two things: 1. either there is a variable named `X` in scope, but it is shadowed by another variable `X` so Agda decided to rename it to `X?` 2. or the variable `X` is an implicit argument and Agda decided to pro-actively rename it to `X?` to avoid a name conflict with another (implicit or explicit) variable In case 1., you need to find out which other variable is also named `X` and rename one of them. In case 2., you need to bind the implicit argument explicitly, e.g. by writing `{X = X}` in the left-hand side of the clause. -- Jesper ps: To the Agda devs: maybe in the first case Agda should display `(shadowed)` instead of `(not in scope)` so it is easier to distinguish between the two cases? On Mon, Mar 23, 2020 at 2:26 AM Sergey Goncharov wrote: > Hi All, > > I have the following problem: in course of a proof, as a part of the > running context, I have: > > X = X? : Set (? ? ??) (not in scope) > > and when I try to resolve a hole in this context I get > > X !=< X? of type Set (? ? ??) > when checking that the expression ... has type ... > > It is hard to provide more details, because the complete example is > large, and as usual everything depends on everything else. But maybe > someone could help me with a general understanding how these "not in > scope" definitional equalities can be avoided, and why they are not > effective anyway? > > Thanks, > Sergey > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Mon Mar 23 09:47:55 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Mon, 23 Mar 2020 09:47:55 +0100 Subject: [Agda] where is the official agda.sty Message-ID: <71754b9a-c9e1-bc15-22bf-5377aba70267@free.fr> In my packages agda for Ubuntu 19.04 (i.e.? agda, agda-mode, agda-bin), there is no file agda.sty. But where is the official agda.sty file ? Sincerely yours -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From Jesper at sikanda.be Mon Mar 23 10:06:01 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Mon, 23 Mar 2020 10:06:01 +0100 Subject: [Agda] where is the official agda.sty In-Reply-To: <71754b9a-c9e1-bc15-22bf-5377aba70267@free.fr> References: <71754b9a-c9e1-bc15-22bf-5377aba70267@free.fr> Message-ID: It's here: https://github.com/agda/agda/blob/master/src/data/agda.sty -- Jesper On Mon, Mar 23, 2020 at 9:48 AM Michel Levy wrote: > In my packages agda for Ubuntu 19.04 (i.e. agda, agda-mode, agda-bin), > there is no file agda.sty. > > But where is the official agda.sty file ? > > Sincerely yours > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Mon Mar 23 17:53:13 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Mon, 23 Mar 2020 17:53:13 +0100 Subject: [Agda] syntax declaration Message-ID: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> I made the following statement data exists (A : Set)(P : A -> Set): Set where ? <_,_> : (a : A) -> P a -> exists A P I would like to rewrite (exists A P) as, for example,? (ex (x : A) P x). But I don't understand how to do it. I tried : syntax exists A P?? = ex? (x : A) , P x but I had the mistake : syntax must use holes exactly once Can you explain to me how to use the syntax declaration on this example ? What are these holes in my syntax statement ? -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From m.escardo at cs.bham.ac.uk Mon Mar 23 18:18:48 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 23 Mar 2020 17:18:48 +0000 Subject: [Agda] syntax declaration In-Reply-To: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> References: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> Message-ID: Use a different colon (:) symbol, such as the one you get by typing \:4 in emacs. I think the normal colon is reserved. Martin On 23/03/2020 16:53, michel.levy.imag at free.fr wrote: > I made the following statement > > data exists (A : Set)(P : A -> Set): Set where > ? <_,_> : (a : A) -> P a -> exists A P > > I would like to rewrite (exists A P) as, for example,? (ex (x : A) P x). > But I don't understand how to do it. I tried : > > syntax exists A P?? = ex? (x : A) , P x > > but I had the mistake : syntax must use holes exactly once > > Can you explain to me how to use the syntax declaration on this example ? What are these holes in my syntax statement ? > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From m.escardo at cs.bham.ac.uk Mon Mar 23 18:19:40 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 23 Mar 2020 17:19:40 +0000 Subject: [Agda] syntax declaration In-Reply-To: References: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> Message-ID: Also you will need to write syntax exists A P = ex x : A , P x without the round brackets, I think. Martin On 23/03/2020 17:18, Martin Escardo wrote: > Use a different colon (:) symbol, such as the one you get by typing \:4 > in emacs. I think the normal colon is reserved. Martin > > On 23/03/2020 16:53, michel.levy.imag at free.fr wrote: >> I made the following statement >> >> data exists (A : Set)(P : A -> Set): Set where >> ?? <_,_> : (a : A) -> P a -> exists A P >> >> I would like to rewrite (exists A P) as, for example,? (ex (x : A) P x). >> But I don't understand how to do it. I tried : >> >> syntax exists A P?? = ex? (x : A) , P x >> >> but I had the mistake : syntax must use holes exactly once >> >> Can you explain to me how to use the syntax declaration on this >> example ? What are these holes in my syntax statement ? >> > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From a.j.rouvoet at gmail.com Mon Mar 23 18:24:59 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Mon, 23 Mar 2020 18:24:59 +0100 Subject: [Agda] syntax declaration In-Reply-To: References: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> Message-ID: Concretely, the following is accepted by Agda: syntax exists A (? x -> px) = ex x ? A , px and you can use it as you want (I think): there-are-numbers-less-than-three : ex x ? ? , (x ? 3) On 3/23/20 6:19 PM, Martin Escardo wrote: > Also you will need to write > > syntax exists A P?? = ex? x : A , P x > > without the round brackets, I think. > > Martin > > > On 23/03/2020 17:18, Martin Escardo wrote: >> Use a different colon (:) symbol, such as the one you get by typing >> \:4 in emacs. I think the normal colon is reserved. Martin >> >> On 23/03/2020 16:53, michel.levy.imag at free.fr wrote: >>> I made the following statement >>> >>> data exists (A : Set)(P : A -> Set): Set where >>> ?? <_,_> : (a : A) -> P a -> exists A P >>> >>> I would like to rewrite (exists A P) as, for example,? (ex (x : A) P >>> x). >>> But I don't understand how to do it. I tried : >>> >>> syntax exists A P?? = ex? (x : A) , P x >>> >>> but I had the mistake : syntax must use holes exactly once >>> >>> Can you explain to me how to use the syntax declaration on this >>> example ? What are these holes in my syntax statement ? >>> >> > From wadler at inf.ed.ac.uk Mon Mar 23 19:06:23 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Mon, 23 Mar 2020 15:06:23 -0300 Subject: [Agda] syntax declaration In-Reply-To: References: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> Message-ID: > > Use a different colon (:) symbol, such as the one you get by typing \:4 > in emacs. I think the normal colon is reserved. Please don't! Relying on a difference that no one can see is bound to lead to problems. There are many colon-like symbols that are easy to distinguish from a colon, see here: https://unicode-search.net/unicode-namesearch.pl?term=COLON My favourite is: U+2982 ? e2 a6 82 Z NOTATION TYPE *COLON* Cheers, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Mon, 23 Mar 2020 at 14:25, a.j.rouvoet wrote: > Concretely, the following is accepted by Agda: > > syntax exists A (? x -> px) = ex x ? A , px > > and you can use it as you want (I think): > > there-are-numbers-less-than-three : ex x ? ? , (x ? 3) > > On 3/23/20 6:19 PM, Martin Escardo wrote: > > Also you will need to write > > > > syntax exists A P = ex x : A , P x > > > > without the round brackets, I think. > > > > Martin > > > > > > On 23/03/2020 17:18, Martin Escardo wrote: > >> Use a different colon (:) symbol, such as the one you get by typing > >> \:4 in emacs. I think the normal colon is reserved. Martin > >> > >> On 23/03/2020 16:53, michel.levy.imag at free.fr wrote: > >>> I made the following statement > >>> > >>> data exists (A : Set)(P : A -> Set): Set where > >>> <_,_> : (a : A) -> P a -> exists A P > >>> > >>> I would like to rewrite (exists A P) as, for example, (ex (x : A) P > >>> x). > >>> But I don't understand how to do it. I tried : > >>> > >>> syntax exists A P = ex (x : A) , P x > >>> > >>> but I had the mistake : syntax must use holes exactly once > >>> > >>> Can you explain to me how to use the syntax declaration on this > >>> example ? What are these holes in my syntax statement ? > >>> > >> > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From michel.levy.imag at free.fr Mon Mar 23 22:13:35 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Mon, 23 Mar 2020 22:13:35 +0100 Subject: [Agda] syntax declaration In-Reply-To: References: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> Message-ID: <2c10a4c0-e001-d0b8-2acf-109d148b6485@free.fr> Alas, the suggestion of Martin "syntax exists A P?? = ex? x : A , P x" doesn't work. I? still have the error : syntax must alternate holes and non-holes. And I get a lexical error when I replace the colon : by \:4 I? read "https://agda.readthedocs.io/en/v2.6.0/language/syntax-declarations.html" without finding the solution. Remark : I'm using agda version 2.5.3 Le 23/03/2020 ? 18:19, Martin Escardo a ?crit?: > Also you will need to write > > syntax exists A P?? = ex? x : A , P x > > without the round brackets, I think. > > Martin > > > On 23/03/2020 17:18, Martin Escardo wrote: >> Use a different colon (:) symbol, such as the one you get by typing >> \:4 in emacs. I think the normal colon is reserved. Martin >> >> On 23/03/2020 16:53, michel.levy.imag at free.fr wrote: >>> I made the following statement >>> >>> data exists (A : Set)(P : A -> Set): Set where >>> ?? <_,_> : (a : A) -> P a -> exists A P >>> >>> I would like to rewrite (exists A P) as, for example,? (ex (x : A) P >>> x). >>> But I don't understand how to do it. I tried : >>> >>> syntax exists A P?? = ex? (x : A) , P x >>> >>> but I had the mistake : syntax must use holes exactly once >>> >>> Can you explain to me how to use the syntax declaration on this >>> example ? What are these holes in my syntax statement ? >>> >> > -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From ulf.norell at gmail.com Mon Mar 23 22:49:16 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Mon, 23 Mar 2020 22:49:16 +0100 Subject: [Agda] syntax declaration In-Reply-To: <2c10a4c0-e001-d0b8-2acf-109d148b6485@free.fr> References: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> <2c10a4c0-e001-d0b8-2acf-109d148b6485@free.fr> Message-ID: It should be syntax exists A (? x ? P) = ex x ? A , P / Ulf On Mon, Mar 23, 2020 at 10:13 PM Michel Levy wrote: > Alas, the suggestion of Martin "syntax exists A P = ex x : A , P x" > doesn't work. > > I still have the error : syntax must alternate holes and non-holes. > > And I get a lexical error when I replace the colon : by \:4 > > I read > "https://agda.readthedocs.io/en/v2.6.0/language/syntax-declarations.html" > without finding the solution. > > Remark : I'm using agda version 2.5.3 > > Le 23/03/2020 ? 18:19, Martin Escardo a ?crit : > > Also you will need to write > > > > syntax exists A P = ex x : A , P x > > > > without the round brackets, I think. > > > > Martin > > > > > > On 23/03/2020 17:18, Martin Escardo wrote: > >> Use a different colon (:) symbol, such as the one you get by typing > >> \:4 in emacs. I think the normal colon is reserved. Martin > >> > >> On 23/03/2020 16:53, michel.levy.imag at free.fr wrote: > >>> I made the following statement > >>> > >>> data exists (A : Set)(P : A -> Set): Set where > >>> <_,_> : (a : A) -> P a -> exists A P > >>> > >>> I would like to rewrite (exists A P) as, for example, (ex (x : A) P > >>> x). > >>> But I don't understand how to do it. I tried : > >>> > >>> syntax exists A P = ex (x : A) , P x > >>> > >>> but I had the mistake : syntax must use holes exactly once > >>> > >>> Can you explain to me how to use the syntax declaration on this > >>> example ? What are these holes in my syntax statement ? > >>> > >> > > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fdhzs2010 at hotmail.com Tue Mar 24 00:59:19 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Mon, 23 Mar 2020 23:59:19 +0000 Subject: [Agda] syntax declaration In-Reply-To: References: <5555a879-80ab-00d7-99c9-d3a2cad3f320@free.fr> <2c10a4c0-e001-d0b8-2acf-109d148b6485@free.fr>, Message-ID: Michel, why are you using such an old version while reading the doc of a recent one? Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Ulf Norell Sent: March 23, 2020 5:49 PM To: Michel Levy Cc: Agda users Subject: Re: [Agda] syntax declaration It should be syntax exists A (? x ? P) = ex x ? A , P / Ulf On Mon, Mar 23, 2020 at 10:13 PM Michel Levy > wrote: Alas, the suggestion of Martin "syntax exists A P = ex x : A , P x" doesn't work. I still have the error : syntax must alternate holes and non-holes. And I get a lexical error when I replace the colon : by \:4 I read "https://agda.readthedocs.io/en/v2.6.0/language/syntax-declarations.html" without finding the solution. Remark : I'm using agda version 2.5.3 Le 23/03/2020 ? 18:19, Martin Escardo a ?crit : > Also you will need to write > > syntax exists A P = ex x : A , P x > > without the round brackets, I think. > > Martin > > > On 23/03/2020 17:18, Martin Escardo wrote: >> Use a different colon (:) symbol, such as the one you get by typing >> \:4 in emacs. I think the normal colon is reserved. Martin >> >> On 23/03/2020 16:53, michel.levy.imag at free.fr wrote: >>> I made the following statement >>> >>> data exists (A : Set)(P : A -> Set): Set where >>> <_,_> : (a : A) -> P a -> exists A P >>> >>> I would like to rewrite (exists A P) as, for example, (ex (x : A) P >>> x). >>> But I don't understand how to do it. I tried : >>> >>> syntax exists A P = ex (x : A) , P x >>> >>> but I had the mistake : syntax must use holes exactly once >>> >>> Can you explain to me how to use the syntax declaration on this >>> example ? What are these holes in my syntax statement ? >>> >> > -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Tue Mar 24 11:58:05 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Tue, 24 Mar 2020 11:58:05 +0100 Subject: [Agda] syntax declaration Message-ID: My apologies to Philip Walder and Martin Escardo: they were right but I didn't understand them. Below, I give an example of a short module using their suggestion. module syntax-exists where data exists (A : Set)(P : A -> Set): Set where ? <_,_> : (a : A) -> P a -> exists A P ? syntax exists A (\ x -> B ) = ex x ? A ,? B -- The colon is NOT the usual one (reserved by agda) but obtained by -- the combination Alt Gr \, : ,4, RET -- Actually, you can used any sign not reserved by agda. -- The syntax declaration means, if P is (\ x -> B) then you can use (ex x : A, B) as a -- notation for (exists A P) -- My first theorem with this new syntax :? (P a) -> (ex x ? A, P x) ex-intro : {A : Set}(a : A)(P : A -> Set) -> (P a) -> (ex x ? A , P x) ex-intro a P r = < a , r > -- end of this module Thank you for your help. -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From bob.atkey at gmail.com Tue Mar 24 12:01:34 2020 From: bob.atkey at gmail.com (Robert Atkey) Date: Tue, 24 Mar 2020 11:01:34 +0000 Subject: [Agda] Multiple Research Positions (3 Doctoral, 5 Post-doctoral) on AI Verification Message-ID: <104a6b0b-865f-895f-38ee-eb494ad5a2a6@gmail.com> AI Secure and Explainable by Construction: Multiple Research Positions (3 Doctoral, 5 Post-doctoral) available at Heriot-Watt, Edinburgh and Strathclyde Universities, Scotland, UK. Start date: 1 September 2020; End date: 30 August 2023 Postdoctoral Salary Scale: ?31,866 to ?40,322 per annum PhD funding: covering PhD fees and stipend for 3.5 years Closing date for Postdoctoral applications: 1 June 2020 We encourage interested applicants to contact us informally ASAP. The project has sufficient flexibility to mitigate the effect of COVID-19, i.e. by accommodating later start date and remote working. The project spans several subjects: type theory, automated and interactive theorem proving, security, AI and machine learning, autonomous systems, natural language processing and generation, legal aspects of AI. It will cover two main application areas: autonomous cars and chatbots, drawing from expertise and infrastructure provided by industrial partners working in these two areas. The project has a significant international span, with 12 partners from Academia and Industry in Europe (France, Germany, Israel, the Netherlands, Norway) and the US. Researchers joining this project will have excellent opportunities to travel to international conferences, organise scientific events, spend time with industrial partners, collaborate with academic leaders in the field, develop their own research profiles as well as gain experience in other AI and CS disciplines. For further information, and instructions how to apply, please visit: http://laiv.uk/index.php/vacancies/ Ekaterina Komendantskaya: http://www.macs.hw.ac.uk/~ek19/ Robert Atkey: https://bentnib.org/ David Aspinall: https://homepages.inf.ed.ac.uk/da/ Burkard Schafer: https://www.law.ed.ac.uk/people/professor-burkhard-schafer Verena Rieser: https://sites.google.com/site/verenateresarieser/ From godzbanebane at gmail.com Tue Mar 24 23:28:16 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Wed, 25 Mar 2020 00:28:16 +0200 Subject: [Agda] How can I implement naive sized lambdas? Message-ID: Hello! Sorry if this isn't the right place to ask a question like this! I want to express named lambda terms in Agda. By doing so in the most "naive" way possible, I encounter a termination issue when implementing substitution - when I want to rename a variable to avoid accidental variable capture, the termination checker is unhappy - I'm trying to do a recursive call (recursive calling substitution) on the result of a function (renaming). My first thought is to attach sizes (via either Nats or the builtin Size type), and show that renaming doesn't "change size". After a bit of struggling I couldn't manage to do so, and am writing to ask for a hint or some advice. This is my initial attempt: data : Size -> Set where v : {i : Size} -> (n : Nat) -> Lambda i _app_ : {i j : Size} -> Lambda i -> Lambda j -> Lambda (sizeSuc (sizeMax i j)) lam_>_ : {i : Size} -> Nat -> Lambda i -> Lambda (sizeSuc i) but with this I can't even implement something like promo : {i j : Size} -> Lambda i -> Lambda (sizeMax i j) Furthermore I have no idea what return type to even give to substitution! I am pretty sure I am missing something very fundamental about sizes and how to use them, but I couldn't find materials to answer my question. Thanks in advance! ======= Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at tomjack.co Wed Mar 25 05:32:30 2020 From: tom at tomjack.co (Tom Jack) Date: Tue, 24 Mar 2020 23:32:30 -0500 Subject: [Agda] How can I implement naive sized lambdas? In-Reply-To: References: Message-ID: This article by Rob Simmons might be relevant to you: https://requestforlogic.blogspot.com/2010/11/totally-nameless-representation.html It shows one way to handle the "sizes" manually (without sized types.) See the section "Setting up a metric." The metric is nicer to work with than Nat. On Tue, Mar 24, 2020 at 5:28 PM Georgi Lyubenov wrote: > Hello! > > Sorry if this isn't the right place to ask a question like this! > > I want to express named lambda terms in Agda. By doing so in the most > "naive" way possible, I encounter a termination issue when implementing > substitution - when I want to rename a variable to avoid accidental > variable capture, the termination checker is unhappy - I'm trying to do a > recursive call (recursive calling substitution) on the result of a function > (renaming). My first thought is to attach sizes (via either Nats or the > builtin Size type), and show that renaming doesn't "change size". After a > bit of struggling I couldn't manage to do so, and am writing to ask for a > hint or some advice. > > This is my initial attempt: > > data : Size -> Set where > v : {i : Size} -> (n : Nat) -> Lambda i > _app_ : {i j : Size} -> Lambda i -> Lambda j -> Lambda (sizeSuc (sizeMax > i j)) > lam_>_ : {i : Size} -> Nat -> Lambda i -> Lambda (sizeSuc i) > > but with this I can't even implement something like > > promo : {i j : Size} -> Lambda i -> Lambda (sizeMax i j) > > Furthermore I have no idea what return type to even give to substitution! > > I am pretty sure I am missing something very fundamental about sizes and > how to use them, but I couldn't find materials to answer my question. > > Thanks in advance! > > ======= > Georgi > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From puttamalac at gmail.com Wed Mar 25 10:32:25 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Wed, 25 Mar 2020 10:32:25 +0100 Subject: [Agda] How can I implement naive sized lambdas? In-Reply-To: References: Message-ID: Hi, AFAIK, if you first define a renaming operation recursively, and then define substitution as a separate operation, then everything is clearly structural and sizes are unnecessary. You may want to use sized terms for a different reason though. I personally haven't yet found a need for sized terms when formalizing lambda calculi. Georgi Lyubenov ezt ?rta (id?pont: 2020. m?rc. 24., K, 23:28): > Hello! > > Sorry if this isn't the right place to ask a question like this! > > I want to express named lambda terms in Agda. By doing so in the most > "naive" way possible, I encounter a termination issue when implementing > substitution - when I want to rename a variable to avoid accidental > variable capture, the termination checker is unhappy - I'm trying to do a > recursive call (recursive calling substitution) on the result of a function > (renaming). My first thought is to attach sizes (via either Nats or the > builtin Size type), and show that renaming doesn't "change size". After a > bit of struggling I couldn't manage to do so, and am writing to ask for a > hint or some advice. > > This is my initial attempt: > > data : Size -> Set where > v : {i : Size} -> (n : Nat) -> Lambda i > _app_ : {i j : Size} -> Lambda i -> Lambda j -> Lambda (sizeSuc (sizeMax > i j)) > lam_>_ : {i : Size} -> Nat -> Lambda i -> Lambda (sizeSuc i) > > but with this I can't even implement something like > > promo : {i j : Size} -> Lambda i -> Lambda (sizeMax i j) > > Furthermore I have no idea what return type to even give to substitution! > > I am pretty sure I am missing something very fundamental about sizes and > how to use them, but I couldn't find materials to answer my question. > > Thanks in advance! > > ======= > Georgi > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Wed Mar 25 11:09:57 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Wed, 25 Mar 2020 10:09:57 +0000 Subject: [Agda] How can I implement naive sized lambdas? In-Reply-To: References: Message-ID: <062e7aa6-9e80-83ca-b2e4-d99b1222f7da@ens-lyon.org> Hi Georgi, I would advise against working directly with raw names: you get absolutely no support from the typechecker to enforce well-scopedness and it is very easy to shoot one's foot off. This warning out of the way, this is the type signatures I would start with: * Not using `Size<` (that works well with codata, not with data) * Giving subterms the *same* size (a size is an upper bound anyway) * Giving the return type a size increased by one (using `?_`) ===================================================================== open import Size open import Data.Nat.Base variable i : Size data Lam : Size ? Set where var : ? ? Lam (? i) app : Lam i ? Lam i ? Lam (? i) lam_>_ : ? ? Lam i ? Lam (? i) ren : (? ? ?) ? Lam i ? Lam i ren = ? sub : (? ? Lam ?) ? Lam i ? Lam ? sub = ? ===================================================================== Best, gallais On 24/03/2020 22:28, Georgi Lyubenov wrote: > Hello! > > Sorry if this isn't the right place to ask a question like this! > > I want to express named lambda terms in Agda. By doing so in the most > "naive" way possible, I encounter a termination issue when implementing > substitution - when I want to rename a variable to avoid accidental > variable capture, the termination checker is unhappy - I'm trying to do a > recursive call (recursive calling substitution) on the result of a function > (renaming). My first thought is to attach sizes (via either Nats or the > builtin Size type), and show that renaming doesn't "change size". After a > bit of struggling I couldn't manage to do so, and am writing to ask for a > hint or some advice. > > This is my initial attempt: > > data : Size -> Set where > v : {i : Size} -> (n : Nat) -> Lambda i > _app_ : {i j : Size} -> Lambda i -> Lambda j -> Lambda (sizeSuc (sizeMax > i j)) > lam_>_ : {i : Size} -> Nat -> Lambda i -> Lambda (sizeSuc i) > > but with this I can't even implement something like > > promo : {i j : Size} -> Lambda i -> Lambda (sizeMax i j) > > Furthermore I have no idea what return type to even give to substitution! > > I am pretty sure I am missing something very fundamental about sizes and > how to use them, but I couldn't find materials to answer my question. > > Thanks in advance! > > ======= > Georgi > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From bernardobruno at gmail.com Thu Mar 26 09:49:50 2020 From: bernardobruno at gmail.com (Bruno Bernardo) Date: Thu, 26 Mar 2020 09:49:50 +0100 Subject: [Agda] 2nd Workshop on Formal Methods for Blockchains (FMBC) 2020 - 1st CFP Message-ID: <88aa3a29-8c7a-9d0f-5496-3c296c235a08@gmail.com> [ Please distribute, apologies for multiple postings. ] ======================================================================== 2nd Workshop on Formal Methods for Blockchains (FMBC) 2020 - First Call https://fmbc.gitlab.io/2020 July 19, 2020, Los Angeles, USA Co-located with the 32nd International Conference on Computer-Aided Verification (CAV 2020) http://i-cav.org/2020/ ------------------------------------------------------------- IMPORTANT DATES -------------------------------- Abstract submission: April 21, 2020 Full paper submission: April 28, 2020 Notification: June 9, 2020 Camera-ready: July 7, 2020 Conference: July 19, 2020 -------------------------------- -------------------------------- TOPICS OF INTEREST -------------------------------- Blockchains are decentralized transactional ledgers that rely on cryptographic hash functions for guaranteeing the integrity of the stored data. Participants on the network reach agreement on what valid transactions are through consensus algorithms. Blockchains may also provide support for Smart Contracts. Smart Contracts are scripts of an ad-hoc programming language that are stored in the Blockchain and that run on the network. They can interact with the ledger?s data and update its state. These scripts can express the logic of possibly complex contracts between users of the Blockchain. Thus, Smart Contracts can facilitate the economic activity of Blockchain participants. With the emergence and increasing popularity of cryptocurrencies such as Bitcoin and Ethereum, it is now of utmost importance to have strong guarantees of the behavior of Blockchain software. These guarantees can be brought by using Formal Methods. Indeed, Blockchain software encompasses many topics of computer science where using Formal Methods techniques and tools are relevant: consensus algorithms to ensure the liveness and the security of the data on the chain, programming languages specifically designed to write Smart Contracts, cryptographic protocols, such as zero-knowledge proofs, used to ensure privacy, etc. This workshop is a forum to identify theoretical and practical approaches of formal methods for Blockchain technology. Topics include, but are not limited to: * Formal models of Blockchain applications or concepts * Formal methods for consensus protocols * Formal methods for Blockchain-specific cryptographic primitives or protocols * Design and implementation of Smart Contract languages * Verification of Smart Contracts -------------------------------- -------------------------------- SUBMISSION -------------------------------- Submit original manuscripts (not published or considered elsewhere) with a maximum of twelve pages (full papers), six pages (short papers), and two pages (extended abstract) describing new and emerging ideas or summarizing existing work). Each paper should include a title and the name and affiliation of each author. Authors of selected extended-abstracts are invited to give a short lightning talk. At least one author of an accepted paper is expected to present the paper at the workshop as a registered participant. Submission link: https://easychair.org/conferences/?conf=fmbc2020 -------------------------------- -------------------------------- PROCEEDINGS -------------------------------- All submissions will be peer-reviewed by at least three members of the program committee for quality and relevance. Accepted regular papers (full and short papers) will be included in the workshop proceedings. -------------------------------- -------------------------------- INVITED SPEAKER -------------------------------- Grigore Rosu, Professor at University of Illinois at Urbana-Champaign, USA and Founder of Runtime Verification http://fsl.cs.illinois.edu/index.php/Grigore_Rosu https://runtimeverification.com/ -------------------------------- -------------------------------- PROGRAM COMMITTEE -------------------------------- PC CO-CHAIRS * Bruno Bernardo (Nomadic Labs, France) (bruno at nomadic-labs.com) * Diego Marmsoler (University of Exeter, UK) (D.Marmsoler at exeter.ac.uk) PC MEMBERS * Wolfgang Ahrendt (Chalmers University of Technology, Sweden) * Lacramioara Astefanoei (Nomadic Labs, France) * Massimo Bartoletti (University of Cagliari, Italy) * Bernhard Beckert (Karlsruhe Institute of Technology, Germany) * Achim Brucker (University of Exeter, UK) * Silvia Crafa (Universita di Padova, Italy) * Zaynah Dargaye (Nomadic Labs, France) * J?r?mie Decouchant (University of Luxembourg, Luxembourg) * Ansgar Fehnker (University of Twente, Netherlands) * Georges Gonthier (Inria, France) * Florian Kammueller (Middlesex University London, UK) * Maurice Herlihy (Brown University, USA) * Igor Konnov (Informal, Austria) * Andreas Lochbihler (Digital Asset, Switzerland) * Anastasia Mavridou (NASA Ames, USA) * Sim?o Melo de Sousa (Universidade da Beira Interior, Portugal) * Karl Palmskog (KTH, Sweden) * Vincent Rahli (University of Birmingham, UK) * Andreas Rossberg (Dfinity Foundation, Germany) * Claudio Russo (Dfinity Foundation, USA) * C?sar Sanchez (Imdea, Spain) * Clara Schneidewind (TU Wien, Austria) * Ilya Sergey (Yale-NUS College/NUS, Singapore) * Bas Spitters (Aarhus University/Concordium, Denmark) * Mark Staples (CSIRO Data61, Australia) * Meng Sun (Peking University, China) * Simon Thompson (University of Kent, UK) * Philip Wadler (University of Edinburgh / IOHK, UK) (Note: Additional PC members may be added in the coming weeks.) From andreas.abel at ifi.lmu.de Fri Mar 27 03:44:12 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 27 Mar 2020 03:44:12 +0100 Subject: [Agda] How can I implement naive sized lambdas? In-Reply-To: References: Message-ID: <52a711f3-f89c-1be1-c8ab-1ae30a5597a6@ifi.lmu.de> Hello Georgi, you already received some good advice. In general, I second Andras' advice to first define renaming and then (parallel) substitution. If you want to do it in one definition, you can use Conor McBride's trick: http://www.cse.chalmers.se/~abela/html/ParallelSubstitution.html (See http://www.cse.chalmers.se/~abela/projects.html for some more code snippets.) The blog post by Rob Simmons is neat, but I'd say not entirely state of the art; you definitely want parallel substitution as the primitive, not single substitution as Rob defines it (maybe owned to the fact that he comes from a Twelf background). Cheers, Andreas On 2020-03-24 23:28, Georgi Lyubenov wrote: > Hello! > > Sorry if this isn't the right place to ask a question like this! > > I want to express named lambda terms in Agda. By doing so in the most > "naive" way possible, I encounter a termination issue when implementing > substitution - when I want to rename a variable to avoid accidental > variable capture, the termination checker is unhappy - I'm trying to do > a recursive call (recursive calling substitution) on the result of a > function (renaming). My first thought is to attach sizes (via either > Nats or the builtin Size type), and show that renaming doesn't "change > size". After a bit of struggling I couldn't manage to do so, and am > writing to ask for a hint or some advice. > > This is my initial attempt: > > data : Size -> Set where > ? v : {i : Size} -> (n : Nat) -> Lambda i > ? _app_ : {i j : Size} -> Lambda i -> Lambda j -> Lambda (sizeSuc > (sizeMax i j)) > ? lam_>_ : {i : Size} -> Nat -> Lambda i -> Lambda (sizeSuc i) > > but with this I can't even implement something like > > promo : {i j : Size} -> Lambda i -> Lambda (sizeMax i j) > > Furthermore I have no idea what return type to even give to substitution! > > I am pretty sure I am missing something very fundamental about sizes and > how to use them, but I couldn't find materials to answer my question. > > Thanks in advance! > > ======= > Georgi > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From Thorsten.Altenkirch at nottingham.ac.uk Sat Mar 28 17:16:20 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 28 Mar 2020 16:16:20 +0000 Subject: [Agda] splitting cases Message-ID: Hi, I thought we were already able to split cases but it seems I was wrong: f : Bool ? Bool f true = true b : Bool b = false f false = b doesn?t work. Was this already a feature request? I actually need it mostly for pedagogical reasons. I want to prove a theorem, ah I need a lemma, let?s prove it and then continue. Yes, I know I could use with but this gets to complicated. However, splitting cases is also very useful for inductive-inductive definitions. Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From leo at halfaya.org Sat Mar 28 17:47:13 2020 From: leo at halfaya.org (John Leo) Date: Sat, 28 Mar 2020 09:47:13 -0700 Subject: [Agda] splitting cases In-Reply-To: References: Message-ID: Hi Thorston, Personally I think this style would be more confusing than helpful. If I need a local lemma, I just prove it in place using a let statement ("where" would also be fine). If it's a more general lemma, I just prove it before the function that uses it. I do this when I teach Agda as well and students are fine with it. So for your example: f : Bool ? Bool f true = true f false = let b : Bool b = false in b In general I will have a whole series of variables in the let clause that represent local lemmas, culminating with the final "in". In fact if I include the types of each local variable I typically put them on the same line as the terms and separated by a semicolon which I then line up. This resembles then the two column proof style ("statements and reasons") from Euclidean geometry that I learned in high school (sadly not taught anymore) which I find it the most easy to follow. It's also easy to work with interactively, filling in the holes as one continues. Here's an example from the class I'm teaching at Google using Wadler's wonderful text. _?_ : ? {A : Set} (x y : A) ? Set? _?_ {A} x y = ? (P : A ? Set) ? P x ? P y refl-? : ? {A : Set} {x : A} ? ? (P : A ? Set) ? P x ? P x --x ? x refl-? P Px = Px sym-? : ? {A : Set} {x y : A} ? x ? y ? y ? x sym-? {A} {x} {y} x?y P = let Q : A ? Set ; Q z = P z ? P x Qx : Q x ; Qx = refl-? P Qy : Q y ; Qy = x?y Q Qx in Qy John On Sat, Mar 28, 2020 at 9:16 AM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > Hi, > > > > I thought we were already able to split cases but it seems I was wrong: > > > > f : Bool ? Bool > > > > f true = true > > > > b : Bool > > b = false > > > > f false = b > > > > doesn?t work. Was this already a feature request? I actually need it > mostly for pedagogical reasons. I want to prove a theorem, ah I need a > lemma, let?s prove it and then continue. > > > > Yes, I know I could use with but this gets to complicated. However, > splitting cases is also very useful for inductive-inductive definitions. > > > > Thorsten > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Sun Mar 29 15:26:41 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sun, 29 Mar 2020 15:26:41 +0200 Subject: [Agda] error message in agda Message-ID: When you make an mistake on the type of an expression, you may get the following message 5 != 4 of type ? when checking that the expression s?s {n = 4} (s?s z?n) has type 2 ? 4 Why agda doesn't give the type of the expression ? In my example (coming from an exercise of Philip Wadler) I would have appreciated the longer message 5 != 4 of type ? when checking that the expression s?s {n = 4} (s?s z?n) *of type 2? ? 5 * has type 2 ? 4 -- mail : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Sun Mar 29 18:34:42 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Sun, 29 Mar 2020 18:34:42 +0200 Subject: [Agda] error message in agda In-Reply-To: References: Message-ID: Hi Michel, The reason why the error message does not mention the type of the expression, is because it is an expression coming from the user code and thus (in general) is not even necessarily well-typed. In general type inference for Agda is undecidable so it would not always be possible to print an error message of the form "expected vs inferred type" like in Haskell. However, in cases where it is possible to infer the type (as in this example) it might be a useful addition to Agda to also print the inferred type. If you want, you could create a feature request on the issue tracker (https://github.com/agda/agda/issues). -- Jesper On Sun, Mar 29, 2020 at 3:27 PM Michel Levy wrote: > When you make an mistake on the type of an expression, you may get the > following message > > 5 != 4 of type ? > when checking that the expression s?s {n = 4} (s?s z?n) > has type 2 ? 4 > > Why agda doesn't give the type of the expression ? In my example (coming > from an exercise of Philip Wadler) > I would have appreciated the longer message > > 5 != 4 of type ? > when checking that the expression s?s {n = 4} (s?s z?n) > *of type 2 ? 5 * > has type 2 ? 4 > > -- > mail : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Mon Mar 30 21:49:11 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Mon, 30 Mar 2020 21:49:11 +0200 Subject: [Agda] rewrite keyword Message-ID: <67e36203-d243-0448-0928-6ac4331298e3@free.fr> In an exercise of https://plfa.github.io/Relations/ You have the following definition +-mono?-? : ? (m n p : ? ) ? m ? n ? m + p ? n + p ? +-mono?-? m n p m?n rewrite +-comm m p | +-comm n p = +-mono?-? p m n m?n On this example, I have two questions 1) How to have the superscript l in the name +-monol On my emacs \^l give a right to left superscript arrow 2) Why +-mono?-? m n p m?n rewrite +-comm m p | +-comm n p is not a term ? To understand the meaning of rewrite, I try to get the type of \lambda m n p m ? n -> ag+-mono?-? m n p m?n rewrite +-comm m p | +-comm n p But this is not a term, and I got a parse error. More generally, why isn't there a term of the form (exp1 rewrite exp2)? ? PS : I have read the doc "https://agda.readthedocs.io/en/latest/language/with-abstraction.html#with-rewrite" -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.rouvoet at gmail.com Mon Mar 30 21:58:57 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Mon, 30 Mar 2020 21:58:57 +0200 Subject: [Agda] rewrite keyword In-Reply-To: <67e36203-d243-0448-0928-6ac4331298e3@free.fr> References: <67e36203-d243-0448-0928-6ac4331298e3@free.fr> Message-ID: Hi Michel, Re 1) in general many inputs are behind menus. If you input \^l you should get a menu at the bottom that you can choose other options from. If you copy paste a symbol into emacs, select it and call describe-char, it should also tell you how to input it using agda-input. Others can probably answer your question about rewrite better than I can :) Cheers, Arjen On 3/30/20 9:49 PM, Michel Levy wrote: > > In an exercise of https://plfa.github.io/Relations/ You have the > following definition > > +-mono?-? : ? (m > n > p > : ? > ) ? m > ? > n > ? m > + > p > ? > n > + > p > > > +-mono?-? m > n > p > m?n > > rewrite +-comm > > m p > | > +-comm > > n p > = > +-mono?-? > p > m > n > m?n > > > On this example, I have two questions > > > 1) How to have the superscript l in the name +-monol > > On my emacs \^l give a right to left superscript arrow > > > 2) Why > > +-mono?-? m > n > p > m?n > > rewrite +-comm > > m p > | > +-comm > > n p > > > is not a term ? > > To understand the meaning of rewrite, I try to get the type of > > \lambda m n p m ? > n -> > ag+-mono?-? m > n > p > m?n > > rewrite +-comm > > m p > | > +-comm > > n p > > > But this is not a term, and I got a parse error. > > More generally, why isn't there a term of the form (exp1 rewrite exp2)? ? > > PS : I have read the doc > "https://agda.readthedocs.io/en/latest/language/with-abstraction.html#with-rewrite" > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From godzbanebane at gmail.com Mon Mar 30 21:59:38 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Mon, 30 Mar 2020 22:59:38 +0300 Subject: [Agda] rewrite keyword In-Reply-To: <67e36203-d243-0448-0928-6ac4331298e3@free.fr> References: <67e36203-d243-0448-0928-6ac4331298e3@free.fr> Message-ID: Hi! \^l brings up the superscript 'l' as one of four choices for me - I can choose which one I want by using the corresponding number [image: 2020-03-30-225522_377x30_scrot.png] Rewrite is described as being syntactic sugar for 'with' and 'with' itself is not a term. What kind of term are you expecting out of the 'rewrite'? ======= Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2020-03-30-225522_377x30_scrot.png Type: image/png Size: 4470 bytes Desc: not available URL: From guillaume.allais at ens-lyon.org Tue Mar 31 13:04:47 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Tue, 31 Mar 2020 12:04:47 +0100 Subject: [Agda] splitting cases In-Reply-To: References: Message-ID: <828ec96b-15ee-c614-13dd-0107d9de2202@ens-lyon.org> Hi Thorsten It is indeed already a feature request however it has not been implemented yet. It is quite non-trivial to do: https://github.com/agda/agda/issues/2858 Best, guillaume On 28/03/2020 16:16, Thorsten Altenkirch wrote: > Hi, > > I thought we were already able to split cases but it seems I was wrong: > > f : Bool ? Bool > > f true = true > > b : Bool > b = false > > f false = b > > doesn?t work. Was this already a feature request? I actually need it mostly for pedagogical reasons. I want to prove a theorem, ah I need a lemma, let?s prove it and then continue. > > Yes, I know I could use with but this gets to complicated. However, splitting cases is also very useful for inductive-inductive definitions. > > Thorsten > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From wadler at inf.ed.ac.uk Tue Mar 31 13:40:50 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Tue, 31 Mar 2020 08:40:50 -0300 Subject: [Agda] rewrite keyword In-Reply-To: References: <67e36203-d243-0448-0928-6ac4331298e3@free.fr> Message-ID: Unicode and rewriting are both explained in PLFA: https://plfa.github.io/Naturals/#unicode https://plfa.github.io/Equality/#rewriting I repeat the explanation of Unicode below. Cheers, -- P Unicode This chapter uses the following unicode: ? U+2115 DOUBLE-STRUCK CAPITAL N (\bN) ? U+2192 RIGHTWARDS ARROW (\to, \r, \->) ? U+2238 DOT MINUS (\.-) ? U+2261 IDENTICAL TO (\==) ? U+27E8 MATHEMATICAL LEFT ANGLE BRACKET (\<) ? U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET (\>) ? U+220E END OF PROOF (\qed) Each line consists of the Unicode character (?), the corresponding code point (U+2115), the name of the character (DOUBLE-STRUCK CAPITAL N), and the sequence to type into Emacs to generate the character (\bN). The command \r gives access to a wide variety of rightward arrows. After typing \r, one can access the many available arrows by using the left, right, up, and down keys to navigate. The command remembers where you navigated to the last time, and starts with the same character next time. The command \l works similarly for left arrows. In place of left, right, up, and down keys, one may also use control characters: C-b left (backward one character) C-f right (forward one character) C-p up (to the previous line) C-n down (to the next line) We write C-b to stand for control-b, and similarly. One can also navigate left and right by typing the digits that appear in the displayed list. For a full list of supported characters, use agda-input-show-translations with: M-x agda-input-show-translations All the characters supported by agda-mode are shown. We write M-x to stand for typing ESC followed by x. If you want to know how you input a specific Unicode character in an agda file, move the cursor onto the character and use quail-show-key with: M-x quail-show-key You?ll see a key sequence of the character in mini buffer. If you run M-x quail-show-key on say ?, you will see \.- for the character. . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Mon, 30 Mar 2020 at 17:00, Georgi Lyubenov wrote: > Hi! > > \^l brings up the superscript 'l' as one of four choices for me - I can > choose which one I want by using the corresponding number > [image: 2020-03-30-225522_377x30_scrot.png] > > Rewrite is described as being syntactic sugar for 'with' and 'with' > itself is not a term. What kind of term are you expecting out of the > 'rewrite'? > > ======= > Georgi > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2020-03-30-225522_377x30_scrot.png Type: image/png Size: 4470 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From andreas.abel at ifi.lmu.de Wed Apr 1 11:46:38 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 1 Apr 2020 11:46:38 +0200 Subject: [Agda] splitting cases In-Reply-To: <828ec96b-15ee-c614-13dd-0107d9de2202@ens-lyon.org> References: <828ec96b-15ee-c614-13dd-0107d9de2202@ens-lyon.org> Message-ID: <3ebd9620-1a57-08bd-6bb3-55c83a31e8ee@ifi.lmu.de> Thorsten, I posted your question there https://github.com/agda/agda/issues/2858 and made a comment. On 2020-03-31 13:04, Guillaume Allais wrote: > Hi Thorsten > > It is indeed already a feature request however it has not been implemented yet. > It is quite non-trivial to do: https://github.com/agda/agda/issues/2858 > > Best, > guillaume > > > On 28/03/2020 16:16, Thorsten Altenkirch wrote: >> Hi, >> >> I thought we were already able to split cases but it seems I was wrong: >> >> f : Bool ? Bool >> >> f true = true >> >> b : Bool >> b = false >> >> f false = b >> >> doesn?t work. Was this already a feature request? I actually need it mostly for pedagogical reasons. I want to prove a theorem, ah I need a lemma, let?s prove it and then continue. >> >> Yes, I know I could use with but this gets to complicated. However, splitting cases is also very useful for inductive-inductive definitions. >> >> Thorsten >> >> >> >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please contact the sender and delete the email and >> attachment. >> >> Any views or opinions expressed by the author of this email do not >> necessarily reflect the views of the University of Nottingham. Email >> communications with the University of Nottingham may be monitored >> where permitted by law. >> >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From paba at itu.dk Fri Apr 3 08:40:52 2020 From: paba at itu.dk (Patrick Bahr) Date: Fri, 3 Apr 2020 06:40:52 +0000 Subject: [Agda] TERMGRAPH 2020: 2nd Call for papers Message-ID: <023529A4-B2E9-49C6-BA8B-D9F5A54F817A@itu.dk> ======================================================================= Second Call for Papers TERMGRAPH 2020 Eleventh International Workshop on Computing with Terms and Graphs 5 July, 2020 termgraph.org.uk/2020 An FSCD 2020 Workshop ======================================================================= Graphs and graph transformation systems are used in many areas within Computer Science: to represent data structures and algorithms, to define computation models, as a general modelling tool to study complex systems, etc. Topics of interest for TERMGRAPH encompass all aspects of term and graph rewriting, and applications of graph transformations in programming, automated reasoning and symbolic computation, including: * Theory of first-order and higher-order term and graph rewriting * Graph grammars * Graph-based models of computation * Graph-based programming languages and modelling frameworks * Applications in functional and logic programming * Applications in automated reasoning and symbolic computation * Term/graph rewriting tools: case studies and system descriptions * Implementation issues The aim of this workshop is to bring together researchers working in these different domains and to foster their interaction, to provide a forum for presenting new ideas and work in progress, and to enable newcomers to learn about current activities in this area. Important Dates: Submission deadline: 15 April 2020 Notification: 15 May 2020 PreProceedings version: 24 May 2020 Online Workshop: 5 July 2020 (Due to the Covid-19 pandemic, the workshop will be held online.) Submissions and Publication: Authors are invited to submit an extended abstract in PDF format of max. 8 pages in EPTCS style (http://style.eptcs.org/). This may include both original work and tutorials on any of the abovementioned topics; work in progress is also welcome. Submission is through Easychair: https://easychair.org/conferences/?conf=termgraph2020 Preliminary proceedings will be available at the workshop. After the workshop, authors will be invited to submit a longer version of their work (typically a 15-pages paper) for publication in EPTCS. These submissions will undergo a second round of refereeing. Programme Committee: Beniamino Accattoli Zena Ariola Patrick Bahr (chair) Clemens Grabmayer Makoto Hamana Wolfram Kahl Fr?d?ric Prost Femke van Raamsdonk David Sabel Contact: Patrick Bahr From james.wood.100 at strath.ac.uk Sat Apr 4 01:49:16 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sat, 4 Apr 2020 00:49:16 +0100 Subject: [Agda] Filling squares Message-ID: Hi all, I asked this question on IRC a few days ago, but it looks like no-one there picked up on it. Perhaps it is more suited to the mailing list. The question is explained fully in the code and comments of this file: https://gist.github.com/laMudri/52d46ba2f385c3544b8bb6a05457c54a To summarise, I'm using --cubical and being asked for a square which I don't really know how to go about filling. I think it should be an argument very similar to the contractibility of singletons, but I can't piece it together. Thanks, James From godzbanebane at gmail.com Sat Apr 4 17:10:07 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Sat, 4 Apr 2020 18:10:07 +0300 Subject: [Agda] How can I implement naive sized lambdas? In-Reply-To: <52a711f3-f89c-1be1-c8ab-1ae30a5597a6@ifi.lmu.de> References: <52a711f3-f89c-1be1-c8ab-1ae30a5597a6@ifi.lmu.de> Message-ID: Thanks for the responses! In the end I went with using sizes as demonstrated by gallais - after avoiding SIZEMAX using SIZEINF I had no more issues. The result can be seen here . On Wed, Mar 25, 2020 at 12:10 PM Guillaume Allais < guillaume.allais at ens-lyon.org> wrote: > Hi Georgi, > > I would advise against working directly with raw names: you get > absolutely no support from the typechecker to enforce well-scopedness > and it is very easy to shoot one's foot off. > I am aware, but my initial goal itself is to implement named and nameless lambdas, implement and prove conversion between the two representations (+ other stuff eventually, like beta reduction). That said, is there some "well-scoped syntaxes 101" resource that I could read? The only particular thing I am aware of is "Everybody's Got To Be Somewhere" by Conor McBride. Thanks for the hint and snippet(s) on parallel substitution - this is the first time I've seen the approach and will definitely need to check it out! ======= Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron-stump at uiowa.edu Sat Apr 4 18:31:13 2020 From: aaron-stump at uiowa.edu (Aaron Stump) Date: Sat, 4 Apr 2020 11:31:13 -0500 Subject: [Agda] free download of VFPIA Message-ID: Dear Agda community, I just wanted to pass on something I recently learned, that ACM is giving free access to the ACM Digital Library for the next three months due to the pandemic. This means you can download my Agda book in EPUB or PDF free in that time. Just FYI. Download link: https://dl.acm.org/doi/book/10.1145/2841316 ACM press release: https://www.acm.org/articles/bulletins/2020/march/dl-access-during-covid-19 Best, Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergo at erdi.hu Sun Apr 5 12:53:14 2020 From: gergo at erdi.hu (Dr. ERDI Gergo) Date: Sun, 5 Apr 2020 18:53:14 +0800 (+08) Subject: [Agda] How can I implement naive sized lambdas? In-Reply-To: References: <52a711f3-f89c-1be1-c8ab-1ae30a5597a6@ifi.lmu.de> Message-ID: On Sat, 4 Apr 2020, Georgi Lyubenov wrote: > That said, is there some "well-scoped syntaxes 101" resource that I could read? The > only particular thing I am aware of is "Everybody's Got To Be Somewhere" by Conor > McBride. There's A type and scope safe universe of syntaxes with binding : their semantics and proofs (https://strathprints.strath.ac.uk/64841/) and my own Generic Description of Well-Scoped, Well-Typed Syntaxes (https://arxiv.org/abs/1804.00119) From sandro.stucki at gmail.com Sun Apr 5 13:56:44 2020 From: sandro.stucki at gmail.com (Sandro Stucki) Date: Sun, 5 Apr 2020 13:56:44 +0200 Subject: [Agda] How can I implement naive sized lambdas? In-Reply-To: References: <52a711f3-f89c-1be1-c8ab-1ae30a5597a6@ifi.lmu.de> Message-ID: Hi Georgi, > That said, is there some "well-scoped syntaxes 101" resource that I could read? The only particular thing I am aware of is "Everybody's Got To Be Somewhere" by Conor McBride. There is some support for well-scoped parallel substitutions in the Agda standard library, along with an example of how to use it for the untyped lambda calculus: https://github.com/agda/agda-stdlib/blob/master/src/Data/Fin/Substitution.agda https://github.com/agda/agda-stdlib/blob/master/src/Data/Fin/Substitution/Example.agda Not sure this qualifies as a 101 though. For what it's worth, it illustrates the use of parallel substitutions as suggested by Andreas, and people seem to find it useful for their projects. /Sandro From wadler at inf.ed.ac.uk Sun Apr 5 15:24:55 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Sun, 5 Apr 2020 10:24:55 -0300 Subject: [Agda] How can I implement naive sized lambdas? In-Reply-To: References: <52a711f3-f89c-1be1-c8ab-1ae30a5597a6@ifi.lmu.de> Message-ID: > > That said, is there some "well-scoped syntaxes 101" resource that I could > read? Programming Language Foundations in Agda contains a beginners guide to lambda calculus in both extrinsic (named variables, separate type rules) and intrinsic (deBruijn, inherently scoped and typed) forms. Go well, -- P plfa.inf.ed.ac.uk plfa.inf.ed.ac.uk/Lambda/ plfa.inf.ed.ac.uk/Properties/ plfa.inf.ed.ac.uk/DeBruijn/ . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From w.s.swierstra at uu.nl Mon Apr 6 11:35:03 2020 From: w.s.swierstra at uu.nl (Wouter Swierstra) Date: Mon, 6 Apr 2020 11:35:03 +0200 Subject: [Agda] Two PhD positions in Utrecht Message-ID: <20200406093503.GW22409@x1> ============================================================== Two PhD positions in functional programming ============================================================== The Department of Information and Computing Sciences at Utrecht University is currently advertising two PhD positions in Functional Programming. The candidates will join the Intelligent Systems group, working with Johan Jeuring, Gabriele Keller, and Wouter Swierstra. Besides research, the successful candidate will be expected to help supervise MSc students and assist in the teaching of courses. The positions should be filled by September 2020, although the exact starting date is negotiable. --------------------------------- Research topics --------------------------------- These two positions are tied to two specific topics. * Programming tutors for Functional Languages (Johan Jeuring) The focus of the position is on designing new technologies to support students working in an intelligent tutoring system for functional programming. We expect to use techniques from dependently typed programming, refinement types, program synthesis, automated theorem proving, and more to analyse student programs, and to help students in taking the next step when developing a program. The candidate will investigate the design and use of multiple technologies for this purpose, add them to Ask-Elle, our intelligent tutoring system, perform experiments with the system, and improve the technologies based on the outcome of the experiments. * Compiler verification for a smart contract language (Wouter Swierstra & Gabriele Keller) This project aims to develop a certifying compiler for Plutus Tx, a subset of the purely functional language Haskell that is used to implement smart contracts for the Cardano blockchain. The Plutus smart contract framework is being developed by IOHK for Cardano and the present project is a joint effort of IOHK and Utrecht University. The Plutus Tx compiler is based on the GHC Haskell compiler and adds a translation step from GHC Core to a minimal lambda calculus. Programs in this lambda calculus are executed during transaction validation in a sandboxed execution environment in a manner that is crucial to the security of the blockchain. This project aims to formalise the semantics of the languages involved, to reason about the transformation and optimisation steps that the compiler performs, and finally, to generate a proof object certifying the correctness of the generated code together with that code. --------------------------------- What we are looking for --------------------------------- The ideal candidates should have a degree in Computer Science, be highly motivated, speak and write English well, and be proficient in producing scientific reports. Furthermore, candidates should be able to demonstrate experience with functional programming languages, such as Haskell, OCaml, ML, Agda, Idris, or Coq. --------------------------------- What we offer --------------------------------- The candidates are offered a full-time position for four or five years, depending on the teaching load. The gross salary ranges between ?2,325 in the first year and ?2,972 in the fourth year per month for full-time employment. A part-time position of at least 0.8 fte may also be possible. The salary is supplemented with a holiday bonus of 8% and an end-of-year bonus of 8.3% per year. The position also includes a generous allocation of fully-paid vacation days. In addition we offer: a pension scheme, partially paid parental leave, and flexible employment conditions. Conditions are based on the Collective Labour Agreement Dutch Universities. The research group will provide the candidate with necessary support on all aspects of the project. More information is available on the website: Terms and employment: http://bit.ly/1elqpM7 Utrecht is consistently ranked as one of the best places in the world to live. --------------------------------- How to apply --------------------------------- To apply please attach a letter of motivation, a curriculum vitae, and (email) addresses of two referees. Make sure to also include a transcript of the courses you have followed (at bachelor and master level), with the grades you obtained, and to include a sample of your scientific writing, such as your master thesis. It is possible to apply for this position if you are close to obtaining your Master's. In that case include a letter of your supervisor with an estimate of your progress, and do not forget to include at least a sample of your technical writing skills. The application deadline for the first position closes on April 29th. You can apply through the University's website: https://www.uu.nl/en/organisation/working-at-utrecht-university/jobs/5-year-phd-candidate-position-in-intelligent-tutoring-systems-for-functional-programming-10-fte The application for the second position is not yet open -- but feel free to contact me directly if you're interested. If you're interested in either position, feel free to apply using the link above; we're happy to discuss which topic fits your interests best during the application process. From a.g.setzer at swansea.ac.uk Mon Apr 6 15:12:27 2020 From: a.g.setzer at swansea.ac.uk (Setzer A.G.) Date: Mon, 6 Apr 2020 13:12:27 +0000 Subject: [Agda] Example of an online conference in theoretical computer science BCTCS starting now Message-ID: Dear agda people, since we might need to shift Agda implememntors meeting online, I wanted to point out that there is an example of an online conference running now - BCTCS british colloquium in theoretical computer science. You might have a look and see how it works, it is free to watch via Zoom Anton ----------------------------------------------------------------------------- Dr Anton Setzer Darllenydd / Reader Ystafell / Room 403 Adran Gyfrifiadureg / Dept. of Computer Science Y Ffowndri Gyfrifiadurol / Computational Foundry Coleg Gwyddoniaeth / College of Science Prifysgol Abertawe/ Swansea University Campws y Bae/ Bay Campus Abertawe / Swansea SA1 8EN DU / UK Rhowch wybod i ni os hoffech dderbyn eich gohebiaeth yn Gymraeg. / Let us know if you would like to receive correspondence in Welsh. Rydym yn croesawu gohebiaeth yn Gymraeg neu yn Saesneg. / We welcome correspondence in Welsh or English. Ni fydd gohebu yn Gymraeg yn arwain at oedi./ Corresponding in Welsh will not lead to a delay. -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.g.setzer at swansea.ac.uk Mon Apr 6 15:13:12 2020 From: a.g.setzer at swansea.ac.uk (Setzer A.G.) Date: Mon, 6 Apr 2020 13:13:12 +0000 Subject: [Agda] Example of an online conference in theoretical computer science BCTCS starting now In-Reply-To: References: Message-ID: I pressed the wrong button and sent it too fast. So here is the link http://cs.swansea.ac.uk/bctcs2020/ Anton ________________________________ From: Setzer A.G. Sent: 06 April 2020 14:12 To: agda at lists.chalmers.se Subject: Example of an online conference in theoretical computer science BCTCS starting now Dear agda people, since we might need to shift Agda implememntors meeting online, I wanted to point out that there is an example of an online conference running now - BCTCS british colloquium in theoretical computer science. You might have a look and see how it works, it is free to watch via Zoom Anton ----------------------------------------------------------------------------- Dr Anton Setzer Darllenydd / Reader Ystafell / Room 403 Adran Gyfrifiadureg / Dept. of Computer Science Y Ffowndri Gyfrifiadurol / Computational Foundry Coleg Gwyddoniaeth / College of Science Prifysgol Abertawe/ Swansea University Campws y Bae/ Bay Campus Abertawe / Swansea SA1 8EN DU / UK Rhowch wybod i ni os hoffech dderbyn eich gohebiaeth yn Gymraeg. / Let us know if you would like to receive correspondence in Welsh. Rydym yn croesawu gohebiaeth yn Gymraeg neu yn Saesneg. / We welcome correspondence in Welsh or English. Ni fydd gohebu yn Gymraeg yn arwain at oedi./ Corresponding in Welsh will not lead to a delay. -------------- next part -------------- An HTML attachment was scrubbed... URL: From herminie.pagel at gmail.com Mon Apr 6 15:46:15 2020 From: herminie.pagel at gmail.com (Herminie Pagel) Date: Mon, 6 Apr 2020 15:46:15 +0200 Subject: [Agda] Example of an online conference in theoretical computer science BCTCS starting now In-Reply-To: References: Message-ID: I just tested the online conference tool from a Mac OS, and it is working very well. Excellent audio and video quality. No registration fee and no sign in needed to participate. Also, the meeting IDs have good visibility from the program but unfortunately not from the talks page . The instructions on how to join are very clear, and maybe it would be worthy of adding some system-dependent observations, eg. Mac instructions Questions or difficulties could be perhaps treated online by chat (Gitter room?) instead of E-mail. Overall, an excellent example! best! -- herminie Am Mo., 6. Apr. 2020 um 15:13 Uhr schrieb Setzer A.G. < a.g.setzer at swansea.ac.uk>: > I pressed the wrong button and sent it too fast. So here is the link > > http://cs.swansea.ac.uk/bctcs2020/ > > Anton > > ------------------------------ > *From:* Setzer A.G. > *Sent:* 06 April 2020 14:12 > *To:* agda at lists.chalmers.se > *Subject:* Example of an online conference in theoretical computer > science BCTCS starting now > > Dear agda people, > > since we might need to shift Agda implememntors meeting online, I wanted > to point out that there is an example of an online conference running now - > BCTCS british colloquium in theoretical computer science. You might have a > look and see how it works, it is free to watch via Zoom > > > Anton > > > ----------------------------------------------------------------------------- > Dr Anton Setzer > Darllenydd / Reader > Ystafell / Room 403 > Adran Gyfrifiadureg / Dept. of Computer Science > Y Ffowndri Gyfrifiadurol / Computational Foundry > Coleg Gwyddoniaeth / College of Science > Prifysgol Abertawe/ Swansea University > Campws y Bae/ Bay Campus > Abertawe / Swansea SA1 8EN > DU / UK > > Rhowch wybod i ni os hoffech dderbyn eich gohebiaeth yn Gymraeg. / Let us > know if you would like to receive correspondence in Welsh. > Rydym yn croesawu gohebiaeth yn Gymraeg neu yn Saesneg. / We welcome > correspondence in Welsh or English. > Ni fydd gohebu yn Gymraeg yn arwain at oedi./ Corresponding in Welsh will > not lead to a delay. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Mon Apr 6 16:41:46 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 6 Apr 2020 16:41:46 +0200 Subject: [Agda] Example of an online conference in theoretical computer science BCTCS starting now In-Reply-To: References: Message-ID: <2bde0779-ef3a-129e-debf-760192d4d067@cse.gu.se> On 2020-04-06 15:12, Setzer A.G. wrote: > since we might need to shift Agda implememntors meeting online I think we should aim to have an online Agda meeting before the (Swedish) summer. Does anyone have any ideas about how we could organise the excursion? -- /NAD From leo at lpw25.net Mon Apr 6 20:23:38 2020 From: leo at lpw25.net (Leo White) Date: Mon, 06 Apr 2020 19:23:38 +0100 Subject: [Agda] ML Family Workshop 2020: Call for presentations Message-ID: <190427a3-24f6-4d3e-917d-b2cb771c3d5e@www.fastmail.com> We are happy to invite submissions to the ML Family Workshop 2020, to be held during the ICFP conference week on Thursday, August 27th. The ML family workshop warmly welcomes submission touching on the programming languages traditionally seen as part of the "ML family" (Standard ML, OCaml, F#, CakeML, SML#, Manticore, MetaOCaml, etc.). The scope of the workshop includes all aspects of the design, semantics, theory, application, implementation, and teaching of the members of the ML family. We also encourage presentations from related languages (such as Haskell, Scala, Rust, Nemerle, Links, Koka, F*, Eff, ATS, etc), to exchange experience of further developing ML ideas. Currently, the workshop is still scheduled to go ahead as planned in Jersey City, however it is likely that the ML workshop will end up being a virtual workshop this year. Either way provisions will be made to allow speakers to present their work remotely. See our detailed CFP online on the ICFP website: https://icfp20.sigplan.org/home/mlfamilyworkshop-2020 Important dates --------------- - Friday 15th May (any time zone): Abstract submission deadline - Friday 26th June: Author notification - Thursday 27th August: ML Family Workshop Program committee ----------------- - Youyou Cong (Tokyo Institute of Technology) - Ivan Gotovchits (Carnegie Mellon University) - Gowtham Kaki (Purdue University) - Neel Krishnaswami (University of Cambridge) - Daan Leijen (Microsoft Research) - Koko Muroya (Kyoto University) - Atsushi Ohori (Tohoku University) - Jonathan Protzenko (Microsoft Research) - Gabriel Radanne (INRIA) - Claudio Russo (Dfinity) - Leo White (Jane Street) (Chair) - Jeremy Yallop (University of Cambridge) Submission details ------------------ See the online CFP for the details on the expected submission format. Submissions must be uploaded to the workshop submission website https://ml2020.hotcrp.com/ before the submission deadline. From joey.eremondi at gmail.com Thu Apr 9 07:59:12 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Wed, 8 Apr 2020 22:59:12 -0700 Subject: [Agda] Induction from Sigma? Message-ID: I have an inductive type that looks something like this: data Foo : Set where A : (Foo , Foo) -> Foo B : (Nat -> Foo) -> Foo C : Unit -> Foo I'm trying to show that P holds for Foo, for some specific P : Set -> Set. I currently have: (A B : Set) -> P A -> P B -> P (A , B) (A : Set) -> P A -> P (Nat -> A) P Unit and importantly, (I : Set) -> (T : I -> Set) -> ( (i : I) -> P (T i) ) -> P (Sigma I T) i.e. we can compose P for any n-ary sum type. What I'm wondering is, is there any way I can combine these to get P Foo? Some notes: * I don't want to prove P Foo directly, because I want the ability to add constructors and easily compose the proofs into a proof of Foo P. * I'm open to other representations of Foo. The only reason I'm not having it as a Sigma type is that that doesn't allow for self-reference. My ideas: * If I can show that P holds under isomorphism, then I can show that Foo is isomorphic to (Foo \times Foo) + (Nat -> Foo) + Unit. But I'm not certain that this will still be well-founded recursion. * Maybe sized types can be used to make an explicit fixed-point operator, so I can have a recursive sum? * Could Containers, W-types, Descriptions, levitation, etc. be useful here? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Thu Apr 9 11:49:58 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 9 Apr 2020 09:49:58 +0000 Subject: [Agda] Induction from Sigma? In-Reply-To: References: Message-ID: <13A9B174-4004-49FE-8A54-6FEEA53DB876@nottingham.ac.uk> Hi Joey, Sorry but your question doesn?t make much sense to me. Maybe you can tell us what you want to do in more elementary terms. Btw, I don?t know what ?(Foo , Foo)? is supposed to mean. We are not doing Haskell here. I guess you mean Foo x Foo? You say that you want to show that ?P holds for Foo?? What is P? It seems that you are thinking of a property of types. There are some properties of types, like being finite or having at most one element and so on, but not so many. And since all properties of types are closed under isomorphism P must also hold for them. I guess this means you could omit A anyway. What does it mean that ?P holds under isomorphism?? Sorry, Thorsten From: Agda on behalf of Joey Eremondi Date: Thursday, 9 April 2020 at 06:59 To: Agda mailing list Subject: [Agda] Induction from Sigma? I have an inductive type that looks something like this: data Foo : Set where A : (Foo , Foo) -> Foo B : (Nat -> Foo) -> Foo C : Unit -> Foo I'm trying to show that P holds for Foo, for some specific P : Set -> Set. I currently have: (A B : Set) -> P A -> P B -> P (A , B) (A : Set) -> P A -> P (Nat -> A) P Unit and importantly, (I : Set) -> (T : I -> Set) -> ( (i : I) -> P (T i) ) -> P (Sigma I T) i.e. we can compose P for any n-ary sum type. What I'm wondering is, is there any way I can combine these to get P Foo? Some notes: * I don't want to prove P Foo directly, because I want the ability to add constructors and easily compose the proofs into a proof of Foo P. * I'm open to other representations of Foo. The only reason I'm not having it as a Sigma type is that that doesn't allow for self-reference. My ideas: * If I can show that P holds under isomorphism, then I can show that Foo is isomorphic to (Foo \times Foo) + (Nat -> Foo) + Unit. But I'm not certain that this will still be well-founded recursion. * Maybe sized types can be used to make an explicit fixed-point operator, so I can have a recursive sum? * Could Containers, W-types, Descriptions, levitation, etc. be useful here? Thanks! This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jakob at von-raumer.de Thu Apr 9 15:43:20 2020 From: jakob at von-raumer.de (Jakob von Raumer) Date: Thu, 9 Apr 2020 15:43:20 +0200 Subject: [Agda] Induction from Sigma? In-Reply-To: References: Message-ID: <2a07ddf0-5789-3399-043d-9be3dcf5ed29@von-raumer.de> Hi Joey, I think I understand your question. The answer is that the properties that you have for P so far are not sufficient to prove P Foo. To see why this is true, consider a version of Foo with the first constructor removed. The resulting type is the type of infinitely branching trees. You cannot express the type of trees by the means of products, functions out of Nat, and sigma types only. One solution could be to require P to be stable under the formation of W-types (i.e. show that (A : Set)(B : A -> Set) -> P A -> ((a : A) -> P (B a)) -> P (W A B)) and then equivalently express Foo as a W-type (i.e. prove that Foo ? W A B for some A and B). Cheers Jakob On 09/04/2020 07:59, Joey Eremondi wrote: > I have an inductive type that looks something like this: > > data Foo : Set where > ? A : (Foo , Foo) -> Foo > ? B : (Nat -> Foo) -> Foo > ? C : Unit -> Foo > > I'm trying to show that P holds for Foo, for some specific P : Set -> > Set. I currently have: > > ? (A B : Set) -> P A -> P B -> P (A , B) > ? (A : Set) -> P A -> P (Nat -> A) > ? P Unit > and importantly, > ? (I : Set) -> (T : I -> Set) -> ( (i : I) -> P (T i) ) -> P (Sigma I T) > i.e. we can compose P for any n-ary sum type. > > What I'm wondering is, is there any way I can combine these to get P Foo? > > Some notes: > * I don't want to prove P Foo directly, because I want the ability to > add constructors and easily compose the proofs into a proof of Foo P. > * I'm open to other representations of Foo. The only reason I'm not > having it as a Sigma type is that that doesn't allow for self-reference. > > My ideas: > > * If I can show that P holds under isomorphism, then I can show that > Foo is isomorphic to (Foo \times Foo) + (Nat -> Foo) + Unit. But I'm > not certain that this will still be well-founded recursion. > * Maybe sized types can be used to make an explicit fixed-point > operator, so I can have a recursive sum? > * Could Containers, W-types, Descriptions, levitation, etc. be useful > here? > > Thanks! > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From joey.eremondi at gmail.com Thu Apr 9 16:37:36 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Thu, 9 Apr 2020 07:37:36 -0700 Subject: [Agda] Induction from Sigma? In-Reply-To: <13A9B174-4004-49FE-8A54-6FEEA53DB876@nottingham.ac.uk> References: <13A9B174-4004-49FE-8A54-6FEEA53DB876@nottingham.ac.uk> Message-ID: Sorry, I've been a bit sloppy with what I'm saying. Btw, I don?t know what ?(Foo , Foo)? is supposed to mean. We are not doing > Haskell here. I guess you mean Foo x Foo? > Yes, that's exactly what I mean. You say that you want to show that ?P holds for Foo?? What is P? It seems > that you are thinking of a property of types. > What I mean is that "P Foo" is inhabited. The specific P I'm using is a record type that's basically describing operations over P, so it's less of a property and more of an interface. I'm just being sloppy with what I mean under Curry-Howard. What does it mean that ?P holds under isomorphism?? > What I mean is find a function "(A B : Set) -> (A <-> B) -> P A -> P B", where <-> is isomorphism Thanks! Joey -------------- next part -------------- An HTML attachment was scrubbed... URL: From benedikt.ahrens at gmail.com Tue Apr 7 01:10:17 2020 From: benedikt.ahrens at gmail.com (Benedikt Ahrens) Date: Mon, 6 Apr 2020 19:10:17 -0400 Subject: [Agda] Update on Workshop on Homotopy Type Theory and Univalent Foundations (HoTT/UF'20) on July 5-6, 2020 Message-ID: <561e360a-00ba-3026-192c-3a758a3946ab@gmail.com> UPDATE: - HoTT/UF 2020 will take place online - Submission deadline: May 20, 2020 Details below. Best, Benedikt * Workshop on Homotopy Type Theory and Univalent Foundations July 5-6, 2020, The Internet https://hott-uf.github.io/2020 Abstract submission deadline: May 20, 2020 Homotopy Type Theory is a young area of logic, combining ideas from several established fields: the use of dependent type theory as a foundation for mathematics, inspired by ideas and tools from abstract homotopy theory. Univalent Foundations are foundations of mathematics based on the homotopical interpretation of type theory. The goal of this workshop is to bring together researchers interested in all aspects of Homotopy Type Theory and Univalent Foundations: from the study of syntax and semantics of type theory to practical formalization in proof assistants based on univalent type theory. # Invited talks * Carlo Angiuli (Carnegie Mellon University) * Liron Cohen (Ben-Gurion University) * Pierre-Louis Curien (Universit? de Paris) # Submissions * Abstract submission deadline: May 20, 2020 * Author notification: June 05, 2020 Submissions should consist of a title and an abstract, in pdf format, of no more than 2 pages, submitted via https://easychair.org/conferences/?conf=hottuf2020 Considering the broad background of the expected audience, we encourage authors to include information of pedagogical value in their abstract, such as motivation and context of their work. # Program committee * Benedikt Ahrens (University of Birmingham) * Paolo Capriotti (Technische Universit?t Darmstadt) * Chris Kapulkin (University of Western Ontario) * Nicolai Kraus (University of Birmingham) * Peter LeFanu Lumsdaine (Stockholm University) * Anders M?rtberg (Stockholm University) * Paige Randall North (Ohio State University) * Nicolas Tabareau (Inria Nantes) # Organizers * Benedikt Ahrens (University of Birmingham) * Chris Kapulkin (University of Western Ontario) From herminie.pagel at gmail.com Fri Apr 10 14:01:30 2020 From: herminie.pagel at gmail.com (Herminie Pagel) Date: Fri, 10 Apr 2020 14:01:30 +0200 Subject: [Agda] Example of an online conference in theoretical computer science BCTCS starting now In-Reply-To: <2bde0779-ef3a-129e-debf-760192d4d067@cse.gu.se> References: <2bde0779-ef3a-129e-debf-760192d4d067@cse.gu.se> Message-ID: There seem to be some known issues with Zoom, to know more just search for "zoom security and privacy issues". A member of the Mathematically Structured Programming Group at Strathclyde told me that they use Jitsi for the MSP 101 talks and works well with ~25 people. Fully browser support only for latest versions of Chrome or Chromium, but they are working on that: https://github.com/jitsi/jitsi-meet/issues/4758 Should we give it a try? https://jitsi.org/ -- h Am Mo., 6. Apr. 2020 um 16:42 Uhr schrieb Nils Anders Danielsson < nad at cse.gu.se>: > On 2020-04-06 15:12, Setzer A.G. wrote: > > since we might need to shift Agda implememntors meeting online > > I think we should aim to have an online Agda meeting before the > (Swedish) summer. > > Does anyone have any ideas about how we could organise the excursion? > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Fri Apr 10 14:10:42 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 10 Apr 2020 12:10:42 +0000 Subject: [Agda] Example of an online conference in theoretical computer science BCTCS starting now In-Reply-To: References: <2bde0779-ef3a-129e-debf-760192d4d067@cse.gu.se>, Message-ID: <400F8AB4-6138-42E4-8C42-8BBF0B70DC90@exmail.nottingham.ac.uk> Does this mean that zoom enables a hostile takeover of your computer or just that unauthorised people can listen to your conversations? In the 2nd case i don?t care. Thorsten Sent from my iPhone On 10 Apr 2020, at 13:01, Herminie Pagel wrote: ? There seem to be some known issues with Zoom, to know more just search for "zoom security and privacy issues". A member of the Mathematically Structured Programming Group at Strathclyde told me that they use Jitsi for the MSP 101 talks and works well with ~25 people. Fully browser support only for latest versions of Chrome or Chromium, but they are working on that: https://github.com/jitsi/jitsi-meet/issues/4758 Should we give it a try? https://jitsi.org/ -- h Am Mo., 6. Apr. 2020 um 16:42 Uhr schrieb Nils Anders Danielsson >: On 2020-04-06 15:12, Setzer A.G. wrote: > since we might need to shift Agda implememntors meeting online I think we should aim to have an online Agda meeting before the (Swedish) summer. Does anyone have any ideas about how we could organise the excursion? -- /NAD _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scm at iis.sinica.edu.tw Fri Apr 10 14:57:47 2020 From: scm at iis.sinica.edu.tw (Shin-Cheng Mu) Date: Fri, 10 Apr 2020 20:57:47 +0800 Subject: [Agda] Example of an online conference in theoretical computer science BCTCS starting now In-Reply-To: <400F8AB4-6138-42E4-8C42-8BBF0B70DC90@exmail.nottingham.ac.uk> References: <2bde0779-ef3a-129e-debf-760192d4d067@cse.gu.se> <400F8AB4-6138-42E4-8C42-8BBF0B70DC90@exmail.nottingham.ac.uk> Message-ID: Hi, > On Apr 10, 2020, at 8:10 PM, Thorsten Altenkirch wrote: > Does this mean that zoom enables a hostile takeover > of your computer or just that unauthorised people > can listen to your conversations? In the 2nd case > i don?t care. As far as I know the bigger issue is about leaking user information. There are reports (to be confirmed) that login information of some Zoom users was hacked and posted on Dark Web. https://www.techtimes.com/articles/248672/20200408/352-stolen-zoom-passwords-meeting-ids-and-other-personal-infromation-are-now-being-shared-on-the-dark-web.htm Here is a brief summary of other known problems: https://www.forbes.com/sites/marleycoyne/2020/04/03/zooms-big-security-problems-summarized For these reasons, Taiwan's government agencies were told not to use Zoom. Meanwhile, Zoom keeps issuing patches, so these may change. sincerely, Shin From michel.levy.imag at free.fr Sun Apr 12 14:24:38 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sun, 12 Apr 2020 14:24:38 +0200 Subject: [Agda] Installing standard and plfa libraries Message-ID: I'm trying to write all the PLFA exercises.? But I have a problem installing the pfla library. More exactly the standard library is usable without "my home/.agda" directory. This library doesn't have a "standard-library.agda-lib" file. When I create a ".agda" directory with only the plfa library, I lose access to the standard library. This library doesn't have a "standard-library.agda-lib" file. When I create a "my home/.agda" directory with only the plfa library, I lose access to the standard library. What do I have to do to get both standard and plfa libraries? PS : my agda version is 2.5.3 installed with the Ubuntu packages. -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From michel.levy.imag at free.fr Sun Apr 12 14:41:03 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sun, 12 Apr 2020 14:41:03 +0200 Subject: [Agda] Installing standard and plfa libraries In-Reply-To: References: Message-ID: <35d66495-ee46-1917-5efc-92778a32bcda@free.fr> Excuse me. I have already found a solution to my problem : 1) Create the missing file "standard-library.agda-lib in the directory of the standard library 2) Create the directory "my_home/.agda. In the file libraries write the path to the two files agda-lib. In the defauts file, write plfa and standard-library. Le 12/04/2020 ? 14:24, Michel Levy a ?crit?: > I'm trying to write all the PLFA exercises.? But I have a problem > installing the pfla library. > More exactly the standard library is usable without "my home/.agda" > directory. This library doesn't have a "standard-library.agda-lib" file. > When I create a ".agda" directory with only the plfa library, I lose > access to the standard library. > This library doesn't have a "standard-library.agda-lib" file. > When I create a "my home/.agda" directory with only the plfa library, I > lose access to the standard library. > What do I have to do to get both standard and plfa libraries? > > PS : my agda version is 2.5.3 installed with the Ubuntu packages. > -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From wadler at inf.ed.ac.uk Sun Apr 12 16:17:30 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Sun, 12 Apr 2020 11:17:30 -0300 Subject: [Agda] Installing standard and plfa libraries In-Reply-To: <35d66495-ee46-1917-5efc-92778a32bcda@free.fr> References: <35d66495-ee46-1917-5efc-92778a32bcda@free.fr> Message-ID: Michel, I'm glad you are attempting PLFA. Did you follow the instructions under Getting Started regarding libraries? If they don't work, we should fix them. Go well, -- P https://plfa.github.io/GettingStarted/ Finally, we need to let Agda know where to find the standard library. For this, you can follow the instructions here . [ https://agda.readthedocs.io/en/v2.6.0.1/tools/package-system.html#example-using-the-standard-library ] It is possible to set up PLFA as an Agda library as well. If you want to complete the exercises found in the courses folder, or to import modules from the book, you need to do this. To do so, add the path to plfa.agda-lib to ~/.agda/libraries and add plfa to ~/.agda/defaults, both on lines of their own. . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Sun, 12 Apr 2020 at 09:42, Michel Levy wrote: > Excuse me. I have already found a solution to my problem : > > 1) Create the missing file "standard-library.agda-lib in the directory > of the standard library > > 2) Create the directory "my_home/.agda. In the file libraries write the > path to the two files agda-lib. In the defauts file, write plfa and > standard-library. > > Le 12/04/2020 ? 14:24, Michel Levy a ?crit : > > I'm trying to write all the PLFA exercises. But I have a problem > > installing the pfla library. > > More exactly the standard library is usable without "my home/.agda" > > directory. This library doesn't have a "standard-library.agda-lib" file. > > When I create a ".agda" directory with only the plfa library, I lose > > access to the standard library. > > This library doesn't have a "standard-library.agda-lib" file. > > When I create a "my home/.agda" directory with only the plfa library, I > > lose access to the standard library. > > What do I have to do to get both standard and plfa libraries? > > > > PS : my agda version is 2.5.3 installed with the Ubuntu packages. > > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From carette at mcmaster.ca Mon Apr 13 18:29:45 2020 From: carette at mcmaster.ca (Jacques Carette) Date: Mon, 13 Apr 2020 12:29:45 -0400 Subject: [Agda] Formalization of a system dependently-typed records in Agda? Message-ID: As the subject says: are you aware of a formalization of a system of dependently-typed records in Agda?? A module system would also be fine. The most important requirement: it must be based on *names* for fields. No de Bruijn levels / indices / what-have-you.? I understand the meta-theory of Sigma types just fine, thanks. The part I am really interested in are the subtleties involved when alpha-renaming is not only not-free, it is meaningful. Records / modules with differently named fields are different as far as humans are concerned, and this is an important usability requirements that ought to be modeled too. I have attempted to do this myself.? Adding a free-for predicate to telescopes is not hard. What is hard is the exact specification of how it should be preserved under renaming and substitution. Jacques PS: responses along the lines of "oh, you should use theory X" are unlikely to be helpful.? I have pursued the rabbit hole of many different X already, and they all hit some substantial brick walls when came the time to truly be formal about it all.? Thus the important 'in Agda' qualifier. From mechvel at scico.botik.ru Mon Apr 13 18:36:57 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 13 Apr 2020 19:36:57 +0300 Subject: [Agda] commutative ring solver Message-ID: <84ccbbf36bf3d38426c80f8cd436d56e@scico.botik.ru> Can anybody, please, advise on the following subject? I need to prove in Agda the statements like (a b c : Carrier) ? (a - b) * c ? c * a - c * b (a bit more complex ones) in the environment of CommutativeRing. What is an appropriate kind of a solver in lib-1.3 ? What to import? How to call? I attempted with the code like import Algebra.Solver.Ring.AlmostCommutativeRing as ACR open import Relation.Binary using (Decidable) module _ {? ?=} (R : CommutativeRing ? ?=) (open CommutativeRing R using (Carrier; _?_; _-_; _*_) renaming (refl to ?refl) ) (_?_ : Decidable _?_) where module ACRSolver = Solver (ACR.fromCommutativeSemiring R) _?_ open ACRSolver lemma : (a b c : Carrier) ? (a - b) * c ? c * a - c * b lemma a b c = solve 3 (? x y z ? (x :- y) :* z := (z :* x) :- (z :* y)) ?refl a b c And it is not type-checked. Thanks, ------ Sergei From m.escardo at cs.bham.ac.uk Mon Apr 13 20:47:50 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 13 Apr 2020 19:47:50 +0100 Subject: [Agda] Automatic conversion between records and iterated Sigma types Message-ID: Is it possible to write a tactic to convert between records and equivalent iterated Sigma types? And, if so, to also produce code to establish their equivalence? Thanks, Martin From b.a.w.spitters at gmail.com Mon Apr 13 21:11:42 2020 From: b.a.w.spitters at gmail.com (Bas Spitters) Date: Mon, 13 Apr 2020 21:11:42 +0200 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: This is what the issig tactic does in the HoTT library. I don't know how difficult it is to convert it to agda. https://github.com/HoTT/HoTT/blob/master/theories/Basics/Overture.v On Mon, Apr 13, 2020 at 8:47 PM Martin Escardo wrote: > > Is it possible to write a tactic to convert between records and > equivalent iterated Sigma types? And, if so, to also produce code to > establish their equivalence? > > Thanks, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From carette at mcmaster.ca Mon Apr 13 21:19:18 2020 From: carette at mcmaster.ca (Jacques Carette) Date: Mon, 13 Apr 2020 15:19:18 -0400 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Very hard, I believe.? Lines 1113 and 1114 ? let u := fresh "u" in ? let v := fresh "v" in in particular.? See the comment by @jespercockx on https://github.com/agda/agda/issues/3699. Jacques On 2020-04-13 3:11 p.m., Bas Spitters wrote: > This is what the issig tactic does in the HoTT library. I don't know > how difficult it is to convert it to agda. > https://github.com/HoTT/HoTT/blob/master/theories/Basics/Overture.v > > On Mon, Apr 13, 2020 at 8:47 PM Martin Escardo wrote: >> Is it possible to write a tactic to convert between records and >> equivalent iterated Sigma types? And, if so, to also produce code to >> establish their equivalence? >> >> Thanks, >> Martin >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Thorsten.Altenkirch at nottingham.ac.uk Mon Apr 13 21:25:31 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Mon, 13 Apr 2020 19:25:31 +0000 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Why would anybody do something like this? Sent from my iPhone > On 13 Apr 2020, at 19:48, Martin Escardo wrote: > > ?Is it possible to write a tactic to convert between records and equivalent iterated Sigma types? And, if so, to also produce code to establish their equivalence? > > Thanks, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From m.escardo at cs.bham.ac.uk Mon Apr 13 21:34:38 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 13 Apr 2020 20:34:38 +0100 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: <5d46c6bb-c2ee-d93e-8647-a1cd179fb32e@cs.bham.ac.uk> Because records are more convenient notationally, but Sigma types are more convenient mathematically, as they allow a uniform treatment. You can prove loads of preservation properties for Sigma formation, and if you use records you have to repeat these proofs. A record *is* the same thing as an iterated Sigma type, and this needs to be made official from a mathematical point of view. This is particularly important in univalent mathematics. The only reason I don't use record types in my developments is this. I would rather use records, but then I would need to reprove everything again, or transport it along equivalences (and none of these two options is attractive). Martin On 13/04/2020 20:25, Thorsten Altenkirch wrote: > Why would anybody do something like this? > > Sent from my iPhone > >> On 13 Apr 2020, at 19:48, Martin Escardo wrote: >> >> ?Is it possible to write a tactic to convert between records and equivalent iterated Sigma types? And, if so, to also produce code to establish their equivalence? >> >> Thanks, >> Martin >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From Thorsten.Altenkirch at nottingham.ac.uk Mon Apr 13 22:25:46 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Mon, 13 Apr 2020 20:25:46 +0000 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: <5d46c6bb-c2ee-d93e-8647-a1cd179fb32e@cs.bham.ac.uk> References: , <5d46c6bb-c2ee-d93e-8647-a1cd179fb32e@cs.bham.ac.uk> Message-ID: I agree you want to do the meta theory using Sigma types but why do you need this during your development. I could also imagine a Agda backend that translate into some combinatory core language but I don?t think we need this within Agda. Sent from my iPhone > On 13 Apr 2020, at 20:34, Martin Escardo wrote: > > ?Because records are more convenient notationally, but Sigma types are more convenient mathematically, as they allow a uniform treatment. You can prove loads of preservation properties for Sigma formation, and if you use records you have to repeat these proofs. A record *is* the same thing as an iterated Sigma type, and this needs to be made official from a mathematical point of view. This is particularly important in univalent mathematics. The only reason I don't use record types in my developments is this. I would rather use records, but then I would need to reprove everything again, or transport it along equivalences (and none of these two options is attractive). Martin > >> On 13/04/2020 20:25, Thorsten Altenkirch wrote: >> Why would anybody do something like this? >> Sent from my iPhone >>>> On 13 Apr 2020, at 19:48, Martin Escardo wrote: >>> >>> ?Is it possible to write a tactic to convert between records and equivalent iterated Sigma types? And, if so, to also produce code to establish their equivalence? >>> >>> Thanks, >>> Martin >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please contact the sender and delete the email and >> attachment. >> Any views or opinions expressed by the author of this email do not >> necessarily reflect the views of the University of Nottingham. Email >> communications with the University of Nottingham may be monitored >> where permitted by law. > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From b.a.w.spitters at gmail.com Mon Apr 13 22:25:57 2020 From: b.a.w.spitters at gmail.com (Bas Spitters) Date: Mon, 13 Apr 2020 22:25:57 +0200 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: <5d46c6bb-c2ee-d93e-8647-a1cd179fb32e@cs.bham.ac.uk> References: <5d46c6bb-c2ee-d93e-8647-a1cd179fb32e@cs.bham.ac.uk> Message-ID: The tactic is used in precisely the way Martin describes in the HoTT library in Coq. It's a very convenient tactic. On Mon, Apr 13, 2020 at 9:34 PM Martin Escardo wrote: > > Because records are more convenient notationally, but Sigma types are > more convenient mathematically, as they allow a uniform treatment. You > can prove loads of preservation properties for Sigma formation, and if > you use records you have to repeat these proofs. A record *is* the same > thing as an iterated Sigma type, and this needs to be made official from > a mathematical point of view. This is particularly important in > univalent mathematics. The only reason I don't use record types in my > developments is this. I would rather use records, but then I would need > to reprove everything again, or transport it along equivalences (and > none of these two options is attractive). Martin > > On 13/04/2020 20:25, Thorsten Altenkirch wrote: > > Why would anybody do something like this? > > > > Sent from my iPhone > > > >> On 13 Apr 2020, at 19:48, Martin Escardo wrote: > >> > >> ?Is it possible to write a tactic to convert between records and equivalent iterated Sigma types? And, if so, to also produce code to establish their equivalence? > >> > >> Thanks, > >> Martin > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please contact the sender and delete the email and > > attachment. > > > > Any views or opinions expressed by the author of this email do not > > necessarily reflect the views of the University of Nottingham. Email > > communications with the University of Nottingham may be monitored > > where permitted by law. > > > > > > > > > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From m.escardo at cs.bham.ac.uk Mon Apr 13 22:31:25 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 13 Apr 2020 21:31:25 +0100 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: <5d46c6bb-c2ee-d93e-8647-a1cd179fb32e@cs.bham.ac.uk> Message-ID: <0e178c68-d71e-ddb5-1044-0325d9ec2908@cs.bham.ac.uk> On 13/04/2020 21:25, Thorsten Altenkirch wrote: > I agree you want to do the meta theory using Sigma types but why do you need this during your development. I could also imagine a Agda backend that translate into some combinatory core language but I don?t think we need this within Agda. Look at the proofs and constructions here, for example: https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#sip , sections 33-()1-(20) They rely on properties of / and construction with Sigma (lots of them) for a uniform treatment. This is mathematics and not meta-theory of the language used to develop the mathematics. Martin From andersmortberg at gmail.com Tue Apr 14 09:55:22 2020 From: andersmortberg at gmail.com (Anders Mortberg) Date: Tue, 14 Apr 2020 09:55:22 +0200 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: <0e178c68-d71e-ddb5-1044-0325d9ec2908@cs.bham.ac.uk> References: <5d46c6bb-c2ee-d93e-8647-a1cd179fb32e@cs.bham.ac.uk> <0e178c68-d71e-ddb5-1044-0325d9ec2908@cs.bham.ac.uk> Message-ID: We would love to have this tactic in the agda/cubical library as well for the same reason as Martin. See e.g. https://github.com/agda/cubical/issues/279 -- Anders On Mon, Apr 13, 2020 at 10:31 PM Martin Escardo wrote: > > > > On 13/04/2020 21:25, Thorsten Altenkirch wrote: > > I agree you want to do the meta theory using Sigma types but why do you need this during your development. I could also imagine a Agda backend that translate into some combinatory core language but I don?t think we need this within Agda. > > Look at the proofs and constructions here, for example: > https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#sip > , sections 33-()1-(20) > > They rely on properties of / and construction with Sigma (lots of them) > for a uniform treatment. > > This is mathematics and not meta-theory of the language used to develop > the mathematics. > > Martin > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Jesper at sikanda.be Tue Apr 14 10:07:20 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 14 Apr 2020 10:07:20 +0200 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Hi Jacques, Note that it *is* possible to generate fresh names from Agda's reflection machinery, it is just not possible to access those generated names from outside of the macro call. But if you're willing to give just one name manually to the top-level definition (e.g. a value of a record type containing fields for the iterated sigma type itself, functions converting back and forth, and proofs about them) then the current reflection machinery should work just fine. In particular, there should be no need to generate new datatypes, which is the main bottleneck in #3699. -- Jesper On Mon, Apr 13, 2020 at 9:20 PM Jacques Carette wrote: > Very hard, I believe. Lines 1113 and 1114 > > let u := fresh "u" in > let v := fresh "v" in > > in particular. See the comment by @jespercockx on > https://github.com/agda/agda/issues/3699. > > Jacques > > On 2020-04-13 3:11 p.m., Bas Spitters wrote: > > This is what the issig tactic does in the HoTT library. I don't know > > how difficult it is to convert it to agda. > > https://github.com/HoTT/HoTT/blob/master/theories/Basics/Overture.v > > > > On Mon, Apr 13, 2020 at 8:47 PM Martin Escardo > wrote: > >> Is it possible to write a tactic to convert between records and > >> equivalent iterated Sigma types? And, if so, to also produce code to > >> establish their equivalence? > >> > >> Thanks, > >> Martin > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Tue Apr 14 11:06:51 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 14 Apr 2020 11:06:51 +0200 Subject: [Agda] Installing standard and plfa libraries In-Reply-To: References: Message-ID: On 2020-04-12 14:24, Michel Levy wrote: > This library doesn't have a "standard-library.agda-lib" file. The standard library does have such a file: https://github.com/agda/agda-stdlib/blob/master/standard-library.agda-lib Perhaps something went wrong with your installation, or perhaps you have a very old version of the library. -- /NAD From paba at itu.dk Tue Apr 14 19:31:17 2020 From: paba at itu.dk (Patrick Bahr) Date: Tue, 14 Apr 2020 17:31:17 +0000 Subject: [Agda] TERMGRAPH 2020: Deadline Extension - 22 April Message-ID: <250A69DC-4042-4FCD-99D0-F4B9F0103526@itu.dk> ======================================================================= Call for Papers (*** DEADLINE EXTENSION ***) TERMGRAPH 2020 Eleventh International Workshop on Computing with Terms and Graphs 5 July, 2020 termgraph.org.uk/2020 An FSCD 2020 Workshop ======================================================================= Graphs and graph transformation systems are used in many areas within Computer Science: to represent data structures and algorithms, to define computation models, as a general modelling tool to study complex systems, etc. Topics of interest for TERMGRAPH encompass all aspects of term and graph rewriting, and applications of graph transformations in programming, automated reasoning and symbolic computation, including: * Theory of first-order and higher-order term and graph rewriting * Graph grammars * Graph-based models of computation * Graph-based programming languages and modelling frameworks * Applications in functional and logic programming * Applications in automated reasoning and symbolic computation * Term/graph rewriting tools: case studies and system descriptions * Implementation issues The aim of this workshop is to bring together researchers working in these different domains and to foster their interaction, to provide a forum for presenting new ideas and work in progress, and to enable newcomers to learn about current activities in this area. Important Dates: Submission deadline: 22 April 2020 (extended) Notification: 15 May 2020 PreProceedings version: 24 May 2020 Online Workshop: 5 July 2020 (Due to the Covid-19 pandemic, the workshop will be held online.) Submissions and Publication: Authors are invited to submit an extended abstract in PDF format of max. 8 pages in EPTCS style (http://style.eptcs.org/). This may include both original work and tutorials on any of the abovementioned topics; work in progress is also welcome. Submission is through Easychair: https://easychair.org/conferences/?conf=termgraph2020 Preliminary proceedings will be available at the workshop. After the workshop, authors will be invited to submit a longer version of their work (typically a 15-pages paper) for publication in EPTCS. These submissions will undergo a second round of refereeing. Programme Committee: Beniamino Accattoli Zena Ariola Patrick Bahr (chair) Clemens Grabmayer Makoto Hamana Wolfram Kahl Fr?d?ric Prost Femke van Raamsdonk David Sabel Contact: Patrick Bahr From carette at mcmaster.ca Tue Apr 14 19:37:52 2020 From: carette at mcmaster.ca (Jacques Carette) Date: Tue, 14 Apr 2020 13:37:52 -0400 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Thanks Jesper. I don't think I fully follow though.? Is it possible to use reflection to take in a (nested) Sigma type (say the one for Monoid) and return the declaration of the associated record type? Could I take the name of the bound variables in that Sigma type as the labels of the resulting record type?? That would be perfect. I did not think that was possible. I would love to be wrong here! Jacques On 2020-04-14 4:07 a.m., Jesper Cockx wrote: > Hi Jacques, > > Note that it *is* possible to generate fresh names from Agda's > reflection machinery, it is just not possible to access those > generated names from outside of the macro call. But if you're willing > to give just one name manually to the top-level definition (e.g. a > value of a record type containing fields for the iterated sigma type > itself, functions converting back and forth, and proofs about them) > then the current reflection machinery should work just fine. In > particular, there should be no need to generate new datatypes, which > is the main bottleneck in #3699. > > -- Jesper > > On Mon, Apr 13, 2020 at 9:20 PM Jacques Carette > wrote: > > Very hard, I believe.? Lines 1113 and 1114 > > ?? let u := fresh "u" in > ?? let v := fresh "v" in > > in particular.? See the comment by @jespercockx on > https://github.com/agda/agda/issues/3699. > > Jacques > > On 2020-04-13 3:11 p.m., Bas Spitters wrote: > > This is what the issig tactic does in the HoTT library. I don't know > > how difficult it is to convert it to agda. > > https://github.com/HoTT/HoTT/blob/master/theories/Basics/Overture.v > > > > On Mon, Apr 13, 2020 at 8:47 PM Martin Escardo > > wrote: > >> Is it possible to write a tactic to convert between records and > >> equivalent iterated Sigma types? And, if so, to also produce > code to > >> establish their equivalence? > >> > >> Thanks, > >> Martin > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Tue Apr 14 20:12:01 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 14 Apr 2020 20:12:01 +0200 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Hi Jacques, No, I was thinking of the other direction: if you define a record type in Agda, then a macro could automatically turn it into its representation as an iterated sigma type, and automatically generate the conversion functions back and forth. -- Jesper On Tue, Apr 14, 2020 at 7:38 PM Jacques Carette wrote: > Thanks Jesper. > > I don't think I fully follow though. Is it possible to use reflection to > take in a (nested) Sigma type (say the one for Monoid) and return the > declaration of the associated record type? Could I take the name of the > bound variables in that Sigma type as the labels of the resulting record > type? That would be perfect. I did not think that was possible. I would > love to be wrong here! > > Jacques > On 2020-04-14 4:07 a.m., Jesper Cockx wrote: > > Hi Jacques, > > Note that it *is* possible to generate fresh names from Agda's reflection > machinery, it is just not possible to access those generated names from > outside of the macro call. But if you're willing to give just one name > manually to the top-level definition (e.g. a value of a record type > containing fields for the iterated sigma type itself, functions converting > back and forth, and proofs about them) then the current reflection > machinery should work just fine. In particular, there should be no need to > generate new datatypes, which is the main bottleneck in #3699. > > -- Jesper > > On Mon, Apr 13, 2020 at 9:20 PM Jacques Carette > wrote: > >> Very hard, I believe. Lines 1113 and 1114 >> >> let u := fresh "u" in >> let v := fresh "v" in >> >> in particular. See the comment by @jespercockx on >> https://github.com/agda/agda/issues/3699. >> >> Jacques >> >> On 2020-04-13 3:11 p.m., Bas Spitters wrote: >> > This is what the issig tactic does in the HoTT library. I don't know >> > how difficult it is to convert it to agda. >> > https://github.com/HoTT/HoTT/blob/master/theories/Basics/Overture.v >> > >> > On Mon, Apr 13, 2020 at 8:47 PM Martin Escardo >> wrote: >> >> Is it possible to write a tactic to convert between records and >> >> equivalent iterated Sigma types? And, if so, to also produce code to >> >> establish their equivalence? >> >> >> >> Thanks, >> >> Martin >> >> _______________________________________________ >> >> Agda mailing list >> >> Agda at lists.chalmers.se >> >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Tue Apr 14 21:03:47 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Tue, 14 Apr 2020 20:03:47 +0100 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: <5d46c6bb-c2ee-d93e-8647-a1cd179fb32e@cs.bham.ac.uk> <0e178c68-d71e-ddb5-1044-0325d9ec2908@cs.bham.ac.uk> Message-ID: Musa has kindly produced such a mechanism using emacs lisp, and allowed me to advertise it here: On 14/04/2020 06:28, alhassy at gmail.com wrote:> Good morning Martin, > > I've written a little Emacs editor tactic in the style of Agda's > ``auto'' mechanism. > > https://gist.github.com/alhassy/a4ce4032e7c33de874c3ce43dc9b0fe1 > > 0. Select, highlight, the record you are interested in; > 1. Press C-x C-t to have a Sigma type and coercion to be created; > 2. Paste in the Sigma type, and coercion, with C-y wherever you like. > > The example usage shows that this editor tactic can handle (seemingly) > arbitrary definitions interleaved among field declarations. > > Hope this helps, > > Musa On 14/04/2020 08:55, andersmortberg at gmail.com wrote: > We would love to have this tactic in the agda/cubical library as well > for the same reason as Martin. See e.g. > https://github.com/agda/cubical/issues/279 > > -- > Anders > > On Mon, Apr 13, 2020 at 10:31 PM Martin Escardo wrote: >> >> >> >> On 13/04/2020 21:25, Thorsten Altenkirch wrote: >>> I agree you want to do the meta theory using Sigma types but why do you need this during your development. I could also imagine a Agda backend that translate into some combinatory core language but I don?t think we need this within Agda. >> >> Look at the proofs and constructions here, for example: >> https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#sip >> , sections 33-()1-(20) >> >> They rely on properties of / and construction with Sigma (lots of them) >> for a uniform treatment. >> >> This is mathematics and not meta-theory of the language used to develop >> the mathematics. >> >> Martin >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From phiroc at free.fr Tue Apr 14 21:20:16 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Tue, 14 Apr 2020 21:20:16 +0200 Subject: [Agda] L and inverted L characters Message-ID: Hello, in a paper entitled ? The Power of Pi ?, the authors use two characters that look like a capital L and an inverted capital L, respectively. Are these characters still used in Agda 2.6? If so, what are their names and how do you input them in Emacs? Many thanks. Cheers, Philippe From carette at mcmaster.ca Tue Apr 14 21:40:34 2020 From: carette at mcmaster.ca (Jacques Carette) Date: Tue, 14 Apr 2020 15:40:34 -0400 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: That's the easier direction. I am not surprised, yet pleased, that it is feasible. So is this confirmation the Sigma -> record is indeed currently not feasible? Jacques On 2020-04-14 2:12 p.m., Jesper Cockx wrote: > Hi Jacques, > > No, I was thinking of the other direction: if you define a record type > in Agda, then a macro could automatically turn it into its > representation as an iterated sigma type, and automatically generate > the conversion functions back and forth. > > -- Jesper > > On Tue, Apr 14, 2020 at 7:38 PM Jacques Carette > wrote: > > Thanks Jesper. > > I don't think I fully follow though.? Is it possible to use > reflection to take in a (nested) Sigma type (say the one for > Monoid) and return the declaration of the associated record type?? > Could I take the name of the bound variables in that Sigma type as > the labels of the resulting record type?? That would be perfect.? > I did not think that was possible. I would love to be wrong here! > > Jacques > > On 2020-04-14 4:07 a.m., Jesper Cockx wrote: >> Hi Jacques, >> >> Note that it *is* possible to generate fresh names from Agda's >> reflection machinery, it is just not possible to access those >> generated names from outside of the macro call. But if you're >> willing to give just one name manually to the top-level >> definition (e.g. a value of a record type containing fields for >> the iterated sigma type itself, functions converting back and >> forth, and proofs about them) then the current reflection >> machinery should work just fine. In particular, there should be >> no need to generate new datatypes, which is the main bottleneck >> in #3699. >> >> -- Jesper >> >> On Mon, Apr 13, 2020 at 9:20 PM Jacques Carette >> > wrote: >> >> Very hard, I believe.? Lines 1113 and 1114 >> >> ?? let u := fresh "u" in >> ?? let v := fresh "v" in >> >> in particular.? See the comment by @jespercockx on >> https://github.com/agda/agda/issues/3699. >> >> Jacques >> >> On 2020-04-13 3:11 p.m., Bas Spitters wrote: >> > This is what the issig tactic does in the HoTT library. I >> don't know >> > how difficult it is to convert it to agda. >> > >> https://github.com/HoTT/HoTT/blob/master/theories/Basics/Overture.v >> > >> > On Mon, Apr 13, 2020 at 8:47 PM Martin Escardo >> > wrote: >> >> Is it possible to write a tactic to convert between >> records and >> >> equivalent iterated Sigma types? And, if so, to also >> produce code to >> >> establish their equivalence? >> >> >> >> Thanks, >> >> Martin >> >> _______________________________________________ >> >> Agda mailing list >> >> Agda at lists.chalmers.se >> >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Tue Apr 14 21:45:17 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 14 Apr 2020 21:45:17 +0200 Subject: [Agda] L and inverted L characters In-Reply-To: References: Message-ID: You mean \lfloor and \rfloor ? (Just like in LaTeX.) On 2020-04-14 21:20, Philippe de Rochambeau wrote: > Hello, > in a paper entitled ? The Power of Pi ?, the authors use two characters that look like a capital L and an inverted capital L, respectively. > Are these characters still used in Agda 2.6? If so, what are their names and how do you input them in Emacs? > Many thanks. > Cheers, > Philippe > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From a.j.rouvoet at gmail.com Tue Apr 14 21:47:19 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Tue, 14 Apr 2020 21:47:19 +0200 Subject: [Agda] L and inverted L characters In-Reply-To: References: Message-ID: In general, if you have a way to copy-paste the character into emacs, then you can ask emacs how to input it with describe-char. Arjen On 4/14/20 9:45 PM, Andreas Abel wrote: > You mean \lfloor and \rfloor ?? (Just like in LaTeX.) > > On 2020-04-14 21:20, Philippe de Rochambeau wrote: >> Hello, >> in a paper entitled ? The Power of Pi ?, the authors use two >> characters that look like a capital L and an inverted capital L, >> respectively. >> Are these characters still used in Agda 2.6? If so, what are their >> names and how do you input them in Emacs? >> Many thanks. >> Cheers, >> Philippe >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From a.j.rouvoet at gmail.com Tue Apr 14 21:47:29 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Tue, 14 Apr 2020 21:47:29 +0200 Subject: [Agda] L and inverted L characters In-Reply-To: References: Message-ID: <4b339bea-459e-da79-ebc6-aa840bfcb674@gmail.com> In general, if you have a way to copy-paste the character into emacs, then you can ask emacs how to input it with describe-char. Arjen On 4/14/20 9:45 PM, Andreas Abel wrote: > You mean \lfloor and \rfloor ?? (Just like in LaTeX.) > > On 2020-04-14 21:20, Philippe de Rochambeau wrote: >> Hello, >> in a paper entitled ? The Power of Pi ?, the authors use two >> characters that look like a capital L and an inverted capital L, >> respectively. >> Are these characters still used in Agda 2.6? If so, what are their >> names and how do you input them in Emacs? >> Many thanks. >> Cheers, >> Philippe >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From phiroc at free.fr Tue Apr 14 21:48:35 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Tue, 14 Apr 2020 21:48:35 +0200 Subject: [Agda] L and inverted L characters In-Reply-To: <4b339bea-459e-da79-ebc6-aa840bfcb674@gmail.com> References: <4b339bea-459e-da79-ebc6-aa840bfcb674@gmail.com> Message-ID: <2720468F-432D-46EA-88DD-15D2669537D3@free.fr> Unfortunately, the character can?t be copied from the paper, but thanks for the tip. > Le 14 avr. 2020 ? 21:47, a.j.rouvoet a ?crit : > > In general, if you have a way to copy-paste the character into emacs, then you can ask emacs how to input it with describe-char. > > Arjen > > On 4/14/20 9:45 PM, Andreas Abel wrote: >> You mean \lfloor and \rfloor ? (Just like in LaTeX.) >> >> On 2020-04-14 21:20, Philippe de Rochambeau wrote: >>> Hello, >>> in a paper entitled ? The Power of Pi ?, the authors use two characters that look like a capital L and an inverted capital L, respectively. >>> Are these characters still used in Agda 2.6? If so, what are their names and how do you input them in Emacs? >>> Many thanks. >>> Cheers, >>> Philippe >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From phiroc at free.fr Tue Apr 14 21:53:31 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Tue, 14 Apr 2020 21:53:31 +0200 Subject: [Agda] L and inverted L characters In-Reply-To: <2720468F-432D-46EA-88DD-15D2669537D3@free.fr> References: <4b339bea-459e-da79-ebc6-aa840bfcb674@gmail.com> <2720468F-432D-46EA-88DD-15D2669537D3@free.fr> Message-ID: <7FA75770-67B7-43F9-AFF4-105D30048F88@free.fr> Typing \lfloor in emacs did the trick. Many thanks, Andreas. >> >> On 4/14/20 9:45 PM, Andreas Abel wrote: >>> You mean \lfloor and \rfloor ? (Just like in LaTeX.) >>> >>> On 2020-04-14 21:20, Philippe de Rochambeau wrote: >>>> Hello, >>>> in a paper entitled ? The Power of Pi ?, the authors use two characters that look like a capital L and an inverted capital L, respectively. >>>> Are these characters still used in Agda 2.6? If so, what are their names and how do you input them in Emacs? >>>> Many thanks. >>>> Cheers, >>>> Philippe >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Jesper at sikanda.be Tue Apr 14 22:06:28 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 14 Apr 2020 22:06:28 +0200 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Indeed, automatically converting from an iterated sigma type into a record type would require generating fresh top-level names for the fields of the record, which is currently not possible. -- Jesper On Tue, Apr 14, 2020 at 9:41 PM Jacques Carette wrote: > That's the easier direction. I am not surprised, yet pleased, that it is > feasible. > > So is this confirmation the Sigma -> record is indeed currently not > feasible? > > Jacques > On 2020-04-14 2:12 p.m., Jesper Cockx wrote: > > Hi Jacques, > > No, I was thinking of the other direction: if you define a record type in > Agda, then a macro could automatically turn it into its representation as > an iterated sigma type, and automatically generate the conversion functions > back and forth. > > -- Jesper > > On Tue, Apr 14, 2020 at 7:38 PM Jacques Carette > wrote: > >> Thanks Jesper. >> >> I don't think I fully follow though. Is it possible to use reflection to >> take in a (nested) Sigma type (say the one for Monoid) and return the >> declaration of the associated record type? Could I take the name of the >> bound variables in that Sigma type as the labels of the resulting record >> type? That would be perfect. I did not think that was possible. I would >> love to be wrong here! >> >> Jacques >> On 2020-04-14 4:07 a.m., Jesper Cockx wrote: >> >> Hi Jacques, >> >> Note that it *is* possible to generate fresh names from Agda's reflection >> machinery, it is just not possible to access those generated names from >> outside of the macro call. But if you're willing to give just one name >> manually to the top-level definition (e.g. a value of a record type >> containing fields for the iterated sigma type itself, functions converting >> back and forth, and proofs about them) then the current reflection >> machinery should work just fine. In particular, there should be no need to >> generate new datatypes, which is the main bottleneck in #3699. >> >> -- Jesper >> >> On Mon, Apr 13, 2020 at 9:20 PM Jacques Carette >> wrote: >> >>> Very hard, I believe. Lines 1113 and 1114 >>> >>> let u := fresh "u" in >>> let v := fresh "v" in >>> >>> in particular. See the comment by @jespercockx on >>> https://github.com/agda/agda/issues/3699. >>> >>> Jacques >>> >>> On 2020-04-13 3:11 p.m., Bas Spitters wrote: >>> > This is what the issig tactic does in the HoTT library. I don't know >>> > how difficult it is to convert it to agda. >>> > https://github.com/HoTT/HoTT/blob/master/theories/Basics/Overture.v >>> > >>> > On Mon, Apr 13, 2020 at 8:47 PM Martin Escardo < >>> m.escardo at cs.bham.ac.uk> wrote: >>> >> Is it possible to write a tactic to convert between records and >>> >> equivalent iterated Sigma types? And, if so, to also produce code to >>> >> establish their equivalence? >>> >> >>> >> Thanks, >>> >> Martin >>> >> _______________________________________________ >>> >> Agda mailing list >>> >> Agda at lists.chalmers.se >>> >> https://lists.chalmers.se/mailman/listinfo/agda >>> > _______________________________________________ >>> > Agda mailing list >>> > Agda at lists.chalmers.se >>> > https://lists.chalmers.se/mailman/listinfo/agda >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From effectfully at gmail.com Wed Apr 15 00:41:18 2020 From: effectfully at gmail.com (Roman) Date: Wed, 15 Apr 2020 01:41:18 +0300 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Jesper, > Indeed, automatically converting from an iterated sigma type into a record type would require generating fresh top-level names for the fields of the record, which is currently not possible. but as you said one could just ask the user to provide the top-level names manually. Which is something I would expect from such a machinery anyway. Martin, why not just define some kind of product type with a `String` name associated with its first projection? Such iterated products would give you what is essentially records while still having nice metatheoretical properties. In general implementing `record -> iterated Sigma` + their isomorphism using reflection is certainly feasible in Agda, I have a library that handles general inductive types [1], but it doesn't handle the particular corner case of iterated non-inductive products well (no eta rules), although it's not a theoretical limitation, just a deficiency in the implementation. [1] https://github.com/effectfully/Generic From effectfully at gmail.com Wed Apr 15 00:47:18 2020 From: effectfully at gmail.com (Roman) Date: Wed, 15 Apr 2020 01:47:18 +0300 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Sorry, I've been doing too much System F lately. I mean a dependent version of _?_ by "product" (i.e. ?), not ?. From Jesper at sikanda.be Wed Apr 15 13:56:30 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 15 Apr 2020 13:56:30 +0200 Subject: [Agda] Automatic conversion between records and iterated Sigma types In-Reply-To: References: Message-ID: Hi all, I wrote a quick proof-of-concept of a macro to automatically translate a record type to an iterated sigma type. There is a test case at the bottom of https://github.com/jespercockx/telescopic/blob/master/src/Telescopic/Record.agda, which converts the sigma type into its encoding `? ? (? x ? ? (Vec Bool x) (? x? ? ?))`. (Note that while the file relies on my small library for telescopes, the final result is just a vanilla iterated sigma type). If there's interest, I might clean this up a bit and extend it to also generate the functions back and forth and proofs that they are inverses. -- Jesper On Wed, Apr 15, 2020 at 12:48 AM Roman wrote: > Sorry, I've been doing too much System F lately. I mean a dependent > version of _?_ by "product" (i.e. ?), not ?. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Wed Apr 15 17:14:02 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Wed, 15 Apr 2020 17:14:02 +0200 Subject: [Agda] error in plfa exercise Message-ID: <6c0014de-8cbe-2e96-7168-f6afd0042714@free.fr> When I try to reproduce the currying proof, I get the following error Expected non-abstract record type, found (.A ? .B ? .C) ? .A x .B ? .C when checking that the expression record { to = ? { f ? ? { < x , y > ? (f x) y } } from = ? { g ? ? { x y ? g < x , y > } } ; from?to = ? { f ? refl } ; to?from = ? { g ? extensionality ? { < x , y > ? refl } } } has type (.A ? .B ? .C) ? .A x .B ? .C Where does this error come from, from my too old version of agda? -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From wadler at inf.ed.ac.uk Wed Apr 15 19:02:41 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Wed, 15 Apr 2020 14:02:41 -0300 Subject: [Agda] error in plfa exercise In-Reply-To: <6c0014de-8cbe-2e96-7168-f6afd0042714@free.fr> References: <6c0014de-8cbe-2e96-7168-f6afd0042714@free.fr> Message-ID: Which version of Agda are you using? The book is currently released for Agda 2.6.0.1, Agda stdlib 1.1. We will upgrade soon. Go well, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Wed, 15 Apr 2020 at 12:14, Michel Levy wrote: > When I try to reproduce the currying proof, I get the following error > Expected non-abstract record type, found > (.A ? .B ? .C) ? .A x .B ? .C > when checking that the expression > record > { to = ? { f ? ? { < x , y > ? (f x) y } } > from = ? { g ? ? { x y ? g < x , y > } } > ; from?to = ? { f ? refl } > ; to?from = ? { g ? extensionality ? { < x , y > ? refl } } > } > has type (.A ? .B ? .C) ? .A x .B ? .C > > Where does this error come from, from my too old version of agda? > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From phiroc at free.fr Wed Apr 15 20:12:04 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Wed, 15 Apr 2020 20:12:04 +0200 Subject: [Agda] Compiling HelloWorld Message-ID: <0DB8A4A2-C567-4ED8-994A-B043ABE5088E@free.fr> Hello, compiling the following code from the 2.6.1 Agda Documentation causes the below error message. module HelloWorld where open import Agda.Builtin.IO open import Agda.Builtin.Unit open import Agda.Builtin.String postulate putStrLn : String ? IO ? {-# FOREIGN GHC import qualified Data.Text.IO as Text #-} {-# COMPILE GHC putStrLn = Text.putStrLn #-} main : IO ? main = putStrLn "Hello, World!" Compilation error: MAlonzo/RTE.hs:9:1: error: Could not find module ?Numeric.IEEE? Use -v (or `:set -v` in ghci) to see a list of the files searched for. | 9 | import Numeric.IEEE ( IEEE(identicalIEEE, nan) ) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ How do you fix it? Many thanks. Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Wed Apr 15 20:49:43 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Wed, 15 Apr 2020 20:49:43 +0200 Subject: [Agda] Compiling HelloWorld In-Reply-To: <0DB8A4A2-C567-4ED8-994A-B043ABE5088E@free.fr> References: <0DB8A4A2-C567-4ED8-994A-B043ABE5088E@free.fr> Message-ID: cabal install ieee754 did the trick. This is the first time I use cabal. > Le 15 avr. 2020 ? 20:12, Philippe de Rochambeau a ?crit : > > > Hello, > compiling the following code from the 2.6.1 Agda Documentation causes the below error message. > > module HelloWorld where > > open import Agda.Builtin.IO > open import Agda.Builtin.Unit > open import Agda.Builtin.String > > postulate > putStrLn : String ? IO ? > > {-# FOREIGN GHC import qualified Data.Text.IO as Text #-} > {-# COMPILE GHC putStrLn = Text.putStrLn #-} > > main : IO ? > main = putStrLn "Hello, World!" > > > Compilation error: > > MAlonzo/RTE.hs:9:1: error: > Could not find module ?Numeric.IEEE? > Use -v (or `:set -v` in ghci) to see a list of the files searched for. > | > 9 | import Numeric.IEEE ( IEEE(identicalIEEE, nan) ) > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > How do you fix it? > > Many thanks. > > Philippe > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Wed Apr 15 22:07:01 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Wed, 15 Apr 2020 22:07:01 +0200 Subject: [Agda] StringOrInt function Message-ID: Hello, I am trying to write a function that returns either a String or a Nat depending on the first argument: module fctypes where open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.String StringOrInt : ? {?} {A : Set ?} ? Bool ? A StringOrInt True = Nat StringOrInt False = String When I load the .agda file in emacs, I get the following error message: Set !=< A when checking that the expression Nat has type A Is there a way in Agda to make the A Set include both Nats and Strings? Many thanks. Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Wed Apr 15 22:10:07 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 15 Apr 2020 22:10:07 +0200 Subject: [Agda] StringOrInt function In-Reply-To: References: Message-ID: <37a8baa5-b99d-e3b9-adda-cb760915dd2d@cse.gu.se> On 2020-04-15 22:07, Philippe de Rochambeau wrote: > StringOrInt : ? {?} {A : Set ?} ? Bool ? A > StringOrInt True = Nat > StringOrInt False = String StringOrInt : Bool ? Set StringOrInt true = Nat StringOrInt false = String -- /NAD From phiroc at free.fr Wed Apr 15 22:22:10 2020 From: phiroc at free.fr (phiroc at free.fr) Date: Wed, 15 Apr 2020 22:22:10 +0200 Subject: [Agda] StringOrInt function In-Reply-To: <37a8baa5-b99d-e3b9-adda-cb760915dd2d@cse.gu.se> Message-ID: An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Wed Apr 15 22:27:45 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 15 Apr 2020 21:27:45 +0100 Subject: [Agda] StringOrInt function In-Reply-To: References: Message-ID: <9e4a4a04-e533-9d11-2090-9ad2fd074638@strath.ac.uk> Hi and welcome, Philippe, Agda's standard library implements `case` statements via mixfix syntax and pattern-matching ?-abstractions. See https://agda.github.io/agda-stdlib/README.Case.html for examples. Best, James On 15/04/2020 21:22, phiroc at free.fr wrote: > Thanks, Nils. > Is there an equivalent to the Idris case-of statement in Agda? > > Le?15 avr. 2020 22:10, Nils Anders Danielsson a ?crit?: > > On 2020-04-15 22:07, Philippe de Rochambeau wrote: > > StringOrInt : ? {?} {A : Set ?} ? Bool ? A > > StringOrInt True? = Nat > > StringOrInt False = String > > StringOrInt : Bool ? Set > StringOrInt true? = Nat > StringOrInt false = String > > -- > /NAD > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7Ca81a61430d464ed3e31808d7e17ab5dd%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637225789472118838&sdata=EqKo%2FI7beR4l3OJt7pIfx0yq7TT7l55wjnhjtLCEBes%3D&reserved=0 > From james.wood.100 at strath.ac.uk Wed Apr 15 22:34:11 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 15 Apr 2020 21:34:11 +0100 Subject: [Agda] Compiling HelloWorld In-Reply-To: References: <0DB8A4A2-C567-4ED8-994A-B043ABE5088E@free.fr> Message-ID: <72e74d38-9e0a-4f26-e9f3-44ace289b203@strath.ac.uk> I'm sure we document this somewhere, given that it's a problem absolutely everyone comes across when they try to compile anything for the first time. But in two minutes I can't find it, and it really should be mentioned near the ?Hello, World!? example at https://agda.readthedocs.io/en/latest/tools/compilers.html#example. James On 15/04/2020 19:49, Philippe de Rochambeau wrote: > cabal install ieee754 did the trick. > > This is the first time I use cabal. > >> Le 15 avr. 2020 ? 20:12, Philippe de Rochambeau > > a ?crit : >> >> >> Hello, >> compiling the following code from the 2.6.1 Agda Documentation causes >> the below error message. >> >> /module HelloWorld where open import Agda.Builtin.IO open import >> Agda.Builtin.Unit open import Agda.Builtin.String postulate putStrLn : >> String ? IO ? {-# FOREIGN GHC import qualified Data.Text.IO as Text >> #-} {-# COMPILE GHC putStrLn = Text.putStrLn #-} main : IO ? main = >> putStrLn "Hello, World!"/ >> >> >> /Compilation error:/ >> / >> / >> /MAlonzo/RTE.hs:9:1: error:/ >> /? ? Could not find module ?Numeric.IEEE?/ >> /? ? Use -v (or `:set -v` in ghci) to see a list of the files searched >> for./ >> /? |/ >> /9 | import Numeric.IEEE ( IEEE(identicalIEEE, nan) )/ >> /? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/ >> >> How do you fix it? >> >> Many thanks. >> >> Philippe >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7C529b3df72677467d180a08d7e16dc7cc%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637225733929675666&sdata=qqFM%2FCGror9fAlq%2BQych4ugpzCT%2FWbBaJXFOg%2FZ2SsE%3D&reserved=0 > From phiroc at free.fr Wed Apr 15 22:37:57 2020 From: phiroc at free.fr (phiroc at free.fr) Date: Wed, 15 Apr 2020 22:37:57 +0200 Subject: [Agda] StringOrInt function In-Reply-To: <9e4a4a04-e533-9d11-2090-9ad2fd074638@strath.ac.uk> Message-ID: An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Wed Apr 15 22:43:33 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 15 Apr 2020 21:43:33 +0100 Subject: [Agda] Compiling HelloWorld In-Reply-To: References: <0DB8A4A2-C567-4ED8-994A-B043ABE5088E@free.fr> Message-ID: <17c8c7e1-252f-5850-7090-53b313d045e1@strath.ac.uk> I'm sure we document this somewhere, given that it's a problem absolutely everyone comes across when they try to compile anything for the first time. But in two minutes I can't find it, and it really should be mentioned near the ?Hello, World!? example at https://agda.readthedocs.io/en/latest/tools/compilers.html#example. James On 15/04/2020 19:49, Philippe de Rochambeau wrote: > cabal install ieee754 did the trick. > > This is the first time I use cabal. > >> Le 15 avr. 2020 ? 20:12, Philippe de Rochambeau > > a ?crit : >> >> >> Hello, >> compiling the following code from the 2.6.1 Agda Documentation causes >> the below error message. >> >> /module HelloWorld where open import Agda.Builtin.IO open import >> Agda.Builtin.Unit open import Agda.Builtin.String postulate putStrLn : >> String ? IO ? {-# FOREIGN GHC import qualified Data.Text.IO as Text >> #-} {-# COMPILE GHC putStrLn = Text.putStrLn #-} main : IO ? main = >> putStrLn "Hello, World!"/ >> >> >> /Compilation error:/ >> / >> / >> /MAlonzo/RTE.hs:9:1: error:/ >> /? ? Could not find module ?Numeric.IEEE?/ >> /? ? Use -v (or `:set -v` in ghci) to see a list of the files searched >> for./ >> /? |/ >> /9 | import Numeric.IEEE ( IEEE(identicalIEEE, nan) )/ >> /? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/ >> >> How do you fix it? >> >> Many thanks. >> >> Philippe >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From phiroc at free.fr Wed Apr 15 22:51:08 2020 From: phiroc at free.fr (phiroc at free.fr) Date: Wed, 15 Apr 2020 22:51:08 +0200 Subject: [Agda] Compiling HelloWorld In-Reply-To: <72e74d38-9e0a-4f26-e9f3-44ace289b203@strath.ac.uk> Message-ID: An HTML attachment was scrubbed... URL: From phiroc at free.fr Thu Apr 16 08:05:30 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Thu, 16 Apr 2020 08:05:30 +0200 Subject: [Agda] Compiling HelloWorld In-Reply-To: References: Message-ID: Hello, I?ve managed to reduce the executable's size to 22KB from 1.2MB with the following ghc flags: agda --compile --ghc-flag='-O2' --ghc-flag='-dynamic' hello.agda > Le 15 avr. 2020 ? 22:51, phiroc at free.fr a ?crit : > > I've noticed that the resulting executable is big too: over 1 MB on a Mac. > > Le 15 avr. 2020 22:34, James Wood a ?crit : > I'm sure we document this somewhere, given that it's a problem > absolutely everyone comes across when they try to compile anything for > the first time. But in two minutes I can't find it, and it really should > be mentioned near the ?Hello, World!? example at > https://agda.readthedocs.io/en/latest/tools/compilers.html#example. > > James > > On 15/04/2020 19:49, Philippe de Rochambeau wrote: > > cabal install ieee754 did the trick. > > > > This is the first time I use cabal. > > > >> Le 15 avr. 2020 ? 20:12, Philippe de Rochambeau >> > a ?crit : > >> > >> > >> Hello, > >> compiling the following code from the 2.6.1 Agda Documentation causes > >> the below error message. > >> > >> /module HelloWorld where open import Agda.Builtin.IO open import > >> Agda.Builtin.Unit open import Agda.Builtin.String postulate putStrLn : > >> String ? IO ? {-# FOREIGN GHC import qualified Data.Text.IO as Text > >> #-} {-# COMPILE GHC putStrLn = Text.putStrLn #-} main : IO ? main = > >> putStrLn "Hello, World!"/ > >> > >> > >> /Compilation error:/ > >> / > >> / > >> /MAlonzo/RTE.hs:9:1: error:/ > >> / Could not find module ?Numeric.IEEE?/ > >> / Use -v (or `:set -v` in ghci) to see a list of the files searched > >> for./ > >> / |/ > >> /9 | import Numeric.IEEE ( IEEE(identicalIEEE, nan) )/ > >> / | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/ > >> > >> How do you fix it? > >> > >> Many thanks. > >> > >> Philippe > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7C529b3df72677467d180a08d7e16dc7cc%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637225733929675666&sdata=qqFM%2FCGror9fAlq%2BQych4ugpzCT%2FWbBaJXFOg%2FZ2SsE%3D&reserved=0 > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Thu Apr 16 08:35:30 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Thu, 16 Apr 2020 08:35:30 +0200 Subject: [Agda] First-Class Type Issue Message-ID: <7C7A693D-9215-46CA-A6EB-56457614EC6F@free.fr> Hello, when I load the following module, open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.String open import Function using (case_of_) StringOrInt : (x : Bool) ? Set StringOrInt x = case x of ? where true ? Nat false ? String getStringOrInt : (x : Bool) ? StringOrInt x getStringOrInt x = case x of ? where true ? 94 false ? "Ninety Four" ? I get this error message: String != Nat when checking that the expression "Ninety Four" has type Nat Do lambdas only return one data type (in this case, Nat)? Cheers, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Thu Apr 16 09:25:27 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Thu, 16 Apr 2020 09:25:27 +0200 Subject: [Agda] First-Class Type Issue In-Reply-To: <7C7A693D-9215-46CA-A6EB-56457614EC6F@free.fr> References: <7C7A693D-9215-46CA-A6EB-56457614EC6F@free.fr> Message-ID: The problem is that the `case_of_` function is non-dependent (the type of the branches cannot depend of the value you case on). You can use `case_return_of_` instead if you need a dependent match: getStringOrInt : (x : Bool) ? StringOrInt x getStringOrInt x = case x return StringOrInt of ? where true ? 94 false ? "Ninety Four" However, the "correct" way to write the function is getStringOrInt : (x : Bool) ? StringOrInt x getStringOrInt true = 94 getStringOrInt false = "Ninety Four" / Ulf On Thu, Apr 16, 2020 at 8:35 AM Philippe de Rochambeau wrote: > Hello, > > when I load the following module, > > open import Agda.Builtin.Bool > open import Agda.Builtin.Nat > open import Agda.Builtin.String > open import Function using (case_of_) > > StringOrInt : (x : Bool) ? Set > StringOrInt x = case x of ? where > true ? Nat > false ? String > > getStringOrInt : (x : Bool) ? StringOrInt x > getStringOrInt x = case x of ? where > true ? 94 > false ? "Ninety Four" > > > ? I get this error message: > > String != Nat > when checking that the expression "Ninety Four" has type Nat > > Do lambdas only return one data type (in this case, Nat)? > > Cheers, > > Philippe > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Thu Apr 16 09:34:25 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 16 Apr 2020 09:34:25 +0200 Subject: [Agda] First-Class Type Issue In-Reply-To: References: <7C7A693D-9215-46CA-A6EB-56457614EC6F@free.fr> Message-ID: Hi Philippe, You should probably split directly on `x` in the left-hand side instead: getStringOrInt : (x : Bool) ? StringOrInt x getStringOrInt true = 94 getStringOrInt false = "Ninety four" or use `case_return_of_` as suggested by Ulf. However, there is a trick that I'm quite fond of that you can use to make it work even with the non-dependent `case_of_`: data Is {?} {A : Set ?} : A ? Set ? where ?_? : (x : A) ? Is x getStringOrInt : (x : Bool) ? StringOrInt x getStringOrInt x = case ? x ? of ? where ? true ? ? 94 ? false ? ? "Ninety Four" The reason this works is that by using the `Is` datatype, Agda keeps the connection between the first argument of the `case_of_` and the original `x`, so when you case split in the `? where` Agda also refines the original argument `x` (actually Agda treats both of them as the same variable). -- Jesper On Thu, Apr 16, 2020 at 9:26 AM Ulf Norell wrote: > The problem is that the `case_of_` function is non-dependent (the type of > the branches cannot depend of the value you case on). > You can use `case_return_of_` instead if you need a dependent match: > > getStringOrInt : (x : Bool) ? StringOrInt x > getStringOrInt x = case x return StringOrInt of ? where > true ? 94 > false ? "Ninety Four" > > However, the "correct" way to write the function is > > getStringOrInt : (x : Bool) ? StringOrInt x > getStringOrInt true = 94 > getStringOrInt false = "Ninety Four" > > / Ulf > > On Thu, Apr 16, 2020 at 8:35 AM Philippe de Rochambeau > wrote: > >> Hello, >> >> when I load the following module, >> >> open import Agda.Builtin.Bool >> open import Agda.Builtin.Nat >> open import Agda.Builtin.String >> open import Function using (case_of_) >> >> StringOrInt : (x : Bool) ? Set >> StringOrInt x = case x of ? where >> true ? Nat >> false ? String >> >> getStringOrInt : (x : Bool) ? StringOrInt x >> getStringOrInt x = case x of ? where >> true ? 94 >> false ? "Ninety Four" >> >> >> ? I get this error message: >> >> String != Nat >> when checking that the expression "Ninety Four" has type Nat >> >> Do lambdas only return one data type (in this case, Nat)? >> >> Cheers, >> >> Philippe >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Thu Apr 16 10:39:43 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Thu, 16 Apr 2020 10:39:43 +0200 Subject: [Agda] error in plfa exercise In-Reply-To: References: <6c0014de-8cbe-2e96-7168-f6afd0042714@free.fr> <26107130-e9a1-c9e0-0726-add2c5771eec@free.fr> Message-ID: I can't upgrade my agda 2.5.3 version. I tried to install the version 2.6.1 with cabal. But I get the error src/full/Agda/VersionCommit.hs:5:1: error: ??? Failed to load interface for ?Development.GitRev? ??? There are files missing in the ?gitrev-1.3.1 at gitrev-1.3.1-6KBEbA9rw49F9GCJBEz6uX? package, ??? try running 'ghc-pkg check'. ??? Use -v to see a list of the files searched for. cabal: Leaving directory '/tmp/cabal-tmp-5754/Agda-2.6.1' cabal: Error: some packages failed to install: Agda-2.6.1 failed during the building phase. The exception was: ExitFailure 1 And I don't know what to do to avoid these mistakes. When I try the command 'ghc-pkg check', I get a list of many pages of missing files.? That's why I'm forced to stick with my 2.5.3 version.? Sincerely yours Le 15/04/2020 ? 23:09, Philip Wadler a ?crit?: > If you want to study PLFA, best to upgrade to 2.6.0.1. I believe there > are other ways to install Agda besides using an Ubuntu package. Yours, > -- P > > . ? \ Philip Wadler, Professor of Theoretical Computer Science, > . ? /\ School of Informatics, University of Edinburgh > .? /? \ and Senior Research Fellow, IOHK > . http://homepages.inf.ed.ac.uk/wadler/ > > > -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Thu Apr 16 12:13:17 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Thu, 16 Apr 2020 11:13:17 +0100 Subject: [Agda] Compiling HelloWorld In-Reply-To: <72e74d38-9e0a-4f26-e9f3-44ace289b203@strath.ac.uk> References: <0DB8A4A2-C567-4ED8-994A-B043ABE5088E@free.fr> <72e74d38-9e0a-4f26-e9f3-44ace289b203@strath.ac.uk> Message-ID: <26b71846-bbee-b1c7-6118-2b59d699ba9a@ens-lyon.org> It is documented in the installation part of the manual: https://agda.readthedocs.io/en/latest/getting-started/installation.html On 15/04/2020 21:34, James Wood wrote: > I'm sure we document this somewhere, given that it's a problem > absolutely everyone comes across when they try to compile anything for > the first time. But in two minutes I can't find it, and it really should > be mentioned near the ?Hello, World!? example at > https://agda.readthedocs.io/en/latest/tools/compilers.html#example. > > James > > On 15/04/2020 19:49, Philippe de Rochambeau wrote: >> cabal install ieee754 did the trick. >> >> This is the first time I use cabal. >> >>> Le 15 avr. 2020 ? 20:12, Philippe de Rochambeau >> > a ?crit : >>> >>> >>> Hello, >>> compiling the following code from the 2.6.1 Agda Documentation causes >>> the below error message. >>> >>> /module HelloWorld where open import Agda.Builtin.IO open import >>> Agda.Builtin.Unit open import Agda.Builtin.String postulate putStrLn : >>> String ? IO ? {-# FOREIGN GHC import qualified Data.Text.IO as Text >>> #-} {-# COMPILE GHC putStrLn = Text.putStrLn #-} main : IO ? main = >>> putStrLn "Hello, World!"/ >>> >>> >>> /Compilation error:/ >>> / >>> / >>> /MAlonzo/RTE.hs:9:1: error:/ >>> /? ? Could not find module ?Numeric.IEEE?/ >>> /? ? Use -v (or `:set -v` in ghci) to see a list of the files searched >>> for./ >>> /? |/ >>> /9 | import Numeric.IEEE ( IEEE(identicalIEEE, nan) )/ >>> /? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/ >>> >>> How do you fix it? >>> >>> Many thanks. >>> >>> Philippe >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7C529b3df72677467d180a08d7e16dc7cc%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637225733929675666&sdata=qqFM%2FCGror9fAlq%2BQych4ugpzCT%2FWbBaJXFOg%2FZ2SsE%3D&reserved=0 >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From Jonathan.Cubides at uib.no Thu Apr 16 12:36:30 2020 From: Jonathan.Cubides at uib.no (Jonathan Steven Prieto Cubides) Date: Thu, 16 Apr 2020 10:36:30 +0000 Subject: [Agda] Installing standard and plfa libraries In-Reply-To: References: Message-ID: <254E82F2-5C1E-4779-8EC1-DEC39FB16950@uib.no> Hi, To install plfa library you can just run the following command: $ apkg install --github plfa/plfa.github.io --branch dev --name plfa It will also manage to install its requirements, in this case, the standard library. More options are in the following link: https://github.com/agda/agda-pkg To install agda-pkg, just run the commands: $ pip3 install agda-pkg $ apkg init ?On 14/04/2020, 11:06, "Agda on behalf of Nils Anders Danielsson" wrote: On 2020-04-12 14:24, Michel Levy wrote: > This library doesn't have a "standard-library.agda-lib" file. The standard library does have such a file: https://github.com/agda/agda-stdlib/blob/master/standard-library.agda-lib Perhaps something went wrong with your installation, or perhaps you have a very old version of the library. -- /NAD _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda From asr at eafit.edu.co Thu Apr 16 13:35:45 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 16 Apr 2020 06:35:45 -0500 Subject: [Agda] error in plfa exercise In-Reply-To: References: <6c0014de-8cbe-2e96-7168-f6afd0042714@free.fr> <26107130-e9a1-c9e0-0726-add2c5771eec@free.fr> Message-ID: On Thu, 16 Apr 2020 at 03:39, Michel Levy wrote: > I can't upgrade my agda 2.5.3 version. I tried to install the version > 2.6.1 with cabal. > OS? GHC version? cabal-install version? But I get the error > src/full/Agda/VersionCommit.hs:5:1: error: > Failed to load interface for ?Development.GitRev? > There are files missing in the ? > gitrev-1.3.1 at gitrev-1.3.1-6KBEbA9rw49F9GCJBEz6uX? package, > Which is the output of $ cabal update $ cabal install gitrev ? -- Andr?s -------------- next part -------------- An HTML attachment was scrubbed... URL: From herminie.pagel at gmail.com Thu Apr 16 14:01:46 2020 From: herminie.pagel at gmail.com (Herminie Pagel) Date: Thu, 16 Apr 2020 14:01:46 +0200 Subject: [Agda] Compiling HelloWorld In-Reply-To: <26b71846-bbee-b1c7-6118-2b59d699ba9a@ens-lyon.org> References: <0DB8A4A2-C567-4ED8-994A-B043ABE5088E@free.fr> <72e74d38-9e0a-4f26-e9f3-44ace289b203@strath.ac.uk> <26b71846-bbee-b1c7-6118-2b59d699ba9a@ens-lyon.org> Message-ID: Thank you for the discussion, I will add this to the update proposal of the Hello World example: https://github.com/agda/agda/projects/8 Am Do., 16. Apr. 2020 um 12:13 Uhr schrieb Guillaume Allais < guillaume.allais at ens-lyon.org>: > It is documented in the installation part of the manual: > https://agda.readthedocs.io/en/latest/getting-started/installation.html > > On 15/04/2020 21:34, James Wood wrote: > > I'm sure we document this somewhere, given that it's a problem > > absolutely everyone comes across when they try to compile anything for > > the first time. But in two minutes I can't find it, and it really should > > be mentioned near the ?Hello, World!? example at > > https://agda.readthedocs.io/en/latest/tools/compilers.html#example. > > > > James > > > > On 15/04/2020 19:49, Philippe de Rochambeau wrote: > >> cabal install ieee754 did the trick. > >> > >> This is the first time I use cabal. > >> > >>> Le 15 avr. 2020 ? 20:12, Philippe de Rochambeau >>> > a ?crit : > >>> > >>> > >>> Hello, > >>> compiling the following code from the 2.6.1 Agda Documentation causes > >>> the below error message. > >>> > >>> /module HelloWorld where open import Agda.Builtin.IO open import > >>> Agda.Builtin.Unit open import Agda.Builtin.String postulate putStrLn : > >>> String ? IO ? {-# FOREIGN GHC import qualified Data.Text.IO as Text > >>> #-} {-# COMPILE GHC putStrLn = Text.putStrLn #-} main : IO ? main = > >>> putStrLn "Hello, World!"/ > >>> > >>> > >>> /Compilation error:/ > >>> / > >>> / > >>> /MAlonzo/RTE.hs:9:1: error:/ > >>> / Could not find module ?Numeric.IEEE?/ > >>> / Use -v (or `:set -v` in ghci) to see a list of the files searched > >>> for./ > >>> / |/ > >>> /9 | import Numeric.IEEE ( IEEE(identicalIEEE, nan) )/ > >>> / | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^/ > >>> > >>> How do you fix it? > >>> > >>> Many thanks. > >>> > >>> Philippe > >>> > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >> > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7C529b3df72677467d180a08d7e16dc7cc%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637225733929675666&sdata=qqFM%2FCGror9fAlq%2BQych4ugpzCT%2FWbBaJXFOg%2FZ2SsE%3D&reserved=0 > >> > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrei.h.popescu at gmail.com Thu Apr 16 14:50:50 2020 From: andrei.h.popescu at gmail.com (Andrei Popescu) Date: Thu, 16 Apr 2020 13:50:50 +0100 Subject: [Agda] Certified Programs and Proofs (CPP) 2021: First Call for Papers Message-ID: Certified Programs and Proofs (CPP) is an international conference on practical and theoretical topics in all areas that consider formal verification and certification as an essential paradigm for their work. CPP spans areas of computer science, mathematics, logic, and education. CPP 2021 (https://popl21.sigplan.org/home/CPP-2021) will be held on 18-19 January 2021 and will be co-located with POPL 2021. CPP 2021 is sponsored by ACM SIGPLAN, in cooperation with ACM SIGLOG. NEWS * Due to the COVID-19 situation, it is currently uncertain whether CPP 2021 will be a physical conference in Copenhagen, Denmark or a virtual one. * The submission deadline is one month earlier than usual. IMPORTANT DATES * Abstract Deadline: 16 September 2020 at 23:59 AoE (UTC-12h) * Paper Submission Deadline: 22 September 2020 at 23:59 AoE (UTC-12h) * Notification (tentative): 19 November 2020 * Camera Ready Deadline (tentative): 10 December 2020 * Conference: 18-19 January 2021 Deadlines expire at the end of the day, anywhere on earth. Abstract and submission deadlines are strict and there will be no extensions. TOPICS OF INTEREST We welcome submissions in research areas related to formal certification of programs and proofs. The following is a non-exhaustive list of topics of interest to CPP: * certified or certifying programming, compilation, linking, OS kernels, runtime systems, security monitors, and hardware; * certified mathematical libraries and mathematical theorems; * proof assistants (e.g, ACL2, Agda, Coq, Dafny, F*, HOL4, HOL Light, Idris, Isabelle, Lean, Mizar, Nuprl, PVS, etc); * new languages and tools for certified programming; * program analysis, program verification, and program synthesis; * program logics, type systems, and semantics for certified code; * logics for certifying concurrent and distributed systems; * mechanized metatheory, formalized programming language semantics, and logical frameworks; * higher-order logics, dependent type theory, proof theory, logical systems, separation logics, and logics for security; * verification of correctness and security properties; * formally verified blockchains and smart contracts; * certificates for decision procedures, including linear algebra, polynomial systems, SAT, SMT, and unification in algebras of interest; * certificates for semi-decision procedures, including equality, first-order logic, and higher-order unification; * certificates for program termination; * formal models of computation; * mechanized (un)decidability and computational complexity proofs; * formally certified methods for induction and coinduction; * integration of interactive and automated provers; * logical foundations of proof assistants; * applications of AI and machine learning to formal certification; * user interfaces for proof assistants and theorem provers; * teaching mathematics and computer science with proof assistants. SUBMISSION GUIDELINES Prior to the paper submission deadline, the authors should upload their anonymized paper in PDF format through the HotCRP system at https://cpp2021.hotcrp.com The submissions must be written in English and provide sufficient detail to allow the program committee to assess the merits of the contribution. They must be formatted following the ACM SIGPLAN Proceedings format using the acmart style with the sigplan option, which provides a two-column style, using 10 point font for the main text, and a header for double blind review submission, i.e., \documentclass[sigplan,10pt,anonymous,review]{acmart}\settopmatter{printfolios=true,printccs=false,printacmref=false} The submitted papers should not exceed 12 pages, including tables and figures, but excluding bibliography and clearly marked appendices. The papers should be self-contained without the appendices. Shorter papers are welcome and will be given equal consideration. Submissions not conforming to the requirements concerning format and maximum length may be rejected without further consideration. CPP 2021 will employ a lightweight double-blind reviewing process. To facilitate this, the submissions must adhere to two rules: (1) author names and institutions must be omitted, and (2) references to authors? own related work should be in the third person (e.g., not "We build on our previous work ..." but rather "We build on the work of ..."). The purpose of this process is to help the PC and external reviewers come to an initial judgment about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing it more difficult. In particular, important background references should not be omitted or anonymized. In addition, authors are free to disseminate their ideas or draft versions of their papers as usual. For example, authors may post drafts of their papers on the web or give talks on their research ideas. POPL has answers to frequently asked questions addressing many common concerns: https://popl20.sigplan.org/track/POPL-2020-Research-Papers#Submission-and-Reviewing-FAQ We encourage the authors to provide any supplementary material that is required to support the claims made in the paper, such as proof scripts or experimental data. This material must be uploaded at submission time, as an archive, not via a URL. Two forms of supplementary material may be submitted: (1) Anonymous supplementary material is made available to the reviewers before they submit their first-draft reviews. (2) Non-anonymous supplementary material is made available to the reviewers after they have submitted their first-draft reviews and have learned the identity of the authors. Please use anonymous supplementary material whenever possible, so that it can be taken into account from the beginning of the reviewing process. The submitted papers must adhere to the SIGPLAN Republication Policy ( https://www.sigplan.org/Resources/Policies/Republication/) and the ACM Policy on Plagiarism (https://www.acm.org/publications/policies/plagiarism). Concurrent submissions to other conferences, journals, workshops with proceedings, or similar forums of publication are not allowed. The PC chairs should be informed of closely related work submitted to a conference or journal in advance of submission. One author of each accepted paper is expected to present it at the (possibly virtual) conference. PUBLICATION, COPYRIGHT AND OPEN ACCESS The CPP proceedings will be published by the ACM, and authors of accepted papers will be required to choose one of the following publication options: (1) Author retains copyright of the work and grants ACM a non-exclusive permission-to-publish license and, optionally, licenses the work under a Creative Commons license. (2) Author retains copyright of the work and grants ACM an exclusive permission-to-publish license. (3) Author transfers copyright of the work to ACM. For authors who can afford it, we recommend option (1), which will make the paper Gold Open Access, and also encourage such authors to license their work under the CC-BY license. ACM will charge you an article processing fee for this option (currently, US$700), which you have to pay directly with the ACM. For everyone else, we recommend option (2), which is free and allows you to achieve Green Open Access, by uploading a preprint of your paper to a repository that guarantees permanent archival such as arXiv or HAL. This is anyway a good idea for timely dissemination even if you chose option 1. Ensuring timely dissemination is particularly important for this edition, since, because of the very tight schedule, the official proceedings might not be available in time for CPP. The official CPP 2021 proceedings will also be available via SIGPLAN OpenTOC (http://www.sigplan.org/OpenTOC/#cpp). For ACM?s take on this, see their Copyright Policy ( http://www.acm.org/publications/policies/copyright-policy) and Author Rights (http://authors.acm.org/main.html). PROGRAM COMMITTEE C?t?lin Hri?cu, Inria Paris, France (co-chair) Andrei Popescu, Middlesex University London, UK (co-chair) Reynald Affeldt, National Institute of Advanced Industrial Science and Technology (AIST), Japan June Andronick, CSIRO's Data61 and UNSW, Australia Arthur Azevedo de Amorim, Carnegie Mellon University, USA Joachim Breitner, DFINITY Foundation, Germany Jesper Cockx, TU Delft, Netherlands Cyril Cohen, Universit? C?te d?Azur, Inria, France Nils Anders Danielsson, University of Gothenburg / Chalmers University of Technology, Sweden Brijesh Dongol, University of Surrey, UK Floris van Doorn, University of Pittsburgh, USA Yannick Forster, Saarland University, Germany Shilpi Goel, Centaur Technology, Inc., USA Chung-Kil Hur, Seoul National University, South Korea Moa Johansson, Chalmers University of Technology, Sweden Ekaterina Komendantskaya, Heriot-Watt University, UK Angeliki Koutsoukou-Argyraki, University of Cambridge, UK Robert Y. Lewis, Vrije Universiteit Amsterdam, Netherlands Hongjin Liang, Nanjing University, China Andreas Lochbihler, Digital Asset GmbH, Switzerland Petar Maksimovi?, Imperial College London, UK William Mansky, University of Illinois at Chicago, USA Anders M?rtberg, Stockholm University, Sweden Sam Owre, SRI International, USA Karl Palmskog, KTH Royal Institute of Technology, Sweden Johannes ?man Pohjola, CSIRO's Data61 / University of New South Wales, Australia Damien Pous, CNRS, ENS Lyon, France Tahina Ramananandro, Microsoft Research, USA Ilya Sergey, Yale-NUS College and National University of Singapore, Singapore Natarajan Shankar, SRI International, USA Kathrin Stark, Princeton University, USA Ren? Thiemann, University of Innsbruck, Austria Amin Timany, Aarhus University, Denmark Josef Urban, Czech Technical University in Prague, Czech Republic Christoph Weidenbach, MPI-INF, Germany Freek Wiedijk, Radboud University Nijmegen, Netherlands Yannick Zakowski, University of Pennsylvania, USA CONTACT For any questions please contact the two PC chairs: C?t?lin Hri?cu , Andrei Popescu -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Thu Apr 16 15:26:35 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Thu, 16 Apr 2020 15:26:35 +0200 Subject: [Agda] error in plfa exercise Message-ID: I wrote in this mail list, with the subject [Agda] error in plfa exercise, the 15/04/2020 at 17:14, that I saw an error in the writing of the proof of the currying function described in https://plfa.github.io/Connectives/. I have to apologize to everyone for my error which I had falsely attributed to my old version 2.5.3 of agda. I had written incorrectly "currying: ? {A B C: Set} ? (A ? B ? C) ? (A ? B) ? C" in place of the correct "currying: ? {A B C: Set} ? (A ? B ? C) ? (A ? B ? C) The incorrect placement of the parenthesis was fatal to me. -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From fdhzs2010 at hotmail.com Thu Apr 16 16:03:33 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Thu, 16 Apr 2020 14:03:33 +0000 Subject: [Agda] error in plfa exercise In-Reply-To: References: <6c0014de-8cbe-2e96-7168-f6afd0042714@free.fr> <26107130-e9a1-c9e0-0726-add2c5771eec@free.fr> , Message-ID: The way always works for me is to install it via stack. just download the source code of agda, checkout the right release, rename your favorite stack.yaml, type `stack install` and then wait. Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Andr?s Sicard-Ram?rez Sent: April 16, 2020 7:35 AM To: Michel Levy Cc: Agda users Subject: Re: [Agda] error in plfa exercise On Thu, 16 Apr 2020 at 03:39, Michel Levy > wrote: I can't upgrade my agda 2.5.3 version. I tried to install the version 2.6.1 with cabal. OS? GHC version? cabal-install version? But I get the error src/full/Agda/VersionCommit.hs:5:1: error: Failed to load interface for ?Development.GitRev? There are files missing in the ?gitrev-1.3.1 at gitrev-1.3.1-6KBEbA9rw49F9GCJBEz6uX? package, Which is the output of $ cabal update $ cabal install gitrev ? -- Andr?s -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Thu Apr 16 17:51:37 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Thu, 16 Apr 2020 17:51:37 +0200 Subject: [Agda] Online Agda meeting? Message-ID: Hi, I'd like to know if you are interested in having an online Agda meeting some time in the next couple of months. A traditional Agda meeting consists of talks, code sprints, discussions and social events. I would also like to know which of these are of interest to you. (If you want to recommend specific tools or services you can do that as well.) Feel free to respond either to the list or directly to me. -- /NAD From a.j.rouvoet at gmail.com Thu Apr 16 18:14:42 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Thu, 16 Apr 2020 18:14:42 +0200 Subject: [Agda] Online Agda meeting? In-Reply-To: References: Message-ID: <6080b1e6-0aa2-150c-1297-f76124f61968@gmail.com> Hi Nils, That still sounds like a good idea. I'd also be happy to give my talk which was scheduled for AIM in Edinburgh until COVID broke out. I'd be happy to attend discussions on implementation and the standard library and attend talks. A few days I gave a different talk at the Edinburgh seminar where they use Blackboard Collaborate. From my perspective that worked really well (very modern and user-friendly web application, worked from firefox and chrome) and it was easy to record the talk. Ohad Kammar collected experiences from the perspective of the audience if you are interested. Cheers, Arjen On 4/16/20 5:51 PM, Nils Anders Danielsson wrote: > Hi, > > I'd like to know if you are interested in having an online Agda meeting > some time in the next couple of months. > > A traditional Agda meeting consists of talks, code sprints, discussions > and social events. I would also like to know which of these are of > interest to you. (If you want to recommend specific tools or services > you can do that as well.) > > Feel free to respond either to the list or directly to me. > From leo at halfaya.org Thu Apr 16 18:25:09 2020 From: leo at halfaya.org (John Leo) Date: Thu, 16 Apr 2020 09:25:09 -0700 Subject: [Agda] Online Agda meeting? In-Reply-To: References: Message-ID: I would be interested in joining the online Agda meeting. All parts are interesting to me! Thanks and I look forward to seeing everyone, at least online. John On Thu, Apr 16, 2020 at 8:51 AM Nils Anders Danielsson wrote: > Hi, > > I'd like to know if you are interested in having an online Agda meeting > some time in the next couple of months. > > A traditional Agda meeting consists of talks, code sprints, discussions > and social events. I would also like to know which of these are of > interest to you. (If you want to recommend specific tools or services > you can do that as well.) > > Feel free to respond either to the list or directly to me. > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Thu Apr 16 18:29:30 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Thu, 16 Apr 2020 18:29:30 +0200 Subject: [Agda] Online Agda meeting? In-Reply-To: References: Message-ID: Hi Nils, If you accept Agda newbies who aren?t CS PhDs, I?d be interested :-) > Le 16 avr. 2020 ? 17:51, Nils Anders Danielsson a ?crit : > > Hi, > > I'd like to know if you are interested in having an online Agda meeting > some time in the next couple of months. > > A traditional Agda meeting consists of talks, code sprints, discussions > and social events. I would also like to know which of these are of > interest to you. (If you want to recommend specific tools or services > you can do that as well.) > > Feel free to respond either to the list or directly to me. > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From phiroc at free.fr Fri Apr 17 08:44:17 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Fri, 17 Apr 2020 08:44:17 +0200 Subject: [Agda] words Message-ID: Hello, does anyone how to implement Idris?s ?words? function in Agda? I couldn?t find it in Agda Builtins, neither could I find ?unpack?. https://github.com/idris-lang/Idris-dev/blob/713e485ff6d35f11b1e29b20388d02ff5c43d0db/libs/prelude/Prelude/Strings.idr Many thanks. Cheers, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Fri Apr 17 12:21:13 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Fri, 17 Apr 2020 11:21:13 +0100 Subject: [Agda] words In-Reply-To: References: Message-ID: <3c1475e0-cdb0-3877-78a0-2757b9178988@ens-lyon.org> Hi Philippe, I've opened a PR on the standard library to add `wordsBy` and `words`. https://github.com/agda/agda-stdlib/pull/1163 Cheers, gallais On 17/04/2020 07:44, Philippe de Rochambeau wrote: > Hello, > > does anyone how to implement Idris?s ?words? function in Agda? > > I couldn?t find it in Agda Builtins, neither could I find ?unpack?. > > https://github.com/idris-lang/Idris-dev/blob/713e485ff6d35f11b1e29b20388d02ff5c43d0db/libs/prelude/Prelude/Strings.idr > > Many thanks. > > Cheers, > > Philippe > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From nad at cse.gu.se Fri Apr 17 15:29:11 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 17 Apr 2020 15:29:11 +0200 Subject: [Agda] Online Agda meeting? In-Reply-To: References: Message-ID: <5a8b33f2-e995-0364-a1e7-36178b6d0191@cse.gu.se> On 2020-04-16 18:29, Philippe de Rochambeau wrote: > If you accept Agda newbies who aren?t CS PhDs, I?d be interested :-) You and other newbies are welcome. -- /NAD From michel.levy.imag at free.fr Fri Apr 17 16:34:48 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Fri, 17 Apr 2020 16:34:48 +0200 Subject: [Agda] plfa, using proj2, missing in Quantifiers Message-ID: <6262bdc9-0614-a02d-7795-af9e0aee22d0@free.fr> I'm always studying plfa. Now I study the chapter Quantifiers. In this chapter the first exercise is to prove ?-distrib-? : {A : Set}{B C : A -> Set} -> ? ((x : A) -> B x ? C x) ? ((x : A) -> B x) ? ((x : A) -> C x) But in the import, at the beginning of this chapter, I see: open import Data.Product using (_?_ ; proj? ) renaming (_,_ to ?_,_? ) Why proj2proj_2 necessary to solve this exercise is not in the using list ? Where should I write these remarks, in this mail list? or in the mail list plfa-interest at inf.ed.ac.uk. -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From wadler at inf.ed.ac.uk Fri Apr 17 17:17:25 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Fri, 17 Apr 2020 12:17:25 -0300 Subject: [Agda] plfa, using proj2, missing in Quantifiers In-Reply-To: <6262bdc9-0614-a02d-7795-af9e0aee22d0@free.fr> References: <6262bdc9-0614-a02d-7795-af9e0aee22d0@free.fr> Message-ID: Michel, Questions like your are welcome on plfa-interest at inf.ed.ac.uk. I've added proj? to the imports for Qualifiers. Thanks for pointing it out. Go well, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Fri, 17 Apr 2020 at 11:35, Michel Levy wrote: > I'm always studying plfa. Now I study the chapter Quantifiers. > > In this chapter the first exercise is to prove > > ?-distrib-? : {A : Set}{B C : A -> Set} -> > ((x : A) -> B x ? C x) ? ((x : A) -> B x) ? ((x : A) -> C x) > > But in the import, at the beginning of this chapter, I see : open import > Data.Product > using (_?_ > ; proj? > ) renaming > (_,_ to > ?_,_? ) > > Why proj2proj_2 necessary to solve this exercise is not in the using list > ? > > Where should I write these remarks, in this mail list or in the mail list > plfa-interest at inf.ed.ac.uk. > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From me at abn.sh Fri Apr 17 17:16:12 2020 From: me at abn.sh (Alexander Ben Nasrallah) Date: Fri, 17 Apr 2020 17:16:12 +0200 Subject: [Agda] Online Agda meeting? In-Reply-To: <5a8b33f2-e995-0364-a1e7-36178b6d0191@cse.gu.se> References: <5a8b33f2-e995-0364-a1e7-36178b6d0191@cse.gu.se> Message-ID: <20200417151612.GA5922@scherox.fritz.box> On Fri, Apr 17, 2020 at 03:29:11PM +0200, Nils Anders Danielsson wrote: > On 2020-04-16 18:29, Philippe de Rochambeau wrote: > > If you accept Agda newbies who aren?t CS PhDs, I?d be interested :-) > > You and other newbies are welcome. I would consider myself an interested newbie :) Talks and code sprints sound booth interesting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Digital signature URL: From nicolas.osborne.etu at univ-lille.fr Sat Apr 18 15:17:43 2020 From: nicolas.osborne.etu at univ-lille.fr (Nicolas Osborne) Date: Sat, 18 Apr 2020 15:17:43 +0200 Subject: [Agda] Universe level in heterogeneous association list Message-ID: Hello, I am trying to implement the heterogeneous association list from McBride and McKinna's View From the Left, and universe polymorphism is giving me a hard time. The version without any level information is: ```agda module HAL where open import Data.List open import Level data HAL {Label : Set} : List Label -> Set where hnil : HAL [] hcons : {ls : List Label}{X : Set} -> (l : Label) -> (x : X) -> (h : HAL ls) -> HAL (l ? ls) ``` The `hcons` constructor raises an error. I believe that the Universe level should be the max between the level of the Label and the level of X, a list of Label being at the same level as Label. (But, am I right in believing so ?) Here is what Agda said: Set? is not less or equal than Set when checking that the type {ls : List Label} {X : Set} (l : Label) ? X ? HAL ls ? HAL (l ? ls) of the constructor hcons fits in the sort Set of the datatype. So far, in the few Universe polymorphism I have done, the level information was in the type signature. But I don't want to put X in the type signature, the point being that we should be able to change the X at each hcons (also, Agda does not accept this definition neither). Anybody has a suggestion ? Nicolas Osborne -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From anka.213 at gmail.com Sat Apr 18 16:33:29 2020 From: anka.213 at gmail.com (=?utf-8?Q?Andreas_K=C3=A4llberg?=) Date: Sat, 18 Apr 2020 16:33:29 +0200 Subject: [Agda] Online Agda meeting? In-Reply-To: References: Message-ID: Sounds fun! I would definitely be interested. If there is interest, I could try to make an introductory presentation about Cubical Agda, since my half-finished Master?s thesis uses CTT for a proof. No promises though. ? /Anka > 16 apr. 2020 kl. 17:51 skrev Nils Anders Danielsson : > > Hi, > > I'd like to know if you are interested in having an online Agda meeting > some time in the next couple of months. > > A traditional Agda meeting consists of talks, code sprints, discussions > and social events. I would also like to know which of these are of > interest to you. (If you want to recommend specific tools or services > you can do that as well.) > > Feel free to respond either to the list or directly to me. > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From godzbanebane at gmail.com Sat Apr 18 16:59:58 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Sat, 18 Apr 2020 17:59:58 +0300 Subject: [Agda] Online Agda meeting? In-Reply-To: References: Message-ID: I would also love to participate. ======= Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Sat Apr 18 17:30:53 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Sat, 18 Apr 2020 17:30:53 +0200 Subject: [Agda] Introducing hypotheses Message-ID: <29A55F10-52A0-4BA6-BC88-75B342E0DCC9@free.fr> Hello, I am attempting to translate a Coq proof into Agda, for learning purposes (cf. https://flint.cs.yale.edu/cs430/coq/pdf/Tutorial.pdf, p. 9): tauto? : ? (A B C : Set) ? (A ? B ? C) ? (A ? B) ? A ? C tauto? = { }0 Here?s how Coq introduces hypotheses, letting the use apply them. Coq < apply H?. 1 subgoal A : Prop B : Prop C : Prop H : A -> B -> C H? : A -> B HA : A ============================ A How do you do the same thing in Agda? Cheers, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Sat Apr 18 17:32:03 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Sat, 18 Apr 2020 17:32:03 +0200 Subject: [Agda] Introducing hypotheses In-Reply-To: <29A55F10-52A0-4BA6-BC88-75B342E0DCC9@free.fr> References: <29A55F10-52A0-4BA6-BC88-75B342E0DCC9@free.fr> Message-ID: <5D08F574-4173-482C-B79D-95A4BDA7A89D@free.fr> s/? which the user can then apply ? /? letting the use apply them ?/ > Le 18 avr. 2020 ? 17:30, Philippe de Rochambeau a ?crit : > > > Hello, > > I am attempting to translate a Coq proof into Agda, for learning purposes (cf. https://flint.cs.yale.edu/cs430/coq/pdf/Tutorial.pdf , p. 9): > > tauto? : ? (A B C : Set) ? (A ? B ? C) ? (A ? B) ? A ? C > tauto? = { }0 > > Here?s how Coq introduces hypotheses, letting the use apply them. > > Coq < apply H?. > 1 subgoal > A : Prop > B : Prop > C : Prop > H : A -> B -> C > H? : A -> B > HA : A > ============================ > A > > How do you do the same thing in Agda? > > Cheers, > > Philippe > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Sat Apr 18 17:41:05 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Sat, 18 Apr 2020 17:41:05 +0200 Subject: [Agda] Introducing hypotheses In-Reply-To: <980b9aae-8425-761f-9b9d-c7e6b48bdd1a@kuleuven.be> References: <29A55F10-52A0-4BA6-BC88-75B342E0DCC9@free.fr> <5D08F574-4173-482C-B79D-95A4BDA7A89D@free.fr> <980b9aae-8425-761f-9b9d-c7e6b48bdd1a@kuleuven.be> Message-ID: Very enlightening. Thank you, Andreas. > Le 18 avr. 2020 ? 17:37, Andreas Nuyts a ?crit : > > Dear Philippe, > > These Agda exercise sessions - mostly by Jesper Cockx - may be of interest to you: > https://github.com/anuyts/agda-sessions > > To answer your question: > tauto? = \ A B C g f a -> g a (f a) > > Best regards, > Andreas > > On 18/04/2020 17:32, Philippe de Rochambeau wrote: >> s/? which the user can then apply ? /? letting the use apply them ?/ >> >>> Le 18 avr. 2020 ? 17:30, Philippe de Rochambeau > a ?crit : >>> >>> >>> Hello, >>> >>> I am attempting to translate a Coq proof into Agda, for learning purposes (cf. https://flint.cs.yale.edu/cs430/coq/pdf/Tutorial.pdf , p. 9): >>> >>> tauto? : ? (A B C : Set) ? (A ? B ? C) ? (A ? B) ? A ? C >>> tauto? = { }0 >>> >>> Here?s how Coq introduces hypotheses, letting the use apply them. >>> >>> Coq < apply H?. >>> 1 subgoal >>> A : Prop >>> B : Prop >>> C : Prop >>> H : A -> B -> C >>> H? : A -> B >>> HA : A >>> ============================ >>> A >>> >>> How do you do the same thing in Agda? >>> >>> Cheers, >>> >>> Philippe >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Sat Apr 18 17:46:49 2020 From: carette at mcmaster.ca (Jacques Carette) Date: Sat, 18 Apr 2020 11:46:49 -0400 Subject: [Agda] Universe level in heterogeneous association list In-Reply-To: References: Message-ID: <86757dcc-6223-8f2c-1a19-f8ad1a1ca254@mcmaster.ca> Here is one way to do it. module HAL where open import Data.List open import Level data HAL {ll lx : Level} {Label : Set ll} : List Label -> Set (ll ? suc lx) where ? hnil? : HAL [] ? hcons : {ls : List Label} {X : Set lx} ??? -> (l : Label) ??? -> (x : X) ??? -> (h : HAL {ll} {lx} ls) ??? -> HAL (l ? ls) If you want to be level-free, then you can set ll and lx to 0, and get data HAL0 {Label : Set} : List Label -> Set (suc zero) where ? hnil? : HAL0 [] ? hcons : {ls : List Label} {X : Set} ??? -> (l : Label) ??? -> (x : X) ??? -> (h : HAL0 ls) ??? -> HAL0 (l ? ls) You need to go up a level because hcons contains a whole Set (of Level 0). Jacques On 2020-Apr.-18 09:17 , Nicolas Osborne wrote: > Hello, > > I am trying to implement the heterogeneous association list from McBride > and McKinna's View From the Left, and universe polymorphism is giving me > a hard time. > > The version without any level information is: > > ```agda > module HAL where > > open import Data.List > open import Level > > data HAL {Label : Set} : List Label -> Set where > hnil : HAL [] > hcons : {ls : List Label}{X : Set} > -> (l : Label) > -> (x : X) > -> (h : HAL ls) > -> HAL (l ? ls) > ``` > > The `hcons` constructor raises an error. I believe that the Universe > level should be the max between the level of the Label and the level of > X, a list of Label being at the same level as Label. (But, am I right in > believing so ?) > > Here is what Agda said: > > Set? is not less or equal than Set > when checking that the type > {ls : List Label} {X : Set} (l : Label) ? X ? HAL ls ? HAL (l ? ls) > of the constructor hcons fits in the sort Set of the datatype. > > > So far, in the few Universe polymorphism I have done, the level > information was in the type signature. But I don't want to put X in the > type signature, the point being that we should be able to change the X > at each hcons (also, Agda does not accept this definition neither). > > Anybody has a suggestion ? > > > Nicolas Osborne > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.osborne.etu at univ-lille.fr Sat Apr 18 18:15:42 2020 From: nicolas.osborne.etu at univ-lille.fr (Nicolas Osborne) Date: Sat, 18 Apr 2020 18:15:42 +0200 Subject: [Agda] Universe level in heterogeneous association list In-Reply-To: <86757dcc-6223-8f2c-1a19-f8ad1a1ca254@mcmaster.ca> References: <86757dcc-6223-8f2c-1a19-f8ad1a1ca254@mcmaster.ca> Message-ID: <4c00862b-edec-daad-8455-59505073ca9c@univ-lille.fr> Thanks Jacques, that's very helpfull. I have a better understanding of what's going on here. I didn't have the idea of puting the level in the data declaration and using it just in the hcons case. The level-free version will be handy, it allows to easily specify the label type. Nicolas Le 18/04/2020 ? 17:46, Jacques Carette a ?crit?: > Here is one way to do it. > > module HAL where > > open import Data.List > open import Level > > data HAL {ll lx : Level} {Label : Set ll} : List Label -> Set (ll ? suc > lx) where > ? hnil? : HAL [] > ? hcons : {ls : List Label} {X : Set lx} > ??? -> (l : Label) > ??? -> (x : X) > ??? -> (h : HAL {ll} {lx} ls) > ??? -> HAL (l ? ls) > > If you want to be level-free, then you can set ll and lx to 0, and get > > data HAL0 {Label : Set} : List Label -> Set (suc zero) where > ? hnil? : HAL0 [] > ? hcons : {ls : List Label} {X : Set} > ??? -> (l : Label) > ??? -> (x : X) > ??? -> (h : HAL0 ls) > ??? -> HAL0 (l ? ls) > > You need to go up a level because hcons contains a whole Set (of Level 0). > > Jacques > > On 2020-Apr.-18 09:17 , Nicolas Osborne wrote: >> Hello, >> >> I am trying to implement the heterogeneous association list from McBride >> and McKinna's View From the Left, and universe polymorphism is giving me >> a hard time. >> >> The version without any level information is: >> >> ```agda >> module HAL where >> >> open import Data.List >> open import Level >> >> data HAL {Label : Set} : List Label -> Set where >> hnil : HAL [] >> hcons : {ls : List Label}{X : Set} >> -> (l : Label) >> -> (x : X) >> -> (h : HAL ls) >> -> HAL (l ? ls) >> ``` >> >> The `hcons` constructor raises an error. I believe that the Universe >> level should be the max between the level of the Label and the level of >> X, a list of Label being at the same level as Label. (But, am I right in >> believing so ?) >> >> Here is what Agda said: >> >> Set? is not less or equal than Set >> when checking that the type >> {ls : List Label} {X : Set} (l : Label) ? X ? HAL ls ? HAL (l ? ls) >> of the constructor hcons fits in the sort Set of the datatype. >> >> >> So far, in the few Universe polymorphism I have done, the level >> information was in the type signature. But I don't want to put X in the >> type signature, the point being that we should be able to change the X >> at each hcons (also, Agda does not accept this definition neither). >> >> Anybody has a suggestion ? >> >> >> Nicolas Osborne >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From michel.levy.imag at free.fr Sat Apr 18 22:18:54 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sat, 18 Apr 2020 22:18:54 +0200 Subject: [Agda] problem with proj1 Message-ID: I have a problem with the two lines below in the context open import Data.Product using (_?_; proj?; proj?) renaming (_,_ to ?_,_?) test0 : 1 ? proj? ? 1 , 2 ? test0 = refl ???? Errors ???????????????????????????????????????????????? Failed to solve the following constraints: ? _50 := 2 [blocked on problem 99] ? [99] ? =< _B_49 1 : Set The term proj? ? 1 , 2 ? appears in _yellow_ and its value calculated by C-c C-n is 1 Still more strange, when I rename proj? in proj1 with proj1 : {A B : Set} -> A ? B -> A proj1 ? x , y ? = x I have without error test0' : 1 ? proj1 ? 1 , 2 ? test0' = refl -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Sat Apr 18 22:38:51 2020 From: carette at mcmaster.ca (Jacques Carette) Date: Sat, 18 Apr 2020 16:38:51 -0400 Subject: [Agda] problem with proj1 In-Reply-To: References: Message-ID: Use _,'_ instead - it is the non-dependent version.? proj1 works because you're declaring B to not depend on A, but in general _,_ is dependent. Jacques On 2020-04-18 4:18 p.m., Michel Levy wrote: > I have a problem with the two lines below in the context > open import Data.Product using (_?_; proj?; proj?) renaming (_,_ to ?_,_?) > > test0 : 1 ? proj? ? 1 , 2 ? > test0 = refl > > ???? Errors ???????????????????????????????????????????????? > Failed to solve the following constraints: > ? _50 := 2 [blocked on problem 99] > ? [99] ? =< _B_49 1 : Set > > The term proj? ? 1 , 2 ? appears in _yellow_ and its value calculated > by C-c C-n is 1 > > > Still more strange, when I rename proj? in proj1 with > > proj1 : {A B : Set} -> A ? B -> A > proj1 ? x , y ? = x > > I have without error > > test0' : 1 ? proj1 ? 1 , 2 ? > test0' = refl > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetoguzderin at mehmetoguzderin.com Sun Apr 19 02:53:21 2020 From: mehmetoguzderin at mehmetoguzderin.com (Mehmet Oguz Derin) Date: Sun, 19 Apr 2020 03:53:21 +0300 Subject: [Agda] Online Agda meeting? In-Reply-To: References: Message-ID: I am also interested, would love to participate and help with logistics if possible. On Thu, Apr 16, 2020, 18:51 Nils Anders Danielsson wrote: > Hi, > > I'd like to know if you are interested in having an online Agda meeting > some time in the next couple of months. > > A traditional Agda meeting consists of talks, code sprints, discussions > and social events. I would also like to know which of these are of > interest to you. (If you want to recommend specific tools or services > you can do that as well.) > > Feel free to respond either to the list or directly to me. > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Mon Apr 20 09:00:49 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Mon, 20 Apr 2020 09:00:49 +0200 Subject: [Agda] An article by Jean-Yves Girard Message-ID: <5BEE53B2-B249-41CB-BC87-DCF59535E370@free.fr> Good morning, interesting article by Jean-Yves Girard (in French) : https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley and others) Cheers, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Mon Apr 20 09:20:23 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Mon, 20 Apr 2020 09:20:23 +0200 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <5BEE53B2-B249-41CB-BC87-DCF59535E370@free.fr> References: <5BEE53B2-B249-41CB-BC87-DCF59535E370@free.fr> Message-ID: Hi Philippe, Could you share something about the article why you think it is interesting to the Agda community? Not everyone here is fluent in French. -- Jesper On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau wrote: > Good morning, > interesting article by Jean-Yves Girard (in French) : > https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley and > others) > Cheers, > Philippe > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Mon Apr 20 09:54:24 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Mon, 20 Apr 2020 09:54:24 +0200 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: Message-ID: <00DA919D-8712-40E6-AD0E-CD49F82B0895@free.fr> Hi Jesper, Sure. I?ll summarize tonight or tomorrow. Best regards, Philippe > Le 20 avr. 2020 ? 09:20, Jesper Cockx a ?crit : > > ? > Hi Philippe, > > Could you share something about the article why you think it is interesting to the Agda community? Not everyone here is fluent in French. > > -- Jesper > >> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau wrote: >> Good morning, >> interesting article by Jean-Yves Girard (in French) : https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley and others) >> Cheers, >> Philippe >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Mon Apr 20 19:16:25 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Mon, 20 Apr 2020 19:16:25 +0200 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <00DA919D-8712-40E6-AD0E-CD49F82B0895@free.fr> References: <00DA919D-8712-40E6-AD0E-CD49F82B0895@free.fr> Message-ID: Hello, let me translate the summary of the article written by Jean-Yves Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) entitled "La logique 2.0"; i.e.,"Logic 2.0" (cf. https://girard.perso.math.cnrs.fr/logique2.0.pdf) and the first paragraph. "In this tract, I lay the foundations of a radical reinterpretation of logic. Which I illustrate with technical developments: in particular a notion of truth based on the Euler-Poincar? Invariant". Introduction : the return of philosophy At the end of the Nineteenth Century, Logic underwent a spectacular Renaissance. But, just like a snake growing so fast that it didn't shed its skin, it's still wearing its shirt of Nessus; the scientistic form of its Founding Fathers has now become obsolete. "Demonstration networks" of Linear Logic have made manifest this obsolescence. It is now time to change the framework of interpretation and to carry out a "Copernician Revolution" : a passage to Logic 2.0." I don't have time to translate the rest of the article ? it?s 27-pages long ?. But, basically, Girard is saying that the challenge for logicians of the 21st Century, is to combine Logic and Philosophy. The full article is worth a read, if you understand French. Best regards, Philippe PS I discovered Girard this morning, on the Net, after reading Reinhold?s article entitled ? ?Type' is not a Type: Preliminary Report ? in which he quotes the former?s 1972 Ph D Thesis. > Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau a ?crit : > > Hi Jesper, > Sure. > I?ll summarize tonight or tomorrow. > Best regards, > Philippe > >> Le 20 avr. 2020 ? 09:20, Jesper Cockx a ?crit : >> >> ? >> Hi Philippe, >> >> Could you share something about the article why you think it is interesting to the Agda community? Not everyone here is fluent in French. >> >> -- Jesper >> >> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau > wrote: >> Good morning, >> interesting article by Jean-Yves Girard (in French) : https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley and others) >> Cheers, >> Philippe >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Mon Apr 20 20:00:55 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 20 Apr 2020 21:00:55 +0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <00DA919D-8712-40E6-AD0E-CD49F82B0895@free.fr> Message-ID: The first trouble with this paper is that its abstract explains nothing. It particular, it gives no comment about what is Euler-Poincar? Invariant. The names of Euler and Poincare sound encouraging, but the whole abstract, and the below explanation about snake, Copernical revolution, and 21-th century make the reader doubt about the goal these famous names are used for. -- SM On 2020-04-20 20:16, Philippe de Rochambeau wrote: > Hello, > > let me translate the summary of the article written by Jean-Yves > Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) entitled > "La logique 2.0"; i.e.,"Logic 2.0" (cf. > https://girard.perso.math.cnrs.fr/logique2.0.pdf) > and the first paragraph. > > "_In this tract, I lay the foundations of a radical reinterpretation > of logic. Which _ > _I illustrate with technical developments: in particular a notion of > truth based_ > _on the Euler-Poincar? Invariant"._ > > _Introduction : the return of philosophy_ > > _At the end of the Nineteenth Century, Logic underwent a spectacular > Renaissance._ > _But, just like a snake growing so fast that it didn't shed its skin, > it's still wearing_ > _its shirt of Nessus; the scientistic form of its Founding Fathers has > now become _ > _obsolete. "Demonstration networks" of Linear Logic have made manifest > this obsolescence._ > _It is now time to change the framework of interpretation and to carry > out a_ > _"Copernician Revolution" : a passage to Logic 2.0."_ > > I don't have time to translate the rest of the article ? it?s > 27-pages long ?. But, basically, Girard is saying > that the challenge for logicians of the 21st Century, is to combine > Logic and Philosophy. > > The full article is worth a read, if you understand French. > > Best regards, > > Philippe > > PS I discovered Girard this morning, on the Net, after reading > Reinhold?s article entitled ? ?Type' is not a Type: Preliminary > Report ? > in which he quotes the former?s 1972 Ph D Thesis. > >> Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau a >> ?crit : >> >> Hi Jesper,Sure. >> I?ll summarize tonight or tomorrow. >> Best regards, >> Philippe >> >>> Le 20 avr. 2020 ? 09:20, Jesper Cockx a >>> ?crit : >> >> ? >> >> Hi Philippe, >> >> Could you share something about the article why you think it is >> interesting to the Agda community? Not everyone here is fluent in >> French. >> >> -- Jesper >> >> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau >> wrote: >> >> Good morning, >> interesting article by Jean-Yves Girard (in French) : >> https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley >> and others) >> Cheers, >> Philippe_______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Mon Apr 20 20:21:41 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 20 Apr 2020 21:21:41 +0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <00DA919D-8712-40E6-AD0E-CD49F82B0895@free.fr> Message-ID: This invariant parobably has a relevance to the Euler equality relating the number sides, edges and vertices in a polyghon in a three-dimensional space. Something of this sort. But the abstract and introduction take a great effort to hide its relevance to logic (if there is any relevance). On 2020-04-20 21:00, mechvel at scico.botik.ru wrote: > The first trouble with this paper is that its abstract explains > nothing. > It particular, it gives no comment about what is Euler-Poincar? > Invariant. > The names of Euler and Poincare sound encouraging, but the whole > abstract, and > the below explanation about snake, Copernical revolution, and 21-th > century > make the reader doubt about the goal these famous names are used for. > > -- > SM > > > > On 2020-04-20 20:16, Philippe de Rochambeau wrote: >> Hello, >> >> let me translate the summary of the article written by Jean-Yves >> Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) entitled >> "La logique 2.0"; i.e.,"Logic 2.0" (cf. >> https://girard.perso.math.cnrs.fr/logique2.0.pdf) >> and the first paragraph. >> >> "_In this tract, I lay the foundations of a radical reinterpretation >> of logic. Which _ >> _I illustrate with technical developments: in particular a notion of >> truth based_ >> _on the Euler-Poincar? Invariant"._ >> >> _Introduction : the return of philosophy_ >> >> _At the end of the Nineteenth Century, Logic underwent a spectacular >> Renaissance._ >> _But, just like a snake growing so fast that it didn't shed its skin, >> it's still wearing_ >> _its shirt of Nessus; the scientistic form of its Founding Fathers has >> now become _ >> _obsolete. "Demonstration networks" of Linear Logic have made manifest >> this obsolescence._ >> _It is now time to change the framework of interpretation and to carry >> out a_ >> _"Copernician Revolution" : a passage to Logic 2.0."_ >> >> I don't have time to translate the rest of the article ? it?s >> 27-pages long ?. But, basically, Girard is saying >> that the challenge for logicians of the 21st Century, is to combine >> Logic and Philosophy. >> >> The full article is worth a read, if you understand French. >> >> Best regards, >> >> Philippe >> >> PS I discovered Girard this morning, on the Net, after reading >> Reinhold?s article entitled ? ?Type' is not a Type: Preliminary >> Report ? >> in which he quotes the former?s 1972 Ph D Thesis. >> >>> Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau a >>> ?crit : >>> >>> Hi Jesper,Sure. >>> I?ll summarize tonight or tomorrow. >>> Best regards, >>> Philippe >>> >>>> Le 20 avr. 2020 ? 09:20, Jesper Cockx a >>>> ?crit : >>> >>> ? >>> >>> Hi Philippe, >>> >>> Could you share something about the article why you think it is >>> interesting to the Agda community? Not everyone here is fluent in >>> French. >>> >>> -- Jesper >>> >>> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau >>> wrote: >>> >>> Good morning, >>> interesting article by Jean-Yves Girard (in French) : >>> https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley >>> and others) >>> Cheers, >>> Philippe_______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Mon Apr 20 21:04:51 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 20 Apr 2020 22:04:51 +0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <00DA919D-8712-40E6-AD0E-CD49F82B0895@free.fr> Message-ID: May be, this is related to the following theorem in geometry: each smooth orientable surface in a three-dimensional space is topologically equal to a sphere with several handles. So that the number of these handles is preserved under invertible continuous transformations. May be this is called Euler - Poicare invariant (?). For example, a sphere with one handle is equivalent to torus. Anyway the relevance of this subject to logic is hidden under the two famous names, Copernic, 21-th century, a snake, and such. In fact, 21-th century is not so particularly impressive and important. Do we understand of what has been developed 19-th century? How much people (even mathematicians) understand of what precisely have invented Gauss, Laplace, Galois, Lobachevsky? For example, many people think that Lobachevsky has discovered that parallel straight lines can intersect, that this is the essence of the invention. -- SM On 2020-04-20 21:21, mechvel at scico.botik.ru wrote: > This invariant parobably has a relevance to the Euler equality relating > the number sides, edges and vertices in a polyghon in a > three-dimensional > space. Something of this sort. > But the abstract and introduction take a great effort to hide its > relevance > to logic (if there is any relevance). > > > On 2020-04-20 21:00, mechvel at scico.botik.ru wrote: >> The first trouble with this paper is that its abstract explains >> nothing. >> It particular, it gives no comment about what is Euler-Poincar? >> Invariant. >> The names of Euler and Poincare sound encouraging, but the whole >> abstract, and >> the below explanation about snake, Copernical revolution, and 21-th >> century >> make the reader doubt about the goal these famous names are used for. >> >> -- >> SM >> >> >> >> On 2020-04-20 20:16, Philippe de Rochambeau wrote: >>> Hello, >>> >>> let me translate the summary of the article written by Jean-Yves >>> Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) entitled >>> "La logique 2.0"; i.e.,"Logic 2.0" (cf. >>> https://girard.perso.math.cnrs.fr/logique2.0.pdf) >>> and the first paragraph. >>> >>> "_In this tract, I lay the foundations of a radical reinterpretation >>> of logic. Which _ >>> _I illustrate with technical developments: in particular a notion of >>> truth based_ >>> _on the Euler-Poincar? Invariant"._ >>> >>> _Introduction : the return of philosophy_ >>> >>> _At the end of the Nineteenth Century, Logic underwent a spectacular >>> Renaissance._ >>> _But, just like a snake growing so fast that it didn't shed its skin, >>> it's still wearing_ >>> _its shirt of Nessus; the scientistic form of its Founding Fathers >>> has >>> now become _ >>> _obsolete. "Demonstration networks" of Linear Logic have made >>> manifest >>> this obsolescence._ >>> _It is now time to change the framework of interpretation and to >>> carry >>> out a_ >>> _"Copernician Revolution" : a passage to Logic 2.0."_ >>> >>> I don't have time to translate the rest of the article ? it?s >>> 27-pages long ?. But, basically, Girard is saying >>> that the challenge for logicians of the 21st Century, is to combine >>> Logic and Philosophy. >>> >>> The full article is worth a read, if you understand French. >>> >>> Best regards, >>> >>> Philippe >>> >>> PS I discovered Girard this morning, on the Net, after reading >>> Reinhold?s article entitled ? ?Type' is not a Type: Preliminary >>> Report ? >>> in which he quotes the former?s 1972 Ph D Thesis. >>> >>>> Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau a >>>> ?crit : >>>> >>>> Hi Jesper,Sure. >>>> I?ll summarize tonight or tomorrow. >>>> Best regards, >>>> Philippe >>>> >>>>> Le 20 avr. 2020 ? 09:20, Jesper Cockx a >>>>> ?crit : >>>> >>>> ? >>>> >>>> Hi Philippe, >>>> >>>> Could you share something about the article why you think it is >>>> interesting to the Agda community? Not everyone here is fluent in >>>> French. >>>> >>>> -- Jesper >>>> >>>> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau >>>> wrote: >>>> >>>> Good morning, >>>> interesting article by Jean-Yves Girard (in French) : >>>> https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley >>>> and others) >>>> Cheers, >>>> Philippe_______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From phiroc at free.fr Mon Apr 20 21:27:39 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Mon, 20 Apr 2020 21:27:39 +0200 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: Message-ID: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> Hi, It has to do with proving truths, but don?t ask me to explain how or why: I?ve found three articles written by Girard in English on the Google Scholar Website which seem to go into details: https://scholar.google.fr/scholar?q=Transcendental+syntax+3+:+equality.+Logical+Methods+in+Computer+Science,+2016&hl=fr&as_sdt=0&as_vis=1&oi=scholart Philippe > Le 20 avr. 2020 ? 20:21, mechvel at scico.botik.ru a ?crit : > > ?This invariant parobably has a relevance to the Euler equality relating > the number sides, edges and vertices in a polyghon in a three-dimensional > space. Something of this sort. > But the abstract and introduction take a great effort to hide its relevance > to logic (if there is any relevance). > > >> On 2020-04-20 21:00, mechvel at scico.botik.ru wrote: >> The first trouble with this paper is that its abstract explains nothing. >> It particular, it gives no comment about what is Euler-Poincar? Invariant. >> The names of Euler and Poincare sound encouraging, but the whole abstract, and >> the below explanation about snake, Copernical revolution, and 21-th century >> make the reader doubt about the goal these famous names are used for. >> -- >> SM >>> On 2020-04-20 20:16, Philippe de Rochambeau wrote: >>> Hello, >>> let me translate the summary of the article written by Jean-Yves >>> Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) entitled >>> "La logique 2.0"; i.e.,"Logic 2.0" (cf. >>> https://girard.perso.math.cnrs.fr/logique2.0.pdf) >>> and the first paragraph. >>> "_In this tract, I lay the foundations of a radical reinterpretation >>> of logic. Which _ >>> _I illustrate with technical developments: in particular a notion of >>> truth based_ >>> _on the Euler-Poincar? Invariant"._ >>> _Introduction : the return of philosophy_ >>> _At the end of the Nineteenth Century, Logic underwent a spectacular >>> Renaissance._ >>> _But, just like a snake growing so fast that it didn't shed its skin, >>> it's still wearing_ >>> _its shirt of Nessus; the scientistic form of its Founding Fathers has >>> now become _ >>> _obsolete. "Demonstration networks" of Linear Logic have made manifest >>> this obsolescence._ >>> _It is now time to change the framework of interpretation and to carry >>> out a_ >>> _"Copernician Revolution" : a passage to Logic 2.0."_ >>> I don't have time to translate the rest of the article ? it?s >>> 27-pages long ?. But, basically, Girard is saying >>> that the challenge for logicians of the 21st Century, is to combine >>> Logic and Philosophy. >>> The full article is worth a read, if you understand French. >>> Best regards, >>> Philippe >>> PS I discovered Girard this morning, on the Net, after reading >>> Reinhold?s article entitled ? ?Type' is not a Type: Preliminary >>> Report ? >>> in which he quotes the former?s 1972 Ph D Thesis. >>>> Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau a >>>> ?crit : >>>> Hi Jesper,Sure. >>>> I?ll summarize tonight or tomorrow. >>>> Best regards, >>>> Philippe >>>>> Le 20 avr. 2020 ? 09:20, Jesper Cockx a >>>>> ?crit : >>>> ? >>>> Hi Philippe, >>>> Could you share something about the article why you think it is >>>> interesting to the Agda community? Not everyone here is fluent in >>>> French. >>>> -- Jesper >>>> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau >>>> wrote: >>>> Good morning, >>>> interesting article by Jean-Yves Girard (in French) : >>>> https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley >>>> and others) >>>> Cheers, >>>> Philippe_______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Mon Apr 20 22:04:00 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 20 Apr 2020 23:04:00 +0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> Message-ID: On 2020-04-20 22:27, Philippe de Rochambeau wrote: > Hi, > It has to do with proving truths, but don?t ask me to explain how or > why: > I?ve found three articles written by Girard in English on the Google > Scholar Website which seem to go into details: > > https://scholar.google.fr/scholar?q=Transcendental+syntax+3+:+equality.+Logical+Methods+in+Computer+Science,+2016&hl=fr&as_sdt=0&as_vis=1&oi=scholart The matter is that when an article is true, the author takes care to give enough hints in abstract and in the first page of introduction. So that to make the essence may be 1/5 clear to the reader, to give him a hope. And nothing of this sorts happens there. Instead the author irritates the reader with reasoning about Copernic, 21-th century, and a certain snake. So that it is more than 99% that this is a fake. ------ Sergei > >> Le 20 avr. 2020 ? 20:21, mechvel at scico.botik.ru a ?crit : > >> ?This invariant parobably has a relevance to the Euler equality >> relating >> the number sides, edges and vertices in a polyghon in a >> three-dimensional >> space. Something of this sort. >> But the abstract and introduction take a great effort to hide its >> relevance >> to logic (if there is any relevance). >> >> On 2020-04-20 21:00, mechvel at scico.botik.ru wrote: >> >>> The first trouble with this paper is that its abstract explains >>> nothing. >> >>> It particular, it gives no comment about what is Euler-Poincar? >>> Invariant. >> >>> The names of Euler and Poincare sound encouraging, but the whole >>> abstract, and >> >>> the below explanation about snake, Copernical revolution, and >>> 21-th century >> >>> make the reader doubt about the goal these famous names are used >>> for. >> >>> -- >> >>> SM >> >>> On 2020-04-20 20:16, Philippe de Rochambeau wrote: >> Hello, > >>> let me translate the summary of the article written by Jean-Yves > >>> Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) entitled > >>> "La logique 2.0"; i.e.,"Logic 2.0" (cf. > >>> https://girard.perso.math.cnrs.fr/logique2.0.pdf) > >>> and the first paragraph. > >>> "_In this tract, I lay the foundations of a radical >>> reinterpretation > >>> of logic. Which _ > >>> _I illustrate with technical developments: in particular a notion >>> of > >>> truth based_ > >>> _on the Euler-Poincar? Invariant"._ > >>> _Introduction : the return of philosophy_ > >>> _At the end of the Nineteenth Century, Logic underwent a >>> spectacular > >>> Renaissance._ > >>> _But, just like a snake growing so fast that it didn't shed its >>> skin, > >>> it's still wearing_ > >>> _its shirt of Nessus; the scientistic form of its Founding Fathers >>> has > >>> now become _ > >>> _obsolete. "Demonstration networks" of Linear Logic have made >>> manifest > >>> this obsolescence._ > >>> _It is now time to change the framework of interpretation and to >>> carry > >>> out a_ > >>> _"Copernician Revolution" : a passage to Logic 2.0."_ > >>> I don't have time to translate the rest of the article ? it?s > >>> 27-pages long ?. But, basically, Girard is saying > >>> that the challenge for logicians of the 21st Century, is to >>> combine > >>> Logic and Philosophy. > >>> The full article is worth a read, if you understand French. > >>> Best regards, > >>> Philippe > >>> PS I discovered Girard this morning, on the Net, after reading > >>> Reinhold?s article entitled ? ?Type' is not a Type: >>> Preliminary > >>> Report ? > >>> in which he quotes the former?s 1972 Ph D Thesis. > >> Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau a > >> ?crit : > >> Hi Jesper,Sure. > >> I?ll summarize tonight or tomorrow. > >> Best regards, > >> Philippe > >> Le 20 avr. 2020 ? 09:20, Jesper Cockx a > >> ?crit : > >> ? > >> Hi Philippe, > >> Could you share something about the article why you think it is > >> interesting to the Agda community? Not everyone here is fluent in > >> French. > >> -- Jesper > >> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau > >> wrote: > >> Good morning, > >> interesting article by Jean-Yves Girard (in French) : > >> https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley > >> and others) > >> Cheers, > >> Philippe_______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >>> _______________________________________________ > >>> Agda mailing list > >>> Agda at lists.chalmers.se > >>> https://lists.chalmers.se/mailman/listinfo/agda > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Mon Apr 20 23:16:21 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 21 Apr 2020 00:16:21 +0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> Message-ID: <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> Collecting all my amateur fantasy, I imagine that a logical statement is represented by a smooth surface, being considered modulo certain continuous transformations of the space. When this surface is converted to a sphere, the statement is proved. Something of this sort. This is like solving a knot by transforming it to a trivial knot. And if the surface has at least one handle (a certain topological invariant, something about Euler and Poincare), then it cannot be transformed to a sphere. May be this is the idea? I recall that some people studied the subject of Topos - an approach to topology (may be to logic also?) via the category theory. The result was that simple notions and proofs were reformulated in a complex way, and the proofs have become many times larger and many times more complex. If the paper aims at hiding such an effect, then indeed, it needs to write possibly more about Copernic, 21-th century, and a snake doing something wise with its skin. -- SM On 2020-04-20 23:04, mechvel at scico.botik.ru wrote: > On 2020-04-20 22:27, Philippe de Rochambeau wrote: >> Hi, >> It has to do with proving truths, but don?t ask me to explain how or >> why: >> I?ve found three articles written by Girard in English on the Google >> Scholar Website which seem to go into details: >> >> https://scholar.google.fr/scholar?q=Transcendental+syntax+3+:+equality.+Logical+Methods+in+Computer+Science,+2016&hl=fr&as_sdt=0&as_vis=1&oi=scholart > > > > The matter is that when an article is true, the author takes care to > give enough hints > in abstract and in the first page of introduction. So that to make the > essence may be 1/5 > clear to the reader, to give him a hope. > And nothing of this sorts happens there. Instead the author irritates > the reader with > reasoning about Copernic, 21-th century, and a certain snake. > So that it is more than 99% that this is a fake. > > ------ > Sergei > > > >> >>> Le 20 avr. 2020 ? 20:21, mechvel at scico.botik.ru a ?crit : >> >>> ?This invariant parobably has a relevance to the Euler equality >>> relating >>> the number sides, edges and vertices in a polyghon in a >>> three-dimensional >>> space. Something of this sort. >>> But the abstract and introduction take a great effort to hide its >>> relevance >>> to logic (if there is any relevance). >>> >>> On 2020-04-20 21:00, mechvel at scico.botik.ru wrote: >>> >>>> The first trouble with this paper is that its abstract explains >>>> nothing. >>> >>>> It particular, it gives no comment about what is Euler-Poincar? >>>> Invariant. >>> >>>> The names of Euler and Poincare sound encouraging, but the whole >>>> abstract, and >>> >>>> the below explanation about snake, Copernical revolution, and >>>> 21-th century >>> >>>> make the reader doubt about the goal these famous names are used >>>> for. >>> >>>> -- >>> >>>> SM >>> >>>> On 2020-04-20 20:16, Philippe de Rochambeau wrote: >>> Hello, >> >>>> let me translate the summary of the article written by Jean-Yves >> >>>> Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) entitled >> >>>> "La logique 2.0"; i.e.,"Logic 2.0" (cf. >> >>>> https://girard.perso.math.cnrs.fr/logique2.0.pdf) >> >>>> and the first paragraph. >> >>>> "_In this tract, I lay the foundations of a radical >>>> reinterpretation >> >>>> of logic. Which _ >> >>>> _I illustrate with technical developments: in particular a notion >>>> of >> >>>> truth based_ >> >>>> _on the Euler-Poincar? Invariant"._ >> >>>> _Introduction : the return of philosophy_ >> >>>> _At the end of the Nineteenth Century, Logic underwent a >>>> spectacular >> >>>> Renaissance._ >> >>>> _But, just like a snake growing so fast that it didn't shed its >>>> skin, >> >>>> it's still wearing_ >> >>>> _its shirt of Nessus; the scientistic form of its Founding Fathers >>>> has >> >>>> now become _ >> >>>> _obsolete. "Demonstration networks" of Linear Logic have made >>>> manifest >> >>>> this obsolescence._ >> >>>> _It is now time to change the framework of interpretation and to >>>> carry >> >>>> out a_ >> >>>> _"Copernician Revolution" : a passage to Logic 2.0."_ >> >>>> I don't have time to translate the rest of the article ? it?s >> >>>> 27-pages long ?. But, basically, Girard is saying >> >>>> that the challenge for logicians of the 21st Century, is to >>>> combine >> >>>> Logic and Philosophy. >> >>>> The full article is worth a read, if you understand French. >> >>>> Best regards, >> >>>> Philippe >> >>>> PS I discovered Girard this morning, on the Net, after reading >> >>>> Reinhold?s article entitled ? ?Type' is not a Type: >>>> Preliminary >> >>>> Report ? >> >>>> in which he quotes the former?s 1972 Ph D Thesis. >> >>> Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau a >> >>> ?crit : >> >>> Hi Jesper,Sure. >> >>> I?ll summarize tonight or tomorrow. >> >>> Best regards, >> >>> Philippe >> >>> Le 20 avr. 2020 ? 09:20, Jesper Cockx a >> >>> ?crit : >> >>> ? >> >>> Hi Philippe, >> >>> Could you share something about the article why you think it is >> >>> interesting to the Agda community? Not everyone here is fluent in >> >>> French. >> >>> -- Jesper >> >>> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau >> >>> wrote: >> >>> Good morning, >> >>> interesting article by Jean-Yves Girard (in French) : >> >>> https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley >> >>> and others) >> >>> Cheers, >> >>> Philippe_______________________________________________ >> >>> Agda mailing list >> >>> Agda at lists.chalmers.se >> >>> https://lists.chalmers.se/mailman/listinfo/agda >> >>>> _______________________________________________ >> >>>> Agda mailing list >> >>>> Agda at lists.chalmers.se >> >>>> https://lists.chalmers.se/mailman/listinfo/agda >> >>> _______________________________________________ >> >>> Agda mailing list >> >>> Agda at lists.chalmers.se >> >>> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Mon Apr 20 23:33:03 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 21 Apr 2020 00:33:03 +0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <00DA919D-8712-40E6-AD0E-CD49F82B0895@free.fr> Message-ID: <3eb44ed7d885001c06a38b271a94f674@scico.botik.ru> On 2020-04-20 22:04, mechvel at scico.botik.ru wrote: > May be, this is related to the following theorem in geometry: > each smooth orientable surface in a three-dimensional space > is topologically equal to a sphere with several handles. > [..] Soory, it is needed to add the condition of a compact surface without edge (sphere, torus, and many others, but not a paraboloid, for example). -- SM From wadler at inf.ed.ac.uk Tue Apr 21 00:51:20 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Mon, 20 Apr 2020 19:51:20 -0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> Message-ID: > > The matter is that when an article is true, the author takes care to > give enough hints > in abstract and in the first page of introduction. So that to make the > essence may be 1/5 > clear to the reader, to give him a hope. > And nothing of this sorts happens there. Instead the author irritates > the reader with > reasoning about Copernic, 21-th century, and a certain snake. > So that it is more than 99% that this is a fake. But one should not forget that J.-Y. Girard is renowned inventor of the Mustard Watch. Go well, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Mon, 20 Apr 2020 at 17:04, wrote: > On 2020-04-20 22:27, Philippe de Rochambeau wrote: > > Hi, > > It has to do with proving truths, but don?t ask me to explain how or > > why: > > I?ve found three articles written by Girard in English on the Google > > Scholar Website which seem to go into details: > > > > > https://scholar.google.fr/scholar?q=Transcendental+syntax+3+:+equality.+Logical+Methods+in+Computer+Science,+2016&hl=fr&as_sdt=0&as_vis=1&oi=scholart > > > > The matter is that when an article is true, the author takes care to > give enough hints > in abstract and in the first page of introduction. So that to make the > essence may be 1/5 > clear to the reader, to give him a hope. > And nothing of this sorts happens there. Instead the author irritates > the reader with > reasoning about Copernic, 21-th century, and a certain snake. > So that it is more than 99% that this is a fake. > > ------ > Sergei > > > > > > >> Le 20 avr. 2020 ? 20:21, mechvel at scico.botik.ru a ?crit : > > > >> ?This invariant parobably has a relevance to the Euler equality > >> relating > >> the number sides, edges and vertices in a polyghon in a > >> three-dimensional > >> space. Something of this sort. > >> But the abstract and introduction take a great effort to hide its > >> relevance > >> to logic (if there is any relevance). > >> > >> On 2020-04-20 21:00, mechvel at scico.botik.ru wrote: > >> > >>> The first trouble with this paper is that its abstract explains > >>> nothing. > >> > >>> It particular, it gives no comment about what is Euler-Poincar? > >>> Invariant. > >> > >>> The names of Euler and Poincare sound encouraging, but the whole > >>> abstract, and > >> > >>> the below explanation about snake, Copernical revolution, and > >>> 21-th century > >> > >>> make the reader doubt about the goal these famous names are used > >>> for. > >> > >>> -- > >> > >>> SM > >> > >>> On 2020-04-20 20:16, Philippe de Rochambeau wrote: > >> Hello, > > > >>> let me translate the summary of the article written by Jean-Yves > > > >>> Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) entitled > > > >>> "La logique 2.0"; i.e.,"Logic 2.0" (cf. > > > >>> https://girard.perso.math.cnrs.fr/logique2.0.pdf) > > > >>> and the first paragraph. > > > >>> "_In this tract, I lay the foundations of a radical > >>> reinterpretation > > > >>> of logic. Which _ > > > >>> _I illustrate with technical developments: in particular a notion > >>> of > > > >>> truth based_ > > > >>> _on the Euler-Poincar? Invariant"._ > > > >>> _Introduction : the return of philosophy_ > > > >>> _At the end of the Nineteenth Century, Logic underwent a > >>> spectacular > > > >>> Renaissance._ > > > >>> _But, just like a snake growing so fast that it didn't shed its > >>> skin, > > > >>> it's still wearing_ > > > >>> _its shirt of Nessus; the scientistic form of its Founding Fathers > >>> has > > > >>> now become _ > > > >>> _obsolete. "Demonstration networks" of Linear Logic have made > >>> manifest > > > >>> this obsolescence._ > > > >>> _It is now time to change the framework of interpretation and to > >>> carry > > > >>> out a_ > > > >>> _"Copernician Revolution" : a passage to Logic 2.0."_ > > > >>> I don't have time to translate the rest of the article ? it?s > > > >>> 27-pages long ?. But, basically, Girard is saying > > > >>> that the challenge for logicians of the 21st Century, is to > >>> combine > > > >>> Logic and Philosophy. > > > >>> The full article is worth a read, if you understand French. > > > >>> Best regards, > > > >>> Philippe > > > >>> PS I discovered Girard this morning, on the Net, after reading > > > >>> Reinhold?s article entitled ? ?Type' is not a Type: > >>> Preliminary > > > >>> Report ? > > > >>> in which he quotes the former?s 1972 Ph D Thesis. > > > >> Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau a > > > >> ?crit : > > > >> Hi Jesper,Sure. > > > >> I?ll summarize tonight or tomorrow. > > > >> Best regards, > > > >> Philippe > > > >> Le 20 avr. 2020 ? 09:20, Jesper Cockx a > > > >> ?crit : > > > >> ? > > > >> Hi Philippe, > > > >> Could you share something about the article why you think it is > > > >> interesting to the Agda community? Not everyone here is fluent in > > > >> French. > > > >> -- Jesper > > > >> On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau > > > >> wrote: > > > >> Good morning, > > > >> interesting article by Jean-Yves Girard (in French) : > > > >> https://girard.perso.math.cnrs.fr/titres.pdf (who inspired Hindley > > > >> and others) > > > >> Cheers, > > > >> Philippe_______________________________________________ > > > >> Agda mailing list > > > >> Agda at lists.chalmers.se > > > >> https://lists.chalmers.se/mailman/listinfo/agda > > > >>> _______________________________________________ > > > >>> Agda mailing list > > > >>> Agda at lists.chalmers.se > > > >>> https://lists.chalmers.se/mailman/listinfo/agda > > > >> _______________________________________________ > > > >> Agda mailing list > > > >> Agda at lists.chalmers.se > > > >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From psperatto at vera.com.uy Tue Apr 21 03:23:45 2020 From: psperatto at vera.com.uy (Patricia Peratto) Date: Mon, 20 Apr 2020 22:23:45 -0300 (UYT) Subject: [Agda] bottom and false Message-ID: <2047714343.2196022.1587432225368.JavaMail.zimbra@vera.com.uy> There is a problema with overloading. bottom in english is floor. I interpret perp as perpendicular. The symbol is perpendicular and in type theory means false. We are saying our floor is false? Regards, Patricia -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.norell at gmail.com Tue Apr 21 07:39:38 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 21 Apr 2020 07:39:38 +0200 Subject: [Agda] bottom and false In-Reply-To: <2047714343.2196022.1587432225368.JavaMail.zimbra@vera.com.uy> References: <2047714343.2196022.1587432225368.JavaMail.zimbra@vera.com.uy> Message-ID: https://en.wikipedia.org/wiki/Contradiction#In_formal_logic / Ulf On Tue, Apr 21, 2020 at 3:24 AM Patricia Peratto wrote: > There is a problema with overloading. > > bottom in english is floor. > I interpret perp as perpendicular. > The symbol is perpendicular and in type theory > means false. > > We are saying our floor is false? > > Regards, > Patricia > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From herminie.pagel at gmail.com Tue Apr 21 09:03:13 2020 From: herminie.pagel at gmail.com (Herminie Pagel) Date: Tue, 21 Apr 2020 09:03:13 +0200 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= Message-ID: Hi, Is there a standard interpretation of the strict equality _?_ (latex \===) in agda similar to the standard interpretation of _?_ as the identity type former? best, -- h -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernardobruno at gmail.com Tue Apr 21 09:37:26 2020 From: bernardobruno at gmail.com (Bruno Bernardo) Date: Tue, 21 Apr 2020 09:37:26 +0200 Subject: [Agda] FMBC 2020: 2nd Workshop on Formal Methods for Blockchains (CfP, Deadline Extension) Message-ID: [ Please distribute, apologies for multiple postings. ] ======================================================================== 2nd Workshop on Formal Methods for Blockchains (FMBC) 2020 - Second Call https://fmbc.gitlab.io/2020 July 19, 2020, Los Angeles, USA Co-located with the 32nd International Conference on Computer-Aided Verification (CAV 2020) http://i-cav.org/2020/ ------------------------------------------------------------- IMPORTANT DATES -------------------------------- Abstract submission: May 5, 2020 (extended) Full paper submission: May 12, 2020 (extended) Notification: June 16, 2020 (extended) Camera-ready: July 7, 2020 Conference: July 19, 2020 -------------------------------- -------------------------------- TOPICS OF INTEREST -------------------------------- Blockchains are decentralized transactional ledgers that rely on cryptographic hash functions for guaranteeing the integrity of the stored data. Participants on the network reach agreement on what valid transactions are through consensus algorithms. Blockchains may also provide support for Smart Contracts. Smart Contracts are scripts of an ad-hoc programming language that are stored in the Blockchain and that run on the network. They can interact with the ledger?s data and update its state. These scripts can express the logic of possibly complex contracts between users of the Blockchain. Thus, Smart Contracts can facilitate the economic activity of Blockchain participants. With the emergence and increasing popularity of cryptocurrencies such as Bitcoin and Ethereum, it is now of utmost importance to have strong guarantees of the behavior of Blockchain software. These guarantees can be brought by using Formal Methods. Indeed, Blockchain software encompasses many topics of computer science where using Formal Methods techniques and tools are relevant: consensus algorithms to ensure the liveness and the security of the data on the chain, programming languages specifically designed to write Smart Contracts, cryptographic protocols, such as zero-knowledge proofs, used to ensure privacy, etc. This workshop is a forum to identify theoretical and practical approaches of formal methods for Blockchain technology. Topics include, but are not limited to: * Formal models of Blockchain applications or concepts * Formal methods for consensus protocols * Formal methods for Blockchain-specific cryptographic primitives or protocols * Design and implementation of Smart Contract languages * Verification of Smart Contracts -------------------------------- -------------------------------- SUBMISSION -------------------------------- Submit original manuscripts (not published or considered elsewhere) with a maximum of twelve pages (full papers), six pages (short papers), and two pages (extended abstract) describing new and emerging ideas or summarizing existing work). Each paper should include a title and the name and affiliation of each author. Authors of selected extended-abstracts are invited to give a short lightning talk. At least one author of an accepted paper is expected to present the paper at the workshop as a registered participant. Submission link: https://easychair.org/conferences/?conf=fmbc2020 The authors are encouraged to use LaTeX and the EasyChair style files: https://easychair.org/publications/for_authors -------------------------------- -------------------------------- PROCEEDINGS -------------------------------- All submissions will be peer-reviewed by at least three members of the program committee for quality and relevance. Accepted regular papers (full and short papers) will be included in the workshop proceedings. -------------------------------- -------------------------------- INVITED SPEAKER -------------------------------- Grigore Rosu, Professor at University of Illinois at Urbana-Champaign, USA and Founder of Runtime Verification http://fsl.cs.illinois.edu/index.php/Grigore_Rosu https://runtimeverification.com/ -------------------------------- -------------------------------- PROGRAM COMMITTEE -------------------------------- PC CO-CHAIRS * Bruno Bernardo (Nomadic Labs, France) (bruno at nomadic-labs.com) * Diego Marmsoler (University of Exeter, UK) (D.Marmsoler at exeter.ac.uk) PC MEMBERS * Wolfgang Ahrendt (Chalmers University of Technology, Sweden) * Lacramioara Astefanoei (Nomadic Labs, France) * Massimo Bartoletti (University of Cagliari, Italy) * Bernhard Beckert (Karlsruhe Institute of Technology, Germany) * Achim Brucker (University of Exeter, UK) * Silvia Crafa (Universita di Padova, Italy) * Zaynah Dargaye (Nomadic Labs, France) * J?r?mie Decouchant (University of Luxembourg, Luxembourg) * Ansgar Fehnker (University of Twente, Netherlands) * Georges Gonthier (Inria, France) * Florian Kammueller (Middlesex University London, UK) * Maurice Herlihy (Brown University, USA) * Igor Konnov (Informal, Austria) * Andreas Lochbihler (Digital Asset, Switzerland) * Anastasia Mavridou (NASA Ames, USA) * Sim?o Melo de Sousa (Universidade da Beira Interior, Portugal) * Andrew Miller (University of Illinois at Urbana-Champaign, USA) * Karl Palmskog (KTH, Sweden) * Vincent Rahli (University of Birmingham, UK) * Andreas Rossberg (Dfinity Foundation, Germany) * Claudio Russo (Dfinity Foundation, USA) * C?sar Sanchez (Imdea, Spain) * Clara Schneidewind (TU Wien, Austria) * Ilya Sergey (Yale-NUS College/NUS, Singapore) * Bas Spitters (Aarhus University/Concordium, Denmark) * Mark Staples (CSIRO Data61, Australia) * Meng Sun (Peking University, China) * Simon Thompson (University of Kent, UK) * Philip Wadler (University of Edinburgh / IOHK, UK) From andreas.abel at ifi.lmu.de Tue Apr 21 10:00:43 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 21 Apr 2020 10:00:43 +0200 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= In-Reply-To: References: Message-ID: <880dc1ed-2d62-84e5-d128-a3ac78fcb995@ifi.lmu.de> > _?_ as the identity type former? Well, we use _?_ for the Martin-L?f identity type, which has different interpretations in different flavors of type theory. In Agda, we have these three: --with-K --without-K --cubical Not sure whether this answers your question, though. --Andreas On 2020-04-21 09:03, Herminie Pagel wrote: > Hi, > > Is there a standard interpretation of the strict equality _?_ (latex > \===) in agda similar to the standard interpretation of _?_? as the > identity type former? > > best, > > -- h > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From james.wood.100 at strath.ac.uk Tue Apr 21 10:01:21 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Tue, 21 Apr 2020 09:01:21 +0100 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= In-Reply-To: References: Message-ID: <17ed0089-affa-0b9e-191c-7fe3238ef6ea@strath.ac.uk> Hi Herminie, I've seen this symbol be used in a similar way to how _?_ is used in stdlib (a non-specific equivalence relation). It's probably fine to use for whatever you want, particularly if you can't use _?_ due to a name clash. Regards, James On 21/04/2020 08:03, Herminie Pagel wrote: > Hi, > > Is there a standard interpretation of the strict equality _?_ (latex > \===) in agda similar to the standard interpretation of _?_? as the > identity type former? > > best, > > -- h > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From andreas.abel at ifi.lmu.de Tue Apr 21 10:16:57 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 21 Apr 2020 10:16:57 +0200 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= In-Reply-To: <17ed0089-affa-0b9e-191c-7fe3238ef6ea@strath.ac.uk> References: <17ed0089-affa-0b9e-191c-7fe3238ef6ea@strath.ac.uk> Message-ID: > strict equality _?_ Oh, I missed the fourth bar. Why don't we also have "super-strict equality" with 5 stacked dashes? :D This must be the reason why the Chinese number system uses "number of dashes" only for the numerals 1, 2, and 3. Thousands of years of wisdom... On 2020-04-21 10:01, James Wood wrote: > Hi Herminie, > > I've seen this symbol be used in a similar way to how _?_ is used in > stdlib (a non-specific equivalence relation). It's probably fine to use > for whatever you want, particularly if you can't use _?_ due to a name > clash. > > Regards, > James > > On 21/04/2020 08:03, Herminie Pagel wrote: >> Hi, >> >> Is there a standard interpretation of the strict equality _?_ (latex >> \===) in agda similar to the standard interpretation of _?_? as the >> identity type former? >> >> best, >> >> -- h >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From Thorsten.Altenkirch at nottingham.ac.uk Tue Apr 21 10:55:42 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 21 Apr 2020 08:55:42 +0000 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= In-Reply-To: References: Message-ID: <950FC441-F729-4095-9ED7-F8CF4C398550@nottingham.ac.uk> I don?t think there is a standard definition of strict equality in Agda. It is possible to have both weak and strict equality in Agda as described in our paper Extending Homotopy Type Theory with Strict Equality At the last Agda meeting Jesper implemented some extension to the universe mechanism which allows us to have a universe of pretypes with strict equality and fibrant types with weak equality. The syntax of equality in agda is a bit confusing. In writing I would use = for the usual weak equality type and \equiv for either judgemental or strict equality. However, in agda it is the other way around, because traditionally = is used in definitions and it has the advantage of being an ASCII character. Thorsten From: Agda on behalf of Herminie Pagel Date: Tuesday, 21 April 2020 at 08:04 To: Agda mailing list Subject: [Agda] Strict equality _?_ in agda Hi, Is there a standard interpretation of the strict equality _?_ (latex \===) in agda similar to the standard interpretation of _?_ as the identity type former? best, -- h This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From herminie.pagel at gmail.com Tue Apr 21 14:32:36 2020 From: herminie.pagel at gmail.com (Herminie Pagel) Date: Tue, 21 Apr 2020 14:32:36 +0200 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= In-Reply-To: <950FC441-F729-4095-9ED7-F8CF4C398550@nottingham.ac.uk> References: <950FC441-F729-4095-9ED7-F8CF4C398550@nottingham.ac.uk> Message-ID: Thank you all for the answers! I agree with that old chinese wisdom, stacked dashes are a very good visual metaphor. Even Apple is using it in their gestures! :) @Andreas As a side-effect, I have now a better understanding of the meaning of those agda flags. I know that K postulates that x ? x has exactly one element, but what do I assume/not assume when using --cubical? @Thorsten Is there a sequel to that paper? @Jesper Is your implementation available? Does it work with 2.6.1? I could not find it in your github. I also found Paolo's presentation if someone is interested. Best, -- h Am Di., 21. Apr. 2020 um 10:55 Uhr schrieb Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk>: > I don?t think there is a standard definition of strict equality in Agda. > > > > It is possible to have both weak and strict equality in Agda as described > in our paper > > Extending Homotopy Type Theory with Strict Equality > > > At the last Agda meeting Jesper implemented some extension to the universe > mechanism which allows us to have a universe of pretypes with strict > equality and fibrant types with weak equality. > > > > The syntax of equality in agda is a bit confusing. In writing I would use > = for the usual weak equality type and \equiv for either judgemental or > strict equality. However, in agda it is the other way around, because > traditionally = is used in definitions and it has the advantage of being an > ASCII character. > > > > Thorsten > > > > *From: *Agda on behalf of Herminie Pagel > > *Date: *Tuesday, 21 April 2020 at 08:04 > *To: *Agda mailing list > *Subject: *[Agda] Strict equality _?_ in agda > > > > Hi, > > Is there a standard interpretation of the strict equality _?_ (latex > \===) in agda similar to the standard interpretation of _?_ as the > identity type former? > > > > best, > > > > -- h > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Tue Apr 21 14:50:48 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 21 Apr 2020 14:50:48 +0200 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= In-Reply-To: References: <950FC441-F729-4095-9ED7-F8CF4C398550@nottingham.ac.uk> Message-ID: Hi Herminie, The prototype implementation of 2-level type theory I did during the Agda meeting is available at https://github.com/jespercockx/agda/tree/2ltt, there is some example code at https://github.com/jespercockx/agda/blob/2ltt/test/Succeed/SST.agda. I haven't tested with 2.6.1, but it's likely some things have to be updated before it compiles. -- Jesper On Tue, Apr 21, 2020 at 2:33 PM Herminie Pagel wrote: > Thank you all for the answers! > > I agree with that old chinese wisdom, stacked dashes are a very good > visual metaphor. Even Apple is using it in their gestures! :) > > @Andreas As a side-effect, I have now a better understanding of the > meaning of those agda flags. I know that K postulates that x ? x has > exactly one element, but what do I assume/not assume when using --cubical? > > @Thorsten Is there a sequel to that paper? > > @Jesper Is your implementation available? Does it work with 2.6.1? I could > not find it in your github. > > I also found Paolo's presentation > > if someone is interested. > > Best, > > -- h > > Am Di., 21. Apr. 2020 um 10:55 Uhr schrieb Thorsten Altenkirch < > Thorsten.Altenkirch at nottingham.ac.uk>: > >> I don?t think there is a standard definition of strict equality in Agda. >> >> >> >> It is possible to have both weak and strict equality in Agda as described >> in our paper >> >> Extending Homotopy Type Theory with Strict Equality >> >> >> At the last Agda meeting Jesper implemented some extension to the >> universe mechanism which allows us to have a universe of pretypes with >> strict equality and fibrant types with weak equality. >> >> >> >> The syntax of equality in agda is a bit confusing. In writing I would use >> = for the usual weak equality type and \equiv for either judgemental or >> strict equality. However, in agda it is the other way around, because >> traditionally = is used in definitions and it has the advantage of being an >> ASCII character. >> >> >> >> Thorsten >> >> >> >> *From: *Agda on behalf of Herminie >> Pagel >> *Date: *Tuesday, 21 April 2020 at 08:04 >> *To: *Agda mailing list >> *Subject: *[Agda] Strict equality _?_ in agda >> >> >> >> Hi, >> >> Is there a standard interpretation of the strict equality _?_ (latex >> \===) in agda similar to the standard interpretation of _?_ as the >> identity type former? >> >> >> >> best, >> >> >> >> -- h >> >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please contact the sender and delete the email and >> attachment. >> >> Any views or opinions expressed by the author of this email do not >> necessarily reflect the views of the University of Nottingham. Email >> communications with the University of Nottingham may be monitored >> where permitted by law. >> >> >> >> >> _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xuanrui at nagoya-u.jp Tue Apr 21 14:54:56 2020 From: xuanrui at nagoya-u.jp (Xuanrui Qi) Date: Tue, 21 Apr 2020 21:54:56 +0900 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> Message-ID: <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> > The result was that simple notions > and proofs were reformulated in a complex way, and the proofs have > become many times larger and many times more complex. I'm afraid many people on this list would not agree with this statement. From what little I know about topos theory, many proofs can be greatly simplified using topos theory. Ingo Blechschmidt, for example, used topos theory to simplify many proofs in algebraic geometry [1]. Ingo himself might be on this list, so I won't say too much about his work. But this is a divergence. Of course, I won't say it's a great article just because it's written by Jean-Yves Girard, because I can't read much French. But from a peek at Girard's article it looks very interesting, and somehow related to the synthetic view of logic as proposed by topos theory and friends. This view is definitely worth exploring and I'd be interested in understanding what Girard thinks about it. -Xuanrui [1]: https://rawgit.com/iblech/internal-methods/master/notes.pdf On Tue, 2020-04-21 at 00:16 +0300, mechvel at scico.botik.ru wrote: > Collecting all my amateur fantasy, I imagine that a logical statement > is > represented by a smooth surface, being considered modulo certain > continuous > transformations of the space. When this surface is converted to a > sphere, > the statement is proved. Something of this sort. This is like solving > a > knot > by transforming it to a trivial knot. And if the surface has at > least > one handle > (a certain topological invariant, something about Euler and > Poincare), > then it cannot be transformed to a sphere. > May be this is the idea? > > I recall that some people studied the subject of Topos - an approach > to > topology > (may be to logic also?) via the category theory. The result was that > simple notions > and proofs were reformulated in a complex way, and the proofs have > become many times > larger and many times more complex. > > If the paper aims at hiding such an effect, then indeed, it needs to > write possibly > more about Copernic, 21-th century, and a snake doing something wise > with its skin. > > -- > SM > > > > On 2020-04-20 23:04, mechvel at scico.botik.ru wrote: > > On 2020-04-20 22:27, Philippe de Rochambeau wrote: > > > Hi, > > > It has to do with proving truths, but don?t ask me to explain how > > > or > > > why: > > > I?ve found three articles written by Girard in English on the > > > Google > > > Scholar Website which seem to go into details: > > > > > > https://scholar.google.fr/scholar?q=Transcendental+syntax+3+:+equality.+Logical+Methods+in+Computer+Science,+2016&hl=fr&as_sdt=0&as_vis=1&oi=scholart > > > > > > The matter is that when an article is true, the author takes care > > to > > give enough hints > > in abstract and in the first page of introduction. So that to make > > the > > essence may be 1/5 > > clear to the reader, to give him a hope. > > And nothing of this sorts happens there. Instead the author > > irritates > > the reader with > > reasoning about Copernic, 21-th century, and a certain snake. > > So that it is more than 99% that this is a fake. > > > > ------ > > Sergei > > > > > > > > > > Le 20 avr. 2020 ? 20:21, mechvel at scico.botik.ru a ?crit : > > > > ?This invariant parobably has a relevance to the Euler equality > > > > relating > > > > the number sides, edges and vertices in a polyghon in a > > > > three-dimensional > > > > space. Something of this sort. > > > > But the abstract and introduction take a great effort to hide > > > > its > > > > relevance > > > > to logic (if there is any relevance). > > > > > > > > On 2020-04-20 21:00, mechvel at scico.botik.ru wrote: > > > > > > > > > The first trouble with this paper is that its abstract > > > > > explains > > > > > nothing. > > > > > It particular, it gives no comment about what is Euler- > > > > > Poincar? > > > > > Invariant. > > > > > The names of Euler and Poincare sound encouraging, but the > > > > > whole > > > > > abstract, and > > > > > the below explanation about snake, Copernical revolution, and > > > > > 21-th century > > > > > make the reader doubt about the goal these famous names are > > > > > used > > > > > for. > > > > > -- > > > > > SM > > > > > On 2020-04-20 20:16, Philippe de Rochambeau wrote: > > > > Hello, > > > > > let me translate the summary of the article written by Jean- > > > > > Yves > > > > > Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) > > > > > entitled > > > > > "La logique 2.0"; i.e.,"Logic 2.0" (cf. > > > > > https://girard.perso.math.cnrs.fr/logique2.0.pdf) > > > > > and the first paragraph. > > > > > "_In this tract, I lay the foundations of a radical > > > > > reinterpretation > > > > > of logic. Which _ > > > > > _I illustrate with technical developments: in particular a > > > > > notion > > > > > of > > > > > truth based_ > > > > > _on the Euler-Poincar? Invariant"._ > > > > > _Introduction : the return of philosophy_ > > > > > _At the end of the Nineteenth Century, Logic underwent a > > > > > spectacular > > > > > Renaissance._ > > > > > _But, just like a snake growing so fast that it didn't shed > > > > > its > > > > > skin, > > > > > it's still wearing_ > > > > > _its shirt of Nessus; the scientistic form of its Founding > > > > > Fathers > > > > > has > > > > > now become _ > > > > > _obsolete. "Demonstration networks" of Linear Logic have made > > > > > manifest > > > > > this obsolescence._ > > > > > _It is now time to change the framework of interpretation and > > > > > to > > > > > carry > > > > > out a_ > > > > > _"Copernician Revolution" : a passage to Logic 2.0."_ > > > > > I don't have time to translate the rest of the article ? it?s > > > > > 27-pages long ?. But, basically, Girard is saying > > > > > that the challenge for logicians of the 21st Century, is to > > > > > combine > > > > > Logic and Philosophy. > > > > > The full article is worth a read, if you understand French. > > > > > Best regards, > > > > > Philippe > > > > > PS I discovered Girard this morning, on the Net, after > > > > > reading > > > > > Reinhold?s article entitled ? ?Type' is not a Type: > > > > > Preliminary > > > > > Report ? > > > > > in which he quotes the former?s 1972 Ph D Thesis. > > > > Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau > > > > a > > > > ?crit : > > > > Hi Jesper,Sure. > > > > I?ll summarize tonight or tomorrow. > > > > Best regards, > > > > Philippe > > > > Le 20 avr. 2020 ? 09:20, Jesper Cockx a > > > > ?crit : > > > > ? > > > > Hi Philippe, > > > > Could you share something about the article why you think it is > > > > interesting to the Agda community? Not everyone here is fluent > > > > in > > > > French. > > > > -- Jesper > > > > On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau > > > > wrote: > > > > Good morning, > > > > interesting article by Jean-Yves Girard (in French) : > > > > https://girard.perso.math.cnrs.fr/titres.pdf (who inspired > > > > Hindley > > > > and others) > > > > Cheers, > > > > Philippe_______________________________________________ > > > > Agda mailing list > > > > Agda at lists.chalmers.se > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > > _______________________________________________ > > > > > Agda mailing list > > > > > Agda at lists.chalmers.se > > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > > > > Agda mailing list > > > > Agda at lists.chalmers.se > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From phiroc at free.fr Tue Apr 21 15:10:36 2020 From: phiroc at free.fr (phiroc at free.fr) Date: Tue, 21 Apr 2020 15:10:36 +0200 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> Message-ID: <743dd2e8-f41d-4eb1-bf57-4dbeecf84875@email.android.com> An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Tue Apr 21 15:24:17 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 21 Apr 2020 16:24:17 +0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> Message-ID: <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> On 2020-04-21 15:54, Xuanrui Qi wrote: >> The result was that simple notions >> and proofs were reformulated in a complex way, and the proofs have >> become many times larger and many times more complex. > > I'm afraid many people on this list would not agree with this > statement. From what little I know about topos theory, many proofs can > be greatly simplified using topos theory. Ingo Blechschmidt, for > example, used topos theory to simplify many proofs in algebraic > geometry [1]. Ingo himself might be on this list, so I won't say too > much about his work. But this is a divergence. I just transfer the opinion of a certain expert in logic who is aware of the topos approach. He referred this way to a certain dissertation. This was in about 1995. I am sorry, I know nothing about topos. May be, the approach is good. But I am sure that a true paper is not written this way. Maybe other papers will do ... ------ Sergei > Of course, I won't say it's a great article just because it's written > by Jean-Yves Girard, because I can't read much French. But from a peek > at Girard's article it looks very interesting, and somehow related to > the synthetic view of logic as proposed by topos theory and friends. > This view is definitely worth exploring and I'd be interested in > understanding what Girard thinks about it. > > -Xuanrui > > [1]: https://rawgit.com/iblech/internal-methods/master/notes.pdf > > On Tue, 2020-04-21 at 00:16 +0300, mechvel at scico.botik.ru wrote: >> Collecting all my amateur fantasy, I imagine that a logical statement >> is >> represented by a smooth surface, being considered modulo certain >> continuous >> transformations of the space. When this surface is converted to a >> sphere, >> the statement is proved. Something of this sort. This is like solving >> a >> knot >> by transforming it to a trivial knot. And if the surface has at >> least >> one handle >> (a certain topological invariant, something about Euler and >> Poincare), >> then it cannot be transformed to a sphere. >> May be this is the idea? >> >> I recall that some people studied the subject of Topos - an approach >> to >> topology >> (may be to logic also?) via the category theory. The result was that >> simple notions >> and proofs were reformulated in a complex way, and the proofs have >> become many times >> larger and many times more complex. >> >> If the paper aims at hiding such an effect, then indeed, it needs to >> write possibly >> more about Copernic, 21-th century, and a snake doing something wise >> with its skin. >> >> -- >> SM >> >> >> >> On 2020-04-20 23:04, mechvel at scico.botik.ru wrote: >> > On 2020-04-20 22:27, Philippe de Rochambeau wrote: >> > > Hi, >> > > It has to do with proving truths, but don?t ask me to explain how >> > > or >> > > why: >> > > I?ve found three articles written by Girard in English on the >> > > Google >> > > Scholar Website which seem to go into details: >> > > >> > > https://scholar.google.fr/scholar?q=Transcendental+syntax+3+:+equality.+Logical+Methods+in+Computer+Science,+2016&hl=fr&as_sdt=0&as_vis=1&oi=scholart >> > >> > >> > The matter is that when an article is true, the author takes care >> > to >> > give enough hints >> > in abstract and in the first page of introduction. So that to make >> > the >> > essence may be 1/5 >> > clear to the reader, to give him a hope. >> > And nothing of this sorts happens there. Instead the author >> > irritates >> > the reader with >> > reasoning about Copernic, 21-th century, and a certain snake. >> > So that it is more than 99% that this is a fake. >> > >> > ------ >> > Sergei >> > >> > >> > >> > > > Le 20 avr. 2020 ? 20:21, mechvel at scico.botik.ru a ?crit : >> > > > ?This invariant parobably has a relevance to the Euler equality >> > > > relating >> > > > the number sides, edges and vertices in a polyghon in a >> > > > three-dimensional >> > > > space. Something of this sort. >> > > > But the abstract and introduction take a great effort to hide >> > > > its >> > > > relevance >> > > > to logic (if there is any relevance). >> > > > >> > > > On 2020-04-20 21:00, mechvel at scico.botik.ru wrote: >> > > > >> > > > > The first trouble with this paper is that its abstract >> > > > > explains >> > > > > nothing. >> > > > > It particular, it gives no comment about what is Euler- >> > > > > Poincar? >> > > > > Invariant. >> > > > > The names of Euler and Poincare sound encouraging, but the >> > > > > whole >> > > > > abstract, and >> > > > > the below explanation about snake, Copernical revolution, and >> > > > > 21-th century >> > > > > make the reader doubt about the goal these famous names are >> > > > > used >> > > > > for. >> > > > > -- >> > > > > SM >> > > > > On 2020-04-20 20:16, Philippe de Rochambeau wrote: >> > > > Hello, >> > > > > let me translate the summary of the article written by Jean- >> > > > > Yves >> > > > > Girard (https://en.wikipedia.org/wiki/Jean-Yves_Girard) >> > > > > entitled >> > > > > "La logique 2.0"; i.e.,"Logic 2.0" (cf. >> > > > > https://girard.perso.math.cnrs.fr/logique2.0.pdf) >> > > > > and the first paragraph. >> > > > > "_In this tract, I lay the foundations of a radical >> > > > > reinterpretation >> > > > > of logic. Which _ >> > > > > _I illustrate with technical developments: in particular a >> > > > > notion >> > > > > of >> > > > > truth based_ >> > > > > _on the Euler-Poincar? Invariant"._ >> > > > > _Introduction : the return of philosophy_ >> > > > > _At the end of the Nineteenth Century, Logic underwent a >> > > > > spectacular >> > > > > Renaissance._ >> > > > > _But, just like a snake growing so fast that it didn't shed >> > > > > its >> > > > > skin, >> > > > > it's still wearing_ >> > > > > _its shirt of Nessus; the scientistic form of its Founding >> > > > > Fathers >> > > > > has >> > > > > now become _ >> > > > > _obsolete. "Demonstration networks" of Linear Logic have made >> > > > > manifest >> > > > > this obsolescence._ >> > > > > _It is now time to change the framework of interpretation and >> > > > > to >> > > > > carry >> > > > > out a_ >> > > > > _"Copernician Revolution" : a passage to Logic 2.0."_ >> > > > > I don't have time to translate the rest of the article ? it?s >> > > > > 27-pages long ?. But, basically, Girard is saying >> > > > > that the challenge for logicians of the 21st Century, is to >> > > > > combine >> > > > > Logic and Philosophy. >> > > > > The full article is worth a read, if you understand French. >> > > > > Best regards, >> > > > > Philippe >> > > > > PS I discovered Girard this morning, on the Net, after >> > > > > reading >> > > > > Reinhold?s article entitled ? ?Type' is not a Type: >> > > > > Preliminary >> > > > > Report ? >> > > > > in which he quotes the former?s 1972 Ph D Thesis. >> > > > Le 20 avr. 2020 ? 09:54, Philippe de Rochambeau > > > > > a >> > > > ?crit : >> > > > Hi Jesper,Sure. >> > > > I?ll summarize tonight or tomorrow. >> > > > Best regards, >> > > > Philippe >> > > > Le 20 avr. 2020 ? 09:20, Jesper Cockx a >> > > > ?crit : >> > > > ? >> > > > Hi Philippe, >> > > > Could you share something about the article why you think it is >> > > > interesting to the Agda community? Not everyone here is fluent >> > > > in >> > > > French. >> > > > -- Jesper >> > > > On Mon, Apr 20, 2020 at 9:01 AM Philippe de Rochambeau >> > > > wrote: >> > > > Good morning, >> > > > interesting article by Jean-Yves Girard (in French) : >> > > > https://girard.perso.math.cnrs.fr/titres.pdf (who inspired >> > > > Hindley >> > > > and others) >> > > > Cheers, >> > > > Philippe_______________________________________________ >> > > > Agda mailing list >> > > > Agda at lists.chalmers.se >> > > > https://lists.chalmers.se/mailman/listinfo/agda >> > > > > _______________________________________________ >> > > > > Agda mailing list >> > > > > Agda at lists.chalmers.se >> > > > > https://lists.chalmers.se/mailman/listinfo/agda >> > > > _______________________________________________ >> > > > Agda mailing list >> > > > Agda at lists.chalmers.se >> > > > https://lists.chalmers.se/mailman/listinfo/agda >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Tue Apr 21 16:13:16 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 21 Apr 2020 17:13:16 +0300 Subject: [Agda] "bug" on x = x Message-ID: <931cb05001b5645a80764928d3b03243@scico.botik.ru> I have a certain fragment ... | _ | no x?0 = aux (r ? 0#) where pair = divRem y x x?0 q = proj? pair -q = -q ... Probably the type checker (Agda 2.6.1) needs to report about a loop in "-q = -q". But it does not terminate (in 20 minutes). I recall the effect is known. I write now about it, for any occasion. Regards, ------ Sergei From m.escardo at cs.bham.ac.uk Tue Apr 21 21:13:55 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Tue, 21 Apr 2020 20:13:55 +0100 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> Message-ID: On 21/04/2020 14:24, mechvel at scico.botik.ru wrote: > On 2020-04-21 15:54, Xuanrui Qi wrote: >>> The result was that simple notions >>> and proofs were reformulated in a complex way, and the proofs have >>> become many times larger and many times more complex. >> >> I'm afraid many people on this list would not agree with this >> statement. From what little I know about topos theory, many proofs can >> be greatly simplified using topos theory. Ingo Blechschmidt, for >> example, used topos theory to simplify many proofs in algebraic >> geometry [1]. Ingo himself might be on this list, so I won't say too >> much about his work. But this is a divergence. > > > I just transfer the opinion of a certain expert in logic who is aware of > the topos > approach. He referred this way to a certain dissertation. This was in > about 1995. One should avoid giving opinions about things one doesn't understand. In particular, one should avoid transferring opinions. Toposes are very nice and elegant and useful and precisely explained in the literature, so that if you want to understand them, you can. I have used them and I will continue to do so. I am not sure about mustard watches, but then I am not an expert and hence I refrain from giving an opinion. However, I do agree that the abstract and the introduction of the given article in this thread don't give enlightening explanations. And this is part of the reason I am not an expert on this subject - whenever I try to have a go at it, I don't get anywhere by reading the published work - perhaps you need to be initiated in person to be able to grasp it - or perhaps I just didn't get it and it is my fault, which I don't discard as a possibility. Best, Martin From phiroc at free.fr Tue Apr 21 22:06:55 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Tue, 21 Apr 2020 22:06:55 +0200 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> Message-ID: Hi all, this discussion has been going round in loops for the past two days about about a very tiny part of Girard?s Logique 2.0 article: the abstract and the first paragraph of a 27-page article. We?ve talked about snakes, and mustard watches, and a bit about topos theory, mostly based on the superficial interpretation of the article?s ? cover ? , to paraphrase an old English saying. Then Xuanrui cried out: ? give Girard a chance! ?, just like the child in Andersen?s tale. I?m not a specialist in anything, and even less a school-master giving lectures, but I believe that it's worth reading at least one of Girard?s articles (in English) in your lifetime, even if you only understand 20% of it, especially if you are interested in logic and programming. Furthermore, if Abadi and Hindley and probably many other researchers worldwide, have quoted him over the past decades, this guy?s must have interesting things to say. https://girard.perso.math.cnrs.fr/Accueil.html Cheers and no bad feelings, Philippe PS if you read the article about Mustard Clocks, which is available on his Homepage, please don?t interpret it at first degree :-) > Le 21 avr. 2020 ? 21:13, Martin Escardo a ?crit : > > > > On 21/04/2020 14:24, mechvel at scico.botik.ru wrote: >> On 2020-04-21 15:54, Xuanrui Qi wrote: >>>> The result was that simple notions >>>> and proofs were reformulated in a complex way, and the proofs have >>>> become many times larger and many times more complex. >>> >>> I'm afraid many people on this list would not agree with this >>> statement. From what little I know about topos theory, many proofs can >>> be greatly simplified using topos theory. Ingo Blechschmidt, for >>> example, used topos theory to simplify many proofs in algebraic >>> geometry [1]. Ingo himself might be on this list, so I won't say too >>> much about his work. But this is a divergence. >> I just transfer the opinion of a certain expert in logic who is aware of the topos >> approach. He referred this way to a certain dissertation. This was in about 1995. > > One should avoid giving opinions about things one doesn't understand. In particular, one should avoid transferring opinions. > > Toposes are very nice and elegant and useful and precisely explained in the literature, so that if you want to understand them, you can. I have used them and I will continue to do so. > > I am not sure about mustard watches, but then I am not an expert and hence I refrain from giving an opinion. However, I do agree that the abstract and the introduction of the given article in this thread don't give enlightening explanations. And this is part of the reason I am not an expert on this subject - whenever I try to have a go at it, I don't get anywhere by reading the published work - perhaps you need to be initiated in person to be able to grasp it - or perhaps I just didn't get it and it is my fault, which I don't discard as a possibility. > > Best, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Tue Apr 21 22:34:03 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 21 Apr 2020 23:34:03 +0300 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> Message-ID: <81a4145fccd1c3e1da6533241ff959f3@scico.botik.ru> On 2020-04-21 22:13, Martin Escardo wrote: > On 21/04/2020 14:24, mechvel at scico.botik.ru wrote: >> On 2020-04-21 15:54, Xuanrui Qi wrote: >>>> The result was that simple notions >>>> and proofs were reformulated in a complex way, and the proofs have >>>> become many times larger and many times more complex. >>> >>> I'm afraid many people on this list would not agree with this >>> statement. From what little I know about topos theory, many proofs >>> can >>> be greatly simplified using topos theory. Ingo Blechschmidt, for >>> example, used topos theory to simplify many proofs in algebraic >>> geometry [1]. Ingo himself might be on this list, so I won't say too >>> much about his work. But this is a divergence. >> >> >> I just transfer the opinion of a certain expert in logic who is aware >> of the topos >> approach. He referred this way to a certain dissertation. This was in >> about 1995. > > One should avoid giving opinions about things one doesn't understand. > In particular, one should avoid transferring opinions. > > Toposes are very nice and elegant and useful and precisely explained > in the literature, so that if you want to understand them, you can. I > have used them and I will continue to do so. > [..] Yes, Martin. I apologize for transfering an opinion without understanding any in this toposes thing. Long live toposes! -- SM From m.escardo at cs.bham.ac.uk Tue Apr 21 22:40:11 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Tue, 21 Apr 2020 21:40:11 +0100 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <81a4145fccd1c3e1da6533241ff959f3@scico.botik.ru> References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> <81a4145fccd1c3e1da6533241ff959f3@scico.botik.ru> Message-ID: <059acec4-98c0-353c-bced-6a8cbda7dbaa@cs.bham.ac.uk> On 21/04/2020 21:34, mechvel at scico.botik.ru wrote: > Long live toposes! And Agda! All the best, Martin From joey.eremondi at gmail.com Wed Apr 22 05:56:45 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Tue, 21 Apr 2020 20:56:45 -0700 Subject: [Agda] Nat Fuel vs Sized Types (and other Sized Type questions) Message-ID: I'm wondering if there are general guidelines as to when to use sized types vs. just using natural numbers as fuel/index. ** My Problem ** I've tried adding sized types to a proof I'm working on to establish an explicit termination argument. However, in case splits I'm getting stuck on unification problems like this. ? sz ? ? sz' or ? sz ? sz' ** My Questions ** * Is there a general guideline for when to use sizes vs nats? Do sized types give us anything Nats don't, other than having a solver, ? and some implicit niceness? Or do they make the type theory strictly more powerful? * How does unification work with sizes? Why do the above unifications fail? Is ? not injective? * How does the subtyping work with sizes? Is T i < T (i ?? j)? Or (T i) < (T j) when i : Size< j? Or do I need to write manual "size-lifting" functions? * Does --without-K or --cubical interact with sized types in a weird way? * Is there a general way to write a fixed-point combinator in with sized types? Something like: mu : (A : Size -> Set) -> ( (i : Size) -> A i -> A (? i) ) -> (j : Size) -> A j * Likewise, is there any way to write a sized-version of a type-fixed point combinator (Mu : (Set -> Set) -> Set) Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From joey.eremondi at gmail.com Wed Apr 22 06:07:56 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Tue, 21 Apr 2020 21:07:56 -0700 Subject: [Agda] What do you use for variable binding in 2020? Message-ID: I'm modelling a programming language/core-calculus in Agda, and I'm wondering what people use to model binding and name capture? I'm familiar with a few techniques in general, but I'm wondering if specific ones works better in Agda, or have libraries to support them, or at least good examples of code using them. My language has a lot of constructs, so the ideal for me is something that either doesn't require me to implement substitution myself, or where I can do it generically, so I'm not writing a ton of boiler plate. I'm aware of: * De Bruijn/ Locally Nameless: seems pretty solid, but requires implementing substitution and other traversals myself, possibly twice. * PHOAS: handles capturing and shadowing easily, but seems to be more popular with Coq? Not sure how it scales modelling to things like type rules and small-step semantics * Shifted Names: looks promising, but I'm not sure how mature this idea is http://tydeworkshop.org/2019-abstracts/paper16.pdf * Type/scope safe universes: I haven't fully grokked this one, but it's got a lot of smart people behind it. https://dl.acm.org/doi/10.1145/3236785 What do you use? What do you like? What has tutorials / code examples / libraries? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Apr 22 11:39:33 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 22 Apr 2020 09:39:33 +0000 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= In-Reply-To: References: <950FC441-F729-4095-9ED7-F8CF4C398550@nottingham.ac.uk> Message-ID: <7A609BD6-10D1-4B28-BD7C-DFDD650D52D4@nottingham.ac.uk> @Thorsten Is there a sequel to that paper? Yes, there is Two-Level Type Theory and Applications Danil Annenkov, Paolo Capriotti, Nicolai Kraus, Christian Sattler https://arxiv.org/abs/1705.03307 Am Di., 21. Apr. 2020 um 10:55 Uhr schrieb Thorsten Altenkirch >: I don?t think there is a standard definition of strict equality in Agda. It is possible to have both weak and strict equality in Agda as described in our paper Extending Homotopy Type Theory with Strict Equality At the last Agda meeting Jesper implemented some extension to the universe mechanism which allows us to have a universe of pretypes with strict equality and fibrant types with weak equality. The syntax of equality in agda is a bit confusing. In writing I would use = for the usual weak equality type and \equiv for either judgemental or strict equality. However, in agda it is the other way around, because traditionally = is used in definitions and it has the advantage of being an ASCII character. Thorsten From: Agda > on behalf of Herminie Pagel > Date: Tuesday, 21 April 2020 at 08:04 To: Agda mailing list > Subject: [Agda] Strict equality _?_ in agda Hi, Is there a standard interpretation of the strict equality _?_ (latex \===) in agda similar to the standard interpretation of _?_ as the identity type former? best, -- h This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Wed Apr 22 12:59:20 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 22 Apr 2020 11:59:20 +0100 Subject: [Agda] What do you use for variable binding in 2020? In-Reply-To: References: Message-ID: Hi Joey, Note that the AACMM (Universes of Syntax with Binding) paper now has a journal version living at https://arxiv.org/abs/2001.11001v1. I'd take the journal version to be the definitive source for this approach. As for understanding it, it might be instructive to focus on and reproduce section 3 first, and then worry about the later sections later. In short: section 3 moves us from having multiple traversals of the syntax (notably renaming and substitution) to having just one: `semantics`. This already has a big payoff. The approach is finished off in sections 5 and 6, where rules are given for producing typing rules which always support a `semantics`. Another useful reference for the section 3 material is Conor McBride's note living at http://strictlypositive.org/ren-sub.pdf, which is a more first-principles exposition. Alternatively, I think it's also quite possible to not fully understand what's going on, and work off of the examples in the repository and in the paper. The syntax for creating a type system is very different from standard Agda, but it should be clear roughly what's doing what. Regards, James On 22/04/2020 05:07, Joey Eremondi wrote: > I'm modelling a programming language/core-calculus in Agda, and I'm > wondering what people use to model binding and name capture? > I'm familiar with a few techniques in general, but I'm wondering if > specific ones works better in Agda, or have libraries to support them, > or at least good examples of code using them. > > My language has a lot of constructs, so the ideal for me is something > that either doesn't require me to implement substitution myself, or > where I can do it generically, so I'm not writing a ton of boiler plate. > > I'm aware of: > > * De Bruijn/ Locally Nameless: seems pretty solid, but requires > implementing substitution and other traversals myself, possibly twice. > * PHOAS: handles capturing and shadowing easily, but seems to be more > popular with Coq? Not sure how it scales modelling to things like type > rules and small-step semantics > * Shifted Names: looks promising, but I'm not sure how mature this idea > is http://tydeworkshop.org/2019-abstracts/paper16.pdf > > * Type/scope safe universes: I haven't fully grokked this one, but it's > got a lot of smart people behind it. > https://dl.acm.org/doi/10.1145/3236785 > > > What do you use? What do you like? What has tutorials / code examples / > libraries? > > Thanks! > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7C50713c043e464b79282008d7e672c7e5%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637231253744964311&sdata=m4Ub1bL51mkUuwYZw34omWWvhmRWiHcv9PfmXxc3kV8%3D&reserved=0 > From Thorsten.Altenkirch at nottingham.ac.uk Thu Apr 23 17:03:32 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 23 Apr 2020 15:03:32 +0000 Subject: [Agda] What do you use for variable binding in 2020? In-Reply-To: References: Message-ID: <870B55A9-B05A-4E1D-9CD8-5D8BE2C6D403@nottingham.ac.uk> There are several levels of abstraction when describing a language. We start with strings but soon realize that trees work better (actually many programmers never reach this point). But then to capture binding we can use scoped terms, that is we define Lam : Nat -> Set as var : Fin n -> Lam n lam : Lam (suc n) -> Lam n app : Lam n -> Lam n -> Lam n but actually we want to model typed terms, that is Lam : Con -> Ty -> Set with var : Var G A -> Lam G A lam : Lam G.A B -> Lam G (A => B) app : Lam G (A => B) -> Lam G A -> Lam G B where we used typed de Bruijn indizes: Var : Con -> Ty -> Set with zero : Var G.A A suc : Var G A -> Var G.B A the story continues when you want to model dependent types. We, Ambrus and I have written a paper about this: Type Theory in Type Theory using Quotient Inductive Types @inproceedings{10.1145/2837614.2837638, author = {Altenkirch, Thorsten and Kaposi, Ambrus}, title = {Type Theory in Type Theory Using Quotient Inductive Types}, year = {2016}, isbn = {9781450335492}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, url = {https://doi.org/10.1145/2837614.2837638}, doi = {10.1145/2837614.2837638}, booktitle = {Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages}, pages = {18?29}, numpages = {12}, keywords = {Higher Inductive Types, Metaprogramming, Agda, Logical Relations, Homotopy Type Theory}, location = {St. Petersburg, FL, USA}, series = {POPL ?16} } Thorsten From: Agda on behalf of Joey Eremondi Date: Wednesday, 22 April 2020 at 05:13 To: Agda mailing list Subject: [Agda] What do you use for variable binding in 2020? I'm modelling a programming language/core-calculus in Agda, and I'm wondering what people use to model binding and name capture? I'm familiar with a few techniques in general, but I'm wondering if specific ones works better in Agda, or have libraries to support them, or at least good examples of code using them. My language has a lot of constructs, so the ideal for me is something that either doesn't require me to implement substitution myself, or where I can do it generically, so I'm not writing a ton of boiler plate. I'm aware of: * De Bruijn/ Locally Nameless: seems pretty solid, but requires implementing substitution and other traversals myself, possibly twice. * PHOAS: handles capturing and shadowing easily, but seems to be more popular with Coq? Not sure how it scales modelling to things like type rules and small-step semantics * Shifted Names: looks promising, but I'm not sure how mature this idea is http://tydeworkshop.org/2019-abstracts/paper16.pdf * Type/scope safe universes: I haven't fully grokked this one, but it's got a lot of smart people behind it. https://dl.acm.org/doi/10.1145/3236785 What do you use? What do you like? What has tutorials / code examples / libraries? Thanks! This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nk480 at cl.cam.ac.uk Wed Apr 22 12:17:58 2020 From: nk480 at cl.cam.ac.uk (Neel Krishnaswami) Date: Wed, 22 Apr 2020 11:17:58 +0100 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> Message-ID: <9b8aef7b-8575-5f8e-7293-8da1c48ad4bc@cl.cam.ac.uk> Hello, Girard's work in this space is very interesting. From the point of view of proof theory, there are at least two sensible equality predicates -- the identity type of MLTT, and the Girard/Schroeder-Heister equality. It is the latter formulation which gives rise most naturally to pattern matching, and explains why the Coquand/McBride approach to dependent pattern matching seemed to require UIP/Axiom K -- it tried to use the G/SH elimination rule with the identity type, and since the two equalities are (ironically enough) different the fit was not perfect. However, while the G/SH equality is well-behaved from a proof theoretic basis, its semantics have never been well-understood, and Girard and his collaborators have discovered a bafflingly wide array of fascinating connections (cut-elimination in linear logic, to unification, and even to complexity theory). I don't remotely pretend to understand it all, but it is all On 21/04/2020 20:13, Martin Escardo wrote: > > > On 21/04/2020 14:24, mechvel at scico.botik.ru wrote: >> On 2020-04-21 15:54, Xuanrui Qi wrote: >>>> The result was that simple notions >>>> and proofs were reformulated in a complex way, and the proofs have >>>> become many times larger and many times more complex. >>> >>> I'm afraid many people on this list would not agree with this >>> statement. From what little I know about topos theory, many proofs can >>> be greatly simplified using topos theory. Ingo Blechschmidt, for >>> example, used topos theory to simplify many proofs in algebraic >>> geometry [1]. Ingo himself might be on this list, so I won't say too >>> much about his work. But this is a divergence. >> >> >> I just transfer the opinion of a certain expert in logic who is aware >> of the topos >> approach. He referred this way to a certain dissertation. This was in >> about 1995. > > One should avoid giving opinions about things one doesn't understand. > In particular, one should avoid transferring opinions. > > Toposes are very nice and elegant and useful and precisely explained > in the literature, so that if you want to understand them, you can. I > have used them and I will continue to do so. > > I am not sure about mustard watches, but then I am not an expert and > hence I refrain from giving an opinion. However, I do agree that the > abstract and the introduction of the given article in this thread > don't give enlightening explanations. And this is part of the reason I > am not an expert on this subject - whenever I try to have a go at it, > I don't get anywhere by reading the published work - perhaps you need > to be initiated in person to be able to grasp it - or perhaps I just > didn't get it and it is my fault, which I don't discard as a possibility. > > Best, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From jsiek at indiana.edu Thu Apr 23 22:10:22 2020 From: jsiek at indiana.edu (Siek, Jeremy) Date: Thu, 23 Apr 2020 20:10:22 +0000 Subject: [Agda] --rewriting and the Agda standard library Message-ID: <0BC1683F-92C3-472E-AA69-3E0B248E55C1@indiana.edu> >From a quick test run, it seems that --rewriting is incompatible with most if not all of the standard library. Is that correct? I was hoping to use --rewriting, but using the standard library is rather more important. Cheers, Jeremy __________________________________________ Jeremy G. Siek > Professor Luddy School of Informatics, Computing, and Engineering Indiana University Bloomington http://homes.soic.indiana.edu/jsiek/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Thu Apr 23 20:35:19 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 23 Apr 2020 20:35:19 +0200 Subject: [Agda] --rewriting and the Agda standard library In-Reply-To: <0BC1683F-92C3-472E-AA69-3E0B248E55C1@indiana.edu> References: <0BC1683F-92C3-472E-AA69-3E0B248E55C1@indiana.edu> Message-ID: Hi Jeremy, How exactly is --rewriting incompatible with the standard library? It's true that it does not use --rewriting, but you can always import a file that does not use --rewriting from one that does (the other way around is more problematic). -- Jesper On Thu, Apr 23, 2020 at 10:11 PM Siek, Jeremy wrote: > > From a quick test run, it seems that --rewriting is incompatible with most > if not > all of the standard library. Is that correct? I was hoping to use > --rewriting, > but using the standard library is rather more important. > > Cheers, > Jeremy > > __________________________________________ > Jeremy G. Siek > Professor > Luddy School of Informatics, Computing, and Engineering > Indiana University Bloomington > http://homes.soic.indiana.edu/jsiek/ > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiek at indiana.edu Thu Apr 23 22:48:01 2020 From: jsiek at indiana.edu (Siek, Jeremy) Date: Thu, 23 Apr 2020 20:48:01 +0000 Subject: [Agda] --rewriting and the Agda standard library In-Reply-To: References: <0BC1683F-92C3-472E-AA69-3E0B248E55C1@indiana.edu> Message-ID: <6DE2F985-ED54-4B21-A86A-735A406A7B3B@indiana.edu> Hi Jesper, I ran agda with the --rewriting flag, as in agda --rewriting Lambda.agda and got the following error: Checking examples.Lambda (/Users/jsiek/abstract-binding-trees/src/examples/Lambda.agda). Checking Syntax (/Users/jsiek/abstract-binding-trees/src/Syntax.agda). Checking Data.List (/usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/List.agda). Checking Data.List.Base (/usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/List/Base.agda). Checking Data.Bool.Base (/usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/Bool/Base.agda). Checking Data.Unit.Base (/usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/Unit/Base.agda). /usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/Bool/Base.agda:11,1-37 Cannot set OPTIONS pragma --rewriting with safe flag. when scope checking the declaration open import Data.Unit.Base using (?) But now I?m thinking I don't need to add the --rewriting flag at the command line. I can instead add {-# OPTIONS --rewriting #-} at the top of Lambda.agda and things seem to work. I originally thought I had to do both? I?m not sure what the distinction is between using the command line flag versus the # OPTIONS? does the command line flag apply --rewriting to all the files, whereas # OPTIONS only applies the - -rewriting flag to one file? Cheers, Jeremy On Apr 23, 2020, at 2:35 PM, Jesper Cockx > wrote: Hi Jeremy, How exactly is --rewriting incompatible with the standard library? It's true that it does not use --rewriting, but you can always import a file that does not use --rewriting from one that does (the other way around is more problematic). -- Jesper On Thu, Apr 23, 2020 at 10:11 PM Siek, Jeremy > wrote: From a quick test run, it seems that --rewriting is incompatible with most if not all of the standard library. Is that correct? I was hoping to use --rewriting, but using the standard library is rather more important. Cheers, Jeremy __________________________________________ Jeremy G. Siek > Professor Luddy School of Informatics, Computing, and Engineering Indiana University Bloomington http://homes.soic.indiana.edu/jsiek/ _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda __________________________________________ Jeremy G. Siek > Professor Luddy School of Informatics, Computing, and Engineering Indiana University Bloomington http://homes.soic.indiana.edu/jsiek/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Fri Apr 24 03:01:58 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Fri, 24 Apr 2020 09:01:58 +0800 Subject: [Agda] --rewriting and the Agda standard library In-Reply-To: <6DE2F985-ED54-4B21-A86A-735A406A7B3B@indiana.edu> References: <0BC1683F-92C3-472E-AA69-3E0B248E55C1@indiana.edu> <6DE2F985-ED54-4B21-A86A-735A406A7B3B@indiana.edu> Message-ID: Hi Jeremy, As the error message says, the `-- rewriting` flag is not compatible with the `--safe` flag, and (as one would hope!) the standard library uses `--safe` flag extensively. As you say, passing the flag via the command line applies it to all files, and therefore setting `--rewriting` in such a manner is not compatible with the standard library. In contrast, as the `-- rewriting` flag is neither infective nor co-infective , adding it via an OPTIONS pragma only applies it to that file. Cheers, Matthew On Fri, Apr 24, 2020 at 4:48 AM Siek, Jeremy wrote: > Hi Jesper, > > I ran agda with the --rewriting flag, as in > > agda --rewriting Lambda.agda > > and got the following error: > > Checking examples.Lambda > (/Users/jsiek/abstract-binding-trees/src/examples/Lambda.agda). > Checking Syntax (/Users/jsiek/abstract-binding-trees/src/Syntax.agda). > Checking Data.List > (/usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/List.agda). > Checking Data.List.Base > (/usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/List/Base.agda). > Checking Data.Bool.Base > (/usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/Bool/Base.agda). > Checking Data.Unit.Base > (/usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/Unit/Base.agda). > /usr/local/Cellar/agda/2.6.0.1_1/lib/agda/src/Data/Bool/Base.agda:11,1-37 > Cannot set OPTIONS pragma --rewriting with safe flag. > when scope checking the declaration > open import Data.Unit.Base using (?) > > But now I?m thinking I don't need to add the --rewriting flag at the > command line. > I can instead add > > {-# OPTIONS --rewriting #-} > > at the top of Lambda.agda and things seem to work. > > I originally thought I had to do both? I?m not sure what the distinction > is between > using the command line flag versus the # OPTIONS? does the command line > flag apply --rewriting to all the files, whereas # OPTIONS only applies > the - -rewriting flag to one file? > > Cheers, > Jeremy > > > On Apr 23, 2020, at 2:35 PM, Jesper Cockx wrote: > > Hi Jeremy, > > How exactly is --rewriting incompatible with the standard library? It's > true that it does not use --rewriting, but you can always import a file > that does not use --rewriting from one that does (the other way around is > more problematic). > > -- Jesper > > On Thu, Apr 23, 2020 at 10:11 PM Siek, Jeremy wrote: > >> >> From a quick test run, it seems that --rewriting is incompatible with >> most if not >> all of the standard library. Is that correct? I was hoping to use >> --rewriting, >> but using the standard library is rather more important. >> >> Cheers, >> Jeremy >> >> __________________________________________ >> Jeremy G. Siek >> Professor >> Luddy School of Informatics, Computing, and Engineering >> Indiana University Bloomington >> http://homes.soic.indiana.edu/jsiek/ >> >> >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > __________________________________________ > Jeremy G. Siek > Professor > Luddy School of Informatics, Computing, and Engineering > Indiana University Bloomington > http://homes.soic.indiana.edu/jsiek/ > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anders.mortberg at math.su.se Sat Apr 18 17:08:45 2020 From: anders.mortberg at math.su.se (Anders Mortberg) Date: Sat, 18 Apr 2020 17:08:45 +0200 Subject: [Agda] Online Agda meeting? In-Reply-To: References: Message-ID: I would also be interested in this. I could give a talk and lead a discussion about the future of Cubical Agda. I have some ideas for code sprints related to this as well. -- Anders On Sat, Apr 18, 2020 at 5:00 PM Georgi Lyubenov wrote: > > I would also love to participate. > > ======= > Georgi > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From andreas.nuyts at kuleuven.be Sat Apr 18 17:37:31 2020 From: andreas.nuyts at kuleuven.be (Andreas Nuyts) Date: Sat, 18 Apr 2020 17:37:31 +0200 Subject: [Agda] Introducing hypotheses In-Reply-To: <5D08F574-4173-482C-B79D-95A4BDA7A89D@free.fr> References: <29A55F10-52A0-4BA6-BC88-75B342E0DCC9@free.fr> <5D08F574-4173-482C-B79D-95A4BDA7A89D@free.fr> Message-ID: <980b9aae-8425-761f-9b9d-c7e6b48bdd1a@kuleuven.be> Dear Philippe, These Agda exercise sessions - mostly by Jesper Cockx - may be of interest to you: https://github.com/anuyts/agda-sessions To answer your question: tauto?=\ A B C g f a -> g a (f a) Best regards, Andreas On 18/04/2020 17:32, Philippe de Rochambeau wrote: > s/? which the user can then apply?? /? ?letting the use apply them??/ > >> Le 18 avr. 2020 ? 17:30, Philippe de Rochambeau > > a ?crit : >> >> >> Hello, >> >> I am attempting to translate a Coq proof into Agda, for learning >> purposes (cf. https://flint.cs.yale.edu/cs430/coq/pdf/Tutorial.pdf, >> p. 9): >> >> tauto?:?(A B C :Set)?(A ?B ?C)?(A ?B)?A ?C >> tauto?={ }0 >> >> Here?s how Coq introduces hypotheses, letting the use apply them. >> >> Coq < apply H?. >> 1 subgoal >> A : Prop >> B : Prop >> C : Prop >> H : A -> B -> C >> H? : A -> B >> HA : A >> ============================ >> A >> >> How do you do the same thing in Agda? >> >> Cheers, >> >> Philippe >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Fri Apr 24 08:26:45 2020 From: phiroc at free.fr (phiroc at free.fr) Date: Fri, 24 Apr 2020 08:26:45 +0200 (CEST) Subject: [Agda] Transcendental Syntax In-Reply-To: <1514231884.186297751.1587709567250.JavaMail.root@zimbra65-e11.priv.proxad.net> Message-ID: <1163763420.186301893.1587709605649.JavaMail.root@zimbra65-e11.priv.proxad.net> Hello, someone on the List suggested that I resend the hyperlinks to Girard's articles: - Transcendental syntax I: deterministic case (https://girard.perso.math.cnrs.fr/trsy1.pdf) - Transcendental syntax II: non-deterministic case (https://girard.perso.math.cnrs.fr/trsy2.pdf) - Transcendental syntax III: equality (https://girard.perso.math.cnrs.fr/trsy3.pdf) - Transcendental syntax IV: logic without system (https://girard.perso.math.cnrs.fr/trsy4.pdf) - The Mustard Watch Lampoon (https://girard.perso.math.cnrs.fr/mustard/article.html) Here are books and articles, which might also be of interest: - The Blind Spot (https://books.google.fr/books?id=eVZZ0wtazo8C&printsec=frontcover&dq=the+blind+spot+girard&hl=fr&sa=X&ved=0ahUKEwjpl_uiqYDpAhUFJBoKHQ43CIsQ6AEIKjAA#v=onepage&q=the%20blind%20spot%20girard&f=false) - The Blind Spot: https://blog.plover.com/math/logic/cut-rule.html - https://en.wikipedia.org/wiki/Linear_logic - http://www-philo.univ-paris1.fr/Joinet/NEW/PDF/PublicationsVersionOK/5-ok-aNewDeconstrLogic.pdf From nad at cse.gu.se Fri Apr 24 11:31:28 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 24 Apr 2020 11:31:28 +0200 Subject: [Agda] --rewriting and the Agda standard library In-Reply-To: References: <0BC1683F-92C3-472E-AA69-3E0B248E55C1@indiana.edu> <6DE2F985-ED54-4B21-A86A-735A406A7B3B@indiana.edu> Message-ID: <8801ade1-090a-ba41-c955-f2b6686bbff6@cse.gu.se> On 2020-04-24 03:01, Matthew Daggitt wrote: > the `-- rewriting` flag is neither infective nor co-infective Doesn't it make sense for this flag to be infective? Jesper stated that "the other way around is more problematic". I opened an issue for this (https://github.com/agda/agda/issues/4621). -- /NAD From Jesper at sikanda.be Fri Apr 24 11:40:50 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 24 Apr 2020 11:40:50 +0200 Subject: [Agda] --rewriting and the Agda standard library In-Reply-To: <8801ade1-090a-ba41-c955-f2b6686bbff6@cse.gu.se> References: <0BC1683F-92C3-472E-AA69-3E0B248E55C1@indiana.edu> <6DE2F985-ED54-4B21-A86A-735A406A7B3B@indiana.edu> <8801ade1-090a-ba41-c955-f2b6686bbff6@cse.gu.se> Message-ID: What I meant with "more problematic" is that it is possible to have expressions that are well-typed with --rewriting but ill-typed without, so if you import such a term from a file that uses --rewriting then you end up with an ill-typed term. So making --rewriting infective would probably be a good idea. -- Jesper On Fri, Apr 24, 2020 at 11:32 AM Nils Anders Danielsson wrote: > On 2020-04-24 03:01, Matthew Daggitt wrote: > > the `-- rewriting` flag is neither infective nor co-infective > > Doesn't it make sense for this flag to be infective? Jesper stated that > "the other way around is more problematic". I opened an issue for this > (https://github.com/agda/agda/issues/4621). > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Fri Apr 24 11:41:36 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 24 Apr 2020 11:41:36 +0200 Subject: [Agda] Nat Fuel vs Sized Types (and other Sized Type questions) In-Reply-To: References: Message-ID: <427e5fbd-f0db-8694-1aea-ffd732041b0e@cse.gu.se> On 2020-04-22 05:56, Joey Eremondi wrote: > I'm wondering if there are general guidelines as to when to use sized > types vs. just using natural numbers as fuel/index. Two data points: * I have found it practical to use sized coinductive types, together with explicit definitions of (strong or weak) bisimilarity. * I have found it less practical to use sized inductive types with /relevant/ size arguments together with propositional equality. -- /NAD From nad at cse.gu.se Fri Apr 24 13:05:25 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 24 Apr 2020 13:05:25 +0200 Subject: [Agda] Nat Fuel vs Sized Types (and other Sized Type questions) In-Reply-To: <34D498C0-EDFE-43A5-936B-03BC82E12AD2@cl.cam.ac.uk> References: <427e5fbd-f0db-8694-1aea-ffd732041b0e@cse.gu.se> <34D498C0-EDFE-43A5-936B-03BC82E12AD2@cl.cam.ac.uk> Message-ID: <26902760-9e4e-be30-4f54-79b55d45bd92@cse.gu.se> On 2020-04-24 12:21, Andrew M. Pitts wrote: > But our enthusiasm for sized types in Agda was severely dampened when > we learned later that in current versions they allow one to prove that > true equals false :-( I don't think anyone is working on fixing this. I think it would be great if someone could look into it. -- /NAD From nad at cse.gu.se Fri Apr 24 13:38:54 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 24 Apr 2020 13:38:54 +0200 Subject: [Agda] Agda Implementors' Meeting XXXII Message-ID: <9634b23d-cd5d-948b-fbc9-a07548048522@cse.gu.se> AIM XXXII takes place online from 2020-05-25 to 2020-06-05. See the wiki for details: https://wiki.portal.chalmers.se/agda/Main/AIMXXXII You can register by editing the wiki page. -- /NAD From jsiek at indiana.edu Fri Apr 24 13:44:07 2020 From: jsiek at indiana.edu (Siek, Jeremy) Date: Fri, 24 Apr 2020 11:44:07 +0000 Subject: [Agda] --rewriting and the Agda standard library In-Reply-To: References: <0BC1683F-92C3-472E-AA69-3E0B248E55C1@indiana.edu> <6DE2F985-ED54-4B21-A86A-735A406A7B3B@indiana.edu> Message-ID: <223225BF-4D80-49DF-8176-F457B3B18301@indiana.edu> On Apr 23, 2020, at 9:01 PM, Matthew Daggitt > wrote: Hi Jeremy, As the error message says, the `-- rewriting` flag is not compatible with the `--safe` flag, and (as one would hope!) the standard library uses `--safe` flag extensively. As you say, passing the flag via the command line applies it to all files, and therefore setting `--rewriting` in such a manner is not compatible with the standard library. In contrast, as the `-- rewriting` flag is neither infective nor co-infective, adding it via an OPTIONS pragma only applies it to that file. Very good, thank you! Cheers, Jeremy __________________________________________ Jeremy G. Siek > Professor Luddy School of Informatics, Computing, and Engineering Indiana University Bloomington http://homes.soic.indiana.edu/jsiek/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Fri Apr 24 15:04:35 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 24 Apr 2020 15:04:35 +0200 Subject: [Agda] =?utf-8?q?Strict_equality_=5F=E2=89=A3=5F_in_agda?= In-Reply-To: References: <950FC441-F729-4095-9ED7-F8CF4C398550@nottingham.ac.uk> Message-ID: <6ba64534-2989-3fa9-1188-ef9403b3f50f@ifi.lmu.de> > but what do I assume/not assume when using --cubical? That is a long story. One thing is that in --cubical, the identity type is a primitive (not a data), and you cannot match on refl. On 2020-04-21 14:32, Herminie Pagel wrote: > Thank you all for the answers! > > I agree with that old chinese wisdom, stacked dashes are a very good > visual metaphor. Even Apple is using it in their gestures! :) > > @Andreas As a side-effect, I have now a better understanding of the > meaning of those agda flags. I know that K postulates that x ? x has > exactly one element, but what do I assume/not assume when using --cubical? > > @Thorsten Is there a sequel to that paper? > > @Jesper Is your implementation available? Does it work with 2.6.1? I > could not find it in your github. > > I also found Paolo's presentation > > if someone is interested. > > Best, > > -- h > > Am Di., 21. Apr. 2020 um 10:55?Uhr schrieb Thorsten Altenkirch > >: > > I don?t think there is a standard definition of strict equality in > Agda.____ > > __ __ > > It is possible to have both weak and strict equality in Agda as > described in our paper____ > > Extending Homotopy Type Theory with Strict Equality > ____ > > At the last Agda meeting Jesper implemented some extension to the > universe mechanism which allows us to have a universe of pretypes > with strict equality and fibrant types with weak equality. ____ > > __ __ > > The syntax of equality in agda is a bit confusing. In writing I > would use = for the usual weak equality type and \equiv for either > judgemental or strict equality. However, in agda it is the other way > around, because traditionally = is used in definitions and it has > the advantage of being an ASCII character. ____ > > __ __ > > Thorsten____ > > __ __ > > *From: *Agda > on behalf of Herminie Pagel > > > *Date: *Tuesday, 21 April 2020 at 08:04 > *To: *Agda mailing list > > *Subject: *[Agda] Strict equality _?_ in agda____ > > __ __ > > Hi,____ > > Is there a standard interpretation of the strict equality _?_ (latex > \===) in agda similar to the standard interpretation of _?_? as the > identity type former?____ > > __ __ > > best,____ > > __ __ > > -- h____ > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From andreas.abel at ifi.lmu.de Fri Apr 24 15:11:56 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 24 Apr 2020 15:11:56 +0200 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> Message-ID: <2fa6845c-7025-904c-35d6-f3deff45fbd5@ifi.lmu.de> Well Girard is a genius, and myriades of researchers have tried to understand his ideas (e.g. the whole Geometry of Interaction community). Understanding Girard's papers is not any easier that reading medieval treatises on alchemy: The uninitiated ones (like us) need an interpreter. On 2020-04-21 22:06, Philippe de Rochambeau wrote: > Hi all, > > this discussion has been going round in loops for the past two days > about about a very tiny part of Girard?s Logique 2.0 article: the > abstract and the first paragraph of a 27-page article. We?ve talked > about snakes, and mustard watches, and a bit about topos theory, ?mostly > based on the superficial interpretation of the article?s ??cover?? , to > paraphrase an old English saying. Then Xuanrui cried out: ? give Girard > a chance!??, just like the child in Andersen?s tale. > > I?m not a specialist in anything, and even less a school-master giving > lectures, but I believe that it's worth reading at least one of Girard?s > articles (in English) in your lifetime, even if you only understand 20% > of it, especially if you are interested in logic and programming. > > Furthermore, if Abadi and Hindley and probably many other researchers > worldwide, have quoted him over the past decades, this guy?s must have > interesting things to say. > > https://girard.perso.math.cnrs.fr/Accueil.html > > Cheers and no bad feelings, > > Philippe > > PS if you read the article about Mustard Clocks, which is available on > his Homepage, please don?t interpret it at first degree :-) > > >> Le 21 avr. 2020 ? 21:13, Martin Escardo > > a ?crit : >> >> >> >> On 21/04/2020 14:24,mechvel at scico.botik.ru >> wrote: >>> On 2020-04-21 15:54, Xuanrui Qi wrote: >>>>> The result was that simple notions >>>>> and proofs were reformulated in a complex way, and the proofs have >>>>> become many times larger and many times more complex. >>>> >>>> I'm afraid many people on this list would not agree with this >>>> statement. From what little I know about topos theory, many proofs can >>>> be greatly simplified using topos theory. Ingo Blechschmidt, for >>>> example, used topos theory to simplify many proofs in algebraic >>>> geometry [1]. Ingo himself might be on this list, so I won't say too >>>> much about his work. But this is a divergence. >>> I just transfer the opinion of a certain expert in logic who is aware >>> of the topos >>> approach. He referred this way to a certain dissertation. This was in >>> about 1995. >> >> One should avoid giving opinions about things one doesn't understand. >> In particular, one should avoid transferring opinions. >> >> Toposes are very nice and elegant and useful and precisely explained >> in the literature, so that if you want to understand them, you can. I >> have used them and I will continue to do so. >> >> I am not sure about mustard watches, but then I am not an expert and >> hence I refrain from giving an opinion. However, I do agree that the >> abstract and the introduction of the given article in this thread >> don't give enlightening explanations. And this is part of the reason I >> am not an expert on this subject - whenever I try to have a go at it, >> I don't get anywhere by reading the published work - perhaps you need >> to be initiated in person to be able to grasp it - or perhaps I just >> didn't get it and it is my fault, which I don't discard as a possibility. >> >> Best, >> Martin >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From andreas.abel at ifi.lmu.de Fri Apr 24 15:21:19 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 24 Apr 2020 15:21:19 +0200 Subject: [Agda] Nat Fuel vs Sized Types (and other Sized Type questions) In-Reply-To: References: Message-ID: <2302dca7-a93e-31b3-c3d6-4c6d0c7fa6bb@ifi.lmu.de> > * Is there a general guideline for when to use sizes vs nats? Do sized > types give us anything Nats don't, other than having a solver, ? and > some implicit niceness? Or do they make the type theory strictly more > powerful? Sizes stand for ordinals in general, not just natural numbers. You can use them with infinitely branching types, like W or Acc. > * How does unification work with sizes? Why do the above unifications > fail? Is ? not injective? No, this does not work. > * How does the subtyping work with sizes? Is T i < T (i ?? j)? > Or (T i) < (T j) when i : Size< j? Or do I need to write manual > "size-lifting" functions? In theory, you should get both T i <= T (i ?? j) and T i <= T j. > * Does --without-K or --cubical interact with sized types in a weird way? I wouldn't think so. > * Is there a general way to write a fixed-point combinator in with sized > types? Something like: > mu : (A : Size -> Set) -> ( (i : Size) -> A i -> A (? i) ) -> (j : > Size) -> A j No. A definition like mu A F (? i) = F i (mu A F i) would be non-terminating, since we do not match (or block) on sizes. > * Likewise, is there any way to write a sized-version of a type-fixed > point combinator (Mu : (Set -> Set) -> Set) No: Mu F i = Sigma (Size< i) \ { j -> Mu F j } would suffer from the same problem (non-termination). On 2020-04-22 05:56, Joey Eremondi wrote: > I'm wondering if there are general guidelines as to when to use sized > types vs. just using natural numbers as fuel/index. > > ** My Problem ** > I've tried adding sized types to a proof I'm working on to establish an > explicit termination argument. However, in case splits I'm getting stuck > on unification problems like this. > ? sz ? ? sz' > or ? sz ?? sz' > > ** My Questions ** > > * Is there a general guideline for when to use sizes vs nats? Do sized > types give us anything Nats don't, other than having a solver, ? and > some implicit niceness? Or do they make the type theory strictly more > powerful? > > * How does unification work with sizes? Why do the above unifications > fail? Is ? not injective? > > * How does the subtyping work with sizes? Is T i < T (i ?? j)? > Or (T i) < (T j) when i : Size< j? Or do I need to write manual > "size-lifting" functions? > > * Does --without-K or --cubical interact with sized types in a weird way? > > * Is there a general way to write a fixed-point combinator in with sized > types? Something like: > ? mu : (A : Size -> Set) -> ( (i : Size) -> A i -> A (? i) ) -> (j : > Size) -> A j > > * Likewise, is there any way to write a sized-version of a type-fixed > point combinator (Mu : (Set -> Set) -> Set) > > Thanks! > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From phiroc at free.fr Fri Apr 24 15:22:03 2020 From: phiroc at free.fr (phiroc at free.fr) Date: Fri, 24 Apr 2020 15:22:03 +0200 (CEST) Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <2fa6845c-7025-904c-35d6-f3deff45fbd5@ifi.lmu.de> Message-ID: <2130617146.187958127.1587734523309.JavaMail.root@zimbra65-e11.priv.proxad.net> lol ----- Mail original ----- De: "Andreas Abel" ?: "Philippe de Rochambeau" , "Martin Escardo" Cc: "Agda" Envoy?: Vendredi 24 Avril 2020 15:11:56 Objet: Re: [Agda] An article by Jean-Yves Girard Well Girard is a genius, and myriades of researchers have tried to understand his ideas (e.g. the whole Geometry of Interaction community). Understanding Girard's papers is not any easier that reading medieval treatises on alchemy: The uninitiated ones (like us) need an interpreter. On 2020-04-21 22:06, Philippe de Rochambeau wrote: > Hi all, > > this discussion has been going round in loops for the past two days > about about a very tiny part of Girard?s Logique 2.0 article: the > abstract and the first paragraph of a 27-page article. We?ve talked > about snakes, and mustard watches, and a bit about topos theory, ?mostly > based on the superficial interpretation of the article?s ??cover?? , to > paraphrase an old English saying. Then Xuanrui cried out: ? give Girard > a chance!??, just like the child in Andersen?s tale. > > I?m not a specialist in anything, and even less a school-master giving > lectures, but I believe that it's worth reading at least one of Girard?s > articles (in English) in your lifetime, even if you only understand 20% > of it, especially if you are interested in logic and programming. > > Furthermore, if Abadi and Hindley and probably many other researchers > worldwide, have quoted him over the past decades, this guy?s must have > interesting things to say. > > https://girard.perso.math.cnrs.fr/Accueil.html > > Cheers and no bad feelings, > > Philippe > > PS if you read the article about Mustard Clocks, which is available on > his Homepage, please don?t interpret it at first degree :-) > > >> Le 21 avr. 2020 ? 21:13, Martin Escardo > > a ?crit : >> >> >> >> On 21/04/2020 14:24,mechvel at scico.botik.ru >> wrote: >>> On 2020-04-21 15:54, Xuanrui Qi wrote: >>>>> The result was that simple notions >>>>> and proofs were reformulated in a complex way, and the proofs have >>>>> become many times larger and many times more complex. >>>> >>>> I'm afraid many people on this list would not agree with this >>>> statement. From what little I know about topos theory, many proofs can >>>> be greatly simplified using topos theory. Ingo Blechschmidt, for >>>> example, used topos theory to simplify many proofs in algebraic >>>> geometry [1]. Ingo himself might be on this list, so I won't say too >>>> much about his work. But this is a divergence. >>> I just transfer the opinion of a certain expert in logic who is aware >>> of the topos >>> approach. He referred this way to a certain dissertation. This was in >>> about 1995. >> >> One should avoid giving opinions about things one doesn't understand. >> In particular, one should avoid transferring opinions. >> >> Toposes are very nice and elegant and useful and precisely explained >> in the literature, so that if you want to understand them, you can. I >> have used them and I will continue to do so. >> >> I am not sure about mustard watches, but then I am not an expert and >> hence I refrain from giving an opinion. However, I do agree that the >> abstract and the introduction of the given article in this thread >> don't give enlightening explanations. And this is part of the reason I >> am not an expert on this subject - whenever I try to have a go at it, >> I don't get anywhere by reading the published work - perhaps you need >> to be initiated in person to be able to grasp it - or perhaps I just >> didn't get it and it is my fault, which I don't discard as a possibility. >> >> Best, >> Martin >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From hancock at fastmail.fm Fri Apr 24 15:25:15 2020 From: hancock at fastmail.fm (Peter Hancock) Date: Fri, 24 Apr 2020 14:25:15 +0100 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <2fa6845c-7025-904c-35d6-f3deff45fbd5@ifi.lmu.de> References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> <2fa6845c-7025-904c-35d6-f3deff45fbd5@ifi.lmu.de> Message-ID: <96d5dbe2-29cf-a4cc-bbcd-53d94f47a810@fastmail.fm> On 24/04/2020 14:11, Andreas Abel wrote: > Well Girard is a genius, and myriades of researchers have tried to > understand his ideas (e.g. the whole Geometry of Interaction > community). > > Understanding Girard's papers is not any easier that reading medieval > treatises on alchemy: The uninitiated ones (like us) need an > interpreter. Maybe more importantly than being a mere genius, Girard is an extraordinary wit, even when he writes in English. (Beats Conor into a cocked hat.) To understand his papers you only need to hold them in mind for about 3 decades. Hank From andreas.abel at ifi.lmu.de Fri Apr 24 15:35:34 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 24 Apr 2020 15:35:34 +0200 Subject: [Agda] An article by Jean-Yves Girard In-Reply-To: <96d5dbe2-29cf-a4cc-bbcd-53d94f47a810@fastmail.fm> References: <540DF8E9-18F1-4527-81C1-B127A381E661@free.fr> <96cd05b6ae7ddc73166e174cfc81a064@scico.botik.ru> <55bcc431b8b0e95acdb11cb752f3fd50479065fe.camel@nagoya-u.jp> <2991e6e8487d86ad15d53ea49129e51a@scico.botik.ru> <2fa6845c-7025-904c-35d6-f3deff45fbd5@ifi.lmu.de> <96d5dbe2-29cf-a4cc-bbcd-53d94f47a810@fastmail.fm> Message-ID: > To understand his papers you only need to hold them in mind for about 3 decades. Haha, well said! :D On 2020-04-24 15:25, Peter Hancock wrote: > On 24/04/2020 14:11, Andreas Abel wrote: >> Well Girard is a genius, and myriades of researchers have tried to >> understand his ideas (e.g. the whole Geometry of Interaction >> community). >> >> Understanding Girard's papers is not any easier that reading medieval >> treatises on alchemy: The uninitiated ones (like us) need an >> interpreter. > > Maybe more importantly than being a mere genius, Girard is an extraordinary wit, > even when he writes in English. (Beats Conor into a cocked hat.) > > To understand his papers you only need to hold them in mind for about 3 decades. > > Hank > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From andreas.abel at ifi.lmu.de Fri Apr 24 16:04:37 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Fri, 24 Apr 2020 16:04:37 +0200 Subject: [Agda] What do you use for variable binding in 2020? In-Reply-To: References: Message-ID: <1d89c0e6-4907-d3d0-b96e-ebab1ab3eefb@ifi.lmu.de> De Bruijn indices. > * Type/scope safe universes: I haven't fully grokked this one, but it's > got a lot of smart people behind it. This paper is a systematization of de Bruijn indices. (If I understand it correctly.) On 2020-04-22 06:07, Joey Eremondi wrote: > I'm modelling a programming language/core-calculus in Agda, and I'm > wondering what people use to model binding and name capture? > I'm familiar with a few techniques in general, but I'm wondering if > specific ones works better in Agda, or have libraries to support them, > or at least good examples of code using them. > > My language has a lot of constructs, so the ideal for me is something > that either doesn't require me to implement substitution myself, or > where I can do it generically, so I'm not writing a ton of boiler plate. > > I'm aware of: > > * De Bruijn/ Locally Nameless: seems pretty solid, but requires > implementing substitution and other traversals myself, possibly twice. > * PHOAS: handles capturing and shadowing easily, but seems to be more > popular with Coq? Not sure how it scales modelling to things like type > rules and small-step semantics > * Shifted Names: looks promising, but I'm not sure how mature this idea > is http://tydeworkshop.org/2019-abstracts/paper16.pdf > * Type/scope safe universes: I haven't fully grokked this one, but it's > got a lot of smart people behind it. https://dl.acm.org/doi/10.1145/3236785 > > What do you use? What do you like? What has tutorials / code examples / > libraries? > > Thanks! > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From fdhzs2010 at hotmail.com Fri Apr 24 16:11:43 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Fri, 24 Apr 2020 14:11:43 +0000 Subject: [Agda] What do you use for variable binding in 2020? In-Reply-To: <1d89c0e6-4907-d3d0-b96e-ebab1ab3eefb@ifi.lmu.de> References: , <1d89c0e6-4907-d3d0-b96e-ebab1ab3eefb@ifi.lmu.de> Message-ID: many formalization boils down to de Bruijn indices I think. locally nameless representation is quite different but it could be very counter intuitive. for example, we might consider a derivation is a tree the height of which can be measured by natural number but locally nameless representation might break this assumption. Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Andreas Abel Sent: April 24, 2020 10:04 AM To: Joey Eremondi ; Agda mailing list Subject: Re: [Agda] What do you use for variable binding in 2020? De Bruijn indices. > * Type/scope safe universes: I haven't fully grokked this one, but it's > got a lot of smart people behind it. This paper is a systematization of de Bruijn indices. (If I understand it correctly.) On 2020-04-22 06:07, Joey Eremondi wrote: > I'm modelling a programming language/core-calculus in Agda, and I'm > wondering what people use to model binding and name capture? > I'm familiar with a few techniques in general, but I'm wondering if > specific ones works better in Agda, or have libraries to support them, > or at least good examples of code using them. > > My language has a lot of constructs, so the ideal for me is something > that either doesn't require me to implement substitution myself, or > where I can do it generically, so I'm not writing a ton of boiler plate. > > I'm aware of: > > * De Bruijn/ Locally Nameless: seems pretty solid, but requires > implementing substitution and other traversals myself, possibly twice. > * PHOAS: handles capturing and shadowing easily, but seems to be more > popular with Coq? Not sure how it scales modelling to things like type > rules and small-step semantics > * Shifted Names: looks promising, but I'm not sure how mature this idea > is http://tydeworkshop.org/2019-abstracts/paper16.pdf > * Type/scope safe universes: I haven't fully grokked this one, but it's > got a lot of smart people behind it. https://dl.acm.org/doi/10.1145/3236785 > > What do you use? What do you like? What has tutorials / code examples / > libraries? > > Thanks! > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From joey.eremondi at gmail.com Fri Apr 24 19:10:04 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Fri, 24 Apr 2020 10:10:04 -0700 Subject: [Agda] Nat Fuel vs Sized Types (and other Sized Type questions) In-Reply-To: <34D498C0-EDFE-43A5-936B-03BC82E12AD2@cl.cam.ac.uk> References: <427e5fbd-f0db-8694-1aea-ffd732041b0e@cse.gu.se> <34D498C0-EDFE-43A5-936B-03BC82E12AD2@cl.cam.ac.uk> Message-ID: > > But our enthusiasm for sized types in Agda was severely dampened when we > learned later that in current versions they allow one to prove that true > equals false :-( ? see . Oh... well that definitely ruins what I was trying to do. Does --sized make Agda inconsistent even with --safe enabled? Looks like I'll have to either use Nat fuel or guardedness-based coinduction. Thanks! On Fri, Apr 24, 2020 at 3:21 AM Andrew M. Pitts wrote: > > > > On 24 Apr 2020, at 10:41, Nils Anders Danielsson wrote: > > > > On 2020-04-22 05:56, Joey Eremondi wrote: > >> I'm wondering if there are general guidelines as to when to use sized > >> types vs. just using natural numbers as fuel/index. > > > > Two data points: > > > > * I have found it practical to use sized coinductive types, together > > with explicit definitions of (strong or weak) bisimilarity. > > > > * I have found it less practical to use sized inductive types with > > /relevant/ size arguments together with propositional equality. > > I and my co-authors can?t seem to do without sized inductive types in the > recent paper > > But our enthusiasm for sized types in Agda was severely dampened when we > learned later that in current versions they allow one to prove that true > equals false :-( ? see . > > Andy Pitts > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiek at indiana.edu Fri Apr 24 20:50:29 2020 From: jsiek at indiana.edu (Siek, Jeremy) Date: Fri, 24 Apr 2020 18:50:29 +0000 Subject: [Agda] What do you use for variable binding in 2020? In-Reply-To: References: Message-ID: <9E2A1BE4-2522-4F08-B739-DE0BEDEFEE37@indiana.edu> Hi Joey, These days I?m using de Bruijn but in the style of PLFA and I?m relatively happy with it. However, if you need any non-trivial lemmas about substitution (such as commutativity of substitution), then it might be worth your while to use my library to define your abstract syntax trees and substitution functions: https://github.com/jsiek/abstract-binding-trees (I note that there are more sophisticated libraries for this kind of thing, but I?ve found it difficult to understand the other ones.) Cheers, Jeremy On Apr 22, 2020, at 12:07 AM, Joey Eremondi > wrote: I'm modelling a programming language/core-calculus in Agda, and I'm wondering what people use to model binding and name capture? I'm familiar with a few techniques in general, but I'm wondering if specific ones works better in Agda, or have libraries to support them, or at least good examples of code using them. My language has a lot of constructs, so the ideal for me is something that either doesn't require me to implement substitution myself, or where I can do it generically, so I'm not writing a ton of boiler plate. I'm aware of: * De Bruijn/ Locally Nameless: seems pretty solid, but requires implementing substitution and other traversals myself, possibly twice. * PHOAS: handles capturing and shadowing easily, but seems to be more popular with Coq? Not sure how it scales modelling to things like type rules and small-step semantics * Shifted Names: looks promising, but I'm not sure how mature this idea is http://tydeworkshop.org/2019-abstracts/paper16.pdf * Type/scope safe universes: I haven't fully grokked this one, but it's got a lot of smart people behind it. https://dl.acm.org/doi/10.1145/3236785 What do you use? What do you like? What has tutorials / code examples / libraries? Thanks! _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda __________________________________________ Jeremy G. Siek > Professor Luddy School of Informatics, Computing, and Engineering Indiana University Bloomington http://homes.soic.indiana.edu/jsiek/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Fri Apr 24 21:21:10 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 24 Apr 2020 22:21:10 +0300 Subject: [Agda] a strange function type report Message-ID: <87c7c7795a943267933de6ee96d53e81@scico.botik.ru> Please, what is wrong in the attached program? In one module it is declared Prime?split : Set _ Prime?split = {p a b : Carrier} ? IsPrime p ? p ? (a * b) ? p ? a ? p ? b and in the last module it is implemented test : (p x y : Carrier) ? IsPrime p ? p ? (x * y) ? (p ? x) ? (p ? y) test p x y p-prime p?xy = Prime?split p-prime p?xy And Agda 2.6.1 reports " Set (? ? ?=) should be a function type, but it isn't when checking that p-prime p?xy are valid arguments to a function of type Set (? ? ?=) ". Am I missing something, or it is a bug in the type checker? Regards, ------ Sergei -------------- next part -------------- A non-text attachment was scrubbed... Name: Test.agda Type: text/x-pascal Size: 2902 bytes Desc: not available URL: From mechvel at scico.botik.ru Fri Apr 24 21:40:46 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 24 Apr 2020 22:40:46 +0300 Subject: [Agda] a strange function type report In-Reply-To: <87c7c7795a943267933de6ee96d53e81@scico.botik.ru> References: <87c7c7795a943267933de6ee96d53e81@scico.botik.ru> Message-ID: <874decdcb6f8edb26493d93d63b2bc63@scico.botik.ru> Sorry, here is attached a much smaller program, which is also zipped. The effect is the same as reported below. On 2020-04-24 22:21, mechvel at scico.botik.ru wrote: > Please, what is wrong in the attached program? > > In one module it is declared > > Prime?split : Set _ > Prime?split = {p a b : Carrier} ? IsPrime p ? p ? (a * b) ? p ? a ? > p ? b > > and in the last module it is implemented > > test : (p x y : Carrier) ? IsPrime p ? p ? (x * y) ? (p ? x) ? (p ? > y) > test p x y p-prime p?xy = Prime?split p-prime p?xy > > And Agda 2.6.1 reports > " > Set (? ? ?=) should be a function type, but it isn't > when checking that p-prime p?xy are valid arguments to a function > of type Set (? ? ?=) > ". > > Am I missing something, or it is a bug in the type checker? > > Regards, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- A non-text attachment was scrubbed... Name: Test.agda.zip Type: application/zip Size: 738 bytes Desc: not available URL: From james.wood.100 at strath.ac.uk Fri Apr 24 21:45:19 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Fri, 24 Apr 2020 20:45:19 +0100 Subject: [Agda] a strange function type report In-Reply-To: <874decdcb6f8edb26493d93d63b2bc63@scico.botik.ru> References: <87c7c7795a943267933de6ee96d53e81@scico.botik.ru> <874decdcb6f8edb26493d93d63b2bc63@scico.botik.ru> Message-ID: <2f4bbeb7-e129-74c9-33f9-e1bab1261d59@strath.ac.uk> Hi Sergei, Did you mean to be applying an inhabitant of `Prime?split`, rather than `Prime?split` itself? Regards, James On 24/04/2020 20:40, mechvel at scico.botik.ru wrote: > Sorry, here is attached a much smaller program, which is also zipped. > The effect is the same as reported below. > > > On 2020-04-24 22:21, mechvel at scico.botik.ru wrote: >> Please, what is wrong in the attached program? >> >> In one module it is declared >> >> ? Prime?split :? Set _ >> ? Prime?split =? {p a b : Carrier} ? IsPrime p ? p ? (a * b) ? p ? a ? >> p ? b >> >> and in the last module it is implemented >> >> ? test : (p x y : Carrier) ? IsPrime p ? p ? (x * y) ? (p ? x) ? (p ? y) >> ? test p x y p-prime p?xy =? Prime?split p-prime p?xy >> >> And Agda 2.6.1 reports >> " >> Set (? ? ?=) should be a function type, but it isn't >> when checking that p-prime p?xy are valid arguments to a function >> of type Set (? ? ?=) >> ". >> >> Am I missing something, or it is a bug in the type checker? >> >> Regards, >> >> ------ >> Sergei >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7Cbc903f36811643fd532e08d7e887666a%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637233540559994693&sdata=fzNryLByr7XfEZCiJHSrkwc0VwfXBhEge%2BC3LubM8hc%3D&reserved=0 >> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7Cbc903f36811643fd532e08d7e887666a%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637233540560014680&sdata=0SM60Mz%2BNl2YfhbWyYWOvT7Va%2FRhES1yah6mGe2yOtU%3D&reserved=0 > From mechvel at scico.botik.ru Fri Apr 24 21:53:48 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 24 Apr 2020 22:53:48 +0300 Subject: [Agda] a strange function type report In-Reply-To: <2f4bbeb7-e129-74c9-33f9-e1bab1261d59@strath.ac.uk> References: <87c7c7795a943267933de6ee96d53e81@scico.botik.ru> <874decdcb6f8edb26493d93d63b2bc63@scico.botik.ru> <2f4bbeb7-e129-74c9-33f9-e1bab1261d59@strath.ac.uk> Message-ID: I am sorry, I have got confused. Prime?split is only a property. In in the last module I apply it as a lemma proof. Please, withdraw my question. ------ Sergei On 2020-04-24 22:45, James Wood wrote: > Hi Sergei, > > Did you mean to be applying an inhabitant of `Prime?split`, rather than > `Prime?split` itself? > > Regards, > James > > On 24/04/2020 20:40, mechvel at scico.botik.ru wrote: >> Sorry, here is attached a much smaller program, which is also zipped. >> The effect is the same as reported below. >> >> >> On 2020-04-24 22:21, mechvel at scico.botik.ru wrote: >>> Please, what is wrong in the attached program? >>> >>> In one module it is declared >>> >>> ? Prime?split :? Set _ >>> ? Prime?split =? {p a b : Carrier} ? IsPrime p ? p ? (a * b) ? p ? a >>> ? >>> p ? b >>> >>> and in the last module it is implemented >>> >>> ? test : (p x y : Carrier) ? IsPrime p ? p ? (x * y) ? (p ? x) ? (p ? >>> y) >>> ? test p x y p-prime p?xy =? Prime?split p-prime p?xy >>> >>> And Agda 2.6.1 reports >>> " >>> Set (? ? ?=) should be a function type, but it isn't >>> when checking that p-prime p?xy are valid arguments to a function >>> of type Set (? ? ?=) >>> ". >>> >>> Am I missing something, or it is a bug in the type checker? >>> >>> Regards, >>> >>> ------ >>> Sergei >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7Cbc903f36811643fd532e08d7e887666a%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637233540559994693&sdata=fzNryLByr7XfEZCiJHSrkwc0VwfXBhEge%2BC3LubM8hc%3D&reserved=0 >>> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7Cbc903f36811643fd532e08d7e887666a%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637233540560014680&sdata=0SM60Mz%2BNl2YfhbWyYWOvT7Va%2FRhES1yah6mGe2yOtU%3D&reserved=0 >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From amp12 at cam.ac.uk Fri Apr 24 12:21:55 2020 From: amp12 at cam.ac.uk (Andrew M. Pitts) Date: Fri, 24 Apr 2020 10:21:55 +0000 Subject: [Agda] Nat Fuel vs Sized Types (and other Sized Type questions) In-Reply-To: <427e5fbd-f0db-8694-1aea-ffd732041b0e@cse.gu.se> References: <427e5fbd-f0db-8694-1aea-ffd732041b0e@cse.gu.se> Message-ID: <34D498C0-EDFE-43A5-936B-03BC82E12AD2@cl.cam.ac.uk> > On 24 Apr 2020, at 10:41, Nils Anders Danielsson wrote: > > On 2020-04-22 05:56, Joey Eremondi wrote: >> I'm wondering if there are general guidelines as to when to use sized >> types vs. just using natural numbers as fuel/index. > > Two data points: > > * I have found it practical to use sized coinductive types, together > with explicit definitions of (strong or weak) bisimilarity. > > * I have found it less practical to use sized inductive types with > /relevant/ size arguments together with propositional equality. I and my co-authors can?t seem to do without sized inductive types in the recent paper But our enthusiasm for sized types in Agda was severely dampened when we learned later that in current versions they allow one to prove that true equals false :-( ? see . Andy Pitts From amp12 at cam.ac.uk Fri Apr 24 21:24:28 2020 From: amp12 at cam.ac.uk (Andrew M. Pitts) Date: Fri, 24 Apr 2020 19:24:28 +0000 Subject: [Agda] Nat Fuel vs Sized Types (and other Sized Type questions) In-Reply-To: References: <427e5fbd-f0db-8694-1aea-ffd732041b0e@cse.gu.se> <34D498C0-EDFE-43A5-936B-03BC82E12AD2@cl.cam.ac.uk> Message-ID: <0AC915BB-5912-4314-AD1D-06869920A794@cl.cam.ac.uk> > On 24 Apr 2020, at 18:10, Joey Eremondi wrote: > > But our enthusiasm for sized types in Agda was severely dampened when we learned later that in current versions they allow one to prove that true equals false :-( ? see . > > Oh... well that definitely ruins what I was trying to do. Does --sized make Agda inconsistent even with --safe enabled? Yes (see attached, for example). Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: size-bug.agda Type: application/octet-stream Size: 1556 bytes Desc: size-bug.agda URL: From jakob at von-raumer.de Sun Apr 26 22:22:42 2020 From: jakob at von-raumer.de (Jakob von Raumer) Date: Sun, 26 Apr 2020 22:22:42 +0200 Subject: [Agda] Light grey background? Message-ID: <1e0facf9-2cc5-add7-4444-e37104c5f1c6@von-raumer.de> Hi all, what does light grey background shading mean again? It's a bit awkward to have to be googline something like this... Cheers Jakob From andreas.nuyts at kuleuven.be Sun Apr 26 22:34:49 2020 From: andreas.nuyts at kuleuven.be (Andreas Nuyts) Date: Sun, 26 Apr 2020 22:34:49 +0200 Subject: [Agda] Light grey background? In-Reply-To: <1e0facf9-2cc5-add7-4444-e37104c5f1c6@von-raumer.de> References: <1e0facf9-2cc5-add7-4444-e37104c5f1c6@von-raumer.de> Message-ID: Dear Jakob, I would refer you to the agda docs, https://agda.readthedocs.io but surprisingly these have no entry on pattern matching. While we're waiting for someone to give a more thorough answer: a case in a pattern matching definition gets a light grey background when it doesn't hold as a definitional equation, typically because it is a fallthrough case and further matching of the arguments is necessary to establish that none of the prior cases apply. Best, Andreas On 26/04/2020 22:22, Jakob von Raumer wrote: > Hi all, > > what does light grey background shading mean again? It's a bit awkward > to have to be googline something like this... > > Cheers > > Jakob > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Jesper at sikanda.be Sun Apr 26 22:36:55 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Sun, 26 Apr 2020 22:36:55 +0200 Subject: [Agda] Light grey background? In-Reply-To: References: <1e0facf9-2cc5-add7-4444-e37104c5f1c6@von-raumer.de> Message-ID: Hi Jakob and Andreas, It is explained in the page on function definitions, specifically in the section on case trees ( https://agda.readthedocs.io/en/v2.6.1/language/function-definitions.html#case-trees ): > Clauses which do not hold definitionally are usually (but not always) the > result of writing clauses by hand instead of using Agda?s case split > tactic. These clauses are highlighted > > by Emacs. > -- Jesper On Sun, Apr 26, 2020 at 10:35 PM Andreas Nuyts wrote: > Dear Jakob, > > I would refer you to the agda docs, > https://agda.readthedocs.io > but surprisingly these have no entry on pattern matching. > While we're waiting for someone to give a more thorough answer: a case > in a pattern matching definition gets a light grey background when it > doesn't hold as a definitional equation, typically because it is a > fallthrough case and further matching of the arguments is necessary to > establish that none of the prior cases apply. > > Best, > Andreas > > On 26/04/2020 22:22, Jakob von Raumer wrote: > > Hi all, > > > > what does light grey background shading mean again? It's a bit awkward > > to have to be googline something like this... > > > > Cheers > > > > Jakob > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wadler at inf.ed.ac.uk Mon Apr 27 01:01:24 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Sun, 26 Apr 2020 20:01:24 -0300 Subject: [Agda] Light grey background? In-Reply-To: References: <1e0facf9-2cc5-add7-4444-e37104c5f1c6@von-raumer.de> Message-ID: You can find an explanation of grey backgrounds here: https://plfa.github.io/Decidable/#logical-connectives Go well, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Sun, 26 Apr 2020 at 17:37, Jesper Cockx wrote: > Hi Jakob and Andreas, > > It is explained in the page on function definitions, specifically in the > section on case trees ( > https://agda.readthedocs.io/en/v2.6.1/language/function-definitions.html#case-trees > ): > >> Clauses which do not hold definitionally are usually (but not always) the >> result of writing clauses by hand instead of using Agda?s case split >> tactic. These clauses are highlighted >> >> by Emacs. >> > -- Jesper > > On Sun, Apr 26, 2020 at 10:35 PM Andreas Nuyts > wrote: > >> Dear Jakob, >> >> I would refer you to the agda docs, >> https://agda.readthedocs.io >> but surprisingly these have no entry on pattern matching. >> While we're waiting for someone to give a more thorough answer: a case >> in a pattern matching definition gets a light grey background when it >> doesn't hold as a definitional equation, typically because it is a >> fallthrough case and further matching of the arguments is necessary to >> establish that none of the prior cases apply. >> >> Best, >> Andreas >> >> On 26/04/2020 22:22, Jakob von Raumer wrote: >> > Hi all, >> > >> > what does light grey background shading mean again? It's a bit awkward >> > to have to be googline something like this... >> > >> > Cheers >> > >> > Jakob >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From nad at cse.gu.se Mon Apr 27 13:30:52 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 27 Apr 2020 13:30:52 +0200 Subject: [Agda] Light grey background? In-Reply-To: <1e0facf9-2cc5-add7-4444-e37104c5f1c6@von-raumer.de> References: <1e0facf9-2cc5-add7-4444-e37104c5f1c6@von-raumer.de> Message-ID: <99935235-bdaa-1eef-c953-438ee5592717@cse.gu.se> On 2020-04-26 22:22, Jakob von Raumer wrote: > what does light grey background shading mean again? In Emacs you can find out what the highlighting means by using C-u?C-x?=. Example: open import Agda.Builtin.Bool f : Bool ? Bool ? Bool f true false = false f _ true = true f false _ = false If I place the cursor over the first underscore and type C-u?C-x?=, then I get the following output (and more): annotation-faces (agda2-highlight-catchall-clause-face agda2-highlight-symbol-face) -- /NAD From jakob at von-raumer.de Mon Apr 27 15:16:14 2020 From: jakob at von-raumer.de (Jakob von Raumer) Date: Mon, 27 Apr 2020 15:16:14 +0200 Subject: [Agda] Light grey background? In-Reply-To: <99935235-bdaa-1eef-c953-438ee5592717@cse.gu.se> References: <1e0facf9-2cc5-add7-4444-e37104c5f1c6@von-raumer.de> <99935235-bdaa-1eef-c953-438ee5592717@cse.gu.se> Message-ID: Thanks to all who replied. I think the light grey is a good choice by the way, it intuitively gave me the feeling that the definition could be improved even though its shortcomings weren't dramatic :) Cheers Jakob On 27/04/2020 13:30, Nils Anders Danielsson wrote: > On 2020-04-26 22:22, Jakob von Raumer wrote: >> what does light grey background shading mean again? > > In Emacs you can find out what the highlighting means by using > C-u?C-x?=. Example: > > ? open import Agda.Builtin.Bool > > ? f : Bool ? Bool ? Bool > ? f true? false = false > ? f _???? true? = true > ? f false _???? = false > > If I place the cursor over the first underscore and type C-u?C-x?=, then > I get the following output (and more): > > ? annotation-faces???? (agda2-highlight-catchall-clause-face > agda2-highlight-symbol-face) > From Jesper at sikanda.be Mon Apr 27 17:35:52 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Mon, 27 Apr 2020 17:35:52 +0200 Subject: [Agda] Two assistant/associate professor positions in PL at TU Delft Message-ID: Dear all, Our programming languages group at TU Delft is hiring two new assistant/associate professors. Each position comes with a start-up package including funding for research travel and a four year PhD student position. Our group works on a broad range of PL topics, but I would personally like to encourage people working on Agda and related topics to send in their applications. You can find more information about the positions at http://pl.ewi.tudelft.nl/hiring/2020/assistant-professor/. Please spread the word if you know any potential candidates! Cheers, Jesper -------------- next part -------------- An HTML attachment was scrubbed... URL: From iblech at speicherleck.de Mon Apr 27 22:35:45 2020 From: iblech at speicherleck.de (Ingo Blechschmidt) Date: Mon, 27 Apr 2020 22:35:45 +0200 Subject: [Agda] Introducing Agdapad, a website for real-time collaborative Agda experiments (early preview) Message-ID: <20200427203545.GC386@quasicoherent.io> Dear friends of Agda, I'm happy to announce Agdapad: like Etherpad or Ethercalc, but for Agda. https://agdapad.quasicoherent.io/ The purpose of Agdapad is to lower the bar for playing with Agda, as local installation becomes superfluous, and to allow live collaboration on small Agda experiments. I'm building Agdapad to facilitate a first course on Agda which I'm teaching at the invitation of Milly Maietti in Padova. Accordingly it is intended for short programs and presentations; it is not suitable for large developments. * This is an early preview. I appreciate your thoughts on how Agdapad could be made more useful for your purposes. Already on my to do list is a text-only mode, which should make Agdapad more accessible on connections with low bandwidth. Over the next couple days, I'll clean up the source and then put it online (AGPL-licensed) so that people can self-host Agdapad. * Agdapad comes without any guarantees. It might vanish at any point. Do not rely on it. In particular, since the host on which Agdapad runs is rather underpowered, I might need to restrict access when I need it for my own course. * Have fun and feel invited to play with Agdapad in any way you see fit! Agda is a truly amazing and captivating game, conveying so many insights. This real-time collaborative extension hopefully increases its charm even more. I'm grateful to Mart?n Escard? and Anja Petkovi?, with whom I took my my first steps with Agda. Cheers, Ingo From benedikt.ahrens at gmail.com Mon Apr 27 23:22:36 2020 From: benedikt.ahrens at gmail.com (Benedikt Ahrens) Date: Mon, 27 Apr 2020 17:22:36 -0400 Subject: [Agda] PhD position at University of Birmingham, UK Message-ID: <4d86b493-3e49-1b72-0afe-041958274a2c@gmail.com> Dear All, I would like to invite applications for a fully-funded PhD position in the School of Computer Science at the University of Birmingham, UK. Topics of interest include: * Syntax and semantics of type theory * Formalisation of mathematics in univalent foundations * Directed type theory * Algebraic specification of programming languages Students broadly interested in one of these fields of research, or a related field, are strongly encouraged to apply. Applicants should hold, or be about to obtain, a Masters or Bachelor degree in Computer Science or Mathematics. The PhD position is fully funded, covering tuition fees and a tax-free scholarship. Healthcare is provided. For further details please send me an email (b.ahrens at cs.bham.ac.uk) and see my website (https://benediktahrens.net). The theory group at Birmingham's School of Computer Science is very active, organising regular seminars and informal meetings, such as the YaMCATS category theory seminar, Midlands Graduate School, and Workshops on Univalent Mathematics. For more information see http://www.cs.bham.ac.uk/research/groupings/theory/. Information on how to apply is given on http://www.cs.bham.ac.uk/admissions/postgraduate-research/. However, interested candidates should contact me in the first instance. All the best, Benedikt Ahrens From william.lawrence.harrison at gmail.com Wed Apr 29 18:58:45 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Wed, 29 Apr 2020 12:58:45 -0400 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that Message-ID: Hi- I have a question about the best way to handle colists ? aka, potentially infinite lists as opposed to streams ? in Agda. I give some examples below in Haskell and Agda, and I?ve also attached *.hs and *.agda files with complete, stand-alone definitions. In Haskell, the built-in iterate function always produces an infinite list: iterate :: (a -> a) -> a -> [a] iterate f a = a : iterate f (f a) This can be represented in Agda using a Stream (defined as a coinductive record): iterate : ? {a} ? (a ? a) ? a ? Stream a hd (iterate f a) = a tl (iterate f a) = iterate f (f a) Now, back in Haskell, we can define a *potentially* infinite list by introducing Maybe in the codomain of f: iterate1 :: (a -> Maybe a) -> a -> [a] iterate1 f a = a : case f a of Just a1 -> iterate1 f a1 Nothing -> [] Using the musical notation for coinduction in Agda, I can get something similar: data Colist (A : Set) : Set where [] : Colist A _?_ : A ? (? (Colist A)) ? Colist A iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a iterate1 f a = a ? ? (case f a of ? { (just a?) ? (iterate1 f a?) ; nothing ? [] }) My question is, how do I use coinductive records to define Colist rather than musical notation. Is there a standard approach? That isn?t clear. I'm supposing that musical notation should be avoided. What I?m really trying to define is analogous functions to iterate for what I?ll call the transcript data type, defined below in Haskell and Agda: data T e a = e :<< T e a | V a ? a "transcript"; like a list with an "answer" data T (e : Set) (a : Set) : Set where V : a ? T e a _<<_ : e ? ? (T e a) ? T e a All these definitions are given in the attached files. Thanks! Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ColistQuestion.hs Type: application/octet-stream Size: 775 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ColistQuestion.agda Type: application/octet-stream Size: 1239 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From ericfinster at gmail.com Wed Apr 29 20:49:37 2020 From: ericfinster at gmail.com (Eric Finster) Date: Wed, 29 Apr 2020 20:49:37 +0200 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that In-Reply-To: References: Message-ID: Hi Bill, I would have written this: record Colist (A : Set) : Set where constructor hd coinductive field Hd : Maybe (A ? Colist A) open Colist iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a Hd (iterate1 {A} f a) = Just (a , loop (f a)) where loop : Maybe A ? Colist A loop Nothing = hd Nothing loop (Just a') = iterate1 f a' Is that what you had in mind? Best, Eric On Wed, Apr 29, 2020 at 6:58 PM William Harrison wrote: > > Hi- > > I have a question about the best way to handle colists ? aka, potentially infinite lists as opposed to streams ? in Agda. I give some examples below in Haskell and Agda, and I?ve also attached *.hs and *.agda files with complete, stand-alone definitions. > > In Haskell, the built-in iterate function always produces an infinite list: > > iterate :: (a -> a) -> a -> [a] > iterate f a = a : iterate f (f a) > > > This can be represented in Agda using a Stream (defined as a coinductive record): > > iterate : ? {a} ? (a ? a) ? a ? Stream a > hd (iterate f a) = a > tl (iterate f a) = iterate f (f a) > > > Now, back in Haskell, we can define a *potentially* infinite list by introducing Maybe in the codomain of f: > > iterate1 :: (a -> Maybe a) -> a -> [a] > iterate1 f a = a : case f a of > Just a1 -> iterate1 f a1 > Nothing -> [] > > > Using the musical notation for coinduction in Agda, I can get something similar: > > data Colist (A : Set) : Set where > [] : Colist A > _?_ : A ? (? (Colist A)) ? Colist A > > iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a > iterate1 f a = a ? ? (case f a of > ? { (just a?) ? (iterate1 f a?) > ; nothing ? [] > }) > > > My question is, how do I use coinductive records to define Colist rather than musical notation. Is there a standard approach? That isn?t clear. I'm supposing that musical notation should be avoided. > > What I?m really trying to define is analogous functions to iterate for what I?ll call the transcript data type, defined below in Haskell and Agda: > > data T e a = e :<< T e a | V a ? a "transcript"; like a list with an "answer" > > data T (e : Set) (a : Set) : Set where > V : a ? T e a > _<<_ : e ? ? (T e a) ? T e a > > > All these definitions are given in the attached files. > > Thanks! > Bill > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From guillaume.allais at ens-lyon.org Wed Apr 29 20:53:21 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Wed, 29 Apr 2020 19:53:21 +0100 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that In-Reply-To: References: Message-ID: <6fcfe29c-69b6-d463-bcd4-dc1fab3d3152@ens-lyon.org> Hi William, In the standard library we use a notion of `Thunk` for sized codata. This gives you definitions that look essentially like the ones using musical notations but on which you can define more compositional operations thanks to sized types. You can find colist here: http://agda.github.io/agda-stdlib/Codata.Colist.html And what you call transcript corresponds to our cowriter: http://agda.github.io/agda-stdlib/Codata.Cowriter.html Both come with various functions, including an `unfold` one that is a generalisation of your `iterate` where we distinguish between the type of the internal state and the type of the values outputted in the codatatype. Best, guillaume On 29/04/2020 17:58, William Harrison wrote: > Hi- > > I have a question about the best way to handle colists ? aka, potentially infinite lists as opposed to streams ? in Agda. I give some examples below in Haskell and Agda, and I?ve also attached *.hs and *.agda files with complete, stand-alone definitions. > > In Haskell, the built-in iterate function always produces an infinite list: > > iterate :: (a -> a) -> a -> [a] > iterate f a = a : iterate f (f a) > > This can be represented in Agda using a Stream (defined as a coinductive record): > > iterate : ? {a} ? (a ? a) ? a ? Stream a > hd (iterate f a) = a > tl (iterate f a) = iterate f (f a) > > Now, back in Haskell, we can define a *potentially* infinite list by introducing Maybe in the codomain of f: > > iterate1 :: (a -> Maybe a) -> a -> [a] > iterate1 f a = a : case f a of > Just a1 -> iterate1 f a1 > Nothing -> [] > > Using the musical notation for coinduction in Agda, I can get something similar: > > data Colist (A : Set) : Set where > [] : Colist A > _?_ : A ? (? (Colist A)) ? Colist A > > iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a > iterate1 f a = a ? ? (case f a of > ? { (just a?) ? (iterate1 f a?) > ; nothing ? [] > }) > > My question is, how do I use coinductive records to define Colist rather than musical notation. Is there a standard approach? That isn?t clear. I'm supposing that musical notation should be avoided. > > What I?m really trying to define is analogous functions to iterate for what I?ll call the transcript data type, defined below in Haskell and Agda: > > data T e a = e :<< T e a | V a ? a "transcript"; like a list with an "answer" > > data T (e : Set) (a : Set) : Set where > V : a ? T e a > _<<_ : e ? ? (T e a) ? T e a > > All these definitions are given in the attached files. > > Thanks! > Bill > > > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: From william.lawrence.harrison at gmail.com Wed Apr 29 21:08:39 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Wed, 29 Apr 2020 15:08:39 -0400 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that In-Reply-To: <6fcfe29c-69b6-d463-bcd4-dc1fab3d3152@ens-lyon.org> References: <6fcfe29c-69b6-d463-bcd4-dc1fab3d3152@ens-lyon.org> Message-ID: Thank you Eric and Guillaume! I think you have both answered my questions, and the pointer to Cowriter are spot on. Eric, What you wrote is what I was trying to write, although I get an odd syntax error when I try it (I?ve attached the file that generates the error). It is possible that this is just a stupid mistake on my part made after staring at an emacs buffer all day. This definition: iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a Hd (iterate1 {A} f a) = Just (a , loop (f a)) where loop : Maybe A ? Colist A loop Nothing = hd Nothing loop (Just a') = iterate1 f a? Generates this error: ?/ColistQuestion.agda:19,6-20 Could not parse the left-hand side loop (Just a') Operators used in the grammar: None when scope checking the left-hand side loop (Just a') in the definition of loop Am I missing something obvious? Thanks Again, Bill > On Apr 29, 2020, at 2:53 PM, Guillaume Allais wrote: > > Hi William, > > In the standard library we use a notion of `Thunk` for sized codata. > This gives you definitions that look essentially like the ones using > musical notations but on which you can define more compositional > operations thanks to sized types. > > You can find colist here: > http://agda.github.io/agda-stdlib/Codata.Colist.html > > And what you call transcript corresponds to our cowriter: > http://agda.github.io/agda-stdlib/Codata.Cowriter.html > > Both come with various functions, including an `unfold` one that is > a generalisation of your `iterate` where we distinguish between the > type of the internal state and the type of the values outputted in > the codatatype. > > Best,guillaume > > > On 29/04/2020 17:58, William Harrison wrote: >> Hi- >> >> I have a question about the best way to handle colists ? aka, potentially infinite lists as opposed to streams ? in Agda. I give some examples below in Haskell and Agda, and I?ve also attached *.hs and *.agda files with complete, stand-alone definitions. >> >> In Haskell, the built-in iterate function always produces an infinite list: >> >> iterate :: (a -> a) -> a -> [a] >> iterate f a = a : iterate f (f a) >> >> This can be represented in Agda using a Stream (defined as a coinductive record): >> >> iterate : ? {a} ? (a ? a) ? a ? Stream a >> hd (iterate f a) = a >> tl (iterate f a) = iterate f (f a) >> >> Now, back in Haskell, we can define a *potentially* infinite list by introducing Maybe in the codomain of f: >> >> iterate1 :: (a -> Maybe a) -> a -> [a] >> iterate1 f a = a : case f a of >> Just a1 -> iterate1 f a1 >> Nothing -> [] >> >> Using the musical notation for coinduction in Agda, I can get something similar: >> >> data Colist (A : Set) : Set where >> [] : Colist A >> _?_ : A ? (? (Colist A)) ? Colist A >> >> iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a >> iterate1 f a = a ? ? (case f a of >> ? { (just a?) ? (iterate1 f a?) >> ; nothing ? [] >> }) >> >> My question is, how do I use coinductive records to define Colist rather than musical notation. Is there a standard approach? That isn?t clear. I'm supposing that musical notation should be avoided. >> >> What I?m really trying to define is analogous functions to iterate for what I?ll call the transcript data type, defined below in Haskell and Agda: >> >> data T e a = e :<< T e a | V a ? a "transcript"; like a list with an "answer" >> >> data T (e : Set) (a : Set) : Set where >> V : a ? T e a >> _<<_ : e ? ? (T e a) ? T e a >> >> All these definitions are given in the attached files. >> >> Thanks! >> Bill >> >> >> >> >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ColistQuestion.agda Type: application/octet-stream Size: 433 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From ericfinster at gmail.com Wed Apr 29 21:20:03 2020 From: ericfinster at gmail.com (Eric Finster) Date: Wed, 29 Apr 2020 21:20:03 +0200 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that In-Reply-To: References: <6fcfe29c-69b6-d463-bcd4-dc1fab3d3152@ens-lyon.org> Message-ID: I used my own Maybe type because I didn't have the standard library handy. I guess I named the constructors differently? On Wed, Apr 29, 2020, 21:08 William Harrison < william.lawrence.harrison at gmail.com> wrote: > Thank you Eric and Guillaume! I think you have both answered my questions, > and the pointer to Cowriter are spot on. > > Eric, > > What you wrote is what I was trying to write, although I get an odd syntax > error when I try it (I?ve attached the file that generates the error). It > is possible that this is just a stupid mistake on my part made after > staring at an emacs buffer all day. > > This definition: > iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a > Hd (iterate1 {A} f a) = Just (a , loop (f a)) > where > loop : Maybe A ? Colist A > loop Nothing = hd Nothing > loop (Just a') = iterate1 f a? > > Generates this error: > > ?/ColistQuestion.agda:19,6-20 > Could not parse the left-hand side loop (Just a') > Operators used in the grammar: > None > when scope checking the left-hand side loop (Just a') in the > definition of loop > > Am I missing something obvious? > > Thanks Again, > Bill > > On Apr 29, 2020, at 2:53 PM, Guillaume Allais < > guillaume.allais at ens-lyon.org> wrote: > > Hi William, > > In the standard library we use a notion of `Thunk` for sized codata. > This gives you definitions that look essentially like the ones using > musical notations but on which you can define more compositional > operations thanks to sized types. > > You can find colist here: > http://agda.github.io/agda-stdlib/Codata.Colist.html > > And what you call transcript corresponds to our cowriter: > http://agda.github.io/agda-stdlib/Codata.Cowriter.html > > Both come with various functions, including an `unfold` one that is > a generalisation of your `iterate` where we distinguish between the > type of the internal state and the type of the values outputted in > the codatatype. > > Best, > > guillaume > > > On 29/04/2020 17:58, William Harrison wrote: > > Hi- > > I have a question about the best way to handle colists ? aka, potentially > infinite lists as opposed to streams ? in Agda. I give some examples below > in Haskell and Agda, and I?ve also attached *.hs and *.agda files with > complete, stand-alone definitions. > > In Haskell, the built-in iterate function always produces an infinite list: > > iterate :: (a -> a) -> a -> [a] > iterate f a = a : iterate f (f a) > > This can be represented in Agda using a Stream (defined as a coinductive > record): > > iterate : ? {a} ? (a ? a) ? a ? Stream a > hd (iterate f a) = a > tl (iterate f a) = iterate f (f a) > > Now, back in Haskell, we can define a *potentially* infinite list by > introducing Maybe in the codomain of f: > > iterate1 :: (a -> Maybe a) -> a -> [a] > iterate1 f a = a : case f a of > Just a1 -> iterate1 f a1 > Nothing -> [] > > Using the musical notation for coinduction in Agda, I can get something > similar: > > data Colist (A : Set) : Set where > [] : Colist A > _?_ : A ? (? (Colist A)) ? Colist A > > iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a > iterate1 f a = a ? ? (case f a of > ? { (just a?) ? (iterate1 f a?) > ; nothing ? [] > }) > > My question is, how do I use coinductive records to define Colist rather > than musical notation. Is there a standard approach? That isn?t clear. I'm > supposing that musical notation should be avoided. > > What I?m really trying to define is analogous functions to iterate for > what I?ll call the transcript data type, defined below in Haskell and Agda: > > data T e a = e :<< T e a | V a ? a "transcript"; like a list with an > "answer" > > data T (e : Set) (a : Set) : Set where > V : a ? T e a > _<<_ : e ? ? (T e a) ? T e a > > All these definitions are given in the attached files. > > Thanks! > Bill > > > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Wed Apr 29 21:23:22 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 29 Apr 2020 20:23:22 +0100 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that In-Reply-To: References: <6fcfe29c-69b6-d463-bcd4-dc1fab3d3152@ens-lyon.org> Message-ID: <60dcb033-faba-ab53-5f8c-39b0a69c8eab@strath.ac.uk> In the standard library, `nothing` and `just` are in lowercase. The change should fix that issue. James On 29/04/2020 20:20, Eric Finster wrote: > I used my own Maybe type because I didn't have the standard library > handy. I guess I named the constructors differently? > > On Wed, Apr 29, 2020, 21:08 William Harrison > > wrote: > > Thank you Eric and Guillaume! I think you have both answered my > questions, and the pointer to Cowriter are spot on. > > Eric, > > What you wrote is what I was trying to write, although I get an odd > syntax error when I try it (I?ve attached the file that generates > the error). It is possible that this is just a stupid mistake on my > part made after staring at an emacs buffer all day. > > This definition: > iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a > Hd (iterate1 {A} f a) = Just (a , loop (f a)) > ? ?where > ? ? ?loop : Maybe A ? Colist A > ? ? ?loop Nothing ? = hd Nothing > ? ? ?loop (Just a') = iterate1 f a? > > Generates this error: > > ?/ColistQuestion.agda:19,6-20 > Could not parse the left-hand side loop (Just a') > Operators used in the grammar: > ? None > when scope checking the left-hand side loop (Just a') in the > definition of loop > > Am I missing something obvious? > > Thanks Again, > Bill > >> On Apr 29, 2020, at 2:53 PM, Guillaume Allais >> > > wrote: >> >> Hi William, >> >> In the standard library we use a notion of `Thunk` for sized codata. >> This gives you definitions that look essentially like the ones using >> musical notations but on which you can define more compositional >> operations thanks to sized types. >> >> You can find colist here: >> http://agda.github.io/agda-stdlib/Codata.Colist.html >> >> >> And what you call transcript corresponds to our cowriter: >> http://agda.github.io/agda-stdlib/Codata.Cowriter.html >> >> >> Both come with various functions, including an `unfold` one that is >> a generalisation of your `iterate` where we distinguish between the >> type of the internal state and the type of the values outputted in >> the codatatype. >> >> Best, >> guillaume >> >> >> On 29/04/2020 17:58, William Harrison wrote: >>> Hi- >>> >>> I have a question about the best way to handle colists ? aka, >>> potentially infinite lists as opposed to streams ? in Agda. I >>> give some examples below in Haskell and Agda, and I?ve also >>> attached *.hs and *.agda files with complete, stand-alone >>> definitions. >>> >>> In Haskell, the built-in iterate function always produces an >>> infinite list: >>> >>> iterate :: (a -> a) -> a -> [a] >>> iterate f a = ?a : iterate f (f a) >>> >>> This can be represented in Agda using a Stream (defined as a >>> coinductive record): >>> >>> iterate : ? {a} ? (a ? a) ? a ? Stream a >>> hd (iterate f a) = a >>> tl (iterate f a) = iterate f (f a) >>> >>> Now, back in Haskell, we can define a *potentially* infinite list >>> by introducing Maybe in the codomain of f: >>> >>> iterate1 :: (a -> Maybe a) -> a -> [a] >>> iterate1 f a = a : case f a of >>> ???????????????????????Just a1 -> iterate1 f a1 >>> ???????????????????????Nothing -> [] >>> >>> Using the musical notation for coinduction in Agda, I can get >>> something similar: >>> >>> data Colist (A : Set) : Set where >>> ?[] ?: Colist A >>> ?_?_ : A ? (? (Colist A)) ? Colist A ? >>> >>> iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a >>> iterate1 f a = a ? ? (case f a of >>> ??????????????????????? { (just a?) ? (iterate1 f a?) >>> ????????????????????????; nothing ??? [] >>> ????????????????????????}) >>> >>> My question is, how do I use coinductive records to define Colist >>> rather than musical notation. Is there a standard approach? That >>> isn?t clear. I'm supposing that musical notation should be avoided. >>> >>> What I?m really trying to define is analogous functions to >>> iterate for what I?ll call the transcript data type, defined >>> below in Haskell and Agda: >>> >>> data T e a = e :<< T e a | V a ? a "transcript"; like a list with >>> an "answer" >>> >>> data T (e : Set) (a : Set) : Set where >>> ??V ???: a ? T e a >>> ??_<<_ : e ? ? (T e a) ? T e a >>> >>> All these definitions are given in the attached files. >>> >>> Thanks! >>> Bill >>> >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7C15aff5a127f64909316608d7ec725c10%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637237848229722342&sdata=eHNbaktehw%2Bq5B1%2FI6ANeEehIUQeFQC8hkwLwZ2gF4g%3D&reserved=0 > From joey.eremondi at gmail.com Wed Apr 29 23:52:22 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Wed, 29 Apr 2020 14:52:22 -0700 Subject: [Agda] Termination Checking and WIthout-K Message-ID: Basically, I'm wondering if there's any way to make the following file pass the termination checker using the --without-K https://github.com/JoeyEremondi/spire.github.io/blob/debe0a3ebbb4c82388f4f5b785b955fbc02b3d4f/source/_code/2014-08-04-inductive-recursive-descriptions/IDescIR.agda It's a nifty combination of Descriptions and Induction-Recursion thanks to Larry Diehl. However, if I add the --without-K flag, it complains about foldO and foldsO not terminating. I'm assuming this is because of the issues described here: https://agda.readthedocs.io/en/v2.6.1/language/without-k.html#restrictions-on-termination-checking So I (roughly) understand the problem, but I have no idea if there's a solution. Is this simply not a well-founded definition when K is disabled? Or is there some trick I can use to massage this into something the termination checker will like? -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.g.setzer at swansea.ac.uk Thu Apr 30 05:46:22 2020 From: a.g.setzer at swansea.ac.uk (Setzer A.G.) Date: Thu, 30 Apr 2020 03:46:22 +0000 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that In-Reply-To: References: Message-ID: Please note that the paper of Ulrich Berger and myself Ulrich Berger and Anton Setzer: Undecidability of Equality for Codata Types, doi 10.1007/978-3-030-00389-0_4 In: Corina Cirstea (Ed): Coalgebraic Methods in computer Science. Springer Lectuer Notes in Computer Science 11202, 2018. http://www.cs.swan.ac.uk/~csetzer/articles/CMCS2018/bergerSetzerProceedingsCMCS18.pdf contains a discussion how the musical notation can be interpreted in the coalgebra approach (so is just a form of syntactic sugar) Anton ________________________________ From: Agda on behalf of William Harrison Sent: 29 April 2020 17:58 To: agda at lists.chalmers.se Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that Hi- I have a question about the best way to handle colists ? aka, potentially infinite lists as opposed to streams ? in Agda. I give some examples below in Haskell and Agda, and I?ve also attached *.hs and *.agda files with complete, stand-alone definitions. In Haskell, the built-in iterate function always produces an infinite list: iterate :: (a -> a) -> a -> [a] iterate f a = a : iterate f (f a) This can be represented in Agda using a Stream (defined as a coinductive record): iterate : ? {a} ? (a ? a) ? a ? Stream a hd (iterate f a) = a tl (iterate f a) = iterate f (f a) Now, back in Haskell, we can define a *potentially* infinite list by introducing Maybe in the codomain of f: iterate1 :: (a -> Maybe a) -> a -> [a] iterate1 f a = a : case f a of Just a1 -> iterate1 f a1 Nothing -> [] Using the musical notation for coinduction in Agda, I can get something similar: data Colist (A : Set) : Set where [] : Colist A _?_ : A ? (? (Colist A)) ? Colist A iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a iterate1 f a = a ? ? (case f a of ? { (just a?) ? (iterate1 f a?) ; nothing ? [] }) My question is, how do I use coinductive records to define Colist rather than musical notation. Is there a standard approach? That isn?t clear. I'm supposing that musical notation should be avoided. What I?m really trying to define is analogous functions to iterate for what I?ll call the transcript data type, defined below in Haskell and Agda: data T e a = e :<< T e a | V a ? a "transcript"; like a list with an "answer" data T (e : Set) (a : Set) : Set where V : a ? T e a _<<_ : e ? ? (T e a) ? T e a All these definitions are given in the attached files. Thanks! Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Thu Apr 30 09:10:13 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 30 Apr 2020 09:10:13 +0200 Subject: [Agda] Termination Checking and WIthout-K In-Reply-To: References: Message-ID: Hi Joey, I haven't tried it in this example, but in general it can help the termination checker to introduce more (mutual) helper functions to reduce the nesting of pattern matches so that the end result does only shallow pattern matching. So here you could have foldsO only pattern match on the first argument and delegate each of the cases to a helper function. I hope that helps. -- Jesper On Wed, Apr 29, 2020 at 11:53 PM Joey Eremondi wrote: > Basically, I'm wondering if there's any way to make the following file > pass the termination checker using the --without-K > > > https://github.com/JoeyEremondi/spire.github.io/blob/debe0a3ebbb4c82388f4f5b785b955fbc02b3d4f/source/_code/2014-08-04-inductive-recursive-descriptions/IDescIR.agda > > It's a nifty combination of Descriptions and Induction-Recursion thanks to > Larry Diehl. However, if I add the --without-K flag, it complains about > foldO and foldsO not terminating. > > I'm assuming this is because of the issues described here: > https://agda.readthedocs.io/en/v2.6.1/language/without-k.html#restrictions-on-termination-checking > > So I (roughly) understand the problem, but I have no idea if there's a > solution. Is this simply not a well-founded definition when K is disabled? > Or is there some trick I can use to massage this into something the > termination checker will like? > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From claudio.sacerdoticoen at unibo.it Fri May 1 11:43:44 2020 From: claudio.sacerdoticoen at unibo.it (Claudio Sacerdoti Coen) Date: Fri, 1 May 2020 09:43:44 +0000 Subject: [Agda] WFLP 2020 CFP (Workshop on Functional and Constraint Logic Programming) Message-ID: <3a42f551ce77eddd3d13e4e42ec0903ac2b9785e.camel@unibo.it> ========================== WFLP 2020: Call for Papers ========================== 28th International Workshop on Functional and (Constraint) Logic Programming ## Due to the coronavirus pandemic, the workshop will be organized by ## the University of Bologna, but it will be held entirely on-line. Bologna, Italy, September 7th, 2020 (part of Bologna Federated Conference on Programming Languages 2020; co-located with PPDP, LOPSTR, Microservices) Important Dates Paper Registration: June, 29th Submission: July, 06th Notification of Authors: July, 27th Camera-ready Papers: August, 24th Conference & Workshops: September 7th, 2020 WFLP 2020 The international Workshop on Functional and (constraint) Logic Programming (WFLP) aims at bringing together researchers, students, and practitioners interested in functional programming, logic programming, and their integration. WFLP has a reputation for being a lively and friendly forum, and it is open for presenting and discussing work in progress, technical contributions, experience reports, experiments, reviews, and system descriptions. The 28th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2020) will be organized by the University of Bologna, Italy, as part of Bologna Federated Conference on Programming Languages 2020 and it will be held entirely on-line due to the coronavirus pandemic. Previous WFLP editions were WFLP 2019 (Cottbus, Germany), WFLP 2018 (Frankfurt am Main, Germany), WFLP 2017 (W?rzburg, Germany), WFLP 2016 (Leipzig, Germany), WFLP 2014 (Wittenberg, Germany), WFLP 2013 (Kiel, Germany), WFLP 2012 (Nagoya, Japan), WFLP 2011 (Odense, Denmark), WFLP 2010 (Madrid, Spain), WFLP 2009 (Brasilia, Brazil), WFLP 2008 (Siena, Italy), WFLP 2007 (Paris, France), WFLP 2006 (Madrid, Spain), WCFLP 2005 (Tallinn, Estonia), WFLP 2004 (Aachen, Germany), WFLP 2003 (Valencia, Spain), WFLP 2002 (Grado, Italy), WFLP 2001 (Kiel, Germany), WFLP 2000 (Benicassim, Spain), WFLP'99 (Grenoble, France), WFLP'98 (Bad Honnef, Germany), WFLP'97 (Schwarzenberg, Germany), WFLP'96 (Marburg, Germany), WFLP'95 (Schwarzenberg, Germany), WFLP'94 (Schwarzenberg, Germany), WFLP'93 (Rattenberg, Germany), and WFLP'92 (Karlsruhe, Germany). Topics The topics of interest cover all aspects of functional and logic programming. They include (but are not limited to): * Functional programming * Logic programming * Constraint programming * Deductive databases, data mining * Extensions of declarative languages, objects * Multi-paradigm declarative programming * Foundations, semantics, non-monotonic reasoning, dynamics * Parallelism, concurrency * Program analysis, abstract interpretation * Program and model manipulation * Program transformation, partial evaluation, meta-programming * Specification, * Verification * Debugging * Testing * Knowledge representation, machine learning * Interaction of declarative programming with other formalisms * Implementation of declarative languages * Advanced programming environments and tools * Software techniques for declarative programming * Applications The primary focus is on new and original research results, but submissions describing innovative products, prototypes under development, application systems, or interesting experiments (e.g., benchmarks) are also encouraged. Survey papers that present some aspects of the above topics from a new perspective, and experience reports are also welcome. Papers must be written and presented in English. Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Submission Guidelines Submission is via Easychair submission website for WFLP 2020: https://easychair.org/conferences/?conf=wflp2020 Authors are invited to submit papers in the following categories: + Regular research paper + Work-in-progress report + System description Regular research papers must describe original work, be written and presented in English, and must not substantially overlap with papers that have been formally published or that are simultaneously submitted to a journal, conference, or workshop with formal proceedings. They will be judged on the basis of significance, relevance, correctness, originality, and clarity. For work-in-progress reports and system descriptions, less formal rules apply, and presentation-only submissions (talk and discussion, but no paper in the formal proceedings) are possible. Please contact the PC chair with any questions. All submissions must be formatted in the Lecture Notes in Computer Science style. Submissions cannot exceed 15 pages including references but excluding well-marked appendices not intended for publication. Reviewers are not required to read the appendices, and thus papers should be intelligible without them. However, all submissions (especially work-in-progress reports and system descriptions) may be considerably shorter than 15 pages. Proceedings All papers accepted for presentation at the conference will be published in informal proceedings publicly available at the Computing Research Repository. According to the program committee reviews, submissions can be directly accepted for publication in the formal post-conference proceedings. The formal post-conference proceedings will be published in both electronic and paper formats by Springer in the Lecture Notes in Computer Science series. After the conference, all authors accepted only for presentation will be invited to revise and/or extend their submissions in the light of the feedback solicited at the conference. Then, after another round of reviewing, these revised papers may also be published in the formal proceedings. Therefore, all accepted papers will be published in open-access, and the authors can also decide to publish their work in the Springer LNCS formal proceedings. Program Committee Sergio Antoy (Portland State University, USA) Demis Ballis (University of Udine, Italy) Moreno Falaschi (Universit? di Siena, Italy) Michael Hanus (University of Kiel, Germany) (Co-Chair) Herbert Kuchen (University of Muenster, Germany) Dale Miller (INRIA and LIX/?cole Polytechnique) Claudio Sacerdoti Coen (University of Bologna, Italy) (Co-Chair) Konstantinos Sagonas (Uppsala University, Sweden) Enrico Tassi (INRIA, France) Janis Voigtl?nder (University of Duisburg-Essen, Germany) Johannes Waldmann (HTWK Leipzig, Germany) Organizing Committee Claudio Sacerdoti Coen (University of Bologna, Italy) (Co-Chair) -- Prof. Claudio Sacerdoti Coen Department of Computer Science and Engineering University of Bologna From Thorsten.Altenkirch at nottingham.ac.uk Fri May 1 13:35:14 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 1 May 2020 11:35:14 +0000 Subject: [Agda] why is this corecursion red? And indexed coinductive definitions. Message-ID: <3D9C5A4F-72BB-42EC-8CD4-14058AB8EBE0@nottingham.ac.uk> Hi everybody, There are two issues here: the first is that I don?t understand why the termination checker accepts one definition and rejects another. The 2nd is the observation that the particular coinductive definition I am interested in doesn?t seem to be reducible to more primitive coinductive definitions. I am trying to implement Reedy fibrations using coinduction and I have a problem with corecursion. Ok, I am not expecting that everybody already knows what Reedy fibrations are so I tried to cook down the problem to a simple case. But the simple case passes the termination checker while the one I am actually interested in doesn?t. ? I may be overlooking something obvious. Here is my trivial example ? a coinductive definition of (n : ?) ? A n : record ?? (A : ? ? Set) : Set where coinductive field hd : A 0 tl : ?? (? n ? A (suc n)) and here is a function that translates a function into its coinductive representation using corecursion: mk?? : {A : ? ? Set} ? ((n : ?) ? A n) ? ?? A hd (mk?? {A} f) = f 0 tl (mk?? {A} f) = mk?? (? n ? f (suc n)) No problem. But I want to do something similar for directed categories (i.e.all the morphisms apart from identities point in one direction). Instead of composing with suc I use an operation shift : (C : DCat)(X : Obj C 0 ? Set) ? DCat which does something similar to directed categories. I attach a file for the details. record ReedyFib (C : DCat) : Set? where coinductive field hd : Obj C 0 ? Set tl : ReedyFib (shift C hd) and then I want to create a ReedyFib from a strict presheaf using another operation shiftPSh : {C : DCat}(F : PSh C) ? PSh (shift C (Fzero F)) which shifts presheaves as before composition with suc shifted the function. psh?rfib : {C : DCat} ? PSh C ? ReedyFib C hd (psh?rfib {C} F) = Fzero F tl (psh?rfib {C} F) = psh?rfib (shiftPSh F) To me this looks very similar to the example above hence I don?t understand why the termination checker rejects one and accepts the other. I thought maybe it is the negative occurrence of Obj C 0 but I tried a simple example for this (see file) and there is no problem. What am I missing? I realize that all examples change a parameter in the coinductive definition hence it is not clear how to reduce this to basic coinductive types. Actually a better way would be to allow to define dependent records and coinductive types. To handle this we need destructors instead of fields, e.g. it should look like this: record ReedyFib : DCat ? Set? where coinductive destructors hd : (C : DCat) ? ReedyFib C ? Obj C 0 ? Set tl : (C : DCat) ? ReedyFib C ? ReedyFib (shift C (hd C)) We had previously discussed the case of coinductive vectors which using destructors look like this: record Vec : ? ? Set where coinductive destructor hd : {n : ?} ? Vec (suc n) ? A tl : {n : ?} ? Vec (suc n) ? Vec n but in this case we can simulate destructors using equality: record Vec (m : ?) : Set where coinductive field hd-eq : {n : ?} ? (m ? suc n) ? A tl-eq : {n : ?} ? (m ? suc n) ? Vec n However, this only works because Vec appears recursively ?unconstrained? which is not the case in my examples. Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: reedy-fib.agda Type: application/octet-stream Size: 4479 bytes Desc: reedy-fib.agda URL: From michel.levy.imag at free.fr Fri May 1 13:55:41 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Fri, 1 May 2020 13:55:41 +0200 Subject: [Agda] lost in modules Message-ID: This morning, I have loaded (from GitHub) the standard library with the version 1.3. I have change .agda/libraries to the new version. That is my .agda/libraries file : /home/michel/Agda/PLFA-LIB/plfa.agda-lib /home/michel/agda-stdlib-1.3/standard-library.agda-lib But when I retry to load a file "relationsPLFA.agda", agda, on a command "open import Data.nat" is also searching (twice) in the old version of the standard libray and give the error : Ambiguous module name. The module name Data.Nat could refer to any of the following files: /home/michel/agda-stdlib-1.3/src/Data/Nat.agda /usr/share/agda-stdlib/Data/Nat.agda /usr/share/agda-stdlib/Data/Nat.agda when scope checking the declaration open import Data.Nat using (?; zero; suc; _+_) What should I do to avoid this search in the old library ? -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Fri May 1 14:11:08 2020 From: guillaume.allais at ens-lyon.org (Guillaume Allais) Date: Fri, 1 May 2020 13:11:08 +0100 Subject: [Agda] why is this corecursion red? And indexed coinductive definitions. In-Reply-To: <3D9C5A4F-72BB-42EC-8CD4-14058AB8EBE0@nottingham.ac.uk> References: <3D9C5A4F-72BB-42EC-8CD4-14058AB8EBE0@nottingham.ac.uk> Message-ID: <973f29d0-ba29-0024-0b31-90d0bd162ccc@ens-lyon.org> Hi Thorsten, What you are missing is that the type of the second field depends on the value of the first one which is not the case in your shrunk example. Andreas recently fixed a bug involving this type of scenario: https://github.com/agda/agda/pull/4424 So you may want to test your example on the development version of Agda. guillaume Ps: note that your example file is not self-contained: the module "delta-i" is missing. On 01/05/2020 12:35, Thorsten Altenkirch wrote: > Hi everybody, > > There are two issues here: the first is that I don?t understand why the termination checker accepts one definition and rejects another. The 2nd is the observation that the particular coinductive definition I am interested in doesn?t seem to be reducible to more primitive coinductive definitions. > > I am trying to implement Reedy fibrations using coinduction and I have a problem with corecursion. Ok, I am not expecting that everybody already knows what Reedy fibrations are so I tried to cook down the problem to a simple case. But the simple case passes the termination checker while the one I am actually interested in doesn?t. ? > > I may be overlooking something obvious. > > Here is my trivial example ? a coinductive definition of (n : ?) ? A n : > > record ?? (A : ? ? Set) : Set where > coinductive > field > hd : A 0 > tl : ?? (? n ? A (suc n)) > > and here is a function that translates a function into its coinductive representation using corecursion: > > mk?? : {A : ? ? Set} ? ((n : ?) ? A n) ? ?? A > hd (mk?? {A} f) = f 0 > tl (mk?? {A} f) = mk?? (? n ? f (suc n)) > > No problem. But I want to do something similar for directed categories (i.e.all the morphisms apart from identities point in one direction). Instead of composing with suc I use an operation > > shift : (C : DCat)(X : Obj C 0 ? Set) ? DCat > > which does something similar to directed categories. I attach a file for the details. > > record ReedyFib (C : DCat) : Set? where > coinductive > field > hd : Obj C 0 ? Set > tl : ReedyFib (shift C hd) > > and then I want to create a ReedyFib from a strict presheaf using another operation > > shiftPSh : {C : DCat}(F : PSh C) ? PSh (shift C (Fzero F)) > > which shifts presheaves as before composition with suc shifted the function. > > psh?rfib : {C : DCat} ? PSh C ? ReedyFib C > hd (psh?rfib {C} F) = Fzero F > tl (psh?rfib {C} F) = psh?rfib (shiftPSh F) > > To me this looks very similar to the example above hence I don?t understand why the termination checker rejects one and accepts the other. I thought maybe it is the negative occurrence of Obj C 0 but I tried a simple example for this (see file) and there is no problem. > > What am I missing? > > I realize that all examples change a parameter in the coinductive definition hence it is not clear how to reduce this to basic coinductive types. Actually a better way would be to allow to define dependent records and coinductive types. To handle this we need destructors instead of fields, e.g. it should look like this: > > record ReedyFib : DCat ? Set? where > coinductive > destructors > hd : (C : DCat) ? ReedyFib C ? Obj C 0 ? Set > tl : (C : DCat) ? ReedyFib C ? ReedyFib (shift C (hd C)) > > We had previously discussed the case of coinductive vectors which using destructors look like this: > > record Vec : ? ? Set where > coinductive > destructor > hd : {n : ?} ? Vec (suc n) ? A > tl : {n : ?} ? Vec (suc n) ? Vec n > > but in this case we can simulate destructors using equality: > > record Vec (m : ?) : Set where > coinductive > field > hd-eq : {n : ?} ? (m ? suc n) ? A > tl-eq : {n : ?} ? (m ? suc n) ? Vec n > > However, this only works because Vec appears recursively ?unconstrained? which is not the case in my examples. > > Thorsten > > > > > > > > > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From michel.levy.imag at free.fr Fri May 1 17:13:29 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Fri, 1 May 2020 17:13:29 +0200 Subject: [Agda] lost in modules In-Reply-To: <3DC2DA58-DE45-4156-9E04-280254C28721@uib.no> References: <3DC2DA58-DE45-4156-9E04-280254C28721@uib.no> Message-ID: <7227679d-4f16-9af6-7c0d-c5ba90e35426@free.fr> I found a fix for my mistake but I don't understand how it works. In .agda/libraries I replaced the line /home/michel/agda-stdlib-1.3/standard-library.agda-lib by the actual location of the library /home/michel/agda-stdlib-1.3/src/standard-library.agda-lib and I copied the file /home/michel/agda-stdlib-1.3/standard-library.agda-lib in this library. Why with this strange method, there is no more research of the module Data.nat? in the old library? ? Le 01/05/2020 ? 13:59, Jonathan Steven Prieto Cubides a ?crit?: > What do you have in .agda/defaults? > > > From: Agda on behalf of Michel Levy > Date: Friday, 1 May 2020 at 13:55 > To: Agda Mailing List > Subject: [Agda] lost in modules > > > This morning, I have loaded (from GitHub) the standard library with the version 1.3. > > I have change .agda/libraries to the new version. That is my .agda/libraries file : > > /home/michel/Agda/PLFA-LIB/plfa.agda-lib > > /home/michel/agda-stdlib-1.3/standard-library.agda-lib > > But when I retry to load a file "relationsPLFA.agda", agda, on a command "open import Data.nat" is also searching (twice) in the old > > version of the standard libray and give the error : > > > > Ambiguous module name. The module name Data.Nat could refer to any > > of the following files: > > /home/michel/agda-stdlib-1.3/src/Data/Nat.agda > > /usr/share/agda-stdlib/Data/Nat.agda > > /usr/share/agda-stdlib/Data/Nat.agda > > when scope checking the declaration > > open import Data.Nat using (?; zero; suc; _+_) > > > > What should I do to avoid this search in the old library ? > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From m.escardo at cs.bham.ac.uk Fri May 1 18:39:05 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 1 May 2020 17:39:05 +0100 Subject: [Agda] Agda patterns Message-ID: Consider the following, which works: data _?_ {?} {X : Set ?} : X ? X ? Set ? where refl : {x : X} ? x ? x pattern reflp x = refl {x} pattern reflv x = refl {_} {_} {x} J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) ? ((x : X) ? A x x (reflv x)) ? (x y : X) (p : x ? y) ? A x y p J X A f x x (reflp x) = f x The idea is to make the argument of refl explicit if we wish, via the pattern definition. However, the patterns behave differently "as patterns" and "as values". For instance, the following doesn't work: J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) ? ((x : X) ? A x x (reflp x)) -- error here ? (x y : X) (p : x ? y) ? A x y p J X A f x x (reflp x) = f x This doesn't work either: J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) ? ((x : X) ? A x x (reflv x)) ? (x y : X) (p : x ? y) ? A x y p J X A f x x (reflv x) = f x -- error here It would be desirable to have a definition that works both as a pattern and as a value. Is that possible? Thanks, Martin From icfp.publicity at googlemail.com Fri May 1 21:04:27 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Fri, 01 May 2020 15:04:27 -0400 Subject: [Agda] ICFP 2020 will be held ONLINE Aug 23-28 Message-ID: <5eac72bb8e2a4_5b6e2b07d78345b4472e6@homer.mail> The ICFP 2020 organizers would like to announce that the conference and co-located events, originally scheduled for August 23-28, in Jersey City, New Jersey, will now be held online during the same dates. Further information for presenters, authors, attendees, sponsors, and the ICFP community will be provided as it becomes available. The ICFP Organizing Committee From ulf.norell at gmail.com Fri May 1 22:16:14 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 1 May 2020 22:16:14 +0200 Subject: [Agda] Agda patterns In-Reply-To: References: Message-ID: pattern reflpv x = refl {x = x} / Ulf On Fri, May 1, 2020 at 6:39 PM Martin Escardo wrote: > Consider the following, which works: > > data _?_ {?} {X : Set ?} : X ? X ? Set ? where > refl : {x : X} ? x ? x > > pattern reflp x = refl {x} > pattern reflv x = refl {_} {_} {x} > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > ? ((x : X) ? A x x (reflv x)) > ? (x y : X) (p : x ? y) ? A x y p > J X A f x x (reflp x) = f x > > The idea is to make the argument of refl explicit if we wish, via the > pattern definition. > > However, the patterns behave differently "as patterns" and "as values". > For instance, the following doesn't work: > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > ? ((x : X) ? A x x (reflp x)) -- error here > ? (x y : X) (p : x ? y) ? A x y p > J X A f x x (reflp x) = f x > > This doesn't work either: > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > ? ((x : X) ? A x x (reflv x)) > ? (x y : X) (p : x ? y) ? A x y p > J X A f x x (reflv x) = f x -- error here > > It would be desirable to have a definition that works both as a pattern > and as a value. Is that possible? > > Thanks, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Fri May 1 22:56:35 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 1 May 2020 21:56:35 +0100 Subject: [Agda] Agda patterns In-Reply-To: References: Message-ID: Thanks, that works. (https://github.com/agda/agda/issues/4632) I still wonder why refl {x} and refl {_} {_} {x} behave differently according to context. Best, Martin On 01/05/2020 21:16, ulf.norell at gmail.com wrote: > pattern reflpv x = refl {x = x} > > / Ulf > > > On Fri, May 1, 2020 at 6:39 PM Martin Escardo > wrote: > > Consider the following, which works: > > data _?_ {?} {X : Set ?} : X ? X ? Set ? where > ? ?refl : {x : X} ? x ? x > > pattern reflp x = refl {x} > pattern reflv x = refl {_} {_} {x} > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > ? ?? ((x : X) ? A x x (reflv x)) > ? ?? (x y : X) (p : x ? y) ? A x y p > J X A f x x (reflp x) = f x > > The idea is to make the argument of refl explicit if we wish, via the > pattern definition. > > However, the patterns behave differently "as patterns" and "as values". > For instance, the following doesn't work: > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > ? ?? ((x : X) ? A x x (reflp x))? -- error here > ? ?? (x y : X) (p : x ? y) ? A x y p > J X A f x x (reflp x) = f x > > This doesn't work either: > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > ? ?? ((x : X) ? A x x (reflv x)) > ? ?? (x y : X) (p : x ? y) ? A x y p > J X A f x x (reflv x) = f x -- error here > > It would be desirable to have a definition that works both as a pattern > and as a value. Is that possible? > > Thanks, > Martin > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From ulf.norell at gmail.com Fri May 1 23:08:36 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 1 May 2020 23:08:36 +0200 Subject: [Agda] Agda patterns In-Reply-To: References: Message-ID: The difference is that you are not allowed to pattern match on datatype parameters, since they are not stored in the constructor. In a right-hand side you can give the parameters to guide the type checker, but they are thrown out during elaboration. / Ulf On Fri, May 1, 2020 at 10:56 PM Martin Escardo wrote: > Thanks, that works. (https://github.com/agda/agda/issues/4632) > > I still wonder why refl {x} and refl {_} {_} {x} behave differently > according to context. > > Best, > Martin > > On 01/05/2020 21:16, ulf.norell at gmail.com wrote: > > pattern reflpv x = refl {x = x} > > > > / Ulf > > > > > > On Fri, May 1, 2020 at 6:39 PM Martin Escardo > > wrote: > > > > Consider the following, which works: > > > > data _?_ {?} {X : Set ?} : X ? X ? Set ? where > > refl : {x : X} ? x ? x > > > > pattern reflp x = refl {x} > > pattern reflv x = refl {_} {_} {x} > > > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > > ? ((x : X) ? A x x (reflv x)) > > ? (x y : X) (p : x ? y) ? A x y p > > J X A f x x (reflp x) = f x > > > > The idea is to make the argument of refl explicit if we wish, via the > > pattern definition. > > > > However, the patterns behave differently "as patterns" and "as > values". > > For instance, the following doesn't work: > > > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > > ? ((x : X) ? A x x (reflp x)) -- error here > > ? (x y : X) (p : x ? y) ? A x y p > > J X A f x x (reflp x) = f x > > > > This doesn't work either: > > > > J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > > ? ((x : X) ? A x x (reflv x)) > > ? (x y : X) (p : x ? y) ? A x y p > > J X A f x x (reflv x) = f x -- error here > > > > It would be desirable to have a definition that works both as a > pattern > > and as a value. Is that possible? > > > > Thanks, > > Martin > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Fri May 1 23:38:13 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 1 May 2020 22:38:13 +0100 Subject: [Agda] Agda patterns In-Reply-To: References: Message-ID: <90afa5d2-5ddb-7bc9-8e68-e74662cc841c@cs.bham.ac.uk> But I would argue that this is an implementation issue, which should be hidden from the users, particularly users like me. :-) On 01/05/2020 22:08, ulf.norell at gmail.com wrote: > The difference is that you are not allowed to pattern match on datatype > parameters, since they > are not stored in the constructor. In a right-hand side you can give the > parameters to guide the > type checker, but they are thrown out during elaboration. > > / Ulf > > On Fri, May 1, 2020 at 10:56 PM Martin Escardo > wrote: > > Thanks, that works. (https://github.com/agda/agda/issues/4632) > > I still wonder why refl {x} and refl {_} {_} {x} behave differently > according to context. > > Best, > Martin > > On 01/05/2020 21:16, ulf.norell at gmail.com > wrote: > > pattern reflpv x = refl {x = x} > > > > / Ulf > > > > > > On Fri, May 1, 2020 at 6:39 PM Martin Escardo > > > >> wrote: > > > >? ? ?Consider the following, which works: > > > >? ? ?data _?_ {?} {X : Set ?} : X ? X ? Set ? where > >? ? ? ? ?refl : {x : X} ? x ? x > > > >? ? ?pattern reflp x = refl {x} > >? ? ?pattern reflv x = refl {_} {_} {x} > > > >? ? ?J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > >? ? ? ? ?? ((x : X) ? A x x (reflv x)) > >? ? ? ? ?? (x y : X) (p : x ? y) ? A x y p > >? ? ?J X A f x x (reflp x) = f x > > > >? ? ?The idea is to make the argument of refl explicit if we wish, > via the > >? ? ?pattern definition. > > > >? ? ?However, the patterns behave differently "as patterns" and > "as values". > >? ? ?For instance, the following doesn't work: > > > >? ? ?J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > >? ? ? ? ?? ((x : X) ? A x x (reflp x))? -- error here > >? ? ? ? ?? (x y : X) (p : x ? y) ? A x y p > >? ? ?J X A f x x (reflp x) = f x > > > >? ? ?This doesn't work either: > > > >? ? ?J : ? {i j} (X : Set i) (A : (x y : X) ? x ? y ? Set j) > >? ? ? ? ?? ((x : X) ? A x x (reflv x)) > >? ? ? ? ?? (x y : X) (p : x ? y) ? A x y p > >? ? ?J X A f x x (reflv x) = f x -- error here > > > >? ? ?It would be desirable to have a definition that works both as > a pattern > >? ? ?and as a value. Is that possible? > > > >? ? ?Thanks, > >? ? ?Martin > >? ? ?_______________________________________________ > >? ? ?Agda mailing list > > Agda at lists.chalmers.se > > > > https://lists.chalmers.se/mailman/listinfo/agda > > > > -- > Martin Escardo > http://www.cs.bham.ac.uk/~mhe > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From michel.levy.imag at free.fr Sat May 2 12:28:56 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sat, 2 May 2020 12:28:56 +0200 Subject: [Agda] install agda Message-ID: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> I try again to run two agda versions, one is my old agda version 2.5.3 installed by the Ubuntu package, the other was supposed to be installed with "cabal install Agda" But I am still with the same error, I described in this list the 18 March, and that I can't solved. Can you help me ? Andr?s Sicard-Ram?rez wrote "It seems you are mixing the installation of Agda from Ubuntu packages and from Hackage". Why it's not possible to install two versions of agda, one with ubuntu and the other with cabal ?? Resolving dependencies... Configuring Agda-2.6.1... Building Agda-2.6.1... Failed to install Agda-2.6.1 Build log ( /home/michel/.cabal/logs/Agda-2.6.1.log ): cabal: Entering directory '/tmp/cabal-tmp-7014/Agda-2.6.1' [1 of 1] Compiling Main???????????? ( /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/setup.hs, /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/Main.o ) Linking /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/setup ... Configuring Agda-2.6.1... Building Agda-2.6.1... Preprocessing library Agda-2.6.1... [? 1 of 369] Compiling Paths_Agda?????? ( dist/build/autogen/Paths_Agda.hs, dist/build/Paths_Agda.o ) [? 2 of 369] Compiling Agda.Version???? ( src/full/Agda/Version.hs, dist/build/Agda/Version.o ) [? 3 of 369] Compiling Agda.VersionCommit ( src/full/Agda/VersionCommit.hs, dist/build/Agda/VersionCommit.o ) src/full/Agda/VersionCommit.hs:5:1: error: ??? Failed to load interface for ?Development.GitRev? ??? There are files missing in the ?gitrev-1.3.1 at gitrev-1.3.1-6KBEbA9rw49F9GCJBEz6uX? package, ??? try running 'ghc-pkg check'. ??? Use -v to see a list of the files searched for. cabal: Leaving directory '/tmp/cabal-tmp-7014/Agda-2.6.1' cabal: Error: some packages failed to install: Agda-2.6.1 failed during the building phase. The exception was: ExitFailure 1 I run 'ghc-pkg check' and that give me many pages of errors starting with ghc-pkg check There are problems in package aeson-1.4.6.0: ? Warning: library-dirs: /home/michel/.cabal/lib/i386-linux-ghc-8.0.2/aeson-1.4.6.0-1vlLcAj8kIrJVlnNw4kUo5 doesn't exist or isn't a directory ? Warning: dynamic-library-dirs: /home/michel/.cabal/lib/i386-linux-ghc-8.0.2 doesn't exist or isn't a directory ? import-dirs: /home/michel/.cabal/lib/i386-linux-ghc-8.0.2/aeson-1.4.6.0-1vlLc -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From Thorsten.Altenkirch at nottingham.ac.uk Sat May 2 14:29:29 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 2 May 2020 12:29:29 +0000 Subject: [Agda] installation trouble WAS Re: why is this corecursion red? And indexed coinductive definitions. Message-ID: <985E4460-C07B-486C-89B9-1ADFE6CCECFE@nottingham.ac.uk> Ok I was brave and installed the latest agda version. txa at sean agda % agda --version Agda version 2.6.2-077b5ef-dirty But now emacs (that is aquamacs) complains: The Agda mode?s version (2.6.1) does not match that of agda (2.6.2) Ok I say txa at sean agda % agda-mode setup but it replies agda-mode: emacs: rawSystem: runInteractiveProcess: exec: does not exist (No such file or directory) I haven't seen this one before. It seems it cannot find emacs (I am used aquamacs). Any ideas? Thorsten ?On 01/05/2020, 13:11, "Guillaume Allais" wrote: Hi Thorsten, What you are missing is that the type of the second field depends on the value of the first one which is not the case in your shrunk example. Andreas recently fixed a bug involving this type of scenario: https://github.com/agda/agda/pull/4424 So you may want to test your example on the development version of Agda. guillaume Ps: note that your example file is not self-contained: the module "delta-i" is missing. On 01/05/2020 12:35, Thorsten Altenkirch wrote: > Hi everybody, > > There are two issues here: the first is that I don?t understand why the termination checker accepts one definition and rejects another. The 2nd is the observation that the particular coinductive definition I am interested in doesn?t seem to be reducible to more primitive coinductive definitions. > > I am trying to implement Reedy fibrations using coinduction and I have a problem with corecursion. Ok, I am not expecting that everybody already knows what Reedy fibrations are so I tried to cook down the problem to a simple case. But the simple case passes the termination checker while the one I am actually interested in doesn?t. ? > > I may be overlooking something obvious. > > Here is my trivial example ? a coinductive definition of (n : ?) ? A n : > > record ?? (A : ? ? Set) : Set where > coinductive > field > hd : A 0 > tl : ?? (? n ? A (suc n)) > > and here is a function that translates a function into its coinductive representation using corecursion: > > mk?? : {A : ? ? Set} ? ((n : ?) ? A n) ? ?? A > hd (mk?? {A} f) = f 0 > tl (mk?? {A} f) = mk?? (? n ? f (suc n)) > > No problem. But I want to do something similar for directed categories (i.e.all the morphisms apart from identities point in one direction). Instead of composing with suc I use an operation > > shift : (C : DCat)(X : Obj C 0 ? Set) ? DCat > > which does something similar to directed categories. I attach a file for the details. > > record ReedyFib (C : DCat) : Set? where > coinductive > field > hd : Obj C 0 ? Set > tl : ReedyFib (shift C hd) > > and then I want to create a ReedyFib from a strict presheaf using another operation > > shiftPSh : {C : DCat}(F : PSh C) ? PSh (shift C (Fzero F)) > > which shifts presheaves as before composition with suc shifted the function. > > psh?rfib : {C : DCat} ? PSh C ? ReedyFib C > hd (psh?rfib {C} F) = Fzero F > tl (psh?rfib {C} F) = psh?rfib (shiftPSh F) > > To me this looks very similar to the example above hence I don?t understand why the termination checker rejects one and accepts the other. I thought maybe it is the negative occurrence of Obj C 0 but I tried a simple example for this (see file) and there is no problem. > > What am I missing? > > I realize that all examples change a parameter in the coinductive definition hence it is not clear how to reduce this to basic coinductive types. Actually a better way would be to allow to define dependent records and coinductive types. To handle this we need destructors instead of fields, e.g. it should look like this: > > record ReedyFib : DCat ? Set? where > coinductive > destructors > hd : (C : DCat) ? ReedyFib C ? Obj C 0 ? Set > tl : (C : DCat) ? ReedyFib C ? ReedyFib (shift C (hd C)) > > We had previously discussed the case of coinductive vectors which using destructors look like this: > > record Vec : ? ? Set where > coinductive > destructor > hd : {n : ?} ? Vec (suc n) ? A > tl : {n : ?} ? Vec (suc n) ? Vec n > > but in this case we can simulate destructors using equality: > > record Vec (m : ?) : Set where > coinductive > field > hd-eq : {n : ?} ? (m ? suc n) ? A > tl-eq : {n : ?} ? (m ? suc n) ? Vec n > > However, this only works because Vec appears recursively ?unconstrained? which is not the case in my examples. > > Thorsten > > > > > > > > > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From Thorsten.Altenkirch at nottingham.ac.uk Sat May 2 14:39:15 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 2 May 2020 12:39:15 +0000 Subject: [Agda] installation trouble WAS Re: why is this corecursion red? And indexed coinductive definitions. In-Reply-To: <985E4460-C07B-486C-89B9-1ADFE6CCECFE@nottingham.ac.uk> References: <985E4460-C07B-486C-89B9-1ADFE6CCECFE@nottingham.ac.uk> Message-ID: Sorry - problem solved. The old path was hard coded in the .emacs. But I am still puzzled why agda-mode doesn't work from the terminal? Thorsten ?On 02/05/2020, 13:29, "Agda on behalf of Thorsten Altenkirch" wrote: Ok I was brave and installed the latest agda version. txa at sean agda % agda --version Agda version 2.6.2-077b5ef-dirty But now emacs (that is aquamacs) complains: The Agda mode?s version (2.6.1) does not match that of agda (2.6.2) Ok I say txa at sean agda % agda-mode setup but it replies agda-mode: emacs: rawSystem: runInteractiveProcess: exec: does not exist (No such file or directory) I haven't seen this one before. It seems it cannot find emacs (I am used aquamacs). Any ideas? Thorsten On 01/05/2020, 13:11, "Guillaume Allais" wrote: Hi Thorsten, What you are missing is that the type of the second field depends on the value of the first one which is not the case in your shrunk example. Andreas recently fixed a bug involving this type of scenario: https://github.com/agda/agda/pull/4424 So you may want to test your example on the development version of Agda. guillaume Ps: note that your example file is not self-contained: the module "delta-i" is missing. On 01/05/2020 12:35, Thorsten Altenkirch wrote: > Hi everybody, > > There are two issues here: the first is that I don?t understand why the termination checker accepts one definition and rejects another. The 2nd is the observation that the particular coinductive definition I am interested in doesn?t seem to be reducible to more primitive coinductive definitions. > > I am trying to implement Reedy fibrations using coinduction and I have a problem with corecursion. Ok, I am not expecting that everybody already knows what Reedy fibrations are so I tried to cook down the problem to a simple case. But the simple case passes the termination checker while the one I am actually interested in doesn?t. ? > > I may be overlooking something obvious. > > Here is my trivial example ? a coinductive definition of (n : ?) ? A n : > > record ?? (A : ? ? Set) : Set where > coinductive > field > hd : A 0 > tl : ?? (? n ? A (suc n)) > > and here is a function that translates a function into its coinductive representation using corecursion: > > mk?? : {A : ? ? Set} ? ((n : ?) ? A n) ? ?? A > hd (mk?? {A} f) = f 0 > tl (mk?? {A} f) = mk?? (? n ? f (suc n)) > > No problem. But I want to do something similar for directed categories (i.e.all the morphisms apart from identities point in one direction). Instead of composing with suc I use an operation > > shift : (C : DCat)(X : Obj C 0 ? Set) ? DCat > > which does something similar to directed categories. I attach a file for the details. > > record ReedyFib (C : DCat) : Set? where > coinductive > field > hd : Obj C 0 ? Set > tl : ReedyFib (shift C hd) > > and then I want to create a ReedyFib from a strict presheaf using another operation > > shiftPSh : {C : DCat}(F : PSh C) ? PSh (shift C (Fzero F)) > > which shifts presheaves as before composition with suc shifted the function. > > psh?rfib : {C : DCat} ? PSh C ? ReedyFib C > hd (psh?rfib {C} F) = Fzero F > tl (psh?rfib {C} F) = psh?rfib (shiftPSh F) > > To me this looks very similar to the example above hence I don?t understand why the termination checker rejects one and accepts the other. I thought maybe it is the negative occurrence of Obj C 0 but I tried a simple example for this (see file) and there is no problem. > > What am I missing? > > I realize that all examples change a parameter in the coinductive definition hence it is not clear how to reduce this to basic coinductive types. Actually a better way would be to allow to define dependent records and coinductive types. To handle this we need destructors instead of fields, e.g. it should look like this: > > record ReedyFib : DCat ? Set? where > coinductive > destructors > hd : (C : DCat) ? ReedyFib C ? Obj C 0 ? Set > tl : (C : DCat) ? ReedyFib C ? ReedyFib (shift C (hd C)) > > We had previously discussed the case of coinductive vectors which using destructors look like this: > > record Vec : ? ? Set where > coinductive > destructor > hd : {n : ?} ? Vec (suc n) ? A > tl : {n : ?} ? Vec (suc n) ? Vec n > > but in this case we can simulate destructors using equality: > > record Vec (m : ?) : Set where > coinductive > field > hd-eq : {n : ?} ? (m ? suc n) ? A > tl-eq : {n : ?} ? (m ? suc n) ? Vec n > > However, this only works because Vec appears recursively ?unconstrained? which is not the case in my examples. > > Thorsten > > > > > > > > > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From Thorsten.Altenkirch at nottingham.ac.uk Sat May 2 14:55:50 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 2 May 2020 12:55:50 +0000 Subject: [Agda] why is this corecursion red? And indexed coinductive definitions. In-Reply-To: <973f29d0-ba29-0024-0b31-90d0bd162ccc@ens-lyon.org> References: <3D9C5A4F-72BB-42EC-8CD4-14058AB8EBE0@nottingham.ac.uk> <973f29d0-ba29-0024-0b31-90d0bd162ccc@ens-lyon.org> Message-ID: Thank you Guillaume! After updating to the latest version the definition goes through. Thorsten ?On 01/05/2020, 13:11, "Guillaume Allais" wrote: Hi Thorsten, What you are missing is that the type of the second field depends on the value of the first one which is not the case in your shrunk example. Andreas recently fixed a bug involving this type of scenario: https://github.com/agda/agda/pull/4424 So you may want to test your example on the development version of Agda. guillaume Ps: note that your example file is not self-contained: the module "delta-i" is missing. On 01/05/2020 12:35, Thorsten Altenkirch wrote: > Hi everybody, > > There are two issues here: the first is that I don?t understand why the termination checker accepts one definition and rejects another. The 2nd is the observation that the particular coinductive definition I am interested in doesn?t seem to be reducible to more primitive coinductive definitions. > > I am trying to implement Reedy fibrations using coinduction and I have a problem with corecursion. Ok, I am not expecting that everybody already knows what Reedy fibrations are so I tried to cook down the problem to a simple case. But the simple case passes the termination checker while the one I am actually interested in doesn?t. ? > > I may be overlooking something obvious. > > Here is my trivial example ? a coinductive definition of (n : ?) ? A n : > > record ?? (A : ? ? Set) : Set where > coinductive > field > hd : A 0 > tl : ?? (? n ? A (suc n)) > > and here is a function that translates a function into its coinductive representation using corecursion: > > mk?? : {A : ? ? Set} ? ((n : ?) ? A n) ? ?? A > hd (mk?? {A} f) = f 0 > tl (mk?? {A} f) = mk?? (? n ? f (suc n)) > > No problem. But I want to do something similar for directed categories (i.e.all the morphisms apart from identities point in one direction). Instead of composing with suc I use an operation > > shift : (C : DCat)(X : Obj C 0 ? Set) ? DCat > > which does something similar to directed categories. I attach a file for the details. > > record ReedyFib (C : DCat) : Set? where > coinductive > field > hd : Obj C 0 ? Set > tl : ReedyFib (shift C hd) > > and then I want to create a ReedyFib from a strict presheaf using another operation > > shiftPSh : {C : DCat}(F : PSh C) ? PSh (shift C (Fzero F)) > > which shifts presheaves as before composition with suc shifted the function. > > psh?rfib : {C : DCat} ? PSh C ? ReedyFib C > hd (psh?rfib {C} F) = Fzero F > tl (psh?rfib {C} F) = psh?rfib (shiftPSh F) > > To me this looks very similar to the example above hence I don?t understand why the termination checker rejects one and accepts the other. I thought maybe it is the negative occurrence of Obj C 0 but I tried a simple example for this (see file) and there is no problem. > > What am I missing? > > I realize that all examples change a parameter in the coinductive definition hence it is not clear how to reduce this to basic coinductive types. Actually a better way would be to allow to define dependent records and coinductive types. To handle this we need destructors instead of fields, e.g. it should look like this: > > record ReedyFib : DCat ? Set? where > coinductive > destructors > hd : (C : DCat) ? ReedyFib C ? Obj C 0 ? Set > tl : (C : DCat) ? ReedyFib C ? ReedyFib (shift C (hd C)) > > We had previously discussed the case of coinductive vectors which using destructors look like this: > > record Vec : ? ? Set where > coinductive > destructor > hd : {n : ?} ? Vec (suc n) ? A > tl : {n : ?} ? Vec (suc n) ? Vec n > > but in this case we can simulate destructors using equality: > > record Vec (m : ?) : Set where > coinductive > field > hd-eq : {n : ?} ? (m ? suc n) ? A > tl-eq : {n : ?} ? (m ? suc n) ? Vec n > > However, this only works because Vec appears recursively ?unconstrained? which is not the case in my examples. > > Thorsten > > > > > > > > > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From asr at eafit.edu.co Sat May 2 15:34:34 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 2 May 2020 08:34:34 -0500 Subject: [Agda] failure of cabal install Agda In-Reply-To: <18ecd174-202d-52d8-a616-1c1c77320134@free.fr> References: <3c90f29c-0932-490f-1f72-a3d59fbd31a0@ifi.lmu.de> <18ecd174-202d-52d8-a616-1c1c77320134@free.fr> Message-ID: On Wed, 18 Mar 2020 at 11:26, Michel Levy wrote: > > I have try this > > michel at M1330:~$ cabal install gitrev > Resolving dependencies... > All the requested packages are already installed: > gitrev-1.3.1 > Use --reinstall if you want to reinstall anyway. > > And reinstall is not a command for cabal. > Note that `reinstall` is a flag for `cabal install`: $ cabal install gitrev --reinstall -- Andr?s From asr at eafit.edu.co Sat May 2 15:45:47 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 2 May 2020 08:45:47 -0500 Subject: [Agda] install agda In-Reply-To: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> Message-ID: I'm not familiar with installing two versions of Agda in the setup you mentioned. For installing Agda 2.6.1 I would try: $ cabal get Agda $ cd Agda-2.6.1 $ cabal sandbox init $ cabal install On Sat, 2 May 2020 at 05:29, Michel Levy wrote: > > I try again to run two agda versions, one is my old agda version 2.5.3 > installed by the Ubuntu package, the other was supposed to be installed > with "cabal install Agda" But I am still with the same error, I > described in this list the 18 March, and that I can't solved. Can you > help me ? > > Andr?s Sicard-Ram?rez wrote "It seems you are mixing the installation of > Agda from Ubuntu packages and from Hackage". Why it's not possible to > install two versions of agda, one with ubuntu and the other with cabal ? > > Resolving dependencies... > Configuring Agda-2.6.1... > Building Agda-2.6.1... > Failed to install Agda-2.6.1 > Build log ( /home/michel/.cabal/logs/Agda-2.6.1.log ): > cabal: Entering directory '/tmp/cabal-tmp-7014/Agda-2.6.1' > [1 of 1] Compiling Main ( > /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/setup.hs, > /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/Main.o ) > Linking /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/setup ... > Configuring Agda-2.6.1... > Building Agda-2.6.1... > Preprocessing library Agda-2.6.1... > [ 1 of 369] Compiling Paths_Agda ( > dist/build/autogen/Paths_Agda.hs, dist/build/Paths_Agda.o ) > [ 2 of 369] Compiling Agda.Version ( src/full/Agda/Version.hs, > dist/build/Agda/Version.o ) > [ 3 of 369] Compiling Agda.VersionCommit ( > src/full/Agda/VersionCommit.hs, dist/build/Agda/VersionCommit.o ) > > src/full/Agda/VersionCommit.hs:5:1: error: > Failed to load interface for ?Development.GitRev? > There are files missing in the > ?gitrev-1.3.1 at gitrev-1.3.1-6KBEbA9rw49F9GCJBEz6uX? package, > try running 'ghc-pkg check'. > Use -v to see a list of the files searched for. > cabal: Leaving directory '/tmp/cabal-tmp-7014/Agda-2.6.1' > cabal: Error: some packages failed to install: > Agda-2.6.1 failed during the building phase. The exception was: > ExitFailure 1 > > I run 'ghc-pkg check' and that give me many pages of errors starting with > > ghc-pkg check > There are problems in package aeson-1.4.6.0: > Warning: library-dirs: > /home/michel/.cabal/lib/i386-linux-ghc-8.0.2/aeson-1.4.6.0-1vlLcAj8kIrJVlnNw4kUo5 > doesn't exist or isn't a directory > Warning: dynamic-library-dirs: > /home/michel/.cabal/lib/i386-linux-ghc-8.0.2 doesn't exist or isn't a > directory > import-dirs: > /home/michel/.cabal/lib/i386-linux-ghc-8.0.2/aeson-1.4.6.0-1vlLc > > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. -- Andr?s From michel.levy.imag at free.fr Sat May 2 18:05:41 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sat, 2 May 2020 18:05:41 +0200 Subject: [Agda] install agda In-Reply-To: References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> Message-ID: <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> I followed the instructions you gave below. And thanks to you, I was able to install Agda-2.6.1, but it wasn't easy. After the command "cabal install", I got the following message: michel at M1330:~/Agda-2.6.1$ cabal install Resolving dependencies... In order, the following would be installed: dlist-0.8.0.8 (via: aeson-1.4.1.0) (new package) exceptions-0.10.4 (via: Agda-2.6.1) (new package) After a very long list of packages to reinstall, I got the message : cabal: The following packages are likely to be broken by the reinstalls: Agda-2.5.3 Use --force-reinstalls if you want to install anyway. I forced the reinstall, which allowed to install all these missing packages and after a first failure to reinstall Agda-2.6.1 on the following error 292 of 369] Compiling Agda.TypeChecking.Rewriting.NonLinMatch ( src/full/Agda/TypeChecking/Rewriting/NonLinMatch.hs, dist/dist-sandbox-a8ebf48f/build/Agda/TypeChecking/Rewriting/NonLinMatch.o ) ghc: out of memory (requested 1048576 bytes) "cabal: Leaving directory. cabal: Error: some packages failed to install: I started again with "cabal install" and this time the installation seems to be complete. But I don't know how to use it. And the previous installation is not broken (fortunately) and still working with emacs. Hence my question: where to find the new installation in the directory Agda-2.6.1 and how to reinstall the agda command and the agda mode . Le 02/05/2020 ? 15:45, Andr?s Sicard-Ram?rez a ?crit?: > I'm not familiar with installing two versions of Agda in the setup you > mentioned. For installing Agda 2.6.1 I would try: > > $ cabal get Agda > $ cd Agda-2.6.1 > $ cabal sandbox init > $ cabal install > > On Sat, 2 May 2020 at 05:29, Michel Levy wrote: >> I try again to run two agda versions, one is my old agda version 2.5.3 >> installed by the Ubuntu package, the other was supposed to be installed >> with "cabal install Agda" But I am still with the same error, I >> described in this list the 18 March, and that I can't solved. Can you >> help me ? >> >> Andr?s Sicard-Ram?rez wrote "It seems you are mixing the installation of >> Agda from Ubuntu packages and from Hackage". Why it's not possible to >> install two versions of agda, one with ubuntu and the other with cabal ? >> >> Resolving dependencies... >> Configuring Agda-2.6.1... >> Building Agda-2.6.1... >> Failed to install Agda-2.6.1 >> Build log ( /home/michel/.cabal/logs/Agda-2.6.1.log ): >> cabal: Entering directory '/tmp/cabal-tmp-7014/Agda-2.6.1' >> [1 of 1] Compiling Main ( >> /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/setup.hs, >> /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/Main.o ) >> Linking /tmp/cabal-tmp-7014/Agda-2.6.1/dist/setup/setup ... >> Configuring Agda-2.6.1... >> Building Agda-2.6.1... >> Preprocessing library Agda-2.6.1... >> [ 1 of 369] Compiling Paths_Agda ( >> dist/build/autogen/Paths_Agda.hs, dist/build/Paths_Agda.o ) >> [ 2 of 369] Compiling Agda.Version ( src/full/Agda/Version.hs, >> dist/build/Agda/Version.o ) >> [ 3 of 369] Compiling Agda.VersionCommit ( >> src/full/Agda/VersionCommit.hs, dist/build/Agda/VersionCommit.o ) >> >> src/full/Agda/VersionCommit.hs:5:1: error: >> Failed to load interface for ?Development.GitRev? >> There are files missing in the >> ?gitrev-1.3.1 at gitrev-1.3.1-6KBEbA9rw49F9GCJBEz6uX? package, >> try running 'ghc-pkg check'. >> Use -v to see a list of the files searched for. >> cabal: Leaving directory '/tmp/cabal-tmp-7014/Agda-2.6.1' >> cabal: Error: some packages failed to install: >> Agda-2.6.1 failed during the building phase. The exception was: >> ExitFailure 1 >> >> I run 'ghc-pkg check' and that give me many pages of errors starting with >> >> ghc-pkg check >> There are problems in package aeson-1.4.6.0: >> Warning: library-dirs: >> /home/michel/.cabal/lib/i386-linux-ghc-8.0.2/aeson-1.4.6.0-1vlLcAj8kIrJVlnNw4kUo5 >> doesn't exist or isn't a directory >> Warning: dynamic-library-dirs: >> /home/michel/.cabal/lib/i386-linux-ghc-8.0.2 doesn't exist or isn't a >> directory >> import-dirs: >> /home/michel/.cabal/lib/i386-linux-ghc-8.0.2/aeson-1.4.6.0-1vlLc >> >> >> -- >> courriel : michel.levy.imag at free.fr >> mobile : 06 59 13 42 53 >> web : michel.levy.imag.free.fr >> >> La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. > -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From asr at eafit.edu.co Sat May 2 18:13:39 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 2 May 2020 11:13:39 -0500 Subject: [Agda] install agda In-Reply-To: <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> Message-ID: On Sat, 2 May 2020 at 11:05, Michel Levy wrote: > Hence my question: where to find the new > installation in the directory Agda-2.6.1 and how to reinstall the agda > command and the agda mode . The new commands are in the directory `Agda-2.6.1/.cabal-sandbox/bin`. -- Andr?s From michel.levy.imag at free.fr Sat May 2 19:22:29 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sat, 2 May 2020 19:22:29 +0200 Subject: [Agda] install agda In-Reply-To: References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> Message-ID: <260be6c6-b7a5-6e90-6f92-86920aaedfb7@free.fr> Thank you really much for your help. I copied agda and agda-mode in my /home/michel/bin directory. But I have another problem, when I use emacs with a file test.agda : File mode specification error: (error The Agda mode?s version (2.5.3) does not match that of agda (2.6.1).) michel at M1330:~$ agda-mode locate /home/michel/Agda-2.6.1/.cabal-sandbox/share/i386-linux-ghc-8.0.2/Agda-2.6.1/emacs-mode/agda2.el What should I do to install the Agda mode's version 2.6.1 ? The files for emacs are in the above directory emacs-mode, where to put these files ? Now the files for emacs are in the directory /usr/share/emacs25/site-lisp/elpa/agda2-mode-2.5.3. > On Sat, 2 May 2020 at 11:05, Michel Levy wrote: >> Hence my question: where to find the new >> installation in the directory Agda-2.6.1 and how to reinstall the agda >> command and the agda mode . > The new commands are in the directory `Agda-2.6.1/.cabal-sandbox/bin`. > -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From asr at eafit.edu.co Sat May 2 20:03:02 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 2 May 2020 13:03:02 -0500 Subject: [Agda] install agda In-Reply-To: <260be6c6-b7a5-6e90-6f92-86920aaedfb7@free.fr> References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> <260be6c6-b7a5-6e90-6f92-86920aaedfb7@free.fr> Message-ID: Do you really need the two versions of Agda installed? If so, since we know you can install both versions, I suggest to remove the version installed from Ubuntu and install both versions from hackage. I would start by doing a fresh install of 2.5.3. On Sat, 2 May 2020 at 12:22, Michel Levy wrote: > > Thank you really much for your help. I copied agda and agda-mode in my > /home/michel/bin directory. > > But I have another problem, when I use emacs with a file test.agda : > File mode specification error: (error The Agda mode?s version (2.5.3) > does not match that of agda (2.6.1).) > > michel at M1330:~$ agda-mode locate > /home/michel/Agda-2.6.1/.cabal-sandbox/share/i386-linux-ghc-8.0.2/Agda-2.6.1/emacs-mode/agda2.el > > What should I do to install the Agda mode's version 2.6.1 ? The files > for emacs are in the above directory emacs-mode, where to put these files ? > > Now the files for emacs are in the directory > /usr/share/emacs25/site-lisp/elpa/agda2-mode-2.5.3. > > > On Sat, 2 May 2020 at 11:05, Michel Levy wrote: > >> Hence my question: where to find the new > >> installation in the directory Agda-2.6.1 and how to reinstall the agda > >> command and the agda mode . > > The new commands are in the directory `Agda-2.6.1/.cabal-sandbox/bin`. > > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. -- Andr?s From michel.levy.imag at free.fr Sat May 2 21:22:18 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sat, 2 May 2020 21:22:18 +0200 Subject: [Agda] install agda In-Reply-To: References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> <260be6c6-b7a5-6e90-6f92-86920aaedfb7@free.fr> Message-ID: Hi Andres, No I need only the version 2.6.1. But the problem of the emacs mode agda remains. This mode in the version 2.5.3 was installed by the ubuntu package elpa-agda2-mode.? But now, without this package, where I have to install the files of the directory emacs-mode ? It's not explained in the agda doc, agda.readthedocs.io. Can you explain, how you installed this agda mode on your emacs ? Le 02/05/2020 ? 19:46, Andr?s Sicard-Ram?rez a ?crit?: > Hi Michel, > > Do you really need the two versions of Agda installed? > > I as said, I'm not familiar with installing two versions of Agda in > your setup (Ubuntu package and from Hackage). > > Best, > > > On Sat, 2 May 2020 at 12:22, Michel Levy wrote: >> Thank you really much for your help. I copied agda and agda-mode in my >> /home/michel/bin directory. >> >> But I have another problem, when I use emacs with a file test.agda : >> File mode specification error: (error The Agda mode?s version (2.5.3) >> does not match that of agda (2.6.1).) >> >> michel at M1330:~$ agda-mode locate >> /home/michel/Agda-2.6.1/.cabal-sandbox/share/i386-linux-ghc-8.0.2/Agda-2.6.1/emacs-mode/agda2.el >> >> What should I do to install the Agda mode's version 2.6.1 ? The files >> for emacs are in the above directory emacs-mode, where to put these files ? >> >> Now the files for emacs are in the directory >> /usr/share/emacs25/site-lisp/elpa/agda2-mode-2.5.3. >> >>> On Sat, 2 May 2020 at 11:05, Michel Levy wrote: >>>> Hence my question: where to find the new >>>> installation in the directory Agda-2.6.1 and how to reinstall the agda >>>> command and the agda mode . >>> The new commands are in the directory `Agda-2.6.1/.cabal-sandbox/bin`. >>> >> -- >> courriel : michel.levy.imag at free.fr >> mobile : 06 59 13 42 53 >> web : michel.levy.imag.free.fr >> >> La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. > > -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From asr at eafit.edu.co Sat May 2 22:35:52 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Sat, 2 May 2020 15:35:52 -0500 Subject: [Agda] install agda In-Reply-To: References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> <260be6c6-b7a5-6e90-6f92-86920aaedfb7@free.fr> Message-ID: Hi Michel, In this case, uninstall the Ubuntu packages and install Agda without sandboxes using $ cabal install Agda On Sat, 2 May 2020 at 14:22, Michel Levy wrote: > > Hi Andres, > > No I need only the version 2.6.1. But the problem of the emacs mode agda > remains. This mode in the version 2.5.3 was installed by the ubuntu > package elpa-agda2-mode. But now, without this package, where I have to > install the files of the directory emacs-mode ? It's not explained in > the agda doc, agda.readthedocs.io. Can you explain, how you installed > this agda mode on your emacs ? > > Le 02/05/2020 ? 19:46, Andr?s Sicard-Ram?rez a ?crit : > > Hi Michel, > > > > Do you really need the two versions of Agda installed? > > > > I as said, I'm not familiar with installing two versions of Agda in > > your setup (Ubuntu package and from Hackage). > > > > Best, > > > > > > On Sat, 2 May 2020 at 12:22, Michel Levy wrote: > >> Thank you really much for your help. I copied agda and agda-mode in my > >> /home/michel/bin directory. > >> > >> But I have another problem, when I use emacs with a file test.agda : > >> File mode specification error: (error The Agda mode?s version (2.5.3) > >> does not match that of agda (2.6.1).) > >> > >> michel at M1330:~$ agda-mode locate > >> /home/michel/Agda-2.6.1/.cabal-sandbox/share/i386-linux-ghc-8.0.2/Agda-2.6.1/emacs-mode/agda2.el > >> > >> What should I do to install the Agda mode's version 2.6.1 ? The files > >> for emacs are in the above directory emacs-mode, where to put these files ? > >> > >> Now the files for emacs are in the directory > >> /usr/share/emacs25/site-lisp/elpa/agda2-mode-2.5.3. > >> > >>> On Sat, 2 May 2020 at 11:05, Michel Levy wrote: > >>>> Hence my question: where to find the new > >>>> installation in the directory Agda-2.6.1 and how to reinstall the agda > >>>> command and the agda mode . > >>> The new commands are in the directory `Agda-2.6.1/.cabal-sandbox/bin`. > >>> > >> -- > >> courriel : michel.levy.imag at free.fr > >> mobile : 06 59 13 42 53 > >> web : michel.levy.imag.free.fr > >> > >> La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. > > > > > -- > courriel : michel.levy.imag at free.fr > mobile : 06 59 13 42 53 > web : michel.levy.imag.free.fr > > La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. -- Andr?s From michel.levy.imag at free.fr Sat May 2 22:53:35 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sat, 2 May 2020 22:53:35 +0200 Subject: [Agda] install agda In-Reply-To: References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> <260be6c6-b7a5-6e90-6f92-86920aaedfb7@free.fr> Message-ID: <010b3649-6952-272e-13f8-c419a667d453@free.fr> ??? Hi, Andr?s I removed (before your last message) all the agda packages installed by Ubuntu and that was the solution of all my problems. Actually the command agda-mode with the parameter compile has compiled the files .el in .elc of the directory emacs-mode and this directory is used via the file .emacs to execute the agda mode under emacs. In .emacs you have the expression (shell-command-to-string "agda-mode locate") and with that expression, emacs finds where are the files .el and .elc needed to have the agda mode. Thank you really much for you help.? Le 02/05/2020 ? 21:22, Michel Levy a ?crit?: > Hi Andres, > > No I need only the version 2.6.1. But the problem of the emacs mode agda > remains. This mode in the version 2.5.3 was installed by the ubuntu > package elpa-agda2-mode.? But now, without this package, where I have to > install the files of the directory emacs-mode ? It's not explained in > the agda doc, agda.readthedocs.io. Can you explain, how you installed > this agda mode on your emacs ? > > Le 02/05/2020 ? 19:46, Andr?s Sicard-Ram?rez a ?crit?: >> Hi Michel, >> >> Do you really need the two versions of Agda installed? >> >> I as said, I'm not familiar with installing two versions of Agda in >> your setup (Ubuntu package and from Hackage). >> >> Best, >> >> >> On Sat, 2 May 2020 at 12:22, Michel Levy wrote: >>> Thank you really much for your help. I copied agda and agda-mode in my >>> /home/michel/bin directory. >>> >>> But I have another problem, when I use emacs with a file test.agda : >>> File mode specification error: (error The Agda mode?s version (2.5.3) >>> does not match that of agda (2.6.1).) >>> >>> michel at M1330:~$ agda-mode locate >>> /home/michel/Agda-2.6.1/.cabal-sandbox/share/i386-linux-ghc-8.0.2/Agda-2.6.1/emacs-mode/agda2.el >>> >>> What should I do to install the Agda mode's version 2.6.1 ? The files >>> for emacs are in the above directory emacs-mode, where to put these files ? >>> >>> Now the files for emacs are in the directory >>> /usr/share/emacs25/site-lisp/elpa/agda2-mode-2.5.3. >>> >>>> On Sat, 2 May 2020 at 11:05, Michel Levy wrote: >>>>> Hence my question: where to find the new >>>>> installation in the directory Agda-2.6.1 and how to reinstall the agda >>>>> command and the agda mode . >>>> The new commands are in the directory `Agda-2.6.1/.cabal-sandbox/bin`. >>>> >>> -- >>> courriel : michel.levy.imag at free.fr >>> mobile : 06 59 13 42 53 >>> web : michel.levy.imag.free.fr >>> >>> La informaci?n contenida en este correo electr?nico est? dirigida ?nicamente a su destinatario y puede contener informaci?n confidencial, material privilegiado o informaci?n protegida por derecho de autor. Est? prohibida cualquier copia, utilizaci?n, indebida retenci?n, modificaci?n, difusi?n, distribuci?n o reproducci?n total o parcial. Si usted recibe este mensaje por error, por favor contacte al remitente y elim?nelo. La informaci?n aqu? contenida es responsabilidad exclusiva de su remitente por lo tanto la Universidad EAFIT no se hace responsable de lo que el mensaje contenga. The information contained in this email is addressed to its recipient only and may contain confidential information, privileged material or information protected by copyright. Its prohibited any copy, use, improper retention, modification, dissemination, distribution or total or partial reproduction. If you receive this message by error, please contact the sender and delete it. The information contained herein is the sole responsibility of the sender therefore Universidad EAFIT is not responsible for what the message contains. >> -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From william.lawrence.harrison at gmail.com Sun May 3 16:59:42 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Sun, 3 May 2020 10:59:42 -0400 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that In-Reply-To: <6fcfe29c-69b6-d463-bcd4-dc1fab3d3152@ens-lyon.org> References: <6fcfe29c-69b6-d463-bcd4-dc1fab3d3152@ens-lyon.org> Message-ID: <31BE7359-C228-432B-883B-6D61FC624960@gmail.com> This is just a follow-up question to my questions from last week about colists, mainly to check my understanding. Consider these typical definitions in Data.Colist that depend on Data.Thunk/sized types: [_] : <> A ? <> Colist A ? [ a ] = <> a ? ? <> where <> . <>force ? <> [] <>length : <> Colist A i ? <> Conat i length [] = <> zero length ( <>x ? xs ) <> = <> suc ? <> where <> . <>force ? <> length ( <>xs . <>force ) <> The phrase ? <>? <> where <> . <>force ? ? <>? effectively plays the role of ?freeze? in conventional presentations of thunks while passing .force (e.g., ? <>xs . <>force ?) is effectively ?thaw?. Is that right? <> <> Thanks Again, <> Bill <> > On Apr 29, 2020, at 2:53 PM, Guillaume Allais wrote: > > Hi William, > > In the standard library we use a notion of `Thunk` for sized codata. > This gives you definitions that look essentially like the ones using > musical notations but on which you can define more compositional > operations thanks to sized types. > > You can find colist here: > http://agda.github.io/agda-stdlib/Codata.Colist.html > > And what you call transcript corresponds to our cowriter: > http://agda.github.io/agda-stdlib/Codata.Cowriter.html > > Both come with various functions, including an `unfold` one that is > a generalisation of your `iterate` where we distinguish between the > type of the internal state and the type of the values outputted in > the codatatype. > > Best, > guillaume > > > On 29/04/2020 17:58, William Harrison wrote: >> Hi- >> >> I have a question about the best way to handle colists ? aka, potentially infinite lists as opposed to streams ? in Agda. I give some examples below in Haskell and Agda, and I?ve also attached *.hs and *.agda files with complete, stand-alone definitions. >> >> In Haskell, the built-in iterate function always produces an infinite list: >> >> iterate :: (a -> a) -> a -> [a] >> iterate f a = a : iterate f (f a) >> >> This can be represented in Agda using a Stream (defined as a coinductive record): >> >> iterate : ? {a} ? (a ? a) ? a ? Stream a >> hd (iterate f a) = a >> tl (iterate f a) = iterate f (f a) >> >> Now, back in Haskell, we can define a *potentially* infinite list by introducing Maybe in the codomain of f: >> >> iterate1 :: (a -> Maybe a) -> a -> [a] >> iterate1 f a = a : case f a of >> Just a1 -> iterate1 f a1 >> Nothing -> [] >> >> Using the musical notation for coinduction in Agda, I can get something similar: >> >> data Colist (A : Set) : Set where >> [] : Colist A >> _?_ : A ? (? (Colist A)) ? Colist A >> >> iterate1 : ? {a} ? (a ? Maybe a) ? a ? Colist a >> iterate1 f a = a ? ? (case f a of >> ? { (just a?) ? (iterate1 f a?) >> ; nothing ? [] >> }) >> >> My question is, how do I use coinductive records to define Colist rather than musical notation. Is there a standard approach? That isn?t clear. I'm supposing that musical notation should be avoided. >> >> What I?m really trying to define is analogous functions to iterate for what I?ll call the transcript data type, defined below in Haskell and Agda: >> >> data T e a = e :<< T e a | V a ? a "transcript"; like a list with an "answer" >> >> data T (e : Set) (a : Set) : Set where >> V : a ? T e a >> _<<_ : e ? ? (T e a) ? T e a >> >> All these definitions are given in the attached files. >> >> Thanks! >> Bill >> >> >> >> >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Sun May 3 18:50:31 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Sun, 3 May 2020 18:50:31 +0200 Subject: [Agda] Boolean And in Pair Message-ID: Hello, when I load the following script, I get a ? not in scope ? ? error. Why is that? Furthermore, how can I make the eq function generic, whichever the types used in the Pair, as long as the first type is equal to the second? Many thanks. Philippe open import Agda.Builtin.Nat open import Agda.Builtin.String open import Agda.Builtin.Bool record Pair (A B : Set) : Set where field fst : A snd : B _eq_ : (a : Pair Nat Nat) ? (b : Pair Nat Nat) ? Bool a eq b = (Pair.fst a == Pair.fst b) ? (Pair.snd a == Pair.snd b) -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Sun May 3 19:56:16 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sun, 3 May 2020 18:56:16 +0100 Subject: [Agda] Boolean And in Pair In-Reply-To: References: Message-ID: <900550a2-438b-3c70-04dd-d877853ec47a@strath.ac.uk> Hi Philippe, You can see from the source code of `Agda.Builtin.Bool` that it defines only `Bool`, `true`, and `false`. If you want some operations on Booleans, you can either define them yourself or get them from a library, e.g, stdlib's `Data.Bool`. It's best practice to not import `Agda.Builtin` modules unless you really have to (e.g, if you are writing your own base library). They may change between versions. For making your `eq` generic, the simplest thing to do would be to take as arguments decision procedures for the `fst`s and `snd`s, respectively. The type should be `{A B : Set} ? ((a a? : A) ? Bool) ? ((b b? : B) ? Bool) ? (ab ab? : Pair A B) ? Bool`. Additionally, you might want to add `open Pair public` after your definition of `Pair`, so that you don't have to qualify `fst` and `snd`. There's an example of this in stdlib's definition of `?` (somewhere around `Data.Product`). Regards, James On 03/05/2020 17:50, Philippe de Rochambeau wrote: > Hello, > > when I load the following script, I get a ? not in scope ? ? error. > Why is that? > Furthermore, how can I make the /eq/ function generic, whichever the > types used in the Pair, as long as the first type is equal to the second? > Many thanks. > Philippe > > > openimportAgda.Builtin.Nat > openimportAgda.Builtin.String > openimportAgda.Builtin.Bool > > recordPair (A B :Set):Setwhere > ? field > ? ? fst :A > ? ? snd :B > > _eq_ :(a :Pair Nat Nat)?(b :Pair Nat Nat)?Bool > a eq b =(Pair.fst a == Pair.fst b)?(Pair.snd a == Pair.snd b) > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at scico.botik.ru Sun May 3 20:00:30 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 03 May 2020 21:00:30 +0300 Subject: [Agda] Boolean And in Pair In-Reply-To: References: Message-ID: <1d3c942920349aafe8cd03cb653069b9@scico.botik.ru> On 2020-05-03 19:50, Philippe de Rochambeau wrote: > Hello, > > when I load the following script, I get a ? not in scope ? ? > error. > Why is that? > Furthermore, how can I make the _eq_ function generic, whichever the > types used in the Pair, as long as the first type is equal to the > second? > Many thanks. > Philippe > > open import Agda.Builtin.Nat > open import Agda.Builtin.String > open import Agda.Builtin.Bool > > record Pair (A B : Set) : Set where > field > fst : A > snd : B > > _eq_ : (a : Pair Nat Nat) ? (b : Pair Nat Nat) ? Bool > a eq b = (Pair.fst a == Pair.fst b) ? (Pair.snd a == Pair.snd b) If you add open import Data.Bool using (_?_) then it is type-checked. But I never used "Agda.Builtin" explicitly, and do not know what is the goal. Regards, ------ Sergei From phiroc at free.fr Sun May 3 20:47:17 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Sun, 3 May 2020 20:47:17 +0200 Subject: [Agda] Boolean And in Pair In-Reply-To: <1d3c942920349aafe8cd03cb653069b9@scico.botik.ru> References: <1d3c942920349aafe8cd03cb653069b9@scico.botik.ru> Message-ID: <708B2D1D-712F-4498-9498-7C4163620E28@free.fr> Hi all, thank you for your suggestions. I am currently reading through the book entitled The Little Typer. On p. 17, the authors mention Pairs, which I tried to convert to Agda: ? the normal form of (Pair (car (cons Atom ?olive)) (cdr (cons ?oil Atom))) is (Pair Atom Atom), and (cons ?ratatouille ?baguette) is a (Pair Atom Atom). Apparently, Pair is a type constructor (cf. TLT, p. 30) and is closely associated with what they call The Normal Form. ? Given a type, every expression described by that type has a normal form, which is the most direct way of writing it ? , p. 13 Philippe > Le 3 mai 2020 ? 20:00, mechvel at scico.botik.ru a ?crit : > > On 2020-05-03 19:50, Philippe de Rochambeau wrote: >> Hello, >> when I load the following script, I get a ? not in scope ? ? >> error. >> Why is that? >> Furthermore, how can I make the _eq_ function generic, whichever the >> types used in the Pair, as long as the first type is equal to the >> second? >> Many thanks. >> Philippe >> open import Agda.Builtin.Nat >> open import Agda.Builtin.String >> open import Agda.Builtin.Bool >> record Pair (A B : Set) : Set where >> field >> fst : A >> snd : B >> _eq_ : (a : Pair Nat Nat) ? (b : Pair Nat Nat) ? Bool >> a eq b = (Pair.fst a == Pair.fst b) ? (Pair.snd a == Pair.snd b) > > > If you add > > open import Data.Bool using (_?_) > > then it is type-checked. > But I never used "Agda.Builtin" explicitly, and do not know what is the goal. > > Regards, > > ------ > Sergei > -------------- next part -------------- An HTML attachment was scrubbed... URL: From phiroc at free.fr Mon May 4 08:00:45 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Mon, 4 May 2020 08:00:45 +0200 Subject: [Agda] Boolean And in Pair In-Reply-To: <900550a2-438b-3c70-04dd-d877853ec47a@strath.ac.uk> References: <900550a2-438b-3c70-04dd-d877853ec47a@strath.ac.uk> Message-ID: Good morning James, I spent a few hours yesterday attempting to write the fst description procedure, as suggested, but to no avail. For me, fst_desc_proc should compare two values of type A and, if they are equal, return true, otherwise, false. But how how do you generically compare two A values? ? won?t do. (In fact, I wouldn?t know either how to compare two Nats for equality in Agda, since I could not find an == operator in Data.Nats). Cheers, Philippe open import Data.Nat using (?) open import Relation.Binary.PropositionalEquality using (_?_) open import Data.Bool record Pair (A B : Set) : Set where field fst : A snd : B open Pair public {-- _eq_ : {A B : Set} ? (a : Pair A B) ? (b : Pair A B) ? Bool a eq b = (fst a ? fst b) ? (snd a ? snd b) --} fst_desc_proc : {A : Set} ? (a a' : A) ? Bool fst_desc_proc a a' = a ? a' fst_desc_proc = {!!} {-- snd_desc_proc : {B : Set} ? (b b' : B) ? Bool snd_desc_proc b b' = b == b' ? true snd_desc_proc b b' = b != b' ? false --} -- _eq_ : {A B : Set} ? ((a a? : A) ? Bool) ? ((b b? : B) ? Bool) ? (ab ab? : Pair A B) ? Bool -- a eq a' = ? > Le 3 mai 2020 ? 19:56, James Wood a ?crit : > > Hi Philippe, > > You can see from the source code of `Agda.Builtin.Bool` that it defines > only `Bool`, `true`, and `false`. If you want some operations on > Booleans, you can either define them yourself or get them from a > library, e.g, stdlib's `Data.Bool`. It's best practice to not import > `Agda.Builtin` modules unless you really have to (e.g, if you are > writing your own base library). They may change between versions. > > For making your `eq` generic, the simplest thing to do would be to take > as arguments decision procedures for the `fst`s and `snd`s, > respectively. The type should be `{A B : Set} ? ((a a? : A) ? Bool) ? > ((b b? : B) ? Bool) ? (ab ab? : Pair A B) ? Bool`. > > Additionally, you might want to add `open Pair public` after your > definition of `Pair`, so that you don't have to qualify `fst` and `snd`. > There's an example of this in stdlib's definition of `?` (somewhere > around `Data.Product`). > > Regards, > James > > On 03/05/2020 17:50, Philippe de Rochambeau wrote: >> Hello, >> >> when I load the following script, I get a ? not in scope ? ? error. >> Why is that? >> Furthermore, how can I make the /eq/ function generic, whichever the >> types used in the Pair, as long as the first type is equal to the second? >> Many thanks. >> Philippe >> >> >> openimportAgda.Builtin.Nat >> openimportAgda.Builtin.String >> openimportAgda.Builtin.Bool >> >> recordPair (A B :Set):Setwhere >> field >> fst :A >> snd :B >> >> _eq_ :(a :Pair Nat Nat)?(b :Pair Nat Nat)?Bool >> a eq b =(Pair.fst a == Pair.fst b)?(Pair.snd a == Pair.snd b) >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.rouvoet at gmail.com Mon May 4 09:45:13 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Mon, 4 May 2020 09:45:13 +0200 Subject: [Agda] Boolean And in Pair In-Reply-To: References: <900550a2-438b-3c70-04dd-d877853ec47a@strath.ac.uk> Message-ID: Hi Philippe, Indeed you cannot compare two values of arbitrary types for equality. James' idea was to write a function that given two comparison functions for the first and second projection of a pair, produces a comparison function for the pair as a whole. The signature you wrote for _eq_ is correct and you should be able to implement, although its implementation should take 4 parameters: `eq eqa eqb ab ab' = ?` Try putting a and a' in the hole on the RHS and pressing C-c C-C to expand the cases. Now you can use eqa and eqb to compare the components of the pairs. On the use site, you know the type A at which you're comparing and you can give a non-generic implementation of the two input comparison functions, for example for Nat. Once you have an idea of how the implementation works in a functional language, you can look at typeclasses in Agda to get a definition that is a little easier to work with and does not require you to manually give the comparison functions as parameters. Hope this helps, Arjen On 5/4/20 8:00 AM, Philippe de Rochambeau wrote: > Good morning James, > > I spent a few hours yesterday attempting to write the /fst/ > description procedure, as suggested, but to no avail. > For me, /fst_desc_proc/ should compare two values of type /A/ and, if > they are equal, return /true/, otherwise, /false/. > But how how do you generically compare two A values??? won?t do. > > (In fact, I wouldn?t know either how to compare two /Nats/ for > equality in Agda, since I could not find an /==/ operator in /Data.Nats/). > > Cheers, > > Philippe > > openimportData.Natusing(?) > openimportRelation.Binary.PropositionalEqualityusing(_?_) > openimportData.Bool > > recordPair(A B :Set):Setwhere > field > fst:A > snd:B > > openPairpublic > > {-- > _eq_ : {A B : Set} ? (a : Pair A B) ? (b : Pair A B) ? Bool > a eq b = (fst a ? fst b) ? (snd a ? snd b) > --} > > fst_desc_proc:{A :Set}?(a a' :A)?Bool > fst_desc_proca a' =a?a' > fst_desc_proc={!!} > > {-- > snd_desc_proc : {B : Set} ? (b b' : B) ? Bool > snd_desc_proc b b' = b == b' ? true > snd_desc_proc b b' = b != b' ? false > --} > -- _eq_ : {A B : Set} ? ((a a? : A) ? Bool) ? ((b b? : B) ? Bool) ? > (ab ab? : Pair A B) ? Bool > -- a eq a' =?? > > > > >> Le 3 mai 2020 ? 19:56, James Wood > > a ?crit : >> >> Hi Philippe, >> >> You can see from the source code of `Agda.Builtin.Bool` that it defines >> only `Bool`, `true`, and `false`. If you want some operations on >> Booleans, you can either define them yourself or get them from a >> library, e.g, stdlib's `Data.Bool`. It's best practice to not import >> `Agda.Builtin` modules unless you really have to (e.g, if you are >> writing your own base library). They may change between versions. >> >> For making your `eq` generic, the simplest thing to do would be to take >> as arguments decision procedures for the `fst`s and `snd`s, >> respectively. The type should be `{A B : Set} ? ((a a? : A) ? Bool) ? >> ((b b? : B) ? Bool) ? (ab ab? : Pair A B) ? Bool`. >> >> Additionally, you might want to add `open Pair public` after your >> definition of `Pair`, so that you don't have to qualify `fst` and `snd`. >> There's an example of this in stdlib's definition of `?` (somewhere >> around `Data.Product`). >> >> Regards, >> James >> >> On 03/05/2020 17:50, Philippe de Rochambeau wrote: >>> Hello, >>> >>> when I load the following script, I get a ? not in scope ? ? error. >>> Why is that? >>> Furthermore, how can I make the /eq/ function generic, whichever the >>> types used in the Pair, as long as the first type is equal to the >>> second? >>> Many thanks. >>> Philippe >>> >>> >>> openimportAgda.Builtin.Nat >>> openimportAgda.Builtin.String >>> openimportAgda.Builtin.Bool >>> >>> recordPair (A B :Set):Setwhere >>> ? field >>> ? ? fst :A >>> ? ? snd :B >>> >>> _eq_ :(a :Pair Nat Nat)?(b :Pair Nat Nat)?Bool >>> a eq b =(Pair.fst a == Pair.fst b)?(Pair.snd a == Pair.snd b) >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From wadler at inf.ed.ac.uk Mon May 4 13:56:54 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Mon, 4 May 2020 08:56:54 -0300 Subject: [Agda] Boolean And in Pair In-Reply-To: References: <900550a2-438b-3c70-04dd-d877853ec47a@strath.ac.uk> Message-ID: Philippe, You may find the following helpful: https://plfa.github.io/Decidable/ In my experience, you rarely want to use Bool in Agda, and Dec is better instead. The standard library has support for decidable equality on naturals _?_, and for combining two decidable properties to decide a property of pairs _?-dec_. Yours, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Mon, 4 May 2020 at 03:01, Philippe de Rochambeau wrote: > Good morning James, > > I spent a few hours yesterday attempting to write the *fst* description > procedure, as suggested, but to no avail. > For me, *fst_desc_proc* should compare two values of type *A* and, if > they are equal, return *true*, otherwise, *false*. > But how how do you generically compare two A values? ? won?t do. > > (In fact, I wouldn?t know either how to compare two *Nats* for equality > in Agda, since I could not find an *==* operator in *Data.Nats*). > > Cheers, > > Philippe > > open import Data.Nat using (?) > open import Relation.Binary.PropositionalEquality using (_?_) > open import Data.Bool > > record Pair (A B : Set) : Set where > field > fst : A > snd : B > > open Pair public > > {-- > > > _eq_ : {A B : Set} ? (a : Pair A B) ? (b : Pair A B) ? Bool > > > a eq b = (fst a ? fst b) ? (snd a ? snd b) > > > --} > > fst_desc_proc : {A : Set} ? (a a' : A) ? Bool > fst_desc_proc a a' = a ? a' > fst_desc_proc = {!!} > > {-- > > > snd_desc_proc : {B : Set} ? (b b' : B) ? Bool > > > snd_desc_proc b b' = b == b' ? true > > > snd_desc_proc b b' = b != b' ? false > > > --} > -- _eq_ : {A B : Set} ? ((a a? : A) ? Bool) ? ((b b? : B) ? Bool) ? (ab > ab? : Pair A B) ? Bool > -- a eq a' = ? > > > > > Le 3 mai 2020 ? 19:56, James Wood a ?crit : > > Hi Philippe, > > You can see from the source code of `Agda.Builtin.Bool` that it defines > only `Bool`, `true`, and `false`. If you want some operations on > Booleans, you can either define them yourself or get them from a > library, e.g, stdlib's `Data.Bool`. It's best practice to not import > `Agda.Builtin` modules unless you really have to (e.g, if you are > writing your own base library). They may change between versions. > > For making your `eq` generic, the simplest thing to do would be to take > as arguments decision procedures for the `fst`s and `snd`s, > respectively. The type should be `{A B : Set} ? ((a a? : A) ? Bool) ? > ((b b? : B) ? Bool) ? (ab ab? : Pair A B) ? Bool`. > > Additionally, you might want to add `open Pair public` after your > definition of `Pair`, so that you don't have to qualify `fst` and `snd`. > There's an example of this in stdlib's definition of `?` (somewhere > around `Data.Product`). > > Regards, > James > > On 03/05/2020 17:50, Philippe de Rochambeau wrote: > > Hello, > > when I load the following script, I get a ? not in scope ? ? error. > Why is that? > Furthermore, how can I make the /eq/ function generic, whichever the > types used in the Pair, as long as the first type is equal to the second? > Many thanks. > Philippe > > > openimportAgda.Builtin.Nat > openimportAgda.Builtin.String > openimportAgda.Builtin.Bool > > recordPair (A B :Set):Setwhere > field > fst :A > snd :B > > _eq_ :(a :Pair Nat Nat)?(b :Pair Nat Nat)?Bool > a eq b =(Pair.fst a == Pair.fst b)?(Pair.snd a == Pair.snd b) > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From phiroc at free.fr Mon May 4 14:03:36 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Mon, 4 May 2020 14:03:36 +0200 Subject: [Agda] Boolean And in Pair In-Reply-To: References: <900550a2-438b-3c70-04dd-d877853ec47a@strath.ac.uk> Message-ID: <7323419D-1118-46C9-8D86-6F6194A23C49@free.fr> Hi Philip, thank you very much for the pointer. I?ll have a look. I?m am currently trying to write the two equations, which determine if Pairs A and B match. Here?s my draft code so far. Cheers, Philippe open import Relation.Binary.PropositionalEquality using (_?_;refl) open import Data.Bool open import Data.Nat using (?) record Pair (A B : Set) : Set where field fst : A snd : B open Pair public _eq_ : {A B : Set} ? ((a a? : A) ? Bool) ? ((b b? : B) ? Bool) ? (ab ab? : Pair A B) ? Bool (eqa eq eqb) record { fst = fst? ; snd = snd? } record { fst = fst ; snd = snd } = eqb snd snd eqa : (a a' : ?) ? Bool eqa ?.zero a' = false eqa (?.suc a) a' = eqa a a' eqb : (b b' : Bool) ? Bool eqb false b' = b' eqb true b' = b' p23? : Pair ? Bool p23? = record { fst = 2; snd = true } p23? : Pair ? Bool p23? = record { fst = 2; snd = true } p24 : Pair ? ? p24 = record { fst = 2; snd = 4 } > Le 4 mai 2020 ? 13:56, Philip Wadler a ?crit : > > Philippe, > > You may find the following helpful: > https://plfa.github.io/Decidable/ > > In my experience, you rarely want to use Bool in Agda, and Dec is better instead. The standard library has support for decidable equality on naturals _?_, and for combining two decidable properties to decide a property of pairs _?-dec_. > > Yours, -- P > > . \ Philip Wadler, Professor of Theoretical Computer Science, > . /\ School of Informatics, University of Edinburgh > . / \ and Senior Research Fellow, IOHK > . http://homepages.inf.ed.ac.uk/wadler/ > > > > On Mon, 4 May 2020 at 03:01, Philippe de Rochambeau > wrote: > Good morning James, > > I spent a few hours yesterday attempting to write the fst description procedure, as suggested, but to no avail. > For me, fst_desc_proc should compare two values of type A and, if they are equal, return true, otherwise, false. > But how how do you generically compare two A values? ? won?t do. > > (In fact, I wouldn?t know either how to compare two Nats for equality in Agda, since I could not find an == operator in Data.Nats). > > Cheers, > > Philippe > > open import Data.Nat using (?) > open import Relation.Binary.PropositionalEquality using (_?_) > open import Data.Bool > > record Pair (A B : Set) : Set where > field > fst : A > snd : B > > open Pair public > > {-- > _eq_ : {A B : Set} ? (a : Pair A B) ? (b : Pair A B) ? Bool > a eq b = (fst a ? fst b) ? (snd a ? snd b) > --} > > fst_desc_proc : {A : Set} ? (a a' : A) ? Bool > fst_desc_proc a a' = a ? a' > fst_desc_proc = {!!} > > {-- > snd_desc_proc : {B : Set} ? (b b' : B) ? Bool > snd_desc_proc b b' = b == b' ? true > snd_desc_proc b b' = b != b' ? false > --} > -- _eq_ : {A B : Set} ? ((a a? : A) ? Bool) ? ((b b? : B) ? Bool) ? (ab ab? : Pair A B) ? Bool > -- a eq a' = ? > > > > >> Le 3 mai 2020 ? 19:56, James Wood > a ?crit : >> >> Hi Philippe, >> >> You can see from the source code of `Agda.Builtin.Bool` that it defines >> only `Bool`, `true`, and `false`. If you want some operations on >> Booleans, you can either define them yourself or get them from a >> library, e.g, stdlib's `Data.Bool`. It's best practice to not import >> `Agda.Builtin` modules unless you really have to (e.g, if you are >> writing your own base library). They may change between versions. >> >> For making your `eq` generic, the simplest thing to do would be to take >> as arguments decision procedures for the `fst`s and `snd`s, >> respectively. The type should be `{A B : Set} ? ((a a? : A) ? Bool) ? >> ((b b? : B) ? Bool) ? (ab ab? : Pair A B) ? Bool`. >> >> Additionally, you might want to add `open Pair public` after your >> definition of `Pair`, so that you don't have to qualify `fst` and `snd`. >> There's an example of this in stdlib's definition of `?` (somewhere >> around `Data.Product`). >> >> Regards, >> James >> >> On 03/05/2020 17:50, Philippe de Rochambeau wrote: >>> Hello, >>> >>> when I load the following script, I get a ? not in scope ? ? error. >>> Why is that? >>> Furthermore, how can I make the /eq/ function generic, whichever the >>> types used in the Pair, as long as the first type is equal to the second? >>> Many thanks. >>> Philippe >>> >>> >>> openimportAgda.Builtin.Nat >>> openimportAgda.Builtin.String >>> openimportAgda.Builtin.Bool >>> >>> recordPair (A B :Set):Setwhere >>> field >>> fst :A >>> snd :B >>> >>> _eq_ :(a :Pair Nat Nat)?(b :Pair Nat Nat)?Bool >>> a eq b =(Pair.fst a == Pair.fst b)?(Pair.snd a == Pair.snd b) >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Graham.Hutton at nottingham.ac.uk Mon May 4 14:30:47 2020 From: Graham.Hutton at nottingham.ac.uk (Graham Hutton) Date: Mon, 4 May 2020 12:30:47 +0000 Subject: [Agda] Journal of Functional Programming - Call for PhD Abstracts Message-ID: ============================================================ CALL FOR PHD ABSTRACTS Journal of Functional Programming Deadline: 31st May 2020 http://tinyurl.com/jfp-phd-abstracts ============================================================ PREAMBLE: Many students complete PhDs in functional programming each year. As a service to the community, twice per year the Journal of Functional Programming publishes the abstracts from PhD dissertations completed during the previous year. The abstracts are made freely available on the JFP website, i.e. not behind any paywall. They do not require any transfer of copyright, merely a license from the author. A dissertation is eligible for inclusion if parts of it have or could have appeared in JFP, that is, if it is in the general area of functional programming. The abstracts are not reviewed. Please submit dissertation abstracts according to the instructions below. We welcome submissions from both the PhD student and PhD advisor/supervisor although we encourage them to coordinate. ============================================================ SUBMISSION: Please submit the following information to Graham Hutton by 31st May 2020: o Dissertation title: (including any subtitle) o Student: (full name) o Awarding institution: (full name and country) o Date of PhD award: (month and year; depending on the institution, this may be the date of the viva, corrections being approved, graduation ceremony, or otherwise) o Advisor/supervisor: (full names) o Dissertation URL: (please provide a permanently accessible link to the dissertation if you have one, such as to an institutional repository or other public archive; links to personal web pages should be considered a last resort) o Dissertation abstract: (plain text, maximum 350 words; you may use \emph{...} for emphasis, but we prefer no other markup or formatting; if your original abstract exceeds the word limit, please submit an abridged version within the limit) Please do not submit a copy of the dissertation itself, as this is not required. JFP reserves the right to decline to publish abstracts that are not deemed appropriate. ============================================================ PHD ABSTRACT EDITOR: Graham Hutton School of Computer Science University of Nottingham Nottingham NG8 1BB United Kingdom ============================================================ This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From abela at chalmers.se Mon May 4 18:17:15 2020 From: abela at chalmers.se (Andreas Abel) Date: Mon, 4 May 2020 18:17:15 +0200 Subject: [Agda] PPDP 2020 Final call for papers Message-ID: <7543502f-4573-ab18-9d3b-1a30b2a97ee2@chalmers.se> PPDP 2020 Call For Papers ========================= The 22nd International Symposium on Principles and Practice of Declarative Programming, [PPDP 2020](http://www.cse.chalmers.se/~abela/ppdp20/), hosted 8-10 September 2020 by the University of Bologna, Italy. **Due to the COVID-19 pandemic, PPDP 2020 will take place online. The submission, review, and publication process is unaffected. However, short extensions are available on request.** TL;DR Abstract deadline: 11 May; paper deadline: 15 May; extensions available. Scope ----- The PPDP 2020 symposium brings together researchers from the declarative programming communities, including those working in the functional, logic, answer-set, and constraint handling programming paradigms. The goal is to stimulate research in the use of logical formalisms and methods for analyzing, performing, specifying, and reasoning about computations, including mechanisms for concurrency, security, static analysis, and verification. Submissions are invited on all topics related to declarative programming, from principles to practice, from foundations to applications. Topics of interest include, but are not limited to: - Language Design: domain-specific languages; interoperability; concurrency, parallelism and distribution; modules; functional languages; reactive languages; languages with objects; languages for quantum computing; languages inspired by biological and chemical computation; metaprogramming. - Declarative languages in artificial intelligence: logic programming; database languages; knowledge representation languages; probabilistic languages; differentiable languages. - Implementations: abstract machines; interpreters; compilation; compile-time and run-time optimization; memory management. - Foundations: types; logical frameworks; monads and effects; semantics. - Analysis and Transformation: partial evaluation; abstract interpretation; control flow; data flow; information flow; termination analysis; resource analysis; type inference and type checking; verification; validation; debugging; testing. - Tools and Applications: programming and proof environments; verification tools; case studies in proof assistants or interactive theorem provers; certification; novel applications of declarative programming inside and outside of CS; declarative programming pearls; practical experience reports and industrial application; education. The PC chair will be happy to advise on the appropriateness of a topic. PPDP will take place 8-10 September 2020 virtually hosted by the University of Bologna, Italy, co-organized with the 29th Int'l Symp. on Logic-Based Program Synthesis and Transformation (LOPSTR 2020) and the International conference on [Microservices 2020](https://www.conf-micro.services/2020/). Submission Categories --------------------- Submissions can be made in three categories: - regular Research Papers, - System Descriptions, and - Experience Reports. Submissions of Research Papers must present original research which is unpublished and not submitted elsewhere. They must not exceed 12 pages ACM style 2-column (including figures, but excluding bibliography). Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Research papers will be judged on originality, significance, correctness, clarity, and readability. Submission of System Descriptions must describe a working system whose description has not been published or submitted elsewhere. They must not exceed 10 pages and should contain a link to a working system. System Descriptions must be marked as such at the time of submission and will be judged on originality, significance, usefulness, clarity, and readability. Submissions of Experience Reports are meant to help create a body of published, refereed, citable evidence where declarative programming such as functional, logic, answer-set, constraint programming, etc., is used in practice. They must not exceed 5 pages **including references**. Experience Reports must be marked as such at the time of submission and need not report original research results. They will be judged on significance, usefulness, clarity, and readability. Possible topics for an Experience Report include, but are not limited to: - insights gained from real-world projects using declarative programming - comparison of declarative programming with conventional programming in the context of an industrial project or a university curriculum - curricular issues encountered when using declarative programming in education - real-world constraints that created special challenges for an implementation of a declarative language or for declarative programming in general - novel use of declarative programming in the classroom - programming pearl that illustrates a nifty new data structure or programming technique. Supplementary material may be provided via a link to an extended version of the submission (recommended), or in a clearly marked appendix beyond the above-mentioned page limits. Reviewers are not required to study extended versions or any material beyond the respective page limit. Material beyond the page limit will not be included in the final published version. Format of a submission ---------------------- For each paper category, you must use the most recent version of the "Current ACM Master Template" which is available at . The most recent version at the time of writing is 1.70. You must use the LaTeX sigconf proceedings template as the conference organizers are unable to process final submissions in other formats. In case of problems with the templates, contact [ACM's TeX support team at Aptara](mailto:acmtexsupport at aptaracorp.com). Authors should note [ACM's statement on author's rights](http://authors.acm.org/) which apply to final papers. Submitted papers should meet the requirements of [ACM's plagiarism policy](http://www.acm.org/publications/policies/plagiarism_policy). Requirements for publication ---------------------------- **Due to the shift to an online event, registration fees will be decreased to cover only the costs of publication and online event hosting.** At least one author of each accepted submission will be expected to register and present the work at the conference. The PC chair may retract a paper that is not presented. The PC chair may also retract a paper if complaints about the paper's correctness are raised which cannot be resolved by the final paper deadline. Important dates --------------- The organizers appreciate that potential authors may be disadvantaged by the COVID-19 pandemic and resulting disruption. **To encourage submissions, short extensions are available on request.** To request an extension, please register an abstract before the abstract deadline and write to the PC chair before the submission deadline explaining the circumstances and duration of the extension. -------------------------------- ----- ---- ---------- Title and abstract registration: 11 May 2020 (AoE) Paper submission: 15 May 2020 (AoE) Rebuttal period (48 hours): 22-23 June 2020 (AoE) Author notification: 3 July 2020 Final paper version: 21 July 2020 Conference: 8-10 Sept 2020 -------------------------------- ----- ---- ---------- Organization ------------ ------------------------- -------------------- --------------------------- Program committee chairs: Andreas Abel, Gothenburg University James Cheney, The University of Edinburgh Steering committee chair: James Cheney, The University of Edinburgh General chair: Maurizio Gabbrielli, University of Bologna ------------------------- -------------------- --------------------------- Program committee ----------------- ----------------------- ------------------------------------------------------ Andreas Abel (co-chair) Gothenburg University, SE Kenichi Asai Ochanomizu University, Tokyo, JP James Cheney (co-chair) The University of Edinburgh, UK Ugo Dal Lago University of Bologna, IT & INRIA Sophia Antipolis, FR Thom Fruehwirth University of Ulm, DE Michael Hanus Christian-Albrechts-Universit?t zu Kiel, DE Jacob Howe City, University of London, UK Fred Mesnard Universit? de la R?union, FR Henrik Nilsson University of Nottingham, UK David Sabel Ludwig Maximilians University of Munich, DE Claudio Sacerdoti Coen University of Bologna, IT Ulrich Sch?pp fortiss GmbH, DE Martin Sulzmann Karlsruhe University of Applied Sciences, DE Christine Tasson Universit? Paris Diderot & IRIF, FR Peter Van Roy Universit? catholique de Louvain, BE ----------------------- ------------------------------------------------------ From phiroc at free.fr Mon May 4 18:27:58 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Mon, 4 May 2020 18:27:58 +0200 Subject: [Agda] =?utf-8?b?X+KJoeKfqF/in6lfIG9wZXJhdG9y?= Message-ID: Hello, The https://plfa.github.io/Induction Page mentions the _??_?_ operator, which I couldn?t find on https://agda.github.io/agda-stdlib/Relation.Binary.PropositionalEquality.Core.html Does it have an existing equivalent in the Standard Library? Cheers, Philippe PS My apologies if this question has already been asked on this list From me at abn.sh Mon May 4 18:47:21 2020 From: me at abn.sh (Alexander Ben Nasrallah) Date: Mon, 4 May 2020 18:47:21 +0200 Subject: [Agda] =?utf-8?b?X+KJoeKfqF/in6lfIG9wZXJhdG9y?= In-Reply-To: References: Message-ID: <20200504164721.GA4822@scherox.fritz.box> Hi Philippe, On Mon, May 04, 2020 at 06:27:58PM +0200, Philippe de Rochambeau wrote: > The https://plfa.github.io/Induction Page mentions the _??_?_ > operator, which I couldn?t find on > https://agda.github.io/agda-stdlib/Relation.Binary.PropositionalEquality.Core.html > Does it have an existing equivalent in the Standard Library? You have to be careful about the stdlib version. plfa uses v1.2. The current version is v1.3. Assuming you installed Agda stdlib v1.3, did you try? import Relation.Binary.PropositionalEquality as Eq open Eq using (_?_; refl; cong; sym) open Eq.?-Reasoning Note the missing using statement compared to the code in plfa. With stdlib v1.3 you can?t use `using` or `hide` with _???_. They changed the definition https://github.com/agda/agda-stdlib/blob/v1.3/CHANGELOG.md#changes-to-how-equational-reasoning-is-implemented I don?t unterstand the details why it doesn?t work anymore, I just know how to deal with it ^^ Hope that helps. Alex -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Digital signature URL: From wadler at inf.ed.ac.uk Mon May 4 19:28:27 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Mon, 4 May 2020 14:28:27 -0300 Subject: [Agda] =?utf-8?b?X+KJoeKfqF/in6lfIG9wZXJhdG9y?= In-Reply-To: References: Message-ID: Philippe, Every chapter of PLFA has a section at the end telling you where to find relevant definitions in the Standard Library. Here's the one for Equality: https://plfa.github.io/Equality/#standard-library As mentioned by Alexander, you need to use the right version of the library. Go well, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Mon, 4 May 2020 at 13:28, Philippe de Rochambeau wrote: > Hello, > > The https://plfa.github.io/Induction Page mentions the _??_?_ operator, > which I couldn?t find on > https://agda.github.io/agda-stdlib/Relation.Binary.PropositionalEquality.Core.html > > Does it have an existing equivalent in the Standard Library? > > Cheers, > > Philippe > > PS My apologies if this question has already been asked on this list > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From phiroc at free.fr Mon May 4 20:00:13 2020 From: phiroc at free.fr (Philippe de Rochambeau) Date: Mon, 4 May 2020 20:00:13 +0200 Subject: [Agda] =?utf-8?b?X+KJoeKfqF/in6lfIG9wZXJhdG9y?= In-Reply-To: <20200504164721.GA4822@scherox.fritz.box> References: <20200504164721.GA4822@scherox.fritz.box> Message-ID: <89368953-A302-43B6-A6F6-8BAFBA6E69E9@free.fr> Hi Alex, commenting out Eq.?-Reasoning?s using statement worked. Many thanks. Pleasant evening. Philippe module Induct where import Relation.Binary.PropositionalEquality as Eq open Eq using (_?_; refl; cong; sym) open Eq.?-Reasoning -- using (begin_; _???_; _?) open import Data.Nat using (?; zero; suc; _+_; _*_; _?_) +-assoc : ? (m n p : ?) ? (m + n) + p ? m + (n + p) +-assoc zero n p = begin (zero + n) + p ??? n + p ??? zero + (n + p) ? +-assoc (suc m) n p = begin (suc m + n) + p ??? suc (m + n) + p ??? suc ((m + n) + p) ?? cong suc (+-assoc m n p) ? suc (m + (n + p)) ??? suc m + (n + p) ? > Le 4 mai 2020 ? 18:47, Alexander Ben Nasrallah a ?crit : > > Hi Philippe, > > On Mon, May 04, 2020 at 06:27:58PM +0200, Philippe de Rochambeau wrote: >> The https://plfa.github.io/Induction Page mentions the _??_?_ >> operator, which I couldn?t find on >> https://agda.github.io/agda-stdlib/Relation.Binary.PropositionalEquality.Core.html > >> Does it have an existing equivalent in the Standard Library? > > You have to be careful about the stdlib version. plfa uses v1.2. > The current version is v1.3. > > Assuming you installed Agda stdlib v1.3, did you try? > > import Relation.Binary.PropositionalEquality as Eq > open Eq using (_?_; refl; cong; sym) > open Eq.?-Reasoning > > Note the missing using statement compared to the code in plfa. With > stdlib v1.3 you can?t use `using` or `hide` with _???_. They changed the > definition > https://github.com/agda/agda-stdlib/blob/v1.3/CHANGELOG.md#changes-to-how-equational-reasoning-is-implemented > > I don?t unterstand the details why it doesn?t work anymore, I just know > how to deal with it ^^ > > Hope that helps. > Alex > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Tue May 5 12:46:32 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 5 May 2020 12:46:32 +0200 Subject: [Agda] lost in modules In-Reply-To: <7227679d-4f16-9af6-7c0d-c5ba90e35426@free.fr> References: <3DC2DA58-DE45-4156-9E04-280254C28721@uib.no> <7227679d-4f16-9af6-7c0d-c5ba90e35426@free.fr> Message-ID: On 2020-05-01 17:13, Michel Levy wrote: > Why with this strange method, there is no more research of the module > Data.nat in the old library ? If you can reproduce the problem that you observed, please report it on the bug tracker. -- /NAD From nad at cse.gu.se Tue May 5 12:49:24 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 5 May 2020 12:49:24 +0200 Subject: [Agda] installation trouble WAS Re: why is this corecursion red? And indexed coinductive definitions. In-Reply-To: References: <985E4460-C07B-486C-89B9-1ADFE6CCECFE@nottingham.ac.uk> Message-ID: <821e3371-6c55-80fb-1279-2f6b2271991f@cse.gu.se> On 2020-05-02 14:39, Thorsten Altenkirch wrote: > But I am still puzzled why agda-mode doesn't work from the terminal? Presumably Emacs is not on your PATH. -- /NAD From nad at cse.gu.se Tue May 5 12:56:40 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 5 May 2020 12:56:40 +0200 Subject: [Agda] Question about colists, musical notation vs coinductive records, and all that In-Reply-To: <31BE7359-C228-432B-883B-6D61FC624960@gmail.com> References: <6fcfe29c-69b6-d463-bcd4-dc1fab3d3152@ens-lyon.org> <31BE7359-C228-432B-883B-6D61FC624960@gmail.com> Message-ID: <3618b84b-c114-eb4f-f00c-a199e80446ae@cse.gu.se> On 2020-05-03 16:59, William Harrison wrote: > The phrase ?? where .force ? ?? effectively plays the role of ?freeze? > in conventional presentations of thunks while passing .force (e.g., > ?xs .force?) is effectively ?thaw?. Is that right? I think it makes sense to think of these constructions in this way. -- /NAD From michel.levy.imag at free.fr Tue May 5 15:33:40 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Tue, 5 May 2020 15:33:40 +0200 Subject: [Agda] lost in modules In-Reply-To: References: <3DC2DA58-DE45-4156-9E04-280254C28721@uib.no> <7227679d-4f16-9af6-7c0d-c5ba90e35426@free.fr> Message-ID: Hi Nils The origin of my problems was a conflict between the way the Ubuntu agda-stdlib package handles the standard library and the way indicated in the "Library Management" topic. Thanks to the help of Andr?s Sicard-Ramirez, who saw the origin of my problems, I uninstalled the obsolete Ubuntu packages, with a calamitous library management, for an installation from Hackage. Le 05/05/2020 ? 12:46, Nils Anders Danielsson a ?crit?: > On 2020-05-01 17:13, Michel Levy wrote: >> Why with this strange method, there is no more research of the module >> Data.nat? in the old library? ? > > If you can reproduce the problem that you observed, please report it on > the bug tracker. > -- courriel : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : michel.levy.imag.free.fr From bernardobruno at gmail.com Wed May 6 12:59:01 2020 From: bernardobruno at gmail.com (Bruno Bernardo) Date: Wed, 6 May 2020 12:59:01 +0200 Subject: [Agda] FMBC 2020: 2nd Workshop on Formal Methods for Blockchains (3rd CfP, Deadline Extension) Message-ID: <42e87b03-040e-6c6c-9878-36bc1f33c07b@gmail.com> [ Please distribute, apologies for multiple postings. ] ======================================================================== 2nd Workshop on Formal Methods for Blockchains (FMBC) 2020 - Third Call https://fmbc.gitlab.io/2020 July 19, 2020 Co-located with the 32nd International Conference on Computer-Aided Verification (CAV 2020) http://i-cav.org/2020/ *Due do the COVID-19 pandemic, the workshop is likely to be held online.* ------------------------------------------------------------- IMPORTANT DATES -------------------------------- Abstract submission: May 12, 2020 (extended) Full paper submission: May 19, 2020 (extended) Notification: June 23, 2020 (extended) Camera-ready: July 14, 2020 (extended) Conference: July 19, 2020 Deadlines are Anywhere on Earth: https://en.wikipedia.org/wiki/Anywhere_on_Earth -------------------------------- -------------------------------- TOPICS OF INTEREST -------------------------------- Blockchains are decentralized transactional ledgers that rely on cryptographic hash functions for guaranteeing the integrity of the stored data. Participants on the network reach agreement on what valid transactions are through consensus algorithms. Blockchains may also provide support for Smart Contracts. Smart Contracts are scripts of an ad-hoc programming language that are stored in the Blockchain and that run on the network. They can interact with the ledger?s data and update its state. These scripts can express the logic of possibly complex contracts between users of the Blockchain. Thus, Smart Contracts can facilitate the economic activity of Blockchain participants. With the emergence and increasing popularity of cryptocurrencies such as Bitcoin and Ethereum, it is now of utmost importance to have strong guarantees of the behavior of Blockchain software. These guarantees can be brought by using Formal Methods. Indeed, Blockchain software encompasses many topics of computer science where using Formal Methods techniques and tools are relevant: consensus algorithms to ensure the liveness and the security of the data on the chain, programming languages specifically designed to write Smart Contracts, cryptographic protocols, such as zero-knowledge proofs, used to ensure privacy, etc. This workshop is a forum to identify theoretical and practical approaches of formal methods for Blockchain technology. Topics include, but are not limited to: * Formal models of Blockchain applications or concepts * Formal methods for consensus protocols * Formal methods for Blockchain-specific cryptographic primitives or protocols * Design and implementation of Smart Contract languages * Verification of Smart Contracts -------------------------------- -------------------------------- SUBMISSION -------------------------------- Submit original manuscripts (not published or considered elsewhere) with a maximum of twelve pages (full papers), six pages (short papers), and two pages (extended abstract) describing new and emerging ideas or summarizing existing work). Each paper should include a title and the name and affiliation of each author. Authors of selected extended-abstracts are invited to give a short lightning talk. At least one author of an accepted paper is expected to present the paper at the workshop as a registered participant. Submission link: https://easychair.org/conferences/?conf=fmbc2020 The authors are encouraged to use LaTeX and the EasyChair style files: https://easychair.org/publications/for_authors -------------------------------- -------------------------------- PROCEEDINGS -------------------------------- All submissions will be peer-reviewed by at least three members of the program committee for quality and relevance. Accepted regular papers (full and short papers) will be included in the workshop proceedings, published as a volume of the OpenAccess Series in Informatics (OASIcs) by Dagstuhl. -------------------------------- -------------------------------- INVITED SPEAKER -------------------------------- Grigore Rosu, Professor at University of Illinois at Urbana-Champaign, USA and Founder of Runtime Verification http://fsl.cs.illinois.edu/index.php/Grigore_Rosu https://runtimeverification.com/ -------------------------------- -------------------------------- PROGRAM COMMITTEE -------------------------------- PC CO-CHAIRS * Bruno Bernardo (Nomadic Labs, France) (bruno at nomadic-labs.com) * Diego Marmsoler (University of Exeter, UK) (D.Marmsoler at exeter.ac.uk) PC MEMBERS * Wolfgang Ahrendt (Chalmers University of Technology, Sweden) * Lacramioara Astefanoei (Nomadic Labs, France) * Massimo Bartoletti (University of Cagliari, Italy) * Bernhard Beckert (Karlsruhe Institute of Technology, Germany) * Achim Brucker (University of Exeter, UK) * Silvia Crafa (Universita di Padova, Italy) * Zaynah Dargaye (Nomadic Labs, France) * J?r?mie Decouchant (University of Luxembourg, Luxembourg) * Ansgar Fehnker (University of Twente, Netherlands) * Georges Gonthier (Inria, France) * Florian Kammueller (Middlesex University London, UK) * Maurice Herlihy (Brown University, USA) * Igor Konnov (Informal, Austria) * Andreas Lochbihler (Digital Asset, Switzerland) * Anastasia Mavridou (NASA Ames, USA) * Sim?o Melo de Sousa (Universidade da Beira Interior, Portugal) * Andrew Miller (University of Illinois at Urbana-Champaign, USA) * Karl Palmskog (KTH, Sweden) * Vincent Rahli (University of Birmingham, UK) * Andreas Rossberg (Dfinity Foundation, Germany) * Claudio Russo (Dfinity Foundation, USA) * C?sar Sanchez (Imdea, Spain) * Clara Schneidewind (TU Wien, Austria) * Ilya Sergey (Yale-NUS College/NUS, Singapore) * Bas Spitters (Aarhus University/Concordium, Denmark) * Mark Staples (CSIRO Data61, Australia) * Meng Sun (Peking University, China) * Simon Thompson (University of Kent, UK) * Philip Wadler (University of Edinburgh / IOHK, UK) From comar at umich.edu Wed May 6 23:10:20 2020 From: comar at umich.edu (Cyrus Omar) Date: Wed, 6 May 2020 17:10:20 -0400 Subject: [Agda] TyDe 2020 - Final Call for Papers Message-ID: -------------------------------------------------------------------------------- CALL FOR PAPERS 5th Workshop on Type-Driven Development (TyDe 2020) Co-Located with ICFP 2020 (Online) https://icfp20.sigplan.org/home/tyde-2020 -------------------------------------------------------------------------------- # Goals of the workshop The workshop on Type-Driven Development aims to show how static type information may be used effectively in the development of computer programs. Co-located with ICFP, this workshop brings together leading researchers and practitioners who are using or exploring types as a means of program development. We welcome all contributions, both theoretical and practical, on a range of topics including: - dependently typed programming; - generic programming; - design and implementation of programming languages, exploiting types in novel ways; - exploiting typed data, data dependent data, or type providers; - static and dynamic analyses of typed programs; - tools, IDEs, or testing tools exploiting type information; - pearls, being elegant, instructive examples of types used in the derivation, calculation, or construction of programs. # Coronavirus Update (2020-5-2) Due to the coronavirus pandemic, TyDe will be held online alongside ICFP. We will strive to accommodate authors from all time zones, e.g. by allowing pre-recorded videos or by spreading out the talks throughout the day, following the lead of the main conference. Updates will be posted on the website and sent to all authors of submitted papers as they become available. # Program Committee - Bob Atkey, Strathclyde University (UK) - Sandrine Blazy, IRISA (FR) - Youyou Cong, Tokyo Institute of Technology (JP) - Nils Anders Danielsson, Gothenburg University/Chalmers (SE) - Larry Diehl, Symbiont (USA) - Favonia, University of Michigan (USA) - Jacques Garrigue, Nagoya University (JP) - Ranjit Jhala, UCSD (USA) - Dan Licata, Wesleyan University (USA) - James McKinna, LFCS, University of Edinburgh (UK) (PC Co-chair) - Cyrus Omar, University of Michigan, Ann Arbor (USA) (PC Co-chair) - Wouter Swierstra, Utrecht University (NL) # Proceedings and Copyright We will have formal proceedings, published by the ACM. Accepted papers will be included in the ACM Digital Library. Authors must grant ACM publication rights upon acceptance, but may retain copyright if they wish. Authors are encouraged to publish auxiliary material with their paper (source code, test data, and so forth). The proceedings will be freely available for download from the ACM Digital Library from one week before the start of the conference until two weeks after the conference. The official publication date is the date the papers are made available in the ACM Digital Library. This date may be up to two weeks prior to the first day of the conference. The official publication date affects the deadline for any patent filings related to published work. # Submission details Submissions should fall into one of two categories: - regular research papers (12 pages) - extended abstracts (2 pages) The bibliography will not be counted against the page limits for either category. Regular research papers are expected to present novel and interesting research results, and will be included in the formal proceedings. Extended abstracts should report work in progress that the authors would like to present at the workshop. Extended abstracts will be distributed to workshop attendees but will not be published in the formal proceedings. We welcome submissions from PC members (with the exception of the two co-chairs), but these submissions will be held to a higher standard. Submission is handled through HotCRP: https://tyde20.hotcrp.com All submissions should be in portable document format (PDF) and formatted using the ACM SIGPLAN style guidelines: http://www.sigplan.org/Resources/Author/ *Note* that the ACM SIGPLAN style guidelines have changed from previous years! In particular, submissions should use the new ?acmart? format and the two-column ?sigplan? subformat (not to be confused with the one-column ?acmlarge? subformat). Extended abstracts must be submitted with the label 'Extended abstract' clearly in the title. # Important Dates - May 19: Paper submission deadline - May 26: Extended abstract submission deadline - June 9: Author notification - June 30: Camera ready deadline - Aug 23: Workshop # Participant Support Student attendees with accepted papers can apply for a SIGPLAN PAC grant to help cover participation-related expenses. PAC also offers other support, such as for child-care expenses during the meeting or for accommodations for members with physical disabilities. For details on the PAC program, see its web page: http://www.sigplan.org/PAC/ (Please contact PAC organizers as early as possible if you will need accommodations, as protocols may have shifted due to the coronavirus situation.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre.lescanne at ens-lyon.fr Thu May 7 11:15:07 2020 From: pierre.lescanne at ens-lyon.fr (Pierre Lescanne) Date: Thu, 7 May 2020 11:15:07 +0200 Subject: [Agda] install agda In-Reply-To: References: <3ea36d14-9bbf-38b1-1bb2-c099cc4c9952@free.fr> <59fe7516-c149-9a3c-7a74-3bda9ff27bca@free.fr> <260be6c6-b7a5-6e90-6f92-86920aaedfb7@free.fr> Message-ID: <4effdc76-e7f6-dd2d-9bde-edf2fa0b0e3a@ens-lyon.fr> Le 02/05/2020 ? 22:35, Andr?s Sicard-Ram?rez a ?crit?: > Hi Michel, > > In this case, uninstall the Ubuntu packages and install Agda without > sandboxes using > > $ cabal install Agda Hi, I am on Debian.? And with Agda 2.4.0.2 and I want to upgrade it. I did what you suggested: * I uninstalled agda on Debian * I run o cabal install Agda I got the following message --------------------------------- Resolving dependencies... In order, the following would be installed: EdisonAPI-1.3.1 (new package) STMonadTrans-0.4.4 (new version) base-orphans-0.4.5 (latest: 0.8.2) (new version) edit-distance-0.2.2.1 (new package) equivalence-0.3.5 (new version) geniplate-mirror-0.7.7 (new package) hashtables-1.2.1.1 (latest: 1.2.3.2) (new version) monadplus-1.4.2 (new package) murmur-hash-0.1.0.9 (new package) process-1.4.3.0 (latest: 1.6.8.2) (new version) gitrev-1.3.1 (new package) haskeline-0.7.4.3 (latest: 0.8.0.0) (reinstall) changes: process-1.6.3.0 -> 1.4.3.0 splitmix-0.0.4 (new package) QuickCheck-2.14 (new version) EdisonCore-1.3.1.1 (latest: 1.3.2.1) (new package) tagged-0.8.6 (reinstall) changes: transformers-compat-0.6.2 -> 0.5.1.4 semigroups-0.18.5 (latest: 0.19.1) (reinstall) changes: transformers-compat-0.6.2 -> 0.5.1.4 parsec-3.1.14.0 (new version) regex-tdfa-1.2.3.2 (latest: 1.3.1.0) (new version) void-0.7.3 (new version) zlib-0.6.0.2 (latest: 0.6.2.1) (new version) Agda-2.5.2 (latest: 2.6.1) (new package) cabal: The following packages are likely to be broken by the reinstalls: void-0.7.2 contravariant-1.5 semigroupoids-5.3.1 profunctors-5.2.2 invariant-0.5.1 comonad-5.0.4 bifunctors-5.5.3 vector-0.12.0.1 vector-binary-instances-0.2.5.1 aeson-1.2.4.0 regex-tdfa-1.2.3.1 reflection-2.1.4 parsers-0.12.9 parsec-3.1.13.0 network-uri-2.6.1.0 optparse-applicative-0.14.3.0 distributive-0.6 css-text-0.1.3.0 charset-0.3.7.1 blaze-builder-0.4.1.0 blaze-markup-0.8.2.2 blaze-html-0.9.1.1 attoparsec-0.13.2.2 ansi-wl-pprint-0.6.8.2 Use --force-reinstalls if you want to install anyway. ----------------------- -- Cordialement, --------------------------- Pierre Lescanne (Professeur ?m?rite) LIP / ENS de Lyon 46 all?e d'Italie 69364 LYON Cedex 07, France t?l: +33 6 85 70 94 31 http://perso.ens-lyon.fr/pierre.lescanne/ --------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From jasongross9 at gmail.com Fri May 8 00:19:36 2020 From: jasongross9 at gmail.com (Jason Gross) Date: Thu, 7 May 2020 18:19:36 -0400 Subject: [Agda] Prior work on proof assistant performance / optimization In-Reply-To: References: Message-ID: I'm in the process of writing my thesis on proof assistant performance bottlenecks (with a focus on Coq). I'm having some trouble finding prior work on performance engineering and/or benchmarking of proof assistants (other than the paper on the Lean tactic language ( https://leanprover.github.io/papers/tactic.pdf)), and figured I'd reach out to these lists. Does anyone have references for prior work on performance analysis or engineering of proof assistants or dependently typed languages? (Failing that, I'd also be interested in papers about compile-time performance of compilers.) > Thanks, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From puttamalac at gmail.com Fri May 8 10:57:11 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Fri, 8 May 2020 10:57:11 +0200 Subject: [Agda] Prior work on proof assistant performance / optimization In-Reply-To: References: Message-ID: Hi Jason, You may be interested in my github repos: smalltt , normalization-bench . I haven't yet updated the smalltt repo, but there's a simplified implementation of its evaluator, which seems to have roughly the same performance but which is much simpler to implement. The basic idea is that in elaboration there are two primary computational tasks, one is conversion checking and the other is generating solutions for metavariables. Clearly, we should use NbE/environment machines for evaluation, and implement conversion checking in the semantic domain. However, when we want to generate meta solutions, we need to compute syntactic terms, and vanilla NbE domain only supports quote/readback to normal forms. Normal forms are way too big and terrible for this purpose. Hence, we extend vanilla NbE domain with lazy non-deterministic choice between two or more evaluation strategies. In the simplest case, the point of divergence is whether we unfold some class of definitions or not. Then, the conversion checking algorithm can choose to take the full-unfolding branch, and the quoting operation can choose to take the non-unfolding branch. At the same time, we have a great deal of shared computation between the two branches; we avoid recomputing many things if we choose to look at both branches. I believe that a feature like this is absolutely necessary for robust performance. Otherwise, we choke on bad asymptotics, which is surprisingly common in dependent settings. In Agda and Coq, even something as trivial as elaborating a length-indexed vector expression has quadratic complexity in the length of the vector. It is also extremely important to stick to the spirit of Coquand's semantic checking algorithm as much as possible. In summary: core syntax should support *no* expensive computation: no substitution, shifting, renaming, or other ad-hoc term massaging. Core syntax should be viewed as immutable machine code, which supports evaluation into various semantic domains, from which sometimes we can read syntax back; this also leaves it open to swap out the representation of core syntax to efficient alternatives such as bytecode or machine code. Only after we get the above two basic points right, can we start to think about more specific and esoteric optimizations. I am skeptical of proposed solutions which do not include these. Hash consing has been brought up many times, but it is very unsatisfying compared to non-deterministic NbE, because of its large constant costs, implementation complexity, and the failure to handle sharing loss from beta-redexes in any meaningful way (which is the most important source of sharing loss!). I am also skeptical of exotic evaluators such as interaction nets and optimal beta reducers; there is a good reason that all modern functional languages run on environment machines instead of interaction nets. If we want to support type classes, then tabled instance resolution is also a must, otherwise we are again smothered by bad asymptotics even in modestly complex class hierarchies. This can be viewed as a specific instance of hash-consing (or rather "memoization"), so while I think ubiquitous hash-consing is bad, some focused usage can do good. Injectivity analysis is another thing which I believe has large potential impact. By this I mean checking whether functions are injective up to definitional equality, which is decidable, and can be used to more precisely optimize unfolding in conversion checking. I'd be very interested in your findings about proof assistant performance. This has been a topic that I've been working on on-and-off for several years. I've recently started to implement a system which I intend to be eventually "production strength" and also as fast as possible, and naturally I want to incorporate existing performance know-how. Jason Gross ezt ?rta (id?pont: 2020. m?j. 8., P, 0:20): > I'm in the process of writing my thesis on proof assistant performance > bottlenecks (with a focus on Coq). I'm having some trouble finding prior > work on performance engineering and/or benchmarking of proof assistants > (other than the paper on the Lean tactic language ( > https://leanprover.github.io/papers/tactic.pdf)), and figured I'd reach > out to these lists. > > Does anyone have references for prior work on performance analysis or > engineering of proof assistants or dependently typed languages? (Failing > that, I'd also be interested in papers about compile-time performance of > compilers.) > >> > Thanks, > Jason > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Sun May 10 23:21:09 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 11 May 2020 00:21:09 +0300 Subject: [Agda] "Failed to find source" Message-ID: This is on Agda 2.6.1. When in the file foo/L/M.agda it is set the module ---------------------- open import P using ... module M {..} (S : Setoid _ _) where -- top level parametric module ... ---------------------- (with forgetting to add "L." before "M"), and it is being type-checked under emacs, the message is "Failed to find source of module P in any of the following locations: /foo/L/P.agda ... " If it is type-checked by > cd foo > agda $agdaLibOpt L/M.agda , then the message is helpful: "The name of the top level module does not match the file name. ..." If there is added the prefix "L.", then it is type-checked successfully in both cases. Can Agda issue the latter message in both cases? Regards, ------ Sergei From benedikt.ahrens at gmail.com Mon May 11 04:26:07 2020 From: benedikt.ahrens at gmail.com (Benedikt Ahrens) Date: Sun, 10 May 2020 22:26:07 -0400 Subject: [Agda] Call for Contributions: Workshop on Homotopy Type Theory and Univalent Foundations (HoTT/UF'20) on July 5-6, 2020 Message-ID: <5000acf6-e992-001d-71b9-c2f790e49365@gmail.com> Quick info: - HoTT/UF 2020 will take place online on July 5-6, 2020 - Submission deadline: May 20, 2020 Details below. Best, Benedikt * Workshop on Homotopy Type Theory and Univalent Foundations July 5-6, 2020, The Internet https://hott-uf.github.io/2020 Abstract submission deadline: May 20, 2020 Homotopy Type Theory is a young area of logic, combining ideas from several established fields: the use of dependent type theory as a foundation for mathematics, inspired by ideas and tools from abstract homotopy theory. Univalent Foundations are foundations of mathematics based on the homotopical interpretation of type theory. The goal of this workshop is to bring together researchers interested in all aspects of Homotopy Type Theory and Univalent Foundations: from the study of syntax and semantics of type theory to practical formalization in proof assistants based on univalent type theory. # Invited talks * Carlo Angiuli (Carnegie Mellon University) * Liron Cohen (Ben-Gurion University) * Pierre-Louis Curien (Universit? de Paris) # Submissions * Abstract submission deadline: May 20, 2020 * Author notification: June 05, 2020 Submissions should consist of a title and an abstract, in pdf format, of no more than 2 pages, submitted via https://easychair.org/conferences/?conf=hottuf2020 Considering the broad background of the expected audience, we encourage authors to include information of pedagogical value in their abstract, such as motivation and context of their work. # Program committee * Benedikt Ahrens (University of Birmingham) * Paolo Capriotti (Technische Universit?t Darmstadt) * Chris Kapulkin (University of Western Ontario) * Nicolai Kraus (University of Birmingham) * Peter LeFanu Lumsdaine (Stockholm University) * Anders M?rtberg (Stockholm University) * Paige Randall North (Ohio State University) * Nicolas Tabareau (Inria Nantes) # Organizers * Benedikt Ahrens (University of Birmingham) * Chris Kapulkin (University of Western Ontario) From william.lawrence.harrison at gmail.com Mon May 11 13:39:02 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Mon, 11 May 2020 07:39:02 -0400 Subject: [Agda] Data.Thunk, cofix question Message-ID: Hi, I?m having some difficulty grokking the cofix operator from Data.Thunk. Here it is: cofix : ?[ Thunk P ? P ] ? ?[ P ] cofix f = f (? where .force ? cofix f) Does someone have a simple application of it that they could share with me to ?unstick? me? For example, how would you define some simple Stream example with it (e.g., 'ones = 1 : ones? in Haskell)? If an analogous operator could be defined with musical notation, what would it look like? Any tidbits along those lines would be much appreciated. Thanks! Bill From nad at cse.gu.se Mon May 11 16:57:57 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 11 May 2020 16:57:57 +0200 Subject: [Agda] Data.Thunk, cofix question In-Reply-To: References: Message-ID: <91360604-0401-3883-4c36-1bd9b124669b@cse.gu.se> On 2020-05-11 13:39, William Harrison wrote: > For example, how would you define some simple Stream example with it > (e.g., 'ones = 1 : ones? in Haskell)? Here's one way: {-# OPTIONS --sized-types #-} open import Codata.Stream open import Codata.Thunk open import Data.Nat ones : ? {i} ? Stream ? i ones = cofix (Stream ?) (1 ?_) I'm not sure what the theoretical status of Thunk is, I seem to recall that Andreas Abel expressed some skepticism towards this kind of construction. -- /NAD From nad at cse.gu.se Mon May 11 17:16:58 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 11 May 2020 17:16:58 +0200 Subject: [Agda] "Failed to find source" In-Reply-To: References: Message-ID: On 2020-05-10 23:21, mechvel at scico.botik.ru wrote: > Can Agda issue the latter message in both cases? Try adding a .agda-lib file including the line "include: ." in /foo/. The Emacs mode determines the "root" directory based on the name of the module. If you call the module M, then the root directory is taken to be /foo/L. -- /NAD From william.lawrence.harrison at gmail.com Mon May 11 20:55:22 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Mon, 11 May 2020 14:55:22 -0400 Subject: [Agda] Data.Thunk, cofix question In-Reply-To: <91360604-0401-3883-4c36-1bd9b124669b@cse.gu.se> References: <91360604-0401-3883-4c36-1bd9b124669b@cse.gu.se> Message-ID: <8159349B-A141-432A-AE53-DF645B7F266A@gmail.com> Thanks again ? was/is there a musical notation formulation of cofix? Bill > On May 11, 2020, at 10:57 AM, Nils Anders Danielsson wrote: > > On 2020-05-11 13:39, William Harrison wrote: >> For example, how would you define some simple Stream example with it >> (e.g., 'ones = 1 : ones? in Haskell)? > > Here's one way: > > {-# OPTIONS --sized-types #-} > > open import Codata.Stream > open import Codata.Thunk > open import Data.Nat > > ones : ? {i} ? Stream ? i > ones = cofix (Stream ?) (1 ?_) > > I'm not sure what the theoretical status of Thunk is, I seem to recall > that Andreas Abel expressed some skepticism towards this kind of > construction. > > -- > /NAD From nad at cse.gu.se Tue May 12 12:14:54 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 12 May 2020 12:14:54 +0200 Subject: [Agda] Data.Thunk, cofix question In-Reply-To: <8159349B-A141-432A-AE53-DF645B7F266A@gmail.com> References: <91360604-0401-3883-4c36-1bd9b124669b@cse.gu.se> <8159349B-A141-432A-AE53-DF645B7F266A@gmail.com> Message-ID: On 2020-05-11 20:55, William Harrison wrote: > Thanks again ? was/is there a musical notation formulation of cofix? In the implementation of cofix, how would you ensure that the corecursive call is guarded? I suppose that you could make this work by defining a data type that represents the functions that you intend to use. Instead of (A ? A) ? A you could have something like Data-type-representing-functions-on A guarded ? A, where the index "guarded" ensures that you have at least one occurrence of ? in the expression. -- /NAD From Thorsten.Altenkirch at nottingham.ac.uk Tue May 12 13:51:51 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 12 May 2020 11:51:51 +0000 Subject: [Agda] how to evaluate in the current context Message-ID: <02C11618-32EA-4F4E-8E3B-F55A63765EE3@nottingham.ac.uk> Hi, I have come across this little nuisance when using agda especially when doing life hacking in lectures or talks. I try to evaluate an expression which depends on opening some modules which I have opened in my file but agda is not aware of this. E.g. record Stream (A : Set) : Set where constructor _?_ coinductive field hd : A tl : Stream A open Stream from : ? ? Stream ? hd (from n) = n tl (from n) = from (suc n) And then I say C-c C-n ?hd (from 0)? and agda responds 1,1-3 Not in scope: hd at 1,1-3 (did you mean 'Stream.hd'?) when scope checking hd Ok I can just introduce a shed x = {!!} and evaluate inside there but this is a bit clumsy. Isn?t there a better way to do this? Btw, for the same purposes I?d love to have an agda top-level! And a printer that evaluates conductive objects by mapping them to costrings? Thorsten P.S. Ok I can say ?open Stream public? ? but do I want this? This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Tue May 12 13:52:48 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 12 May 2020 11:52:48 +0000 Subject: [Agda] with + Path Message-ID: <53662665-A6ED-4A9F-B22F-C9C53FE1AC61@nottingham.ac.uk> with clauses not supported in the presence of Path patterns when checking that the clause prd? (+0 n i) with prd? n ... | x = ? Has type (n : ??) ? (n +? zero?) ? n Any chance that this will get fixed soon, please? Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Tue May 12 14:55:13 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 12 May 2020 14:55:13 +0200 Subject: [Agda] how to evaluate in the current context In-Reply-To: <02C11618-32EA-4F4E-8E3B-F55A63765EE3@nottingham.ac.uk> References: <02C11618-32EA-4F4E-8E3B-F55A63765EE3@nottingham.ac.uk> Message-ID: On 2020-05-12 13:51, Thorsten Altenkirch wrote: > Ok I can just introduce a shed > > x = {!!} > > and evaluate inside there but this is a bit clumsy. Isn?t there a > better way to do this? What context do you want to evaluate things in? > Btw, for the same purposes I?d love to have an agda top-level! And a > printer that evaluates conductive objects by mapping them to > costrings? Please open some tickets on the bug tracker. -- /NAD From Thorsten.Altenkirch at nottingham.ac.uk Tue May 12 15:54:07 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 12 May 2020 13:54:07 +0000 Subject: [Agda] how to evaluate in the current context In-Reply-To: References: <02C11618-32EA-4F4E-8E3B-F55A63765EE3@nottingham.ac.uk> Message-ID: <5989D5EA-64D6-4337-B1BA-4F36985E5E3B@nottingham.ac.uk> ?On 12/05/2020, 13:55, "Nils Anders Danielsson" wrote: On 2020-05-12 13:51, Thorsten Altenkirch wrote: > Ok I can just introduce a shed > > x = {!!} > > and evaluate inside there but this is a bit clumsy. Isn?t there a > better way to do this? What context do you want to evaluate things in? Within the current file, i.e. module. That is I want to evaluate the expression as if I put it at the end of the current file. > Btw, for the same purposes I?d love to have an agda top-level! And a > printer that evaluates conductive objects by mapping them to > costrings? Please open some tickets on the bug tracker. I guess this is more a feature request. Thorsten -- /NAD This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From monnier at iro.umontreal.ca Tue May 12 16:30:33 2020 From: monnier at iro.umontreal.ca (Stefan Monnier) Date: Tue, 12 May 2020 10:30:33 -0400 Subject: [Agda] [Coq-Club] Prior work on proof assistant performance / optimization In-Reply-To: (=?windows-1252?Q?=22Andr=E1s_Kov=E1cs=22's?= message of "Fri, 8 May 2020 10:55:31 +0200") References: Message-ID: > You may be interested in my github repos: smalltt > , normalization-bench > . I haven't yet > updated the smalltt repo, but there's a simplified implementation > of > its evaluator, which seems to have roughly the same performance but which > is much simpler to implement. Very interesting, thank you. > It is also extremely important to stick to the spirit of Coquand's semantic > checking algorithm as much as possible. In summary: core syntax should > support *no* expensive computation: no substitution, shifting, renaming, or > other ad-hoc term massaging. Core syntax should be viewed as immutable > machine code, which supports evaluation into various semantic domains, from > which sometimes we can read syntax back; this also leaves it open to swap > out the representation of core syntax to efficient alternatives such as > bytecode or machine code. [ Hmm... I kind of vaguely understand what that entails, but can't quite see how that would work in practice. I guess I'll have to dig deeper into your above Git repositories. ] > Only after we get the above two basic points right, can we start to think > about more specific and esoteric optimizations. I am skeptical of proposed > solutions which do not include these. Hash consing has been brought up many > times, but it is very unsatisfying compared to non-deterministic NbE, > because of its large constant costs, implementation complexity, and the > failure to handle sharing loss from beta-redexes in any meaningful way > (which is the most important source of sharing loss!). Could you elaborate on this "sharing loss from beta-redexes"? Stefan From nad at cse.gu.se Tue May 12 17:12:34 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 12 May 2020 17:12:34 +0200 Subject: [Agda] how to evaluate in the current context In-Reply-To: <5989D5EA-64D6-4337-B1BA-4F36985E5E3B@nottingham.ac.uk> References: <02C11618-32EA-4F4E-8E3B-F55A63765EE3@nottingham.ac.uk> <5989D5EA-64D6-4337-B1BA-4F36985E5E3B@nottingham.ac.uk> Message-ID: <6ed817fb-aff8-da8e-1673-bb82ed7586ed@cse.gu.se> On 2020-05-12 15:54, Thorsten Altenkirch wrote: > That is I want to evaluate the expression as if I put it at the end of > the current file. That can be ambiguous. However, let's discuss this on the bug tracker. > I guess this is more a feature request. Feature requests are welcome on the bug tracker. -- /NAD From puttamalac at gmail.com Tue May 12 17:15:17 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Tue, 12 May 2020 17:15:17 +0200 Subject: [Agda] [Coq-Club] Prior work on proof assistant performance / optimization In-Reply-To: References: Message-ID: > > Could you elaborate on this "sharing loss from beta-redexes"? We may have a huge Peano numeral which is represented by a small term, because we can use iteration/recursion to give short descriptions of large numerals. Then, we can beta-reduce from a small term to a large numeral, but we cannot go from a large numeral to a small term. In particular, Peano numerals are incompressible by hash consing. Hash consing only does "delta-contraction", i.e. contracting terms by maximally introducing let-definitions, but it is intractable to invent small terms which beta reduce to a given term (related: Kolmogorov complexity). Stefan Monnier ezt ?rta (id?pont: 2020. m?j. 12., K, 16:30): > > You may be interested in my github repos: smalltt > > , normalization-bench > > . I haven't yet > > updated the smalltt repo, but there's a simplified implementation > > > of > > its evaluator, which seems to have roughly the same performance but which > > is much simpler to implement. > > Very interesting, thank you. > > > It is also extremely important to stick to the spirit of Coquand's > semantic > > checking algorithm as much as possible. In summary: core syntax should > > support *no* expensive computation: no substitution, shifting, renaming, > or > > other ad-hoc term massaging. Core syntax should be viewed as immutable > > machine code, which supports evaluation into various semantic domains, > from > > which sometimes we can read syntax back; this also leaves it open to swap > > out the representation of core syntax to efficient alternatives such as > > bytecode or machine code. > > [ Hmm... I kind of vaguely understand what that entails, but can't quite > see how that would work in practice. I guess I'll have to dig deeper > into your above Git repositories. ] > > > Only after we get the above two basic points right, can we start to > think > > about more specific and esoteric optimizations. I am skeptical of > proposed > > solutions which do not include these. Hash consing has been brought up > many > > times, but it is very unsatisfying compared to non-deterministic NbE, > > because of its large constant costs, implementation complexity, and the > > failure to handle sharing loss from beta-redexes in any meaningful way > > (which is the most important source of sharing loss!). > > Could you elaborate on this "sharing loss from beta-redexes"? > > > Stefan > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Tue May 12 18:11:27 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 12 May 2020 18:11:27 +0200 Subject: [Agda] how to evaluate in the current context In-Reply-To: <6ed817fb-aff8-da8e-1673-bb82ed7586ed@cse.gu.se> References: <02C11618-32EA-4F4E-8E3B-F55A63765EE3@nottingham.ac.uk> <5989D5EA-64D6-4337-B1BA-4F36985E5E3B@nottingham.ac.uk> <6ed817fb-aff8-da8e-1673-bb82ed7586ed@cse.gu.se> Message-ID: Here you go: https://github.com/agda/agda/issues/4647 Discussions continue there, please. On 2020-05-12 17:12, Nils Anders Danielsson wrote: > On 2020-05-12 15:54, Thorsten Altenkirch wrote: >> That is I want to evaluate the expression as if I put it at the end of >> the current file. > > That can be ambiguous. However, let's discuss this on the bug tracker. > >> I guess this is more a feature request. > > Feature requests are welcome on the bug tracker. > From andreas.abel at ifi.lmu.de Tue May 12 18:55:01 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 12 May 2020 18:55:01 +0200 Subject: [Agda] PPDP 2020 deadline extension Message-ID: UPDATE: extended deadlines! Abstract deadline: Mon 18 May 2020 AoE Paper deadline: Fri 22 May 2020 AoE Submissions at: https://easychair.org/conferences/?conf=ppdp2020 PPDP 2020 Call For Papers ========================= The 22nd International Symposium on Principles and Practice of Declarative Programming, [PPDP 2020](http://www.cse.chalmers.se/~abela/ppdp20/), hosted 8-10 September 2020 by the University of Bologna, Italy. **Due to the COVID-19 pandemic, PPDP 2020 will take place online. The submission, review, and publication process is unaffected. However, the deadlines have been extended by a week to accommodate for the situation.** Scope ----- The PPDP 2020 symposium brings together researchers from the declarative programming communities, including those working in the functional, logic, answer-set, and constraint handling programming paradigms. The goal is to stimulate research in the use of logical formalisms and methods for analyzing, performing, specifying, and reasoning about computations, including mechanisms for concurrency, security, static analysis, and verification. Submissions are invited on all topics related to declarative programming, from principles to practice, from foundations to applications. Topics of interest include, but are not limited to: - Language Design: domain-specific languages; interoperability; concurrency, parallelism and distribution; modules; functional languages; reactive languages; languages with objects; languages for quantum computing; languages inspired by biological and chemical computation; metaprogramming. - Declarative languages in artificial intelligence: logic programming; database languages; knowledge representation languages; probabilistic languages; differentiable languages. - Implementations: abstract machines; interpreters; compilation; compile-time and run-time optimization; memory management. - Foundations: types; logical frameworks; monads and effects; semantics. - Analysis and Transformation: partial evaluation; abstract interpretation; control flow; data flow; information flow; termination analysis; resource analysis; type inference and type checking; verification; validation; debugging; testing. - Tools and Applications: programming and proof environments; verification tools; case studies in proof assistants or interactive theorem provers; certification; novel applications of declarative programming inside and outside of CS; declarative programming pearls; practical experience reports and industrial application; education. The PC chair will be happy to advise on the appropriateness of a topic. PPDP will take place 8-10 September 2020 virtually hosted by the University of Bologna, Italy, co-organized with the 29th Int'l Symp. on Logic-Based Program Synthesis and Transformation (LOPSTR 2020) and the International conference on [Microservices 2020](https://www.conf-micro.services/2020/). Submissions ----------- Submissions are welcome on easychair at https://easychair.org/conferences/?conf=ppdp2020 Submission Categories --------------------- Submissions can be made in three categories: - regular Research Papers, - System Descriptions, and - Experience Reports. Submissions of Research Papers must present original research which is unpublished and not submitted elsewhere. They must not exceed 12 pages ACM style 2-column (including figures, but excluding bibliography). Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Research papers will be judged on originality, significance, correctness, clarity, and readability. Submission of System Descriptions must describe a working system whose description has not been published or submitted elsewhere. They must not exceed 10 pages and should contain a link to a working system. System Descriptions must be marked as such at the time of submission and will be judged on originality, significance, usefulness, clarity, and readability. Submissions of Experience Reports are meant to help create a body of published, refereed, citable evidence where declarative programming such as functional, logic, answer-set, constraint programming, etc., is used in practice. They must not exceed 5 pages **including references**. Experience Reports must be marked as such at the time of submission and need not report original research results. They will be judged on significance, usefulness, clarity, and readability. Possible topics for an Experience Report include, but are not limited to: - insights gained from real-world projects using declarative programming - comparison of declarative programming with conventional programming in the context of an industrial project or a university curriculum - curricular issues encountered when using declarative programming in education - real-world constraints that created special challenges for an implementation of a declarative language or for declarative programming in general - novel use of declarative programming in the classroom - programming pearl that illustrates a nifty new data structure or programming technique. Supplementary material may be provided via a link to an extended version of the submission (recommended), or in a clearly marked appendix beyond the above-mentioned page limits. Reviewers are not required to study extended versions or any material beyond the respective page limit. Material beyond the page limit will not be included in the final published version. Format of a submission ---------------------- For each paper category, you must use the most recent version of the "Current ACM Master Template" which is available at . The most recent version at the time of writing is 1.70. You must use the LaTeX sigconf proceedings template as the conference organizers are unable to process final submissions in other formats. In case of problems with the templates, contact [ACM's TeX support team at Aptara](mailto:acmtexsupport at aptaracorp.com). Authors should note [ACM's statement on author's rights](http://authors.acm.org/) which apply to final papers. Submitted papers should meet the requirements of [ACM's plagiarism policy](http://www.acm.org/publications/policies/plagiarism_policy). Requirements for publication ---------------------------- **Due to the shift to an online event, registration fees will be decreased to cover only the costs of publication and online event hosting.** At least one author of each accepted submission will be expected to register and present the work at the conference. The PC chair may retract a paper that is not presented. The PC chair may also retract a paper if complaints about the paper's correctness are raised which cannot be resolved by the final paper deadline. Important dates --------------- The organizers appreciate that potential authors may be disadvantaged by the COVID-19 pandemic and resulting disruption. **To encourage submissions, short extensions are available on request.** To request an extension, please register an abstract before the abstract deadline and write to the PC chair before the submission deadline explaining the circumstances and duration of the extension. -------------------------------- ----- ---- ---------- Title and abstract (extended): 18 May 2020 (AoE) Paper submission (extended): 22 May 2020 (AoE) Rebuttal period (48 hours): 22-23 June 2020 (AoE) Author notification: 3 July 2020 Final paper version: 21 July 2020 Conference: 8-10 Sept 2020 -------------------------------- ----- ---- ---------- Organization ------------ ------------------------- -------------------- --------------------------- Program committee chairs: Andreas Abel, Gothenburg University James Cheney, The University of Edinburgh Steering committee chair: James Cheney, The University of Edinburgh General chair: Maurizio Gabbrielli, University of Bologna ------------------------- -------------------- --------------------------- Program committee ----------------- ----------------------- ------------------------------------------------------ Andreas Abel (co-chair) Gothenburg University, SE Kenichi Asai Ochanomizu University, Tokyo, JP James Cheney (co-chair) The University of Edinburgh, UK Ugo Dal Lago University of Bologna, IT & INRIA Sophia Antipolis, FR Thom Fruehwirth University of Ulm, DE Michael Hanus Christian-Albrechts-Universit?t zu Kiel, DE Jacob Howe City, University of London, UK Fred Mesnard Universit? de la R?union, FR Henrik Nilsson University of Nottingham, UK David Sabel Ludwig Maximilians University of Munich, DE Claudio Sacerdoti Coen University of Bologna, IT Ulrich Sch?pp fortiss GmbH, DE Martin Sulzmann Karlsruhe University of Applied Sciences, DE Christine Tasson Universit? Paris Diderot & IRIF, FR Peter Van Roy Universit? catholique de Louvain, BE ----------------------- ------------------------------------------------------ From leo at lpw25.net Tue May 12 20:18:01 2020 From: leo at lpw25.net (Leo White) Date: Tue, 12 May 2020 19:18:01 +0100 Subject: [Agda] ML Family Workshop 2020: Deadline extension Message-ID: <34daccf6-850a-4bb5-a0f6-50ab1e2b8a31@www.fastmail.com> Due to the COVID-19 pandemic, ML 2020 will take place online. The submission deadline has been extended to the end of the month to accommodate for the change in situation. ============================================================= We are happy to invite submissions to the ML Family Workshop 2020, to be held during the ICFP conference week on Thursday, August 27th. The ML family workshop warmly welcomes submission touching on the programming languages traditionally seen as part of the "ML family" (Standard ML, OCaml, F#, CakeML, SML#, Manticore, MetaOCaml, etc.). The scope of the workshop includes all aspects of the design, semantics, theory, application, implementation, and teaching of the members of the ML family. We also encourage presentations from related languages (such as Haskell, Scala, Rust, Nemerle, Links, Koka, F*, Eff, ATS, etc), to exchange experience of further developing ML ideas. Due to the COVID-19 pandemic, the workshop will take place online. See our detailed CFP online on the ICFP website: https://icfp20.sigplan.org/home/mlfamilyworkshop-2020 Important dates --------------- - Friday 29th May (any time zone): Abstract submission deadline - Friday 17th July: Author notification - Thursday 27th August: ML Family Workshop Program committee ----------------- - Youyou Cong (Tokyo Institute of Technology) - Ivan Gotovchits (Carnegie Mellon University) - Gowtham Kaki (Purdue University) - Neel Krishnaswami (University of Cambridge) - Daan Leijen (Microsoft Research) - Koko Muroya (Kyoto University) - Atsushi Ohori (Tohoku University) - Jonathan Protzenko (Microsoft Research) - Gabriel Radanne (INRIA) - Claudio Russo (Dfinity) - Leo White (Jane Street) (Chair) - Jeremy Yallop (University of Cambridge) Submission details ------------------ See the online CFP for the details on the expected submission format. Submissions must be uploaded to the workshop submission website https://ml2020.hotcrp.com/ before the submission deadline. From james.wood.100 at strath.ac.uk Tue May 12 21:11:39 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Tue, 12 May 2020 20:11:39 +0100 Subject: [Agda] how to evaluate in the current context In-Reply-To: <02C11618-32EA-4F4E-8E3B-F55A63765EE3@nottingham.ac.uk> References: <02C11618-32EA-4F4E-8E3B-F55A63765EE3@nottingham.ac.uk> Message-ID: <5e3846dc-3bf4-a7b2-e9ed-9a5e638e9250@strath.ac.uk> Hi Thorsten, Just to comment on the bit I think I can comment on, > P.S. Ok I can say ?open Stream public? ? but do I want this? you most probably do want to. My heuristic is that all records should be opened like this except them acting like typeclasses. More precisely, a record is acting like a typeclass if its fields are to be seen as ad-hoc polymorphic values, rather than constituent data of some complex transient value. Another, seemingly equivalent, condition is whether it makes sense to work ?inside? a specific or general inhabitant. A good example is to look at monoids vs monoid homomorphisms. If we had `open Monoid public`, we would have - Carrier : Monoid ? Set - ? : (M : Monoid) ? Carrier M - _?_ : (M : Monoid) (x y : Carrier M) ? Carrier M - &c all in scope (notice how `_?_` has accidentally become a binary operator taking three operands). To use these fields, we would always have to supply the monoid instance `M`. But when we say ?suppose M is a monoid?, we also mean to do `open Monoid M`, so that we don't have to keep giving the monoid instance. This is what I mean by ?working inside an instance?. Notice that `open Monoid M` is incompatible with `open Monoid`, as the names would clash. In contrast, a monoid homomorphism is a single datum, rather than a set with structure. As such, it doesn't make much sense to work inside a monoid homomorphism. What we really want to do is be able to deal with several homomorphisms at once, being perfectly happy with naming the homomorphism whenever we use any of the data it packs up. In fact, we'd rather name only the homomorphism, and not precisely which field we're using, though this is not possible in Agda. While we're naming inhabitants, it makes sense for all of the eliminators to be visible, hence `open MonoidHomomorphism public`. The only other concern is if field names clash with green definitions from some other module. I think these clashes between eliminators and definitions should be handled just as clashes between two definitions would be: at the import site, using qualified imports. Regards, James On 12/05/2020 12:51, Thorsten Altenkirch wrote: > Hi, > > ? > > I have come across this little nuisance when using agda especially when > doing life hacking in lectures or talks. > > ? > > I try to evaluate an expression which depends on opening some modules > which I have opened in my file but agda is not aware of this. E.g. > > ? > > record Stream (A : Set) : Set where > > ? constructor _?_ > > ? coinductive > > ? field > > ??? hd : A > > ??? tl : Stream A > > ? > > open Stream > > ? > > from : ?? Stream ? > > hd (from n) = n > > tl (from n) = from (suc n) > > ? > > And then I say C-c C-n ?hd (from 0)? and agda responds > > ? > > 1,1-3 > > Not in scope: > > ? hd at 1,1-3 (did you mean 'Stream.hd'?) > > when scope checking hd > > ? > > Ok I can just introduce a shed > > ? > > x = {!!} > > ? > > and evaluate inside there but this is a bit clumsy. Isn?t there a better > way to do this? > > ? > > Btw, for the same purposes I?d love to have an agda top-level! And a > printer that evaluates conductive objects by mapping them to costrings? > > ? > > Thorsten > > ? > > P.S. Ok I can say ?open Stream public? ? but do I want this? > > ? > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7C0aba3584ca574431461508d7f66afebb%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637248811713807387&sdata=bvu3ScVwzFlnypsEQS869A1p1NBOtx5dR5Lqx1kfovE%3D&reserved=0 > From kahl at cas.mcmaster.ca Tue May 12 22:35:22 2020 From: kahl at cas.mcmaster.ca (Wolfram Kahl) Date: Tue, 12 May 2020 16:35:22 -0400 Subject: [Agda] [Coq-Club] Prior work on proof assistant performance / optimization In-Reply-To: References: Message-ID: <20200512203522.GT9255@ritchie.cas.mcmaster.ca> On Tue, May 12, 2020 at 05:15:17PM +0200, Andr?s Kov?cs wrote: > Stefan Monnier ezt ?rta (id?pont: 2020. m?j. > 12., K, 16:30): > > > > Could you elaborate on this "sharing loss from beta-redexes"? > > We may have a huge Peano numeral which is represented by a small term, > because we can use iteration/recursion to give short descriptions of large > numerals. Then, we can beta-reduce from a small term to a large numeral, > but we cannot go from a large numeral to a small term. In particular, Peano > numerals are incompressible by hash consing. Hash consing only does > "delta-contraction", i.e. contracting terms by maximally introducing > let-definitions, but it is intractable to invent small terms which beta > reduce to a given term (related: Kolmogorov complexity). So technically, the lost sharing is the second-order sharing that is preserved in ``optimal reduction'' of lambda calculi [Levy-1980, Lamping-1990, Asperti-Laneve-1992], while hash consing normally is directly usable only for first-order sharing. Wolfram From jasongross9 at gmail.com Thu May 14 03:08:14 2020 From: jasongross9 at gmail.com (Jason Gross) Date: Wed, 13 May 2020 21:08:14 -0400 Subject: [Agda] Prior work on proof assistant performance / optimization In-Reply-To: References: Message-ID: Thanks! This is very interesting. (And thanks all for sources.) I'm still digesting this, but have one question already: > Clearly, we should use NbE/environment machines for evaluation, and implement conversion checking in the semantic domain. Does this mean that we can't be agnostic about whether or not we're supporting HoTT, because we either have to pick set theory/irrelevant equality proofs or cubical (or some other model of HoTT) when normalizing proofs of equality? > I'd be very interested in your findings about proof assistant performance. I'd be happy to share once I have my thesis in a sufficiently ready state! Broadly, the message of my thesis is that performance of (dependently-typed) proof assistants / interactive theorem provers is an interesting area of research sorely in need of systematic study. (My thesis will also include some of the research work I've done, which can be rendered as "how to work around some of the asymptotics in Coq without needing to change the system", but I think that's a bit less broadly interesting.) -Jason On Fri, May 8, 2020 at 4:55 AM Andr?s Kov?cs wrote: > Hi Jason, > > You may be interested in my github repos: smalltt > , normalization-bench > . I haven't yet > updated the smalltt repo, but there's a simplified implementation > > of its evaluator, which seems to have roughly the same performance but > which is much simpler to implement. > > The basic idea is that in elaboration there are two primary computational > tasks, one is conversion checking and the other is generating solutions for > metavariables. Clearly, we should use NbE/environment machines for > evaluation, and implement conversion checking in the semantic domain. > However, when we want to generate meta solutions, we need to compute > syntactic terms, and vanilla NbE domain only supports quote/readback to > normal forms. Normal forms are way too big and terrible for this purpose. > Hence, we extend vanilla NbE domain with lazy non-deterministic choice > between two or more evaluation strategies. In the simplest case, the point > of divergence is whether we unfold some class of definitions or not. Then, > the conversion checking algorithm can choose to take the full-unfolding > branch, and the quoting operation can choose to take the non-unfolding > branch. At the same time, we have a great deal of shared computation > between the two branches; we avoid recomputing many things if we choose to > look at both branches. > > I believe that a feature like this is absolutely necessary for robust > performance. Otherwise, we choke on bad asymptotics, which is surprisingly > common in dependent settings. In Agda and Coq, even something as trivial as > elaborating a length-indexed vector expression has quadratic complexity in > the length of the vector. > > It is also extremely important to stick to the spirit of Coquand's > semantic checking algorithm as much as possible. In summary: core syntax > should support *no* expensive computation: no substitution, shifting, > renaming, or other ad-hoc term massaging. Core syntax should be viewed as > immutable machine code, which supports evaluation into various semantic > domains, from which sometimes we can read syntax back; this also leaves it > open to swap out the representation of core syntax to efficient > alternatives such as bytecode or machine code. > > Only after we get the above two basic points right, can we start to think > about more specific and esoteric optimizations. I am skeptical of proposed > solutions which do not include these. Hash consing has been brought up many > times, but it is very unsatisfying compared to non-deterministic NbE, > because of its large constant costs, implementation complexity, and the > failure to handle sharing loss from beta-redexes in any meaningful way > (which is the most important source of sharing loss!). I am also skeptical > of exotic evaluators such as interaction nets and optimal beta reducers; > there is a good reason that all modern functional languages run on > environment machines instead of interaction nets. > > If we want to support type classes, then tabled instance resolution > is also a must, otherwise we are > again smothered by bad asymptotics even in modestly complex class > hierarchies. This can be viewed as a specific instance of hash-consing (or > rather "memoization"), so while I think ubiquitous hash-consing is bad, > some focused usage can do good. > > Injectivity analysis is another thing which I believe has large potential > impact. By this I mean checking whether functions are injective up to > definitional equality, which is decidable, and can be used to more > precisely optimize unfolding in conversion checking. > > I'd be very interested in your findings about proof assistant performance. > This has been a topic that I've been working on on-and-off for several > years. I've recently started to implement a system which I intend to be > eventually "production strength" and also as fast as possible, and > naturally I want to incorporate existing performance know-how. > > > Jason Gross ezt ?rta (id?pont: 2020. m?j. 8., P, > 0:20): > >> I'm in the process of writing my thesis on proof assistant performance >> bottlenecks (with a focus on Coq). I'm having some trouble finding prior >> work on performance engineering and/or benchmarking of proof assistants >> (other than the paper on the Lean tactic language ( >> https://leanprover.github.io/papers/tactic.pdf)), and figured I'd reach >> out to these lists. >> >> Does anyone have references for prior work on performance analysis or >> engineering of proof assistants or dependently typed languages? (Failing >> that, I'd also be interested in papers about compile-time performance of >> compilers.) >> >>> >> Thanks, >> Jason >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Thu May 14 14:22:58 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 14 May 2020 13:22:58 +0100 Subject: [Agda] PhD Scholarships in Mathematics and computation Message-ID: <990cfe9a-1af5-3dce-c2a5-802a28f1fb8d@cs.bham.ac.uk> We have funding for PhD studentships in mathematics and computation in our Theoretical Computer Science group https://www.cs.bham.ac.uk/research/groupings/theory/ If you are interested, please approach an academic from the above web page, with Cc: to me, briefly explaining your research interests and academic qualifications. After you approach us we will give you further information and instructions. From mateus.oliveira at gmail.com Sat May 16 18:00:00 2020 From: mateus.oliveira at gmail.com (Mateus de Oliveira Oliveira) Date: Sat, 16 May 2020 18:00:00 +0200 Subject: [Agda] Milestone-Based Paid Remote Short-Term Projects in Formalization of Algorithms In-Reply-To: References: Message-ID: *Milestone-Based Paid Remote Short-Term Projects in Formalization of Algorithms * *Call: * Applications are sought for students interested in taking part in projects related to proof formalization. These projects will happen in the context of the project "Automated Theorem Proving from the Mindset of Parameterized Complexity Theory", which is hosted at the University of Bergen (Norway), and which is financed by the Research Council of Norway. The call is primarily open to students in Computer Science or Mathematics (at all levels). Students from anywhere in the world can apply. Prospective applicants should have excellent skills in proof formalization in some mainstream proof assistants. Proficiency in the Coq proof assistant will be given priority. The main activity will be the formalization of data structures and algorithms of relevance to the field of automated theorem proving. These data structures and algorithms will be discussed in great detail during the execution of the project. The projects will be conducted completely remotely and will be milestone-based. A typical project will have a total of 6 milestones, with an expected time of 2 weeks for the completion of each milestone. So the total expected time for the conclusion of a project is about 3 months. The student will get an award of 200 EUR upon the completion (and approval) of each milestone, and before the start of the next milestone (that means 1200 EUR for the whole project). These numbers may vary depending on the project, on the skills of the student, and on a previous agreement. Requirements and expectations will be discussed before the start of the project. The student will be invited to join a research paper related to their project. The milestones are challenging and will require a substantial amount of effort from the part of the student. Requirements: 1) Excellent skills in proof formalization in some mainstream proof assistant. Proficiency in the Coq proof assistant will be given priority. 2) Availability to meet by skype (or other media) at least one hour per week. 3) Ability to conduct the project independently, and timely. 4) Drive for challenges. *Application: *Please send an email with a SINGLE PDF to mateus.oliveira at uib.no containing the following information. Please write REMOTE PROJECT IN PROOF FORMALIZATION in the subject line. 1) A cover letter specifying your skills in proof formalization and when you would like to start a project. The earliest time is June 15. 2) Your CV. 3) A transcript of your grades. 4) (Optional) Letters of recommendation. Alternatively, the person recommending you may write directly to me. Best Regards, Mateus de Oliveira Oliveira Postdoctoral Researcher in Algorithms Department of Informatics, University of Bergen, Norway http://www.unitslice.org/ Virus-free. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: From joey.eremondi at gmail.com Mon May 18 21:52:25 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Mon, 18 May 2020 12:52:25 -0700 Subject: [Agda] Value-recursive records? Message-ID: Disclaimer: X-posted on Stack Overflow: https://stackoverflow.com/questions/61877871/agda-constructing-a-recursive-record-value I'm wondering, is it possible to have records whose *values* depend on each other, without being recursively defined in terms of types? Basically, I have a record type that looks like this: record SomeRec (a : Set) : Set where method1 : a -> a -> Foo method2 : a -> a -> Bar ... method n : a -> a -> Baz where n is large enough that I want to actually bundle all of these up as records, instead of just having a bunch of mutually recursive functions. (Also, I'm using SomeRec as an instance argument). Notably, SomeRec is not recursive: none of its fields types refer to SomeRec. Right now, I have a Description D, where FD : Set -> Set is the functor described by D. What I'm trying to show is the following: muRec : ( FRec : (a : Set) -> SomeRec a -> SomeRec (FD a) ) -> SomeRec (mu D) That is, if I can take a (SomeRec a) to a (SomeRec (F a)), then I can tie the knot recursively and show the instance for the whole thing. In principle this can be done: each recursive call to a field of SomeRec would happen with strictly smaller arguments. If I were to just have 10 mutually recursive methods, it would work. But if I try to build the record, I end up passing muRec to FRec *without its arguments decreasing*. So, what I'm wondering is: is there a way to show that this is well-founded? Can induction or coinduction help, even though the record type is not inductive or coinductive? My current approach is to make a size-indexed version of D, and build SomeRec for size n out of SomeRec for size < n. But this is dramatically increasing the complexity of what I'm doing, and I'm having to use Brouwer ordinals to get size bounds on what I'm doing. So I'm wondering if there's a better way. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.brunerie at gmail.com Tue May 19 12:59:55 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Tue, 19 May 2020 12:59:55 +0200 Subject: [Agda] Performance: opening parameterized modules before the fields of a record Message-ID: Hello, (not sure if I should post that here or on the bug tracker) I?m trying to figure out why some project that I have been working on requires as much memory as it does, and I have a specific question about opening parameterized modules inside records. I know that inserting definitions between/before fields in a record results to them being translated to let-ins in all the subsequent fields, and I have learned recently (from issue #4331) that applying parameterized modules simply generate a bunch of new functions for everything exported by the module. Now I noticed the following code in my project, there are many other similar pieces of code, but this is the simplest instance. record CCatwithUU (ccat : CCat) : Set? where > no-eta-equality > open CCat+ ccat renaming (Mor to MorC) field > UUStr : (i : ?) (? : Ob n) ? Ob (suc n) > UUStr= : {i : ?} {? : Ob n} ? ft (UUStr i ?) ? ? > UUStrNat' : {i : ?} (g : MorC n m) (? : Ob n) (g? : ?? g ? ?) (? : Ob > m) (g? : ?? g ? ?) > ? star g (UUStr i ?) UUStr= g? ? UUStr i ? > > UUStrNat : {i : ?} {g : MorC n m} {? : Ob n} (g? : ?? g ? ?) {? : Ob m} > {g? : ?? g ? ?} > ? star g (UUStr i ?) UUStr= g? ? UUStr i ? > UUStrNat g? {g? = g?} = UUStrNat' _ _ g? _ g? > It?s not very important what everything means, but the thing that I?m worried about is that I apply and open the parameterized module CCat+ (which is a rather big module, with ~100 definitions) before the fields of the record. Could it be that this adds ~100 let-ins in the type of each of the fields? I have quite a few (~30) similar records, more complicated than this one, and which often open each other, so that could quickly explode. As a test, I duplicated the "open CCat+ ccat ?" line 10 times inside the record, and it took much longer to type check (5 seconds as opposed to less than half a second), most of it on positivity checking. Thanks, Best, Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From brunocdsoliveira at googlemail.com Wed May 20 07:23:04 2020 From: brunocdsoliveira at googlemail.com (Bruno Oliveira) Date: Wed, 20 May 2020 13:23:04 +0800 Subject: [Agda] Call for Papers: APLAS 2020 Message-ID: CALL FOR PAPERS 18th Asian Symposium on Programming Languages and Systems (APLAS 2020) Nov 29-Dec 3, 2020 Fukuoka, Japan https://conf.researchr.org/home/aplas-2020 The 18th Asian Symposium on Programming Languages and Systems (APLAS 2020) aims to stimulate programming language research by providing a forum for the presentation of the latest results and the exchange of ideas in programming languages and systems. APLAS is based in Asia but is an international forum that serves the worldwide programming languages community. APLAS 2020 will be tentatively held in Nishijin Plaza, Fukuoka City, Japan between November 30th and 2rd of December 2020. Due to the COVID-19 situation, all authors will be given the chance to present remotely regardless of whether the conference is held as a physical, virtual, or hybrid physical/virtual meeting. Papers are solicited on topics such as: - Semantics, logics, foundational theory - Design of languages, type systems, and foundational calculi - Domain-specific languages - Compilers, interpreters, abstract machines - Program derivation, synthesis, and transformation - Program analysis, verification, model-checking - Logic, constraint, probabilistic, and quantum programming - Software security - Concurrency and parallelism - Tools and environments for programming and implementation Topics are not limited to those discussed in previous symposiums. Papers identifying future directions of programming and those addressing the rapid changes of the underlying computing platforms are especially welcome. Demonstration of systems and tools in the scope of APLAS are welcome to the System and Tool demonstrations category. Authors concerned about the appropriateness of a topic are welcome to consult with program chair prior to submission. IMPORTANT DATES Abstract deadline: June 26th, 2020 (anywhere on Earth) Submission deadline: July 3rd, 2020 (anywhere on Earth) Author response: August 3-5, 2020 Author notification: August 14, 2020 Final version: September 1, 2020 Conference: November 30 - December 2, 2020 CALL FOR REGULAR RESEARCH PAPERS We solicit submissions in the form of regular research papers describing original scientific research results, including system development and case studies. Regular research papers should not exceed 18 pages in the Springer LNCS format, including bibliography and figures. This category encompasses both theoretical and implementation (also known as system descriptions) papers. In either case, submissions should clearly identify what has been accomplished and why it is significant. Submissions will be judged on the basis of significance, relevance, correctness, originality, and clarity. System descriptions papers should contain a link to a working system and will be judged on originality, usefulness, and design. In case of lack of space, proofs, experimental results, or any information supporting the technical results of the paper could be provided as an appendix or a link to a web page, but reviewers are not obliged to read them. CALL FOR TOOL PAPERS We solicit submissions in the form of tool papers describing a demonstration of a tool or a system that support theory, program construction, reasoning, or program execution in the scope of APLAS. The main purpose of a tool paper is to display a completed, robust and well-documented tool-highlighting the overall functionality of the tool, the interfaces of the tool, interesting examples and applications of the tool, an assessment of the tool?s strengths and weaknesses, and a summary of documentation/support available with the tool. Authors of tool demonstration proposals are expected to present a live demonstration of the tool at the conference. It is highly desirable that the tools are available on the web. System and Tool papers should not exceed 8 pages in the Springer LNCS format, including bibliography and figures. They may include an additional appendix of up to 6 extra pages giving the outline, screenshots, examples, etc. to indicate the content of the proposed live demo. PROGRAM COMMITTEE Edwin Brady, University of St. Andrews, UK Soham Chakraborty, IIT Delhi, India Andreea Costea, National University Of Singapore, Singapore Silvia Crafa, University of Padova, Italy Pierre-Evariste Dagand, LIP6/CNRS, France Mila Dalla Preda, University of Verona, Italy Cristina David, University of Oxford, UK Benjamin Delaware, Purdue University, US Florian Rabe, University of Erlangen, Germany Jeremy Gibbons, University of Oxford, UK Ichiro Hasuo, National Institute of Informatics, Japan Sam Lindley, The University of Edinburgh, UK James McKinna, The University of Edinburgh, UK Madhavan Mukund, Chennai Mathematical Institute, India Hakjoo Oh, Korea University, South Korea Sukyoung Ryu, KAIST, South Korea Tom Schrijvers, KU Leuven, Belgium Ilya Sergey, Yale-NUS College and National University of Singapore, Singapore Marco Servetto, Victoria University Wellington, New Zealand Wouter Swierstra, Utrecht University, Netherlands Alwen Tiu, The Australian National University, Australia Sam Tobin-Hochstadt, Indiana University, US Janis Voigtl?nder, University of Duisburg-Essen, Germany Meng Wang, University of Bristol, UK Nicolas Wu, Imperial College London, UK Yizhou Zhang, Harvard University / University of Waterloo, US Tijs van der Storm, CWI & University of Groningen, Netherlands Shigeru Chiba, The University of Tokyo, Japan SUBMISSION INFORMATION Papers should be submitted electronically via the submission web page using HotCRP (https://aplas2020.hotcrp.com). The acceptable format is PDF. Submitted papers must be unpublished and not submitted for publication elsewhere. Papers must be written in English. The proceedings will be published as a volume in Springer?s LNCS series. Accepted papers must be presented at the conference. REVIEW PROCESS APLAS 2020 will use a lightweight double-blind reviewing process. Following this process means that reviewers will not see the authors? names or affiliations as they initially review a paper. The authors? names will then be revealed to the reviewers only once their reviews have been submitted. To facilitate this process, submitted papers must adhere to the following: Author names and institutions must be omitted and References to the authors? own related work should be in the third person (e.g., not ?We build on our previous work ?? but rather ?We build on the work of ??). The purpose of this process is to help the reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission, makes the job of reviewing the paper more difficult, or interferes with the process of disseminating new ideas. For example, important background references should not be omitted or anonymised, even if they are written by the same authors and share common ideas, techniques, or infrastructure. Authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. AUTHOR RESPONSE PERIOD During the author response period, authors will be able to read reviews and respond to them as appropriate. RESEARCH INTEGRITY The Program Committee reserves the right, up until the time of publication, to reverse a decision of paper acceptance. Reversal is possible if fatal flaws are discovered in the paper, or research integrity is found to have been seriously breached. ABOUT Fukuoka City Fukuoka is a compact city. It only takes 10 minutes by subway from the airport to the city center. It takes 10 minutes by subway from the city center to Nishijin Station. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Wed May 20 09:05:40 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 20 May 2020 09:05:40 +0200 Subject: [Agda] Performance: opening parameterized modules before the fields of a record In-Reply-To: References: Message-ID: <9332c992-09f3-9a3c-c095-bf59d790d092@ifi.lmu.de> > Could it be that this adds ~100 let-ins in the type of each of the fields? No, but it creates a new module which contains specializations of all the definitions in CCat+. These will be positivity-checked. Could you check whether you can get some speedup by restricting to the actually needed imports? Something like open CCat+ ccat using (Ob; foo; bar) renaming (Mor to MorC) Best, Andreas On 2020-05-19 12:59, Guillaume Brunerie wrote: > Hello, (not sure if I should post that here or on the bug tracker) > > I?m trying to figure out why some project that I have been working on > requires as much memory as it does, and I have a specific question about > opening parameterized modules inside records. > > I know that inserting definitions between/before fields in a record > results to them being translated to let-ins in all the subsequent > fields, and I have learned recently (from issue #4331) that applying > parameterized modules simply generate a bunch of new functions for > everything exported by the module. > > Now I noticed the following code in my project, there are many other > similar pieces of code, but this is the simplest instance. > > record CCatwithUU (ccat : CCat) : Set? where > ? no-eta-equality > ? open CCat+ ccat renaming (Mor to MorC) > > ? field > ? ? UUStr ?: (i : ?) (? : Ob n) ? Ob (suc n) > ? ? UUStr= : {i : ?} {? : Ob n} ? ft (UUStr i ?) ? ? > ? ? UUStrNat' : {i : ?} (g : MorC n m) (? : Ob n) (g? : ?? g ? ?) > (? : Ob m) (g? : ?? g ? ?) > ? ? ? ? ? ? ?? star g (UUStr i ?) UUStr= g? ? UUStr i ? > > ? UUStrNat : {i : ?} {g : MorC n m} {? : Ob n} (g? : ?? g ? ?) {? : > Ob m} {g? : ?? g ? ?} > ? ? ? ? ? ? ?? star g (UUStr i ?) UUStr= g? ? UUStr i ? > ? UUStrNat g? {g? = g?} = UUStrNat' _ _ g? _ g? > > > It?s not very important what everything means, but the thing that?I?m > worried about is that I apply and open the parameterized module CCat+ > (which is a rather big module, with ~100 definitions) before the fields > of the record. > > Could it be that this adds ~100 let-ins in the type of each of the fields? > I have quite a few (~30) similar records, more complicated than this > one, and which often open each other, so that could quickly explode. > > As a test, I duplicated the "open CCat+ ccat ?" line 10 times inside the > record, and it took much longer to type check (5 seconds as opposed to > less than half a second), most of it on positivity checking. > > Thanks, > Best, > Guillaume > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From andreas.abel at ifi.lmu.de Wed May 20 09:09:23 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Wed, 20 May 2020 09:09:23 +0200 Subject: [Agda] Value-recursive records? In-Reply-To: References: Message-ID: > My current approach is to make a size-indexed version of D, and build > SomeRec for size n out of SomeRec for size < n. But this is dramatically > increasing the complexity of what I'm doing, and I'm having to use > Brouwer ordinals to get size bounds on what I'm doing. Either this, or you can experiment with Agda's sized types, but I cannot foretell whether they will work for your case. Best, Andreas On 2020-05-18 21:52, Joey Eremondi wrote: > Disclaimer: X-posted on Stack Overflow: > https://stackoverflow.com/questions/61877871/agda-constructing-a-recursive-record-value > > I'm wondering, is it possible to have records whose *values* depend on > each other, without being recursively defined in terms of types? > > Basically, I have a record type that looks like this: > > record SomeRec (a : Set) : Set where > ?? method1 : a -> a -> Foo > ?? method2 : a -> a -> Bar > ? ... > ? method n : a -> a -> Baz > > where n is large enough that I want to actually bundle all of these up > as records, instead of just having a bunch of mutually recursive > functions. (Also, I'm using SomeRec as an instance argument). > > Notably, SomeRec is not recursive: none of its fields types refer to > SomeRec. > > Right now, I have a Description D, where FD : Set -> Set is the functor > described by D. What I'm trying to show is the following: > > ? muRec : ( FRec : (a : Set) -> SomeRec a -> SomeRec (FD a) ) -> > SomeRec (mu D) > > That is, if I can take a (SomeRec a) to a (SomeRec (F a)), then I can > tie the knot recursively and show the instance for the whole thing. > > In principle this can be done: each recursive call to a field of SomeRec > would happen with strictly smaller arguments. If I were to just have 10 > mutually recursive methods, it would work. But if I try to build the > record, I end up passing muRec to FRec *without its arguments decreasing*. > > So, what I'm wondering is: is there a way to show that this is > well-founded? Can induction or coinduction help, even though the record > type is not inductive or coinductive? > > My current approach is to make a size-indexed version of D, and build > SomeRec for size n out of SomeRec for size < n. But this is dramatically > increasing the complexity of what I'm doing, and I'm having to use > Brouwer ordinals to get size bounds on what I'm doing. So I'm wondering > if there's a better way. > > Thanks! > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From Thorsten.Altenkirch at nottingham.ac.uk Wed May 20 11:34:07 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 20 May 2020 09:34:07 +0000 Subject: [Agda] Understanding Glue Message-ID: <7331F869-B828-42BF-B9C5-2BCBB733D89B@nottingham.ac.uk> Hi, I am trying to understand the Glue construction better. I was wondering whether Glue just means that a certain pre-type is fibrant (i.e. admits composition, i.e. transp and hcomp). I was trying in agda MyGlue : (A : Set) {? : I} ? Partial ? (?[ T ? Set ] T ?' A) ? Set MyGlue A {?} Te = ? (PartialP ? ? o ? fst (Te o)) (? t ? A [ ? ? (? p ? fst (snd (Te p)) (t p)) ]) I have switched off universe checking, hence Setw = Set. Basically I have used the domain of glue as the definition of Glue. However, this doesn?t seem enough to derive ua : {A B : Set} ? (p : A ?' B) ? A ? B because we need the extra definitional equality MyGlue A i1 (T , e) = T Is there a way to avoid this? This is not a provable equality either, I think. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.nuyts at kuleuven.be Wed May 20 13:06:04 2020 From: andreas.nuyts at kuleuven.be (Andreas Nuyts) Date: Wed, 20 May 2020 13:06:04 +0200 Subject: [Agda] Understanding Glue In-Reply-To: <7331F869-B828-42BF-B9C5-2BCBB733D89B@nottingham.ac.uk> References: <7331F869-B828-42BF-B9C5-2BCBB733D89B@nottingham.ac.uk> Message-ID: <2f425807-aeec-3687-2804-c373e53d706a@kuleuven.be> Hi Thorsten, Your implementation is also what Orton and Pitts do in their internal model of cubical type theory: https://doi.org/10.23638/LMCS-14(4:23)2018 They rely on an additional axiom, the strictness axiom, to strictify MyGlue so that it actually extends T. Note that this implementation only relies on one direction of the equivalence. This is the only direction needed to form Glue (up to iso or relying on the strictness axiom) as a pre-type. The other direction is needed to make it Kan fibrant. I am now puzzled by the fact that this means that you can define a non-Kan type in cubical Agda. I guess "Partial" is a non-fibrant type former? Does Agda somehow prevent the user to exploit Kan-fibrancy of types constructed using "Partial"? Best regards, Andreas On 20/05/2020 11:34, Thorsten Altenkirch wrote: > > Hi, > > I am trying to understand the Glue construction better. I was > wondering whether Glue just means that a certain pre-type is fibrant > (i.e. admits composition, i.e. transp and hcomp). I was trying in agda > > MyGlue : (A : Set) {? : I} > > ???? ? Partial ? (?[ T ?Set ] T ?' A) ? Set > > MyGlue A {?} Te = ? (PartialP ? ? o ? fst (Te o)) (? t ? A [ ? ?(? p ? > fst (snd (Te p)) (t p)) ]) > > I have switched off universe checking, hence Setw = Set. Basically I > have used the domain of glue as the definition of Glue. However, this > doesn?t seem enough to derive > > ua : {A B : Set} ? (p : A ?' B) ? A ? B > > because we need the extra definitional equality > > MyGlue A i1 (T , e) = T > > Is there a way to avoid this? This is not a provable equality either, > I think. > > Cheers, > > Thorsten > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed May 20 13:13:30 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 20 May 2020 11:13:30 +0000 Subject: [Agda] Understanding Glue In-Reply-To: <2f425807-aeec-3687-2804-c373e53d706a@kuleuven.be> References: <7331F869-B828-42BF-B9C5-2BCBB733D89B@nottingham.ac.uk> <2f425807-aeec-3687-2804-c373e53d706a@kuleuven.be> Message-ID: Thank you for your reply, Andreas. I am now puzzled by the fact that this means that you can define a non-Kan type in cubical Agda. I guess "Partial" is a non-fibrant type former? Does Agda somehow prevent the user to exploit Kan-fibrancy of types constructed using "Partial"? Yes, in the moment agda puts it into the universe Set? which is a stop gap for having a non-fibrant universe. As I mentioned I switched off universe checking which means I can pretend that this is fibrant. Jesper implemented a better more principled solution where you can have both a hierarchy of fibrant and non-fibrant universes but the cubical library currently doesn?t use this. From: Andreas Nuyts Date: Wednesday, 20 May 2020 at 12:06 To: Thorsten Altenkirch , Thierry Coquand , Anders Mortberg , Andrea Vezzosi Cc: Agda mailing list Subject: Re: [Agda] Understanding Glue Hi Thorsten, Your implementation is also what Orton and Pitts do in their internal model of cubical type theory: https://doi.org/10.23638/LMCS-14(4:23)2018 They rely on an additional axiom, the strictness axiom, to strictify MyGlue so that it actually extends T. Note that this implementation only relies on one direction of the equivalence. This is the only direction needed to form Glue (up to iso or relying on the strictness axiom) as a pre-type. The other direction is needed to make it Kan fibrant. I am now puzzled by the fact that this means that you can define a non-Kan type in cubical Agda. I guess "Partial" is a non-fibrant type former? Does Agda somehow prevent the user to exploit Kan-fibrancy of types constructed using "Partial"? Best regards, Andreas On 20/05/2020 11:34, Thorsten Altenkirch wrote: Hi, I am trying to understand the Glue construction better. I was wondering whether Glue just means that a certain pre-type is fibrant (i.e. admits composition, i.e. transp and hcomp). I was trying in agda MyGlue : (A : Set) {? : I} ? Partial ? (?[ T ? Set ] T ?' A) ? Set MyGlue A {?} Te = ? (PartialP ? ? o ? fst (Te o)) (? t ? A [ ? ? (? p ? fst (snd (Te p)) (t p)) ]) I have switched off universe checking, hence Setw = Set. Basically I have used the domain of glue as the definition of Glue. However, this doesn?t seem enough to derive ua : {A B : Set} ? (p : A ?' B) ? A ? B because we need the extra definitional equality MyGlue A i1 (T , e) = T Is there a way to avoid this? This is not a provable equality either, I think. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Wed May 20 14:27:51 2020 From: carette at mcmaster.ca (Jacques Carette) Date: Wed, 20 May 2020 08:27:51 -0400 Subject: [Agda] Performance: opening parameterized modules before the fields of a record In-Reply-To: <9332c992-09f3-9a3c-c095-bf59d790d092@ifi.lmu.de> References: <9332c992-09f3-9a3c-c095-bf59d790d092@ifi.lmu.de> Message-ID: On 2020-05-20 3:05 a.m., Andreas Abel wrote: > > Could it be that this adds ~100 let-ins in the type of each of the > fields? > > No, but it creates a new module which contains specializations of all > the definitions in CCat+.? These will be positivity-checked. > > Could you check whether you can get some speedup by restricting to the > actually needed imports?? Something like > > ? open CCat+ ccat using (Ob; foo; bar) renaming (Mor to MorC) I did do the above in a few key places in agda-categories, and it definitely helped there. Jacques From Thierry.Coquand at cse.gu.se Wed May 20 17:02:54 2020 From: Thierry.Coquand at cse.gu.se (Thierry Coquand) Date: Wed, 20 May 2020 15:02:54 +0000 Subject: [Agda] Understanding Glue In-Reply-To: <7331F869-B828-42BF-B9C5-2BCBB733D89B@nottingham.ac.uk> References: <7331F869-B828-42BF-B9C5-2BCBB733D89B@nottingham.ac.uk> Message-ID: <2FC3B7A9-8CC1-4E4A-9264-82A6C6EDFC39@chalmers.se> Indeed, it would be clearer to present the Glue, unglue construction at the pre-type level. If we have A and a partial map w: T -> A defined on phi then we can find an extension G = Glue (A, phi, w) and unglue : G -> A such that (G,unglue) = (T,w) on the extent phi. This can be done for any function w. The main Lemma is then that if A, T are fibrant and w is an equivalence, then G is fibrant and unglue is an equivalence. (This expresses that the type Sigma (X:U) Equiv X A is contractible, which is one way to state univalence.) Best, Thierry On 20 May 2020, at 11:34, Thorsten Altenkirch > wrote: Hi, I am trying to understand the Glue construction better. I was wondering whether Glue just means that a certain pre-type is fibrant (i.e. admits composition, i.e. transp and hcomp). I was trying in agda MyGlue : (A : Set) {? : I} ? Partial ? (?[ T ? Set ] T ?' A) ? Set MyGlue A {?} Te = ? (PartialP ? ? o ? fst (Te o)) (? t ? A [ ? ? (? p ? fst (snd (Te p)) (t p)) ]) I have switched off universe checking, hence Setw = Set. Basically I have used the domain of glue as the definition of Glue. However, this doesn?t seem enough to derive ua : {A B : Set} ? (p : A ?' B) ? A ? B because we need the extra definitional equality MyGlue A i1 (T , e) = T Is there a way to avoid this? This is not a provable equality either, I think. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scm at iis.sinica.edu.tw Wed May 20 19:43:33 2020 From: scm at iis.sinica.edu.tw (Shin-Cheng Mu) Date: Thu, 21 May 2020 01:43:33 +0800 Subject: [Agda] Problem proving inequality with HeterogeneousEquality Message-ID: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> Hi, The following is a typical definition of a membership relation --- x ? xs indicates that x is a member of the list xs: data _?_ {A : Set} : A ? List A ? Set where this : ? {x xs} ? x ? (x ? xs) next : ? {x y xs} ? y ? xs ? y ? (x ? xs) I encountered a question: how do I prove that "this", does not equal "next"? Since they might not have the same type, I need HeterogeneousEquality. In the following attempt, "this", with implicit arguments, has type x ? (x ? xs), while "next" has type y ? (x ? xs): this?next : ? {A} {x y : A} {xs} ? (y?xs : y ? xs) ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs this?next y?xs () This attempt fails, however. Agda reports the error: Failed to solve the following constraints: Is empty: this ? next y?xs How do I convince Agda that "this" is not "next"? The Agda version is 2.6.1. I have attached the simple test file below. Thank you! sincerely, Shin -------------- next part -------------- A non-text attachment was scrubbed... Name: HEqTest.agda Type: application/octet-stream Size: 405 bytes Desc: not available URL: -------------- next part -------------- From Jesper at sikanda.be Wed May 20 20:08:31 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 20 May 2020 20:08:31 +0200 Subject: [Agda] Problem proving inequality with HeterogeneousEquality In-Reply-To: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> References: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> Message-ID: Hi Shin, As taught by our master Conor, you need to generalize the statement and first prove the `noConfusion` property of your datatype. Disjointness and injectivity of constructors follows directly from that: ``` open import Data.Empty open import Data.List open import Data.Product open import Relation.Binary.PropositionalEquality open import Relation.Binary.HeterogeneousEquality using (_?_) data _?_ {A : Set} : A ? List A ? Set where this : ? {x xs} ? x ? (x ? xs) next : ? {x y xs} ? y ? xs ? y ? (x ? xs) NoConfusion : {A : Set} ? {x : A} {xs : List A} ? (x ? xs) ? {y : A} {ys : List A} ? (y ? ys) ? Set NoConfusion (this {x} {xs}) (this {y} {ys}) = x ? y ? xs ? ys NoConfusion this (next y?ys) = ? NoConfusion (next x?xs) this = ? NoConfusion (next {x} {x'} {xs} x'?xs) (next {y} {y'} {ys} y'?ys) = x ? y ? ? (x' ? y') (? x'?y' ? ? (xs ? ys) (? xs?ys ? subst? _?_ x'?y' xs?ys x'?xs ? y'?ys)) noConfusion : {A : Set} ? {x : A} {xs : List A} (x?xs : x ? xs) ? {y : A} {ys : List A} (y?ys : y ? ys) ? NoConfusion x?xs y?ys noConfusion = {!!} this?next : ? {A} {x y : A} {xs} ? (y?xs : y ? xs) ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs this?next {x = x} {y} {xs} y?xs this?next = ?-elim (noConfusion (this {x = x} {xs}) (next {x = y} y?xs)) ``` You can read more about this in "A few constructions on constructors" ( http://www.cs.ru.nl/~james/RESEARCH/types2004.pdf). The version above is my own variant using homogeneous equality. -- Jesper On Wed, May 20, 2020 at 7:44 PM Shin-Cheng Mu wrote: > Hi, > > The following is a typical definition of a membership > relation --- x ? xs indicates that x is a member of the > list xs: > > data _?_ {A : Set} : A ? List A ? Set where > this : ? {x xs} ? x ? (x ? xs) > next : ? {x y xs} ? y ? xs ? y ? (x ? xs) > > I encountered a question: how do I prove that "this", > does not equal "next"? > > Since they might not have the same type, I need > HeterogeneousEquality. In the following attempt, > "this", with implicit arguments, has type x ? (x ? xs), > while "next" has type y ? (x ? xs): > > this?next : ? {A} {x y : A} {xs} > ? (y?xs : y ? xs) > ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs > this?next y?xs () > > This attempt fails, however. Agda reports the error: > > Failed to solve the following constraints: > Is empty: this ? next y?xs > > How do I convince Agda that "this" is not "next"? > > The Agda version is 2.6.1. I have attached the > simple test file below. > > Thank you! > > sincerely, > Shin > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at tomjack.co Wed May 20 20:45:37 2020 From: tom at tomjack.co (Tom Jack) Date: Wed, 20 May 2020 13:45:37 -0500 Subject: [Agda] Problem proving inequality with HeterogeneousEquality In-Reply-To: References: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> Message-ID: The proof of this?next does not use the argument this?next! Indeed, we can derive ? from the postulated noConfusion. I think there was supposed to be an extra argument of type `x?xs ? y?ys`? I am unable to prove that version of noConfusion, because I cannot manage to use the heterogeneous equality assumption. Intuitively, it seems impossible to me, because I also expect to fail to inhabit the following type: {A : Set} {x : A} {xs : List A} {y : A} {ys : List A} ? (x ? xs) ? (y ? ys) ? (x ? y) ? (xs ? ys) (Unless we turn on `--injective-type-constructors`!) On Wed, May 20, 2020 at 1:08 PM Jesper Cockx wrote: > Hi Shin, > > As taught by our master Conor, you need to generalize the statement and > first prove the `noConfusion` property of your datatype. Disjointness and > injectivity of constructors follows directly from that: > > ``` > open import Data.Empty > open import Data.List > open import Data.Product > open import Relation.Binary.PropositionalEquality > open import Relation.Binary.HeterogeneousEquality using (_?_) > > data _?_ {A : Set} : A ? List A ? Set where > this : ? {x xs} ? x ? (x ? xs) > next : ? {x y xs} ? y ? xs ? y ? (x ? xs) > > NoConfusion : {A : Set} > ? {x : A} {xs : List A} ? (x ? xs) > ? {y : A} {ys : List A} ? (y ? ys) > ? Set > NoConfusion (this {x} {xs}) (this {y} {ys}) = x ? y ? xs ? ys > NoConfusion this (next y?ys) = ? > NoConfusion (next x?xs) this = ? > NoConfusion (next {x} {x'} {xs} x'?xs) (next {y} {y'} {ys} y'?ys) = > x ? y ? ? (x' ? y') (? x'?y' ? ? (xs ? ys) (? xs?ys ? > subst? _?_ x'?y' xs?ys x'?xs ? y'?ys)) > > noConfusion : {A : Set} > ? {x : A} {xs : List A} (x?xs : x ? xs) > ? {y : A} {ys : List A} (y?ys : y ? ys) > ? NoConfusion x?xs y?ys > noConfusion = {!!} > > this?next : ? {A} {x y : A} {xs} > ? (y?xs : y ? xs) > ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs > this?next {x = x} {y} {xs} y?xs this?next = > ?-elim (noConfusion (this {x = x} {xs}) (next {x = y} y?xs)) > ``` > > You can read more about this in "A few constructions on constructors" ( > http://www.cs.ru.nl/~james/RESEARCH/types2004.pdf). The version above is > my own variant using homogeneous equality. > > -- Jesper > > On Wed, May 20, 2020 at 7:44 PM Shin-Cheng Mu > wrote: > >> Hi, >> >> The following is a typical definition of a membership >> relation --- x ? xs indicates that x is a member of the >> list xs: >> >> data _?_ {A : Set} : A ? List A ? Set where >> this : ? {x xs} ? x ? (x ? xs) >> next : ? {x y xs} ? y ? xs ? y ? (x ? xs) >> >> I encountered a question: how do I prove that "this", >> does not equal "next"? >> >> Since they might not have the same type, I need >> HeterogeneousEquality. In the following attempt, >> "this", with implicit arguments, has type x ? (x ? xs), >> while "next" has type y ? (x ? xs): >> >> this?next : ? {A} {x y : A} {xs} >> ? (y?xs : y ? xs) >> ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs >> this?next y?xs () >> >> This attempt fails, however. Agda reports the error: >> >> Failed to solve the following constraints: >> Is empty: this ? next y?xs >> >> How do I convince Agda that "this" is not "next"? >> >> The Agda version is 2.6.1. I have attached the >> simple test file below. >> >> Thank you! >> >> sincerely, >> Shin >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Wed May 20 20:47:00 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 20 May 2020 20:47:00 +0200 Subject: [Agda] Problem proving inequality with HeterogeneousEquality In-Reply-To: References: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> Message-ID: Hi Shin, I was a bit too fast in my previous mail, sorry. The correct noConfusion property is as follows: ``` open import Data.Empty open import Data.List open import Data.Product open import Relation.Binary.PropositionalEquality open import Relation.Binary.HeterogeneousEquality using (_?_; _?_; ?-to-?) data _?_ {A : Set} : A ? List A ? Set where this : ? {x xs} ? x ? (x ? xs) next : ? {x y xs} ? y ? xs ? y ? (x ? xs) NoConfusion : {A : Set} ? {x : A} {xs : List A} ? (x ? xs) ? {y : A} {ys : List A} ? (y ? ys) ? Set NoConfusion (this {x} {xs}) (this {y} {ys}) = x ? y ? xs ? ys NoConfusion this (next y?ys) = ? NoConfusion (next x?xs) this = ? NoConfusion (next {x} {x'} {xs} x'?xs) (next {y} {y'} {ys} y'?ys) = x ? y ? ? (x' ? y') (? x'?y' ? ? (xs ? ys) (? xs?ys ? subst? _?_ x'?y' xs?ys x'?xs ? y'?ys)) noConfusion : {A : Set} ? {x : A} {xs : List A} (x?xs : x ? xs) ? {y : A} {ys : List A} (y?ys : y ? ys) ? {x?y : x ? y} {xs?ys : xs ? ys} (x?xs?y?ys : subst? _?_ x?y xs?ys x?xs ? y?ys) ? NoConfusion x?xs y?ys noConfusion this this {refl} {refl} refl = refl , refl noConfusion this (next y?ys) {refl} {refl} () noConfusion (next x?xs) this {refl} {refl} () noConfusion (next x?xs) (next .x?xs) {refl} {refl} refl = refl , refl , refl , refl ``` But I don't manage to prove your goal from this directly, unfortunately. -- Jesper On Wed, May 20, 2020 at 8:08 PM Jesper Cockx wrote: > Hi Shin, > > As taught by our master Conor, you need to generalize the statement and > first prove the `noConfusion` property of your datatype. Disjointness and > injectivity of constructors follows directly from that: > > ``` > open import Data.Empty > open import Data.List > open import Data.Product > open import Relation.Binary.PropositionalEquality > open import Relation.Binary.HeterogeneousEquality using (_?_) > > data _?_ {A : Set} : A ? List A ? Set where > this : ? {x xs} ? x ? (x ? xs) > next : ? {x y xs} ? y ? xs ? y ? (x ? xs) > > NoConfusion : {A : Set} > ? {x : A} {xs : List A} ? (x ? xs) > ? {y : A} {ys : List A} ? (y ? ys) > ? Set > NoConfusion (this {x} {xs}) (this {y} {ys}) = x ? y ? xs ? ys > NoConfusion this (next y?ys) = ? > NoConfusion (next x?xs) this = ? > NoConfusion (next {x} {x'} {xs} x'?xs) (next {y} {y'} {ys} y'?ys) = > x ? y ? ? (x' ? y') (? x'?y' ? ? (xs ? ys) (? xs?ys ? > subst? _?_ x'?y' xs?ys x'?xs ? y'?ys)) > > noConfusion : {A : Set} > ? {x : A} {xs : List A} (x?xs : x ? xs) > ? {y : A} {ys : List A} (y?ys : y ? ys) > ? NoConfusion x?xs y?ys > noConfusion = {!!} > > this?next : ? {A} {x y : A} {xs} > ? (y?xs : y ? xs) > ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs > this?next {x = x} {y} {xs} y?xs this?next = > ?-elim (noConfusion (this {x = x} {xs}) (next {x = y} y?xs)) > ``` > > You can read more about this in "A few constructions on constructors" ( > http://www.cs.ru.nl/~james/RESEARCH/types2004.pdf). The version above is > my own variant using homogeneous equality. > > -- Jesper > > On Wed, May 20, 2020 at 7:44 PM Shin-Cheng Mu > wrote: > >> Hi, >> >> The following is a typical definition of a membership >> relation --- x ? xs indicates that x is a member of the >> list xs: >> >> data _?_ {A : Set} : A ? List A ? Set where >> this : ? {x xs} ? x ? (x ? xs) >> next : ? {x y xs} ? y ? xs ? y ? (x ? xs) >> >> I encountered a question: how do I prove that "this", >> does not equal "next"? >> >> Since they might not have the same type, I need >> HeterogeneousEquality. In the following attempt, >> "this", with implicit arguments, has type x ? (x ? xs), >> while "next" has type y ? (x ? xs): >> >> this?next : ? {A} {x y : A} {xs} >> ? (y?xs : y ? xs) >> ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs >> this?next y?xs () >> >> This attempt fails, however. Agda reports the error: >> >> Failed to solve the following constraints: >> Is empty: this ? next y?xs >> >> How do I convince Agda that "this" is not "next"? >> >> The Agda version is 2.6.1. I have attached the >> simple test file below. >> >> Thank you! >> >> sincerely, >> Shin >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Wed May 20 21:13:00 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 20 May 2020 21:13:00 +0200 Subject: [Agda] Problem proving inequality with HeterogeneousEquality In-Reply-To: References: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> Message-ID: @Tom Indeed, it seems this cannot be proven without assuming injectivity of type constructors, which is often the case when working with heterogeneous equality. However, you can prove a very similar statement using homogeneous equality and subst: ``` this?next : ? {A} {x y : A} {xs} ? (y?xs : y ? xs) ? {x?y : x ? y} ? subst? _?_ x?y refl (this {x = x} {xs}) ? next {x = x} {y} {xs} y?xs ? ? this?next {x = x} {y} {xs} y?xs {refl} this?next = noConfusion this (next y?xs) {refl} {refl} this?next ``` On Wed, May 20, 2020 at 8:47 PM Jesper Cockx wrote: > Hi Shin, > > I was a bit too fast in my previous mail, sorry. The correct noConfusion > property is as follows: > > ``` > open import Data.Empty > open import Data.List > open import Data.Product > open import Relation.Binary.PropositionalEquality > open import Relation.Binary.HeterogeneousEquality using (_?_; _?_; ?-to-?) > > data _?_ {A : Set} : A ? List A ? Set where > this : ? {x xs} ? x ? (x ? xs) > next : ? {x y xs} ? y ? xs ? y ? (x ? xs) > > NoConfusion : {A : Set} > ? {x : A} {xs : List A} ? (x ? xs) > ? {y : A} {ys : List A} ? (y ? ys) > ? Set > NoConfusion (this {x} {xs}) (this {y} {ys}) = x ? y ? xs ? ys > NoConfusion this (next y?ys) = ? > NoConfusion (next x?xs) this = ? > NoConfusion (next {x} {x'} {xs} x'?xs) (next {y} {y'} {ys} y'?ys) = > x ? y ? ? (x' ? y') (? x'?y' ? ? (xs ? ys) (? xs?ys ? > subst? _?_ x'?y' xs?ys x'?xs ? y'?ys)) > > noConfusion : {A : Set} > ? {x : A} {xs : List A} (x?xs : x ? xs) > ? {y : A} {ys : List A} (y?ys : y ? ys) > ? {x?y : x ? y} {xs?ys : xs ? ys} (x?xs?y?ys : subst? _?_ x?y > xs?ys x?xs ? y?ys) > ? NoConfusion x?xs y?ys > noConfusion this this {refl} {refl} refl = refl , refl > noConfusion this (next y?ys) {refl} {refl} () > noConfusion (next x?xs) this {refl} {refl} () > noConfusion (next x?xs) (next .x?xs) {refl} {refl} refl = refl , refl , > refl , refl > ``` > > But I don't manage to prove your goal from this directly, unfortunately. > > -- Jesper > > On Wed, May 20, 2020 at 8:08 PM Jesper Cockx wrote: > >> Hi Shin, >> >> As taught by our master Conor, you need to generalize the statement and >> first prove the `noConfusion` property of your datatype. Disjointness and >> injectivity of constructors follows directly from that: >> >> ``` >> open import Data.Empty >> open import Data.List >> open import Data.Product >> open import Relation.Binary.PropositionalEquality >> open import Relation.Binary.HeterogeneousEquality using (_?_) >> >> data _?_ {A : Set} : A ? List A ? Set where >> this : ? {x xs} ? x ? (x ? xs) >> next : ? {x y xs} ? y ? xs ? y ? (x ? xs) >> >> NoConfusion : {A : Set} >> ? {x : A} {xs : List A} ? (x ? xs) >> ? {y : A} {ys : List A} ? (y ? ys) >> ? Set >> NoConfusion (this {x} {xs}) (this {y} {ys}) = x ? y ? xs ? ys >> NoConfusion this (next y?ys) = ? >> NoConfusion (next x?xs) this = ? >> NoConfusion (next {x} {x'} {xs} x'?xs) (next {y} {y'} {ys} y'?ys) = >> x ? y ? ? (x' ? y') (? x'?y' ? ? (xs ? ys) (? xs?ys ? >> subst? _?_ x'?y' xs?ys x'?xs ? y'?ys)) >> >> noConfusion : {A : Set} >> ? {x : A} {xs : List A} (x?xs : x ? xs) >> ? {y : A} {ys : List A} (y?ys : y ? ys) >> ? NoConfusion x?xs y?ys >> noConfusion = {!!} >> >> this?next : ? {A} {x y : A} {xs} >> ? (y?xs : y ? xs) >> ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs >> this?next {x = x} {y} {xs} y?xs this?next = >> ?-elim (noConfusion (this {x = x} {xs}) (next {x = y} y?xs)) >> ``` >> >> You can read more about this in "A few constructions on constructors" ( >> http://www.cs.ru.nl/~james/RESEARCH/types2004.pdf). The version above is >> my own variant using homogeneous equality. >> >> -- Jesper >> >> On Wed, May 20, 2020 at 7:44 PM Shin-Cheng Mu >> wrote: >> >>> Hi, >>> >>> The following is a typical definition of a membership >>> relation --- x ? xs indicates that x is a member of the >>> list xs: >>> >>> data _?_ {A : Set} : A ? List A ? Set where >>> this : ? {x xs} ? x ? (x ? xs) >>> next : ? {x y xs} ? y ? xs ? y ? (x ? xs) >>> >>> I encountered a question: how do I prove that "this", >>> does not equal "next"? >>> >>> Since they might not have the same type, I need >>> HeterogeneousEquality. In the following attempt, >>> "this", with implicit arguments, has type x ? (x ? xs), >>> while "next" has type y ? (x ? xs): >>> >>> this?next : ? {A} {x y : A} {xs} >>> ? (y?xs : y ? xs) >>> ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs >>> this?next y?xs () >>> >>> This attempt fails, however. Agda reports the error: >>> >>> Failed to solve the following constraints: >>> Is empty: this ? next y?xs >>> >>> How do I convince Agda that "this" is not "next"? >>> >>> The Agda version is 2.6.1. I have attached the >>> simple test file below. >>> >>> Thank you! >>> >>> sincerely, >>> Shin >>> >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at doisinkidney.com Wed May 20 21:53:13 2020 From: mail at doisinkidney.com (=?utf-8?Q?Donnacha_Ois=C3=ADn_Kidney?=) Date: Wed, 20 May 2020 20:53:13 +0100 Subject: [Agda] Problem proving inequality with HeterogeneousEquality In-Reply-To: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> References: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> Message-ID: Unless I?ve misunderstood I think you can do it by converting to an unindexed type like Nat first: ?-to-? : x ? xs ? ? ?-to-? this = zero ?-to-? (next x?xs) = suc (?-to-? x?xs) this?next : (x?xs : x ? xs) ? this ? next x?xs this?next _ t?n with cong ?-to-? t?n this?next _ t?n | () I?ve attached a file with the code. Ois?n. -------------- next part -------------- A non-text attachment was scrubbed... Name: ThisNext.agda Type: application/octet-stream Size: 567 bytes Desc: not available URL: -------------- next part -------------- > On 20 May 2020, at 18:43, Shin-Cheng Mu wrote: > > Hi, > > The following is a typical definition of a membership > relation --- x ? xs indicates that x is a member of the > list xs: > > data _?_ {A : Set} : A ? List A ? Set where > this : ? {x xs} ? x ? (x ? xs) > next : ? {x y xs} ? y ? xs ? y ? (x ? xs) > > I encountered a question: how do I prove that "this", > does not equal "next"? > > Since they might not have the same type, I need > HeterogeneousEquality. In the following attempt, > "this", with implicit arguments, has type x ? (x ? xs), > while "next" has type y ? (x ? xs): > > this?next : ? {A} {x y : A} {xs} > ? (y?xs : y ? xs) > ? this {x = x} {xs} ? next {x = x} {y} {xs} y?xs > this?next y?xs () > > This attempt fails, however. Agda reports the error: > > Failed to solve the following constraints: > Is empty: this ? next y?xs > > How do I convince Agda that "this" is not "next"? > > The Agda version is 2.6.1. I have attached the > simple test file below. > > Thank you! > > sincerely, > Shin > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From effectfully at gmail.com Wed May 20 23:28:22 2020 From: effectfully at gmail.com (Roman) Date: Thu, 21 May 2020 00:28:22 +0300 Subject: [Agda] Problem proving inequality with HeterogeneousEquality In-Reply-To: References: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> Message-ID: The answer to a problem with heterogeneous equality is nearly always "don't use heterogeneous equality". I use what I call "heteroindexed equality", see https://lists.chalmers.se/pipermail/agda/2016/009069.html It allows to directly express the thing that you want: open import Data.List.Base open import Data.Product open import Relation.Binary.PropositionalEquality open import Data.Empty data _?_ {A : Set} : A ? List A ? Set where this : ? {x xs} ? x ? (x ? xs) next : ? {x y xs} ? y ? xs ? y ? (x ? xs) [_]_?_ : ? {X : Set} {x y} ? (Z : X ? Set) ? Z x ? Z y ? Set [_]_?_ {x = x} {y} Z a b = (x , a) ? (y , b) this?next : ? {A} {x y : A} {xs} ? (y?xs : y ? xs) ? [ _? (x ? xs) ] this {x = x} {xs} ? next {x = x} {y} {xs} y?xs ? ? this?next y?xs () From Thorsten.Altenkirch at nottingham.ac.uk Thu May 21 17:25:41 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 21 May 2020 15:25:41 +0000 Subject: [Agda] convertibility of implicit and explicit Pi-types Message-ID: Why are implicit and explicit Pi-types not convertible? eq : ({_ : Set} ? Set) ? (Set ? Set) eq = {!refl!} {_ : Set} ? Set != Set ? Set because one is an implicit function type and the other is an explicit function type when checking that the expression refl has type ({_ : Set} ? Set) ? (Set ? Set) This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Thu May 21 17:40:22 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 21 May 2020 17:40:22 +0200 Subject: [Agda] convertibility of implicit and explicit Pi-types In-Reply-To: References: Message-ID: Because they are different types? If they were equal, whether a term is well-typed or not would depend on which order Agda solves constraints, something that is generally very undesirable. For example, consider the following program: ``` open import Agda.Builtin.Nat open import Agda.Builtin.Equality X : Set explicit : X ? (Nat ? Nat) implicit : X ? ({Nat} ? Nat) X = _ explicit = refl implicit = refl test : (f : X) ? Nat test f = f 42 -- or f {42}? ``` Depending on the order in which Agda checks `explicit` and `implicit`, the type of `f` will be an explicit or implicit function type, so the user has to write either `f 42` or `f {42}`. In this case it is still relatively easy to tell the order in which Agda will check things, but in general Agda's typechecker relies a lot on postponing and such so the order is not predictable. -- Jesper On Thu, May 21, 2020 at 5:26 PM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > Why are implicit and explicit Pi-types not convertible? > > > > eq : ({_ : Set} ? Set) ? (Set ? Set) > > eq = {!refl!} > > > > {_ : Set} ? Set != Set ? Set because one is an implicit function > > type and the other is an explicit function type > > when checking that the expression refl has type > > ({_ : Set} ? Set) ? (Set ? Set) > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Thu May 21 19:47:12 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 21 May 2020 17:47:12 +0000 Subject: [Agda] how do I quote agda code on the agda wiki? Message-ID: I was just adding an item to https://wiki.portal.chalmers.se/agda/Main/AIMXXXII and tried to add some agda code (I know an unusual thing to do a=on the agda wiki) but @ record Vec (A : Set) : ? ? Set where coinductive destructor hd : {n : ?} ? Vec A (suc n) ? A tl : {n : ?} ? Vec A (suc n) ? Vec A n @] Gets automagically turned into [@ record Vec (A : Set) : ℕ → Set where coinductive destructor hd : {n : ℕ} → Vec A (suc n) → A tl : {n : ℕ} → Vec A (suc n) → Vec A n @] Which reduces its readability. Also ?code? isn?t mentioned in the ?Basic editing? overview. Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From iblech at speicherleck.de Thu May 21 20:26:06 2020 From: iblech at speicherleck.de (Ingo Blechschmidt) Date: Thu, 21 May 2020 20:26:06 +0200 Subject: [Agda] how do I quote agda code on the agda wiki? In-Reply-To: References: Message-ID: <20200521182606.GA18647@quasicoherent.io> Dear Thorsten, On Thu 21 May 2020 05:47:12 PM GMT, Thorsten Altenkirch wrote: > I was just adding an item to > https://wiki.portal.chalmers.se/agda/Main/AIMXXXII > and tried to add some agda code (I know an unusual thing to do a=on the agda wiki) [...] I don't know enough about PmWiki, and therefore will refrain from updating the "Basic editing" page, but I just fixed the formatting on the page you linked. To render code as code, without funny HTML entities ("ℕ" and their like), you may not use [@...@] but do have to indent the code. Cheers, Ingo From michel.levy.imag at free.fr Thu May 21 20:49:50 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Thu, 21 May 2020 20:49:50 +0200 Subject: [Agda] problem with install Agda Message-ID: <4bebce64-0104-ac5e-3102-c01e8dc5e92e@free.fr> I try to install Agda with cabal on a new laptop. I get the following error on the command cabal install Agda [ 37 of 369] Compiling Agda.Utils.Memo? ( src/full/Agda/Utils/Memo.hs, dist/buil d/Agda/Utils/Memo.o ) src/full/Agda/Utils/Memo.hs:8:1: error: ??? Could not find module ?Data.HashMap.Strict? ??? There are files missing in the ?unordered-containers-0.2.10.0? package, ??? try running 'ghc-pkg check'. ??? Use -v to see a list of the files searched for. michel at aleph2020:~/.cabal/logs/ghc-8.6.5$ ghc-pkg check | more There are problems in package aeson-1.4.7.1: ? Warning: library-dirs: /home/michel/.cabal/lib/x86_64-linux-ghc-8.6.5/aeson-1.4.7.1-Jd4Ak08pVHo4tgomPBDTQp doesn't exist or isn't a directory follows many pages of problems ... Can you help me to solve this installation problem. From james.wood.100 at strath.ac.uk Thu May 21 21:04:33 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Thu, 21 May 2020 20:04:33 +0100 Subject: [Agda] how do I quote agda code on the agda wiki? In-Reply-To: <20200521182606.GA18647@quasicoherent.io> References: <20200521182606.GA18647@quasicoherent.io> Message-ID: I came across the same problem just the other day, but in inline code, so this workaround isn't available (as far as I can tell). If it's possible to turn on UTF8 support for the wiki, this would surely be helpful. James On 21/05/2020 19:26, Ingo Blechschmidt wrote: > Dear Thorsten, > > On Thu 21 May 2020 05:47:12 PM GMT, Thorsten Altenkirch wrote: >> I was just adding an item to >> https://wiki.portal.chalmers.se/agda/Main/AIMXXXII >> and tried to add some agda code (I know an unusual thing to do a=on the agda wiki) > [...] > > I don't know enough about PmWiki, and therefore will refrain from > updating the "Basic editing" page, but I just fixed the formatting on > the page you linked. > > To render code as code, without funny HTML entities ("ℕ" and their > like), you may not use [@...@] but do have to indent the code. > > Cheers, > Ingo > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From asr at eafit.edu.co Fri May 22 03:52:10 2020 From: asr at eafit.edu.co (=?UTF-8?B?QW5kcsOpcyBTaWNhcmQtUmFtw61yZXo=?=) Date: Thu, 21 May 2020 20:52:10 -0500 Subject: [Agda] problem with install Agda In-Reply-To: <4bebce64-0104-ac5e-3102-c01e8dc5e92e@free.fr> References: <4bebce64-0104-ac5e-3102-c01e8dc5e92e@free.fr> Message-ID: On Thu, 21 May 2020 at 13:50, Michel Levy wrote: > > src/full/Agda/Utils/Memo.hs:8:1: error: > Could not find module ?Data.HashMap.Strict? > There are files missing in the ?unordered-containers-0.2.10.0? package, > try running 'ghc-pkg check'. > Use -v to see a list of the files searched for. > I guess cabal install unordered-containers-0.2.10.0 fixes the problem. -- Andr?s From guillaume.brunerie at gmail.com Fri May 22 11:02:57 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Fri, 22 May 2020 11:02:57 +0200 Subject: [Agda] Performance: opening parameterized modules before the fields of a record In-Reply-To: <9332c992-09f3-9a3c-c095-bf59d790d092@ifi.lmu.de> References: <9332c992-09f3-9a3c-c095-bf59d790d092@ifi.lmu.de> Message-ID: Thanks, it does help a bit but not as much as I would have hoped. I?ll keep on looking for where the problem is :) Best, Guillaume Den ons 20 maj 2020 kl 09:05 skrev Andreas Abel : > > Could it be that this adds ~100 let-ins in the type of each of the > fields? > > No, but it creates a new module which contains specializations of all > the definitions in CCat+. These will be positivity-checked. > > Could you check whether you can get some speedup by restricting to the > actually needed imports? Something like > > open CCat+ ccat using (Ob; foo; bar) renaming (Mor to MorC) > > Best, > Andreas > > On 2020-05-19 12:59, Guillaume Brunerie wrote: > > Hello, (not sure if I should post that here or on the bug tracker) > > > > I?m trying to figure out why some project that I have been working on > > requires as much memory as it does, and I have a specific question about > > opening parameterized modules inside records. > > > > I know that inserting definitions between/before fields in a record > > results to them being translated to let-ins in all the subsequent > > fields, and I have learned recently (from issue #4331) that applying > > parameterized modules simply generate a bunch of new functions for > > everything exported by the module. > > > > Now I noticed the following code in my project, there are many other > > similar pieces of code, but this is the simplest instance. > > > > record CCatwithUU (ccat : CCat) : Set? where > > no-eta-equality > > open CCat+ ccat renaming (Mor to MorC) > > > > field > > UUStr : (i : ?) (? : Ob n) ? Ob (suc n) > > UUStr= : {i : ?} {? : Ob n} ? ft (UUStr i ?) ? ? > > UUStrNat' : {i : ?} (g : MorC n m) (? : Ob n) (g? : ?? g ? ?) > > (? : Ob m) (g? : ?? g ? ?) > > ? star g (UUStr i ?) UUStr= g? ? UUStr i ? > > > > UUStrNat : {i : ?} {g : MorC n m} {? : Ob n} (g? : ?? g ? ?) {? : > > Ob m} {g? : ?? g ? ?} > > ? star g (UUStr i ?) UUStr= g? ? UUStr i ? > > UUStrNat g? {g? = g?} = UUStrNat' _ _ g? _ g? > > > > > > It?s not very important what everything means, but the thing that I?m > > worried about is that I apply and open the parameterized module CCat+ > > (which is a rather big module, with ~100 definitions) before the fields > > of the record. > > > > Could it be that this adds ~100 let-ins in the type of each of the > fields? > > I have quite a few (~30) similar records, more complicated than this > > one, and which often open each other, so that could quickly explode. > > > > As a test, I duplicated the "open CCat+ ccat ?" line 10 times inside the > > record, and it took much longer to type check (5 seconds as opposed to > > less than half a second), most of it on positivity checking. > > > > Thanks, > > Best, > > Guillaume > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Fri May 22 16:27:55 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 22 May 2020 16:27:55 +0200 Subject: [Agda] A preliminary programme for AIM XXXII Message-ID: <474cdd86-b544-df89-6c2c-949f82ed61df@cse.gu.se> Hi, A preliminary programme for AIM XXXII can now be found on the wiki: https://wiki.portal.chalmers.se/agda/Main/AIMXXXII If you are giving a talk or leading a discussion, and the time does not work for you, please let me know. -- /NAD From nad at cse.gu.se Fri May 22 16:43:54 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 22 May 2020 16:43:54 +0200 Subject: [Agda] Problem proving inequality with HeterogeneousEquality In-Reply-To: References: <6CC62F92-08A4-4532-A611-6BD2BF94C048@iis.sinica.edu.tw> Message-ID: On 2020-05-20 23:28, Roman wrote: > I use what I call "heteroindexed equality", see > https://lists.chalmers.se/pipermail/agda/2016/009069.html > [_]_?_ : ? {X : Set} {x y} ? (Z : X ? Set) ? Z x ? Z y ? Set > [_]_?_ {x = x} {y} Z a b = (x , a) ? (y , b) I have also used this kind of equality, in some project where I used the K rule (back in 2011), and it worked well. I used this kind of construction: record [Z] : Set where constructor [_] field {x} : X {y} : Y x z : Z x y Equality of two values z : Z x y and z? : Z x? y? could then be expressed as [ z ] ? [ z? ]. -- /NAD From Thorsten.Altenkirch at nottingham.ac.uk Sat May 23 15:53:28 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 23 May 2020 13:53:28 +0000 Subject: [Agda] A preliminary programme for AIM XXXII In-Reply-To: <474cdd86-b544-df89-6c2c-949f82ed61df@cse.gu.se> References: <474cdd86-b544-df89-6c2c-949f82ed61df@cse.gu.se> Message-ID: In case other people are as stupid as me. The times are in UTC, that is the start of 10:00 UTC on Monday is actually at 11:00 in the UK and 12:00 in Sweden, Germany, France, Italy. Thorsten (struggling with time zones) ?On 22/05/2020, 15:28, "Agda on behalf of Nils Anders Danielsson" wrote: Hi, A preliminary programme for AIM XXXII can now be found on the wiki: https://wiki.portal.chalmers.se/agda/Main/AIMXXXII If you are giving a talk or leading a discussion, and the time does not work for you, please let me know. -- /NAD _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From a.g.setzer at swansea.ac.uk Sat May 23 21:50:16 2020 From: a.g.setzer at swansea.ac.uk (Setzer A.G.) Date: Sat, 23 May 2020 19:50:16 +0000 Subject: [Agda] A preliminary programme for AIM XXXII In-Reply-To: References: <474cdd86-b544-df89-6c2c-949f82ed61df@cse.gu.se>, Message-ID: I use the following tool which works very well for dealing with different timezones including up to 3 simultanteus: https://www.worldtimebuddy.com/ What works as well is to just google for e.g. 10:00 UTC and it shows you the time usually in your time zone. Anton ________________________________ From: Agda on behalf of Thorsten Altenkirch Sent: 23 May 2020 14:53 To: Nils Anders Danielsson ; Agda mailing list Subject: Re: [Agda] A preliminary programme for AIM XXXII In case other people are as stupid as me. The times are in UTC, that is the start of 10:00 UTC on Monday is actually at 11:00 in the UK and 12:00 in Sweden, Germany, France, Italy. Thorsten (struggling with time zones) ?On 22/05/2020, 15:28, "Agda on behalf of Nils Anders Danielsson" wrote: Hi, A preliminary programme for AIM XXXII can now be found on the wiki: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.portal.chalmers.se%2Fagda%2FMain%2FAIMXXXII&data=02%7C01%7CA.G.Setzer%40Swansea.ac.uk%7Ca5210d4e3f19471ef84008d7ff20b3c5%7Cbbcab52e9fbe43d6a2f39f66c43df268%7C0%7C0%7C637258388227457952&sdata=0r%2FTdpqlE%2F6TD66tEZv48TPwlkBQNyobhIoguwx6hqs%3D&reserved=0 If you are giving a talk or leading a discussion, and the time does not work for you, please let me know. -- /NAD _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7CA.G.Setzer%40Swansea.ac.uk%7Ca5210d4e3f19471ef84008d7ff20b3c5%7Cbbcab52e9fbe43d6a2f39f66c43df268%7C0%7C0%7C637258388227457952&sdata=GkduxNdPy5X8mN394rw%2F%2Fcub1KLxzWzTCgIR2yq05Cg%3D&reserved=0 This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7CA.G.Setzer%40Swansea.ac.uk%7Ca5210d4e3f19471ef84008d7ff20b3c5%7Cbbcab52e9fbe43d6a2f39f66c43df268%7C0%7C0%7C637258388227457952&sdata=GkduxNdPy5X8mN394rw%2F%2Fcub1KLxzWzTCgIR2yq05Cg%3D&reserved=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Mon May 25 12:08:05 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Mon, 25 May 2020 10:08:05 +0000 Subject: [Agda] AGDA XXXII has started Message-ID: <3ED259DF-1896-4646-8583-45EF31376FA1@nottingham.ac.uk> Please join on https://chalmers.zoom.us/j/69205557603 Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.levy.imag at free.fr Sat May 30 22:05:49 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Sat, 30 May 2020 22:05:49 +0200 Subject: [Agda] installation problem Message-ID: <6ee566a3-a3b9-6ad9-91c9-cd6436f8291c@free.fr> I look to my Agda installation made by cabal get Agda cd Agda-2.6.1 cabal sandbox init cabal install I did this installation because the more direct "cabal install Agda" failed But I have the following problem. The standard library seems badly installed: The imported module Relation is searched in /home/michel/Agda-2.6.1/.cabal-sandbox/share/x86_64-linux-ghc-8.6.5/Agda-2.6.1/lib/prim. and not found, because in this directory, there is only a another directory Agda and not the file Relation. Is it possible to reinstall only the standard library ? -- mail :michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : http ://michel.levy.imag.free.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Mon Jun 1 21:21:51 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 1 Jun 2020 21:21:51 +0200 Subject: [Agda] installation problem In-Reply-To: <6ee566a3-a3b9-6ad9-91c9-cd6436f8291c@free.fr> References: <6ee566a3-a3b9-6ad9-91c9-cd6436f8291c@free.fr> Message-ID: <2e25d7ea-91d0-b6a3-85e3-4dfce46580d0@cse.gu.se> On 2020-05-30 22:05, Michel Levy wrote: > The standard library seems badly installed: The commands you used do not install the standard library. You can download the library separately: https://wiki.portal.chalmers.se/agda/Libraries/StandardLibrary -- /NAD From michel.levy.imag at free.fr Mon Jun 1 23:49:46 2020 From: michel.levy.imag at free.fr (Michel Levy) Date: Mon, 1 Jun 2020 23:49:46 +0200 Subject: [Agda] installation problem In-Reply-To: <2e25d7ea-91d0-b6a3-85e3-4dfce46580d0@cse.gu.se> References: <6ee566a3-a3b9-6ad9-91c9-cd6436f8291c@free.fr> <2e25d7ea-91d0-b6a3-85e3-4dfce46580d0@cse.gu.se> Message-ID: Excuse me for my earlier message, but I forgot that the agda installation does not install the standard library. After rereading the documentation (library management part) everything is back in order. Le 01/06/2020 ? 21:21, Nils Anders Danielsson a ?crit?: > On 2020-05-30 22:05, Michel Levy wrote: >> The standard library seems badly installed: > > The commands you used do not install the standard library. You can > download the library separately: > > ? https://wiki.portal.chalmers.se/agda/Libraries/StandardLibrary > -- mail : michel.levy.imag at free.fr mobile : 06 59 13 42 53 web : http ://michel.levy.imag.free.fr From andrejtokarcik at gmail.com Tue Jun 2 01:14:34 2020 From: andrejtokarcik at gmail.com (=?UTF-8?B?QW5kcmVqIFRva2FyxI3DrWs=?=) Date: Tue, 2 Jun 2020 01:14:34 +0200 Subject: [Agda] Rewriting rules in parametrized modules Message-ID: Hello, I've got the following situation involving a rewrite rule in a parametrized module module N (i : I) where postulate [_] : I ? Set rw : [ i ] ? Nat {-# REWRITE rw #-} f : [ i ] ? Set f p = {! !} Even though a (normalized) view of the hole's context shows p to be of type Nat, an attempt to case-split on the variable p results in "Cannot split on argument of non-datatype [ i? ]". Further, if I replace the module parameter with a postulate or variable declaration of `i : I` inside the module, the case-splitting works, see the attached file. Is this expected behavior? I know there's already been some discussion regarding the interaction of rewriting rules and parametrized rules as evidenced by the test files Issue1563-6.agda and RewritingRuleInParametrizedModule.agda. These however seem to deal with rewrite rules on the level of "ground values" where this kind of error cannot occur. I'd be therefore very grateful for any hints in this particular direction. I've observed this using custom builds of Agda 2.6.2-4108da6 and 2.6.1-36b9448. Kind regards, Andrej -------------- next part -------------- A non-text attachment was scrubbed... Name: rewrite-module2.agda Type: application/octet-stream Size: 353 bytes Desc: not available URL: From icfp.publicity at googlemail.com Tue Jun 2 16:00:54 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Tue, 02 Jun 2020 10:00:54 -0400 Subject: [Agda] Call for Submissions: ICFP Student Research Competition Message-ID: <5ed65b967bbea_bbe12b160d7105a425428@homer.mail> ICFP 2020 Student Research Competition Call for Submissions ICFP invites students to participate in the Student Research Competition, which will be held virtually alongside the main conference, in order to present their research and receive feedback from prominent members of the programming language research community. As usual, the SRC consists of three rounds: * Extended abstract * Poster session at ICFP 2020 * ICFP presentation To make the virtual competition fruitful, we will make sure that every student will have an "invited audience"?during the poster?session.? We are also planning to organize a social event for the students. Please visit the SRC website for updates. ### Important Dates Submissions due: 26 Jun 2020 (Friday) https://icfp20src.hotcrp.com Notification: 10 July 2020 (Friday) Conference: 23 August (Sunday) - 28 August (Friday) ### Submission Details Each submission (referred to as "abstract" below) should include the student author?s name and e-mail address; institutional affiliation; research advisor?s name; ACM student member number; category (undergraduate or graduate); research title; and an extended abstract addressing the following: * Problem and Motivation: Clearly state the problem being addressed and explain the reasons for seeking a solution to this problem. * Background and Related Work: Describe the specialized (but pertinent) background necessary to appreciate the work in the context of ICFP areas of interest. Include references to the literature where appropriate, and briefly explain where your work departs from that done by others. * Approach and Uniqueness: Describe your approach in addressing the problem and clearly state how your approach is novel. * Results and Contributions: Clearly show how the results of your work contribute to programming language design and implementation in particular and to computer science in general; explain the significance of those results. * Submissions must be original research that is not already published at ICFP or another conference or journal. One of the goals of the SRC is to give students feedback on ongoing, unpublished work. Furthermore, the abstract must be authored solely by the student. If the work is collaborative with others and*or part of a larger group project, the abstract should make clear what the student?s role was and should focus on that portion of the work. * Formatting: Submissions must be in PDF format, printable in black and white on US Letter sized paper, and interpretable by common PDF tools. All submissions must adhere to the "ACM Small" template that is available (in both LaTeX and Word formats) from https://www.acm.org/publications/authors/submissions. For authors using LaTeX, a lighter-weight package, including only the essential files, is available from http://sigplan.org/Resources/Author/#acmart-format. The submission must not exceed 3 pages in PDF format. Reference lists do not count towards the 3-page limit. Further information is available at the ICFP SRC website: https://icfp20.sigplan.org/track/icfp-2020-Student-Research-Competition Program Committee: Chair: Youyou Cong (Tokyo Institute of Technology) Stephen Chang (University of Massachusetts Boston) Jesper Cockx (Delft University of Technology) Hsiang-Shang Ko (Institute of Information Science, Academia Sinica) Cyrus Omar (University of Michigan) From joey.eremondi at gmail.com Thu Jun 4 20:35:19 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Thu, 4 Jun 2020 11:35:19 -0700 Subject: [Agda] What does does it mean if "-invert730" shows up in a goal? Message-ID: Basically what the title says. I've got a goal I'm trying to fill, but the type of the goal is "ModuleName.-invert730 arg1 arg2 ... | someExpr arg1 | someEqProof arg2 ". If I try to pattern match on "someExpr arg1" I get the dreaded "someExpr arg1 != w" error. And if I try to do a rewrite on "someEqProof arg2" I get "lhs != someExpr arg1". I'm wondering: * Does the -invert autogenerated variable give any hints as to why this is happening? Or is this just normal problems with "with" and "rewrite", and the "-invert" is just an intermediate name that's exposed because evaluation got stuck? * Is there any general way to debug/understand what causes the "w !=" or "lhs !=" errors? I'm getting them repeatedly when I work with Agda, and I'd love to actually know what's going on. I realize it's hard to know what's going on without a minimal example, but the code I've got right now is too big to ask anyone to look at. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sat Jun 6 15:10:25 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 6 Jun 2020 13:10:25 +0000 Subject: [Agda] several agda versions Message-ID: <57F4C367-BCA4-4A3A-BAB1-C5E2F0A5E8E2@nottingham.ac.uk> Hi, As an aftermath of the Agda meeting it seems that I need to play with several agda branches. How can I install and switch between different versions? I am using stack but if you tell me how to do it with cabal directly I may be able to figure it out anyway. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Sat Jun 6 21:47:36 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sat, 6 Jun 2020 21:47:36 +0200 Subject: [Agda] several agda versions In-Reply-To: <57F4C367-BCA4-4A3A-BAB1-C5E2F0A5E8E2@nottingham.ac.uk> References: <57F4C367-BCA4-4A3A-BAB1-C5E2F0A5E8E2@nottingham.ac.uk> Message-ID: <8d221d5b-82d6-326f-0f2f-a55a28741308@ifi.lmu.de> Hi Thorsten, E.g. with cabal install Agda-2.6.1 --program-suffix=-2.6.1 you get agda-2.6.1 and then in emacs with C-c C-x C-s 2.6.1 RETURN You can switch to this version of Agda. Switching back to just agda would be C-c C-x C-s RETURN If you want to install a branch I suppose you could do git checkout cabal install --program-suffix=- which gives you agda-. You switch to it in emacs with C-c C-x C-s RETURN (I don't know stack really.) Hope this works, Andreas On 2020-06-06 15:10, Thorsten Altenkirch wrote: > Hi, > > As an aftermath of the Agda meeting it seems that I need to play with > several agda branches. How can I install and switch between different > versions? > > I am using stack but if you tell me how to do it with cabal directly I > may be able to figure it out anyway. > > Cheers, > > Thorsten > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at scico.botik.ru Sat Jun 6 22:32:24 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 06 Jun 2020 23:32:24 +0300 Subject: [Agda] many ways to import the same thing from record Message-ID: Can anybody, please, explain something concerning the _attached code_? (it is small). The effect is that the same setoid can be imported in many ways from Semiring, and by even more ways from CommutativeRing, and so on. And in some programs the type checker is satisfied only with one of such ways. This relates both to Agda programming in general and to standard library. The example implements a part of a proof for the statement: for a Semiring having the property ``nz*nz : ? {x y} ? x ? 0# ? y ? 0# ? (x * y) ? 0#`` (call it FooSemiring) it holds that the subset of nonzero elements is a Magma, if the `_?_` operation is put the restriction of `_*_` to Nonzero. The code defines the notions of Subset and Submagma, and tries to form a Submagma for Nonzero in any FooSemiring. But Agda-2.6.1 reports Algebra.IsSemiringWithoutAnnihilatingZero.*-isMonoid /= Algebra.IsSemiringWithoutAnnihilatingZero.+-isCommutativeMonoid when checking that the expression nzSubsetoid has type Subsetoid ? ?= ?= (Magma.setoid *-magma) It is about the last two lines ``` nzSubmagma : Submagma ? ?= ?= *-magma nzSubmagma = submagma? nzSubsetoid closed* ``` I have an impression that it happens the following. nzSubsetoid is formed for the base `setoid` imported form FooSemiring, and this setoid is extracted from `Semiring.+-monoid` - probably this is put so in lib-1.3, by occasion. But it could as well extract it from `Semiring.*-monoid`. Further, the Submagma record has `magma` as argument, and in the definition of Submagma, `setoid` is exracted from this `magma`. And the argument in the type of nzSubmagma is set `Semiring.*-magma`, because it aims at the multiplicative magma of a Semiring. Mathematically, `+-magma` and `*-magma` of (Semiring R) have the same setoid inside. Does Agda refer to these setoids somehow with the same reference? Probably, in my program, the type checker does not identify these setoids. To check this, I split this setoid import to the two steps: ``` open FooSemiring R using (Carrier; ...; *-magma) open Magma *-magma using (setoid) ``` instead of importing is directly from FooSemiring. Now Agda is satisfied. Something is suspicious here. As there are many levels in the record hierarchy for algebra in standard library, it occurs that the same thing can be imported from the top domain by hundreds of ways. And for almost all of these ways, the type checker will report an error - for some programs. This presents a problem. Because it is easier to import everything needed by a single `open` declaration for the top record rather than to search for a lucky chain of imports. May be, this is due to a bug in Agda? I do not know how standard library can help here. Am I missing something? Thanks, ------ Sergei -------------- next part -------------- A non-text attachment was scrubbed... Name: Test.agda.zip Type: application/zip Size: 1100 bytes Desc: not available URL: From nad at cse.gu.se Mon Jun 8 10:25:47 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 8 Jun 2020 10:25:47 +0200 Subject: [Agda] What does does it mean if "-invert730" shows up in a goal? In-Reply-To: References: Message-ID: <15ae7b8e-0efc-d048-799a-8f568059a510@cse.gu.se> On 2020-06-04 20:35, Joey Eremondi wrote: > * Does the -invert autogenerated variable give any hints as to why > this is happening? Or is this just normal problems with "with" and > "rewrite", and the "-invert" is just an intermediate name that's > exposed because evaluation got stuck? This name suffix seems to be related to the work of Guillame Allais on irrefutable matching for with. > * Is there any general way to debug/understand what causes the "w !=" > or "lhs !=" errors? I'm getting them repeatedly when I work with > Agda, and I'd love to actually know what's going on. The manual contains a section called "Ill-typed with-abstractions": https://agda.readthedocs.io/en/latest/language/with-abstraction.html#ill-typed-with-abstractions -- /NAD From publicityifl at gmail.com Mon Jun 8 14:14:01 2020 From: publicityifl at gmail.com (Jurriaan Hage) Date: Mon, 8 Jun 2020 05:14:01 -0700 Subject: [Agda] First call for draft papers for IFL 2020 (Implementation and Application of Functional Languages) Message-ID: Hello, Please, find below the final call for draft papers for IFL 2020. Please forward these to anyone you think may be interested. Apologies for any duplicates you may receive. best regards, Jurriaan Hage Publicity Chair of IFL ================================================================================ IFL 2020 32nd Symposium on Implementation and Application of Functional Languages venue: online 2nd - 4th September 2020 https://www.cs.kent.ac.uk/events/2020/ifl20/ ================================================================================ ### Scope The goal of the IFL symposia is to bring together researchers actively engaged in the implementation and application of functional and function-based programming languages. IFL 2020 will be a venue for researchers to present and discuss new ideas and concepts, work in progress, and publication-ripe results related to the implementation and application of functional languages and function-based programming. Topics of interest to IFL include, but are not limited to: - language concepts - type systems, type checking, type inferencing - compilation techniques - staged compilation - run-time function specialisation - run-time code generation - partial evaluation - (abstract) interpretation - meta-programming - generic programming - automatic program generation - array processing - concurrent/parallel programming - concurrent/parallel program execution - embedded systems - web applications - (embedded) domain specific languages - security - novel memory management techniques - run-time profiling performance measurements - debugging and tracing - virtual/abstract machine architectures - validation, verification of functional programs - tools and programming techniques - (industrial) applications ### Post-symposium peer-review Following IFL tradition, IFL 2020 will use a post-symposium review process to produce the formal proceedings. Before the symposium authors submit draft papers. These draft papers will be screened by the program chair to make sure that they are within the scope of IFL. The draft papers will be made available to all participants at the symposium. Each draft paper is presented by one of the authors at the symposium. After the symposium every presenter is invited to submit a full paper, incorporating feedback from discussions at the symposium. Work submitted to IFL may not be simultaneously submitted to other venues; submissions must adhere to ACM SIGPLAN's republication policy. The program committee will evaluate these submissions according to their correctness, novelty, originality, relevance, significance, and clarity, and will thereby determine whether the paper is accepted or rejected for the formal proceedings. We plan to publish these proceedings in the International Conference Proceedings Series of the ACM Digital Library, as in previous years. ### Important dates Submission deadline of draft papers: 17 August 2020 Notification of acceptance for presentation: 19 August 2020 Registration deadline: 31 August 2020 IFL Symposium: 2-4 September 2020 Submission of papers for proceedings: 7 December 2020 Notification of acceptance: 3 February 2021 Camera-ready version: 15 March 2021 ### Submission details All contributions must be written in English. Papers must use the ACM two columns conference format, which can be found at: http://www.acm.org/publications/proceedings-template ### Peter Landin Prize The Peter Landin Prize is awarded to the best paper presented at the symposium every year. The honoured article is selected by the program committee based on the submissions received for the formal review process. The prize carries a cash award equivalent to 150 Euros. ### Organisation IFL 2020 Chair: Olaf Chitil, University of Kent, UK IFL Publicity chair: Jurriaan Hage, Utrecht University, The Netherlands ### Virtual symposium Because of the Covid-19 pandemic, this year IFL 2020 will be an online event, consisting of paper presentations, discussions and virtual social gatherings. Registered participants can take part from anywhere in the world. ### Acknowledgments This call-for-papers is an adaptation and evolution of content from previous instances of IFL. We are grateful to prior organisers for their work, which is reused here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Mon Jun 8 14:27:01 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 08 Jun 2020 15:27:01 +0300 Subject: [Agda] many ways to import the same thing from record In-Reply-To: References: Message-ID: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> mechvel at scico.botik.ru ????? 2020-06-06 23:32: > Can anybody, please, explain something concerning the _attached code_? > Here is a reduced example (zip is attached, for any occasion): ------------------------------------------------------------------- record Subsetoid ? ?= p (S : Setoid ? ?=) : Set (? ? ?= ? suc p) where field member : (Setoid.Carrier S) ? Set p record Submagma ? ?= p (magma : Magma ? ?=) : Set (? ? ?= ? suc p) where field subsetoid : Subsetoid ? ?= p (Magma.setoid magma) module _ {? ?=} (R : Semiring ? ?=) where open Semiring R using (0#; +-magma; *-magma) open Magma +-magma using (setoid) -- I -- open Magma *-magma using (setoid) -- II open Setoid setoid using (_?_) nzSubsetoid : Subsetoid ? ?= ?= setoid nzSubsetoid = record{ member = (_? 0#) } submagma : Submagma ? ?= ?= *-magma submagma = record{ subsetoid = nzSubsetoid } ---------------------------------------------------------------------- Agda-2.6.1 reports an error " .......*-isMonoid /= .......+-isCommutativeMonoid " After switching the comment from line II to line I, it is type-checked. Why Agda makes difference between (Magma.setoid +-magma) and (Magma.setoid *-magma) ? There is a tree made by import steps, with the root in Semiring. There are many paths in it which lead to the same Setoid. Probably the type checker evaluates all these paths to the same tree node presenting this setoid. Because in a Semiring, +-magma and *-magma share the setoid. ? Thank you in advance for explanation. ------ Sergei The effect is that the same setoid can be imported in many ways from > Semiring, and by even more ways from CommutativeRing, and so on. > And in some programs the type checker is satisfied only with one of > such ways. > > This relates both to Agda programming in general and to standard > library. > > The example implements a part of a proof for the statement: > for a Semiring having the property > ``nz*nz : ? {x y} ? x ? 0# ? y ? 0# ? (x * y) ? 0#`` > (call it FooSemiring) > it holds that the subset of nonzero elements is a Magma, if the `_?_` > operation is put the restriction of `_*_` to Nonzero. > > The code defines the notions of Subset and Submagma, > and tries to form a Submagma for Nonzero in any FooSemiring. > But Agda-2.6.1 reports > > Algebra.IsSemiringWithoutAnnihilatingZero.*-isMonoid /= > Algebra.IsSemiringWithoutAnnihilatingZero.+-isCommutativeMonoid > when checking that the expression nzSubsetoid has type > Subsetoid ? ?= ?= (Magma.setoid *-magma) > > It is about the last two lines > ``` > nzSubmagma : Submagma ? ?= ?= *-magma > nzSubmagma = submagma? nzSubsetoid closed* > ``` > I have an impression that it happens the following. > nzSubsetoid is formed for the base `setoid` imported form FooSemiring, > and this setoid is extracted from `Semiring.+-monoid` > - probably this is put so in lib-1.3, by occasion. > But it could as well extract it from `Semiring.*-monoid`. > > Further, the Submagma record has `magma` as argument, and in the > definition of Submagma, `setoid` is exracted from this `magma`. > And the argument in the type of nzSubmagma is set `Semiring.*-magma`, > because it aims at the multiplicative magma of a Semiring. > > Mathematically, `+-magma` and `*-magma` of (Semiring R) have the same > setoid > inside. > Does Agda refer to these setoids somehow with the same reference? > > Probably, in my program, the type checker does not identify these > setoids. > To check this, I split this setoid import to the two steps: > ``` > open FooSemiring R using (Carrier; ...; *-magma) > open Magma *-magma using (setoid) > ``` > instead of importing is directly from FooSemiring. > Now Agda is satisfied. > > Something is suspicious here. > As there are many levels in the record hierarchy for algebra in > standard library, it occurs that the same thing can be imported > from the top domain by hundreds of ways. And for almost all of these > ways, the type checker will report an error - for some programs. > This presents a problem. > Because it is easier to import everything needed by a single `open` > declaration > for the top record rather than to search for a lucky chain of imports. > May be, this is due to a bug in Agda? > I do not know how standard library can help here. > > Am I missing something? > > Thanks, > > ------ > Sergei > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- A non-text attachment was scrubbed... Name: Test.agda.zip Type: application/zip Size: 524 bytes Desc: not available URL: From nad at cse.gu.se Mon Jun 8 16:40:55 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 8 Jun 2020 16:40:55 +0200 Subject: [Agda] many ways to import the same thing from record In-Reply-To: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> References: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> Message-ID: <60c0f516-48a4-ee16-8ef4-9d297cf52e6f@cse.gu.se> On 2020-06-08 14:27, mechvel at scico.botik.ru wrote: > There is a tree made by import steps, with the root in Semiring. > There are many paths in it which lead to the same Setoid. > Probably the type checker evaluates all these paths to the same tree node > presenting this setoid. > Because in a Semiring, +-magma and *-magma share the setoid. > ? I have not checked the example very carefully, but I don't think that the two setoids are necessarily equal: they might have distinct proofs of (say) transitivity. Perhaps it would make sense to change the library so that the two setoids are equal (or to stop using setoids). -- /NAD From matthewdaggitt at gmail.com Mon Jun 8 16:49:03 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Mon, 8 Jun 2020 22:49:03 +0800 Subject: [Agda] many ways to import the same thing from record In-Reply-To: <60c0f516-48a4-ee16-8ef4-9d297cf52e6f@cse.gu.se> References: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> <60c0f516-48a4-ee16-8ef4-9d297cf52e6f@cse.gu.se> Message-ID: Apologies, I didn't send this to the list when I replied the first time round. Hi Sergei, > There are many paths in it which lead to the same Setoid. > > Unfortunately this is not true. The `Setoid`s from `+-magma` and `*-magma` > in your examples are different setoids. They have the same binary equality > relation, but the proof of `isEquivalence` may differ and therefore Agda > does not consider them identical. > This is not a problem with Agda, but with how the record hierarchy is > designed. I'm not sure there is a good solution for the problem, short of > parameterising every record in the hierarchy by a `Setoid`. However that > brings its own set of problems... > Best, > Matthew > > On Mon, Jun 8, 2020 at 10:42 PM Nils Anders Danielsson wrote: > On 2020-06-08 14:27, mechvel at scico.botik.ru wrote: > > There is a tree made by import steps, with the root in Semiring. > > There are many paths in it which lead to the same Setoid. > > Probably the type checker evaluates all these paths to the same tree node > > presenting this setoid. > > Because in a Semiring, +-magma and *-magma share the setoid. > > ? > > I have not checked the example very carefully, but I don't think that > the two setoids are necessarily equal: they might have distinct proofs > of (say) transitivity. Perhaps it would make sense to change the library > so that the two setoids are equal (or to stop using setoids). > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Mon Jun 8 17:11:11 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Mon, 8 Jun 2020 16:11:11 +0100 Subject: [Agda] many ways to import the same thing from record In-Reply-To: References: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> <60c0f516-48a4-ee16-8ef4-9d297cf52e6f@cse.gu.se> Message-ID: <0ce238ea-7170-64ab-4cb2-53e3bf16be97@strath.ac.uk> Hi, I fix an instance of this kind of issue in my definition of module-like structures. The code is somewhere around https://agda.github.io/agda-stdlib/Algebra.Module.Structures.html#4428 . An R-S-bimodule is a commutative monoid over which we have a left R-module and a right S-module which are compatible with each other. If we formalise just that, we end up requiring two proofs of `IsCommutativeMonoid` ? one from the left and one from the right. To avoid that, I had to introduce notions of left R-module and right S-module lacking `IsCommutativeMonoid` proofs (`IsPreleftSemimodule`, `IsPrerightSemimodule`), to allow for the possibility of sharing when we have multiple. Another approach would be to parametrise over the `IsCommutativeMonoid` proof, as Matthew suggested. Ideally, we would have language support for this kind of sharing in hierarchies, but as it is, I don't think I can recommend any refactoring to stdlib's main algebraic hierarchy. To do for `IsEquivalence` what I did for `IsCommutativeMonoid` would require a lot of new definitions, and probably refactorings just to get around having so many new definitions. It also probably would break nearly all code defining an instance of an algebraic structure, though a fix would not be too hard to apply in each case. Regards, James On 08/06/2020 15:49, Matthew Daggitt wrote: > Apologies, I didn't send this to the list when I replied the first time > round. > > Hi Sergei, > > ? > > There are many paths in it which lead to the same Setoid. > > ? > > Unfortunately this is not true. The `Setoid`s from `+-magma` and > `*-magma` in your examples are different setoids. They have the same > binary equality relation, but the proof of `isEquivalence` may > differ and therefore Agda does not consider them identical.? > This is not a problem with Agda, but with how the record hierarchy > is designed. I'm not sure there is a good solution for the problem, > short of parameterising every record in the hierarchy by a `Setoid`. > However that brings its own set of problems... > Best, > Matthew > > > > On Mon, Jun 8, 2020 at 10:42 PM Nils Anders Danielsson > wrote: > > On 2020-06-08 14:27, mechvel at scico.botik.ru > wrote: > > There is a tree made by import steps, with the root in Semiring. > > There are many paths in it which lead to the same Setoid. > > Probably the type checker evaluates all these paths to the same > tree node > > presenting this setoid. > > Because in a Semiring, +-magma and *-magma share the setoid. > > ? > > I have not checked the example very carefully, but I don't think that > the two setoids are necessarily equal: they might have distinct proofs > of (say) transitivity. Perhaps it would make sense to change the library > so that the two setoids are equal (or to stop using setoids). > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cjames.wood.100%40strath.ac.uk%7C0cbff6bde77d407c655308d80bbb3d5f%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637272246536665246&sdata=eaJYr%2B7gSf2KY3GLv4q3hU%2FvxO%2FoI6YCzq7Iksyif%2FM%3D&reserved=0 > From mechvel at scico.botik.ru Mon Jun 8 20:50:09 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 08 Jun 2020 21:50:09 +0300 Subject: [Agda] many ways to import the same thing from record In-Reply-To: References: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> <60c0f516-48a4-ee16-8ef4-9d297cf52e6f@cse.gu.se> Message-ID: <2da70a5e8b8ae7d4d681527527e7b9fb@scico.botik.ru> Now, what people would tell: having, say, R : CommutativeRing _ _, how many different setoids are obtained by various sequences of `open' applied to the parts of the record (CommutativeRing R) ? Are there only two of them? ((Magma.setoid +-magma) and (Magma.setoid *-magma)) ? -- SM On 2020-06-08 17:49, Matthew Daggitt wrote: > [..] >> >>> There are many paths in it which lead to the same Setoid. > >> > >> Unfortunately this is not true. The `Setoid`s from `+-magma` and >> `*-magma` in your examples are different setoids. They have the same >> binary equality relation, but the proof of `isEquivalence` may >> differ and therefore Agda does not consider them identical. >> This is not a problem with Agda, but with how the record hierarchy >> is designed. I'm not sure there is a good solution for the problem, >> short of parameterising every record in the hierarchy by a `Setoid`. >> However that brings its own set of problems... >> Best, >> Matthew > >> > > On Mon, Jun 8, 2020 at 10:42 PM Nils Anders Danielsson > wrote: > >> On 2020-06-08 14:27, mechvel at scico.botik.ru wrote: >>> There is a tree made by import steps, with the root in Semiring. >>> There are many paths in it which lead to the same Setoid. >>> Probably the type checker evaluates all these paths to the same >> tree node >>> presenting this setoid. >>> Because in a Semiring, +-magma and *-magma share the setoid. >>> ? >> >> I have not checked the example very carefully, but I don't think >> that >> the two setoids are necessarily equal: they might have distinct >> proofs >> of (say) transitivity. Perhaps it would make sense to change the >> library >> so that the two setoids are equal (or to stop using setoids). >> >> -- >> /NAD >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda From james.wood.100 at strath.ac.uk Mon Jun 8 20:55:26 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Mon, 8 Jun 2020 19:55:26 +0100 Subject: [Agda] many ways to import the same thing from record In-Reply-To: <2da70a5e8b8ae7d4d681527527e7b9fb@scico.botik.ru> References: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> <60c0f516-48a4-ee16-8ef4-9d297cf52e6f@cse.gu.se> <2da70a5e8b8ae7d4d681527527e7b9fb@scico.botik.ru> Message-ID: Yes. You can tell how many there are by writing out an inhabitant and noticing how many times you have to prove an `IsEquivalence`. `CommutativeRing` will have two because these ultimately come from the two magmas (addition and multiplication). Best wishes, James On 08/06/2020 19:50, mechvel at scico.botik.ru wrote: > Now, what people would tell: > having, say, R : CommutativeRing _ _, > how many different setoids are obtained by various sequences of `open' > applied to the parts of the record (CommutativeRing R) ? > Are there only two of them? > ((Magma.setoid +-magma) and (Magma.setoid *-magma)) > ? > > -- > SM > > > On 2020-06-08 17:49, Matthew Daggitt wrote: >> [..] >>> >>>> There are many paths in it which lead to the same Setoid. >> >>> >> >>> Unfortunately this is not true. The `Setoid`s from `+-magma` and >>> `*-magma` in your examples are different setoids. They have the same >>> binary equality relation, but the proof of `isEquivalence` may >>> differ and therefore Agda does not consider them identical. >>> This is not a problem with Agda, but with how the record hierarchy >>> is designed. I'm not sure there is a good solution for the problem, >>> short of parameterising every record in the hierarchy by a `Setoid`. >>> However that brings its own set of problems... >>> Best, >>> Matthew >> >>> >> >> On Mon, Jun 8, 2020 at 10:42 PM Nils Anders Danielsson >> wrote: >> >>> On 2020-06-08 14:27, mechvel at scico.botik.ru wrote: >>>> There is a tree made by import steps, with the root in Semiring. >>>> There are many paths in it which lead to the same Setoid. >>>> Probably the type checker evaluates all these paths to the same >>> tree node >>>> presenting this setoid. >>>> Because in a Semiring, +-magma and *-magma share the setoid. >>>> ? >>> >>> I have not checked the example very carefully, but I don't think >>> that >>> the two setoids are necessarily equal: they might have distinct >>> proofs >>> of (say) transitivity. Perhaps it would make sense to change the >>> library >>> so that the two setoids are equal (or to stop using setoids). >>> >>> -- >>> /NAD >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at scico.botik.ru Mon Jun 8 22:15:28 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 08 Jun 2020 23:15:28 +0300 Subject: [Agda] many ways to import the same thing from record In-Reply-To: References: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> <60c0f516-48a4-ee16-8ef4-9d297cf52e6f@cse.gu.se> Message-ID: <6a11cdc984c2d87308b728726e1c6d2f@scico.botik.ru> (Sorry, the topic may look now as of standard library) On 2020-06-08 17:49, Matthew Daggitt wrote: > >>> There are many paths in it which lead to the same Setoid. > >> Unfortunately this is not true. The `Setoid`s from `+-magma` and >> `*-magma` in your examples are different setoids. They have the same >> binary equality relation, but the proof of `isEquivalence` may >> differ and therefore Agda does not consider them identical. >> This is not a problem with Agda, but with how the record hierarchy >> is designed. I'm not sure there is a good solution for the problem, >> short of parameterising every record in the hierarchy by a `Setoid`. >> However that brings its own set of problems... Probably, people would agree that for the standard algebra hierarchy it is not good to allow, for example, for Semiring, different proofs for IsEquivalence _?_ in +-magma and in *-magma. Allowing this would not add anything good even for constructive mathematics. Please, consider the attached suggestion. It defines the hierarchy part from Setoid to Semiring' (a simplified contrived version for Semiring). As to me, it looks nice. And I expect that with this definition, the setoid is the same for +-magma and for *-magma. Is it? This is an approach to define Class, SubClasss, SubSubClass ... where SubClass has Class as an argument. The scheme is record Class ... record IsSubClass (c : Class) (op : Op Carrier) ... where field record SubClass ... where field class : Class op : ... isSubClass : IsSubClass class op record IsSubSubClass (sc : SubClass) (op2 : ...) where field record SubSubClass ... where field subclass : SubClass op2 : ... isSubSubClass : IsSubSubClass subclass op2 and so on. The argument of the backwards compatibility ------------------------------------------- does not sound convincing. Because a) so far, each new lib version still breaks almost all the user's application modules, b) it is not difficult to port the application to a new version, c) each application specifies the needed Agda version (and hence the lib version), install this version and enjoy, Probably, we need to continue this way until it becomes stable in somewhat a natural way. On the other hand, ------------------ if there are only two setoids in this case (as James wrote), then, maybe the difficulties are not so great. One sees a report of kind "additive thing /= multiplicative thing" and guesses to change the place to import setoid from. I am not sure, subtle difficulties can be hidden there. In such situations it usually happens that someone invents some horrible example. -- SM > On Mon, Jun 8, 2020 at 10:42 PM Nils Anders Danielsson > wrote: > >> On 2020-06-08 14:27, mechvel at scico.botik.ru wrote: >>> There is a tree made by import steps, with the root in Semiring. >>> There are many paths in it which lead to the same Setoid. >>> Probably the type checker evaluates all these paths to the same >> tree node >>> presenting this setoid. >>> Because in a Semiring, +-magma and *-magma share the setoid. >>> ? >> >> I have not checked the example very carefully, but I don't think >> that >> the two setoids are necessarily equal: they might have distinct >> proofs >> of (say) transitivity. Perhaps it would make sense to change the >> library >> so that the two setoids are equal (or to stop using setoids). >> >> -- >> /NAD >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Structures.agda URL: From mechvel at scico.botik.ru Mon Jun 8 22:20:46 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 08 Jun 2020 23:20:46 +0300 Subject: [Agda] many ways to import the same thing from record In-Reply-To: <6a11cdc984c2d87308b728726e1c6d2f@scico.botik.ru> References: <87a3b9584e3b3b9ca05de6c5fed98672@scico.botik.ru> <60c0f516-48a4-ee16-8ef4-9d297cf52e6f@cse.gu.se> <6a11cdc984c2d87308b728726e1c6d2f@scico.botik.ru> Message-ID: <7b2401e618a0bcdacc04f2c99da0c29c@scico.botik.ru> On 2020-06-08 23:15, mechvel at scico.botik.ru wrote: > > [..] > > This is an approach to define Class, SubClasss, SubSubClass ... > where SubClass has Class as an argument. > An important correction of a typo: IsSubClass has Class as an argument. -- SM From pierre.lescanne at ens-lyon.fr Fri Jun 12 15:01:47 2020 From: pierre.lescanne at ens-lyon.fr (Pierre Lescanne) Date: Fri, 12 Jun 2020 15:01:47 +0200 Subject: [Agda] Strange bug In-Reply-To: <67b89280-6216-1b59-0b75-e541c830d44d@ens-lyon.org> References: <67b89280-6216-1b59-0b75-e541c830d44d@ens-lyon.org> Message-ID: I got the same bug, with 2.6.1. But restarting agda, I fix it. Perhaps I did not install Agda in an orthodox way ! Cheers, Pierre Le 25/02/2019 ? 12:45, Guillaume Allais a ?crit?: > Hi Phil, > > This particularly annoying bug has been fixed in 2.5.4.2: > https://github.com/agda/agda/issues/3199 > > Cheers, > -- > gallais > > On 25/02/2019 00:31, Philip Wadler wrote: >> I am getting a strange bug. >> >> An internal error has occurred. Please report this as a bug. >>> Location of the error: >>> src/full/Agda/TypeChecking/Serialise/Instances/Common.hs:178 >> >> Relevant source files attached. The error occurs in CoercionsS.lagda. >> >> What is the best way to report this, please? -- P >> >> >> . \ Philip Wadler, Professor of Theoretical Computer Science, >> . /\ School of Informatics, University of Edinburgh >> . / \ and Senior Research Fellow, IOHK >> . http://homepages.inf.ed.ac.uk/wadler/ >> >> >> The University of Edinburgh is a charitable body, registered in >> Scotland, with registration number SC005336. >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Cordialement, --------------------------- Pierre Lescanne (Professeur ?m?rite) LIP / ENS de Lyon 46 all?e d'Italie 69364 LYON Cedex 07, France t?l: +33 6 85 70 94 31 http://perso.ens-lyon.fr/pierre.lescanne/ --------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From tarmo at cs.ioc.ee Tue Jun 16 09:40:11 2020 From: tarmo at cs.ioc.ee (Tarmo Uustalu) Date: Tue, 16 Jun 2020 10:40:11 +0300 Subject: [Agda] ETAPS 2020 afternoon, online, 2 July 2020, call for participation Message-ID: <20200616104011.0380b40e@cs.ioc.ee> [There will be no physical ETAPS in Dublin this autumn. Instead, on 2 July 2020, we will hold an online ETAPS 2020 afternoon. The authors of papers accepted to the main conferences of ETAPS 2020 will get an opportunity to present their work at ETAPS 2021 in Luxembourg.] The ETAPS EC and ETAPS 2020 LOC regret to announce that the plan of a postponed physical ETAPS in Dublin in autumn 2020 has become unrealistic. We will follow the following substitute plan. - We will hold a 3-hour virtual online ETAPS 2020 event in the afternoon of Thu 2 July 2020, see the call below. Everyone is most welcome to attend. There will be no registration, no fee. - The authors of papers accepted to the main conferences of ETAPS 2020 will get an opportunity to present their work at ETAPS 2021 in Luxembourg, Sat-Thu 27 March-1 April 2021. The exact arrangements for this move will be announced. - The workshop organizers will individually decide and announce whether, when and in what format their workshops will take place. - The local organizers of ETAPS 2020 will reimburse the fees collected (minus some administrative charge) according to a policy and a procedure to be announced. Thank you for your understanding! CALL FOR PARTICIPATION ETAPS 2020 afternoon online, 2 July 2020 https://etaps.org/2020/afternoon ETAPS 2020 AFTERNOON To compensate for the cancelled physical ETAPS 2020 conference in Dublin, we will hold a 3-hour virtual event to hand out the awards of the conference and listen to talks by the best paper award winners. This will take place Thu 2 July 2020. The presentations will be streamed live. Questions to presenters can be asked in a chat. The event will be recorded and can be watched later. HOW TO JOIN There will be no registration, no fee. The link to join the programme online will be published on the webpage https://etaps.org/2020/afternoon on the day of the event. PROGRAMME All times below are CEST. Start: 15:00 CEST (= GMT+2, Amsterdam). ------------------------------------------------------------------------- 15:00 Welcome by Marieke Huisman Announcement on ETAPS 2021 in Luxembourg and on the plan for ETAPS 2020 papers by Peter Ryan 15:15 Talk by EASST best paper award winner Florian Frohn. A calculus for modular loop acceleration (TACAS) Award handed out by Reiko Heckel 15:45 Announcement of ETAPS test of time award winner Award handed out by Don Sannella 16:00 Break 16:30 Talk by EAPLS best paper award winner Raffi Khatchadourian, Yiming Tang, Mehdi Bagherzadeh and Baishakhi Ray. An empirical study on the use and misuse of Java 8 streams (FASE) Award handed out by Anton Wijs 17:00 Talk by ETAPS PhD award winner Oded Padon. Deductive verification of distributed protocols in first-order logic (Tel Aviv University, 2018) Award handed out by Caterina Urban 17:30 Talk by EATCS best paper award winner Thomas Neele, Antti Valmari and Tim A.C. Willemse. The inconsistent labelling problem of stutter-preserving partial-order reduction (FoSSaCS) Award handed out by Don Sannella 18:00 Closing ------------------------------------------------------------------------- From icfp.publicity at googlemail.com Wed Jun 17 02:18:37 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Tue, 16 Jun 2020 20:18:37 -0400 Subject: [Agda] Call for Tutorial Proposals: ICFP 2020 Message-ID: <5ee9615d5be71_223a22abfa25865c47528@homer.mail> CALL FOR TUTORIAL, PANEL, AND DISCUSSION PROPOSALS ICFP 2020 25th ACM SIGPLAN International Conference on Functional Programming August 23 - 28, 2020 Virtual https://icfp20.sigplan.org/ The 25th ACM SIGPLAN International Conference on Functional Programming will be held virtually on August 23-28, 2020. ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. Proposals are invited for tutorials, lasting approximately 3 hours each, to be presented during ICFP and its co-located workshops and other events. These tutorials are the successor to the CUFP tutorials from previous years, but we also welcome tutorials whose primary audience is researchers rather than practitioners. Tutorials may focus either on a concrete technology or on a theoretical or mathematical tool. Ideally, tutorials will have a concrete result, such as "Learn to do X with Y" rather than "Learn language Y". This year, following the success of the #ShutDownPL event, we are also inviting proposals for panels and discussions on topics of broader interest to the PL community. Tutorials, panels, and discussions may occur before or after ICFP, co-located with the associated workshops, on August 23 or August 27-28. ---------------------------------------------------------------------- Submission details Deadline for submission: July 17th, 2020 Notification of acceptance: July 22nd, 2020 Prospective organizers of tutorials are invited to submit a completed tutorial proposal form in plain text format to the ICFP 2020 workshop co-chairs (Jennifer Hackett and Leonidas Lampropoulos), via email to icfp-workshops-2020 at googlegroups.com by July 17th, 2020. Please note that this is a firm deadline. Organizers will be notified if their event proposal is accepted by July 22nd, 2020. The proposal form is available at: http://www.icfpconference.org/icfp2020-files/icfp20-panel-form.txt http://www.icfpconference.org/icfp2020-files/icfp20-tutorials-form.txt ---------------------------------------------------------------------- Selection committee The proposals will be evaluated by a committee comprising the following members of the ICFP 2020 organizing committee. Tutorials Co-Chair: Jennifer Hackett (University of Nottingham) Tutorials Co-Chair: Leonidas Lampropoulos (University of Maryland) General Chair: Stephanie Weirich (University of Pennsylvania) Program Chair: Adam Chlipala (MIT) ---------------------------------------------------------------------- Further information Any queries should be addressed to the tutorial co-chairs (Jennifer Hackett and Leonidas Lampropoulos), via email to icfp-workshops-2020 at googlegroups.com From mechvel at scico.botik.ru Sat Jun 20 11:57:21 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 20 Jun 2020 12:57:21 +0300 Subject: [Agda] "not in scope" without "does not export" Message-ID: <4f44b9f4c19398b437ba77ce70985d4f@scico.botik.ru> Dear Agda developers, For the below program (not self-contained, non-standard records for algebra) Agda 2.6.1 reports "Not in scope: Foo ". May be, it rather needs to report "The module OfCommutativeMonoid does not export commutativeSemigroup" ? (the word `public' is missed in the code). module OfCommutativeMonoid (CM : CommutativeMonoid) where open CommutativeMonoid CM using (commutativeSemigroup) module OfSemiring (R : Semiring) where open Semiring R using (+-commutativeMonoid) module OfCommutativeSemiring (R : CommutativeSemiring) where open CommutativeSemiring R using (*-commutativeMonoid) open OfCommutativeMonoid *-commutativeMonoid using () renaming (commutativeSemigroup to Foo) debug : CommutativeSemigroup debug = Foo Regards, ------ Sergei From mechvel at scico.botik.ru Sat Jun 20 13:37:02 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 20 Jun 2020 14:37:02 +0300 Subject: [Agda] "Cannot resolve" vs "Multiple definition" Message-ID: <61541ef2861d8184a1c74c49759a0439@scico.botik.ru> Dear Agda developers, When the same item foo is brought to the scope from different places, Agda-2.6.1 reports something like "Multiple definition of foo ...". But sometimes it reports "Cannot resolve overloaded projection foo because principal argument is not of record type ... ". The source of the error looks the same, but the reports are very different. The former looks more helpful. Example: record Semiring : Set _ where ... open Monoid *-monoid public using () renaming (assoc to *-assoc; ...) module OfRing (R : Ring) where open Ring R using (*-assoc; ...) ... -x*y x y = begin? setoid ? (- x) * y ?? *-cong? (sym (-1* x)) ? (-1# * x) * y ?? *-assoc -1# x y ? -1# * (x * y) ?? -1* _ ? - (x * y) ? "Cannot resolve overloaded projection *-assoc because principal argument is not of record type when checking that the expression *-assoc -1# x y has type -1# * x * y ? -1# * (x * y) " Needs this to be fixed? Thanks, ------ Sergei From mechvel at scico.botik.ru Mon Jun 22 13:23:12 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 22 Jun 2020 14:23:12 +0300 Subject: [Agda] "open" in record telescope Message-ID: <7b56420a3304254c0b4379cc552904e4@scico.botik.ru> People, I have record Foo (R : FooFooFoo-Record) (open FooFooFoo-Record R using (Carrier; _?_; 0#; Op) (op : Op) (op' : (x : Carrier) ? x ? 0# ? Carrier) : Set _ where field ... But Agda 2.6.1 does not allow `open' in the record telescope. It is possible to write this as record Foo (R : FooFooFoo-Record) (op : FooFooFoo-Record.Op R) (op' : (x : FooFoo-Record.Carrier R) ? FooFoo-Record._?_ x (FooFoo-Record.0# R) ? FooFoo-Record.Carrier R) : Set _ where field ... Can this be expressed in a nicer form? Thanks, ------ Sergei From claudio.sacerdoticoen at unibo.it Tue Jun 23 00:07:39 2020 From: claudio.sacerdoticoen at unibo.it (Claudio Sacerdoti Coen) Date: Mon, 22 Jun 2020 22:07:39 +0000 Subject: [Agda] LFMTP2020 Call for Participation Message-ID: <1e271a79fb520a5a1d0b62c88580436d049b826a.camel@unibo.it> ===================================== CALL FOR PARTICIPATION Logical Frameworks and Meta-Languages: Theory and Practice LFMTP 2020 On-line conference, ==> 29-30 June 2020 <== Affiliated with FSCD 2020 and IJCAR 2020. The 2020 editions of LFMTP will be held online and it will consists of - 8 regular talks - 2 invited talks by Elaine Pimentel and Andre Popescu Participation will be free, but a preregistration is required to join the video meetings of the events. Registration page ===================================== ABOUT LFMTP Logical frameworks and meta-languages form a common substrate for representing, implementing and reasoning about a wide variety of deductive systems of interest in logic and computer science. Their design, implementation and their use in reasoning tasks, ranging from the correctness of software to the properties of formal systems, have been the focus of considerable research over the last two decades. This workshop will bring together designers, implementors and practitioners to discuss various aspects impinging on the structure and utility of logical frameworks, including the treatment of variable binding, inductive and co-inductive reasoning techniques and the expressiveness and lucidity of the reasoning process. LFMTP 2020 will provide researchers a forum to present state-of-the-art techniques and discuss progress in areas such as the following: * Encoding and reasoning about the meta-theory of programming languages, process calculi and related formally specified systems. * Formalisation of model-theoretic and proof-theoretic semantics of logics. ABOUT LFMTP Logical frameworks and meta-languages form a common substrate for representing, implementing and reasoning about a wide variety of deductive systems of interest in logic and computer science. Their design, implementation and their use in reasoning tasks, ranging from the correctness of software to the properties of formal systems, have been the focus of considerable research over the last two decades. This workshop will bring together designers, implementors and practitioners to discuss various aspects impinging on the structure and utility of logical frameworks, including the treatment of variable binding, inductive and co-inductive reasoning techniques and the expressiveness and lucidity of the reasoning process. LFMTP 2020 will provide researchers a forum to present state-of-the-art techniques and discuss progress in areas such as the following: * Encoding and reasoning about the meta-theory of programming languages, process calculi and related formally specified systems. * Formalisation of model-theoretic and proof-theoretic semantics of logics. * Applications of logical frameworks: proof-carrying architectures, proof exchange and transformation, program refactoring, etc. * Techniques for programming with binders in functional programming languages such as Haskell, OCaml or Agda, and logic programming languages such as lambda Prolog or Alpha-Prolog. * Design and implementation of systems and tools related to meta-languages and logical frameworks PROGRAM COMMITTEE David Baelde, LSV, ENS Paris-Saclay & Inria Paris Fr?d?ric Blanqui, INRIA Alberto Ciaffaglione, University of Udine Dennis M?ller, Friedrich-Alexander-University Erlangen-N?rnberg Michael Norrish, Data61 Carlos Olarte, Universidade Federal do Rio Grande do Norde Claudio Sacerdoti Coen, University of Bologna (PC Co-Chair) Ulrich Sch?pp, fortiss GmbH Alwen Tiu, Australian National University (PC Co-Chair) Tjark Weber, Uppsala University -- Prof. Claudio Sacerdoti Coen Department of Computer Science and Engineering University of Bologna -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Tue Jun 23 16:41:46 2020 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Tue, 23 Jun 2020 16:41:46 +0200 Subject: [Agda] "not in scope" without "does not export" In-Reply-To: <4f44b9f4c19398b437ba77ce70985d4f@scico.botik.ru> References: <4f44b9f4c19398b437ba77ce70985d4f@scico.botik.ru> Message-ID: <8b72a9ba-c48a-90f3-f2e7-60319c4b41af@ifi.lmu.de> Thanks, this is a regression, see: https://github.com/agda/agda/issues/4773 Should be fixed in Agda 2.6.2. On 2020-06-20 11:57, mechvel at scico.botik.ru wrote: > Dear Agda developers, > > For the below program > (not self-contained, non-standard records for algebra) > > Agda 2.6.1 reports > "Not in scope: > ? Foo > ". > > May be, it rather needs to report > "The module OfCommutativeMonoid? does not export commutativeSemigroup" > ? > (the word `public' is missed in the code). > > > module OfCommutativeMonoid (CM : CommutativeMonoid) where > ? open CommutativeMonoid CM using (commutativeSemigroup) > > module OfSemiring (R : Semiring) where > ? open Semiring R using (+-commutativeMonoid) > > module OfCommutativeSemiring (R : CommutativeSemiring) > ? where > ? open CommutativeSemiring R using (*-commutativeMonoid) > ? open OfCommutativeMonoid *-commutativeMonoid using () > ?????????????????????????? renaming (commutativeSemigroup to Foo) > > ? debug : CommutativeSemigroup > ? debug = Foo > > > Regards, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From bob.atkey at gmail.com Tue Jun 23 16:53:22 2020 From: bob.atkey at gmail.com (Bob Atkey) Date: Tue, 23 Jun 2020 15:53:22 +0100 Subject: [Agda] Defining equality in Prop Message-ID: Hello, I've been experimenting with using the rewrite rules in Agda to implement a simple axiomatisation of parametricity that I've proved sound in the reflexive graph model. Here is my current development: https://gist.github.com/bobatkey/7861009f7d28d568eec8f8c32dd07b28 For the soundness of the axiomatisation, it is important that the relational interpretations of small types are proof irrelevant. I am using the Prop sort to do this. However, the most common relations are variants on equality. One can define an equality type in Prop, however, as the documentation for Prop points out, this is nearly useless because one cannot eliminate the equality into Set to prove subst, transport, etc. Coming from Coq, I would have thought that eliminating a single constructor data type like equality into Set ought to be safe, even if it is defined in Prop. Is there some deep reason why this is not possible in Agda, or is it just that it has not been implemented? Thanks, Bob From puttamalac at gmail.com Tue Jun 23 17:23:52 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Tue, 23 Jun 2020 17:23:52 +0200 Subject: [Agda] Defining equality in Prop In-Reply-To: References: Message-ID: Hi, The Prop in Agda is meant to be compatible with univalence. An identity type in Prop which eliminates into Set is not compatible with that. For this and other reasons, the conditions for eliminating into Set are more complicated than just having a single constructor. See the paper: https://dl.acm.org/doi/pdf/10.1145/3290316 You can still postulate the identity type which you want, and use rewrite rules to define elimination. I believe that this is consistent, because such an identity type is justified e.g. by the setoid model. I've personally used this identity type a few times. Bob Atkey ezt ?rta (id?pont: 2020. j?n. 23., K, 16:55): > Hello, > > I've been experimenting with using the rewrite rules in Agda to > implement a simple axiomatisation of parametricity that I've proved > sound in the reflexive graph model. Here is my current development: > > https://gist.github.com/bobatkey/7861009f7d28d568eec8f8c32dd07b28 > > For the soundness of the axiomatisation, it is important that the > relational interpretations of small types are proof irrelevant. I am > using the Prop sort to do this. > > However, the most common relations are variants on equality. One can > define an equality type in Prop, however, as the documentation for Prop > points out, this is nearly useless because one cannot eliminate the > equality into Set to prove subst, transport, etc. > > Coming from Coq, I would have thought that eliminating a single > constructor data type like equality into Set ought to be safe, even if > it is defined in Prop. Is there some deep reason why this is not > possible in Agda, or is it just that it has not been implemented? > > Thanks, > > Bob > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amp12 at cam.ac.uk Tue Jun 23 17:47:37 2020 From: amp12 at cam.ac.uk (Andrew M. Pitts) Date: Tue, 23 Jun 2020 15:47:37 +0000 Subject: [Agda] Defining equality in Prop In-Reply-To: References: Message-ID: > On 23 Jun 2020, at 15:53, Bob Atkey wrote: > > Hello, > > I've been experimenting with using the rewrite rules in Agda to implement a simple axiomatisation of parametricity that I've proved sound in the reflexive graph model. Here is my current development: > > https://gist.github.com/bobatkey/7861009f7d28d568eec8f8c32dd07b28 > > For the soundness of the axiomatisation, it is important that the relational interpretations of small types are proof irrelevant. I am using the Prop sort to do this. > > However, the most common relations are variants on equality. One can define an equality type in Prop, however, as the documentation for Prop points out, this is nearly useless because one cannot eliminate the equality into Set to prove subst, transport, etc. > > Coming from Coq, I would have thought that eliminating a single constructor data type like equality into Set ought to be safe, even if it is defined in Prop. Is there some deep reason why this is not possible in Agda, or is it just that it has not been implemented? I have found the proof irrelevant Prop in recent versions of Agda to be very useful indeed in the context of type theory with uniqueness of identity proofs (Axiom K) and heterogeneous Prop-valued equality, so long as one postulates the Axiom of Unique Choice (A!C), enabling one to soundly escape from Prop to Set, if you see what I mean. The attached example file contains a formulation of A!C and the definite descriptions it enables, towards the end. Andy -------------- next part -------------- A non-text attachment was scrubbed... Name: PropLogic.agda Type: application/octet-stream Size: 4206 bytes Desc: PropLogic.agda URL: From sattler.christian at gmail.com Tue Jun 23 21:17:18 2020 From: sattler.christian at gmail.com (Christian Sattler) Date: Tue, 23 Jun 2020 21:17:18 +0200 Subject: [Agda] Defining equality in Prop In-Reply-To: References: Message-ID: On Tue, 23 Jun 2020 at 17:47, Andrew M. Pitts wrote: > I have found the proof irrelevant Prop in recent versions of Agda to be > very useful indeed in the context of type theory with uniqueness of > identity proofs (Axiom K) and heterogeneous Prop-valued equality, so long > as one postulates the Axiom of Unique Choice (A!C), enabling one to soundly > escape from Prop to Set, if you see what I mean. The attached example file > contains a formulation of A!C and the definite descriptions it enables, > towards the end. > > Andy > Relatedly, I have found it useful even in settings without K (but usually with function extensionality) to postulate that the canonical map from strict Prop to hProp (the universe of homotopy propositions, defined using the standard identity type) is an equivalence (of h-preorders). It unfolds to mean that the map A ? ? A reverses for any h-prop A. Under K, this should be equivalent to Andrew's postulate. This is justified by any model with extensional equality as well as (classically) the simplicial set model. However, in constructive models of homotopy type theory, the usual exact completion problems form an obstacle to this axiom. Best wishes, Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: From benedikt.ahrens at gmail.com Thu Jun 25 19:56:14 2020 From: benedikt.ahrens at gmail.com (Benedikt Ahrens) Date: Thu, 25 Jun 2020 18:56:14 +0100 Subject: [Agda] Call for Participation: HoTT/UF 2020 - July 5-7 Message-ID: CALL FOR PARTICIPATION Workshop on Homotopy Type Theory and Univalent Foundations July 5-7, 2020, The Internet https://hott-uf.github.io/2020 Homotopy Type Theory is a young area of logic, combining ideas from several established fields: the use of dependent type theory as a foundation for mathematics, inspired by ideas and tools from abstract homotopy theory. Univalent Foundations are foundations of mathematics based on the homotopical interpretation of type theory. The goal of this workshop is to bring together researchers interested in all aspects of Homotopy Type Theory and Univalent Foundations: from the study of syntax and semantics of type theory to practical formalization in proof assistants based on univalent type theory. # Registration Registration is free of charge, but required. The details can be found on the event website. # Invited talks * Carlo Angiuli (Carnegie Mellon University) From raw terms to recollement * Liron Cohen (Ben-Gurion University) Building Effectful Realizability Models, Uniformly * Pierre-Louis Curien (Universit? de Paris) A syntactic approach to opetopes, opetopic sets and opetopic categories # Contributed talks 21 talks were accepted by the Program Committee. Their titles and abstracts are available on the event website. # Schedule The event will take place from July 5-7, 2020. The talks are scheduled between 2 PM and 7:30 PM CEST (UTC+2). Detailed schedule is now available on the website. # Organizers * Benedikt Ahrens (University of Birmingham) * Chris Kapulkin (University of Western Ontario) From paba at itu.dk Sun Jun 28 10:29:23 2020 From: paba at itu.dk (Patrick Bahr) Date: Sun, 28 Jun 2020 08:29:23 +0000 Subject: [Agda] TERMGRAPH 2020: Call for (Online) Participation Message-ID: ======================================================================= Call for (Online) Participation TERMGRAPH 2020 Eleventh International Workshop on Computing with Terms and Graphs 5 July, 2020 termgraph.org.uk/2020 An FSCD 2020 Workshop ======================================================================= The 2020 edition of TERMGRAPH will be held online. Participation will be free, but registration is required to join the video meetings of the events. https://fscd-ijcar-2020.org/register ======================================================================= Programme --------- Dan Ghica Hypernet Semantics of Programming Languages (invited talk) Graham Campbell Parallel Hyperedge Replacement String Languages Clemens Grabmayer Structure-Constrained Process Graphs for the Process Semantics of Regular Expressions Nicolas Behr An Introduction to Stochastic Mechanics for Categorical Rewriting Systems (invited talk) Thierry Boy de La Tour Parallel Independence in Attributed Graph Rewriting From brunocdsoliveira at googlemail.com Mon Jun 29 16:07:54 2020 From: brunocdsoliveira at googlemail.com (Bruno Oliveira) Date: Mon, 29 Jun 2020 22:07:54 +0800 Subject: [Agda] Final Call for Papers: APLAS 2020 (deadline on the 6th of July) Message-ID: [Please accept our apologies if you receive multiple copies of this call] This is the last call for papers for APLAS 2020. The registration deadline is on the 3rd of July, and we added a few more days to the submission deadline, which is now on the 6th of July. CALL FOR PAPERS 18th Asian Symposium on Programming Languages and Systems (APLAS 2020) Nov 29-Dec 3, 2020 Fukuoka, Japan https://conf.researchr.org/home/aplas-2020 The 18th Asian Symposium on Programming Languages and Systems (APLAS 2020) aims to stimulate programming language research by providing a forum for the presentation of the latest results and the exchange of ideas in programming languages and systems. APLAS is based in Asia but is an international forum that serves the worldwide programming languages community. APLAS 2020 will be tentatively held in Nishijin Plaza, Fukuoka City, Japan between November 30th and 2rd of December 2020. Due to the COVID-19 situation, all authors will be given the chance to present remotely regardless of whether the conference is held as a physical, virtual, or hybrid physical/virtual meeting. Papers are solicited on topics such as: - Semantics, logics, foundational theory - Design of languages, type systems, and foundational calculi - Domain-specific languages - Compilers, interpreters, abstract machines - Program derivation, synthesis, and transformation - Program analysis, verification, model-checking - Logic, constraint, probabilistic, and quantum programming - Software security - Concurrency and parallelism - Tools and environments for programming and implementation Topics are not limited to those discussed in previous symposiums. Papers identifying future directions of programming and those addressing the rapid changes of the underlying computing platforms are especially welcome. Demonstration of systems and tools in the scope of APLAS are welcome to the System and Tool demonstrations category. Authors concerned about the appropriateness of a topic are welcome to consult with program chair prior to submission. IMPORTANT DATES Abstract deadline: July 3rd, 2020 (anywhere on Earth) Submission deadline: July 6th, 2020 (anywhere on Earth) Author response: August 5-7, 2020 Author notification: August 14, 2020 Final version: September 1, 2020 Conference: November 30 - December 2, 2020 CALL FOR REGULAR RESEARCH PAPERS We solicit submissions in the form of regular research papers describing original scientific research results, including system development and case studies. Regular research papers should not exceed 18 pages in the Springer LNCS format, including bibliography and figures. This category encompasses both theoretical and implementation (also known as system descriptions) papers. In either case, submissions should clearly identify what has been accomplished and why it is significant. Submissions will be judged on the basis of significance, relevance, correctness, originality, and clarity. System descriptions papers should contain a link to a working system and will be judged on originality, usefulness, and design. In case of lack of space, proofs, experimental results, or any information supporting the technical results of the paper could be provided as an appendix or a link to a web page, but reviewers are not obliged to read them. CALL FOR TOOL PAPERS We solicit submissions in the form of tool papers describing a demonstration of a tool or a system that support theory, program construction, reasoning, or program execution in the scope of APLAS. The main purpose of a tool paper is to display a completed, robust and well-documented tool-highlighting the overall functionality of the tool, the interfaces of the tool, interesting examples and applications of the tool, an assessment of the tool?s strengths and weaknesses, and a summary of documentation/support available with the tool. Authors of tool demonstration proposals are expected to present a live demonstration of the tool at the conference. It is highly desirable that the tools are available on the web. System and Tool papers should not exceed 8 pages in the Springer LNCS format, including bibliography and figures. They may include an additional appendix of up to 6 extra pages giving the outline, screenshots, examples, etc. to indicate the content of the proposed live demo. PROGRAM COMMITTEE Edwin Brady, University of St. Andrews, UK Soham Chakraborty, IIT Delhi, India Andreea Costea, National University Of Singapore, Singapore Silvia Crafa, University of Padova, Italy Pierre-Evariste Dagand, LIP6/CNRS, France Mila Dalla Preda, University of Verona, Italy Cristina David, University of Oxford, UK Benjamin Delaware, Purdue University, US Florian Rabe, University of Erlangen, Germany Jeremy Gibbons, University of Oxford, UK Ichiro Hasuo, National Institute of Informatics, Japan Sam Lindley, The University of Edinburgh, UK James McKinna, The University of Edinburgh, UK Madhavan Mukund, Chennai Mathematical Institute, India Hakjoo Oh, Korea University, South Korea Sukyoung Ryu, KAIST, South Korea Tom Schrijvers, KU Leuven, Belgium Ilya Sergey, Yale-NUS College and National University of Singapore, Singapore Marco Servetto, Victoria University Wellington, New Zealand Wouter Swierstra, Utrecht University, Netherlands Alwen Tiu, The Australian National University, Australia Sam Tobin-Hochstadt, Indiana University, US Janis Voigtl?nder, University of Duisburg-Essen, Germany Meng Wang, University of Bristol, UK Nicolas Wu, Imperial College London, UK Yizhou Zhang, Harvard University / University of Waterloo, US Tijs van der Storm, CWI & University of Groningen, Netherlands Shigeru Chiba, The University of Tokyo, Japan SUBMISSION INFORMATION Papers should be submitted electronically via the submission web page using HotCRP (https://aplas2020.hotcrp.com). The acceptable format is PDF. Submitted papers must be unpublished and not submitted for publication elsewhere. Papers must be written in English. The proceedings will be published as a volume in Springer?s LNCS series. Accepted papers must be presented at the conference. REVIEW PROCESS APLAS 2020 will use a lightweight double-blind reviewing process. Following this process means that reviewers will not see the authors? names or affiliations as they initially review a paper. The authors? names will then be revealed to the reviewers only once their reviews have been submitted. To facilitate this process, submitted papers must adhere to the following: Author names and institutions must be omitted and References to the authors? own related work should be in the third person (e.g., not ?We build on our previous work ?? but rather ?We build on the work of ??). The purpose of this process is to help the reviewers come to an initial judgement about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission, makes the job of reviewing the paper more difficult, or interferes with the process of disseminating new ideas. For example, important background references should not be omitted or anonymised, even if they are written by the same authors and share common ideas, techniques, or infrastructure. Authors should feel free to disseminate their ideas or draft versions of their paper as they normally would. For instance, authors may post drafts of their papers on the web or give talks on their research ideas. AUTHOR RESPONSE PERIOD During the author response period, authors will be able to read reviews and respond to them as appropriate. RESEARCH INTEGRITY The Program Committee reserves the right, up until the time of publication, to reverse a decision of paper acceptance. Reversal is possible if fatal flaws are discovered in the paper, or research integrity is found to have been seriously breached. ABOUT Fukuoka City Fukuoka is a compact city. It only takes 10 minutes by subway from the airport to the city center. It takes 10 minutes by subway from the city center to Nishijin Station. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jinwoo68 at gmail.com Fri Jul 3 21:57:08 2020 From: jinwoo68 at gmail.com (Jinwoo Lee) Date: Fri, 3 Jul 2020 12:57:08 -0700 Subject: [Agda] Why is this non-terminating? Message-ID: I have a function that I believe terminates but Agda disagrees. hasDoubleLetter : List Char ? Bool hasDoubleLetter [] = false hasDoubleLetter (c? ? cs@(c? ? _)) with c? == c? ... | yes _ = true ... | no _ = hasDoubleLetter cs -- This is problematic. hasDoubleLetter (_ ? []) = false Because `hasDoubleLetter` is recursively applied to a "smaller" structure (cs), I think it should be considered terminating. Am I missing something? FWIW the error message is like below. Termination checking failed for the following functions: hasDoubleLetter Problematic calls: hasDoubleLetter (c? ? c? ? xs) | (EqChar Eq.== c?) c? hasDoubleLetter (c? ? xs) -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Fri Jul 3 22:07:32 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Fri, 3 Jul 2020 21:07:32 +0100 Subject: [Agda] Why is this non-terminating? In-Reply-To: References: Message-ID: <1149a07d-962d-8468-ac29-c10584a61025@strath.ac.uk> Hi Jinwoo, It looks fine to me, so this is probably some sort of bug / lack of feature. Some easy things to test would be: 1. Remove the @-pattern, so the pattern is `(c? ? c? ? cs)`, and the recursive call is on `c? ? cs`. 2. Remove the `with`, and instead find a way to go via `if_then_else_`. Best, James On 03/07/2020 20:57, Jinwoo Lee wrote: > I have a function that I believe terminates but Agda disagrees. > > hasDoubleLetter : List Char ? Bool > hasDoubleLetter [] = false > hasDoubleLetter (c? ? cs@(c? ? _)) with c? == c? > ... | yes _ = true > ... | no ?_ = hasDoubleLetter cs??? -- This is problematic. > hasDoubleLetter (_ ? []) = false > > Because `hasDoubleLetter` is recursively applied to a "smaller" > structure (cs), I think it should be considered terminating. Am I > missing something? > > FWIW the error message is like below. > > Termination checking failed for the following functions: > ? hasDoubleLetter > Problematic calls: > ? hasDoubleLetter (c? ? c? ? xs) | (EqChar Eq.== c?) c? > ? hasDoubleLetter (c? ? xs) > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From jinwoo68 at gmail.com Fri Jul 3 22:15:09 2020 From: jinwoo68 at gmail.com (Jinwoo Lee) Date: Fri, 3 Jul 2020 13:15:09 -0700 Subject: [Agda] Why is this non-terminating? In-Reply-To: <1149a07d-962d-8468-ac29-c10584a61025@strath.ac.uk> References: <1149a07d-962d-8468-ac29-c10584a61025@strath.ac.uk> Message-ID: Thanks, James. Removing the @-pattern didn't affect anything. But replacing `with` with `if_then_else_` fixes it. Seems like a compiler bug. Cheers On Fri, Jul 3, 2020 at 1:07 PM James Wood wrote: > Hi Jinwoo, > > It looks fine to me, so this is probably some sort of bug / lack of > feature. Some easy things to test would be: > > 1. Remove the @-pattern, so the pattern is `(c? ? c? ? cs)`, and the > recursive call is on `c? ? cs`. > 2. Remove the `with`, and instead find a way to go via `if_then_else_`. > > Best, > James > > On 03/07/2020 20:57, Jinwoo Lee wrote: > > I have a function that I believe terminates but Agda disagrees. > > > > hasDoubleLetter : List Char ? Bool > > hasDoubleLetter [] = false > > hasDoubleLetter (c? ? cs@(c? ? _)) with c? == c? > > ... | yes _ = true > > ... | no _ = hasDoubleLetter cs -- This is problematic. > > hasDoubleLetter (_ ? []) = false > > > > Because `hasDoubleLetter` is recursively applied to a "smaller" > > structure (cs), I think it should be considered terminating. Am I > > missing something? > > > > FWIW the error message is like below. > > > > Termination checking failed for the following functions: > > hasDoubleLetter > > Problematic calls: > > hasDoubleLetter (c? ? c? ? xs) | (EqChar Eq.== c?) c? > > hasDoubleLetter (c? ? xs) > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Fri Jul 3 22:22:34 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Fri, 3 Jul 2020 21:22:34 +0100 Subject: [Agda] Why is this non-terminating? In-Reply-To: References: <1149a07d-962d-8468-ac29-c10584a61025@strath.ac.uk> Message-ID: Okay, then probably this is the relevant issue: https://github.com/agda/agda/issues/59 . I know there have been a lot of changes to termination checking involving `with`, because it seems very hard to do it right. James On 03/07/2020 21:15, Jinwoo Lee wrote: > Thanks, James. Removing the @-pattern didn't affect anything. But > replacing `with` with `if_then_else_` fixes it. Seems like a compiler bug. > > Cheers > > > On Fri, Jul 3, 2020 at 1:07 PM James Wood > wrote: > > Hi Jinwoo, > > It looks fine to me, so this is probably some sort of bug / lack of > feature. Some easy things to test would be: > > 1. Remove the @-pattern, so the pattern is `(c? ? c? ? cs)`, and the > recursive call is on `c? ? cs`. > 2. Remove the `with`, and instead find a way to go via `if_then_else_`. > > Best, > James > > On 03/07/2020 20:57, Jinwoo Lee wrote: > > I have a function that I believe terminates but Agda disagrees. > > > > hasDoubleLetter : List Char ? Bool > > hasDoubleLetter [] = false > > hasDoubleLetter (c? ? cs@(c? ? _)) with c? == c? > > ... | yes _ = true > > ... | no ?_ = hasDoubleLetter cs??? -- This is problematic. > > hasDoubleLetter (_ ? []) = false > > > > Because `hasDoubleLetter` is recursively applied to a "smaller" > > structure (cs), I think it should be considered terminating. Am I > > missing something? > > > > FWIW the error message is like below. > > > > Termination checking failed for the following functions: > > ? hasDoubleLetter > > Problematic calls: > > ? hasDoubleLetter (c? ? c? ? xs) | (EqChar Eq.== c?) c? > > ? hasDoubleLetter (c? ? xs) > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > From jinwoo68 at gmail.com Fri Jul 3 22:28:16 2020 From: jinwoo68 at gmail.com (Jinwoo Lee) Date: Fri, 3 Jul 2020 13:28:16 -0700 Subject: [Agda] Why is this non-terminating? In-Reply-To: References: <1149a07d-962d-8468-ac29-c10584a61025@strath.ac.uk> Message-ID: Great. Thank you for the pointer, James. On Fri, Jul 3, 2020 at 1:22 PM James Wood wrote: > > Okay, then probably this is the relevant issue: > https://github.com/agda/agda/issues/59 . > I know there have been a lot of changes to termination checking > involving `with`, because it seems very hard to do it right. > > James From joey.eremondi at gmail.com Sun Jul 5 01:14:45 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Sat, 4 Jul 2020 16:14:45 -0700 Subject: [Agda] Moving Prop under Quantifiers? Message-ID: I have a type f Brouwer ordinals Ord, where one of the constructors is (lim : (Nat -> Ord) -> Ord). I've got an ordering on ordinals, where one of the constructors is (lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> f a < o) -> lim f < o). I'm using the ordinals to bound the size of data structures, but I want the bounds to be irrelevant, so I've been using Squash: Set -> Prop (as defined in the Prop docs) to define an irrelevant version of this. The problem is, when I'm producing proofs of (Squash (o1 < o2)), I can't figure out a way to use the lim< constructor. Basically, I'm wondering, given the lim constructor above, (squash : A -> Squash a), and squash-elim : (A : Set) (P : Prop) -> (A -> P) -> Squash A -> P, if there's any way to write the following function: p-lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> Squash (f a < o)) -> Squash (lim f < o)) That is, if I have a function that produces the necessary "squashed" proof for each Nat, is there a way I can move the entire function into Prop. In principle, what I'm doing doesn't go against Prop, i.e. I'm only matching on Prop values when I'm producing a *final* value in Prop. But the intermediate steps leave Prop, which is what is causing problems. Is this just a limitation of Prop? Is the old dotted-irrelevance any different? Or is there some way to do this that I'm not seeing? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolai.kraus at gmail.com Sun Jul 5 03:27:46 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Sun, 5 Jul 2020 02:27:46 +0100 Subject: [Agda] Moving Prop under Quantifiers? In-Reply-To: References: Message-ID: Hi Joey, it sounds like you want to do something that requires countable choice. See the HoTT book, Chapter 11.3 for a discussion on this (https://homotopytypetheory.org/book/). The HoTT-style solution to this problem is to squash (_<_) already in its definition, not afterwords. I know that this works with hProp (a type that you can define yourself), I don't know whether current Agda can do this with Prop, but I won't be surprised if it can :-) Nicolai On 05/07/2020 00:14, Joey Eremondi wrote: > I have a type f Brouwer ordinals Ord, where one of the constructors is > (lim : (Nat -> Ord) -> Ord). I've got an ordering on ordinals, where > one of the constructors is > (lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> f a < o) -> lim f > < o). > > I'm using the ordinals to bound the size of data structures, but I > want the bounds to be irrelevant, so I've been using Squash: Set -> > Prop (as defined in the Prop docs) to define an irrelevant version of > this. The problem is, when I'm producing proofs of (Squash (o1 < o2)), > I can't figure out a way to use the lim< constructor. > > Basically, I'm wondering, given the lim constructor above, (squash : A > -> Squash a), and squash-elim : (A : Set) (P : Prop) -> (A -> P) -> > Squash A -> P, if there's any way to write the following function: > p-lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> Squash (f a < o)) > -> Squash (lim f < o)) > > That is, if I have a function that produces the necessary "squashed" > proof for each Nat, is there a way I can move the entire function into > Prop. In principle, what I'm doing doesn't go against Prop, i.e. I'm > only matching on Prop values when I'm producing a *final* value in > Prop. But the intermediate steps leave Prop, which is what is causing > problems. > > Is this just a limitation of Prop? Is the old dotted-irrelevance any > different? Or is there some way to do this that I'm not seeing? > > Thanks! > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.brunerie at gmail.com Sun Jul 5 09:16:15 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Sun, 5 Jul 2020 09:16:15 +0200 Subject: [Agda] Moving Prop under Quantifiers? In-Reply-To: References: Message-ID: As Nicolai says, you can squash _<_ already in its definition, and it is very easy to do in Agda. Simply replace the line data _<_ : Ord -> Ord -> Set where by data _<_ : Ord -> Ord -> Prop where and your ordering will be in Prop and the lim< constructor will work as expected. No need for "Squash" at all. Best, Guillaume Den s?n 5 juli 2020 kl 03:27 skrev Nicolai Kraus : > > Hi Joey, > it sounds like you want to do something that requires countable choice. See the HoTT book, Chapter 11.3 for a discussion on this (https://homotopytypetheory.org/book/). > The HoTT-style solution to this problem is to squash (_<_) already in its definition, not afterwords. I know that this works with hProp (a type that you can define yourself), I don't know whether current Agda can do this with Prop, but I won't be surprised if it can :-) > Nicolai > > On 05/07/2020 00:14, Joey Eremondi wrote: > > I have a type f Brouwer ordinals Ord, where one of the constructors is (lim : (Nat -> Ord) -> Ord). I've got an ordering on ordinals, where one of the constructors is > (lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> f a < o) -> lim f < o). > > I'm using the ordinals to bound the size of data structures, but I want the bounds to be irrelevant, so I've been using Squash: Set -> Prop (as defined in the Prop docs) to define an irrelevant version of this. The problem is, when I'm producing proofs of (Squash (o1 < o2)), I can't figure out a way to use the lim< constructor. > > Basically, I'm wondering, given the lim constructor above, (squash : A -> Squash a), and squash-elim : (A : Set) (P : Prop) -> (A -> P) -> Squash A -> P, if there's any way to write the following function: > p-lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> Squash (f a < o)) -> Squash (lim f < o)) > > That is, if I have a function that produces the necessary "squashed" proof for each Nat, is there a way I can move the entire function into Prop. In principle, what I'm doing doesn't go against Prop, i.e. I'm only matching on Prop values when I'm producing a *final* value in Prop. But the intermediate steps leave Prop, which is what is causing problems. > > Is this just a limitation of Prop? Is the old dotted-irrelevance any different? Or is there some way to do this that I'm not seeing? > > Thanks! > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From claudio.sacerdoticoen at unibo.it Sun Jul 5 17:55:03 2020 From: claudio.sacerdoticoen at unibo.it (Claudio Sacerdoti Coen) Date: Sun, 5 Jul 2020 15:55:03 +0000 Subject: [Agda] WFLP 2020: Deadline Extension Message-ID: <79a651730702314bdff8b29ff175166fb26fc6e5.camel@unibo.it> WFLP 2020: Deadline Extension ============================= 28th International Workshop on Functional and (Constraint) Logic Programming ## Due to the coronavirus pandemic, the workshop will be organized by ## ## the University of Bologna, but it will be held entirely on-line. ## Bologna, Italy, September 7th, 2020 (part of Bologna Federated Conference on Programming Languages 2020; co-located with PPDP, LOPSTR, Microservices) Important Dates Paper Registration: July, 13th <== extended Submission: July, 20th <== extended Notification of Authors: August, 03rd Camera-ready Papers: August, 24th Conference & Workshops: September 7th, 2020 WFLP 2020 The international Workshop on Functional and (constraint) Logic Programming (WFLP) aims at bringing together researchers, students, and practitioners interested in functional programming, logic programming, and their integration. WFLP has a reputation for being a lively and friendly forum, and it is open for presenting and discussing work in progress, technical contributions, experience reports, experiments, reviews, and system descriptions. The 28th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2020) will be organized by the University of Bologna, Italy, as part of Bologna Federated Conference on Programming Languages 2020 and it will be held entirely on-line due to the coronavirus pandemic. Previous WFLP editions were WFLP 2019 (Cottbus, Germany), WFLP 2018 (Frankfurt am Main, Germany), WFLP 2017 (W?rzburg, Germany), WFLP 2016 (Leipzig, Germany), WFLP 2014 (Wittenberg, Germany), WFLP 2013 (Kiel, Germany), WFLP 2012 (Nagoya, Japan), WFLP 2011 (Odense, Denmark), WFLP 2010 (Madrid, Spain), WFLP 2009 (Brasilia, Brazil), WFLP 2008 (Siena, Italy), WFLP 2007 (Paris, France), WFLP 2006 (Madrid, Spain), WCFLP 2005 (Tallinn, Estonia), WFLP 2004 (Aachen, Germany), WFLP 2003 (Valencia, Spain), WFLP 2002 (Grado, Italy), WFLP 2001 (Kiel, Germany), WFLP 2000 (Benicassim, Spain), WFLP'99 (Grenoble, France), WFLP'98 (Bad Honnef, Germany), WFLP'97 (Schwarzenberg, Germany), WFLP'96 (Marburg, Germany), WFLP'95 (Schwarzenberg, Germany), WFLP'94 (Schwarzenberg, Germany), WFLP'93 (Rattenberg, Germany), and WFLP'92 (Karlsruhe, Germany). Topics The topics of interest cover all aspects of functional and logic programming. They include (but are not limited to): * Functional programming * Logic programming * Constraint programming * Deductive databases, data mining * Extensions of declarative languages, objects * Multi-paradigm declarative programming * Foundations, semantics, non-monotonic reasoning, dynamics * Parallelism, concurrency * Program analysis, abstract interpretation * Program and model manipulation * Program transformation, partial evaluation, meta-programming * Specification, * Verification * Debugging * Testing * Knowledge representation, machine learning * Interaction of declarative programming with other formalisms * Implementation of declarative languages * Advanced programming environments and tools * Software techniques for declarative programming * Applications The primary focus is on new and original research results, but submissions describing innovative products, prototypes under development, application systems, or interesting experiments (e.g., benchmarks) are also encouraged. Survey papers that present some aspects of the above topics from a new perspective, and experience reports are also welcome. Papers must be written and presented in English. Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Submission Guidelines Submission is via Easychair submission website for WFLP 2020: https://easychair.org/conferences/?conf=wflp2020 Authors are invited to submit papers in the following categories: + Regular research paper + Work-in-progress report + System description Regular research papers must describe original work, be written and presented in English, and must not substantially overlap with papers that have been formally published or that are simultaneously submitted to a journal, conference, or workshop with formal proceedings. They will be judged on the basis of significance, relevance, correctness, originality, and clarity. For work-in-progress reports and system descriptions, less formal rules apply, and presentation-only submissions (talk and discussion, but no paper in the formal proceedings) are possible. Please contact the PC chair with any questions. All submissions must be formatted in the Lecture Notes in Computer Science style. Submissions cannot exceed 15 pages including references but excluding well-marked appendices not intended for publication. Reviewers are not required to read the appendices, and thus papers should be intelligible without them. However, all submissions (especially work-in-progress reports and system descriptions) may be considerably shorter than 15 pages. Proceedings All papers accepted for presentation at the conference will be published in informal proceedings publicly available at the Computing Research Repository. According to the program committee reviews, submissions can be directly accepted for publication in the formal post-conference proceedings. The formal post-conference proceedings will be published in both electronic and paper formats by Springer in the Lecture Notes in Computer Science series. After the conference, all authors accepted only for presentation will be invited to revise and/or extend their submissions in the light of the feedback solicited at the conference. Then, after another round of reviewing, these revised papers may also be published in the formal proceedings. Therefore, all accepted papers will be published in open-access, and the authors can also decide to publish their work in the Springer LNCS formal proceedings. Program Committee Sergio Antoy (Portland State University, USA) Demis Ballis (University of Udine, Italy) Moreno Falaschi (Universit? di Siena, Italy) Michael Hanus (University of Kiel, Germany) (Co-Chair) Herbert Kuchen (University of Muenster, Germany) Dale Miller (INRIA and LIX/?cole Polytechnique) Claudio Sacerdoti Coen (University of Bologna, Italy) (Co-Chair) Konstantinos Sagonas (Uppsala University, Sweden) Enrico Tassi (INRIA, France) Janis Voigtl?nder (University of Duisburg-Essen, Germany) Johannes Waldmann (HTWK Leipzig, Germany) Organizing Committee Claudio Sacerdoti Coen (University of Bologna, Italy) (Co-Chair) -- Prof. Claudio Sacerdoti Coen Department of Computer Science and Engineering University of Bologna -------------- next part -------------- An HTML attachment was scrubbed... URL: From claudio.sacerdoticoen at unibo.it Sun Jul 5 18:29:18 2020 From: claudio.sacerdoticoen at unibo.it (Claudio Sacerdoti Coen) Date: Sun, 5 Jul 2020 16:29:18 +0000 Subject: [Agda] WFLP 2020: Deadline Extension Message-ID: <316403f49b32320c53802b43190f058d9a8dfdfb.camel@unibo.it> WFLP 2020: Deadline Extension ============================= 28th International Workshop on Functional and (Constraint) Logic Programming ## Due to the coronavirus pandemic, the workshop will be organized by ## ## the University of Bologna, but it will be held entirely on-line. ## Bologna, Italy, September 7th, 2020 (part of Bologna Federated Conference on Programming Languages 2020; co-located with PPDP, LOPSTR, Microservices) Important Dates Paper Registration: July, 13th <== extended Submission: July, 20th <== extended Notification of Authors: August, 03rd Camera-ready Papers: August, 24th Conference & Workshops: September 7th, 2020 WFLP 2020 The international Workshop on Functional and (constraint) Logic Programming (WFLP) aims at bringing together researchers, students, and practitioners interested in functional programming, logic programming, and their integration. WFLP has a reputation for being a lively and friendly forum, and it is open for presenting and discussing work in progress, technical contributions, experience reports, experiments, reviews, and system descriptions. The 28th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2020) will be organized by the University of Bologna, Italy, as part of Bologna Federated Conference on Programming Languages 2020 and it will be held entirely on-line due to the coronavirus pandemic. Previous WFLP editions were WFLP 2019 (Cottbus, Germany), WFLP 2018 (Frankfurt am Main, Germany), WFLP 2017 (W?rzburg, Germany), WFLP 2016 (Leipzig, Germany), WFLP 2014 (Wittenberg, Germany), WFLP 2013 (Kiel, Germany), WFLP 2012 (Nagoya, Japan), WFLP 2011 (Odense, Denmark), WFLP 2010 (Madrid, Spain), WFLP 2009 (Brasilia, Brazil), WFLP 2008 (Siena, Italy), WFLP 2007 (Paris, France), WFLP 2006 (Madrid, Spain), WCFLP 2005 (Tallinn, Estonia), WFLP 2004 (Aachen, Germany), WFLP 2003 (Valencia, Spain), WFLP 2002 (Grado, Italy), WFLP 2001 (Kiel, Germany), WFLP 2000 (Benicassim, Spain), WFLP'99 (Grenoble, France), WFLP'98 (Bad Honnef, Germany), WFLP'97 (Schwarzenberg, Germany), WFLP'96 (Marburg, Germany), WFLP'95 (Schwarzenberg, Germany), WFLP'94 (Schwarzenberg, Germany), WFLP'93 (Rattenberg, Germany), and WFLP'92 (Karlsruhe, Germany). Topics The topics of interest cover all aspects of functional and logic programming. They include (but are not limited to): * Functional programming * Logic programming * Constraint programming * Deductive databases, data mining * Extensions of declarative languages, objects * Multi-paradigm declarative programming * Foundations, semantics, non-monotonic reasoning, dynamics * Parallelism, concurrency * Program analysis, abstract interpretation * Program and model manipulation * Program transformation, partial evaluation, meta-programming * Specification, * Verification * Debugging * Testing * Knowledge representation, machine learning * Interaction of declarative programming with other formalisms * Implementation of declarative languages * Advanced programming environments and tools * Software techniques for declarative programming * Applications The primary focus is on new and original research results, but submissions describing innovative products, prototypes under development, application systems, or interesting experiments (e.g., benchmarks) are also encouraged. Survey papers that present some aspects of the above topics from a new perspective, and experience reports are also welcome. Papers must be written and presented in English. Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Submission Guidelines Submission is via Easychair submission website for WFLP 2020: https://easychair.org/conferences/?conf=wflp2020 Authors are invited to submit papers in the following categories: + Regular research paper + Work-in-progress report + System description Regular research papers must describe original work, be written and presented in English, and must not substantially overlap with papers that have been formally published or that are simultaneously submitted to a journal, conference, or workshop with formal proceedings. They will be judged on the basis of significance, relevance, correctness, originality, and clarity. For work-in-progress reports and system descriptions, less formal rules apply, and presentation-only submissions (talk and discussion, but no paper in the formal proceedings) are possible. Please contact the PC chair with any questions. All submissions must be formatted in the Lecture Notes in Computer Science style. Submissions cannot exceed 15 pages including references but excluding well-marked appendices not intended for publication. Reviewers are not required to read the appendices, and thus papers should be intelligible without them. However, all submissions (especially work-in-progress reports and system descriptions) may be considerably shorter than 15 pages. Proceedings All papers accepted for presentation at the conference will be published in informal proceedings publicly available at the Computing Research Repository. According to the program committee reviews, submissions can be directly accepted for publication in the formal post-conference proceedings. The formal post-conference proceedings will be published in both electronic and paper formats by Springer in the Lecture Notes in Computer Science series. After the conference, all authors accepted only for presentation will be invited to revise and/or extend their submissions in the light of the feedback solicited at the conference. Then, after another round of reviewing, these revised papers may also be published in the formal proceedings. Therefore, all accepted papers will be published in open-access, and the authors can also decide to publish their work in the Springer LNCS formal proceedings. Program Committee Sergio Antoy (Portland State University, USA) Demis Ballis (University of Udine, Italy) Moreno Falaschi (Universit? di Siena, Italy) Michael Hanus (University of Kiel, Germany) (Co-Chair) Herbert Kuchen (University of Muenster, Germany) Dale Miller (INRIA and LIX/?cole Polytechnique) Claudio Sacerdoti Coen (University of Bologna, Italy) (Co-Chair) Konstantinos Sagonas (Uppsala University, Sweden) Enrico Tassi (INRIA, France) Janis Voigtl?nder (University of Duisburg-Essen, Germany) Johannes Waldmann (HTWK Leipzig, Germany) Organizing Committee Claudio Sacerdoti Coen (University of Bologna, Italy) (Co-Chair) -- Prof. Claudio Sacerdoti Coen Department of Computer Science and Engineering University of Bologna -- Prof. Claudio Sacerdoti Coen Department of Computer Science and Engineering University of Bologna -------------- next part -------------- An HTML attachment was scrubbed... URL: From claudio.sacerdoticoen at unibo.it Sun Jul 5 18:31:33 2020 From: claudio.sacerdoticoen at unibo.it (Claudio Sacerdoti Coen) Date: Sun, 5 Jul 2020 16:31:33 +0000 Subject: [Agda] WFLP 2020: Deadline Extension Message-ID: <79a651730702314bdff8b29ff175166fb26fc6e5.camel@unibo.it> WFLP 2020: Deadline Extension ============================= 28th International Workshop on Functional and (Constraint) Logic Programming ## Due to the coronavirus pandemic, the workshop will be organized by ## ## the University of Bologna, but it will be held entirely on-line. ## Bologna, Italy, September 7th, 2020 (part of Bologna Federated Conference on Programming Languages 2020; co-located with PPDP, LOPSTR, Microservices) Important Dates Paper Registration: July, 13th <== extended Submission: July, 20th <== extended Notification of Authors: August, 03rd Camera-ready Papers: August, 24th Conference & Workshops: September 7th, 2020 WFLP 2020 The international Workshop on Functional and (constraint) Logic Programming (WFLP) aims at bringing together researchers, students, and practitioners interested in functional programming, logic programming, and their integration. WFLP has a reputation for being a lively and friendly forum, and it is open for presenting and discussing work in progress, technical contributions, experience reports, experiments, reviews, and system descriptions. The 28th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2020) will be organized by the University of Bologna, Italy, as part of Bologna Federated Conference on Programming Languages 2020 and it will be held entirely on-line due to the coronavirus pandemic. Previous WFLP editions were WFLP 2019 (Cottbus, Germany), WFLP 2018 (Frankfurt am Main, Germany), WFLP 2017 (W?rzburg, Germany), WFLP 2016 (Leipzig, Germany), WFLP 2014 (Wittenberg, Germany), WFLP 2013 (Kiel, Germany), WFLP 2012 (Nagoya, Japan), WFLP 2011 (Odense, Denmark), WFLP 2010 (Madrid, Spain), WFLP 2009 (Brasilia, Brazil), WFLP 2008 (Siena, Italy), WFLP 2007 (Paris, France), WFLP 2006 (Madrid, Spain), WCFLP 2005 (Tallinn, Estonia), WFLP 2004 (Aachen, Germany), WFLP 2003 (Valencia, Spain), WFLP 2002 (Grado, Italy), WFLP 2001 (Kiel, Germany), WFLP 2000 (Benicassim, Spain), WFLP'99 (Grenoble, France), WFLP'98 (Bad Honnef, Germany), WFLP'97 (Schwarzenberg, Germany), WFLP'96 (Marburg, Germany), WFLP'95 (Schwarzenberg, Germany), WFLP'94 (Schwarzenberg, Germany), WFLP'93 (Rattenberg, Germany), and WFLP'92 (Karlsruhe, Germany). Topics The topics of interest cover all aspects of functional and logic programming. They include (but are not limited to): * Functional programming * Logic programming * Constraint programming * Deductive databases, data mining * Extensions of declarative languages, objects * Multi-paradigm declarative programming * Foundations, semantics, non-monotonic reasoning, dynamics * Parallelism, concurrency * Program analysis, abstract interpretation * Program and model manipulation * Program transformation, partial evaluation, meta-programming * Specification, * Verification * Debugging * Testing * Knowledge representation, machine learning * Interaction of declarative programming with other formalisms * Implementation of declarative languages * Advanced programming environments and tools * Software techniques for declarative programming * Applications The primary focus is on new and original research results, but submissions describing innovative products, prototypes under development, application systems, or interesting experiments (e.g., benchmarks) are also encouraged. Survey papers that present some aspects of the above topics from a new perspective, and experience reports are also welcome. Papers must be written and presented in English. Work that already appeared in unpublished or informally published workshop proceedings may be submitted (please contact the PC chair in case of questions). Submission Guidelines Submission is via Easychair submission website for WFLP 2020: https://easychair.org/conferences/?conf=wflp2020 Authors are invited to submit papers in the following categories: + Regular research paper + Work-in-progress report + System description Regular research papers must describe original work, be written and presented in English, and must not substantially overlap with papers that have been formally published or that are simultaneously submitted to a journal, conference, or workshop with formal proceedings. They will be judged on the basis of significance, relevance, correctness, originality, and clarity. For work-in-progress reports and system descriptions, less formal rules apply, and presentation-only submissions (talk and discussion, but no paper in the formal proceedings) are possible. Please contact the PC chair with any questions. All submissions must be formatted in the Lecture Notes in Computer Science style. Submissions cannot exceed 15 pages including references but excluding well-marked appendices not intended for publication. Reviewers are not required to read the appendices, and thus papers should be intelligible without them. However, all submissions (especially work-in-progress reports and system descriptions) may be considerably shorter than 15 pages. Proceedings All papers accepted for presentation at the conference will be published in informal proceedings publicly available at the Computing Research Repository. According to the program committee reviews, submissions can be directly accepted for publication in the formal post-conference proceedings. The formal post-conference proceedings will be published in both electronic and paper formats by Springer in the Lecture Notes in Computer Science series. After the conference, all authors accepted only for presentation will be invited to revise and/or extend their submissions in the light of the feedback solicited at the conference. Then, after another round of reviewing, these revised papers may also be published in the formal proceedings. Therefore, all accepted papers will be published in open-access, and the authors can also decide to publish their work in the Springer LNCS formal proceedings. Program Committee Sergio Antoy (Portland State University, USA) Demis Ballis (University of Udine, Italy) Moreno Falaschi (Universit? di Siena, Italy) Michael Hanus (University of Kiel, Germany) (Co-Chair) Herbert Kuchen (University of Muenster, Germany) Dale Miller (INRIA and LIX/?cole Polytechnique) Claudio Sacerdoti Coen (University of Bologna, Italy) (Co-Chair) Konstantinos Sagonas (Uppsala University, Sweden) Enrico Tassi (INRIA, France) Janis Voigtl?nder (University of Duisburg-Essen, Germany) Johannes Waldmann (HTWK Leipzig, Germany) Organizing Committee Claudio Sacerdoti Coen (University of Bologna, Italy) (Co-Chair) -- Prof. Claudio Sacerdoti Coen Department of Computer Science and Engineering University of Bologna -------------- next part -------------- An HTML attachment was scrubbed... URL: From joey.eremondi at gmail.com Sun Jul 5 21:25:37 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Sun, 5 Jul 2020 12:25:37 -0700 Subject: [Agda] Moving Prop under Quantifiers? In-Reply-To: References: Message-ID: Thanks Nicolai and Guillaume. The next question is, if I've defined a datatype in Prop, is it possible to do Well-founded induction on it? That's what I need the orderings for, but I'm not certain that it will be proof irrelevant... On Sat, Jul 4, 2020 at 4:14 PM Joey Eremondi wrote: > I have a type f Brouwer ordinals Ord, where one of the constructors is > (lim : (Nat -> Ord) -> Ord). I've got an ordering on ordinals, where one of > the constructors is > (lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> f a < o) -> lim f < o). > > I'm using the ordinals to bound the size of data structures, but I want > the bounds to be irrelevant, so I've been using Squash: Set -> Prop (as > defined in the Prop docs) to define an irrelevant version of this. The > problem is, when I'm producing proofs of (Squash (o1 < o2)), I can't figure > out a way to use the lim< constructor. > > Basically, I'm wondering, given the lim constructor above, (squash : A -> > Squash a), and squash-elim : (A : Set) (P : Prop) -> (A -> P) -> Squash A > -> P, if there's any way to write the following function: > p-lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> Squash (f a < o)) -> > Squash (lim f < o)) > > That is, if I have a function that produces the necessary "squashed" proof > for each Nat, is there a way I can move the entire function into Prop. In > principle, what I'm doing doesn't go against Prop, i.e. I'm only matching > on Prop values when I'm producing a *final* value in Prop. But the > intermediate steps leave Prop, which is what is causing problems. > > Is this just a limitation of Prop? Is the old dotted-irrelevance any > different? Or is there some way to do this that I'm not seeing? > > Thanks! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.brunerie at gmail.com Sun Jul 5 22:31:48 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Sun, 5 Jul 2020 22:31:48 +0200 Subject: [Agda] Moving Prop under Quantifiers? In-Reply-To: References: Message-ID: No, unfortunately you cannot define something in Set by induction over something in Prop (and you wouldn't be able to get out of a Squash either), and I don't know of any good workaround for that. If you really need to define something in Set by induction on the ordering, you may need to keep your ordering in Set. Best, Guillaume Den s?n 5 juli 2020 21:25Joey Eremondi skrev: > Thanks Nicolai and Guillaume. > > The next question is, if I've defined a datatype in Prop, is it possible > to do Well-founded induction on it? That's what I need the orderings for, > but I'm not certain that it will be proof irrelevant... > > > On Sat, Jul 4, 2020 at 4:14 PM Joey Eremondi > wrote: > >> I have a type f Brouwer ordinals Ord, where one of the constructors is >> (lim : (Nat -> Ord) -> Ord). I've got an ordering on ordinals, where one of >> the constructors is >> (lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> f a < o) -> lim f < >> o). >> >> I'm using the ordinals to bound the size of data structures, but I want >> the bounds to be irrelevant, so I've been using Squash: Set -> Prop (as >> defined in the Prop docs) to define an irrelevant version of this. The >> problem is, when I'm producing proofs of (Squash (o1 < o2)), I can't figure >> out a way to use the lim< constructor. >> >> Basically, I'm wondering, given the lim constructor above, (squash : A -> >> Squash a), and squash-elim : (A : Set) (P : Prop) -> (A -> P) -> Squash A >> -> P, if there's any way to write the following function: >> p-lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> Squash (f a < o)) -> >> Squash (lim f < o)) >> >> That is, if I have a function that produces the necessary "squashed" >> proof for each Nat, is there a way I can move the entire function into >> Prop. In principle, what I'm doing doesn't go against Prop, i.e. I'm only >> matching on Prop values when I'm producing a *final* value in Prop. But the >> intermediate steps leave Prop, which is what is causing problems. >> >> Is this just a limitation of Prop? Is the old dotted-irrelevance any >> different? Or is there some way to do this that I'm not seeing? >> >> Thanks! >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Mon Jul 6 13:05:53 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Mon, 6 Jul 2020 11:05:53 +0000 Subject: [Agda] Moving Prop under Quantifiers? In-Reply-To: References: Message-ID: You can?t have a cake and eat it. However, if you add enough equalities to identify equivalent ordinals then you may get what you want. This requires thought. Cheers, Thorsten From: Agda on behalf of Guillaume Brunerie Date: Sunday, 5 July 2020 at 21:32 To: Joey Eremondi Cc: Agda mailing list Subject: Re: [Agda] Moving Prop under Quantifiers? No, unfortunately you cannot define something in Set by induction over something in Prop (and you wouldn't be able to get out of a Squash either), and I don't know of any good workaround for that. If you really need to define something in Set by induction on the ordering, you may need to keep your ordering in Set. Best, Guillaume Den s?n 5 juli 2020 21:25Joey Eremondi > skrev: Thanks Nicolai and Guillaume. The next question is, if I've defined a datatype in Prop, is it possible to do Well-founded induction on it? That's what I need the orderings for, but I'm not certain that it will be proof irrelevant... On Sat, Jul 4, 2020 at 4:14 PM Joey Eremondi > wrote: I have a type f Brouwer ordinals Ord, where one of the constructors is (lim : (Nat -> Ord) -> Ord). I've got an ordering on ordinals, where one of the constructors is (lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> f a < o) -> lim f < o). I'm using the ordinals to bound the size of data structures, but I want the bounds to be irrelevant, so I've been using Squash: Set -> Prop (as defined in the Prop docs) to define an irrelevant version of this. The problem is, when I'm producing proofs of (Squash (o1 < o2)), I can't figure out a way to use the lim< constructor. Basically, I'm wondering, given the lim constructor above, (squash : A -> Squash a), and squash-elim : (A : Set) (P : Prop) -> (A -> P) -> Squash A -> P, if there's any way to write the following function: p-lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> Squash (f a < o)) -> Squash (lim f < o)) That is, if I have a function that produces the necessary "squashed" proof for each Nat, is there a way I can move the entire function into Prop. In principle, what I'm doing doesn't go against Prop, i.e. I'm only matching on Prop values when I'm producing a *final* value in Prop. But the intermediate steps leave Prop, which is what is causing problems. Is this just a limitation of Prop? Is the old dotted-irrelevance any different? Or is there some way to do this that I'm not seeing? Thanks! _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joey.eremondi at gmail.com Mon Jul 6 22:07:30 2020 From: joey.eremondi at gmail.com (Joey Eremondi) Date: Mon, 6 Jul 2020 13:07:30 -0700 Subject: [Agda] Moving Prop under Quantifiers? In-Reply-To: References: Message-ID: Fair enough. My hope was that if the thing in Prop was irrelevant to the actual result, and only served as a witness to the termination, that it would work. I'll just try moving it to Set and manually proving that things are equal. Thanks! On Mon, Jul 6, 2020 at 4:05 AM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > You can?t have a cake and eat it. However, if you add enough equalities to > identify equivalent ordinals then you may get what you want. This requires > thought. > > > > Cheers, > > Thorsten > > > > > > *From: *Agda on behalf of Guillaume > Brunerie > *Date: *Sunday, 5 July 2020 at 21:32 > *To: *Joey Eremondi > *Cc: *Agda mailing list > *Subject: *Re: [Agda] Moving Prop under Quantifiers? > > > > No, unfortunately you cannot define something in Set by induction over > something in Prop (and you wouldn't be able to get out of a Squash either), > and I don't know of any good workaround for that. If you really need to > define something in Set by induction on the ordering, you may need to keep > your ordering in Set. > > > > Best, > > Guillaume > > > > Den s?n 5 juli 2020 21:25Joey Eremondi skrev: > > Thanks Nicolai and Guillaume. > > > > The next question is, if I've defined a datatype in Prop, is it possible > to do Well-founded induction on it? That's what I need the orderings for, > but I'm not certain that it will be proof irrelevant... > > > > > > On Sat, Jul 4, 2020 at 4:14 PM Joey Eremondi > wrote: > > I have a type f Brouwer ordinals Ord, where one of the constructors is > (lim : (Nat -> Ord) -> Ord). I've got an ordering on ordinals, where one of > the constructors is > > (lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> f a < o) -> lim f < o). > > > > I'm using the ordinals to bound the size of data structures, but I want > the bounds to be irrelevant, so I've been using Squash: Set -> Prop (as > defined in the Prop docs) to define an irrelevant version of this. The > problem is, when I'm producing proofs of (Squash (o1 < o2)), I can't figure > out a way to use the lim< constructor. > > > > Basically, I'm wondering, given the lim constructor above, (squash : A -> > Squash a), and squash-elim : (A : Set) (P : Prop) -> (A -> P) -> Squash A > -> P, if there's any way to write the following function: > > p-lim< : (f : Nat -> Ord) (o : Ord) -> ((a : Nat) -> Squash (f a < o)) -> > Squash (lim f < o)) > > > > That is, if I have a function that produces the necessary "squashed" proof > for each Nat, is there a way I can move the entire function into Prop. In > principle, what I'm doing doesn't go against Prop, i.e. I'm only matching > on Prop values when I'm producing a *final* value in Prop. But the > intermediate steps leave Prop, which is what is causing problems. > > > > Is this just a limitation of Prop? Is the old dotted-irrelevance any > different? Or is there some way to do this that I'm not seeing? > > > > Thanks! > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredrik.nordvall-forsberg at strath.ac.uk Tue Jul 7 18:35:12 2020 From: fredrik.nordvall-forsberg at strath.ac.uk (Fredrik Nordvall Forsberg) Date: Tue, 7 Jul 2020 17:35:12 +0100 Subject: [Agda] Permanent positions at the University of Strathclyde Message-ID: <9feb96c7-3279-6e31-9e7c-94a4d6d9b8e2@strath.ac.uk> Dear all, In the near future, the University of Strathclyde will announce a call for ** five-year research positions leading to permanent appointments ** Indeed, it is reassuring to see the university continue recruitment despite the Covid situation. The Mathematically Structured Programming group in the Department of Computer and Information Sciences welcomes applications from type theorists and dependently typed programmers, and would be happy to help you develop an application. Please contact Neil Ghani if you are interested, or of course me or anyone else from the group if you have questions. Please also forward this message to others who might be interested. The MSP group ============= The MSP group's vision is to use mathematics to understand the nature of computation, and to then turn that understanding into into the next generation of programming languages. We use ideas from category theory, type theory, and logic to do so. The group consists of Dr Robert Atkey, Dr Ross Duncan, Professor Neil Ghani, Dr Jules Hedges, Dr Clemens Kupke, Dr J?r?my Ledent, Professor Radu Mardare, Dr Conor McBride, Dr Fredrik Nordvall Forsberg, Professor Glynn Winskel, and our PhD students. For more information, please see our group website, and our individual websites linked from there: http://msp.cis.strath.ac.uk Glasgow and Scotland ==================== The University of Strathclyde is located in the heart of Glasgow, which Lonely Planet Travel Guides hail as "one of Britain's most intriguing metropolises" (https://www.lonelyplanet.com/scotland/glasgow/). It is less than an hour away by car or public transport from the Scottish Highlands. Southern Scotland provides a particularly stimulating environment for researchers in theoretical computer science, with active groups in this area at Heriot-Watt University, the University of Edinburgh, the University of Glasgow, the University of St. Andrews, and the University of Strathclyde. Best wishes, Fredrik From bernardobruno at gmail.com Tue Jul 7 22:07:41 2020 From: bernardobruno at gmail.com (Bruno Bernardo) Date: Tue, 7 Jul 2020 22:07:41 +0200 Subject: [Agda] FMBC 2020 - Call for Participation Message-ID: [ Please distribute, apologies for multiple postings. ] ======================================================================== 2nd Workshop on Formal Methods for Blockchains (FMBC) 2020 - Call for Participation https://fmbc.gitlab.io/2020 July 20 and 21, 2020, Online, 6AM-8AM PDT Co-located with the 32nd International Conference on Computer-Aided Verification (CAV 2020) http://i-cav.org/2020/ --------------------------------------------------------- The FMBC workshop is a forum to identify theoretical and practical approaches of formal methods for Blockchain technology. Topics include, but are not limited to: * Formal models of Blockchain applications or concepts * Formal methods for consensus protocols * Formal methods for Blockchain-specific cryptographic primitives or protocols * Design and implementation of Smart Contract languages * Verification of Smart Contracts The list of lightning talks and conditionally accecpted papers is available on the FMBC 2020 website: https://fmbc.gitlab.io/2020/program.html There will be one keynote by Grigore Rosu, Professor at University of Illinois at Urbana-Champaign, USA and Founder of Runtime Verification. Registration Registration to FMBC 2020 is free but required. It is done through the CAV 2020 registration form: http://i-cav.org/2020/attending/ Please register before *July 10, 2020*. From Thorsten.Altenkirch at nottingham.ac.uk Wed Jul 8 11:52:37 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 8 Jul 2020 09:52:37 +0000 Subject: [Agda] Cabal hell again Message-ID: <11E5A1F3-F7E9-4885-8281-B75F0D0CC501@nottingham.ac.uk> I ended up in cabal hell again. What is the trick to get out of it? I did ghcup and I nuked .cabal but to no avail. What is going on? Thorsten psztxa at IMAC-DGKYNHM5JV3X agda % which cabal /Users/psztxa/.ghcup/bin/cabal psztxa at IMAC-DGKYNHM5JV3X agda % ghc --version The Glorious Glasgow Haskell Compilation System, version 8.8.3 psztxa at IMAC-DGKYNHM5JV3X agda % cabal --version cabal-install version 3.2.0.0 compiled using version 3.2.0.0 of the Cabal library psztxa at IMAC-DGKYNHM5JV3X agda % cabal update Downloading the latest package list from hackage.haskell.org To revert to previous state run: cabal v2-update 'hackage.haskell.org,2020-07-08T08:22:29Z' psztxa at IMAC-DGKYNHM5JV3X agda % git pull Already up to date. psztxa at IMAC-DGKYNHM5JV3X agda % cabal install cabal: Could not resolve dependencies: [__0] trying: Agda-2.6.2 (user goal) [__1] trying: base-4.13.0.0/installed-4.13.0.0 (dependency of Agda) [__2] next goal: lib (user goal) [__2] rejecting: lib-1.3 (conflict: base==4.13.0.0/installed-4.13.0.0, lib => base>=4.8.0.0 && <4.13) [__2] fail (backjumping, conflict set: base, lib) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: base, lib, Agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Wed Jul 8 12:30:09 2020 From: carette at mcmaster.ca (Carette, Jacques) Date: Wed, 8 Jul 2020 10:30:09 +0000 Subject: [Agda] Cabal hell again In-Reply-To: <11E5A1F3-F7E9-4885-8281-B75F0D0CC501@nottingham.ac.uk> References: <11E5A1F3-F7E9-4885-8281-B75F0D0CC501@nottingham.ac.uk> Message-ID: The last time this happened to me, there were in fact 2 versions of cabal on my machine ? and the one that my shell picked and the one that the build scripts picked up were not the same. And because of local vs global package caches, things got into complete hell. Once I removed the no-longer-wanted extra copy of cabal and all its droppings, things worked again. Jacques From: Agda On Behalf Of Thorsten Altenkirch Sent: July 8, 2020 5:53 AM To: Agda mailing list Subject: [Agda] Cabal hell again I ended up in cabal hell again. What is the trick to get out of it? I did ghcup and I nuked .cabal but to no avail. What is going on? Thorsten psztxa at IMAC-DGKYNHM5JV3X agda % which cabal /Users/psztxa/.ghcup/bin/cabal psztxa at IMAC-DGKYNHM5JV3X agda % ghc --version The Glorious Glasgow Haskell Compilation System, version 8.8.3 psztxa at IMAC-DGKYNHM5JV3X agda % cabal --version cabal-install version 3.2.0.0 compiled using version 3.2.0.0 of the Cabal library psztxa at IMAC-DGKYNHM5JV3X agda % cabal update Downloading the latest package list from hackage.haskell.org To revert to previous state run: cabal v2-update 'hackage.haskell.org,2020-07-08T08:22:29Z' psztxa at IMAC-DGKYNHM5JV3X agda % git pull Already up to date. psztxa at IMAC-DGKYNHM5JV3X agda % cabal install cabal: Could not resolve dependencies: [__0] trying: Agda-2.6.2 (user goal) [__1] trying: base-4.13.0.0/installed-4.13.0.0 (dependency of Agda) [__2] next goal: lib (user goal) [__2] rejecting: lib-1.3 (conflict: base==4.13.0.0/installed-4.13.0.0, lib => base>=4.8.0.0 && <4.13) [__2] fail (backjumping, conflict set: base, lib) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: base, lib, Agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.j.rouvoet at gmail.com Wed Jul 8 12:31:56 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Wed, 8 Jul 2020 12:31:56 +0200 Subject: [Agda] Cabal hell again In-Reply-To: References: <11E5A1F3-F7E9-4885-8281-B75F0D0CC501@nottingham.ac.uk> Message-ID: <8ef5738e-7fa8-5939-f645-3f0efd69fd7b@gmail.com> One way to avoid cabal hell is to use the stack build, which in my experience does a better job to keep things isolated. Arjen On 7/8/20 12:30 PM, Carette, Jacques wrote: > > The last time this happened to me, there were in fact 2 versions of > cabal on my machine ? and the one that my shell picked and the one > that the build scripts picked up were not the same. And because of > local vs global package caches, things got into complete hell. > > Once I removed the no-longer-wanted extra copy of cabal and all its > droppings, things worked again. > > Jacques > > *From:*Agda *On Behalf Of *Thorsten > Altenkirch > *Sent:* July 8, 2020 5:53 AM > *To:* Agda mailing list > *Subject:* [Agda] Cabal hell again > > I ended up in cabal hell again. What is the trick to get out of it? > > I did ghcup and I nuked .cabal but to no avail. What is going on? > > Thorsten > > psztxa at IMAC-DGKYNHM5JV3X agda % which cabal > > /Users/psztxa/.ghcup/bin/cabal > > psztxa at IMAC-DGKYNHM5JV3X agda % ghc --version > > The Glorious Glasgow Haskell Compilation System, version 8.8.3 > > psztxa at IMAC-DGKYNHM5JV3X agda % cabal --version > > cabal-install version 3.2.0.0 > > compiled using version 3.2.0.0 of the Cabal library > > psztxa at IMAC-DGKYNHM5JV3X agda % cabal update > > Downloading the latest package list from hackage.haskell.org > > To revert to previous state run: > > cabal v2-update 'hackage.haskell.org,2020-07-08T08:22:29Z' > > psztxa at IMAC-DGKYNHM5JV3X agda % git pull > > Already up to date. > > psztxa at IMAC-DGKYNHM5JV3X agda % cabal install > > cabal: Could not resolve dependencies: > > [__0] trying: Agda-2.6.2 (user goal) > > [__1] trying: base-4.13.0.0/installed-4.13.0.0 (dependency of Agda) > > [__2] next goal: lib (user goal) > > [__2] rejecting: lib-1.3 (conflict: base==4.13.0.0/installed-4.13.0.0, > lib => > > base>=4.8.0.0 && <4.13) > > [__2] fail (backjumping, conflict set: base, lib) > > After searching the rest of the dependency tree exhaustively, these > were the > > goals I've had most trouble fulfilling: base, lib, Agda > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Jul 8 12:54:17 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 8 Jul 2020 10:54:17 +0000 Subject: [Agda] Cabal hell again In-Reply-To: <8ef5738e-7fa8-5939-f645-3f0efd69fd7b@gmail.com> References: <11E5A1F3-F7E9-4885-8281-B75F0D0CC501@nottingham.ac.uk> <8ef5738e-7fa8-5939-f645-3f0efd69fd7b@gmail.com> Message-ID: Actually stack init fails as well. Thorsten From: Agda on behalf of "a.j.rouvoet" Date: Wednesday, 8 July 2020 at 11:32 To: "agda at lists.chalmers.se" Subject: Re: [Agda] Cabal hell again One way to avoid cabal hell is to use the stack build, which in my experience does a better job to keep things isolated. Arjen On 7/8/20 12:30 PM, Carette, Jacques wrote: The last time this happened to me, there were in fact 2 versions of cabal on my machine ? and the one that my shell picked and the one that the build scripts picked up were not the same. And because of local vs global package caches, things got into complete hell. Once I removed the no-longer-wanted extra copy of cabal and all its droppings, things worked again. Jacques From: Agda On Behalf Of Thorsten Altenkirch Sent: July 8, 2020 5:53 AM To: Agda mailing list Subject: [Agda] Cabal hell again I ended up in cabal hell again. What is the trick to get out of it? I did ghcup and I nuked .cabal but to no avail. What is going on? Thorsten psztxa at IMAC-DGKYNHM5JV3X agda % which cabal /Users/psztxa/.ghcup/bin/cabal psztxa at IMAC-DGKYNHM5JV3X agda % ghc --version The Glorious Glasgow Haskell Compilation System, version 8.8.3 psztxa at IMAC-DGKYNHM5JV3X agda % cabal --version cabal-install version 3.2.0.0 compiled using version 3.2.0.0 of the Cabal library psztxa at IMAC-DGKYNHM5JV3X agda % cabal update Downloading the latest package list from hackage.haskell.org To revert to previous state run: cabal v2-update 'hackage.haskell.org,2020-07-08T08:22:29Z' psztxa at IMAC-DGKYNHM5JV3X agda % git pull Already up to date. psztxa at IMAC-DGKYNHM5JV3X agda % cabal install cabal: Could not resolve dependencies: [__0] trying: Agda-2.6.2 (user goal) [__1] trying: base-4.13.0.0/installed-4.13.0.0 (dependency of Agda) [__2] next goal: lib (user goal) [__2] rejecting: lib-1.3 (conflict: base==4.13.0.0/installed-4.13.0.0, lib => base>=4.8.0.0 && <4.13) [__2] fail (backjumping, conflict set: base, lib) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: base, lib, Agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From godzbanebane at gmail.com Wed Jul 8 13:56:01 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Wed, 8 Jul 2020 14:56:01 +0300 Subject: [Agda] Cabal hell again In-Reply-To: References: <11E5A1F3-F7E9-4885-8281-B75F0D0CC501@nottingham.ac.uk> <8ef5738e-7fa8-5939-f645-3f0efd69fd7b@gmail.com> Message-ID: Agda from master(552987aa0119f2bca5eaf4dca7934e37209112f9) builds fine for me with stack build --stack-yaml stack-8.8.3.yaml I don't think stack init is necessary, unless some dependencies were changed. Is this from some other branch? ====== Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From lehmann at tet.tu-berlin.de Mon Jul 13 15:31:30 2020 From: lehmann at tet.tu-berlin.de (Marcus Christian Lehmann) Date: Mon, 13 Jul 2020 15:31:30 +0200 Subject: [Agda] unfolding just a single definition in the context of a goal Message-ID: Dear Agda community, When in in context of a goal, Is there a way to have just one definition unfolded instead of a complete normalization that is performed on `C-u C-u C-c C-,` ? For example: in the notes of M. Escard? [1] there is something like ? sets-have-wconstant-?-endomaps' : (X : Type ?) ? is-set X ? wconstant-?-endomaps X ? sets-have-wconstant-?-endomaps' X p = {!!} Now, in the hole {!!}, whe using `C-c C-,` or `C-u C-c C-,`this gives a ? Goal: wconstant-?-endomaps X ???????????????????????????????????????????????????????????? ? p : is-set X ? X : Type ? where `C-u C-u C-c C-,` normalizes all terms and gives ? Goal: (x y : X) ? ?? ???? ? (? f ? (x? x' : Id X x y) ? Id (Id X x y) (f x?) (f x')) ???????????????????????????????????????????????????????????? ? p : (x y : X) (x? y? : Id X x y) ? Id (Id X x y) x? y? ? X : Set ? In this case my question is whether it is possible to have just one definition unfolded, e.g. just have `is-set` unfolded and get an intermediate result like ? Goal: wconstant-?-endomaps X ???????????????????????????????????????????????????????????? ? p : (x y : X) ? is-subsingleton (x ? y) ? X : Type ? I could not find any hints about that in the agda documentation. kind regards, Christian [1] https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#setscharacterization From james.wood.100 at strath.ac.uk Mon Jul 13 17:48:23 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Mon, 13 Jul 2020 16:48:23 +0100 Subject: [Agda] unfolding just a single definition in the context of a goal In-Reply-To: References: Message-ID: <3fd42b07-fa15-db72-1c7b-22db5c3f4b68@strath.ac.uk> Hi Christian, I believe the answer is unfortunately no. A feature to achieve this has probably always seemed too difficult to design well and implement, so it's never been done. To practically achieve something similar, it's good to know how to do type annotations. Generally, if you see something in the goal display that you want to look different, you can annotate its type in the program text and it'll appear like that in the goal display. If it's the goal itself, annotation can be done via stdlib's Function.Base._?_ : _?_ : ? {a} (A : Set a) ? A ? A A ? x = x If it's a variable (like in your example), you can create an alias of it using `let`, e.g, sets-have-wconstant-?-endomaps' : (X : Type ?) ? is-set X ? wconstant-?-endomaps X sets-have-wconstant-?-endomaps' X p = let p? : (x y : X) ? is-subsingleton (x ? y) p? = p in {!!} There's not really any way to automate this, but at least the type you write down will be checked. If you have control of the definitions, it can also sometimes be useful to define types via records, rather than computing types. For example, if `is-subsingleton` were defined as follows, `C-u C-u C-c C-,` would give you the display you wanted. record is-subsingleton (X : Type ?) : Type ? where constructor mk field get : ? x y ? Id X x y open is-subsingleton public With this definition, expansion of the definition is effectively controlled by the programmer's use of `mk` and `get`. I suppose it's a matter of experience to know when it's worth making the trade-off between manual and automatic expansion of definitions, and it also isn't just about goal displays. Hope that was helpful, James On 13/07/2020 14:31, Marcus Christian Lehmann wrote: > Dear Agda community, > > When in in context of a goal, Is there a way to have just one definition > unfolded instead of a complete normalization that is performed on `C-u > C-u C-c C-,` ? > > For example: in the notes of M. Escard? [1] there is something like > > ? sets-have-wconstant-?-endomaps' : (X : Type ?) ? is-set X ? > wconstant-?-endomaps X > ? sets-have-wconstant-?-endomaps' X p = {!!} > > Now, in the hole {!!}, whe using `C-c C-,` or `C-u C-c C-,`this gives a > > ? Goal: wconstant-?-endomaps X > ???????????????????????????????????????????????????????????? > ? p : is-set X > ? X : Type ? > > where `C-u C-u C-c C-,` normalizes all terms and gives > > ? Goal: (x y : X) ? > ?? ???? ? (? f ? (x? x' : Id X x y) ? Id (Id X x y) (f x?) (f x')) > ???????????????????????????????????????????????????????????? > ? p : (x y : X) (x? y? : Id X x y) ? Id (Id X x y) x? y? > ? X : Set ? > > In this case my question is whether it is possible to have just one > definition unfolded, e.g. just have `is-set` unfolded and get an > intermediate result like > > ? Goal: wconstant-?-endomaps X > ???????????????????????????????????????????????????????????? > ? p : (x y : X) ? is-subsingleton (x ? y) > ? X : Type ? > > I could not find any hints about that in the agda documentation. > > kind regards, > Christian > > [1] > https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#setscharacterization > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From lehmann at tet.tu-berlin.de Mon Jul 13 20:16:11 2020 From: lehmann at tet.tu-berlin.de (Marcus Christian Lehmann) Date: Mon, 13 Jul 2020 20:16:11 +0200 Subject: [Agda] unfolding just a single definition in the context of a goal In-Reply-To: <3fd42b07-fa15-db72-1c7b-22db5c3f4b68@strath.ac.uk> References: <3fd42b07-fa15-db72-1c7b-22db5c3f4b68@strath.ac.uk> Message-ID: Dear James, Yes, that was helpful. Thank you for the clarification! Introducing an additional record for these abbreviations (as in the standard library in Algrebra.Definitions [1]) feels to be against their purpose of being "lightweight" to use. Even when in control of the definitions. But it is a valid compromise, of course. > If it's a variable (like in your example), you can create an alias of > it using `let` > ... > There's not really any way to automate this, but at least the type you > write down will be checked. I am preferring this technique. Thank you for hinting towards it. It seems to be even possible to use the very same name, e.g. for the purpose of inhibiting an outer-scope-parameter-renaming at all costs (which might be the favored way when other things in the same scope already depend on that parameter). ? sets-have-wconstant-?-endomaps' : (X : Type ?) ? is-set X ? wconstant-?-endomaps X ? sets-have-wconstant-?-endomaps' X p = ??? let p : (x y : X) ? is-subsingleton (x ? y) ??????? p = p ??? in {!!} gives an expanded `is-set` ? Goal: wconstant-?-endomaps X ???????????????????????????????????????????????????????????? ? p????? : (x y : X) ? is-subsingleton (x ? y) ? p????? = p? ? p = p? : is-set X?? (not in scope) ? X????? : Type ? and the type annotation _?_ that you suggested, with sets-have-wconstant-?-endomaps' : (X : Type ?) ? is-set X ? wconstant-?-endomaps X ? sets-have-wconstant-?-endomaps' X p = ? ? let p : (x y : X) ? is-subsingleton (x ? y) ? ?? ?? p = p ??? in ((x y : X) ? wconstant-endomap (x ? y)) ? ??? ?? {!!} givesan "expanded" `wconstant-?-endomaps` ? Goal: (x y : X) ? wconstant-endomap (x ? y) ???????????????????????????????????????????????????????????? ? p????? : (x y : X) ? is-subsingleton (x ? y) ? p????? = p? ? p = p? : is-set X?? (not in scope) ? X????? : Type ? When there is some name-clashing in a copied, too-complicated definition, it seems possible to put a lambda in there which mitigates the manual name translation a bit. E.g. ? sets-have-wconstant-?-endomaps' : (Y : Type ?) ? is-set Y ? wconstant-?-endomaps Y ? sets-have-wconstant-?-endomaps' Y x = ? ? let x : (? X ? (x y : X) ? is-subsingleton (x ? y)) Y ? ? ??? x = x ? ? in (? X ? ((x y : X) ? wconstant-endomap (x ? y))) Y ? ? ? ?? {!!} gives an expanded and correctly renamed variant ? Goal: (x? y : Y) ? wconstant-endomap (x? ? y) ???????????????????????????????????????????????????????????? ? x????? : (x? y : Y) ? is-subsingleton (x? ? y) ? x????? = x? ? x = x? : is-set Y?? (not in scope) ? Y????? : Type ? which looks managable enough to continue reasoning and might even be visually improved with an additional `syntax` for it. kind regards, Christian [1] https://agda.github.io/agda-stdlib/Algebra.Definitions.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From icfp.publicity at googlemail.com Tue Jul 14 21:54:25 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Tue, 14 Jul 2020 15:54:25 -0400 Subject: [Agda] Call for Participation: ICFP 2020 Message-ID: <5f0e0d7177ef5_93ca21c-46e@homer.mail> ===================================================================== Call for Participation ICFP 2020 25th ACM SIGPLAN International Conference on Functional Programming and affiliated events August 23 - August 28, 2020 Online http://icfp20.sigplan.org/ Early Registration until August 8! The ICFP Programming Contest starts on July 17! ===================================================================== ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. The conference covers the entire spectrum of work, from practice to theory, including its peripheries. This year, the conference will be a virtual event. All activities will take place online. The ICFP Programming competition will be July 17th through 20th, 2020! The main conference will take place from August 24-26, 2020 during two time bands. The first band will be 9AM-5:30PM New York, and will include both technical and social activities. The second band will repeat (with some variation) the technical program and social activities 12 hours later, 9AM-5:30PM Beijing, the following day. We?re excited to announce our two invited speakers for 2020: Evan Czaplicki, covering the Elm programming language and hard lessons learned on driving adoption of new programming languages; and Audrey Tang, Haskeller and Taiwan?s Digital Minister, on how software developers can contribute to fighting the pandemic. ICFP has officially accepted 37 exciting papers, and (as a fresh experiment this year) there will also be presentations of 8 papers accepted recently to the Journal of Functional Programming. Co-located symposia and workshops will take place the day before and two days immediately after the main conference. Registration is now open. The early registration deadline is August 8th, 2020. Registration is not free, but is significantly lower than usual. Students who are ACM or SIGPLAN members may register for FREE before the early deadline. https://regmaster.com/2020conf/ICFP20/register.php New this year: Attendees will be able to sign-up for the ICFP Mentoring Program (either to be a mentor, receive mentorship or both). * Overview and affiliated events: http://icfp20.sigplan.org/home * Accepted papers: http://icfp20.sigplan.org/track/icfp-2020-papers#event-overview * JFP Talks: https://icfp20.sigplan.org/track/icfp-2020-jfp-talks#event-overview * Registration is available via: https://regmaster.com/2020conf/ICFP20/register.php Early registration ends 8 August, 2020. * Programming contest: https://icfpcontest2020.github.io/ The Programming Contest begins July 17th! * Student Research Competition: https://icfp20.sigplan.org/track/icfp-2020-Student-Research-Competition * Follow us on Twitter for the latest news: http://twitter.com/icfp_conference This year, there are 10 events co-located with ICFP: * Erlang Workshop (8/23) * Haskell Implementors' Workshop (8/28) * Haskell Symposium (8/27-8/28) * Higher-Order Programming with Effects (8/23) * miniKanren Workshop (8/27) * ML Family Workshop (8/27) * OCaml Workshop (8/28) * Programming Languages Mentoring Workshop (8/23) * Scheme Workshop (8/28) * Type-Driven Development (8/23) ### ICFP Organizers General Chair: Stephanie Weirich (University of Pennsylvania, USA) Program Chair: Adam Chlipala (MIT, USA) Artifact Evaluation Co-Chairs: Brent Yorgey (Hendrix College, USA) Ben Lippmeier (Ghost Locomotion, Australia) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organizer: Igor Lukanin (Kontur, Russia) Publicity and Web Chair: Sam Tobin-Hochstadt (Indiana University, USA) Student Research Competition Chair: Youyou Cong (Tokyo Institute of Technology, Japan) Workshops Co-Chair: Jennifer Hackett (University of Nottingham, UK) Leonidas Lampropoulos (University of Pennsylvania, USA) Video Chair: Leif Andersen (Northeastern University, USA) Student Volunteer Co-Chair: Hanneli Tavante (McGill University, Canada) Victor Lanvin (IRIF, Universit? Paris Diderot, France) From dan.doel at gmail.com Wed Jul 15 00:05:11 2020 From: dan.doel at gmail.com (Dan Doel) Date: Tue, 14 Jul 2020 18:05:11 -0400 Subject: [Agda] Cabal hell again In-Reply-To: <11E5A1F3-F7E9-4885-8281-B75F0D0CC501@nottingham.ac.uk> References: <11E5A1F3-F7E9-4885-8281-B75F0D0CC501@nottingham.ac.uk> Message-ID: The error message says that 'lib` is demanding base<4.13, but you are using GHC 8.8 which ships with base 4.13. The version of base is tied to the version of GHC. I would guess this is because you haven't pulled the std-lib submodule, just the agda repo. On Wed, Jul 8, 2020 at 5:52 AM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > I ended up in cabal hell again. What is the trick to get out of it? > > > > I did ghcup and I nuked .cabal but to no avail. What is going on? > > > > Thorsten > > > > > > psztxa at IMAC-DGKYNHM5JV3X agda % which cabal > > /Users/psztxa/.ghcup/bin/cabal > > psztxa at IMAC-DGKYNHM5JV3X agda % ghc --version > > The Glorious Glasgow Haskell Compilation System, version 8.8.3 > > psztxa at IMAC-DGKYNHM5JV3X agda % cabal --version > > cabal-install version 3.2.0.0 > > compiled using version 3.2.0.0 of the Cabal library > > psztxa at IMAC-DGKYNHM5JV3X agda % cabal update > > Downloading the latest package list from hackage.haskell.org > > To revert to previous state run: > > cabal v2-update 'hackage.haskell.org,2020-07-08T08:22:29Z' > > psztxa at IMAC-DGKYNHM5JV3X agda % git pull > > Already up to date. > > psztxa at IMAC-DGKYNHM5JV3X agda % cabal install > > cabal: Could not resolve dependencies: > > [__0] trying: Agda-2.6.2 (user goal) > > [__1] trying: base-4.13.0.0/installed-4.13.0.0 (dependency of Agda) > > [__2] next goal: lib (user goal) > > [__2] rejecting: lib-1.3 (conflict: base==4.13.0.0/installed-4.13.0.0, > lib => > > base>=4.8.0.0 && <4.13) > > [__2] fail (backjumping, conflict set: base, lib) > > After searching the rest of the dependency tree exhaustively, these were > the > > goals I've had most trouble fulfilling: base, lib, Agda > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From publicityifl at gmail.com Wed Jul 15 15:35:41 2020 From: publicityifl at gmail.com (Jurriaan Hage) Date: Wed, 15 Jul 2020 09:35:41 -0400 Subject: [Agda] Second call for draft papers for IFL 2020 (Implementation and Application of Functional Languages) Message-ID: Hello, Please, find below the second call for draft papers for IFL 2020. Please forward these to anyone you think may be interested. Apologies for any duplicates you may receive. best regards, Jurriaan Hage Publicity Chair of IFL ================================================================================ IFL 2020 32nd Symposium on Implementation and Application of Functional Languages venue: online 2nd - 4th September 2020 https://www.cs.kent.ac.uk/events/2020/ifl20/ ================================================================================ ### Scope The goal of the IFL symposia is to bring together researchers actively engaged in the implementation and application of functional and function-based programming languages. IFL 2020 will be a venue for researchers to present and discuss new ideas and concepts, work in progress, and publication-ripe results related to the implementation and application of functional languages and function-based programming. Topics of interest to IFL include, but are not limited to: - language concepts - type systems, type checking, type inferencing - compilation techniques - staged compilation - run-time function specialisation - run-time code generation - partial evaluation - (abstract) interpretation - meta-programming - generic programming - automatic program generation - array processing - concurrent/parallel programming - concurrent/parallel program execution - embedded systems - web applications - (embedded) domain specific languages - security - novel memory management techniques - run-time profiling performance measurements - debugging and tracing - virtual/abstract machine architectures - validation, verification of functional programs - tools and programming techniques - (industrial) applications ### Post-symposium peer-review Following IFL tradition, IFL 2020 will use a post-symposium review process to produce the formal proceedings. Before the symposium authors submit draft papers. These draft papers will be screened by the program chair to make sure that they are within the scope of IFL. The draft papers will be made available to all participants at the symposium. Each draft paper is presented by one of the authors at the symposium. After the symposium every presenter is invited to submit a full paper, incorporating feedback from discussions at the symposium. Work submitted to IFL may not be simultaneously submitted to other venues; submissions must adhere to ACM SIGPLAN's republication policy. The program committee will evaluate these submissions according to their correctness, novelty, originality, relevance, significance, and clarity, and will thereby determine whether the paper is accepted or rejected for the formal proceedings. We plan to publish these proceedings in the International Conference Proceedings Series of the ACM Digital Library, as in previous years. ### Important dates Submission deadline of draft papers: 17 August 2020 Notification of acceptance for presentation: 19 August 2020 Registration deadline: 31 August 2020 IFL Symposium: 2-4 September 2020 Submission of papers for proceedings: 7 December 2020 Notification of acceptance: 3 February 2021 Camera-ready version: 15 March 2021 ### Submission details All contributions must be written in English. Papers must use the ACM two columns conference format, which can be found at: http://www.acm.org/publications/proceedings-template ### Peter Landin Prize The Peter Landin Prize is awarded to the best paper presented at the symposium every year. The honoured article is selected by the program committee based on the submissions received for the formal review process. The prize carries a cash award equivalent to 150 Euros. ### Programme committee Kenichi Asai, Ochanomizu University, Japan Olaf Chitil, University of Kent, United Kingdom (chair) Martin Erwig, Oregon State University,United States Daniel Horpacsi, Eotvos Lorand University, Hungary Zhenjiang Hu, Peking University, China Hans-Wolfgang Loidl, Heriot-Watt University, United Kingdom Neil Mitchell, Facebook, UK Marco T. Morazan, Seton Hall University, United States Rinus Plasmeijer, Radboud University, Netherlands Colin Runciman, University of York, United Kingdom Mary Sheeran, Chalmers University of Technology, Sweden Josep Silva, Universitat Politecnica de Valencia, Spain Jurrien Stutterheim, Standard Chartered, Singapore Josef Svenningsson, Facebook, UK Peter Thiemann, University of Freiburg, Germany Kanae Tsushima, National Institute of Informatics, Japan. Marcos Viera, Universidad de la Republica, Montevideo, Uruguay Janis Voigtlander, University of Duisburg-Essen, Germany ### Virtual symposium Because of the Covid-19 pandemic, this year IFL 2020 will be an online event, consisting of paper presentations, discussions and virtual social gatherings. Registered participants can take part from anywhere in the world. ### Acknowledgments This call-for-papers is an adaptation and evolution of content from previous instances of IFL. We are grateful to prior organisers for their work, which is reused here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From icfp.publicity at googlemail.com Thu Jul 16 15:56:32 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Thu, 16 Jul 2020 09:56:32 -0400 Subject: [Agda] Final Call for Tutorials, Discussions, and Social Events: ICFP 2020 Message-ID: <5f105c90eb862_d5ed294-4bb@homer.mail> FINAL CALL FOR TUTORIAL, DISCUSSION, AND SOCIAL EVENT PROPOSALS ICFP 2020 25th ACM SIGPLAN International Conference on Functional Programming August 23 - 28, 2020 Virtual https://icfp20.sigplan.org/ The 25th ACM SIGPLAN International Conference on Functional Programming will be held virtually on August 23-28, 2020. ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. Proposals are invited for tutorials, lasting approximately 3 hours each, to be presented during ICFP and its co-located workshops and other events. These tutorials are the successor to the CUFP tutorials from previous years, but we also welcome tutorials whose primary audience is researchers rather than practitioners. Tutorials may focus either on a concrete technology or on a theoretical or mathematical tool. Ideally, tutorials will have a concrete result, such as "Learn to do X with Y" rather than "Learn language Y". To increase social interaction on the first ICFP virtual conference, this year we invite proposals for social events on topics of broader interest to the PL community. Such events can be panels and discussions (in the lines of the successful #ShutDownPL event), focused discussions (e.g., problem identifications, retrospective analysis, technical demos), social activities (e.g., treasure hunt, bingo, problem solving, artistic challenges). The typical duration of such events ranges from 30 minutes to one hour, but can be of any length. Tutorials may occur before or after ICFP, co-located with the associated workshops, on August 23 or August 27-28. Social events may be scheduled throughout the week. ---------------------------------------------------------------------- Submission details Deadline for submission: July 17th, 2020 Notification of acceptance: July 22nd, 2020 Prospective organizers of tutorials are invited to submit a completed tutorial proposal form in plain text format to the ICFP 2020 workshop co-chairs (Jennifer Hackett and Leonidas Lampropoulos), via email to icfp-workshops-2020 at googlegroups.com by July 17th, 2020. Please note that this is a firm deadline. Organizers will be notified if their event proposal is accepted by July 22nd, 2020. The proposal form is available at: http://www.icfpconference.org/icfp2020-files/icfp20-panel-form.txt http://www.icfpconference.org/icfp2020-files/icfp20-tutorials-form.txt ---------------------------------------------------------------------- Selection committee The proposals will be evaluated by a committee comprising the following members of the ICFP 2020 organizing committee. Tutorials Co-Chair: Jennifer Hackett (University of Nottingham) Tutorials Co-Chair: Leonidas Lampropoulos (University of Maryland) General Chair: Stephanie Weirich (University of Pennsylvania) Program Chair: Adam Chlipala (MIT) ---------------------------------------------------------------------- Further information Any queries should be addressed to the tutorial co-chairs (Jennifer Hackett and Leonidas Lampropoulos), via email to icfp-workshops-2020 at googlegroups.com From Thorsten.Altenkirch at nottingham.ac.uk Thu Jul 23 18:04:25 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 23 Jul 2020 16:04:25 +0000 Subject: [Agda] Problem with generalised variables Message-ID: <79E41EF0-E648-4123-8AF5-CBB72E68CE59@nottingham.ac.uk> Hi, I am writing some material about combinators and thought it is quite nice to use generalized variables for types: variable A B C : Set K : A ? B ? A K x y = x S : (A ? B ? C) ? (A ? B) ? (A ? C) S f g x = f x (g x) However, when I try to define I : A ? A I = S K K I run into the usual problem of an uninstantiated metavariable. Using explicit abstraction I was able to fix this by saying I : A ? A I = S K (K {B = A}) But when I try this in this setting I get quite a mouthy error message. Any advice? I don?t really want to introduce fake modules of possible because then I would to indent everything. Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.brunerie at gmail.com Thu Jul 23 18:30:50 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Thu, 23 Jul 2020 18:30:50 +0200 Subject: [Agda] Problem with generalised variables In-Reply-To: <79E41EF0-E648-4123-8AF5-CBB72E68CE59@nottingham.ac.uk> References: <79E41EF0-E648-4123-8AF5-CBB72E68CE59@nottingham.ac.uk> Message-ID: Hi Thorsten, I : A ? A I {A} = S K (K {B = A}) seems to work. Best, Guillaume Den tors 23 juli 2020 kl 18:04 skrev Thorsten Altenkirch : > > Hi, > > > > I am writing some material about combinators and thought it is quite nice to use generalized variables for types: > > > > variable > > A B C : Set > > > > K : A ? B ? A > > K x y = x > > > > S : (A ? B ? C) ? (A ? B) ? (A ? C) > > S f g x = f x (g x) > > > > However, when I try to define > > > > I : A ? A > > I = S K K > > > > I run into the usual problem of an uninstantiated metavariable. Using explicit abstraction I was able to fix this by saying > > > > I : A ? A > > I = S K (K {B = A}) > > > > But when I try this in this setting I get quite a mouthy error message. > > > > Any advice? I don?t really want to introduce fake modules of possible because then I would to indent everything. > > > > Thorsten > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Thorsten.Altenkirch at nottingham.ac.uk Thu Jul 23 19:00:44 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 23 Jul 2020 17:00:44 +0000 Subject: [Agda] Problem with generalised variables In-Reply-To: References: <79E41EF0-E648-4123-8AF5-CBB72E68CE59@nottingham.ac.uk> Message-ID: Thank you, Guillaume. I see the declaration I : A ? A Is just a shorthand for I : {A : Set} ? A ? A Hence if in the term I want to refer to A I have to introduce it as an explicit parameter. Cheers, Thorsten ?On 23/07/2020, 17:31, "Guillaume Brunerie" wrote: Hi Thorsten, I : A ? A I {A} = S K (K {B = A}) seems to work. Best, Guillaume Den tors 23 juli 2020 kl 18:04 skrev Thorsten Altenkirch : > > Hi, > > > > I am writing some material about combinators and thought it is quite nice to use generalized variables for types: > > > > variable > > A B C : Set > > > > K : A ? B ? A > > K x y = x > > > > S : (A ? B ? C) ? (A ? B) ? (A ? C) > > S f g x = f x (g x) > > > > However, when I try to define > > > > I : A ? A > > I = S K K > > > > I run into the usual problem of an uninstantiated metavariable. Using explicit abstraction I was able to fix this by saying > > > > I : A ? A > > I = S K (K {B = A}) > > > > But when I try this in this setting I get quite a mouthy error message. > > > > Any advice? I don?t really want to introduce fake modules of possible because then I would to indent everything. > > > > Thorsten > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From tarmo at cs.ioc.ee Thu Jul 23 22:03:21 2020 From: tarmo at cs.ioc.ee (Tarmo Uustalu) Date: Thu, 23 Jul 2020 23:03:21 +0300 Subject: [Agda] ETAPS 2021 1st joint call for papers Message-ID: <20200723230321.5a2f93cb@cs.ioc.ee> ****************************************************************** JOINT CALL FOR PAPERS 24th European Joint Conferences on Theory and Practice of Software ETAPS 2021 Luxembourg, Luxembourg, 27 March-1 April 2021 http://www.etaps.org/2021 ****************************************************************** -- ABOUT ETAPS -- ETAPS is the primary European forum for academic and industrial researchers working on topics relating to software science. ETAPS, established in 1998, is a confederation of four annual conferences, accompanied by satellite workshops. ETAPS 2021 is the twenty-fourth event in the series. -- MAIN CONFERENCES (29 March-1 April) -- * ESOP: European Symposium on Programming (PC chair: Nobuko Yoshida, Imperial College London, UK) * FASE: Fundamental Approaches to Software Engineering (PC chairs: Esther Guerra, Univ. Aut?noma de Madrid, Spain, and Mari?lle Stoelinga, Univ. Twente, The Netherlands) * FoSSaCS: Foundations of Software Science and Computation Structures (PC chairs: Stefan Kiefer, Univ. of Oxford, UK, and Christine Tasson, IRIF, Univ. Paris Diderot, France) * TACAS: Tools and Algorithms for the Construction and Analysis of Systems (PC chairs: Jan Friso Groote, Techn. Univ. Eindhoven, The Netherlands, and Kim G. Larsen, Aalborg Univ., Denmark) TACAS '21 will host the 10th Competition on Software Verification (SV-COMP). -- IMPORTANT DATES * Papers due: 15 October 2020 23:59 AoE (=GMT-12) * Rebuttal (ESOP, FoSSaCS and, for selected papers, TACAS): 7 December 00:01 AoE - 9 December 23:59 AoE * Notification: 23 December 2020 * Camera-ready versions due: 22 January 2021 -- SUBMISSION INSTRUCTIONS -- The four main conferences of ETAPS 2021 solicit contributions of the following types. All page limits are given **excluding bibliography**. * ESOP: regular research papers of max 25 pp * FASE: regular research papers and empirical evaluation papers of max 18 pp, tool demonstration papers of max 6 pp + mandatory appendix of max 6 pp, * FoSSaCS: regular research papers of max 18 pp * TACAS: regular research papers, case study papers and regular tool papers of max 16 pp, tool demonstration papers of max 6 pp For definitions of the different paper types and specific instructions, where they are present, see the webpages of the individual conferences. All accepted papers will appear in the conference proceedings and have presentations during the conference. A condition of submission is that, if the submission is accepted, one of the authors attends the conference to give the presentation. Submitted papers must be in English presenting original research. They must be unpublished and not submitted for publication elsewhere. In particular, simultaneous submission of the same contribution to multiple ETAPS conferences is forbidden. Submissions must follow the formatting guidelines of Springer's LNCS and be submitted electronically in pdf through the Easychair author interface of the respective conference. Submissions not adhering to the specified format and length may be rejected immediately. FASE will use double-blind reviewing. Authors are asked to omit their names and institutions; refer to own prior work in the third person; not to include acknowledgements that might identify them. Regular tool paper and tool demonstration paper submissions to TACAS must be accompanied by an artifact. The artifact will be evaluated and the outcome will be taken into account in the acceptance decision of the paper. ESOP and FoSSaCS will use an author rebuttal phase. TACAS will have rebuttal for selected papers. -- PUBLICATION The proceedings will be published in the Advanced Research in Computing and Software Science (ARCoSS) subline of Springer's LNCS series. The proceedings volumes will appear in gold open access, so the published versions of all papers will be available for everyone to download from the publisher's website freely, from the date of online publication, perpetually. The copyright of the papers will remain with the authors. -- SATELLITE EVENTS (27-28 March) -- A number of satellite workshops will take place before the main conferences. -- CITY AND HOST INSTITUTION -- Luxembourg is the capital of the small European nation of the same name. Built amid deep gorges cut by the Alzette and P?trusse rivers, it is famed for its ruins of medieval fortifications. The vast Bock Casemates tunnel network encompasses a dungeon, prison and the Archaeological Crypt, considered the city's birthplace. Along ramparts above, the Chemin de la Corniche promenade offers dramatic viewpoints. ETAPS 2021 is organised by the Interdisciplinary Centre for Security, Reliability and Trust (SnT), Universit? du Luxembourg. -- ORGANIZERS -- General chair: Peter Y. A. Ryan (SnT & Universit? du Luxembourg) Workshops chair: Joaquin Garcia-Alfaro (Telecom SudParis, France) Organization chair: Peter Roenne (SnT Luxembourg) Event manager: Magali Martin (SnT Luxembourg) -- FURTHER INFORMATION -- Please do not hesitate to contact the organizers at etaps2021 at uni.lu . From capn.freako at gmail.com Tue Jul 28 22:41:00 2020 From: capn.freako at gmail.com (David Banas) Date: Tue, 28 Jul 2020 13:41:00 -0700 Subject: [Agda] Emacs mode setup command failing. Message-ID: Hi all, Does anyone know what I need to do, to fix this? $ agda-mode.exe setup agda-mode.exe: emacs: rawSystem: does not exist (No such file or directory) Thanks, -db -------------- next part -------------- An HTML attachment was scrubbed... URL: From liang.ting.chen.tw at gmail.com Tue Jul 28 23:42:41 2020 From: liang.ting.chen.tw at gmail.com (Liang-Ting Chen) Date: Wed, 29 Jul 2020 05:42:41 +0800 Subject: [Agda] Emacs mode setup command failing. In-Reply-To: References: Message-ID: Hi, Is Emacs installed and in the $PATH? Just by inspecting the source code of Agda mode, it appears that your emacs cannot be found by the Windows shell. Agda-mode should report this error properly though... Best regards, Liang-Ting On Wed, Jul 29, 2020 at 04:41 David Banas wrote: > Hi all, > > Does anyone know what I need to do, to fix this? > > $ agda-mode.exe setup > agda-mode.exe: emacs: rawSystem: does not exist (No such file or directory) > > > Thanks, > -db > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Dr Liang-Ting Chen Institute of Information Science Academia Sinica, Taiwan -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Wed Jul 29 00:10:12 2020 From: capn.freako at gmail.com (David Banas) Date: Tue, 28 Jul 2020 15:10:12 -0700 Subject: [Agda] Emacs mode setup command failing. In-Reply-To: References: Message-ID: That was it, with a slight addition (see below). Thanks, Liang-Ting! -db $ agda-mode.exe setup emacs: standard input is not a tty Unable to query Emacs. $ winpty agda-mode.exe setup The .emacs file used: c:/Users/capnf/.emacs Setup done. Try to (re)start Emacs and open an Agda file. The following text was appended to the .emacs file: (load-file (let ((coding-system-for-read 'utf-8)) (shell-command-to-string "agda-mode.exe locate"))) On Tue, Jul 28, 2020 at 2:42 PM Liang-Ting Chen < liang.ting.chen.tw at gmail.com> wrote: > Hi, > > Is Emacs installed and in the $PATH? > > Just by inspecting the source code of Agda mode, it appears that your > emacs cannot be found by the Windows shell. > > Agda-mode should report this error properly though... > > Best regards, > Liang-Ting > > On Wed, Jul 29, 2020 at 04:41 David Banas wrote: > >> Hi all, >> >> Does anyone know what I need to do, to fix this? >> >> $ agda-mode.exe setup >> agda-mode.exe: emacs: rawSystem: does not exist (No such file or >> directory) >> >> >> Thanks, >> -db >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -- > Dr Liang-Ting Chen > Institute of Information Science > Academia Sinica, Taiwan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Wed Jul 29 01:26:20 2020 From: capn.freako at gmail.com (David Banas) Date: Tue, 28 Jul 2020 16:26:20 -0700 Subject: [Agda] List of fonts required for Emacs mode? Message-ID: Hi, Would someone be so kind as to post the list of required fonts for the Agda Emacs mode? I can't seem to find them in the documentation. Thanks, -db -------------- next part -------------- An HTML attachment was scrubbed... URL: From puttamalac at gmail.com Wed Jul 29 11:47:07 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Wed, 29 Jul 2020 11:47:07 +0200 Subject: [Agda] List of fonts required for Emacs mode? In-Reply-To: References: Message-ID: Hi, Strictly speaking, there isn't a required font, rather, people tend to use monospace fonts with good unicode support. I personally use DejaVu Sans Mono. The PLFA book recommends Mononoki . David Banas ezt ?rta (id?pont: 2020. j?l. 29., Sze, 1:26): > Hi, > > Would someone be so kind as to post the list of required fonts for the > Agda Emacs mode? > I can't seem to find them in the documentation. > > Thanks, > -db > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Wed Jul 29 15:54:49 2020 From: capn.freako at gmail.com (David Banas) Date: Wed, 29 Jul 2020 06:54:49 -0700 Subject: [Agda] List of fonts required for Emacs mode? In-Reply-To: References: Message-ID: Okay, thanks. Do you, then, set the value of the *agda2-fontset-name* variable to < *DejaVu*/*Mononoki* proper font name>, as opposed to "fontset-agda2"? -db On Wed, Jul 29, 2020 at 2:47 AM Andr?s Kov?cs wrote: > Hi, > > Strictly speaking, there isn't a required font, rather, people tend to use > monospace fonts with good unicode support. > I personally use DejaVu Sans Mono. The PLFA book recommends Mononoki > . > > David Banas ezt ?rta (id?pont: 2020. j?l. 29., > Sze, 1:26): > >> Hi, >> >> Would someone be so kind as to post the list of required fonts for the >> Agda Emacs mode? >> I can't seem to find them in the documentation. >> >> Thanks, >> -db >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From puttamalac at gmail.com Wed Jul 29 17:42:13 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Wed, 29 Jul 2020 17:42:13 +0200 Subject: [Agda] List of fonts required for Emacs mode? In-Reply-To: References: Message-ID: I've only used "options->set default font" in the emacs menu bar, that sets the font globally. David Banas ezt ?rta (id?pont: 2020. j?l. 29., Sze, 15:55): > Okay, thanks. > > Do you, then, set the value of the *agda2-fontset-name* variable to < > *DejaVu*/*Mononoki* proper font name>, as opposed to "fontset-agda2"? > > -db > > > On Wed, Jul 29, 2020 at 2:47 AM Andr?s Kov?cs > wrote: > >> Hi, >> >> Strictly speaking, there isn't a required font, rather, people tend to >> use monospace fonts with good unicode support. >> I personally use DejaVu Sans Mono. The PLFA book recommends Mononoki >> . >> >> David Banas ezt ?rta (id?pont: 2020. j?l. 29., >> Sze, 1:26): >> >>> Hi, >>> >>> Would someone be so kind as to post the list of required fonts for the >>> Agda Emacs mode? >>> I can't seem to find them in the documentation. >>> >>> Thanks, >>> -db >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Wed Jul 29 19:22:05 2020 From: capn.freako at gmail.com (David Banas) Date: Wed, 29 Jul 2020 10:22:05 -0700 Subject: [Agda] List of fonts required for Emacs mode? In-Reply-To: References: Message-ID: <52279A2A-AC7D-41D0-9F2A-17205FEBAEF7@gmail.com> Oh, I see. So, you?ve left the agda2-fontset-name variable at its default value: nil, then? I guess I went too deep and should?ve taken the simpler path; D?oh! ;-) Thanks! -db > On Jul 29, 2020, at 8:42 AM, Andr?s Kov?cs wrote: > > I've only used "options->set default font" in the emacs menu bar, that sets the font globally. > > David Banas > ezt ?rta (id?pont: 2020. j?l. 29., Sze, 15:55): > Okay, thanks. > > Do you, then, set the value of the agda2-fontset-name variable to , as opposed to "fontset-agda2"? > > -db > > > On Wed, Jul 29, 2020 at 2:47 AM Andr?s Kov?cs > wrote: > Hi, > > Strictly speaking, there isn't a required font, rather, people tend to use monospace fonts with good unicode support. > I personally use DejaVu Sans Mono. The PLFA book recommends Mononoki . > > David Banas > ezt ?rta (id?pont: 2020. j?l. 29., Sze, 1:26): > Hi, > > Would someone be so kind as to post the list of required fonts for the Agda Emacs mode? > I can't seem to find them in the documentation. > > Thanks, > -db > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Aug 2 14:16:30 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 2 Aug 2020 12:16:30 +0000 Subject: [Agda] Shadowing definitions Message-ID: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> Hi guys, I am currently working on my book ?The Tao of Types? and I am now using literate agda and lhs2tex with agda mode . One issue is that for pedagogical reasons I like to repeat definitions but agda doesn?t allow this. Ok, I can declare the first definition as a spec which means it is ingnored by literate agda. I don?t really like this because it means that there is no type checking for the first definition. Also in some cases this doesn?t work and I have to go through all sort of tricks to make the code work. Is there a workaround, or would it be possible to allow shadowing (unsafely)? Btw, another problem I have is to switch between agda-mode and latex-mode in emacs. I discovered that C-C C-n in latex mode switches to agda mode (not sure why) is there a key combination to switch from agda to latex? Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiemann at informatik.uni-freiburg.de Sun Aug 2 14:57:13 2020 From: thiemann at informatik.uni-freiburg.de (Peter Thiemann) Date: Sun, 2 Aug 2020 14:57:13 +0200 Subject: [Agda] Shadowing definitions In-Reply-To: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> References: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> Message-ID: Hi Thorsten, how about stating the definition first in a module? You can use latex tricks to hide the declaration of the module as well its opening on subsequent uses. Re switching modes in Emacs, it is possible to define such keys by adding two lines to your .emacs. Unfortunately, my Emacs Lisp is rusty so I won't give it a start right now. Best -Peter On 2. August 2020 at 14:16:52, Thorsten Altenkirch (thorsten.altenkirch at nottingham.ac.uk) wrote: > Hi guys, > > I am currently working on my book ?The Tao of Types? and I am now using literate agda and > lhs2tex with agda mode . One issue is that for pedagogical reasons I like to repeat definitions > but agda doesn?t allow this. Ok, I can declare the first definition as a spec which means > it is ingnored by literate agda. I don?t really like this because it means that there is > no type checking for the first definition. Also in some cases this doesn?t work and I have > to go through all sort of tricks to make the code work. Is there a workaround, or would it > be possible to allow shadowing (unsafely)? > > Btw, another problem I have is to switch between agda-mode and latex-mode in emacs. I > discovered that C-C C-n in latex mode switches to agda mode (not sure why) is there a key > combination to switch from agda to latex? > > Cheers, > Thorsten > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From wadler at inf.ed.ac.uk Sun Aug 2 14:58:40 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Sun, 2 Aug 2020 13:58:40 +0100 Subject: [Agda] Shadowing definitions In-Reply-To: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> References: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> Message-ID: Thorsten, would the following trick work? Go well, -- P \definemacro{\mydef}{ \begin{code} answer = 42 \end{code} ... first use of definition ... \mydef ... second use of same definition ... \mydef . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Sun, 2 Aug 2020 at 13:16, Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > Hi guys, > > > > I am currently working on my book ?The Tao of Types? and I am now using > literate agda and lhs2tex with agda mode . One issue is that for > pedagogical reasons I like to repeat definitions but agda doesn?t allow > this. Ok, I can declare the first definition as a spec which means it is > ingnored by literate agda. I don?t really like this because it means that > there is no type checking for the first definition. Also in some cases this > doesn?t work and I have to go through all sort of tricks to make the code > work. Is there a workaround, or would it be possible to allow shadowing > (unsafely)? > > > > Btw, another problem I have is to switch between agda-mode and latex-mode > in emacs. I discovered that C-C C-n in latex mode switches to agda mode > (not sure why) is there a key combination to switch from agda to latex? > > > > Cheers, > > Thorsten > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Aug 2 15:03:01 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 2 Aug 2020 13:03:01 +0000 Subject: [Agda] Shadowing definitions In-Reply-To: References: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> Message-ID: <34293BFA-9882-44CE-BB19-1A09EDC7617A@nottingham.ac.uk> ?On 02/08/2020, 13:57, "Peter Thiemann" wrote: Hi Thorsten, how about stating the definition first in a module? Maybe I misunderstand you but this doesn't seem to help. E.g. if I do module _ where X : Set X = ? module _ where X : Set X = ? I get an error. You can use latex tricks to hide the declaration of the module as well its opening on subsequent uses. Yes, I have been doing this using lhs2tex's %if false . One slight nuisance is that this changes the indentation of the code. Re switching modes in Emacs, it is possible to define such keys by adding two lines to your .emacs. Unfortunately, my Emacs Lisp is rusty so I won't give it a start right now. Same here. __ Thorsten Best -Peter On 2. August 2020 at 14:16:52, Thorsten Altenkirch (thorsten.altenkirch at nottingham.ac.uk) wrote: > Hi guys, > > I am currently working on my book ?The Tao of Types? and I am now using literate agda and > lhs2tex with agda mode . One issue is that for pedagogical reasons I like to repeat definitions > but agda doesn?t allow this. Ok, I can declare the first definition as a spec which means > it is ingnored by literate agda. I don?t really like this because it means that there is > no type checking for the first definition. Also in some cases this doesn?t work and I have > to go through all sort of tricks to make the code work. Is there a workaround, or would it > be possible to allow shadowing (unsafely)? > > Btw, another problem I have is to switch between agda-mode and latex-mode in emacs. I > discovered that C-C C-n in latex mode switches to agda mode (not sure why) is there a key > combination to switch from agda to latex? > > Cheers, > Thorsten > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From Thorsten.Altenkirch at nottingham.ac.uk Sun Aug 2 15:05:04 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 2 Aug 2020 13:05:04 +0000 Subject: [Agda] Shadowing definitions In-Reply-To: References: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> Message-ID: <8C5FEA29-E76E-424A-BE9F-113E03BD5767@nottingham.ac.uk> Thanks for the tip. This works but usually the 2nd definition is a slight modification of the first. E.g. first I show how constructors can be derived and then I mention that one can use the constructor keyword? Thorsten From: Philip Wadler Date: Sunday, 2 August 2020 at 13:59 To: Thorsten Altenkirch Cc: "agda at lists.chalmers.se" Subject: Re: [Agda] Shadowing definitions Thorsten, would the following trick work? Go well, -- P \definemacro{\mydef}{ \begin{code} answer = 42 \end{code} ... first use of definition ... \mydef ... second use of same definition ... \mydef . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Sun, 2 Aug 2020 at 13:16, Thorsten Altenkirch > wrote: Hi guys, I am currently working on my book ?The Tao of Types? and I am now using literate agda and lhs2tex with agda mode . One issue is that for pedagogical reasons I like to repeat definitions but agda doesn?t allow this. Ok, I can declare the first definition as a spec which means it is ingnored by literate agda. I don?t really like this because it means that there is no type checking for the first definition. Also in some cases this doesn?t work and I have to go through all sort of tricks to make the code work. Is there a workaround, or would it be possible to allow shadowing (unsafely)? Btw, another problem I have is to switch between agda-mode and latex-mode in emacs. I discovered that C-C C-n in latex mode switches to agda mode (not sure why) is there a key combination to switch from agda to latex? Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrytheliquid at gmail.com Sun Aug 2 15:38:13 2020 From: larrytheliquid at gmail.com (Larrytheliquid) Date: Sun, 2 Aug 2020 09:38:13 -0400 Subject: [Agda] Shadowing definitions In-Reply-To: <8C5FEA29-E76E-424A-BE9F-113E03BD5767@nottingham.ac.uk> References: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> <8C5FEA29-E76E-424A-BE9F-113E03BD5767@nottingham.ac.uk> Message-ID: Hi Thorsten, I handled this in my thesis with modules as suggested, for example see `generic` getting repeated here: https://github.com/larrytheliquid/thesis/blob/master/paper/Thesis/AST.lagda#L386-L422 Note for nested modules you need to indent your code, which makes the output also contain indented code because I `AgdaHide` the module declaration. It's definitely a hack, but because I consistently use this style I modified `agda.sty` to always negative indent 2 spaces so the resulting code always looks top-level. On Sun, Aug 2, 2020 at 9:05 AM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > Thanks for the tip. > > > > This works but usually the 2nd definition is a slight modification of the > first. E.g. first I show how constructors can be derived and then I mention > that one can use the constructor keyword? > > > > Thorsten > > > > *From: *Philip Wadler > *Date: *Sunday, 2 August 2020 at 13:59 > *To: *Thorsten Altenkirch > *Cc: *"agda at lists.chalmers.se" > *Subject: *Re: [Agda] Shadowing definitions > > > > Thorsten, would the following trick work? Go well, -- P > > > > \definemacro{\mydef}{ > > \begin{code} > > answer = 42 > > \end{code} > > > > ... first use of definition ... > > \mydef > > ... second use of same definition ... > > \mydef > > > > > . \ Philip Wadler, Professor of Theoretical Computer Science, > . /\ School of Informatics, University of Edinburgh > > . / \ and Senior Research Fellow, IOHK > > . http://homepages.inf.ed.ac.uk/wadler/ > > > > > > > > On Sun, 2 Aug 2020 at 13:16, Thorsten Altenkirch < > Thorsten.Altenkirch at nottingham.ac.uk> wrote: > > Hi guys, > > > > I am currently working on my book ?The Tao of Types? and I am now using > literate agda and lhs2tex with agda mode . One issue is that for > pedagogical reasons I like to repeat definitions but agda doesn?t allow > this. Ok, I can declare the first definition as a spec which means it is > ingnored by literate agda. I don?t really like this because it means that > there is no type checking for the first definition. Also in some cases this > doesn?t work and I have to go through all sort of tricks to make the code > work. Is there a workaround, or would it be possible to allow shadowing > (unsafely)? > > > > Btw, another problem I have is to switch between agda-mode and latex-mode > in emacs. I discovered that C-C C-n in latex mode switches to agda mode > (not sure why) is there a key combination to switch from agda to latex? > > > > Cheers, > > Thorsten > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please contact the sender and delete the email and > > attachment. > > > > Any views or opinions expressed by the author of this email do not > > necessarily reflect the views of the University of Nottingham. Email > > communications with the University of Nottingham may be monitored > > where permitted by law. > > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Respectfully, Larry Diehl -------------- next part -------------- An HTML attachment was scrubbed... URL: From larrytheliquid at gmail.com Sun Aug 2 19:00:38 2020 From: larrytheliquid at gmail.com (Larrytheliquid) Date: Sun, 2 Aug 2020 13:00:38 -0400 Subject: [Agda] Shadowing definitions In-Reply-To: <132A7224-9156-4A54-9136-19C4FE7749B9@nottingham.ac.uk> References: <59E2E759-7C83-4F3C-835C-54D0658FE2C4@nottingham.ac.uk> <8C5FEA29-E76E-424A-BE9F-113E03BD5767@nottingham.ac.uk> <132A7224-9156-4A54-9136-19C4FE7749B9@nottingham.ac.uk> Message-ID: Hi Thorsten, These are the 3 files that they could be in, but it's been a while so I don't remember where I did the configuration: https://github.com/larrytheliquid/thesis/blob/master/paper/agda.sty https://github.com/larrytheliquid/thesis/blob/master/paper/psu-thesis.sty https://github.com/larrytheliquid/thesis/blob/master/paper/thesis.tex However, it looks like the newest agda.sty has more configuration options than it did years ago: https://github.com/agda/agda/blob/master/src/data/agda.sty For example, it might be enough to turn off the initial space around code: \AgdaNoSpaceAroundCode There's more config options and commands related to this but I'm unfamiliar with them. Also, it looks like AgdaHide still exists ( https://github.com/agda/agda/blob/master/src/data/agda.sty#L339-L343) but is deprecated in favor of begin{code}[hide] On Sun, Aug 2, 2020 at 11:39 AM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > Hi Larry, > > > > Thank you for your email. Yes, this sounds like a good idea. Ok I forgot > that I can say private in the module declaration. > > > > Btw, is \AgdaHide predefined? I am just using %if false but this looks > nicer. > > > > Can you share your modification of agda.sty? > > > > Cheers, > > Thorsten > > > > *From: *Agda on behalf of Larrytheliquid > > *Date: *Sunday, 2 August 2020 at 14:38 > *To: *Thorsten Altenkirch > *Cc: *"agda at lists.chalmers.se" > *Subject: *Re: [Agda] Shadowing definitions > > > > Hi Thorsten, > > > > I handled this in my thesis with modules as suggested, for example see > `generic` getting repeated here: > > > https://github.com/larrytheliquid/thesis/blob/master/paper/Thesis/AST.lagda#L386-L422 > > > > Note for nested modules you need to indent your code, which makes the > output also contain > > indented code because I `AgdaHide` the module declaration. It's definitely > a hack, but because > > I consistently use this style I modified `agda.sty` to always negative > indent 2 spaces so the resulting > > code always looks top-level. > > > > On Sun, Aug 2, 2020 at 9:05 AM Thorsten Altenkirch < > Thorsten.Altenkirch at nottingham.ac.uk> wrote: > > Thanks for the tip. > > > > This works but usually the 2nd definition is a slight modification of the > first. E.g. first I show how constructors can be derived and then I mention > that one can use the constructor keyword? > > > > Thorsten > > > > *From: *Philip Wadler > *Date: *Sunday, 2 August 2020 at 13:59 > *To: *Thorsten Altenkirch > *Cc: *"agda at lists.chalmers.se" > *Subject: *Re: [Agda] Shadowing definitions > > > > Thorsten, would the following trick work? Go well, -- P > > > > \definemacro{\mydef}{ > > \begin{code} > > answer = 42 > > \end{code} > > > > ... first use of definition ... > > \mydef > > ... second use of same definition ... > > \mydef > > > > > . \ Philip Wadler, Professor of Theoretical Computer Science, > . /\ School of Informatics, University of Edinburgh > > . / \ and Senior Research Fellow, IOHK > > . http://homepages.inf.ed.ac.uk/wadler/ > > > > > > > > On Sun, 2 Aug 2020 at 13:16, Thorsten Altenkirch < > Thorsten.Altenkirch at nottingham.ac.uk> wrote: > > Hi guys, > > > > I am currently working on my book ?The Tao of Types? and I am now using > literate agda and lhs2tex with agda mode . One issue is that for > pedagogical reasons I like to repeat definitions but agda doesn?t allow > this. Ok, I can declare the first definition as a spec which means it is > ingnored by literate agda. I don?t really like this because it means that > there is no type checking for the first definition. Also in some cases this > doesn?t work and I have to go through all sort of tricks to make the code > work. Is there a workaround, or would it be possible to allow shadowing > (unsafely)? > > > > Btw, another problem I have is to switch between agda-mode and latex-mode > in emacs. I discovered that C-C C-n in latex mode switches to agda mode > (not sure why) is there a key combination to switch from agda to latex? > > > > Cheers, > > Thorsten > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please contact the sender and delete the email and > > attachment. > > > > Any views or opinions expressed by the author of this email do not > > necessarily reflect the views of the University of Nottingham. Email > > communications with the University of Nottingham may be monitored > > where permitted by law. > > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please contact the sender and delete the email and > > attachment. > > > > Any views or opinions expressed by the author of this email do not > > necessarily reflect the views of the University of Nottingham. Email > > communications with the University of Nottingham may be monitored > > where permitted by law. > > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > > > -- > > Respectfully, > Larry Diehl > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -- Respectfully, Larry Diehl -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.basold at liacs.leidenuniv.nl Sun Aug 2 22:47:26 2020 From: h.basold at liacs.leidenuniv.nl (Henning Basold) Date: Sun, 2 Aug 2020 22:47:26 +0200 Subject: [Agda] CMCS 2020: Call for Participation Message-ID: Call for Participation The 15th International Workshop on Coalgebraic Methods in Computer Science (CMCS'20) ONLINE, Sept-Oct 2020 https://coalg.org/cmcs20 Update: CMCS 2020 will be held virtually, as a series of approximately three hour sessions spread across five weeks, according to the following tentative schedule: ? 21/09/2020, 15:00 ? 18:00 CEST ? 28/09/2020, 10:00 ? 13:00 CEST ? 05/10/2020, 15:00 ? 18:00 CEST ? 12/10/2020, 10:00 ? 13:00 CEST ? 19/10/2020, 10:00 ? 13:00 CEST The exact schedule will be determined and announced in August. Registration will be free (details will follow), but please subscribe to the coalgebra mailing list for updates: https://framalistes.org/sympa/subscribe/coalgebra Objectives and scope -------------------- Established in 1998, the CMCS workshops aim to bring together researchers with a common interest in the theory of coalgebras, their logics, and their applications. As the workshop series strives to maintain breadth in its scope, areas of interest include neighbouring fields as well. Topics of interest include, but are not limited to, the following: - the theory of coalgebras (including set theoretic and categorical approaches); - coalgebras as computational and semantical models (for programming languages, dynamical systems, term rewriting, etc.); - coalgebras in (functional, object-oriented, concurrent, and constraint) programming; - coalgebraic data types, type systems and behavioural typing; - coinductive definition and proof principles for coalgebras (including "up-to" techniques); - coalgebras and algebras; - coalgebras and (modal) logic; - coalgebraic specification and verification; - coalgebra and control theory (notably of discrete event and hybrid systems); - coalgebra in quantum computing; - coalgebra and game theory; - tools exploiting coalgebraic techniques. Venue and event --------------- Online, see above. Keynote Speaker --------------- Yde Venema (ILLC, University of Amsterdam, The Netherlands) Invited Speakers ---------------- Nathana?l Fijalkow (CNRS, LaBRI, University of Bordeaux, France) Koko Muroya (RIMS, Kyoto University, Japan) Invited Tutorial Speakers ------------------------- There will be a special session on probabilistic couplings, with invited tutorials by: Marco Gaboardi (University at Buffalo, US) Justin Hsu (University of Wisconsin-Madison, US) Programme committee ------------------- Henning Basold, Leiden University, The Netherlands Nick Bezhanishvili, University of Amsterdam, The Netherlands Corina Cirstea, University of Southampton, United Kingdom Mai Gehrke, CNRS and Universit? C?te d'Azur, France Helle Hvid Hansen, Delft University of Technology, The Netherlands Shin-Ya Katsumata, National Institute of Informatics, Japan Bartek Klin, Warsaw University, Poland Ekaterina Komendantskaya, Heriot-Watt University, United Kingdom Barbara K?nig, University of Duisburg-Essen, Germany Dexter Kozen, Cornell University, USA Clemens Kupke, University of Strathclyde, United Kingdom Alexander Kurz, Chapman University, USA Daniela Petrisan, Universit? de Paris, IRIF, France Andrei Popescu, Middlesex University London, United Kingdom Damien Pous, CNRS and ENS Lyon, France Jurriaan Rot, UCL and Radboud University, The Netherlands Davide Sangiorgi, University of Bologna, Italy Ana Sokolova, University of Salzburg, Austria David Sprunger, National Institute of Informatics, Japan Henning Urbat, University of Erlangen-Nuremberg, Germany Fabio Zanasi, University College London, United Kingdom Publicity chair --------------- Henning Basold, Leiden University, The Netherlands PC co-chairs -------------- Daniela Petrisan, Universit? de Paris, IRIF, France Jurriaan Rot, UCL and Radboud University, The Netherlands Steering committee ------------------ Filippo Bonchi, University of Pisa, Italy Marcello Bonsangue, Leiden University, The Netherlands Corina Cirstea, University of Southampton, United Kingdom Ichiro Hasuo, National Institute of Informatics, Japan Bart Jacobs, Radboud University Nijmegen, The Netherlands Bartek Klin, University of Warsaw, Poland Alexander Kurz, Chapman University, USA Marina Lenisa, University of Udine, Italy Stefan Milius (chair), University of Erlangen-Nuremberg, Germany Larry Moss, Indiana University, USA Dirk Pattinson, Australian National University, Australia Lutz Schr?der, University of Erlangen-Nuremberg, Germany Alexandra Silva, University College London, United Kingdom Accepted papers --------------------- For a list of accepted papers and short contributions, see https://www.coalg.org/cmcs20/accepted-papers/ -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 3110 bytes Desc: not available URL: From guillaume.allais at ens-lyon.org Mon Aug 3 11:43:49 2020 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Mon, 3 Aug 2020 10:43:49 +0100 Subject: [Agda] Problem with generalised variables In-Reply-To: References: <79E41EF0-E648-4123-8AF5-CBB72E68CE59@nottingham.ac.uk> Message-ID: <3d315b9f-7f98-d241-ccb7-89c9cf00cd22@ens-lyon.org> Hi Thorsten, Note that we have an issue open to make this the default behaviour: https://github.com/agda/agda/issues/3447 This is what Idris 2 does (unless the variable is explicitly re-bound on the LHS by the user). Cheers, On 23/07/2020 18:00, Thorsten Altenkirch wrote: > Thank you, Guillaume. > > I see the declaration > I : A ? A > Is just a shorthand for > I : {A : Set} ? A ? A > > Hence if in the term I want to refer to A I have to introduce it as an explicit parameter. > > Cheers, > Thorsten > > ?On 23/07/2020, 17:31, "Guillaume Brunerie" wrote: > > Hi Thorsten, > > I : A ? A > I {A} = S K (K {B = A}) > > seems to work. > > Best, > Guillaume > > Den tors 23 juli 2020 kl 18:04 skrev Thorsten Altenkirch > : > > > > Hi, > > > > > > > > I am writing some material about combinators and thought it is quite nice to use generalized variables for types: > > > > > > > > variable > > > > A B C : Set > > > > > > > > K : A ? B ? A > > > > K x y = x > > > > > > > > S : (A ? B ? C) ? (A ? B) ? (A ? C) > > > > S f g x = f x (g x) > > > > > > > > However, when I try to define > > > > > > > > I : A ? A > > > > I = S K K > > > > > > > > I run into the usual problem of an uninstantiated metavariable. Using explicit abstraction I was able to fix this by saying > > > > > > > > I : A ? A > > > > I = S K (K {B = A}) > > > > > > > > But when I try this in this setting I get quite a mouthy error message. > > > > > > > > Any advice? I don?t really want to introduce fake modules of possible because then I would to indent everything. > > > > > > > > Thorsten > > > > > > > > > > > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please contact the sender and delete the email and > > attachment. > > > > Any views or opinions expressed by the author of this email do not > > necessarily reflect the views of the University of Nottingham. Email > > communications with the University of Nottingham may be monitored > > where permitted by law. > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cguillaume.allais%40strath.ac.uk%7C2768b321b70d447e178608d82f29f5d7%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637311204557261402&sdata=anyyMqR84gQq2sYHravBjZY0r2fjIeDI1s0%2BVy6o6aw%3D&reserved=0 > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cguillaume.allais%40strath.ac.uk%7C2768b321b70d447e178608d82f29f5d7%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637311204557261402&sdata=anyyMqR84gQq2sYHravBjZY0r2fjIeDI1s0%2BVy6o6aw%3D&reserved=0 > From icfp.publicity at googlemail.com Fri Aug 7 04:47:15 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Thu, 06 Aug 2020 22:47:15 -0400 Subject: [Agda] Second Call for Participation: ICFP 2020 Message-ID: <5f2cc0b38c387_1e99e294-490@homer.mail> ===================================================================== Second Call for Participation ICFP 2020 25th ACM SIGPLAN International Conference on Functional Programming and affiliated events August 23 - August 28, 2020 Online http://icfp20.sigplan.org/ Early Registration ends August 8! ==================================================================== ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. The conference covers the entire spectrum of work, from practice to theory, including its peripheries. Watch our new video, and Don't Stop ICFP: https://www.youtube.com/watch?v=Fte5wwnwCws Early Registration ends August 8th! Registration for students with an ACM or SIGPLAN membership is free, and anyone can apply for a fee waiver at: https://icfp20.sigplan.org/attending/Registration This year, the conference will be a virtual event. All activities will take place online. The main conference will take place from August 24-26, 2020 during two time bands. The first band will be 9AM-5:30PM New York, and will include both technical and social activities. The second band will repeat (with some variation) the technical program and social activities 12 hours later, 9AM-5:30PM Beijing, the following day. We've written a blog post about how conference mirroring will work for ICFP: https://blog.sigplan.org/2020/08/04/come-to-virtual-icfp/ We?re excited to announce our two invited speakers for 2020: Evan Czaplicki, covering the Elm programming language and hard lessons learned on driving adoption of new programming languages; and Audrey Tang, Haskeller and Taiwan?s Digital Minister, on how software developers can contribute to fighting the pandemic. ICFP has officially accepted 37 exciting papers, and (as a fresh experiment this year) there will also be presentations of 8 papers accepted recently to the Journal of Functional Programming. Co-located symposia and workshops will take place the day before and two days immediately after the main conference. Registration is now open. The early registration deadline is August 8th, 2020. Registration is not free, but is significantly lower than usual. Students who are ACM or SIGPLAN members may register for FREE before the early deadline. https://regmaster.com/2020conf/ICFP20/register.php New this year: Attendees will be able to sign-up for the ICFP Mentoring Program (either to be a mentor, receive mentorship or both). * Overview and affiliated events: http://icfp20.sigplan.org/home * Full Schedule: https://icfp20.sigplan.org/program/program-icfp-2020 * Accepted papers: http://icfp20.sigplan.org/track/icfp-2020-papers#event-overview * JFP Talks: https://icfp20.sigplan.org/track/icfp-2020-jfp-talks#event-overview * Registration is available via: https://regmaster.com/2020conf/ICFP20/register.php Early registration ends 8 August, 2020. * Programming contest: https://icfpcontest2020.github.io/ * Student Research Competition: https://icfp20.sigplan.org/track/icfp-2020-Student-Research-Competition * Follow us on Twitter for the latest news: http://twitter.com/icfp_conference This year, there are 10 events co-located with ICFP: * Erlang Workshop (8/23) * Haskell Implementors' Workshop (8/28) * Haskell Symposium (8/27-8/28) * Higher-Order Programming with Effects (8/23) * miniKanren Workshop (8/27) * ML Family Workshop (8/27) * OCaml Workshop (8/28) * Programming Languages Mentoring Workshop (8/23) * Scheme Workshop (8/28) * Type-Driven Development (8/23) ### ICFP Organizers General Chair: Stephanie Weirich (University of Pennsylvania, USA) Program Chair: Adam Chlipala (MIT, USA) Artifact Evaluation Co-Chairs: Brent Yorgey (Hendrix College, USA) Ben Lippmeier (Ghost Locomotion, Australia) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organizer: Igor Lukanin (Kontur, Russia) Publicity and Web Chair: Sam Tobin-Hochstadt (Indiana University, USA) Student Research Competition Chair: Youyou Cong (Tokyo Institute of Technology, Japan) Workshops Co-Chair: Jennifer Hackett (University of Nottingham, UK) Leonidas Lampropoulos (University of Pennsylvania, USA) Video Chair: Leif Andersen (Northeastern University, USA) Student Volunteer Co-Chair: Hanneli Tavante (McGill University, Canada) Victor Lanvin (IRIF, Universit? Paris Diderot, France) From icfp.publicity at googlemail.com Fri Aug 7 18:36:54 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Fri, 07 Aug 2020 12:36:54 -0400 Subject: [Agda] Call for Tutorial Participation: ICFP 2020 Message-ID: <5f2d83267c6fc_1fbf62941495a@homer.mail> CALL FOR TUTORIAL PARTICIPATION ICFP 2020 25th ACM SIGPLAN International Conference on Functional Programming August 23 - 28, 2020 Virtual https://icfp20.sigplan.org/ Early Registration ends August 8! The 25th ACM SIGPLAN International Conference on Functional Programming will be held virtually on August 23-28, 2020. ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. This year, ICFP features a wide variety of tutorials on topics related to functional programming, including design, education, tools, and more. Tutorials are available to all ICFP participants with registration. Tutorials occur before or after ICFP, co-located with the associated workshops, on August 23 or August 27-28. The schedule of ICFP Tutorials can be found at: https://icfp20.sigplan.org/track/icfp-2020-tutorials#program ICFP Early Registration ends on August 8th, and is available at: https://icfp20.sigplan.org/attending/Registration From mechvel at scico.botik.ru Mon Aug 10 18:04:36 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 10 Aug 2020 19:04:36 +0300 Subject: [Agda] problem with algebraic hierarchy Message-ID: <30cf7fc518d9048fe98f1ceb01a537b5@scico.botik.ru> We wrote the following to GitHub for the library: mechvel ------- I wonder: how to express in Agda-2.6.1 + lib-1.3 the following discourse? Let R and U be semirings having the same additive monoid (+-commutativeMonoid). Denote * and *' the multiplication operators in R and U respectively, 1# and e the unities in R and U respectively. Prove in Agda that for all x in R it holds (1# + 1#) * x ? (e + e) *' x -- (I) And let us assume that the lemma 2*as+ : ? x ? (1# + 1#) * x ? x + x is proved in the module OfSemiring parameterized by Semiring (it is proved simply in 2-4 steps). Mathematically, the statement (I) has sense. And its proof is simple: the left hand side equals x + x by the laws of R; the right hand side equals x + x by the laws of U, and this is the same element of their common Carrier. The matter is not in the proof itself, it is in finding a valid formulation of the theorem (I) in Agda. Can anybody, please, demonstrate? Matthew Daggitt --------------- > This is not a question for the standard library. > Best to ask this on the mailing list. No, it is for the standard library. But let it be, I write to the Agda list. For example, if the library was organized in a different way, the following code would work: ----------------------------------------- theorem : ? {? ??} (S : Setoid ? ??) (+cMon : CommutativeMonoid S) (*Mon : Monoid S) (*'Mon : Monoid S) (R : Semiring S +cMon *Mon) (U : Semiring S +cMon *Mon) ? let open Semiring R open Semiring U using () renaming (_*_ to _*'_; 1# to e) in (x : Carrier) ? (1# + 1#) * x ? (e + e) *' x theorem S R +cMon *Mon *'Mon R U x = begin (1# + 1#) * x ?? OfSemiring.2*as+ R x ? x + x ?? sym (OfSemiring.2*as+ U x) ? (e + e) *' x ? ------------------------------------------ Here Magma, Semigroup, Monoid, CommutativeMonoid have an argument of the Setoid type. Semiring has arguments (S : Setoid _ _), (+M : CommutativeMonoid S), (*M : Monoid S). Also this solves the problem of a common setoid for +-magma and *-magma in a semiring (of what we wrote earlier). I do not say that everything is all right there. But generally, it has sense to think of experimental libraries that reorganize the algebraic part, of different ways to transfer the domain parameters. The first step may be setting (S : Setoid) as an argument as above. This will improve much, without spoiling anything. But I am not sure that this will be sufficient. Regards, ------ Sergei From a.j.rouvoet at gmail.com Mon Aug 10 18:27:18 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Mon, 10 Aug 2020 18:27:18 +0200 Subject: [Agda] problem with algebraic hierarchy In-Reply-To: <30cf7fc518d9048fe98f1ceb01a537b5@scico.botik.ru> References: <30cf7fc518d9048fe98f1ceb01a537b5@scico.botik.ru> Message-ID: Dear Sergei, The problem you encounter is wellknown under the name 'the (un)bundling problem': i.e., the problem of choosing which fields should be parameters, and which should be fields. The problem is hard, in the sense that every permutation you can think of has applications. The Agda standard library chooses to do what most other languages have done previously: i.e., provide a unbundled IsStructure, and a bundled Structure. The variation you propose has merits, but equally many demerits. Until we can dynamically bundle/unbundle, I don't think there is much to be said for a particular different variation. There has been some recent attention for this language feature by various people and the Arend proof assistant. Cheers, Arjen On 8/10/20 6:04 PM, mechvel at scico.botik.ru wrote: > We wrote the following to GitHub for the library: > > mechvel > ------- > I wonder: how to express in Agda-2.6.1 + lib-1.3 the following discourse? > Let R and U be semirings having the same additive monoid > (+-commutativeMonoid). > Denote * and *' the multiplication operators in R and U respectively, > 1# and e the unities in R and U respectively. Prove in Agda that > > for all x in R? it holds? (1# + 1#) * x ? (e + e) *' x???? -- (I) > > And let us assume that the lemma 2*as+ : ? x ? (1# + 1#) * x ? x + x > is proved in the module OfSemiring parameterized by Semiring > (it is proved simply in 2-4 steps). > Mathematically, the statement (I) has sense. > And its proof is simple: the left hand side equals x + x by the laws > of R; > the right hand side equals x + x by the laws of U, and this is the same > element of their common Carrier. > The matter is not in the proof itself, it is in finding a valid > formulation > of the theorem (I) in Agda. > Can anybody, please, demonstrate? > > > Matthew Daggitt > --------------- >> This is not a question for the standard library. >> Best to ask this on the mailing list. > > > No, it is for the standard library. > But let it be, I write to the Agda list. > > For example, if the library was organized in a different way, the > following code would work: > > ----------------------------------------- > theorem : ? {? ??} (S : Setoid ? ??) (+cMon : CommutativeMonoid S) > ???????????????????????????????????? (*Mon? : Monoid S) > ???????????????????????????????????? (*'Mon : Monoid S) > ?????????????????? (R : Semiring S +cMon *Mon) (U : Semiring S +cMon > *Mon) ? > ?????????????????? let open Semiring R > ?????????????????????? open Semiring U using () > ?????????????????????????????????????? renaming (_*_ to _*'_; 1# to e) > ?????????????????? in > ?????????????????? (x : Carrier) ? (1# + 1#) * x ? (e + e) *' x > > theorem S R +cMon *Mon *'Mon R U x = > ??? begin > ????? (1# + 1#) * x? ?? OfSemiring.2*as+ R x ? > ????? x + x????????? ?? sym (OfSemiring.2*as+ U x) ? > ????? (e + e) *' x > ??? ? > ------------------------------------------ > > Here Magma, Semigroup, Monoid, CommutativeMonoid? have an argument of > the Setoid type. > Semiring has arguments (S : Setoid _ _), (+M : CommutativeMonoid S), > (*M : Monoid S). > > Also this solves the problem of a common setoid for +-magma and > *-magma in a semiring > (of what we wrote earlier). > > I do not say that everything is all right there. > But generally, it has sense to think of experimental libraries that > reorganize the > algebraic part, of different ways to transfer the domain parameters. > > The first step may be setting (S : Setoid) as an argument as above. > This will improve much, without spoiling anything. > But I am not sure that this will be sufficient. > > Regards, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Mon Aug 10 20:14:27 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 10 Aug 2020 21:14:27 +0300 Subject: [Agda] problem with algebraic hierarchy In-Reply-To: References: <30cf7fc518d9048fe98f1ceb01a537b5@scico.botik.ru> Message-ID: <811a47b0df3e2a8ff0c164bcf85f2951@scico.botik.ru> On 2020-08-10 19:27, a.j.rouvoet wrote: > Dear Sergei, > > The problem you encounter is wellknown under the name 'the > (un)bundling problem': > i.e., the problem of choosing which fields should be parameters, and > which should be fields. > The problem is hard, in the sense that every permutation you can think > of has applications. > The Agda standard library chooses to do what most other languages have > done previously: i.e., provide a unbundled IsStructure, and a bundled > Structure. > > The variation you propose has merits, but equally many demerits. I have provided two sensible examples showing a merit. Can you provide a sensible example showing a demerit? A generic discourse, notes, objections can be understood when there are given examples. Very often I start to understand of what I intend to tell only after considering examples. I expect the same is, more or less, with other authors. Regards, -- SM > Until we can dynamically bundle/unbundle, I don't think there is much > to be > said for a particular different variation. > There has been some recent attention for this language feature by > various people and the Arend proof assistant. > [..] > On 8/10/20 6:04 PM, mechvel at scico.botik.ru wrote: >> We wrote the following to GitHub for the library: >> >> mechvel >> ------- >> I wonder: how to express in Agda-2.6.1 + lib-1.3 the following >> discourse? >> Let R and U be semirings having the same additive monoid >> (+-commutativeMonoid). >> Denote * and *' the multiplication operators in R and U respectively, >> 1# and e the unities in R and U respectively. Prove in Agda that >> >> for all x in R? it holds? (1# + 1#) * x ? (e + e) *' x???? -- (I) >> >> And let us assume that the lemma 2*as+ : ? x ? (1# + 1#) * x ? x + x >> is proved in the module OfSemiring parameterized by Semiring >> (it is proved simply in 2-4 steps). >> Mathematically, the statement (I) has sense. >> And its proof is simple: the left hand side equals x + x by the laws >> of R; >> the right hand side equals x + x by the laws of U, and this is the >> same >> element of their common Carrier. >> The matter is not in the proof itself, it is in finding a valid >> formulation >> of the theorem (I) in Agda. >> Can anybody, please, demonstrate? >> >> >> Matthew Daggitt >> --------------- >>> This is not a question for the standard library. >>> Best to ask this on the mailing list. >> >> >> No, it is for the standard library. >> But let it be, I write to the Agda list. >> >> For example, if the library was organized in a different way, the >> following code would work: >> >> ----------------------------------------- >> theorem : ? {? ??} (S : Setoid ? ??) (+cMon : CommutativeMonoid S) >> ???????????????????????????????????? (*Mon? : Monoid S) >> ???????????????????????????????????? (*'Mon : Monoid S) >> ?????????????????? (R : Semiring S +cMon *Mon) (U : Semiring S +cMon >> *Mon) ? >> ?????????????????? let open Semiring R >> ?????????????????????? open Semiring U using () >> ?????????????????????????????????????? renaming (_*_ to _*'_; 1# to e) >> ?????????????????? in >> ?????????????????? (x : Carrier) ? (1# + 1#) * x ? (e + e) *' x >> >> theorem S R +cMon *Mon *'Mon R U x = >> ??? begin >> ????? (1# + 1#) * x? ?? OfSemiring.2*as+ R x ? >> ????? x + x????????? ?? sym (OfSemiring.2*as+ U x) ? >> ????? (e + e) *' x >> ??? ? >> ------------------------------------------ >> >> Here Magma, Semigroup, Monoid, CommutativeMonoid? have an argument of >> the Setoid type. >> Semiring has arguments (S : Setoid _ _), (+M : CommutativeMonoid S), >> (*M : Monoid S). >> >> Also this solves the problem of a common setoid for +-magma and >> *-magma in a semiring >> (of what we wrote earlier). >> >> I do not say that everything is all right there. >> But generally, it has sense to think of experimental libraries that >> reorganize the >> algebraic part, of different ways to transfer the domain parameters. >> >> The first step may be setting (S : Setoid) as an argument as above. >> This will improve much, without spoiling anything. >> But I am not sure that this will be sufficient. >> >> Regards, >> >> ------ >> Sergei >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From publicityifl at gmail.com Tue Aug 11 20:22:41 2020 From: publicityifl at gmail.com (Jurriaan Hage) Date: Tue, 11 Aug 2020 11:22:41 -0700 Subject: [Agda] Third call for draft papers for IFL 2020 (Implementation and Application of Functional Languages) Message-ID: Hello, Please, find below the third call for draft papers for IFL 2020. Please forward these to anyone you think may be interested. Apologies for any duplicates you may receive. best regards, Jurriaan Hage Publicity Chair of IFL ================================================================================ IFL 2020 32nd Symposium on Implementation and Application of Functional Languages venue: online 2nd - 4th September 2020 https://www.cs.kent.ac.uk/events/2020/ifl20/ ================================================================================ ### Scope The goal of the IFL symposia is to bring together researchers actively engaged in the implementation and application of functional and function-based programming languages. IFL 2020 will be a venue for researchers to present and discuss new ideas and concepts, work in progress, and publication-ripe results related to the implementation and application of functional languages and function-based programming. Topics of interest to IFL include, but are not limited to: - language concepts - type systems, type checking, type inferencing - compilation techniques - staged compilation - run-time function specialisation - run-time code generation - partial evaluation - (abstract) interpretation - meta-programming - generic programming - automatic program generation - array processing - concurrent/parallel programming - concurrent/parallel program execution - embedded systems - web applications - (embedded) domain specific languages - security - novel memory management techniques - run-time profiling performance measurements - debugging and tracing - virtual/abstract machine architectures - validation, verification of functional programs - tools and programming techniques - (industrial) applications ### Post-symposium peer-review Following IFL tradition, IFL 2020 will use a post-symposium review process to produce the formal proceedings. Before the symposium authors submit draft papers. These draft papers will be screened by the program chair to make sure that they are within the scope of IFL. The draft papers will be made available to all participants at the symposium. Each draft paper is presented by one of the authors at the symposium. After the symposium every presenter is invited to submit a full paper, incorporating feedback from discussions at the symposium. Work submitted to IFL may not be simultaneously submitted to other venues; submissions must adhere to ACM SIGPLAN's republication policy. The program committee will evaluate these submissions according to their correctness, novelty, originality, relevance, significance, and clarity, and will thereby determine whether the paper is accepted or rejected for the formal proceedings. We plan to publish these proceedings in the International Conference Proceedings Series of the ACM Digital Library, as in previous years. ### Important dates Submission deadline of draft papers: 17 August 2020 Notification of acceptance for presentation: 19 August 2020 Registration deadline: 31 August 2020 IFL Symposium: 2-4 September 2020 Submission of papers for proceedings: 7 December 2020 Notification of acceptance: 3 February 2021 Camera-ready version: 15 March 2021 ### Submission details All contributions must be written in English. Papers must use the ACM two columns conference format, which can be found at: http://www.acm.org/publications/proceedings-template ### Peter Landin Prize The Peter Landin Prize is awarded to the best paper presented at the symposium every year. The honoured article is selected by the program committee based on the submissions received for the formal review process. The prize carries a cash award equivalent to 150 Euros. ### Programme committee Kenichi Asai, Ochanomizu University, Japan Olaf Chitil, University of Kent, United Kingdom (chair) Martin Erwig, Oregon State University,United States Daniel Horpacsi, Eotvos Lorand University, Hungary Zhenjiang Hu, Peking University, China Hans-Wolfgang Loidl, Heriot-Watt University, United Kingdom Neil Mitchell, Facebook, UK Marco T. Morazan, Seton Hall University, United States Rinus Plasmeijer, Radboud University, Netherlands Colin Runciman, University of York, United Kingdom Mary Sheeran, Chalmers University of Technology, Sweden Josep Silva, Universitat Politecnica de Valencia, Spain Jurrien Stutterheim, Standard Chartered, Singapore Josef Svenningsson, Facebook, UK Peter Thiemann, University of Freiburg, Germany Kanae Tsushima, National Institute of Informatics, Japan. Marcos Viera, Universidad de la Republica, Montevideo, Uruguay Janis Voigtlander, University of Duisburg-Essen, Germany ### Virtual symposium Because of the Covid-19 pandemic, this year IFL 2020 will be an online event, consisting of paper presentations, discussions and virtual social gatherings. Registered participants can take part from anywhere in the world. ### Acknowledgments This call-for-papers is an adaptation and evolution of content from previous instances of IFL. We are grateful to prior organisers for their work, which is reused here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maxsnew at gmail.com Tue Aug 11 23:28:45 2020 From: maxsnew at gmail.com (Max New) Date: Tue, 11 Aug 2020 16:28:45 -0500 Subject: [Agda] MSFP 2020 (Monday August 31st and Tuesday September 1st) - Call for Participation Message-ID: Eighth Workshop on MATHEMATICALLY STRUCTURED FUNCTIONAL PROGRAMMING Monday 31st August and Tuesday 1st September 2020, online https://msfp-workshop.github.io/msfp2020/ ** Due to the COVID-19 pandemic, MSFP 2020 will now be held as a virtual meeting ** ** Registration deadline: Tuesday 25th August ** CALL FOR PARTICIPATION Registration ============ Register for participation here by Tuesday 25th August: https://forms.gle/HNvFsxDKbGAvnv9x9 There is no registration fee. Invited Speakers ================ Pierre-Marie P?drot - Inria Rennes-Bretagne-Atlantique, France Satnam Singh - Google Research, USA The eighth workshop on Mathematically Structured Functional Programming is devoted to the derivation of functionality from structure. It is a celebration of the direct impact of Theoretical Computer Science on programs as we write them today. Modern programming languages, and in particular functional languages, support the direct expression of mathematical structures, equipping programmers with tools of remarkable power and abstraction. Where would Haskell be without monads? Functional reactive programming without temporal logic? Call-by-push-value without adjunctions? The list goes on. This workshop is a forum for researchers who seek to reflect mathematical phenomena in data and control. The first MSFP workshop was held in Kuressaare, Estonia, in July 2006, affiliated with MPC 2006 and AMAST 2006. The second MSFP workshop was held in Reykjavik, Iceland as part of ICALP 2008. The third MSFP workshop was held in Baltimore, USA, as part of ICFP 2010. The fourth workshop was held in Tallinn, Estonia, as part of ETAPS 2012. The fifth workshop was held in Grenoble, France, as part of ETAPS 2014. The sixth MSFP Workshop was held in April 2016, in Eindhoven, Netherlands, as part of ETAPS 2016. The seventh MSFP Workshop was held in July 2018, in Oxford, UK, as part of FLoC 2018. Programme ========= All times are UTC+1 (i.e. the timezone of Dublin, Ireland where MSFP 2020 was originally scheduled to be held). Monday ------ 13:00 Invited Speaker: Pierre-Marie Pedrot All your base categories are belong to us: A syntactic model of presheaves in type theory 14:00 break 14:30 Philippa Cowderoy Information aware type systems and telescopic constraint trees 15:00 Christopher Jenkins, Aaron Stump, and Larry Diehl Efficient lambda encodings for Mendler-style coinductive types in Cedille 15:30 break 16:00 Niels Voorneveld From equations to distinctions: Two interpretations of effectful computations 16:30 Dominic Orchard, Philip Wadler, and Harley Eades III Unifying graded and parameterised monads 17:00 virtual pub Tuesday ------- 13:00 Anne Baanen and Wouter Swierstra Combining predicate transformer semantics for effects: a case study in parsing regular languages 13:30 Oleg Grenrus Shattered lens 14:00 break 14:30 Artjoms Sinkarovs Multi-dimensional arrays with levels 15:00 Fritz Henglein and Mikkel Kragh Mathiesen Module theory and query processing 15:30 break 16:00 Invited speaker: Satnam Singh Extracting low-level formally verified circuits from Cava in Coq 17:00 virtual pub Program Committee ================= Stephanie Balzer - CMU, USA Kwanghoon Choi - Chonnam, South Korea Ralf Hinze - Kaiserslautern, Germany Marie Kerjean - Inria Nantes, France Sam Lindley - Edinburgh and Imperial, UK (co-chair) Max New - Northeastern, USA (co-chair) Fredrik Nordvall-Forsberg - Strathclyde, UK Alberto Pardo - Montevideo, Uruguay Exequiel Rivas Gadda - Inria Paris, France Claudio Russo - DFINITY, UK Tarmo Uustalu - Reykjavik, Iceland Nicolas Wu - Imperial, UK Maaike Zwart - Oxford, UK Platforms ========= * We will use Google Meet for presentations. * If the number of participants is not too high then we will invite all participants to use Google Meet if they wish. * Regardless, we will also livestream talks via YouTube. * Questions and general discussion will be handled through Zulip. * We will use gather.town for "corridor chat". Further details will be emailed to registered participants. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sat Aug 15 15:25:36 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 15 Aug 2020 13:25:36 +0000 Subject: [Agda] Weird termination problem Message-ID: <6680AB06-D8F1-42B4-9AFD-8DCE9A715EFC@nottingham.ac.uk> Hi, I just transferred some code form my lecture notes to my book draft and now the termination checker complains where there was no problem before: thm : {P : Form} ? ([] ? P) ? ?sk P proj? thm d = skC?sk (???skC d) proj? thm SS = S-d proj? thm KK = K-d proj? thm (app d e) = app (proj? thm d) (proj? thm e) so here ?sk P is inductively defined and there should be no problem ? and indeed there wasn?t before. But now Termination checking failed for the following functions: thm Problematic calls: proj? thm e I can?t make any sense out of it. Has anybody an inkling what could have happened or any advice what I could do to fix it. I can prove the <= direction on its own with no problems. The definition of ? is exactly the same as before and it doesn?t help if I expand it. Also the definition of products is the same as before. If you want to have a look at the code please let me know ? I will give you access to the repo. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fdhzs2010 at hotmail.com Sat Aug 15 16:10:07 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Sat, 15 Aug 2020 14:10:07 +0000 Subject: [Agda] Weird termination problem In-Reply-To: <6680AB06-D8F1-42B4-9AFD-8DCE9A715EFC@nottingham.ac.uk> References: <6680AB06-D8F1-42B4-9AFD-8DCE9A715EFC@nottingham.ac.uk> Message-ID: I once saw someone else's code where termination checker also failed with no good reason. the author worked around it by turning on K. could you see if K works around it for you? Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Thorsten Altenkirch Sent: August 15, 2020 9:25 AM To: agda at lists.chalmers.se Subject: [Agda] Weird termination problem Hi, I just transferred some code form my lecture notes to my book draft and now the termination checker complains where there was no problem before: thm : {P : Form} ? ([] ? P) ? ?sk P proj? thm d = skC?sk (???skC d) proj? thm SS = S-d proj? thm KK = K-d proj? thm (app d e) = app (proj? thm d) (proj? thm e) so here ?sk P is inductively defined and there should be no problem ? and indeed there wasn?t before. But now Termination checking failed for the following functions: thm Problematic calls: proj? thm e I can?t make any sense out of it. Has anybody an inkling what could have happened or any advice what I could do to fix it. I can prove the <= direction on its own with no problems. The definition of ? is exactly the same as before and it doesn?t help if I expand it. Also the definition of products is the same as before. If you want to have a look at the code please let me know ? I will give you access to the repo. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sat Aug 15 16:15:55 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 15 Aug 2020 14:15:55 +0000 Subject: [Agda] Weird termination problem In-Reply-To: References: <6680AB06-D8F1-42B4-9AFD-8DCE9A715EFC@nottingham.ac.uk> Message-ID: <81E0F5DA-E44B-4115-B60D-B1CF6699BFE6@nottingham.ac.uk> Yes, indeed this worked. And the difference was that in the previous version I hadn?t used no-K. Thanks a lot ? I was truly stumped. And I do remember that there were some issues with termination checking when switching on no-K. Cheers, Thorsten From: Jason -Zhong Sheng- Hu Date: Saturday, 15 August 2020 at 15:10 To: Thorsten Altenkirch , "agda at lists.chalmers.se" Subject: Re: Weird termination problem I once saw someone else's code where termination checker also failed with no good reason. the author worked around it by turning on K. could you see if K works around it for you? Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Thorsten Altenkirch Sent: August 15, 2020 9:25 AM To: agda at lists.chalmers.se Subject: [Agda] Weird termination problem Hi, I just transferred some code form my lecture notes to my book draft and now the termination checker complains where there was no problem before: thm : {P : Form} ? ([] ? P) ? ?sk P proj? thm d = skC?sk (???skC d) proj? thm SS = S-d proj? thm KK = K-d proj? thm (app d e) = app (proj? thm d) (proj? thm e) so here ?sk P is inductively defined and there should be no problem ? and indeed there wasn?t before. But now Termination checking failed for the following functions: thm Problematic calls: proj? thm e I can?t make any sense out of it. Has anybody an inkling what could have happened or any advice what I could do to fix it. I can prove the <= direction on its own with no problems. The definition of ? is exactly the same as before and it doesn?t help if I expand it. Also the definition of products is the same as before. If you want to have a look at the code please let me know ? I will give you access to the repo. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sat Aug 15 16:21:34 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 15 Aug 2020 14:21:34 +0000 Subject: [Agda] Weird termination problem Message-ID: I found https://github.com/agda/agda/issues/2890 but this mentions ?with? which I wasn?t using. Also increasing termination depth didn?t help in my case. I can try to cook up a short example but maybe this is a known issue? Thorsten From: Agda on behalf of Thorsten Altenkirch Date: Saturday, 15 August 2020 at 15:16 To: Jason -Zhong Sheng- Hu , "agda at lists.chalmers.se" Subject: Re: [Agda] Weird termination problem Yes, indeed this worked. And the difference was that in the previous version I hadn?t used no-K. Thanks a lot ? I was truly stumped. And I do remember that there were some issues with termination checking when switching on no-K. Cheers, Thorsten From: Jason -Zhong Sheng- Hu Date: Saturday, 15 August 2020 at 15:10 To: Thorsten Altenkirch , "agda at lists.chalmers.se" Subject: Re: Weird termination problem I once saw someone else's code where termination checker also failed with no good reason. the author worked around it by turning on K. could you see if K works around it for you? Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Thorsten Altenkirch Sent: August 15, 2020 9:25 AM To: agda at lists.chalmers.se Subject: [Agda] Weird termination problem Hi, I just transferred some code form my lecture notes to my book draft and now the termination checker complains where there was no problem before: thm : {P : Form} ? ([] ? P) ? ?sk P proj? thm d = skC?sk (???skC d) proj? thm SS = S-d proj? thm KK = K-d proj? thm (app d e) = app (proj? thm d) (proj? thm e) so here ?sk P is inductively defined and there should be no problem ? and indeed there wasn?t before. But now Termination checking failed for the following functions: thm Problematic calls: proj? thm e I can?t make any sense out of it. Has anybody an inkling what could have happened or any advice what I could do to fix it. I can prove the <= direction on its own with no problems. The definition of ? is exactly the same as before and it doesn?t help if I expand it. Also the definition of products is the same as before. If you want to have a look at the code please let me know ? I will give you access to the repo. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.lawrence.harrison at gmail.com Sat Aug 15 16:30:10 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Sat, 15 Aug 2020 10:30:10 -0400 Subject: [Agda] Weird termination problem In-Reply-To: References: Message-ID: Hi Thorsten, If you came up with a pithy example and then integrated in with the Agda docs (specifically https://agda.readthedocs.io/en/v2.6.1/language/without-k.html), that?s be welcome. By me, at least. Bill Sent from my iPad > On Aug 15, 2020, at 10:21 AM, Thorsten Altenkirch wrote: > > ? > I found > https://github.com/agda/agda/issues/2890 > but this mentions ?with? which I wasn?t using. Also increasing termination depth didn?t help in my case. > > I can try to cook up a short example but maybe this is a known issue? > > Thorsten > > From: Agda on behalf of Thorsten Altenkirch > Date: Saturday, 15 August 2020 at 15:16 > To: Jason -Zhong Sheng- Hu , "agda at lists.chalmers.se" > Subject: Re: [Agda] Weird termination problem > > Yes, indeed this worked. And the difference was that in the previous version I hadn?t used no-K. > > Thanks a lot ? I was truly stumped. And I do remember that there were some issues with termination checking when switching on no-K. > > Cheers, > Thorsten > > From: Jason -Zhong Sheng- Hu > Date: Saturday, 15 August 2020 at 15:10 > To: Thorsten Altenkirch , "agda at lists.chalmers.se" > Subject: Re: Weird termination problem > > I once saw someone else's code where termination checker also failed with no good reason. the author worked around it by turning on K. could you see if K works around it for you? > > Thanks, > Jason Hu > https://hustmphrrr.github.io/ > From: Agda on behalf of Thorsten Altenkirch > Sent: August 15, 2020 9:25 AM > To: agda at lists.chalmers.se > Subject: [Agda] Weird termination problem > > Hi, > > I just transferred some code form my lecture notes to my book draft and now the termination checker complains where there was no problem before: > > thm : {P : Form} ? ([] ? P) ? ?sk P > proj? thm d = skC?sk (???skC d) > proj? thm SS = S-d > proj? thm KK = K-d > proj? thm (app d e) = app (proj? thm d) (proj? thm e) > > so here ?sk P is inductively defined and there should be no problem ? and indeed there wasn?t before. But now > > Termination checking failed for the following functions: > thm > Problematic calls: > proj? thm e > > I can?t make any sense out of it. Has anybody an inkling what could have happened or any advice what I could do to fix it. > > I can prove the <= direction on its own with no problems. The definition of ? is exactly the same as before and it doesn?t help if I expand it. Also the definition of products is the same as before. > > If you want to have a look at the code please let me know ? I will give you access to the repo. > > Cheers, > Thorsten > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From fdhzs2010 at hotmail.com Sat Aug 15 17:51:06 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Sat, 15 Aug 2020 15:51:06 +0000 Subject: [Agda] Weird termination problem In-Reply-To: References: , Message-ID: Hi Thorsten, the example I saw uses copattern as you did. not sure how K would interfere with the termination process but it does look like a bug to me. Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of William Harrison Sent: August 15, 2020 10:30 AM To: Thorsten Altenkirch Cc: agda at lists.chalmers.se Subject: Re: [Agda] Weird termination problem Hi Thorsten, If you came up with a pithy example and then integrated in with the Agda docs (specifically https://agda.readthedocs.io/en/v2.6.1/language/without-k.html), that?s be welcome. By me, at least. Bill Sent from my iPad On Aug 15, 2020, at 10:21 AM, Thorsten Altenkirch wrote: ? I found https://github.com/agda/agda/issues/2890 but this mentions ?with? which I wasn?t using. Also increasing termination depth didn?t help in my case. I can try to cook up a short example but maybe this is a known issue? Thorsten From: Agda on behalf of Thorsten Altenkirch Date: Saturday, 15 August 2020 at 15:16 To: Jason -Zhong Sheng- Hu , "agda at lists.chalmers.se" Subject: Re: [Agda] Weird termination problem Yes, indeed this worked. And the difference was that in the previous version I hadn?t used no-K. Thanks a lot ? I was truly stumped. And I do remember that there were some issues with termination checking when switching on no-K. Cheers, Thorsten From: Jason -Zhong Sheng- Hu Date: Saturday, 15 August 2020 at 15:10 To: Thorsten Altenkirch , "agda at lists.chalmers.se" Subject: Re: Weird termination problem I once saw someone else's code where termination checker also failed with no good reason. the author worked around it by turning on K. could you see if K works around it for you? Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Thorsten Altenkirch Sent: August 15, 2020 9:25 AM To: agda at lists.chalmers.se Subject: [Agda] Weird termination problem Hi, I just transferred some code form my lecture notes to my book draft and now the termination checker complains where there was no problem before: thm : {P : Form} ? ([] ? P) ? ?sk P proj? thm d = skC?sk (???skC d) proj? thm SS = S-d proj? thm KK = K-d proj? thm (app d e) = app (proj? thm d) (proj? thm e) so here ?sk P is inductively defined and there should be no problem ? and indeed there wasn?t before. But now Termination checking failed for the following functions: thm Problematic calls: proj? thm e I can?t make any sense out of it. Has anybody an inkling what could have happened or any advice what I could do to fix it. I can prove the <= direction on its own with no problems. The definition of ? is exactly the same as before and it doesn?t help if I expand it. Also the definition of products is the same as before. If you want to have a look at the code please let me know ? I will give you access to the repo. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sat Aug 15 18:03:31 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 15 Aug 2020 16:03:31 +0000 Subject: [Agda] Weird termination problem In-Reply-To: References: Message-ID: I have posted a (new?) issue: https://github.com/agda/agda/issues/4846 Here is my small example: f : (? ? ?) ? ? proj? f zero = zero proj? f (suc x) = suc (proj? f x) proj? f = zero It works with no flag but fails with no-K. No I don?t think we should add this to the docs, it would be better to fix it. Thorsten From: Jason -Zhong Sheng- Hu Date: Saturday, 15 August 2020 at 16:51 To: William Harrison , Thorsten Altenkirch Cc: "agda at lists.chalmers.se" Subject: Re: [Agda] Weird termination problem Hi Thorsten, the example I saw uses copattern as you did. not sure how K would interfere with the termination process but it does look like a bug to me. Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of William Harrison Sent: August 15, 2020 10:30 AM To: Thorsten Altenkirch Cc: agda at lists.chalmers.se Subject: Re: [Agda] Weird termination problem Hi Thorsten, If you came up with a pithy example and then integrated in with the Agda docs (specifically https://agda.readthedocs.io/en/v2.6.1/language/without-k.html), that?s be welcome. By me, at least. Bill Sent from my iPad On Aug 15, 2020, at 10:21 AM, Thorsten Altenkirch wrote: I found https://github.com/agda/agda/issues/2890 but this mentions ?with? which I wasn?t using. Also increasing termination depth didn?t help in my case. I can try to cook up a short example but maybe this is a known issue? Thorsten From: Agda on behalf of Thorsten Altenkirch Date: Saturday, 15 August 2020 at 15:16 To: Jason -Zhong Sheng- Hu , "agda at lists.chalmers.se" Subject: Re: [Agda] Weird termination problem Yes, indeed this worked. And the difference was that in the previous version I hadn?t used no-K. Thanks a lot ? I was truly stumped. And I do remember that there were some issues with termination checking when switching on no-K. Cheers, Thorsten From: Jason -Zhong Sheng- Hu Date: Saturday, 15 August 2020 at 15:10 To: Thorsten Altenkirch , "agda at lists.chalmers.se" Subject: Re: Weird termination problem I once saw someone else's code where termination checker also failed with no good reason. the author worked around it by turning on K. could you see if K works around it for you? Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of Thorsten Altenkirch Sent: August 15, 2020 9:25 AM To: agda at lists.chalmers.se Subject: [Agda] Weird termination problem Hi, I just transferred some code form my lecture notes to my book draft and now the termination checker complains where there was no problem before: thm : {P : Form} ? ([] ? P) ? ?sk P proj? thm d = skC?sk (???skC d) proj? thm SS = S-d proj? thm KK = K-d proj? thm (app d e) = app (proj? thm d) (proj? thm e) so here ?sk P is inductively defined and there should be no problem ? and indeed there wasn?t before. But now Termination checking failed for the following functions: thm Problematic calls: proj? thm e I can?t make any sense out of it. Has anybody an inkling what could have happened or any advice what I could do to fix it. I can prove the <= direction on its own with no problems. The definition of ? is exactly the same as before and it doesn?t help if I expand it. Also the definition of products is the same as before. If you want to have a look at the code please let me know ? I will give you access to the repo. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre.lescanne at ens-lyon.fr Sat Aug 15 19:32:34 2020 From: pierre.lescanne at ens-lyon.fr (Pierre Lescanne (en)) Date: Sat, 15 Aug 2020 19:32:34 +0200 Subject: [Agda] \ell does not display Message-ID: I switched to? elpa-agda2-mode in emacs and the character \ell (i.e., |?||)| does not display. -- Regards, Pierre Lescanne -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Sun Aug 16 22:52:31 2020 From: capn.freako at gmail.com (David Banas) Date: Sun, 16 Aug 2020 13:52:31 -0700 Subject: [Agda] rewrite construct not working, when Naturals defined locally? Message-ID: I'm finding that code using the *rewrite*-construct works in a file that imports Naturals, but the same code fails in a different file, which defines the Naturals locally. In the latter case, expanding the code to its equivalent *with*-construct form results in successful compilation. Just wondering if anyone else has observed this, too. Thanks, -db -------------- next part -------------- An HTML attachment was scrubbed... URL: From godzbanebane at gmail.com Mon Aug 17 07:55:41 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Mon, 17 Aug 2020 08:55:41 +0300 Subject: [Agda] rewrite construct not working, when Naturals defined locally? In-Reply-To: References: Message-ID: Hi! Did you perhaps also redefine equality in the file where it doesn't work, without marking it as BUILTIN? ======= -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Mon Aug 17 17:35:04 2020 From: capn.freako at gmail.com (David Banas) Date: Mon, 17 Aug 2020 08:35:04 -0700 Subject: [Agda] rewrite construct not working, when Naturals defined locally? In-Reply-To: References: Message-ID: <1B08AF58-7451-4ED7-BE8B-0A621F791941@gmail.com> Ah, yes, that was it. Thank you! -db > On Aug 16, 2020, at 10:55 PM, Georgi Lyubenov wrote: > > Hi! > > Did you perhaps also redefine equality in the file where it doesn't work, without marking it as BUILTIN? > > ======= From andrei.h.popescu at gmail.com Tue Aug 18 03:12:42 2020 From: andrei.h.popescu at gmail.com (Andrei Popescu) Date: Tue, 18 Aug 2020 02:12:42 +0100 Subject: [Agda] Certified Programs and Proofs (CPP) 2021: Final Call for Papers Message-ID: Certified Programs and Proofs (CPP) is an international conference on practical and theoretical topics in all areas that consider formal verification and certification as an essential paradigm for their work. CPP spans areas of computer science, mathematics, logic, and education. CPP 2021 (https://popl21.sigplan.org/home/CPP-2021) will be held on 18-19 January 2021 and will be co-located with POPL 2021. CPP 2021 is sponsored by ACM SIGPLAN, in cooperation with ACM SIGLOG. NEWS * CPP 2021 will feature Distinguished Paper Awards. * CPP 2021 will take place on January 18-19, 2021 as a virtual or hybrid physical-virtual meeting. This means that the authors will be able to present their papers online. The POPL and CPP organizers are monitoring the COVID-19 situation, and in September/October they will make an announcement on whether there will also be a physical meeting in Copenhagen; but irrespective of that decision, the online paper presentation option will be guaranteed. * The submission deadline is one month earlier than usual. IMPORTANT DATES * Abstract Deadline: 16 September 2020 at 23:59 AoE (UTC-12h) * Paper Submission Deadline: 22 September 2020 at 23:59 AoE (UTC-12h) * Notification: 24 November 2020 * Camera Ready Deadline: 15 December 2020 * Conference: 18-19 January 2021 Deadlines expire at the end of the day, anywhere on earth. Abstract and submission deadlines are strict and there will be no extensions. TOPICS OF INTEREST We welcome submissions in research areas related to formal certification of programs and proofs. The following is a non-exhaustive list of topics of interest to CPP: * certified or certifying programming, compilation, linking, OS kernels, runtime systems, security monitors, and hardware; * certified mathematical libraries and mathematical theorems; * proof assistants (e.g, ACL2, Agda, Coq, Dafny, F*, HOL4, HOL Light, Idris, Isabelle, Lean, Mizar, Nuprl, PVS, etc); * new languages and tools for certified programming; * program analysis, program verification, and program synthesis; * program logics, type systems, and semantics for certified code; * logics for certifying concurrent and distributed systems; * mechanized metatheory, formalized programming language semantics, and logical frameworks; * higher-order logics, dependent type theory, proof theory, logical systems, separation logics, and logics for security; * verification of correctness and security properties; * formally verified blockchains and smart contracts; * certificates for decision procedures, including linear algebra, polynomial systems, SAT, SMT, and unification in algebras of interest; * certificates for semi-decision procedures, including equality, first-order logic, and higher-order unification; * certificates for program termination; * formal models of computation; * mechanized (un)decidability and computational complexity proofs; * formally certified methods for induction and coinduction; * integration of interactive and automated provers; * logical foundations of proof assistants; * applications of AI and machine learning to formal certification; * user interfaces for proof assistants and theorem provers; * teaching mathematics and computer science with proof assistants. DISTINGUISHED PAPER AWARDS Around 10% of the accepted papers at CPP 2021 will be designated as Distinguished Papers. This award highlights papers that the CPP program committee thinks should be read by a broad audience due to their relevance, originality, significance and clarity. SUBMISSION GUIDELINES Prior to the paper submission deadline, the authors should upload their anonymized paper in PDF format through the HotCRP system at https://cpp2021.hotcrp.com The submissions must be written in English and provide sufficient detail to allow the program committee to assess the merits of the contribution. They must be formatted following the ACM SIGPLAN Proceedings format (http://www.sigplan.org/Resources/Author/) using the acmart style with the sigplan option, which provides a two-column style, using 10 point font for the main text, and a header for double blind review submission, i.e., \documentclass[sigplan,10pt,anonymous,review]{acmart}\settopmatter{printfolios=true,printccs=false,printacmref=false} The submitted papers should not exceed 12 pages, including tables and figures, but excluding bibliography and clearly marked appendices. The papers should be self-contained without the appendices. Shorter papers are welcome and will be given equal consideration. Submissions not conforming to the requirements concerning format and maximum length may be rejected without further consideration. CPP 2021 will employ a lightweight double-blind reviewing process. To facilitate this, the submissions must adhere to two rules: (1) author names and institutions must be omitted, and (2) references to authors' own related work should be in the third person (e.g., not "We build on our previous work ..." but rather ?We build on the work of ..."). The purpose of this process is to help the PC and external reviewers come to an initial judgment about the paper without bias, not to make it impossible for them to discover the authors if they were to try. Nothing should be done in the name of anonymity that weakens the submission or makes the job of reviewing it more difficult. In particular, important background references should not be omitted or anonymized. In addition, authors are free to disseminate their ideas or draft versions of their papers as usual. For example, authors may post drafts of their papers on the web or give talks on their research ideas. POPL has answers to frequently asked questions addressing many common concerns: https://popl20.sigplan.org/track/POPL-2020-Research-Papers#Submission-and-Reviewing-FAQ We encourage the authors to provide any supplementary material that is required to support the claims made in the paper, such as proof scripts or experimental data. This material must be uploaded at submission time, as an archive, not via a URL. Two forms of supplementary material may be submitted: (1) Anonymous supplementary material is made available to the reviewers before they submit their first-draft reviews. (2) Non-anonymous supplementary material is made available to the reviewers after they have submitted their first-draft reviews and have learned the identity of the authors. Please use anonymous supplementary material whenever possible, so that it can be taken into account from the beginning of the reviewing process. The submitted papers must adhere to the SIGPLAN Republication Policy (https://www.sigplan.org/Resources/Policies/Republication/) and the ACM Policy on Plagiarism (https://www.acm.org/publications/policies/plagiarism). Concurrent submissions to other conferences, journals, workshops with proceedings, or similar forums of publication are not allowed. The PC chairs should be informed of closely related work submitted to a conference or journal in advance of submission. One author of each accepted paper is expected to present it at the (possibly virtual) conference. PUBLICATION, COPYRIGHT AND OPEN ACCESS The limit for the camera-ready version is 14 pages, excluding the bibliography (so 2 pages extra compared with the submission). The CPP proceedings will be published by the ACM, and authors of accepted papers will be required to choose one of the following publication options: (1) Author retains copyright of the work and grants ACM a non-exclusive permission-to-publish license and, optionally, licenses the work under a Creative Commons license. (2) Author retains copyright of the work and grants ACM an exclusive permission-to-publish license. (3) Author transfers copyright of the work to ACM. For authors who can afford it, we recommend option 1, which will make the paper Gold Open Access, and also encourage such authors to license their work under the CC-BY license. ACM will charge you an article processing fee for this option (currently, US$700), which you have to pay directly with the ACM. For everyone else, we recommend option (2), which is free and allows you to achieve Green Open Access, by uploading a preprint of your paper to a repository that guarantees permanent archival such as arXiv (https://arxiv.org) or HAL (https://hal.archives-ouvertes.fr). This is anyway a good idea for timely dissemination even if you chose option (1). Ensuring timely dissemination is particularly important for this edition, since, because of the very tight schedule, the official proceedings might not be available in time for CPP. The official CPP 2021 proceedings will also be available via SIGPLAN OpenTOC (http://www.sigplan.org/OpenTOC/#cpp). For ACM's take on this, see their Copyright Policy (http://www.acm.org/publications/policies/copyright-policy) and Author Rights (http://authors.acm.org/main.html). PROGRAM COMMITTEE C?t?lin Hri?cu, MPI-SP, Germany (co-chair) Andrei Popescu, University of Sheffield, UK (co-chair) Reynald Affeldt, National Institute of Advanced Industrial Science and Technology (AIST), Japan June Andronick, CSIRO's Data61 and UNSW, Australia Arthur Azevedo de Amorim, Carnegie Mellon University, USA Joachim Breitner, DFINITY Foundation, Germany Jesper Cockx, TU Delft, Netherlands Cyril Cohen, Universit? C?te d?Azur, Inria, France Nils Anders Danielsson, University of Gothenburg / Chalmers University of Technology, Sweden Brijesh Dongol, University of Surrey, UK Floris van Doorn, University of Pittsburgh, USA Yannick Forster, Saarland University, Germany Shilpi Goel, Centaur Technology, Inc., USA Chung-Kil Hur, Seoul National University, South Korea Moa Johansson, Chalmers University of Technology, Sweden Ekaterina Komendantskaya, Heriot-Watt University, UK Angeliki Koutsoukou-Argyraki, University of Cambridge, UK Robert Y. Lewis, Vrije Universiteit Amsterdam, Netherlands Hongjin Liang, Nanjing University, China Andreas Lochbihler, Digital Asset GmbH, Switzerland Petar Maksimovi?, Imperial College London, UK William Mansky, University of Illinois at Chicago, USA Anders M?rtberg, Stockholm University, Sweden Sam Owre, SRI International, USA Karl Palmskog, KTH Royal Institute of Technology, Sweden Johannes ?man Pohjola, CSIRO's Data61 / University of New South Wales, Australia Damien Pous, CNRS, ENS Lyon, France Tahina Ramananandro, Microsoft Research, USA Ilya Sergey, Yale-NUS College and National University of Singapore, Singapore Natarajan Shankar, SRI International, USA Kathrin Stark, Princeton University, USA Ren? Thiemann, University of Innsbruck, Austria Amin Timany, Aarhus University, Denmark Josef Urban, Czech Technical University in Prague, Czech Republic Christoph Weidenbach, MPI-INF, Germany Freek Wiedijk, Radboud University Nijmegen, Netherlands Yannick Zakowski, University of Pennsylvania, USA CONTACT For any questions please contact the two PC chairs: Catalin Hritcu , Andrei Popescu From pierre.lescanne at ens-lyon.fr Tue Aug 18 12:00:17 2020 From: pierre.lescanne at ens-lyon.fr (Pierre Lescanne (en)) Date: Tue, 18 Aug 2020 12:00:17 +0200 Subject: [Agda] Has Agda been tested on i686 architecture ? Message-ID: I would like to know whether Agda has been tested on i686 architecture (32 bits).? In general, it works well, but this may explain some of the annoying bugs I encounter and? why I do not get answers to my questions, since most of the users use AMD64 or like. P. S. For what I do, I feel that such an architecture is enough. To preserve the planet, I believe that we should not throw away computers that work. This is the reason why I use second hand computers and give them a second life that changes them from running Window NT and Office. -- Regards, --------------------------- Pierre Lescanne --------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Tue Aug 18 20:00:12 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 18 Aug 2020 21:00:12 +0300 Subject: [Agda] type-checking x=x Message-ID: Probably this has been discussed earlier, but for any occasion: I see that begin ... p ? (q ? (p' ? (b ? q'a))) ? where pp' = p ? p'; qq' = q ? q'; q'a = q'a is not type-checked in Agda 2.6.1 in a reasonable time. Needs it to report something like "Cycle in assignments: q'a = q'a " ? Regards, ------ Sergei From nad at cse.gu.se Tue Aug 18 22:03:48 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 18 Aug 2020 22:03:48 +0200 Subject: [Agda] \ell does not display In-Reply-To: References: Message-ID: <9c2abfc1-9caa-addb-292e-51d8449c9cbc@cse.gu.se> On 2020-08-15 19:32, Pierre Lescanne (en) wrote: > I switched to elpa-agda2-mode in emacs and the character \ell (i.e., > ?) does not display. If a glyph is not available in the default font, then Emacs typically tries to pick a glyph from some other font. Does ? display properly in other Emacs buffers? -- /NAD From nad at cse.gu.se Tue Aug 18 22:08:53 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 18 Aug 2020 22:08:53 +0200 Subject: [Agda] Has Agda been tested on i686 architecture ? In-Reply-To: References: Message-ID: On 2020-08-18 12:00, Pierre Lescanne (en) wrote: > I would like to know whether Agda has been tested on i686 architecture > (32 bits). In general, it works well, but this may explain some of the > annoying bugs I encounter and why I do not get answers to my > questions, since most of the users use AMD64 or like. I'm using a 32-bit setup. -- /NAD From icfp.publicity at googlemail.com Wed Aug 19 17:04:45 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Wed, 19 Aug 2020 10:04:45 -0500 Subject: [Agda] Third Call for Participation: ICFP 2020 Message-ID: <5f3d3f8d5abee_3df75294-4f1@homer.mail> ===================================================================== Third Call for Participation ICFP 2020 25th ACM SIGPLAN International Conference on Functional Programming and affiliated events August 23 - August 28, 2020 Online http://icfp20.sigplan.org/ Pre-registration ends August 21! ==================================================================== ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. The conference covers the entire spectrum of work, from practice to theory, including its peripheries. Watch our new video, and Don't Stop ICFP: https://www.youtube.com/watch?v=Fte5wwnwCws Pre-registration ends August 21st! https://icfp20.sigplan.org/attending/Registration This year, the conference will be a virtual event. All activities will take place online. There are training sessions for Clowdr, our new online platform, on August 20 and 21. https://icfp20.sigplan.org/track/icfp-2020-clowdr-training#program The main conference will take place from August 24-26, 2020 during two time bands. The first band will be 9AM-5:30PM New York, and will include both technical and social activities. The second band will repeat (with some variation) the technical program and social activities 12 hours later, 9AM-5:30PM Beijing, the following day. We've written a blog post about how conference mirroring will work for ICFP: https://blog.sigplan.org/2020/08/04/come-to-virtual-icfp/ We?re excited to announce our two invited speakers for 2020: Evan Czaplicki, covering the Elm programming language and hard lessons learned on driving adoption of new programming languages; and Audrey Tang, Haskeller and Taiwan?s Digital Minister, on how software developers can contribute to fighting the pandemic. ICFP has officially accepted 37 exciting papers, and (as a fresh experiment this year) there will also be presentations of 8 papers accepted recently to the Journal of Functional Programming. Co-located symposia and workshops will take place the day before and two days immediately after the main conference. Registration is now open. The early registration deadline is August 8th, 2020. Registration is not free, but is significantly lower than usual. Students who are ACM or SIGPLAN members may register for FREE before the early deadline. https://regmaster.com/2020conf/ICFP20/register.php New this year: Attendees will be able to sign-up for the ICFP Mentoring Program (either to be a mentor, receive mentorship or both). * Overview and affiliated events: http://icfp20.sigplan.org/home * Full Schedule: https://icfp20.sigplan.org/program/program-icfp-2020 * Accepted papers: http://icfp20.sigplan.org/track/icfp-2020-papers#event-overview * JFP Talks: https://icfp20.sigplan.org/track/icfp-2020-jfp-talks#event-overview * Registration is available via: https://regmaster.com/2020conf/ICFP20/register.php Early registration ends 8 August, 2020. * Programming contest: https://icfpcontest2020.github.io/ * Student Research Competition: https://icfp20.sigplan.org/track/icfp-2020-Student-Research-Competition * Tutorials https://icfp20.sigplan.org/track/icfp-2020-tutorials#program * Follow us on Twitter for the latest news: http://twitter.com/icfp_conference This year, there are 10 events co-located with ICFP: * Erlang Workshop (8/23) * Haskell Implementors' Workshop (8/28) * Haskell Symposium (8/27-8/28) * Higher-Order Programming with Effects (8/23) * miniKanren Workshop (8/27) * ML Family Workshop (8/27) * OCaml Workshop (8/28) * Programming Languages Mentoring Workshop (8/23) * Scheme Workshop (8/28) * Type-Driven Development (8/23) As well as tutorials on 8/23, 8/27, and 8/28. ### ICFP Organizers General Chair: Stephanie Weirich (University of Pennsylvania, USA) Program Chair: Adam Chlipala (MIT, USA) Artifact Evaluation Co-Chairs: Brent Yorgey (Hendrix College, USA) Ben Lippmeier (Ghost Locomotion, Australia) Industrial Relations Chair: Alan Jeffrey (Mozilla Research, USA) Programming Contest Organizer: Igor Lukanin (Kontur, Russia) Publicity and Web Chair: Sam Tobin-Hochstadt (Indiana University, USA) Student Research Competition Chair: Youyou Cong (Tokyo Institute of Technology, Japan) Workshops Co-Chair: Jennifer Hackett (University of Nottingham, UK) Leonidas Lampropoulos (University of Pennsylvania, USA) Video Chair: Leif Andersen (Northeastern University, USA) Student Volunteer Co-Chair: Hanneli Tavante (McGill University, Canada) Victor Lanvin (IRIF, Universit? Paris Diderot, France) From james.wood.100 at strath.ac.uk Wed Aug 19 21:37:33 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 19 Aug 2020 20:37:33 +0100 Subject: [Agda] type-checking x=x In-Reply-To: References: Message-ID: Hi Sergei, This sounds like a fairly serious problem (the termination checker not being run at the right time, or something). Do you have a minimal working example? Regards, James On 18/08/2020 19:00, mechvel at scico.botik.ru wrote: > Probably this has been discussed earlier, but for any occasion: > I see that > ??? begin ... > ????????? p ? (q ? (p' ? (b ? q'a))) > ??? ? > ??? where? pp' = p ? p';? qq' = q ? q';? q'a = q'a > > is not type-checked in Agda 2.6.1 in a reasonable time. > Needs it to report something like > "Cycle in assignments: q'a = q'a " > ? > > Regards, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at scico.botik.ru Thu Aug 20 13:36:22 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Thu, 20 Aug 2020 14:36:22 +0300 Subject: [Agda] type-checking x=x In-Reply-To: References: Message-ID: <2ee69cf0640f3619094328b120d2bebe@scico.botik.ru> On 2020-08-19 22:37, James Wood wrote: > Hi Sergei, > > This sounds like a fairly serious problem (the termination checker not > being run at the right time, or something). Do you have a minimal > working example? > Most probably this issue is known, is indexed, probably other main developers would recall it. If you write that it is difficult to find it, then I would probably try to reduce the example. Regards, ------ Sergei > On 18/08/2020 19:00, mechvel at scico.botik.ru wrote: >> Probably this has been discussed earlier, but for any occasion: >> I see that >> ??? begin ... >> ????????? p ? (q ? (p' ? (b ? q'a))) >> ??? ? >> ??? where? pp' = p ? p';? qq' = q ? q';? q'a = q'a >> >> is not type-checked in Agda 2.6.1 in a reasonable time. >> Needs it to report something like >> "Cycle in assignments: q'a = q'a " >> ? >> >> Regards, >> >> ------ >> Sergei >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Jesper at sikanda.be Thu Aug 20 13:50:27 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 20 Aug 2020 13:50:27 +0200 Subject: [Agda] type-checking x=x In-Reply-To: <2ee69cf0640f3619094328b120d2bebe@scico.botik.ru> References: <2ee69cf0640f3619094328b120d2bebe@scico.botik.ru> Message-ID: > Most probably this issue is known, is indexed, > probably other main developers would recall it. I think the answer to this question could very well be "42": https://github.com/agda/agda/issues/42 -- Jesper On Thu, Aug 20, 2020 at 1:38 PM wrote: > On 2020-08-19 22:37, James Wood wrote: > > Hi Sergei, > > > > This sounds like a fairly serious problem (the termination checker not > > being run at the right time, or something). Do you have a minimal > > working example? > > > > Most probably this issue is known, is indexed, > probably other main developers would recall it. > If you write that it is difficult to find it, then I would probably try > to reduce the example. > > Regards, > > ------ > Sergei > > > > > On 18/08/2020 19:00, mechvel at scico.botik.ru wrote: > >> Probably this has been discussed earlier, but for any occasion: > >> I see that > >> begin ... > >> p ? (q ? (p' ? (b ? q'a))) > >> ? > >> where pp' = p ? p'; qq' = q ? q'; q'a = q'a > >> > >> is not type-checked in Agda 2.6.1 in a reasonable time. > >> Needs it to report something like > >> "Cycle in assignments: q'a = q'a " > >> ? > >> > >> Regards, > >> > >> ------ > >> Sergei > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >> > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.brunerie at gmail.com Thu Aug 20 13:52:54 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Thu, 20 Aug 2020 13:52:54 +0200 Subject: [Agda] type-checking x=x In-Reply-To: <2ee69cf0640f3619094328b120d2bebe@scico.botik.ru> References: <2ee69cf0640f3619094328b120d2bebe@scico.botik.ru> Message-ID: Hi Sergei, This is well-known indeed, see https://github.com/agda/agda/issues/4165 or https://github.com/agda/agda/issues/42. Best, Guillaume Den tors 20 aug. 2020 kl 13:38 skrev : > > On 2020-08-19 22:37, James Wood wrote: > > Hi Sergei, > > > > This sounds like a fairly serious problem (the termination checker not > > being run at the right time, or something). Do you have a minimal > > working example? > > > > Most probably this issue is known, is indexed, > probably other main developers would recall it. > If you write that it is difficult to find it, then I would probably try > to reduce the example. > > Regards, > > ------ > Sergei > > > > > On 18/08/2020 19:00, mechvel at scico.botik.ru wrote: > >> Probably this has been discussed earlier, but for any occasion: > >> I see that > >> begin ... > >> p ? (q ? (p' ? (b ? q'a))) > >> ? > >> where pp' = p ? p'; qq' = q ? q'; q'a = q'a > >> > >> is not type-checked in Agda 2.6.1 in a reasonable time. > >> Needs it to report something like > >> "Cycle in assignments: q'a = q'a " > >> ? > >> > >> Regards, > >> > >> ------ > >> Sergei > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >> > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From pierre.lescanne at ens-lyon.fr Thu Aug 20 18:18:59 2020 From: pierre.lescanne at ens-lyon.fr (Pierre Lescanne (en)) Date: Thu, 20 Aug 2020 18:18:59 +0200 Subject: [Agda] \ell does not display In-Reply-To: <9c2abfc1-9caa-addb-292e-51d8449c9cbc@cse.gu.se> References: <9c2abfc1-9caa-addb-292e-51d8449c9cbc@cse.gu.se> Message-ID: <208c4745-f1d0-cb50-36b1-eb4784dff0ac@ens-lyon.fr> Actually |? displays in all the buffers as a space. | Le 18/08/2020 ? 22:03, Nils Anders Danielsson a ?crit?: > On 2020-08-15 19:32, Pierre Lescanne (en) wrote: >> I switched to elpa-agda2-mode in emacs and the character \ell (i.e., >> ?) does not display. > > If a glyph is not available in the default font, then Emacs typically > tries to pick a glyph from some other font. Does ? display properly in > other Emacs buffers? > -- Regards, --------------------------- Pierre Lescanne --------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Thu Aug 20 18:38:44 2020 From: carette at mcmaster.ca (Carette, Jacques) Date: Thu, 20 Aug 2020 16:38:44 +0000 Subject: [Agda] Hanging out with the Lean crowd Message-ID: No, I'm not leaving Agda. I have invested too much time already, and I really do like it very much. I am/was incredibly curious as to what seems to make Lean more of a 'rising star'. My personal conclusions: - it's not really the system per se, although Lean being 'classical' helps attract a different crowd, - it's the *ecosystem*, and in particular, - the large, extremely active and welcoming crowd of *math-lib* developers that make Lean so attractive. The visible face of Lean is not Leonardo, but a large number of the library developers. They've taken to github and Zulip with a vengeance. There can be 200-300 messages/day (!) on the Lean Zulip. [That's kind of exhausting... but I guess that's the price of success.] Where there are 18 open PRs on agda-stdlib (with the latest as #1279), there are currently 77 on mathlib (latest #3879). The good news for the Agda devs is that the "system devs" of Lean are basically not visible here. They exist, are very busy doing cool stuff, but the community is not run by them at all. Frees the system devs to focus on their core strengths. My take homes, if the plan is to continuing growing the "Agda ecosystem": - the community ought to pick a single communication system (Slack, Discord, Zulip, gitter, whatever, but just one!) - the merge-into-stdlib process needs more bandwidth (Matthew's done an amazing job, I'm mostly suggesting that he make proposals as to how to scale up) - actively push people who have useful private libraries to submit them (perhaps in pieces) to stdlib For example, there is quite a lot of PL meta-theory 'out there', in Agda. It could make a lot of sense to augment stdlib with the standard material for that. Lean's math-lib is driven by formalizing "regular math" (their terminology, not mine). To me, it would make sense if Agda's stdlib was driven by "the math+CS that its users regularly use". [Thus PL meta-theory as an obvious example.] Jacques PS: there is not an iota of complaint in the above. It is 100% meant as conveying my observations, and personal conclusions on how to build momentum. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Thu Aug 20 19:52:17 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 20 Aug 2020 18:52:17 +0100 Subject: [Agda] type-checking x=x In-Reply-To: References: <2ee69cf0640f3619094328b120d2bebe@scico.botik.ru> Message-ID: On 20/08/2020 12:50, Jesper at sikanda.be wrote: >> Most probably this issue is known, is indexed, >> probably other main developers would recall it. > > I think the answer to this question could very well be "42": > https://github.com/agda/agda/issues/42 I knew that the answer to the ultimate question of life, the universe, and everything would be in github. Martin > > -- Jesper > > On Thu, Aug 20, 2020 at 1:38 PM > wrote: > > On 2020-08-19 22:37, James Wood wrote: > > Hi Sergei, > > > > This sounds like a fairly serious problem (the termination checker not > > being run at the right time, or something). Do you have a minimal > > working example? > > > > Most probably this issue is known, is indexed, > probably other main developers would recall it. > If you write that it is difficult to find it, then I would probably try > to reduce the example. > > Regards, > > ------ > Sergei > > > > > On 18/08/2020 19:00, mechvel at scico.botik.ru > wrote: > >> Probably this has been discussed earlier, but for any occasion: > >> I see that > >> ??? begin ... > >> ????????? p ? (q ? (p' ? (b ? q'a))) > >> ??? ? > >> ??? where? pp' = p ? p';? qq' = q ? q';? q'a = q'a > >> > >> is not type-checked in Agda 2.6.1 in a reasonable time. > >> Needs it to report something like > >> "Cycle in assignments: q'a = q'a " > >> ? > >> > >> Regards, > >> > >> ------ > >> Sergei > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda > >> > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From nicolai.kraus at gmail.com Thu Aug 20 20:21:55 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Thu, 20 Aug 2020 19:21:55 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: Message-ID: Thanks for the interesting observations! My impression is that Agda is used a lot for computer science / programming language research, while Lean is used for formalising mathematics (obviously with many many excpetions). These are different although certainly overlapping communities. As a result, Lean has huge libraries of formalised (in Kevin Buzzard's words) generic mathematics, and Agda has many developments which study the meta-theory of type systems, and so on. In principle, both communities could use the same system, I guess it has happened for "soft" reasons (social reasons, "marketing", random chance etc) that they don't. I don't know whether Lean is fundamentally better than Agda for formalising maths, or whether Agda is fundamentally better than Lean for PL research. Probably not, but I also don't think there is any problem. The above is just what I have observed, I don't want to suggest anything since I think it's very good already :-) (I agree with the single communication system though, that would probably simplify things.) Nicolai On 20/08/2020 17:38, Carette, Jacques wrote: > > No, I?m not leaving Agda. I have invested too much time already, and I > really do like it very much. I am/was incredibly curious as to what > seems to make Lean more of a ?rising star?. > > My personal conclusions: > - it?s not really the system per se, although Lean being ?classical? > helps attract a different crowd, > - it?s the **ecosystem**, and in particular, > - the large, extremely active and welcoming crowd of **math-lib** > developers that make Lean so attractive. > > The visible face of Lean is not Leonardo, but a large number of the > library developers. They?ve taken to github and Zulip with a > vengeance. There can be 200-300 messages/day (!) on the Lean Zulip. > [That?s kind of exhausting? but I guess that?s the price of success.]? > Where there are 18 open PRs on agda-stdlib (with the latest as #1279), > there are currently 77 on mathlib (latest #3879). > > The good news for the Agda devs is that the ?system devs? of Lean are > basically not visible here. They exist, are very busy doing cool > stuff, but the community is not run by them at all. Frees the system > devs to focus on their core strengths. > > My take homes, if the plan is to continuing growing the ?Agda ecosystem?: > - the community ought to pick a single communication system (Slack, > Discord, Zulip, gitter, whatever, but just one!) > - the merge-into-stdlib process needs more bandwidth (Matthew?s done > an amazing job, I?m mostly suggesting that he make proposals as to how > to scale up) > - actively push people who have useful private libraries to submit > them (perhaps in pieces) to stdlib > > For example, there is quite a lot of PL meta-theory ?out there?, in > Agda. It could make a lot of sense to augment stdlib with the standard > material for that. Lean?s math-lib is driven by formalizing ?regular > math? (their terminology, not mine). To me, it would make sense if > Agda?s stdlib was driven by ?the math+CS that its users regularly > use?. [Thus PL meta-theory as an obvious example.] > > Jacques > > PS: there is not an iota of complaint in the above. It is 100% meant > as conveying my observations, and personal conclusions on how to build > momentum. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Thu Aug 20 20:46:00 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Thu, 20 Aug 2020 21:46:00 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: Message-ID: <6284aa539a6f5885dd177d2e181bf690@scico.botik.ru> On 2020-08-20 19:38, Carette, Jacques wrote: > [..] > My take homes, if the plan is to continuing growing the "Agda > ecosystem": > - the community ought to pick a single communication system (Slack, > Discord, Zulip, gitter, whatever, but just one!) > - the merge-into-stdlib process needs more bandwidth (Matthew's done > an amazing job, I'm mostly suggesting that he make proposals as to how > to scale up) > - actively push people who have useful private libraries to submit > them (perhaps in pieces) to stdlib > [..] The Standard library size needs to have some reasonable bound for it, and all the remaining room is for applied libraries. For a widely used system, the total volume of applied libraries is expected to be may be 1000 times larger than the stdlib volume. -- SM From m.escardo at cs.bham.ac.uk Thu Aug 20 21:06:18 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Thu, 20 Aug 2020 20:06:18 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: Message-ID: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> >From my personal point of view, Lean has two defects: * It used to support HoTT/UF and it doesn't anymore. * It is ostensively classical and neglects constructive mathematics. I understand that for the vast majority of people this is (seen as) an advantage. But not for me and the people I tend to work with. Otherwise Lean is wonderful. Best, Martin On 20/08/2020 17:38, carette at mcmaster.ca wrote: > No, I?m not leaving Agda. I have invested too much time already, and I > really do like it very much. I am/was incredibly curious as to what > seems to make Lean more of a ?rising star?. > > ? > > My personal conclusions: > - it?s not really the system per se, although Lean being ?classical? > helps attract a different crowd, > - it?s the **ecosystem**, and in particular, > - the large, extremely active and welcoming crowd of **math-lib** > developers that make Lean so attractive. > > ? > > The visible face of Lean is not Leonardo, but a large number of the > library developers. They?ve taken to github and Zulip with a vengeance. > There can be 200-300 messages/day (!) on the Lean Zulip. [That?s kind of > exhausting? but I guess that?s the price of success.]? Where there are > 18 open PRs on agda-stdlib (with the latest as #1279), there are > currently 77 on mathlib (latest #3879). > > ? > > The good news for the Agda devs is that the ?system devs? of Lean are > basically not visible here. They exist, are very busy doing cool stuff, > but the community is not run by them at all. Frees the system devs to > focus on their core strengths. > > ? > > My take homes, if the plan is to continuing growing the ?Agda ecosystem?: > - the community ought to pick a single communication system (Slack, > Discord, Zulip, gitter, whatever, but just one!) > - the merge-into-stdlib process needs more bandwidth (Matthew?s done an > amazing job, I?m mostly suggesting that he make proposals as to how to > scale up) > - actively push people who have useful private libraries to submit them > (perhaps in pieces) to stdlib > > ? > > For example, there is quite a lot of PL meta-theory ?out there?, in > Agda. It could make a lot of sense to augment stdlib with the standard > material for that. Lean?s math-lib is driven by formalizing ?regular > math? (their terminology, not mine). To me, it would make sense if > Agda?s stdlib was driven by ?the math+CS that its users regularly use?. > [Thus PL meta-theory as an obvious example.] > > ? > > Jacques > > ? > > PS: there is not an iota of complaint in the above. It is 100% meant as > conveying my observations, and personal conclusions on how to build > momentum. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From mechvel at scico.botik.ru Thu Aug 20 22:28:08 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Thu, 20 Aug 2020 23:28:08 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> Message-ID: <6618641c03d781cc471a8385e4135cce@scico.botik.ru> On 2020-08-20 22:06, Martin Escardo wrote: > From my personal point of view, Lean has two defects: > > * It used to support HoTT/UF and it doesn't anymore. > * It is ostensively classical and neglects constructive mathematics. > > I understand that for the vast majority of people this is (seen as) an > advantage. > > But not for me and the people I tend to work with. > > Otherwise Lean is wonderful. > Is its programming language functional? Lazy? Is it supported compilation and a fast execution? > * It is ostensively classical and neglects constructive mathematics. > > I understand that for the vast majority of people this is (seen as) an > advantage. Probably the majority of people keep in mind a bit another thing: a possibility to use a non-constructive proof, when failed to provide a constructive one. Does Agda support such a possibility? There is another point: the majority thinks that in constructive logic a proof by contradiction is never possible. But in fact it is very often possible. As to me, my doubt about the constructive philosophy is as follows. We have a simple semidecision procedure F for finding an even natural number n > 2 which is not a sum of any two primes. It is search-through, with checking each current n for this property, where the check for n is by search-through among primes p < n. It is a difficult problem to solve whether F terminates (whether the searched n exists). And suppose that we are proving a certain goal G by using the procedure F, as follows. "(1) If such n exists (the search F terminates), then prove G in one way. (2) It such does not exist (the search is infinite), then prove B in another way. If so, then G is proved. " I cannot imagine: what can be wrong in this discourse. In what way can it be possible the result R different from (1) and (2). How may it look this R ? The result of (1) or (2) exists in nature independently on whether we have shown some witness or not. ? -- SM From Jesper at sikanda.be Thu Aug 20 23:28:39 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 20 Aug 2020 23:28:39 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <6618641c03d781cc471a8385e4135cce@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> Message-ID: On Thu, Aug 20, 2020 at 10:29 PM wrote: > Probably the majority of people keep in mind a bit another thing: > a possibility to use a non-constructive proof, when failed to provide > a constructive one. > > Does Agda support such a possibility? > Everything you do in Agda is constructive by default, but you can always use `postulate` to add any non-constructive principle you want. It will not (or at least, should not) break Agda in any way, except that you (obviously) lose canonicity, i.e. you may have a `b : Bool` that does not evaluate to `true` or `false`. > I cannot imagine: what can be wrong in this discourse. > In what way can it be possible the result R different from (1) and (2). > How may it look this R ? > The result of (1) or (2) exists in nature independently on whether we > have shown > some witness or not. > ? > There is nothing inherently wrong with either constructive or non-constructive mathematics, which one you use depends on what job you want to use it for. In particular, the meaning of the word 'exists' is not the same in constructive and non-constructive mathematics. What can be annoying are the people who are convinced non-constructive mathematics is the right tool for *every* job. -- Jesper > > -- > SM > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hancock at fastmail.fm Fri Aug 21 00:16:05 2020 From: hancock at fastmail.fm (Peter Hancock) Date: Thu, 20 Aug 2020 23:16:05 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <81e53c44-785d-f24d-804a-d7d3f18c2ad2@fastmail.fm> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <81e53c44-785d-f24d-804a-d7d3f18c2ad2@fastmail.fm> Message-ID: I'm sorry Sergey, I meant to send this to the Agda list rather than just you. (Partly to see what Martin Escardo might respond). Peter Hancock On 20/08/2020 23:06, Peter Hancock wrote: >> As to me, my doubt about the constructive philosophy is as follows. >> >> We have a simple semidecision procedure F for finding an even natural number n > 2 >> which is not a sum of any two primes. >> It is search-through, with checking each current n for this property, >> where the check for n is by search-through among primes p < n. >> It is a difficult problem to solve whether F terminates (whether the searched n exists). >> >> And suppose that we are proving a certain goal G by using the procedure F, as follows. >> "(1) If such? n? exists (the search F terminates), then prove G in one way. >> ?(2) It such does not exist (the search is infinite), then prove B in another way. >> ?If so, then G is proved. >> " >> I cannot imagine: what can be wrong in this discourse. >> In what way can it be possible the result R different from (1) and (2). >> How may it look this R ? >> The result of (1) or (2) exists in nature independently on whether we have shown >> some witness or not. > You may be arguing for Markov's axiom (MP). One way of putting it is I think > that if a property P of natural numbers is decidable, then > ~(all n Pn) -> (exists n ~Pn). > > It is a seductively mild form of excluded middle. > Friedman (see Wikipedia) proved most formal systems of constructive > mathematics are closed under the corresponding rule. (Not sure how it is in type-theory, > but vaguely recall Erik Palmgren proved something?? about that.) > > It is a source of non-terminating arguments about the "computational meaning" of > constructive mathematics (at conferences over beer). > > Martin Escardo was once a virtuoso, and may still be, at playing the MP instrument. > > -- > H From nicolai.kraus at gmail.com Fri Aug 21 00:22:53 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Thu, 20 Aug 2020 23:22:53 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> Message-ID: <4cf4c4fc-fc3a-530e-df96-b1baf979c533@gmail.com> On 20/08/2020 22:28, Jesper Cockx wrote: > What can be annoying are the people who are convinced non-constructive > mathematics is the right tool for *every* job. Agreed. Those, and the people who are convinced that constructive mathematics is the right tool for every job. -- Nicolai From mechvel at scico.botik.ru Fri Aug 21 00:44:22 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 21 Aug 2020 01:44:22 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> Message-ID: <8c0cc2da8c5e615d304d77234808945c@scico.botik.ru> On 2020-08-21 00:28, Jesper Cockx wrote: > On Thu, Aug 20, 2020 at 10:29 PM wrote: > >> Probably the majority of people keep in mind a bit another thing: >> a possibility to use a non-constructive proof, when failed to >> provide >> a constructive one. >> >> Does Agda support such a possibility? > > Everything you do in Agda is constructive by default, but you can > always use `postulate` to add any non-constructive principle you want. > It will not (or at least, should not) break Agda in any way, except > that you (obviously) lose canonicity, i.e. you may have a `b : Bool` > that does not evaluate to `true` or `false`. I knew of the `postulate' possibility for using non-constructive proofs, but never tried it, doubt about the effects that may occur in practice. The constructive area is too large in computer algebra methods, one can program many years and never exit from it. >> I cannot imagine: what can be wrong in this discourse. >> In what way can it be possible the result R different from (1) and >> (2). >> How may it look this R ? >> The result of (1) or (2) exists in nature independently on whether >> we >> have shown >> some witness or not. >> ? > > There is nothing inherently wrong with either constructive or > non-constructive mathematics, which one you use depends on what job > you want to use it for. In particular, the meaning of the word > 'exists' is not the same in constructive and non-constructive > mathematics. Of course it is different. But in what way? Thus, in the above example with a `singular' even number: a singular number either exists in Nat (among 2,4,6...) or does not exist (i.e. the procedure F terminates or does not). In constructive philosophy, how can it look the third possibility in this example? > What can be annoying are the people who are convinced > non-constructive mathematics is the right tool for *every* job. Last 8 years I program proofs in Agda for algorithms in algebra. Initially Agda is chosen not for constructivism but for dependent types + functionality + laziness. I viewed dependent types as a tool for a better domain representation, without relation to constructivism. And all of these proofs occur constructive, so far, because (a) this is default in Agda, and one needs an effort and a particular reason to go beyond this, (b) it occurs sufficient, so far. But may there be any reason for using constructive proofs besides (a) and (b) ? I think, it is like in the following example. (I) One can prove non-constructively that a number n is not prime. (II) But a constructive proof provides an algorithm that returns an non-trivial divisor m for n. Evidently, (I) + (II) is strictly better than (I). I think, this example shows that it may have sense to search specially for a constructive proof. Evidently, this is so in many cases, but not in all cases. ? -- SM From m.escardo at cs.bham.ac.uk Fri Aug 21 07:18:54 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 21 Aug 2020 06:18:54 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <8c0cc2da8c5e615d304d77234808945c@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8c0cc2da8c5e615d304d77234808945c@scico.botik.ru> Message-ID: <5d3cacef-9040-f08c-9f7e-dce045bc82d6@cs.bham.ac.uk> You may wish to check Andrej Bauer's paper http://math.andrej.com/2016/10/10/five-stages-of-accepting-constructive-mathematics/ Martin On 20/08/2020 23:44, mechvel at scico.botik.ru wrote: > On 2020-08-21 00:28, Jesper Cockx wrote: >> On Thu, Aug 20, 2020 at 10:29 PM wrote: >> >>> Probably the majority of people keep in mind a bit another thing: >>> a possibility to use a non-constructive proof, when failed to >>> provide >>> a constructive one. >>> >>> Does Agda support such a possibility? >> >> Everything you do in Agda is constructive by default, but you can >> always use `postulate` to add any non-constructive principle you want. >> It will not (or at least, should not) break Agda in any way, except >> that you (obviously) lose canonicity, i.e. you may have a `b : Bool` >> that does not evaluate to `true` or `false`. > > I knew of the `postulate' possibility for using non-constructive proofs, > but never tried it, doubt about the effects that may occur in practice. > The constructive area is too large in computer algebra methods, one can > program many years and never exit from it. > > >>> I cannot imagine: what can be wrong in this discourse. >>> In what way can it be possible the result R different from (1) and >>> (2). >>> How may it look this R ? >>> The result of (1) or (2) exists in nature independently on whether >>> we >>> have shown >>> some witness or not. >>> ? >> >> There is nothing inherently wrong with either constructive or >> non-constructive mathematics, which one you use depends on what job >> you want to use it for. In particular, the meaning of the word >> 'exists' is not the same in constructive and non-constructive >> mathematics. > > Of course it is different. But in what way? > Thus, in the above example with a `singular' even number: > a singular number either exists in Nat (among 2,4,6...) or does not exist > (i.e. the procedure F terminates or does not). > > In constructive philosophy, how can it look the third possibility in > this example? > > >> What can be annoying are the people who are convinced >> non-constructive mathematics is the right tool for *every* job. > > Last 8 years I program proofs in Agda for algorithms in algebra. > Initially Agda is chosen not for constructivism but for > dependent types + functionality + laziness. > I viewed dependent types as a tool for a better domain representation, > without relation > to constructivism. > And all of these proofs occur constructive, so far, because > (a) this is default in Agda, and one needs an effort and a particular > reason to > ??? go beyond this, > (b) it occurs sufficient, so far. > > But may there be any reason for using constructive proofs besides (a) > and (b) ? > I think, it is like in the following example. > (I) One can prove non-constructively that a number? n? is not prime. > (II) But a constructive proof provides an algorithm that returns an > non-trivial divisor > ???? m? for? n. > Evidently, (I) + (II) is strictly better than (I). > > I think, this example shows that it may have sense to search specially for > a constructive proof. Evidently, this is so in many cases, but not in > all cases. > > ? > > -- > SM -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From m.escardo at cs.bham.ac.uk Fri Aug 21 07:38:53 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 21 Aug 2020 06:38:53 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <6618641c03d781cc471a8385e4135cce@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> Message-ID: <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> On 20/08/2020 21:28, mechvel at scico.botik.ru wrote: > Probably the majority of people keep in mind a bit another thing: > ? a possibility to use a non-constructive proof, when failed to provide > ? a constructive one. > > Does Agda support such a possibility? Yes. You can define a type EM that explains what excluded middle is and then prove e.g. EM -> Cantor-Schroeder-Bernstein. You can define a type Choice that explains what choice is, and prove that Choice -> EM. (That type Choice is not the one with the same name that just happens to hold.) You can define a type Global-Choice that explains what global choice is and prove Global-Choice -> ? Univalence. But Univalence, Choice and EM live happily together. And so on. I want to use any assumption I like, but also I don't like to be forced to use assumptions I don't want all the time. I may also want to occasionally work with assumptions that falsify EM (and hence Choice), such as "all functions are continuous". It depends on what I am trying to achieve and what I am talking about (i.e. in what model of type theory my types live in). If I want my types to be spaces, of course all functions will be continuous. If I want my types to be recursively presented sets, of course all functions will be computable. If I want my types to be classical sets, of course excluded middle and choice will hold. And so on. Excluded middle is like parallel postulate in Euclidean geometry: if you assert it, you get one kind of geometry, and if you negate it you get another kind. It is meaningless to ask whether the parallel postulate is true. What you can ask is whether it is true in the particular geometry you are interested in. The same goes for EM and other classical creatures. Martin From Thorsten.Altenkirch at nottingham.ac.uk Fri Aug 21 11:26:47 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 21 Aug 2020 09:26:47 +0000 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <4cf4c4fc-fc3a-530e-df96-b1baf979c533@gmail.com> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <4cf4c4fc-fc3a-530e-df96-b1baf979c533@gmail.com> Message-ID: <1C9FD59F-689E-4139-8665-BDA93F449B23@nottingham.ac.uk> On 20/08/2020, 23:23, "Agda on behalf of Nicolai Kraus" wrote: On 20/08/2020 22:28, Jesper Cockx wrote: > What can be annoying are the people who are convinced non-constructive > mathematics is the right tool for *every* job. Agreed. Those, and the people who are convinced that constructive mathematics is the right tool for every job. This sounds a bit like "All lives matter" as a response to "Black lives matter". In the moment constructivism is a minority position and nobody (including myself) have ever suggested that Mathematicians should immediately abandon classical Mathematics and work only constructively. All what we have suggested is an awareness of the issue of constructivity. I do believe that philosophically constructivism is preferable, because the idea that mathematical concepts are like real objects (Platonism) seems rather far fetched to me. Hence it seems sensible not to talk about truth but evidence. People have said that this is a religious debate. First f all it is interesting that only minority positions are being accused of being religious, as long as you are on the mainstream you are fine. Second I do think it is possible to have a rational discourse about foundations, and this has nothing to do with religion. Thorsten -- Nicolai _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From Jesper at sikanda.be Fri Aug 21 13:23:24 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 21 Aug 2020 13:23:24 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) Message-ID: Dear Agdakkers, In his recent mail, Jacques raised an important point that got lost in the rest of the conversation: > - the community ought to pick a single communication system (Slack, Discord, Zulip, gitter, whatever, but just one!) I wholeheartedly agree with this! Github does a reasonable job of keeping track of issues and feature requests, and this mailing list works well for broadcasting messages to the broader community, so these two we should definitely keep. But it would be nice to consolidate all other discussions and questions on a single platform. Here are some of the current options with my opinion on them: - IRC: An open system but based on archaic technology. I'm having a hard time browsing the history of a channel when I'm not always connected. - Slack: Seems to be the de facto standard for many people and we used it successfully during the latest Agda meeting. However, it is commercial software and keeping a full history is not free. - Gitter: Is well integrated with Github but feels otherwise quite barebones compared to Slack. - Discord: Many features are more aimed at gamers than programmers. Some people used it for screensharing during the Agda meeting. It is commercial software and we'd have to pay for certain features - Zulip: Has a nice threaded interface to conversations that can take a while to get used to. It is 100% open source software and is explicitly aimed at open source communities (https://zulipchat.com/for/open-source/). The HoTT community also seems to be using it quite effectively. - MatterMost, RocketChat, Matrix.org, ...: These are other open source alternatives to Slack, but they seem to be less popular than Zulip in the type theory / formalized math circles. My personal preference would be to centralize all communication (other than Github and the mailing list) on Zulip. But since this is an important decision, I would very much like to hear other opinions as well before we decide on anything. Cheers, Jesper -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Fri Aug 21 13:35:36 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Fri, 21 Aug 2020 13:35:36 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: Message-ID: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> > Here are some of the current options with my opinion on them: I'd like to throw https://en.wikipedia.org/wiki/Discourse_(software) into the mix. It's very successfully in use for the NixOS and Nextcloud communities. > My personal preference would be to centralize all communication (other > than Github and the mailing list) on Zulip. But since this is an > important decision, I would very much like to hear other opinions as > well before we decide on anything. A wild thought that might seem impossible to some, but is much in line with the proposal: Get rid of the mailing list as well in the long run. I'd consider mailing lists to be quite an arcane, unscalable, closed, poorly searchable medium. Of course, a technologically superior alternative such as Discourse or Zulip would have to be installed and stabilised first, and ongoing discussions (and possibly the mailing list history) moved there. From a.j.rouvoet at gmail.com Fri Aug 21 13:37:46 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Fri, 21 Aug 2020 13:37:46 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: Message-ID: <667a654d-040a-87b0-3187-df5601cdeaad@gmail.com> Although I agree with the intent, I suspect that trying to convince the entirety of the community to consolidate on a single platform is bound to fail. For example, the #agda freenode channel is not going anywhere soon. Another example that I only became aware of: the functional-programming slack (functionalprogramming.slack.com) has an #agda channel with 400 members, and is also on zulip (https://funprog.zulipchat.com/login/#narrow/stream/215389-Agda). That being said, you can certainly ensure that the Agda website etc. picks one solid medium that can be used for all casual communications besides the mailing list and the issue tracker. Do not just spawn a new one; make sure you move the conversation and kill off the ones managed by the Agda team that are then deprecated (slack, gitter, ...). Personally, I'd like to vouch for Discord---but am not against Zulip perse, since I have no experience with it. Communities like https://discord.com/invite/reasonml are extremely easy access and heavily used by programmers. Slack is slow and tedious nowadays. (Sorry Jesper, I intended to reply to the list) On 8/21/20 1:23 PM, Jesper Cockx wrote: > Dear Agdakkers, > > In his recent mail, Jacques raised an important point that got lost in > the rest of the conversation: > > > - the community ought to pick a single communication system (Slack, > Discord, Zulip, gitter, whatever, but just one!) > > I wholeheartedly agree with this! Github does a reasonable job of > keeping track of issues and feature requests, and this mailing list > works well for broadcasting messages to the broader community, so > these two we should definitely keep. But it would be nice to > consolidate all other discussions and questions on a single platform. > > Here are some of the current options with my opinion on them: > > - IRC: An open system but based on archaic technology. I'm having a > hard time browsing the history of a channel when I'm not always connected. > - Slack: Seems to be the de facto standard for many people and we used > it successfully during the latest Agda meeting. However, it is > commercial software and keeping a full history is not free. > - Gitter: Is well integrated with Github but feels otherwise quite > barebones compared to Slack. > - Discord: Many features are more aimed at gamers than programmers. > Some people used it for screensharing during the Agda meeting. It is > commercial software and we'd have to pay for certain features > - Zulip: Has a nice threaded interface to conversations that can take > a while to get used to. It is 100% open source software and is > explicitly aimed at open source communities > (https://zulipchat.com/for/open-source/ > ). The HoTT community also > seems to be using it quite effectively. > - MatterMost, RocketChat, Matrix.org, ...: These are other open source > alternatives to Slack, but they seem to be less popular than Zulip in > the type theory / formalized math circles. > > My personal preference would be to centralize all communication (other > than Github and the mailing list) on Zulip. But since this is an > important decision, I would very much like to hear other opinions as > well before we decide on anything. > > Cheers, > Jesper > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Fri Aug 21 13:42:41 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 21 Aug 2020 13:42:41 +0200 Subject: [Agda] \ell does not display In-Reply-To: <208c4745-f1d0-cb50-36b1-eb4784dff0ac@ens-lyon.fr> References: <9c2abfc1-9caa-addb-292e-51d8449c9cbc@cse.gu.se> <208c4745-f1d0-cb50-36b1-eb4784dff0ac@ens-lyon.fr> Message-ID: <144b74ec-8fcd-89ea-99df-9e38c7c8895c@cse.gu.se> On 2020-08-20 18:18, Pierre Lescanne (en) wrote: > Actually ? displays in all the buffers as a space. Have you tried switching to a different font? -- /NAD From Jesper at sikanda.be Fri Aug 21 13:52:46 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 21 Aug 2020 13:52:46 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: <667a654d-040a-87b0-3187-df5601cdeaad@gmail.com> References: <667a654d-040a-87b0-3187-df5601cdeaad@gmail.com> Message-ID: > > A wild thought that might seem impossible to some, but is much in line > with the proposal: Get rid of the mailing list as well in the long run. > I'd consider mailing lists to be quite an arcane, unscalable, closed, > poorly searchable medium. Of course, a technologically superior > alternative such as Discourse or Zulip would have to be installed and > stabilised first, and ongoing discussions (and possibly the mailing list > history) moved there. > I agree that email is an outdated technology, however it is too entrenched to just get rid of it (unlike, say, the current Slack or Discord servers). If we have a clear alternative that works better, then conversations will naturally move over to there. > Although I agree with the intent, I suspect that trying to convince the > entirety of the community to consolidate on a single platform is bound to > fail. > For example, the #agda freenode channel is not going anywhere soon. > Another example that I only became aware of: the functional-programming > slack (functionalprogramming.slack.com) has an #agda channel with 400 > members, and is also on zulip ( > https://funprog.zulipchat.com/login/#narrow/stream/215389-Agda). > I (obviously) don't want to ban any kind of conversation on Agda in other places, this is more about having an "official" channel that we can link to from the website and use for things like helping people with their code and online Agda meetings. For IRC specifically, there is a bidirectional integration of IRC to Zulip, so it can continue to exist (and perhaps there will even be more people reading the messages on it via Zulip). Personally, I'd like to vouch for Discord---but am not against Zulip perse, > since I have no experience with it. > Communities like https://discord.com/invite/reasonml are extremely easy > access and heavily used by programmers. > Slack is slow and tedious nowadays. > Two advantages of Zulip over Discord are (1) it supports better integration with Github, and (2) open source communities get access to all features for free. OTOH Discord has integrated audio/video chat and screensharing, so there's a tradeoff. -- Jesper On Fri, Aug 21, 2020 at 1:38 PM a.j.rouvoet wrote: > Although I agree with the intent, I suspect that trying to convince the > entirety of the community to consolidate on a single platform is bound to > fail. > For example, the #agda freenode channel is not going anywhere soon. > Another example that I only became aware of: the functional-programming > slack (functionalprogramming.slack.com) has an #agda channel with 400 > members, and is also on zulip ( > https://funprog.zulipchat.com/login/#narrow/stream/215389-Agda). > > That being said, you can certainly ensure that the Agda website etc. picks > one solid medium that can be used for all casual communications besides the > mailing list and the issue tracker. Do not just spawn a new one; make sure > you move the conversation and kill off the ones managed by the Agda team > that are then deprecated (slack, gitter, ...). > > Personally, I'd like to vouch for Discord---but am not against Zulip > perse, since I have no experience with it. > Communities like https://discord.com/invite/reasonml are extremely easy > access and heavily used by programmers. > Slack is slow and tedious nowadays. > > (Sorry Jesper, I intended to reply to the list) > On 8/21/20 1:23 PM, Jesper Cockx wrote: > > Dear Agdakkers, > > In his recent mail, Jacques raised an important point that got lost in the > rest of the conversation: > > > - the community ought to pick a single communication system (Slack, > Discord, Zulip, gitter, whatever, but just one!) > > I wholeheartedly agree with this! Github does a reasonable job of keeping > track of issues and feature requests, and this mailing list works well for > broadcasting messages to the broader community, so these two we should > definitely keep. But it would be nice to consolidate all other discussions > and questions on a single platform. > > Here are some of the current options with my opinion on them: > > - IRC: An open system but based on archaic technology. I'm having a hard > time browsing the history of a channel when I'm not always connected. > - Slack: Seems to be the de facto standard for many people and we used it > successfully during the latest Agda meeting. However, it is commercial > software and keeping a full history is not free. > - Gitter: Is well integrated with Github but feels otherwise quite > barebones compared to Slack. > - Discord: Many features are more aimed at gamers than programmers. Some > people used it for screensharing during the Agda meeting. It is commercial > software and we'd have to pay for certain features > - Zulip: Has a nice threaded interface to conversations that can take a > while to get used to. It is 100% open source software and is explicitly > aimed at open source communities (https://zulipchat.com/for/open-source/). > The HoTT community also seems to be using it quite effectively. > - MatterMost, RocketChat, Matrix.org, ...: These are other open source > alternatives to Slack, but they seem to be less popular than Zulip in the > type theory / formalized math circles. > > My personal preference would be to centralize all communication (other > than Github and the mailing list) on Zulip. But since this is an important > decision, I would very much like to hear other opinions as well before we > decide on anything. > > Cheers, > Jesper > > _______________________________________________ > Agda mailing listAgda at lists.chalmers.sehttps://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Fri Aug 21 13:57:28 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 21 Aug 2020 13:57:28 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> Message-ID: On 2020-08-21 13:35, Manuel B?renz wrote: > I'd consider mailing lists to be quite an arcane, unscalable, closed, > poorly searchable medium. Of course, a technologically superior > alternative such as Discourse or Zulip would have to be installed and > stabilised first, and ongoing discussions (and possibly the mailing list > history) moved there. One property of e-mail that I like is that one can choose between many different clients. Does the same apply to any of the other communication methods being discussed? -- /NAD From a.j.rouvoet at gmail.com Fri Aug 21 13:57:50 2020 From: a.j.rouvoet at gmail.com (a.j.rouvoet) Date: Fri, 21 Aug 2020 13:57:50 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <667a654d-040a-87b0-3187-df5601cdeaad@gmail.com> Message-ID: <1d7d3137-0fb3-2791-7ce6-1aba1d3672af@gmail.com> > I (obviously) don't want to ban any kind of conversation on Agda in other places Good! But yes, I guess I just wanted to hint at the fact that spawning any new channel might just turn out to fragment the community /more/ (insert relevant xkcd here). > For IRC specifically, there is a bidirectional integration of IRC to Zulip Neat! > Two advantages of Zulip over Discord are (1) it supports better integration with Github, and (2) open source communities get access to all features for free. Also neat. Arjen On 8/21/20 1:52 PM, Jesper Cockx wrote: > > A wild thought that might seem impossible to some, but is much in line > with the proposal: Get rid of the mailing list as well in the long > run. > I'd consider mailing lists to be quite an arcane, unscalable, closed, > poorly searchable medium. Of course, a technologically superior > alternative such as Discourse or Zulip would have to be installed and > stabilised first, and ongoing discussions (and possibly the > mailing list > history) moved there. > > > I agree that email is an outdated technology, however it is too > entrenched to just get rid of it (unlike, say, the current Slack or > Discord servers). If we have a clear alternative that works better, > then conversations will naturally move over to there. > > Although I agree with the intent, I suspect that trying to > convince the entirety of the community to consolidate on a single > platform is bound to fail. > For example, the #agda freenode channel is not going anywhere > soon. Another example that I only became aware of: the > functional-programming slack (functionalprogramming.slack.com > ) has an #agda channel > with 400 members, and is also on zulip > (https://funprog.zulipchat.com/login/#narrow/stream/215389-Agda > ). > > > I (obviously) don't want to ban any kind of conversation on Agda in > other places, this is more about having an "official" channel that we > can link to from the website and use for things like helping people > with their code and online Agda meetings. > > For IRC specifically, there is a bidirectional integration of IRC to > Zulip, so it can continue to exist (and perhaps there will even be > more people reading the messages on it via Zulip). > > Personally, I'd like to vouch for Discord---but am not against > Zulip perse, since I have no experience with it. > Communities like https://discord.com/invite/reasonml > are extremely easy access > and heavily used by programmers. > Slack is slow and tedious nowadays. > > > Two advantages of Zulip over Discord are (1) it supports better > integration with Github, and (2) open source communities get access to > all features for free. OTOH Discord has integrated audio/video chat > and screensharing, so there's a tradeoff. > > -- Jesper > > On Fri, Aug 21, 2020 at 1:38 PM a.j.rouvoet > wrote: > > Although I agree with the intent, I suspect that trying to > convince the entirety of the community to consolidate on a single > platform is bound to fail. > For example, the #agda freenode channel is not going anywhere > soon. Another example that I only became aware of: the > functional-programming slack (functionalprogramming.slack.com > ) has an #agda channel > with 400 members, and is also on zulip > (https://funprog.zulipchat.com/login/#narrow/stream/215389-Agda > ). > > That being said, you can certainly ensure that the Agda website > etc. picks one solid medium that can be used for all casual > communications besides the mailing list and the issue tracker. Do > not just spawn a new one; make sure you move the conversation and > kill off the ones managed by the Agda team that are then > deprecated (slack, gitter, ...). > > Personally, I'd like to vouch for Discord---but am not against > Zulip perse, since I have no experience with it. > Communities like https://discord.com/invite/reasonml > are extremely easy access > and heavily used by programmers. > Slack is slow and tedious nowadays. > > (Sorry Jesper, I intended to reply to the list) > > On 8/21/20 1:23 PM, Jesper Cockx wrote: >> Dear Agdakkers, >> >> In his recent mail, Jacques raised an important point that got >> lost in the rest of the conversation: >> >> > - the community ought to pick a single communication system >> (Slack, Discord, Zulip, gitter, whatever, but just one!) >> >> I wholeheartedly agree with this! Github does a reasonable job of >> keeping track of issues and feature requests, and this mailing >> list works well for broadcasting messages to the broader >> community, so these two we should definitely keep. But it would >> be nice to consolidate all other discussions and questions on a >> single platform. >> >> Here are some of the current options with my opinion on them: >> >> - IRC: An open system but based on archaic technology. I'm having >> a hard time browsing the history of a channel when I'm not always >> connected. >> - Slack: Seems to be the de facto standard for many people and we >> used it successfully during the latest Agda meeting. However, it >> is commercial software and keeping a full history is not free. >> - Gitter: Is well integrated with Github but feels otherwise >> quite barebones compared to Slack. >> - Discord: Many features are more aimed at gamers than >> programmers. Some people used it for screensharing during the >> Agda meeting. It is commercial software and we'd have to pay for >> certain features >> - Zulip: Has a nice threaded interface to conversations that can >> take a while to get used to. It is 100% open source software and >> is explicitly aimed at open source communities >> (https://zulipchat.com/for/open-source/ >> ). The HoTT community >> also seems to be using it quite effectively. >> - MatterMost, RocketChat, Matrix.org, ...: These are other open >> source alternatives to Slack, but they seem to be less popular >> than Zulip in the type theory / formalized math circles. >> >> My personal preference would be to centralize all communication >> (other than Github and the mailing list) on Zulip. But since this >> is an important decision, I would very much like to hear other >> opinions as well before we decide on anything. >> >> Cheers, >> Jesper >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Fri Aug 21 14:15:29 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 21 Aug 2020 14:15:29 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> Message-ID: > > One property of e-mail that I like is that one can choose between many > different clients. Does the same apply to any of the other communication > methods being discussed? > As far as I know the only platform with this feature is Matrix.org, which is designed as an open platform with many possible clients, e.g. https://element.io/. I have never tried it myself however, so I can't say much about it other than that. -- Jesper On Fri, Aug 21, 2020 at 1:58 PM Nils Anders Danielsson wrote: > On 2020-08-21 13:35, Manuel B?renz wrote: > > I'd consider mailing lists to be quite an arcane, unscalable, closed, > > poorly searchable medium. Of course, a technologically superior > > alternative such as Discourse or Zulip would have to be installed and > > stabilised first, and ongoing discussions (and possibly the mailing list > > history) moved there. > > One property of e-mail that I like is that one can choose between many > different clients. Does the same apply to any of the other communication > methods being discussed? > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Fri Aug 21 14:20:03 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Fri, 21 Aug 2020 13:20:03 +0100 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: Message-ID: <73a041a4-8ac4-2809-dc03-eab93540ef31@strath.ac.uk> We also have the /r/agda subreddit. I think Reddit is in ways similar to IRC, in that people know that if they type in ?reddit.com/r/? or ?/join #?, then they'll be able to get help about Foo. This doesn't necessarily mean that Reddit and IRC have to be *the* places where questions get asked and answered, but people who arrive there should be fast-tracked to wherever this happens (possibly via a bridge where appropriate). I'll refrain from making any more judgements on communication technology for now. James On 21/08/2020 12:23, Jesper Cockx wrote: > Dear Agdakkers, > > In his recent mail, Jacques raised an important point that got lost in > the rest of the conversation: > >> - the community ought to pick a single communication system (Slack, > Discord, Zulip, gitter, whatever, but just one!) > > I wholeheartedly agree with this! Github does a reasonable job of > keeping track of issues and feature requests, and this mailing list > works well for broadcasting messages to the broader community, so these > two we should definitely keep. But it would be nice to consolidate all > other discussions and questions on a single platform. > > Here are some of the current options with my opinion on them: > > - IRC: An open system but based on archaic technology. I'm having a hard > time browsing the history of a channel when I'm not always connected. > - Slack: Seems to be the de facto standard for many people and we used > it successfully during the latest Agda meeting. However, it is > commercial software and keeping a full history is not free. > - Gitter: Is well integrated with Github but feels otherwise quite > barebones compared to Slack. > - Discord: Many features are more aimed at gamers than programmers. Some > people used it for screensharing during the Agda meeting. It is > commercial software and we'd have to pay for certain features > - Zulip: Has a nice threaded interface to conversations that can take a > while to get used to. It is 100% open source software and is explicitly > aimed at open source communities (https://zulipchat.com/for/open-source/ > ). > The HoTT community also seems to be using it quite effectively. > - MatterMost, RocketChat, Matrix.org, ...: These are other open source > alternatives to Slack, but they seem to be less popular than Zulip in > the type theory / formalized math circles. > > My personal preference would be to centralize all communication (other > than Github and the mailing list) on Zulip. But since this is an > important decision, I would very much like to hear other opinions as > well before we decide on anything. > > Cheers, > Jesper > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From manuel at enigmage.de Fri Aug 21 14:41:10 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Fri, 21 Aug 2020 14:41:10 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> Message-ID: <0c7fb8f9-9545-4b11-4d66-2596b96fd286@enigmage.de> > One property of e-mail that I like is that one can choose between many > different clients. Would an alternative with a good email integration (i.e. read threads by receiving email, answer & start threads by sending an email) work for you? From Jesper at sikanda.be Fri Aug 21 14:44:15 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 21 Aug 2020 14:44:15 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> Message-ID: I hopped onto the agda:matrix.org server (which already exists and is being used by the Oxford Agda people) and asked for opinions on the platform, which Nick Hu was kind enough to provide: The biggest issue with Matrix is when people (like us unfortunately) use > the matrix.org homeserver, which is severely over capacity ( > https://t2bot.io/docs/2020-matrix-org-lag/). This causes events, e.g. > push notifications and messages, to sometimes be severely delayed, although > I haven't noticed this super recently > > Ideally, each university/CS department should have their own homeserver - > I've been trying to set ours up in OxfordI feel that discourse (and > forums in general) is a different medium to webchat, and we actually have a > discourse instance too at discourse.agda.club > > Slack has this weird user limit and privacy issues because you have to let > them host it, and I don't think it offers any tangible benefit over Matrix > - it doesn't do anything particularly novel, and as far as I can tell it's > just IRC made proprietary and marketed for millions of dollars > > Zulip is the same as slack except you have the "killer feature" of threads > - to me, it seems like at any moment slack could implement this and then > zulip will be abandoned > > In particular I'm excited for element to adopt LaTeX support ( > https://github.com/matrix-org/matrix-react-sdk/pull/3251), which is on > the roadmap and should happen soon(TM) > > Mozilla and the French government have adopted Matrix, so hopefully that's > convincing enough to show you it's not so niche! (Although polish is > undoubtedly desired, we'll get there..) > > Matrix supports markdown with syntax highlighting, so you can write things > like > > main :: IO ()main = undefined > > It uses highlight.js for this, so if someone > were to write a highlight.js plugin for Agda then that might be nice ? > Although it still feels slightly less mature than Zulip, I think Matrix actually shows a lot of potential, and the fact that it's open to alternative clients is a big plus. So we should definitely also consider it as an option. -- Jesper On Fri, Aug 21, 2020 at 2:15 PM Jesper Cockx wrote: > One property of e-mail that I like is that one can choose between many >> different clients. Does the same apply to any of the other communication >> methods being discussed? >> > > As far as I know the only platform with this feature is Matrix.org, which > is designed as an open platform with many possible clients, e.g. > https://element.io/. I have never tried it myself however, so I can't say > much about it other than that. > > -- Jesper > > On Fri, Aug 21, 2020 at 1:58 PM Nils Anders Danielsson > wrote: > >> On 2020-08-21 13:35, Manuel B?renz wrote: >> > I'd consider mailing lists to be quite an arcane, unscalable, closed, >> > poorly searchable medium. Of course, a technologically superior >> > alternative such as Discourse or Zulip would have to be installed and >> > stabilised first, and ongoing discussions (and possibly the mailing list >> > history) moved there. >> >> One property of e-mail that I like is that one can choose between many >> different clients. Does the same apply to any of the other communication >> methods being discussed? >> >> -- >> /NAD >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidchristiansen.dk Fri Aug 21 15:20:23 2020 From: david at davidchristiansen.dk (David Thrane Christiansen) Date: Fri, 21 Aug 2020 06:20:23 -0700 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> Message-ID: One property of e-mail that I like is that one can choose between many >> different clients. Does the same apply to any of the other communication >> methods being discussed? >> > > As far as I know the only platform with this feature is Matrix.org, which > is designed as an open platform with many possible clients, e.g. > https://element.io/. I have never tried it myself however, so I can't say > much about it other than that. > > -- Jesper > Mattermost has at least one additional client that Galois built and maintains: https://github.com/matterhorn-chat/matterhorn We use Mattermost internally, and having a much lighter weight client than the clunky Web ones is a real improvement over something like Slack or Discord, where you're stuck. But Matrix was really designed as a protocol first, and it has many more clients, which is nice. David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Fri Aug 21 15:30:01 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 21 Aug 2020 16:30:01 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> Message-ID: On 2020-08-21 08:38, Martin Escardo wrote: > [..] > Excluded middle is like parallel postulate in Euclidean geometry: if > you > assert it, you get one kind of geometry, and if you negate it you get > another kind. It is meaningless to ask whether the parallel postulate > is > true. What you can ask is whether it is true in the particular geometry > you are interested in. The same goes for EM and other classical > creatures. > The matter is that so far nobody explained me that this is similar. Because the possibility of removing the fifth postulate in geometry is accompanied with various models for the remaining abstract theory. For example, the Lobachevsky's plane is a hyperboloid H, in which "straight lines" are put to be sections of H with Euclid's planes. And we see that all the postulates are preserved except the fifth one. Because for any hyperbola G on H there and a point P out of G there are visible many hyperbolas that contain P and does not intersect with G - a certain cone of lines "parallel" to G. I do not see such a convincive model for constructivism. Suppose that excluded middle proof is removed (in a certain sense). Consider the above search procedure F for n : Nat such that P(n) in the example with searching a singular number. In the classical philosophy: "(1) either F terminates, and then A gives the proof of G, or (2) F does not terminate, and then B gives a proof for G. " This is equivalent to "(1) exists (classically) n such P(n) ... Or (2) does not exist n such P(n) ...". And constructivism pretends that this is not a proof for G. So, it says that it is not enough to consider these two possibilities ("terminates" or "never terminates"). As it is not enough, then how can it look any other possibility? Lobachevsky's plane demonstrates at least one variant of "how can it look". And I do not see such a demonstration in constructivism - for this particular example. -- ?? From mechvel at scico.botik.ru Fri Aug 21 15:38:11 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 21 Aug 2020 16:38:11 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <5d3cacef-9040-f08c-9f7e-dce045bc82d6@cs.bham.ac.uk> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8c0cc2da8c5e615d304d77234808945c@scico.botik.ru> <5d3cacef-9040-f08c-9f7e-dce045bc82d6@cs.bham.ac.uk> Message-ID: <8d172cd564ffc6b899f018b88bf7eef4@scico.botik.ru> On 2020-08-21 08:18, Martin Escardo wrote: > You may wish to check Andrej Bauer's paper > http://math.andrej.com/2016/10/10/five-stages-of-accepting-constructive-mathematics/ > It looks good, interesting. Thank you. -- SM From david at davidchristiansen.dk Fri Aug 21 15:42:00 2020 From: david at davidchristiansen.dk (David Thrane Christiansen) Date: Fri, 21 Aug 2020 06:42:00 -0700 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <667a654d-040a-87b0-3187-df5601cdeaad@gmail.com> Message-ID: > A wild thought that might seem impossible to some, but is much in line >> with the proposal: Get rid of the mailing list as well in the long run. >> I'd consider mailing lists to be quite an arcane, unscalable, closed, >> poorly searchable medium. Of course, a technologically superior >> alternative such as Discourse or Zulip would have to be installed and >> stabilised first, and ongoing discussions (and possibly the mailing list >> history) moved there. >> > > I agree that email is an outdated technology, however it is too entrenched > to just get rid of it (unlike, say, the current Slack or Discord servers). > If we have a clear alternative that works better, then conversations will > naturally move over to there. > I'm mostly a lurker here, so my opinion is perhaps worth a bit less. But I do think that email has a nice property that chat systems don't: the affordances of the medium cause it to tend towards longer-form, more thoughtful replies. And mailing list archives tend to be nicely indexed - I've found useful things from old Agda posts in my normal search results on various topics even when I wasn't looking specifically in the Agda archives, but this has never happened with a Zulip or Discord server. It would be a shame for every search to need to be redone in five different closed chat systems that don't even have stable archive formats. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From godzbanebane at gmail.com Fri Aug 21 16:11:04 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Fri, 21 Aug 2020 17:11:04 +0300 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <667a654d-040a-87b0-3187-df5601cdeaad@gmail.com> Message-ID: Hi! I'm also obviously not an active community member, but I want to share that I had: * not-so-good experience with discord for teaching communication - lack of threads sucks for long-running discussions and it's also non-trivial to create specialised rooms (by default everyone is included in every chat channel, if it's created public). * good experience with zulip (compared to slack) from the aforementioned functional programming zulip instance (funprog) - threads are bumped when posting to them, there is some kind of latex support, zulip are open to supporting the community (e.g. they have with the funprog one by providing a free plan which is usually paid), it's open source ====== Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From anka.213 at gmail.com Fri Aug 21 16:34:31 2020 From: anka.213 at gmail.com (=?utf-8?Q?Andreas_K=C3=A4llberg?=) Date: Fri, 21 Aug 2020 16:34:31 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> Message-ID: <8CE90557-1FD0-4523-840B-0DBA3DBBC8E9@gmail.com> > On 21 Aug 2020, at 13:57, Nils Anders Danielsson wrote: > > One property of e-mail that I like is that one can choose between many > different clients. Does the same apply to any of the other communication > methods being discussed? > Discourse has the advantage of allowing you to treat it more or less as a mailing list, so that could help with the migration if we would like to move there. And it would allow those who want to, to continue interacting with the list using their usual email client, while others interact via the web interface. https://discourse.julialang.org/t/discourse-as-a-mailing-list/57 https://meta.discourse.org/t/discourse-vs-email-mailing-lists/54298 There also seems to be an option for automatically importing data from a mailing list: https://meta.discourse.org/t/importing-mailing-lists-mbox-listserv-google-groups-emails/79773 /Andreas K?llberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Fri Aug 21 18:47:39 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Fri, 21 Aug 2020 17:47:39 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: Message-ID: Hi all, Nicolai makes good observations here. I would, though, argue that some of the differences in focus *can* be explained by the differences between the two systems. In particular, I both personally believe and think it's common wisdom that Agda is the best tool for type-directed programming, of the kind that naturally extends to correct-by-construction programming. This is mostly due to interactive editing of pattern-matching definitions. As far as I know, Idris is the only comparable system in this regard (and I would mostly be happy to write my dependently typed programs in it, too). It happens that type-directed programming is basically what we want for the metatheory of programming languages and logics. Usually we have two big types ? object-level types and terms ? and furthermore the terms have very careful types to enforce scoping and typing. With inductive types with many constructors, having the constructor names appear in the source code is useful for maintenance, and interactive editing puts them there, rather than having to write them all out. And we really are doing programming a lot of the time ? for example, defining renaming, substitution, and semantics. Most other areas of maths traditionally don't resemble this type-directed style of programming. There are few, small, inductive types, and a lot of reasoning is done at the level of algebraic axioms (with no inductive types in sight). These features largely nullify Agda's advantages, and instead the advantages of Lean and Coq in the field of proving shine through. In summary, I think it makes more sense to view the existence of both Agda and Lean as complementary (not to mention other systems too, with different strengths). In particular, the two are naturally going to attract different kinds of people. Perhaps the best we can do in terms of marketing is to promote Agda as a view of the future of programming (and the present of PL/logic), similar to Lean being promoted as a view of the future of mathematics. Maybe we can also learn, again complementarily, from Lean about how to get things built. As I understand it, one of the main aims of Kevin Buzzard's Xena Project is to mechanise an entire mathematics undergraduate curriculum, and this seems to excite enough undergraduates to make it a feasible goal. Can we do anything similar with a computer science undergraduate programme? Could we get interested undergrads to mechanise, say, the data structures & algorithms, logic & proof, and PL & types courses? Would they want (analytic) cryptography theory to be within reach? And are there areas of a maths undergrad it's worth focusing on? Regards, James On 20/08/2020 19:21, Nicolai Kraus wrote: > Thanks for the interesting observations!? > > My impression is that Agda is used a lot for computer science / > programming language research, while Lean is > used for formalising mathematics (obviously with many many excpetions). > These are different although certainly overlapping communities. As a > result, Lean has huge libraries of formalised (in Kevin Buzzard's words) > generic mathematics, and Agda has many developments which study the > meta-theory of type systems, and so on. In principle, both communities > could use the same system, I guess it has happened for "soft" reasons > (social reasons, "marketing", random chance etc) that they don't. I > don't know whether Lean is fundamentally better than Agda for > formalising maths, or whether Agda is fundamentally better than Lean for > PL research. Probably not, but I also don't think there is any problem. > > The above is just what I have observed, I don't want to suggest anything > since I think it's very good already :-) > (I agree with the single communication system though, that would > probably simplify things.) > > Nicolai > > > > On 20/08/2020 17:38, Carette, Jacques wrote: >> >> No, I?m not leaving Agda. I have invested too much time already, and I >> really do like it very much. I am/was incredibly curious as to what >> seems to make Lean more of a ?rising star?. >> >> ? >> >> My personal conclusions: >> - it?s not really the system per se, although Lean being ?classical? >> helps attract a different crowd, >> - it?s the **ecosystem**, and in particular, >> - the large, extremely active and welcoming crowd of **math-lib** >> developers that make Lean so attractive. >> >> ? >> >> The visible face of Lean is not Leonardo, but a large number of the >> library developers. They?ve taken to github and Zulip with a >> vengeance. There can be 200-300 messages/day (!) on the Lean Zulip. >> [That?s kind of exhausting? but I guess that?s the price of success.]? >> Where there are 18 open PRs on agda-stdlib (with the latest as #1279), >> there are currently 77 on mathlib (latest #3879). >> >> ? >> >> The good news for the Agda devs is that the ?system devs? of Lean are >> basically not visible here. They exist, are very busy doing cool >> stuff, but the community is not run by them at all. Frees the system >> devs to focus on their core strengths. >> >> ? >> >> My take homes, if the plan is to continuing growing the ?Agda ecosystem?: >> - the community ought to pick a single communication system (Slack, >> Discord, Zulip, gitter, whatever, but just one!) >> - the merge-into-stdlib process needs more bandwidth (Matthew?s done >> an amazing job, I?m mostly suggesting that he make proposals as to how >> to scale up) >> - actively push people who have useful private libraries to submit >> them (perhaps in pieces) to stdlib >> >> ? >> >> For example, there is quite a lot of PL meta-theory ?out there?, in >> Agda. It could make a lot of sense to augment stdlib with the standard >> material for that. Lean?s math-lib is driven by formalizing ?regular >> math? (their terminology, not mine). To me, it would make sense if >> Agda?s stdlib was driven by ?the math+CS that its users regularly >> use?. [Thus PL meta-theory as an obvious example.] >> >> ? >> >> Jacques >> >> ? >> >> PS: there is not an iota of complaint in the above. It is 100% meant >> as conveying my observations, and personal conclusions on how to build >> momentum. >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From don at jorgebs.es Fri Aug 21 19:18:34 2020 From: don at jorgebs.es (Jorge =?iso-8859-1?q?Bl=E1zquez?= Saborido) Date: Fri, 21 Aug 2020 19:18:34 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: Message-ID: Hi all, I'm an undergraduate student on Computer Science and, inspired by Kevin Buzzard, I started formalizing parts of the Theory of Computation. Since I have experience with Haskell, and Lean seems more of a tool for mathematicians, I chose Agda. I also chose Cubical Agda, since it looks very promising. If you plan on doing some kind of big project formalizing CS in Agda, I would be very interested! I think having some repositories that are maintained by the community would be greatly beneficial. I often find projects in Agda but they are either very old or incompatible. I don't think we should necessarily follow Lean's mathlib monolithic style. We can maybe have 5 repos in the Agda community's GitHub, each for a different branch of CS/maths. Regards, Jorge Bl?zquez Saborido P.S.: here is the link to my repo formalizing theory of computation: El vie, 21 de ago de 2020 a las 17:47, James Wood escribi?: > Hi all, > > Nicolai makes good observations here. I would, though, argue that some > of the differences in focus *can* be explained by the differences > between the two systems. In particular, I both personally believe and > think it's common wisdom that Agda is the best tool for type-directed > programming, of the kind that naturally extends to > correct-by-construction programming. This is mostly due to interactive > editing of pattern-matching definitions. As far as I know, Idris is > the > only comparable system in this regard (and I would mostly be happy to > write my dependently typed programs in it, too). > > It happens that type-directed programming is basically what we want > for > the metatheory of programming languages and logics. Usually we have > two > big types ? object-level types and terms ? and furthermore the > terms > have very careful types to enforce scoping and typing. With inductive > types with many constructors, having the constructor names appear in > the > source code is useful for maintenance, and interactive editing puts > them > there, rather than having to write them all out. And we really are > doing > programming a lot of the time ? for example, defining renaming, > substitution, and semantics. > > Most other areas of maths traditionally don't resemble this > type-directed style of programming. There are few, small, inductive > types, and a lot of reasoning is done at the level of algebraic axioms > (with no inductive types in sight). These features largely nullify > Agda's advantages, and instead the advantages of Lean and Coq in the > field of proving shine through. > > In summary, I think it makes more sense to view the existence of both > Agda and Lean as complementary (not to mention other systems too, with > different strengths). In particular, the two are naturally going to > attract different kinds of people. Perhaps the best we can do in terms > of marketing is to promote Agda as a view of the future of programming > (and the present of PL/logic), similar to Lean being promoted as a > view > of the future of mathematics. > > Maybe we can also learn, again complementarily, from Lean about how to > get things built. As I understand it, one of the main aims of Kevin > Buzzard's Xena Project is to mechanise an entire mathematics > undergraduate curriculum, and this seems to excite enough > undergraduates > to make it a feasible goal. Can we do anything similar with a computer > science undergraduate programme? Could we get interested undergrads to > mechanise, say, the data structures & algorithms, logic & proof, and > PL > & types courses? Would they want (analytic) cryptography theory to be > within reach? And are there areas of a maths undergrad it's worth > focusing on? > > Regards, > James > > On 20/08/2020 19:21, Nicolai Kraus wrote: >> Thanks for the interesting observations! >> >> My impression is that Agda is used a lot for computer science / >> programming language research, while Lean is >> used for formalising mathematics (obviously with many many >> excpetions). >> These are different although certainly overlapping communities. As a >> result, Lean has huge libraries of formalised (in Kevin Buzzard's >> words) >> generic mathematics, and Agda has many developments which study the >> meta-theory of type systems, and so on. In principle, both >> communities >> could use the same system, I guess it has happened for "soft" >> reasons >> (social reasons, "marketing", random chance etc) that they don't. I >> don't know whether Lean is fundamentally better than Agda for >> formalising maths, or whether Agda is fundamentally better than >> Lean for >> PL research. Probably not, but I also don't think there is any >> problem. >> >> The above is just what I have observed, I don't want to suggest >> anything >> since I think it's very good already :-) >> (I agree with the single communication system though, that would >> probably simplify things.) >> >> Nicolai >> >> >> >> On 20/08/2020 17:38, Carette, Jacques wrote: >>> >>> No, I?m not leaving Agda. I have invested too much time already, >>> and I >>> really do like it very much. I am/was incredibly curious as to what >>> seems to make Lean more of a ?rising star?. >>> >>> >>> >>> My personal conclusions: >>> - it?s not really the system per se, although Lean being >>> ?classical? >>> helps attract a different crowd, >>> - it?s the **ecosystem**, and in particular, >>> - the large, extremely active and welcoming crowd of **math-lib** >>> developers that make Lean so attractive. >>> >>> >>> >>> The visible face of Lean is not Leonardo, but a large number of the >>> library developers. They?ve taken to github and Zulip with a >>> vengeance. There can be 200-300 messages/day (!) on the Lean Zulip. >>> [That?s kind of exhausting? but I guess that?s the price of >>> success.] >>> Where there are 18 open PRs on agda-stdlib (with the latest as >>> #1279), >>> there are currently 77 on mathlib (latest #3879). >>> >>> >>> >>> The good news for the Agda devs is that the ?system devs? of >>> Lean are >>> basically not visible here. They exist, are very busy doing cool >>> stuff, but the community is not run by them at all. Frees the >>> system >>> devs to focus on their core strengths. >>> >>> >>> >>> My take homes, if the plan is to continuing growing the ?Agda >>> ecosystem?: >>> - the community ought to pick a single communication system (Slack, >>> Discord, Zulip, gitter, whatever, but just one!) >>> - the merge-into-stdlib process needs more bandwidth (Matthew?s >>> done >>> an amazing job, I?m mostly suggesting that he make proposals as >>> to how >>> to scale up) >>> - actively push people who have useful private libraries to submit >>> them (perhaps in pieces) to stdlib >>> >>> >>> >>> For example, there is quite a lot of PL meta-theory ?out >>> there?, in >>> Agda. It could make a lot of sense to augment stdlib with the >>> standard >>> material for that. Lean?s math-lib is driven by formalizing >>> ?regular >>> math? (their terminology, not mine). To me, it would make sense >>> if >>> Agda?s stdlib was driven by ?the math+CS that its users >>> regularly >>> use?. [Thus PL meta-theory as an obvious example.] >>> >>> >>> >>> Jacques >>> >>> >>> >>> PS: there is not an iota of complaint in the above. It is 100% >>> meant >>> as conveying my observations, and personal conclusions on how to >>> build >>> momentum. >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aldrovandi at math.fsu.edu Fri Aug 21 19:48:31 2020 From: aldrovandi at math.fsu.edu (Ettore Aldrovandi) Date: Fri, 21 Aug 2020 13:48:31 -0400 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: Message-ID: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> Hi James, mathematician lurker here. This is interesting: > On Aug 21, 2020, at 12:47, James Wood wrote: > > Most other areas of maths traditionally don't resemble this > type-directed style of programming. There are few, small, inductive > types, and a lot of reasoning is done at the level of algebraic axioms > (with no inductive types in sight). These features largely nullify > Agda's advantages, and instead the advantages of Lean and Coq in the > field of proving shine through. Can you elaborate a bit? Thanks, ?Ettore Ettore Aldrovandi Department of Mathematics, Florida State University 1017 Academic Way * http://www.math.fsu.edu/~ealdrov Tallahassee, FL 32306-4510, USA * * aldrovandi at math dot fsu dot edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.escardo at cs.bham.ac.uk Fri Aug 21 22:21:06 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Fri, 21 Aug 2020 21:21:06 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> Message-ID: You don't think the model in which types are spaces and functions are continuous convincing enough? Excluded middle is not continuous. Martin On 21/08/2020 14:30, mechvel at scico.botik.ru wrote: > On 2020-08-21 08:38, Martin Escardo wrote: >> [..] >> Excluded middle is like parallel postulate in Euclidean geometry: if you >> assert it, you get one kind of geometry, and if you negate it you get >> another kind. It is meaningless to ask whether the parallel postulate is >> true. What you can ask is whether it is true in the particular geometry >> you are interested in. The same goes for EM and other classical >> creatures. >> > > The matter is that so far nobody explained me that this is similar. > > Because the possibility of removing the fifth postulate in geometry is > accompanied > with various models for the remaining abstract theory. > For example, the Lobachevsky's plane is a hyperboloid H, in which > "straight lines" > are put to be sections of H with Euclid's planes. And we see that all > the postulates > are preserved except the fifth one. Because for any hyperbola G on H > there and a point > P out of G there are visible many hyperbolas that contain P and does not > intersect > with G - a certain cone of lines "parallel" to G. > > I do not see such a convincive model for constructivism. > Suppose that excluded middle proof is removed (in a certain sense). > Consider the above search procedure F for n : Nat such that P(n) > in the example with searching a singular number. > In the classical philosophy: > "(1) either F terminates, and then A gives the proof of G, > ?or > ?(2) F does not terminate, and then B gives a proof for G. > " > This is equivalent to > "(1) exists (classically) n such P(n) ...? Or (2) does not exist n such > P(n) ...". > > And constructivism pretends that this is not a proof for G. > So, it says that it is not enough to consider these two possibilities > ("terminates" or "never terminates"). > As it is not enough, then how can it look any other possibility? > > Lobachevsky's plane demonstrates at least one variant of "how can it look". > And I do not see such a demonstration in constructivism - for this > particular > example. > > -- > ?? > > > -- Martin Escardo http://www.cs.bham.ac.uk/~mhe From james.wood.100 at strath.ac.uk Fri Aug 21 23:29:03 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Fri, 21 Aug 2020 22:29:03 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> Message-ID: <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> Hi Ettore, Thanks for the question. This is maybe the part of what I wrote which I am least confident about, partially because ?most other areas of maths? comprises an awful lot, and very little of it have I yet studied in detail. Apologies, and please point out, if I present any misconceptions. To make it answerable, I'll focus on a couple of core undergrad topics ? analysis and algebra ? contrasted with programming language metatheory. These are also going to be caricatures ? in real life, things are not so discrete and extreme. Analysis: We're interested in real numbers, basic operations on them, sequences & their limits, and continuity of ? ? ? functions. Let's assume that we've postulated enough axioms to do classical analysis. Then, the reals are characterised as the unique totally ordered, Cauchy-complete, field satisfying the Archimedean property, and most arguments after establishing that never touch the particular implementation (Cauchy vs Dedekind vs whatever) we may use. As such, we never do induction on the reals (in the normal sense), so Agda's support for pattern-matching doesn't buy us much. We still take cases on ordering and do induction on natural numbers, but these features of a proof should be clear enough even in a Coq-style tactic script (there being at most 3 cases, with quite simple types). Something we really want is an algebraic solver for real numbers, to save us from the tedium of specifying algebraic manipulations in proofs. Such solvers appear to have been worked on more in Coq and Lean (though I'm not sure to what extent this is about the systems themselves). Algebra: We're interested in some class of algebraic structures, and, of such structures, examples, homomorphisms, and ways to construct new examples from old examples. The constructions on algebraic structures (e.g, direct sums, direct products, tensor products, ...) are usually characterised by universal properties, and it is usually much easier to appeal to those universal properties than to any construction (similarly to what happened with ?). When these constructions are given explicitly, they are usually done in a seemingly random way, which we later verify has the right properties (i.e, we are not being directed by any types). And of course within a given structure, the only way to make progress is to use the structure's axioms along with anything else you have lying around, which again is unlikely to be complex inductive data types. Programming languages: We define the syntax of a programming language and give it semantics ? either operational or denotational. As I discussed earlier, the syntax of a programming language is typically represented as a complex indexed inductive data type, with on the order of 5~15 constructors. We define some similarly complex operations on the syntax by recursion, and prove properties of them by induction (?induction on the syntax of the term? is a common phrase in papers). An operational semantics will typically have even more constructors, while a denotational semantics will consist of a dependently typed function respecting the typing of a term. A programming language often will be characterised by a universal property (as the free such-and-such closed category with this-and-that extra bits when quotiented by the equational theory), but proving this theorem is typically the last result. The predominant style of doing PL metatheory in Agda has it that if you manage to define operations of the correct type, then they are almost certainly the ones you intended (this is type-directed programming in action). It may well be that there are some areas of regular mathematics that are particularly well suited to the tools Agda provides. There may be yet others which could be presented more clearly given those tools (as we have seen with data structures from computer science defined to enforce their invariants). And sometimes you're forced into a particular proof assistant for other reasons ? be they theoretical, social, or pedagogical. Regards, James On 21/08/2020 18:48, Ettore Aldrovandi wrote: > Hi James,? > > mathematician lurker here. ?This is interesting: > >> On Aug 21, 2020, at 12:47, James Wood > > wrote: >> >> Most other areas of maths traditionally don't resemble this >> type-directed style of programming. There are few, small, inductive >> types, and a lot of reasoning is done at the level of algebraic axioms >> (with no inductive types in sight). These features largely nullify >> Agda's advantages, and instead the advantages of Lean and Coq in the >> field of proving shine through. > > Can you elaborate a bit? > > Thanks, > > ?Ettore > Ettore Aldrovandi > Department of Mathematics, Florida State University > 1017 Academic Way ? ? ? ? ? ? ? ?* ? http://www.math.fsu.edu/~ealdrov > > Tallahassee, FL 32306-4510, USA * * aldrovandi at math dot fsu dot edu > From mechvel at scico.botik.ru Sat Aug 22 01:11:35 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 22 Aug 2020 02:11:35 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> Message-ID: <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> On 2020-08-21 23:21, Martin Escardo wrote: > You don't think the model in which types are spaces and functions are > continuous convincing enough? Excluded middle is not continuous. Too abstruse, unnatural. To perceive this I need to study attentively in what precisely way types correspond to (topological? metric?) spaces, and so on. An artificial thing. It has sense to consider this only if simpler explanations are not found. I mean a philosophical question about nature, to which it is applied our basic intuition. This is not a question about topological spaces and continuous maps. Much simpler: it is about a certain concrete trivial discrete machine. With Lobachevsky's model for breaking the fifth postulate in geometry, it is clear, the effect is visible. So that none would tell "my intuition does not agree". Now, with excluded middle and a discrete machine F: it is given a simple machine F the checks (P? n) and searches through Nat, as it has been specified earlier. "(1) If F stops, then we derive the goal G from this fact. (2) If F never stops, then we derive the goal G from this fact in another way. Hence G is proved - despite that it is not given a proof neither for the condition in (1) nor for the condition in (2). " Constructivism says: this is not a proof. Does it say this? Constructivism says: because there are considered only the cases "F stops" and "F never stops". And as any third case is not evidently excluded, not all possibilities have been considered. Does constructivism say this? If it does, then let it describe an example: how can it look any such possibility which differs from (1) and from (2) ? Lobachevsky's model demonstrates the possibility of breaking the fifth postulate by showing a bunch of different curves which are put "straight lines", which contain the same point and which are parallel to the same "straight line" ("parallel" means "does not intersect with"). This picture agrees with our intuition. Similarly, how may it look the third possibility for F, so that this description will agree with our intuition? -- SM From m.escardo at cs.bham.ac.uk Sat Aug 22 02:57:18 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Sat, 22 Aug 2020 01:57:18 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> Message-ID: <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> Your answer below seems provocative enough for me to want to answer. :-) So here we go. On 22/08/2020 00:11, mechvel at scico.botik.ru wrote: > On 2020-08-21 23:21, Martin Escardo wrote: >> You don't think the model in which types are spaces and functions are >> continuous convincing enough? Excluded middle is not continuous. > > > Too abstruse, unnatural. It is actually quite natural: continuity says that "a finite amount of information about the value of a function depends only on a finite amount of information about the argument of the function". A finite amount of output depends only on a finite amount of input. Finitely many digits of the output of a function f : ? ? ? depend only on finitely many digits of its input. This is precisely what the ?-? formulation of continuity says. There is also an interpretation of this phenomenon in terms of open sets, which are seen as "observable properties" of points of the space. Continuity captures a fundamental aspect of computation without mentioning Turing machines. Continuity is a finiteness condition, at least for most spaces that arise naturally in analysis. And in computation, too, such as the Cantor space. > To perceive this I need to study attentively in what precisely way > types correspond to (topological? metric?) spaces, and so on. An > artificial thing. Would I convince you if I used topological intuition and machinery to prove a theorem in computation that would seem outrageous to both Computer Scientists and Constructive Mathematicians? We can write the following unlikely functional program in Agda (and in Martin-Loef Type Theory of any variety): (1) Consider the type of decreasing infinite sequences of digits 0 and 1. Call this type ??, because - The sequence of n-many ones followed by infinitely many zeros encodes the natural number n. - The sequence of infinitely many ones encodes ?, So we have an embedding ? ? ?? and a new point ? in ??. (2) There is an Agda program that decides, for a given p : ?? ? Bool, whether or not there is x : ?? with p x ? True. Clearly such a program *does not* exist if we replace ?? by ?. This non-existence is a theorem of computability theory. But it does exist with ??. The intuition (if you develop it) is that the type ?? constructed in (1) is the one-point compactification of the discrete space of natural numbers, and that compactness is the topologist's notion of finiteness. So although there are infinitely many cases to check to perform the decision (2), there are only "compactly many" cases to check, and this is possible. Still surprising, perhaps, but less so when we consider the world in which ?? is compact and all functions are continuous. We don't need to add any continuity axioms to Agda, but, when we conceive such a program, we do need to think of types as spaces. Without topological intuition and techniques, people are unlikely to come up with the idea of proving (2), that is, writing an Agda program that checks infinitely many cases and answers "yes" or "no" without using excluded middle: after all we seem to have learned from computability theory that we can't perform such decisions on infinite spaces. Actually we haven't. The above is a counter-example. > It has sense to consider this only if simpler explanations are not found. Oh, with this I agree fully. There are suitations, indeed, such as the above, where simple explanations are not available. > I mean a philosophical question about nature, to which it is applied our > basic intuition. Regarding mathematics, I only believe in mathematically justified philosophy. Philosophy would presumably tell you that you can't perform algorithmic decisions that depend on checking infinitely many cases. But there you have a counter-example above. Built from topological intuition and techniques. Best, Martin From pierre.lescanne at ens-lyon.fr Sat Aug 22 09:07:28 2020 From: pierre.lescanne at ens-lyon.fr (Pierre Lescanne) Date: Sat, 22 Aug 2020 09:07:28 +0200 Subject: [Agda] \ell does not display In-Reply-To: <144b74ec-8fcd-89ea-99df-9e38c7c8895c@cse.gu.se> References: <9c2abfc1-9caa-addb-292e-51d8449c9cbc@cse.gu.se> <208c4745-f1d0-cb50-36b1-eb4784dff0ac@ens-lyon.fr> <144b74ec-8fcd-89ea-99df-9e38c7c8895c@cse.gu.se> Message-ID: <854ed5dd-debe-c23c-4808-8bd59a65173d@ens-lyon.fr> Indeed, this affects only the default font.?? But I did not find a good substitute for the default font. Le 21/08/2020 ? 13:42, Nils Anders Danielsson a ?crit?: > On 2020-08-20 18:18, Pierre Lescanne (en) wrote: >> Actually ? displays in all the buffers as a space. > > Have you tried switching to a different font? > -- Cordialement, --------------------------- Pierre Lescanne --------------------------- From mechvel at scico.botik.ru Sat Aug 22 15:20:08 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 22 Aug 2020 16:20:08 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> Message-ID: On 2020-08-22 03:57, Martin Escardo wrote: > [..] > On 22/08/2020 00:11, mechvel at scico.botik.ru wrote: >> On 2020-08-21 23:21, Martin Escardo wrote: >>> You don't think the model in which types are spaces and functions are >>> continuous convincing enough? Excluded middle is not continuous. >> >> Too abstruse, unnatural. > > It is actually quite natural: continuity says that "a finite amount of > information about the value of a function depends only on a finite > amount of information about the argument of the function". > [..] Martin, thank you for your attention. I am going to look more closely into your explanation and to try to understand the topological model for logic. May be your topological explanation can be translated into some simple explanation. But first we need to try to discover a simple explanation, desirably something close to experience, may be, to physics. To tell the truth, I suspect currently that there is not any fundamental reason to restrict the excluded third law. As to the possibility to restrict it and to develop the consequences - all right, it may be an interesting area, just for curiosity. I consider this possibility as important, usually some useful knowledge comes out from such investigations "for curiosity". Well, we can try to remove modus ponens, and see ... >> It has sense to consider this only if simpler explanations are not >> found. > Oh, with this I agree fully. There are suitations, indeed, such as the > above, where simple explanations are not available. a) For modus ponens - do we have intuition to assume it? even without topology? Why modus ponens is more reliable than excluded third? b) I believe that important models always have simple description and explanation. For example, Lobachevsky's plane is a simple model showing a certain important independence in geometry. I recall also the model showing that forall n (1 + n = n + 1) is not true in variety for a certain simplest definition for _+_ on naturals (I have seen such in a certain Huet's paper). It is also simple. Meanwhile, let us address our basic intuition. A naive person thinks "I shall buy a yacht. Let us call this goal G. I reach the goal through buying a lottery ticket. (1) If it wins enough, then I buy this yacht. (2) If it does not win enough, then I sell my second home, and this gives enough to buy the yacht. In any case the goal G will be reached. " Constructivist> "No, this is not for sure. This is not in any case. Because you cannot provably predict whether (1) will hold or (2). Also you do not and cannot demonstrate why (1) must hold, as you do not and cannot describe the whole process of the lottery game and cannot derive (1) from this. For the same reason neither you can demonstrate why (2) must hold. It follows that not all cases are considered. " Naive Person> "The ticket either wins enough or does not. The set {(1), (2)} of possible outcomes does not depend on what happens during the lottery game, neither it depends on whether anyone has proofs related to this process. So, what case besides (1) and (2) may happen? " Constructivist> "I shall explain now. I cannot describe in simple words what third case may happen. Even no hint at all. But consider types and type constructions, and a certain correspondence between types and topological spaces. A topological space is a set V and a set of certain subsets in V, called open sets ... A continuous map is ... " ?? Next day, Constructivist has to arrive to the airport before 16.00. He says "Let me go to the bus stop. (1) If the bus comes to the stop before 15.00, then I take a bus. This way it is cheaper. (2) Otherwise, I call for taxi. So that in any case I get to the airport in time. " His wife says: "There is a danger! You cannot provably predict whether (1) holds or (2). Please, recall the correspondence between types and topological spaces ... " ? Regards, -- SM From nicolai.kraus at gmail.com Sat Aug 22 16:36:37 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Sat, 22 Aug 2020 15:36:37 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> Message-ID: Hi Sergei, interesting examples. But I'm not sure they demonstrate what you want to show, at least I'm not so convinced. Our real world behaviour is actually pretty constructive, not classical. For example: On Sat, Aug 22, 2020 at 2:20 PM wrote: > A naive person thinks > "I shall buy a yacht. Let us call this goal G. > I reach the goal through buying a lottery ticket. > (1) If it wins enough, then I buy this yacht. > (2) If it does not win enough, then I sell my second home, and this > gives enough > to buy the yacht. > In any case the goal G will be reached. > " > > Constructivist> > "No, this is not for sure. This is not in any case. > The "naive person" has given an algorithm, how can this not be constructive? There is no usage of the axiom of excluded middle. As a constructivist, I'm perfectly happy with this. Nitpicking: You also need to know that the result of the lottery will be announced, say, in no more than 72 hours (or no later than 2022). But again, reality and constructive intuition match. The naive person also would have to assume this for their plan, without knowledge of logic or anything. Same here: On Sat, Aug 22, 2020 at 2:20 PM wrote: > Next day, Constructivist has to arrive to the airport before 16.00. > He says > "Let me go to the bus stop. > (1) If the bus comes to the stop before 15.00, then I take a bus. > This way it is cheaper. > (2) Otherwise, I call for taxi. > So that in any case I get to the airport in time. > " > His wife says: > "There is a danger! > Again, a perfectly fine algorithm. No need for excluded middle at all. I'm tempted to also come up with such an example. Naive person 1 (who believes in excluded middle): I need to make some money. Tesla shares seem to be quite profitable lately, but I need to make money by tomorrow. If Tesla goes up tomorrow, I buy today and sell the day after tomorrow. If Tesla goes down tomorrow, I short sell today and bu back the day after tomorrow. It either goes down or goes up tomorrow, and in each case, I will have made a profit by the day after tomorrow. Naive person 2 (who doesn't know anything about constructivism or classical mathematics): What? Do mathematicians really believe that this will work? -- Nicolai On Sat, Aug 22, 2020 at 2:20 PM wrote: > On 2020-08-22 03:57, Martin Escardo wrote: > > [..] > > On 22/08/2020 00:11, mechvel at scico.botik.ru wrote: > >> On 2020-08-21 23:21, Martin Escardo wrote: > >>> You don't think the model in which types are spaces and functions are > >>> continuous convincing enough? Excluded middle is not continuous. > >> > >> Too abstruse, unnatural. > > > > It is actually quite natural: continuity says that "a finite amount of > > information about the value of a function depends only on a finite > > amount of information about the argument of the function". > > [..] > > Martin, thank you for your attention. > I am going to look more closely into your explanation and > to try to understand the topological model for logic. > May be your topological explanation can be translated into some simple > explanation. > > But first we need to try to discover a simple explanation, desirably > something > close to experience, may be, to physics. > > To tell the truth, I suspect currently that there is not any fundamental > reason to > restrict the excluded third law. As to the possibility to restrict it > and to develop the consequences - all right, it may be an interesting > area, just for curiosity. I consider > this possibility as important, usually some useful knowledge comes out > from such > investigations "for curiosity". > Well, we can try to remove modus ponens, and see ... > > > > >> It has sense to consider this only if simpler explanations are not > >> found. > > > Oh, with this I agree fully. There are suitations, indeed, such as the > > above, where simple explanations are not available. > > > a) For modus ponens - do we have intuition to assume it? even without > topology? > Why modus ponens is more reliable than excluded third? > > b) I believe that important models always have simple description and > explanation. > > For example, Lobachevsky's plane is a simple model showing a certain > important > independence in geometry. > I recall also the model showing that forall n (1 + n = n + 1) is not > true in variety for a certain simplest definition for _+_ on naturals > (I have seen such in a certain Huet's paper). It is also simple. > > Meanwhile, let us address our basic intuition. > > A naive person thinks > "I shall buy a yacht. Let us call this goal G. > I reach the goal through buying a lottery ticket. > (1) If it wins enough, then I buy this yacht. > (2) If it does not win enough, then I sell my second home, and this > gives enough > to buy the yacht. > In any case the goal G will be reached. > " > > Constructivist> > "No, this is not for sure. This is not in any case. > Because you cannot provably predict whether (1) will hold or (2). > Also you do not and cannot demonstrate why (1) must hold, as you do not > and cannot describe the whole process of the lottery game and cannot > derive (1) from this. For the same reason neither you can demonstrate > why (2) must hold. It follows that not all cases are considered. > " > > Naive Person> > "The ticket either wins enough or does not. The set {(1), (2)} of > possible outcomes does not depend on what happens during the lottery > game, > neither it depends on whether anyone has proofs related to this > process. > So, what case besides (1) and (2) may happen? > " > > Constructivist> > "I shall explain now. > I cannot describe in simple words what third case may happen. > Even no hint at all. > But consider types and type constructions, and a certain correspondence > between types and topological spaces. A topological space is a set V > and > a set of certain subsets in V, called open sets ... A continuous map is > ... > " > ?? > > Next day, Constructivist has to arrive to the airport before 16.00. > He says > "Let me go to the bus stop. > (1) If the bus comes to the stop before 15.00, then I take a bus. > This way it is cheaper. > (2) Otherwise, I call for taxi. > So that in any case I get to the airport in time. > " > His wife says: > "There is a danger! You cannot provably predict whether (1) holds or > (2). > Please, recall the correspondence between types and topological spaces > ... > " > ? > > Regards, > > -- > SM > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.brunerie at gmail.com Sat Aug 22 17:21:34 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Sat, 22 Aug 2020 17:21:34 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> Message-ID: Hi all, Let me participate in this debate and share my opinion as well, which is maybe more philosophical than practical. I personally see constructivism as being very much based on reality and physics, much more than classical mathematics which lives in a completely imaginary world that requires a huge leap of faith to believe the existence of. Let me explain. For all we know, our observable universe is finite, be it on a large scale (we only see a finite volume of the universe) or on a small scale (Planck constants and such). I?m sure this is an outrageous oversimplification of physics, but in any case I believe that there is no way we can, or ever will, observe or experience something truly infinite. Yet, classical mathematics takes for granted that infinite sets exist. The set of natural numbers, which is considered quite small in mathematics, is actually *infinitely* larger than the entirety of our universe, no matter how you measure it! Understand that "infinite" is really much much bigger than "finite", even for a very large version of "finite" (maybe that?s where other people may have a different opinion and decide to approximate "very large" by "infinite"). So my point here is that I see the belief in the existence of infinite sets as an act of faith, absolutely not based on reality, and absolutely non-trivial. Not that there is anything wrong with that, you are free to believe whatever you want, but I still find it a bit strange to unconditionally accept the existence of infinite sets given that our entire experience of life is finite. Now let?s look at Sergei?s example about distinguishing whether a program terminates or not. This essentially asks about the existence of a natural number (the number of steps the algorithm would take to terminate) satisfying some property P, and assumes that - if such a natural number exists, we can prove G - if none exists, we can prove G But how do we know that such a natural number either exists or doesn?t? It seems to me that the only way to justify this instance of the excluded middle is to believe in the existence of the set of all natural numbers which, as explained above, is a highly non-trivial assumption (at least for me). Here is another way to see it (maybe the "other possibility" that Sergei is looking for). Suppose that the algorithm does terminate, but that it would take a very very long time, much longer than the lifetime of the universe, even on a computer that is as fast as is theoretically possible (taking into account physical limitations). Is it really justified to say that the algorithm terminates, then? How is that based on reality, if it is absolutely impossible that it would terminate in reality? Constructive type theory solves the question of infinity in a different way. The type of natural numbers is very different from the set of natural numbers in that it is not an infinite object at all, it is simply a (finite!) description of how it is possible to construct new natural numbers, and what you can do with them. But unlike the set of natural numbers, the type of natural numbers does *not* collect all such natural numbers before we even get started, so it does not require us to believe in the existence of infinite objects. Therefore, as there is no totality of all natural numbers anymore, there is no reason to believe that either there exists a natural number satisfying P or not. And if you do want to show the existence of some natural number, then you have to construct it (or at least explain how you would go about constructing it) because that number does not exist a priori (otherwise that would again imply the existence of an infinite object), which is why constructive mathematics is constructive. Similarly, deducing that a natural number exists from the fact that it cannot not exist (double negation elimination) requires you to believe that all natural numbers already exist to begin with, which is again assuming the existence of infinite objects. Anyway, I?m not sure if my explanation convinced anyone of anything, but it is at least very convincing to me :) Best, Guillaume Den l?r 22 aug. 2020 kl 15:20 skrev : > > On 2020-08-22 03:57, Martin Escardo wrote: > > [..] > > On 22/08/2020 00:11, mechvel at scico.botik.ru wrote: > >> On 2020-08-21 23:21, Martin Escardo wrote: > >>> You don't think the model in which types are spaces and functions are > >>> continuous convincing enough? Excluded middle is not continuous. > >> > >> Too abstruse, unnatural. > > > > It is actually quite natural: continuity says that "a finite amount of > > information about the value of a function depends only on a finite > > amount of information about the argument of the function". > > [..] > > Martin, thank you for your attention. > I am going to look more closely into your explanation and > to try to understand the topological model for logic. > May be your topological explanation can be translated into some simple > explanation. > > But first we need to try to discover a simple explanation, desirably > something > close to experience, may be, to physics. > > To tell the truth, I suspect currently that there is not any fundamental > reason to > restrict the excluded third law. As to the possibility to restrict it > and to develop the consequences - all right, it may be an interesting > area, just for curiosity. I consider > this possibility as important, usually some useful knowledge comes out > from such > investigations "for curiosity". > Well, we can try to remove modus ponens, and see ... > > > > >> It has sense to consider this only if simpler explanations are not > >> found. > > > Oh, with this I agree fully. There are suitations, indeed, such as the > > above, where simple explanations are not available. > > > a) For modus ponens - do we have intuition to assume it? even without > topology? > Why modus ponens is more reliable than excluded third? > > b) I believe that important models always have simple description and > explanation. > > For example, Lobachevsky's plane is a simple model showing a certain > important > independence in geometry. > I recall also the model showing that forall n (1 + n = n + 1) is not > true in variety for a certain simplest definition for _+_ on naturals > (I have seen such in a certain Huet's paper). It is also simple. > > Meanwhile, let us address our basic intuition. > > A naive person thinks > "I shall buy a yacht. Let us call this goal G. > I reach the goal through buying a lottery ticket. > (1) If it wins enough, then I buy this yacht. > (2) If it does not win enough, then I sell my second home, and this > gives enough > to buy the yacht. > In any case the goal G will be reached. > " > > Constructivist> > "No, this is not for sure. This is not in any case. > Because you cannot provably predict whether (1) will hold or (2). > Also you do not and cannot demonstrate why (1) must hold, as you do not > and cannot describe the whole process of the lottery game and cannot > derive (1) from this. For the same reason neither you can demonstrate > why (2) must hold. It follows that not all cases are considered. > " > > Naive Person> > "The ticket either wins enough or does not. The set {(1), (2)} of > possible outcomes does not depend on what happens during the lottery > game, > neither it depends on whether anyone has proofs related to this > process. > So, what case besides (1) and (2) may happen? > " > > Constructivist> > "I shall explain now. > I cannot describe in simple words what third case may happen. > Even no hint at all. > But consider types and type constructions, and a certain correspondence > between types and topological spaces. A topological space is a set V > and > a set of certain subsets in V, called open sets ... A continuous map is > ... > " > ?? > > Next day, Constructivist has to arrive to the airport before 16.00. > He says > "Let me go to the bus stop. > (1) If the bus comes to the stop before 15.00, then I take a bus. > This way it is cheaper. > (2) Otherwise, I call for taxi. > So that in any case I get to the airport in time. > " > His wife says: > "There is a danger! You cannot provably predict whether (1) holds or > (2). > Please, recall the correspondence between types and topological spaces > ... > " > ? > > Regards, > > -- > SM > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Sat Aug 22 20:39:44 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 22 Aug 2020 21:39:44 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> Message-ID: <0b00b890f95a566bf9c190cc1f295f78@scico.botik.ru> On 2020-08-22 17:36, Nicolai Kraus wrote: > [..] > interesting examples. But I'm not sure they demonstrate what you want > to show, at least I'm not so convinced. Our real world behaviour is > actually pretty constructive, not classical. > For example: > > On Sat, Aug 22, 2020 at 2:20 PM wrote: > >> A naive person thinks >> "I shall buy a yacht. Let us call this goal G. >> I reach the goal through buying a lottery ticket. >> (1) If it wins enough, then I buy this yacht. >> (2) If it does not win enough, then I sell my second home, and >> this >> gives enough >> to buy the yacht. >> In any case the goal G will be reached. >> " >> >> Constructivist> >> "No, this is not for sure. This is not in any case. > > The "naive person" has given an algorithm, how can this not be > constructive? > There is no usage of the axiom of excluded middle. As a > constructivist, I'm perfectly happy with this. > Nitpicking: You also need to know that the result of the lottery will > be announced, say, in no more than 72 hours (or no later than 2022). > But again, reality and constructive intuition match. The naive person > also would have to assume this for their plan, without knowledge of > logic or anything. I think, the given naive _proof for the goal G_ for this algorithm is not constructive, it relies on the unsafe usage of excluded middle. Namely, a part of the process of the lottery game is hidden from Naive Person and even from the organizers. For example, one cannot observe all the details of the process of balls rolling inside the reel. To decide/predict on the win is even less possible than to decide on (Exsts? n such that P n) where P is the problematic predicate on Nat of which I wrote earlier. The rule of 72 hours does not help, because the game process in the reel is not predictable and runs through practically infinite set of stages. This is similar as to run through all Nat in 72 hours and to decide P about each n. This was what I meant. I assumed these details, but probably needed to spell them more explicitly. I say "unsafe usage" because there also is a safe usage of EM - when the predicate P is solvable. So, do I confuse something about logic? a) Do people agree that the given earlier naive discourse about the machine F for (Exsts? n such that P n) bases on the unsafe usage of excluded middle? b) Do people agree that the above naive discourse about lottery bases on the unsafe version of excluded middle? The lottery example is a live version of this earlier example with natural numbers. I tried to demonstrate that people who pay attention to restrict EM in mathematics always rely on this "unsafe" proof tool in their life. > Same here: > > On Sat, Aug 22, 2020 at 2:20 PM wrote: > >> Next day, Constructivist has to arrive to the airport before 16.00. >> He says >> "Let me go to the bus stop. >> (1) If the bus comes to the stop before 15.00, then I take a bus. >> This way it is cheaper. >> (2) Otherwise, I call for taxi. >> So that in any case I get to the airport in time. >> " >> His wife says: >> "There is a danger! > > Again, a perfectly fine algorithm. No need for excluded middle at all. > Again, I mean that the goal proof uses EM in unsafe version. Because one cannot provably predict what case will happen: (1) or (2). The result of (1) or (2) is formed as a result of practically infinite number of composed events happening before 15.00. One only naively assumes that {(1), (2)} is a full set of possible outcomes of this process. So, is it similar to my example with (Exists? n such that P n) ? Thanks, ------ Sergei From mechvel at scico.botik.ru Sat Aug 22 20:49:20 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 22 Aug 2020 21:49:20 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <0b00b890f95a566bf9c190cc1f295f78@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <0b00b890f95a566bf9c190cc1f295f78@scico.botik.ru> Message-ID: On 2020-08-22 21:39, mechvel at scico.botik.ru wrote: > [..] > I say "unsafe usage" because there also is a safe usage of EM - when > the predicate P is solvable. Corrrection: I meant "the related predicate". Wile in the example with Nat, this predicate is (exists n such that P n), and it is not solved. -- SM From m.escardo at cs.bham.ac.uk Sat Aug 22 23:09:39 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Sat, 22 Aug 2020 22:09:39 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> Message-ID: <9dac336b-8b72-9cff-e938-7b3c727f6fa3@cs.bham.ac.uk> On 22/08/2020 14:20, mechvel at scico.botik.ru wrote: > On 2020-08-22 03:57, Martin Escardo wrote: >> [..] >> On 22/08/2020 00:11, mechvel at scico.botik.ru wrote: >>> On 2020-08-21 23:21, Martin Escardo wrote: >>>> You don't think the model in which types are spaces and functions are >>>> continuous convincing enough? Excluded middle is not continuous. >>> >>> Too abstruse, unnatural. >> >> It is actually quite natural: continuity says that "a finite amount of >> information about the value of a function depends only on a finite >> amount of information about the argument of the function". >> [..] > > Martin, thank you for your attention. > I am going to look more closely into your explanation and > to try to understand the topological model for logic. > May be your topological explanation can be translated into some simple > explanation. > > But first we need to try to discover a simple explanation, desirably > something > close to experience, may be, to physics. > > To tell the truth, I suspect currently that there is not any fundamental > reason to > restrict the excluded third law. I agree with you. As I tried to say, it depends on what you want to do and what you are talking about. Suppose it is your birthday today and I trying to figure out a present for you. You either like the Beatles or you don't particularly like them. If you do, I can give you this vintage album I have that is considered to be so valuable. If you don't, I'll explain constructive mathematics to you instead. But I don't know whether youuu like the Beatles, and so I can't use the principle of excluded middle to decide which present I will give you. Approximately: - Classical mathematics is the logic or truth. - Constructive mathematics is the logic of knowledge. It may be true that "P or not P" holds. But this is very different from knowing which of "P" or "not P" hold. Consider e.g. P = Goldbach conjecture. But also consider e.g. P = "all types satisfy the uniqueness of identity principle (axiom K)". There is a perfectly valid world of mathematics in which P is true. (The default in Agda.) But there is also a perfectly valid world of mathematics in which P is undecided. (Just choose --without-K for your Agda programs.) And here is also a perfectly valid world of mathematics in which P is false. (Just choose --without-K and --cubical.) In this example, you decide "P" or "not P" by an Agda flag, rather than philosophy. Just as you decide whether the parallel postulate holds or not by choosing the geometry you want to study. And just as you may study one geometry today and another one tomorrow, you can program with "--with-K" today and with "--without-K and --cubical tomorrow". You can choose to live with "P" or to live with "not P". And this is not a life choice. You can do mathematics (in some Agda files) with "P", and also with "not P" (in other Agda files). This particular example is rather perverse, actually, because "not P" is more general than "P" !!! The world in which "not P" holds has a copy inside it in which "P" holds: the subworld of hsets. (I am just trying to confuse you.) Best, Martin From mechvel at scico.botik.ru Sat Aug 22 23:21:26 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 23 Aug 2020 00:21:26 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> Message-ID: <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> Guillaume, thank you for explaining things in simple words. On 2020-08-22 18:21, Guillaume Brunerie wrote: > [..] > Not that there is anything wrong with that, you are free to believe > whatever you want, but I still find it a bit strange to > unconditionally accept the existence of infinite sets given that our > entire experience of life is finite. Whether Nature, and our life, is finite or not, I doubt. But surely they are not provably finite. We cannot fully measure and describe the system of atoms and their possible states in most real objects, for example, a mouse or a bee. An bee, a flower, and a virus are very infinite objects for us. ? > Now let?s look at Sergei?s example about distinguishing whether a > program terminates or not. This essentially asks about the existence > of a natural number (the number of steps the algorithm would take to > terminate) satisfying some property P, and assumes that > - if such a natural number exists, we can prove G > - if none exists, we can prove G > But how do we know that such a natural number either exists or > doesn?t? It seems to me that the only way to justify this instance of > the excluded middle is to believe in the existence of the set of all > natural numbers which, as explained above, is a highly non-trivial > assumption (at least for me). Does this mean that using EM in this case assumes that someone is able to run the machine F through the infinite Nat set in a finite time? (actual infinity?). Probably a EM proof in this case presumes that the question of "will F terminate or not?" is already solved somewhere in the Nature. We do not know is it solved to "yes" or "no". But as it is solved somewhere, we decide that the machine F _has result_. and hence, it is in only in the set {yes, no}. Do you mean that you doubt in that question of "will F terminate or not?" is already solved somewhere? Well, if we doubt in that the F machine can run infinitely, then very naturally we doubt of that the above proof for the goal G is correct. Then the usage of EM is not safe in this case. If so, then the question of "What can be the third case" occurs senseless. Because even the statement of the second case, "F never stops" occurs senseless. ? On the other hand, compare this to the example with the lottery reel with balls inside. In one minute this system runs through practically infinite number of states, with unpredictable result. Nevertheless you can discourse like this "If it returns an even number, then I do variant (1), and reach the goal. If it returns an odd number, then I do variant (2), and reach the goal. So the goal will be reached in any case. ". Can you reason this way? Is this relying on unsafe excluded middle? > Here is another way to see it (maybe the "other possibility" that > Sergei is looking for). > Suppose that the algorithm does terminate, but that it would take a > very very long time, much longer than the lifetime of the universe, > even on a computer that is as fast as is theoretically possible > (taking into account physical limitations). > Is it really justified to say that the algorithm terminates, then? How > is that based on reality, if it is absolutely impossible that it would > terminate in reality? Well, I can write in Agda f = case isPrime? (2^(2^(2^1000)) + 7) of \ { (yes _) -> true ; (no _) -> false } where solving (IsPrime n) is by searching through all m < n and the division attempt for each m. Agda considers this as terminating, despite that computing f takes an unfeasible number of steps. Myself and Agda tend to consider this as terminating. What is your opinion: is its termination justified? Well, this doubt about actual infinity gives indeed more weight to the area of constructive mathematics. > Constructive type theory solves the question of infinity in a > different way. > [..] > it is possible to construct new natural numbers > [..] All right, it assumes a potential infinity. > Therefore, as there is no totality of all natural numbers anymore, > there is no reason to believe that either there exists a natural > number satisfying P or not. The only way out is to develop both theories. Evidently the theory with actual infinity is more fruitful. But it is interesting to investigate the possibilities and bounds of the theory with only a potential infinity. > Anyway, I?m not sure if my explanation convinced anyone of anything, > but it is at least very convincing to me :) Yes, this looks like something essential. Thank you. I thought earlier of something of this sort, but after years of programming in Agda have somehow forgotten the discourse. * I suspect that actual infinity exists in nature almost everywhere. Observable values in quantum mechanics are somewhat said to be of a finite set. But a wave mathematical description for particles is infinite, and it may occur that this wave exists in reality, not only as idea. * And even actual infinity does not exist in nature, it still exists as idea. An idea of infinite objects helps to solve problems about finite objects. The more it is helpful the more sure we are that it exists. I suspect that it exists even independently of human's mind (something like Plato is right). And in what space does it exist, and in what precisely way, I wonder. Regards, -- SM From capn.freako at gmail.com Sat Aug 22 23:48:28 2020 From: capn.freako at gmail.com (David Banas) Date: Sat, 22 Aug 2020 14:48:28 -0700 Subject: [Agda] Question, re: x-dual-U exercise in Negation chapter of PLFA. Message-ID: Hi all, In trying to answer the following question from the *Negation* chapter of PLFA: Do we also have the following? ? (A ? B) ? (? A) ? (? B) If so, prove; if not, can you give a relation weaker than isomorphism that relates the two sides? It seems to me that I ought to be able to define an *embedding*. That is, I should *not* have to settle for just an *equivalence*: ?-dual-? : ? {A B : Set} ------------------------- ? ? (A ? B) ? (? A) ? (? B) ?-dual-? = record { to = ? ?A?B ? inj? (? a ? ?A?B (a , _)) ; from = ? { (inj? ?A) ? ? (a , _) ? ?A a ; (inj? ?B) ? ? (_ , b) ? ?B b } ; from?to = ? ?A?B ? extensionality (? (a , _) ? refl -- ; to?from = ? { (inj? ?A) ? -- We could write this one. -- ; (inj? ?B) ? -- -- Can't write this, due to choice of `inj?` for `to`, above. -- } } However, when I try the code above, I get: Cannot instantiate the metavariable _140 to solution snd(.patternInTele0) since it contains the variable snd(.patternInTele0) which is not in scope of the metavariable when checking that the expression refl has type (? { (inj? ?A) ? ? .patternInTele0 ? ?A (Data.Product.proj? .patternInTele0) ; (inj? ?B) ? ? .patternInTele0 ? ?B (Data.Product.proj? .patternInTele0) }) (inj? (? a ? ?A?B (a , _snd_140 (?A?B = ?A?B) (a = a)))) .patternInTele0 ? ?A?B .patternInTele0 Any thoughts? Thanks, -db :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Aug 23 00:10:18 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sat, 22 Aug 2020 22:10:18 +0000 Subject: [Agda] Question, re: x-dual-U exercise in Negation chapter of PLFA. In-Reply-To: References: Message-ID: <4F939A07-3795-4FF8-89E8-4F2D7E03A5C2@exmail.nottingham.ac.uk> There is no information in the left hand side but there is one bit of information on the right. Where should it come from? Knowing that it cannot be that both A and B are false doesn?t tell you which is not false. Sent from my iPhone On 22 Aug 2020, at 22:48, David Banas wrote: ? Hi all, In trying to answer the following question from the Negation chapter of PLFA: Do we also have the following? ? (A ? B) ? (? A) ? (? B) If so, prove; if not, can you give a relation weaker than isomorphism that relates the two sides? It seems to me that I ought to be able to define an embedding. That is, I should not have to settle for just an equivalence: ?-dual-? : ? {A B : Set} ------------------------- ? ? (A ? B) ? (? A) ? (? B) ?-dual-? = record { to = ? ?A?B ? inj? (? a ? ?A?B (a , _)) ; from = ? { (inj? ?A) ? ? (a , _) ? ?A a ; (inj? ?B) ? ? (_ , b) ? ?B b } ; from?to = ? ?A?B ? extensionality (? (a , _) ? refl -- ; to?from = ? { (inj? ?A) ? -- We could write this one. -- ; (inj? ?B) ? -- -- Can't write this, due to choice of `inj?` for `to`, above. -- } } However, when I try the code above, I get: Cannot instantiate the metavariable _140 to solution snd(.patternInTele0) since it contains the variable snd(.patternInTele0) which is not in scope of the metavariable when checking that the expression refl has type (? { (inj? ?A) ? ? .patternInTele0 ? ?A (Data.Product.proj? .patternInTele0) ; (inj? ?B) ? ? .patternInTele0 ? ?B (Data.Product.proj? .patternInTele0) }) (inj? (? a ? ?A?B (a , _snd_140 (?A?B = ?A?B) (a = a)))) .patternInTele0 ? ?A?B .patternInTele0 Any thoughts? Thanks, -db :) _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Sun Aug 23 00:24:42 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sat, 22 Aug 2020 23:24:42 +0100 Subject: [Agda] Question, re: x-dual-U exercise in Negation chapter of PLFA. In-Reply-To: References: Message-ID: Hi David, I don't want to give the answer to the exercise away, but I will try to explain mechanically what's going on. You should notice, before writing `to?from`, that the underscore in the `to` field is highlighted yellow. This means that, by writing the underscore, you have asked Agda's type checker to fill this expression in, but the type checker has not been able to. However, you are free to fill in more holes in the file, in case filling in any of them holes gives it enough of a clue to work it out. Then, when you go to write `from?to`, your proof does give enough of a clue to solve the previous underscore: it should be solved to `snd(.patternInTele0)`, i.e, the underscore in `? (a , _) ? refl`, which is of type `B`. But then we hit a problem: whereas the `a` in `from?to` an the `a` in `to` basically line up, there is no equivalent to `snd(.patternInTele0)` in scope within `to`. Indeed, if you put a hole in place of the underscore in `to`, you'll notice that you're never going to find a `B` to put there, unless you swap `inj?` for `inj?`, losing your `A`. The ?Cannot instantiate the metavariable [...] since it contains the variable [...] which is not in scope of the metavariable? error basically means that you're requiring something earlier in a proof to know something later, where the thing later has assumptions not made earlier. `to` can't be implemented purely by virtue of `from?to` being provable ? that would be cyclic. As for tackling this problem, I would first focus on whether you can implement `to` and `from` independent of their proofs and without any yellow. This should be instructive as to what the full solution will be. It looks like `from` is already fine. I hope this helps, James On 22/08/2020 22:48, David Banas wrote: > Hi all, > > In trying to answer the following question from the /Negation/ chapter > of PLFA: > > Do we also have the following? > > |? (A ? B) ? (? A) ? (? B) | > > If so, prove; if not, can you give a relation weaker than isomorphism > that relates the two sides? > > It seems to me that I ought to be able to define an /embedding/. That > is, I should /not/ have to settle for just an /equivalence/: > > ?-dual-? : ? {A B : Set} > ? ? ------------------------- > ? ? ? (A ? B) ? (? A) ? (? B) > ?-dual-? = > ? record > ? ? { to ? ? ?= ? ?A?B ? inj? (? a ? ?A?B (a , _)) > ? ? ; from ? ?= ? { (inj? ?A) ? ? (a , _) ? ?A a > ? ? ? ? ? ? ? ? ? ; (inj? ?B) ? ? (_ , b) ? ?B b > ? ? ? ? ? ? ? ? ? } > ? ? ; from?to = ? ?A?B ? extensionality (? (a , _) ? refl > ? ? -- ; to?from = ? { (inj? ?A) ? -- We could write this one. > ? ? -- ? ? ? ? ? ? ? ; (inj? ?B) ? > ? ? -- ? ? ? ? ? ? ? -- Can't write this, due to choice of `inj?` > for `to`, above. > ? ? -- ? ? ? ? ? ? ? } > ? ? } > > > However, when I try the code above, I get: > > Cannot instantiate the metavariable _140 to solution > snd(.patternInTele0) since it contains the variable > snd(.patternInTele0) which is not in scope of the metavariable > when checking that the expression refl has type > (? { (inj? ?A) > ? ? ? ?? ? .patternInTele0 ? ?A (Data.Product.proj? .patternInTele0) > ? ?; (inj? ?B) > ? ? ? ?? ? .patternInTele0 ? ?B (Data.Product.proj? .patternInTele0) > ? ?}) > (inj? (? a ? ?A?B (a , _snd_140 (?A?B = ?A?B) (a = a)))) > .patternInTele0 > ? ?A?B .patternInTele0 > > > Any thoughts? > > Thanks, > -db > :) > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From louis.garde.pub at gmail.com Sun Aug 23 08:57:30 2020 From: louis.garde.pub at gmail.com (Louis Garde) Date: Sun, 23 Aug 2020 08:57:30 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <0b00b890f95a566bf9c190cc1f295f78@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <0b00b890f95a566bf9c190cc1f295f78@scico.botik.ru> Message-ID: <58165818-0aee-29e2-e9c1-442bebc245d4@gmail.com> Le 22/08/2020 ? 20:39, mechvel at scico.botik.ru a ?crit?: > I tried to demonstrate that people who pay attention to restrict EM in > mathematics always > rely on this "unsafe" proof tool in their life. A proof is defined only within a formal system, defined by a fixed set of rules and axioms, whereas my life (and yours) is not governed by a fixed set of rules and axioms: intuitions from the real life are sometimes usefull, sometimes misleading ! Within a consistent set of rules and axioms, a proposition A is either true, false, or undecidable. Excluded middle makes sense when you have in mind a model in which every proposition is either true or false. But there are other models ! By adding excluded middle in a formal system with undecidable proposititions, you get rid of some of these "non-standard" models. It is Ok for specific purposes, but when the formal system is used to define an algebraic structure, it just restricts the objects on which the structure can apply. Doing this systematically leads to a (very) restricted development of mathematics. Adding EM without question is may be the symptom that in your intuition, a proposition is either true or false; but this is just wrong in most formal systems. Either you have some sort of Platonism point of view, and you think that this is the evidence that formal systems are not able to describe adequately the mathematical reality (whatever it can be). Or you have a more formal point of view and understand undecidability as a normal possible property of propositions. All points of view are welcome, provided we agree on what a mathematical proof is, and no restriction is made on the mathematics that can be done. Banning EM from mathematics is of course an unacceptable restriction; but a theorem prover in which the use of EM cannot be controlled restricts also significantly the mathematics it can support. Louis. From mechvel at scico.botik.ru Sun Aug 23 09:01:27 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 23 Aug 2020 10:01:27 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> Message-ID: <7cb5cd1672e15e7703203c934ab871ce@scico.botik.ru> On 2020-08-23 00:21, mechvel at scico.botik.ru wrote: > [..] > > Do you mean that you doubt in that question of "will F terminate or > not?" > is already solved somewhere? > Well, if we doubt in that the F machine can run infinitely, then very > naturally > we doubt of that the above proof for the goal G is correct. Then the > usage of EM > is not safe in this case. > > If so, then the question of "What can be the third case" occurs > senseless. > Because even the statement of the second case, "F never stops" occurs > senseless. I think now in a different way about how can it look the third case (probably similar as Guillaume wrote): the third case is that time or space is exhausted before it becomes solved whether the machine F terminates. Regards, -- SM From mechvel at scico.botik.ru Sun Aug 23 09:30:36 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 23 Aug 2020 10:30:36 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <58165818-0aee-29e2-e9c1-442bebc245d4@gmail.com> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <0b00b890f95a566bf9c190cc1f295f78@scico.botik.ru> <58165818-0aee-29e2-e9c1-442bebc245d4@gmail.com> Message-ID: On 2020-08-23 09:57, Louis Garde wrote: > Le 22/08/2020 ? 20:39, mechvel at scico.botik.ru a ?crit?: >> I tried to demonstrate that people who pay attention to restrict EM in >> mathematics always >> rely on this "unsafe" proof tool in their life. > A proof is defined only within a formal system, defined by a fixed set > of rules and axioms, whereas my life (and yours) is not governed by a > fixed set of rules and axioms: intuitions from the real life are > sometimes usefull, sometimes misleading ! A proof is a philosophical notion, it is not necessarily formal. And logic is first and initially philosophical, and then, may be, mathematical. For example, coroners and advocates also deal with proofs, only not so rigorous. Even in mathematics most proofs are not formal. Otherwise mathematicians would not be able to solve anything important. They are formal only in Agda programs and in such systems. In my letters I wrote about certain relation between logic in life and formal logic, as it was, say, in the example with the lottery. There is a certain intuitive connection between them. -- SM From guillaume.brunerie at gmail.com Sun Aug 23 13:41:21 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Sun, 23 Aug 2020 13:41:21 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> Message-ID: Den l?r 22 aug. 2020 kl 23:21 skrev : > Do you mean that you doubt in that question of "will F terminate or > not?" > is already solved somewhere? > Well, if we doubt in that the F machine can run infinitely, then very > naturally > we doubt of that the above proof for the goal G is correct. Then the > usage of EM > is not safe in this case. Indeed, I doubt that the question of "will F terminate or not?" is already solved somewhere, as this requires infinite objects to exist somewhere and I have no evidence of that. > Well, I can write in Agda > > f = > case isPrime? (2^(2^(2^1000)) + 7) > of \ > { (yes _) -> true > ; (no _) -> false > } > > where solving (IsPrime n) is by searching through all m < n and the > division attempt > for each m. > Agda considers this as terminating, despite that computing f takes an > unfeasible > number of steps. > Myself and Agda tend to consider this as terminating. > > What is your opinion: is its termination justified? That?s a very interesting question, I?m not really sure what I think about that yet, I have to think more about it. > * I suspect that actual infinity exists in nature almost everywhere. > Observable values in quantum mechanics are somewhat said to be of a > finite set. > But a wave mathematical description for particles is infinite, and it > may occur > that this wave exists in reality, not only as idea. It is maybe possible that wave functions do exist "in reality", but I strongly suspect that if quantum mechanics uses infinite objects like that, it is more by convenience than by conviction. It is much simpler to reason about continuous objects than about very finely discretized ones, and physics (i.e. mathematical modeling of reality) is all about giving simplified models. Take for instance fluid dynamics, which starts from the assumption that fluids are continuous, even though we know that they are actually made of molecules. Or Newtonian mechanics, which (mathematically speaking) contradicts special relativity. Or essentially any other branch of physics, really. I don?t think that many physicists studying quantum mechanics believe that wave functions are real (or care about it). My guess is that they are mostly interested by the fact that it approximates reality well enough (for now). Approximating "very large" by "infinite" (as you seem to be doing several times in your email) is very reasonable from a practical point of view, but seems problematic to me from a philosophical point of view. > * And even actual infinity does not exist in nature, it still exists as > idea. > An idea of infinite objects helps to solve problems about finite > objects. > The more it is helpful the more sure we are that it exists. > I suspect that it exists even independently of human's mind > (something like Plato is right). > And in what space does it exist, and in what precisely way, I wonder. If you believe in platonism, then it is perfectly reasonable to believe in the excluded middle indeed :) Best, Guillaume From mechvel at scico.botik.ru Sun Aug 23 14:30:38 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 23 Aug 2020 15:30:38 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <7cb5cd1672e15e7703203c934ab871ce@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> <7cb5cd1672e15e7703203c934ab871ce@scico.botik.ru> Message-ID: <5b461159a25cf0353bf736d446f3a238@scico.botik.ru> On 2020-08-23 10:01, mechvel at scico.botik.ru wrote: > On 2020-08-23 00:21, mechvel at scico.botik.ru wrote: >> [..] >> >> Do you mean that you doubt in that question of "will F terminate or >> not?" >> is already solved somewhere? >> Well, if we doubt in that the F machine can run infinitely, then very >> naturally >> we doubt of that the above proof for the goal G is correct. Then the >> usage of EM >> is not safe in this case. >> >> If so, then the question of "What can be the third case" occurs >> senseless. >> Because even the statement of the second case, "F never stops" occurs >> senseless. > > > I think now in a different way about how can it look the third case > (probably similar as Guillaume wrote): > > the third case is that time or space is exhausted before it becomes > solved whether the machine F terminates. > Still I doubt. Probably this third case rather is: "the machine F continues, and it is not known whether it stops". So, without excluded third, the step of calling for F in the proof attempt for the goal G needs to consider not two cases but the three cases: Yes, No, Unknown. ? -- SM From nad at cse.gu.se Mon Aug 24 10:57:15 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 24 Aug 2020 10:57:15 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> Message-ID: On 2020-08-23 13:41, Guillaume Brunerie wrote: > Den l?r 22 aug. 2020 kl 23:21 skrev : >> Well, I can write in Agda >> >> f = >> case isPrime? (2^(2^(2^1000)) + 7) >> of \ >> { (yes _) -> true >> ; (no _) -> false >> } >> >> [?] >> >> What is your opinion: is its termination justified? > > That?s a very interesting question, I?m not really sure what I think > about that yet, I have to think more about it. I thought that your previous message sounded like an argument for something like ultrafinitism (which I know little about). -- /NAD From nad at cse.gu.se Mon Aug 24 11:00:42 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 24 Aug 2020 11:00:42 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: <0c7fb8f9-9545-4b11-4d66-2596b96fd286@enigmage.de> References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> <0c7fb8f9-9545-4b11-4d66-2596b96fd286@enigmage.de> Message-ID: <9a31bde3-d67d-2069-1b81-0c77ae2bc18a@cse.gu.se> On 2020-08-21 14:41, Manuel B?renz wrote: > Would an alternative with a good email integration (i.e. read threads > by receiving email, answer & start threads by sending an email) work > for you? I think something based on an open standard sounds more appealing than something closed (everything else being equal). -- /NAD From guillaume.brunerie at gmail.com Mon Aug 24 12:26:23 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Mon, 24 Aug 2020 12:26:23 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> Message-ID: Den m?n 24 aug. 2020 kl 10:57 skrev Nils Anders Danielsson : > > On 2020-08-23 13:41, Guillaume Brunerie wrote: > > Den l?r 22 aug. 2020 kl 23:21 skrev : > >> Well, I can write in Agda > >> > >> f = > >> case isPrime? (2^(2^(2^1000)) + 7) > >> of \ > >> { (yes _) -> true > >> ; (no _) -> false > >> } > >> > >> [?] > >> > >> What is your opinion: is its termination justified? > > > > That?s a very interesting question, I?m not really sure what I think > > about that yet, I have to think more about it. > > I thought that your previous message sounded like an argument for > something like ultrafinitism (which I know little about). I don?t think I would consider myself an ultrafinitist, but I do find some of those ideas attractive (even though I don?t know much about ultrafinitism either). Best, Guillaume From mechvel at scico.botik.ru Mon Aug 24 23:13:35 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 25 Aug 2020 00:13:35 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> Message-ID: On 2020-08-22 17:36, Nicolai Kraus wrote: > Hi Sergei, > > interesting examples. But I'm not sure they demonstrate what you want > to show, at least I'm not so convinced. Our real world behaviour is > actually pretty constructive, not classical. > For example: > > On Sat, Aug 22, 2020 at 2:20 PM wrote: > >> A naive person thinks >> "I shall buy a yacht. Let us call this goal G. >> I reach the goal through buying a lottery ticket. >> (1) If it wins enough, then I buy this yacht. >> (2) If it does not win enough, then I sell my second home, and this >> gives enough to buy the yacht. >> In any case the goal G will be reached. >> " >> >> Constructivist> >> "No, this is not for sure. This is not in any case. > > The "naive person" has given an algorithm, how can this not be > constructive? There is no usage of the axiom of excluded middle. As a > constructivist, I'm perfectly happy with this. > Nitpicking: You also need to know that the result of the lottery will > be announced, say, in no more than 72 hours (or no later than 2022). > But again, reality and constructive intuition match. The naive person > also would have to assume this for their plan, without knowledge of > logic or anything. > [..] I tried to construct a simple example of using excluded middle in every day practice. I thought that we can assume (let us assume) that one minute of the lottery process in the reel with balls is in reality running infinite steps of a certain complex algorithm. And so a) we cannot predict the result, b) the result is ready in 1 minute, c) the result is surely (let us assume) either No 7 or another number 0 <= n <= 100, actually it is Boolean (result == 7 or result /= 7). Compare this to the example where the lottery is replaced with running the machine F searching for a singular number in Nat. The algorithm with F is surely based on excluded middle. Right? The difference is that there is not upper bound for the number of steps (time) in running F, while the lottery ends in 1 minute. But imagine that some interpreter runs F through all Nat in one minute. Probably assuming that such an interpreter exists is equivalent to assuming that the excluded middle holds. Because this will be something like a machine that resolves in a finite time the truth for any statement. Now, assuming that the lottery machine runs through infinite number of steps in one minute, does this make the above algorithm with the lottery bases on excluded middle? ? If yes, then there remains the question of whether the lottery machine can run through infinite number of states in 1 minute. This reduces to the question of whether 1 minute can be divided into any number of equal parts. (?) Regards, -- SM From capn.freako at gmail.com Tue Aug 25 04:13:13 2020 From: capn.freako at gmail.com (David Banas) Date: Mon, 24 Aug 2020 19:13:13 -0700 Subject: [Agda] PLFA - Negation - Exercise Classical Message-ID: Hi all, In trying the "Classical" exercise near the end of the *Negation* chapter in PLFA, I'm trying to show that excluded middle implies double negation elimination with: A??A???A?A : ? {A : Set} ? A ? ? A --------- ? ? ? A ? A A??A???A?A (inj? a) = ? _ ? a A??A???A?A (inj? ?A) = ?() But Agda is complaining: ? (? A) should be empty, but that's not obvious to me when checking that the expression ? () has type ? (? A) ? A I wrote a function proving that not-A implies not-//A: ???-elim-inv : ? {A : Set} ? ? A ------- ? ? ? ? A ???-elim-inv ?x = ? f ? f ?x And Agda is happy with that proof, but not using it when evaluating the code above. And I can't quite figure out how to incorporate the proof supplied by the second block of code into the evaluation of the first. Can anyone get me unstuck? Thanks! -db -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolai.kraus at gmail.com Tue Aug 25 04:27:59 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Tue, 25 Aug 2020 03:27:59 +0100 Subject: [Agda] PLFA - Negation - Exercise Classical In-Reply-To: References: Message-ID: In the second case, you have to construct a function ? ? A ? A. Your attempt ? () can construct a function from the empty type to any other type. But ? ? A is in general not the empty type, so Agda complains. You can write ? y ? ? instead, but you still need to replace '?' by the right expression. Hint: what is the type of y? What is the type of the other term that you already have? What can you derive from these two terms? Your construction of ???-elim-inv is correct, but I don't see how to use it for your original exercise. I am not sure what you mean by "Agda is not using it". If you want Agda to use it, then you would have to tell Agda how to use it. Nicolai On Tue, Aug 25, 2020 at 3:13 AM David Banas wrote: > Hi all, > > In trying the "Classical" exercise near the end of the *Negation* chapter > in PLFA, I'm trying to show that excluded middle implies double negation > elimination with: > > A??A???A?A : ? {A : Set} > ? A ? ? A > --------- > ? ? ? A ? A > A??A???A?A (inj? a) = ? _ ? a > A??A???A?A (inj? ?A) = ?() > > > But Agda is complaining: > > ? (? A) should be empty, but that's not obvious to me > when checking that the expression ? () has type ? (? A) ? A > > > I wrote a function proving that not-A implies not-//A: > > ???-elim-inv : ? {A : Set} > ? ? A > ------- > ? ? ? ? A > ???-elim-inv ?x = ? f ? f ?x > > > And Agda is happy with that proof, but not using it when evaluating the > code above. And I can't quite figure out how to incorporate the proof > supplied by the second block of code into the evaluation of the first. > > Can anyone get me unstuck? > > Thanks! > -db > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Tue Aug 25 05:14:54 2020 From: capn.freako at gmail.com (David Banas) Date: Mon, 24 Aug 2020 20:14:54 -0700 Subject: [Agda] PLFA - Negation - Exercise Classical In-Reply-To: References: Message-ID: *Hint: what is the type of y? What is the type of the other term that you already have? What can you derive from these two terms? * I can derive bottom, but how does that help me produce an A? On Mon, Aug 24, 2020 at 7:28 PM Nicolai Kraus wrote: > In the second case, you have to construct a function ? ? A ? A. Your > attempt ? () can construct a function from the empty type to any other > type. But ? ? A is in general not the empty type, so Agda complains. You > can write ? y ? ? instead, but you still need to replace '?' by the right > expression. Hint: what is the type of y? What is the type of the other term > that you already have? What can you derive from these two terms? > > Your construction of ???-elim-inv is correct, but I don't see how to use > it for your original exercise. I am not sure what you mean by "Agda is not > using it". If you want Agda to use it, then you would have to tell Agda how > to use it. > > Nicolai > > > > On Tue, Aug 25, 2020 at 3:13 AM David Banas wrote: > >> Hi all, >> >> In trying the "Classical" exercise near the end of the *Negation* >> chapter in PLFA, I'm trying to show that excluded middle implies double >> negation elimination with: >> >> A??A???A?A : ? {A : Set} >> ? A ? ? A >> --------- >> ? ? ? A ? A >> A??A???A?A (inj? a) = ? _ ? a >> A??A???A?A (inj? ?A) = ?() >> >> >> But Agda is complaining: >> >> ? (? A) should be empty, but that's not obvious to me >> when checking that the expression ? () has type ? (? A) ? A >> >> >> I wrote a function proving that not-A implies not-//A: >> >> ???-elim-inv : ? {A : Set} >> ? ? A >> ------- >> ? ? ? ? A >> ???-elim-inv ?x = ? f ? f ?x >> >> >> And Agda is happy with that proof, but not using it when evaluating the >> code above. And I can't quite figure out how to incorporate the proof >> supplied by the second block of code into the evaluation of the first. >> >> Can anyone get me unstuck? >> >> Thanks! >> -db >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Tue Aug 25 05:38:48 2020 From: capn.freako at gmail.com (David Banas) Date: Mon, 24 Aug 2020 20:38:48 -0700 Subject: [Agda] PLFA - Negation - Exercise Classical In-Reply-To: References: Message-ID: Oh, of course, by defining (and then using) *absurd*: absurd : ? {A : Set} ? ? -- ? A absurd () A??A???A?A : ? {A : Set} ? A ? ? A --------- ? ? ? A ? A A??A???A?A (inj? a) = ? _ ? a A??A???A?A (inj? ?A) = ? y ? absurd (y ?A) On Mon, Aug 24, 2020 at 8:14 PM David Banas wrote: > *Hint: what is the type of y? What is the type of the other term that you > already have? What can you derive from these two terms? * > > I can derive bottom, but how does that help me produce an A? > > > On Mon, Aug 24, 2020 at 7:28 PM Nicolai Kraus > wrote: > >> In the second case, you have to construct a function ? ? A ? A. Your >> attempt ? () can construct a function from the empty type to any other >> type. But ? ? A is in general not the empty type, so Agda complains. You >> can write ? y ? ? instead, but you still need to replace '?' by the right >> expression. Hint: what is the type of y? What is the type of the other term >> that you already have? What can you derive from these two terms? >> >> Your construction of ???-elim-inv is correct, but I don't see how to use >> it for your original exercise. I am not sure what you mean by "Agda is not >> using it". If you want Agda to use it, then you would have to tell Agda how >> to use it. >> >> Nicolai >> >> >> >> On Tue, Aug 25, 2020 at 3:13 AM David Banas >> wrote: >> >>> Hi all, >>> >>> In trying the "Classical" exercise near the end of the *Negation* >>> chapter in PLFA, I'm trying to show that excluded middle implies double >>> negation elimination with: >>> >>> A??A???A?A : ? {A : Set} >>> ? A ? ? A >>> --------- >>> ? ? ? A ? A >>> A??A???A?A (inj? a) = ? _ ? a >>> A??A???A?A (inj? ?A) = ?() >>> >>> >>> But Agda is complaining: >>> >>> ? (? A) should be empty, but that's not obvious to me >>> when checking that the expression ? () has type ? (? A) ? A >>> >>> >>> I wrote a function proving that not-A implies not-//A: >>> >>> ???-elim-inv : ? {A : Set} >>> ? ? A >>> ------- >>> ? ? ? ? A >>> ???-elim-inv ?x = ? f ? f ?x >>> >>> >>> And Agda is happy with that proof, but not using it when evaluating the >>> code above. And I can't quite figure out how to incorporate the proof >>> supplied by the second block of code into the evaluation of the first. >>> >>> Can anyone get me unstuck? >>> >>> Thanks! >>> -db >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.basold at liacs.leidenuniv.nl Tue Aug 25 06:42:07 2020 From: h.basold at liacs.leidenuniv.nl (Henning Basold) Date: Tue, 25 Aug 2020 06:42:07 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> Message-ID: <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> Hi James, As you mentioned universal properties: reasoning about commuting diagrams in category theory is quite neat to do in Agda, although better heuristics to figure out implicit arguments need to be implemented. I suppose this is because equational proofs in CT are usually not very long and can thus be nicely presented in Agda. I have no experience in Lean in this regard though. Cheers, Henning On 21/08/2020 23:29, James Wood wrote: > Hi Ettore, > > Thanks for the question. This is maybe the part of what I wrote which I > am least confident about, partially because ?most other areas of maths? > comprises an awful lot, and very little of it have I yet studied in > detail. Apologies, and please point out, if I present any > misconceptions. To make it answerable, I'll focus on a couple of core > undergrad topics ? analysis and algebra ? contrasted with programming > language metatheory. These are also going to be caricatures ? in real > life, things are not so discrete and extreme. > > Analysis: We're interested in real numbers, basic operations on them, > sequences & their limits, and continuity of ? ? ? functions. Let's > assume that we've postulated enough axioms to do classical analysis. > Then, the reals are characterised as the unique totally ordered, > Cauchy-complete, field satisfying the Archimedean property, and most > arguments after establishing that never touch the particular > implementation (Cauchy vs Dedekind vs whatever) we may use. As such, we > never do induction on the reals (in the normal sense), so Agda's support > for pattern-matching doesn't buy us much. We still take cases on > ordering and do induction on natural numbers, but these features of a > proof should be clear enough even in a Coq-style tactic script (there > being at most 3 cases, with quite simple types). Something we really > want is an algebraic solver for real numbers, to save us from the tedium > of specifying algebraic manipulations in proofs. Such solvers appear to > have been worked on more in Coq and Lean (though I'm not sure to what > extent this is about the systems themselves). > > Algebra: We're interested in some class of algebraic structures, and, of > such structures, examples, homomorphisms, and ways to construct new > examples from old examples. The constructions on algebraic structures > (e.g, direct sums, direct products, tensor products, ...) are usually > characterised by universal properties, and it is usually much easier to > appeal to those universal properties than to any construction (similarly > to what happened with ?). When these constructions are given explicitly, > they are usually done in a seemingly random way, which we later verify > has the right properties (i.e, we are not being directed by any types). > And of course within a given structure, the only way to make progress is > to use the structure's axioms along with anything else you have lying > around, which again is unlikely to be complex inductive data types. > > Programming languages: We define the syntax of a programming language > and give it semantics ? either operational or denotational. As I > discussed earlier, the syntax of a programming language is typically > represented as a complex indexed inductive data type, with on the order > of 5~15 constructors. We define some similarly complex operations on the > syntax by recursion, and prove properties of them by induction > (?induction on the syntax of the term? is a common phrase in papers). An > operational semantics will typically have even more constructors, while > a denotational semantics will consist of a dependently typed function > respecting the typing of a term. A programming language often will be > characterised by a universal property (as the free such-and-such closed > category with this-and-that extra bits when quotiented by the equational > theory), but proving this theorem is typically the last result. The > predominant style of doing PL metatheory in Agda has it that if you > manage to define operations of the correct type, then they are almost > certainly the ones you intended (this is type-directed programming in > action). > > It may well be that there are some areas of regular mathematics that are > particularly well suited to the tools Agda provides. There may be yet > others which could be presented more clearly given those tools (as we > have seen with data structures from computer science defined to enforce > their invariants). And sometimes you're forced into a particular proof > assistant for other reasons ? be they theoretical, social, or pedagogical. > > Regards, > James > > On 21/08/2020 18:48, Ettore Aldrovandi wrote: >> Hi James,? >> >> mathematician lurker here. ?This is interesting: >> >>> On Aug 21, 2020, at 12:47, James Wood >> > wrote: >>> >>> Most other areas of maths traditionally don't resemble this >>> type-directed style of programming. There are few, small, inductive >>> types, and a lot of reasoning is done at the level of algebraic axioms >>> (with no inductive types in sight). These features largely nullify >>> Agda's advantages, and instead the advantages of Lean and Coq in the >>> field of proving shine through. >> >> Can you elaborate a bit? >> >> Thanks, >> >> ?Ettore >> Ettore Aldrovandi >> Department of Mathematics, Florida State University >> 1017 Academic Way ? ? ? ? ? ? ? ?* ? http://www.math.fsu.edu/~ealdrov >> >> Tallahassee, FL 32306-4510, USA * * aldrovandi at math dot fsu dot edu >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 3110 bytes Desc: not available URL: From nad at cse.gu.se Tue Aug 25 10:56:34 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 25 Aug 2020 10:56:34 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> Message-ID: On 2020-08-25 06:42, Henning Basold wrote: > reasoning about commuting diagrams in category theory is quite neat to > do in Agda, although better heuristics to figure out implicit > arguments need to be implemented. Unlike several other systems Agda does not instantiate implicit arguments unless the solution is unique (if we ignore bugs). Do you have an example where Agda fails to find a unique solution, and you think Agda should have found it? In that case, please post it on the bug tracker. -- /NAD From Jesper at sikanda.be Tue Aug 25 11:33:23 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 25 Aug 2020 11:33:23 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: <9a31bde3-d67d-2069-1b81-0c77ae2bc18a@cse.gu.se> References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> <0c7fb8f9-9545-4b11-4d66-2596b96fd286@enigmage.de> <9a31bde3-d67d-2069-1b81-0c77ae2bc18a@cse.gu.se> Message-ID: Let me try to summarize the discussion so far: - One important point is that there is a fundamental difference between slow-form asynchronous communication channels (e.g. email, github, reddit, discourse) and real-time synchronous channels (e.g. IRC, slack, discord, zulip, matrix.org, ...). While some of these systems can also been used for the other purpose, the general requirements seem different enough that having two separate platforms is warranted. - For asynchronous communication, email is very ingrained and difficult to replace completely. It would be interesting to investigate alternatives such as discourse at some point, but I won't push for that at the moment. - From all the synchronous channels, the two that got the most positive reaction are Zulip and Matrix.org. Zulip seems to be mature and well-loved for its integrations and threaded conversations. Matrix is the only truly open platform and does more or less everything that Slack does. I would like to try out either Zulip or Matrix during the next online Agda meeting (in place of Slack). Personally I would prefer Zulip, since the integration with Github is rather nice, and I've come to like the threaded model of conversation. For the kind of conversations we had on the Slack channel so far, these features seem to be more important than the possibility to connect via different clients offered by Matrix. -- Jesper On Mon, Aug 24, 2020 at 11:01 AM Nils Anders Danielsson wrote: > On 2020-08-21 14:41, Manuel B?renz wrote: > > Would an alternative with a good email integration (i.e. read threads > > by receiving email, answer & start threads by sending an email) work > > for you? > > I think something based on an open standard sounds more appealing than > something closed (everything else being equal). > > -- > /NAD > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wadler at inf.ed.ac.uk Tue Aug 25 11:39:43 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Tue, 25 Aug 2020 10:39:43 +0100 Subject: [Agda] PLFA - Negation - Exercise Classical In-Reply-To: References: Message-ID: Thank you to the list for dealing with PLFA questions! I'm happy for this to continue, but if the list is not happy, there is an alternative mailing list available: plfa-interest at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/plfa-interest Go well, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Tue, 25 Aug 2020 at 04:39, David Banas wrote: > Oh, of course, by defining (and then using) *absurd*: > > absurd : ? {A : Set} > ? ? > -- > ? A > absurd () > > A??A???A?A : ? {A : Set} > ? A ? ? A > --------- > ? ? ? A ? A > A??A???A?A (inj? a) = ? _ ? a > A??A???A?A (inj? ?A) = ? y ? absurd (y ?A) > > > > On Mon, Aug 24, 2020 at 8:14 PM David Banas wrote: > >> *Hint: what is the type of y? What is the type of the other term that you >> already have? What can you derive from these two terms? * >> >> I can derive bottom, but how does that help me produce an A? >> >> >> On Mon, Aug 24, 2020 at 7:28 PM Nicolai Kraus >> wrote: >> >>> In the second case, you have to construct a function ? ? A ? A. Your >>> attempt ? () can construct a function from the empty type to any other >>> type. But ? ? A is in general not the empty type, so Agda complains. >>> You can write ? y ? ? instead, but you still need to replace '?' by the >>> right expression. Hint: what is the type of y? What is the type of the >>> other term that you already have? What can you derive from these two terms? >>> >>> Your construction of ???-elim-inv is correct, but I don't see how to use >>> it for your original exercise. I am not sure what you mean by "Agda is not >>> using it". If you want Agda to use it, then you would have to tell Agda how >>> to use it. >>> >>> Nicolai >>> >>> >>> >>> On Tue, Aug 25, 2020 at 3:13 AM David Banas >>> wrote: >>> >>>> Hi all, >>>> >>>> In trying the "Classical" exercise near the end of the *Negation* >>>> chapter in PLFA, I'm trying to show that excluded middle implies double >>>> negation elimination with: >>>> >>>> A??A???A?A : ? {A : Set} >>>> ? A ? ? A >>>> --------- >>>> ? ? ? A ? A >>>> A??A???A?A (inj? a) = ? _ ? a >>>> A??A???A?A (inj? ?A) = ?() >>>> >>>> >>>> But Agda is complaining: >>>> >>>> ? (? A) should be empty, but that's not obvious to me >>>> when checking that the expression ? () has type ? (? A) ? A >>>> >>>> >>>> I wrote a function proving that not-A implies not-//A: >>>> >>>> ???-elim-inv : ? {A : Set} >>>> ? ? A >>>> ------- >>>> ? ? ? ? A >>>> ???-elim-inv ?x = ? f ? f ?x >>>> >>>> >>>> And Agda is happy with that proof, but not using it when evaluating the >>>> code above. And I can't quite figure out how to incorporate the proof >>>> supplied by the second block of code into the evaluation of the first. >>>> >>>> Can anyone get me unstuck? >>>> >>>> Thanks! >>>> -db >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>> _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From frederic.blanqui at inria.fr Tue Aug 25 12:32:35 2020 From: frederic.blanqui at inria.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCbGFucXVp?=) Date: Tue, 25 Aug 2020 12:32:35 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> Message-ID: Hi. How do you know that a unification problem in Agda (hence modulo definitional equality right?) has a unique solution? Le 25/08/2020 ? 10:56, Nils Anders Danielsson a ?crit?: > On 2020-08-25 06:42, Henning Basold wrote: >> reasoning about commuting diagrams in category theory is quite neat to >> do in Agda, although better heuristics to figure out implicit >> arguments need to be implemented. > > Unlike several other systems Agda does not instantiate implicit > arguments unless the solution is unique (if we ignore bugs). Do you have > an example where Agda fails to find a unique solution, and you think > Agda should have found it? In that case, please post it on the bug > tracker. > From puttamalac at gmail.com Tue Aug 25 12:49:23 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Tue, 25 Aug 2020 12:49:23 +0200 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> Message-ID: Fr?d?ric: by solving only pattern unification problems, which have definitionaly unique solutions, and reducing every non-pattern problem to pattern problems by various strategies, e.g. by constraint postponing or eta conversion. However, this uniqueness is only about unification, but that's just one part of elaboration. There is also a degree of freedom in deciding where to insert implicit applications and lambdas, and Agda's choice of insertions is not really unique. In general, I think it's practically realistic to have unification which produces unique solutions, but not that realistic to have elaboration which produces unique output. Fr?d?ric Blanqui ezt ?rta (id?pont: 2020. aug. 25., K, 12:33): > Hi. How do you know that a unification problem in Agda (hence modulo > definitional equality right?) has a unique solution? > > Le 25/08/2020 ? 10:56, Nils Anders Danielsson a ?crit : > > On 2020-08-25 06:42, Henning Basold wrote: > >> reasoning about commuting diagrams in category theory is quite neat to > >> do in Agda, although better heuristics to figure out implicit > >> arguments need to be implemented. > > > > Unlike several other systems Agda does not instantiate implicit > > arguments unless the solution is unique (if we ignore bugs). Do you have > > an example where Agda fails to find a unique solution, and you think > > Agda should have found it? In that case, please post it on the bug > > tracker. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Tue Aug 25 14:22:24 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 25 Aug 2020 14:22:24 +0200 Subject: [Agda] Uniqueness [Was: Re: Hanging out with the Lean crowd] In-Reply-To: References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> Message-ID: On 2020-08-25 12:49, Andr?s Kov?cs wrote: > However, this uniqueness is only about unification, but that's just > one part of elaboration. There is also a degree of freedom in deciding > where to insert implicit applications and lambdas, and Agda's choice > of insertions is not really unique. Example: id : {A : Set} ? A ? A id x = x f : ? f = id What is the elaborated right-hand side of f? Is it "id" or "id {A = }"? > In general, I think it's practically realistic to have unification > which produces unique solutions, but not that realistic to have > elaboration which produces unique output. Can you elaborate on this? -- /NAD From frederic.blanqui at inria.fr Tue Aug 25 14:54:46 2020 From: frederic.blanqui at inria.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCbGFucXVp?=) Date: Tue, 25 Aug 2020 14:54:46 +0200 Subject: [Agda] Uniqueness [Was: Re: Hanging out with the Lean crowd] In-Reply-To: References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> Message-ID: <2541e179-10f6-b068-8c04-390bcc22c9ea@inria.fr> Le 25/08/2020 ? 12:49, Andr?s Kov?cs a ?crit?: > Fr?d?ric: by solving only pattern unification problems, which have > definitionaly unique solutions, Could you provide a reference please? > and reducing every non-pattern problem to pattern problems by various > strategies, e.g. by constraint postponing or eta conversion. > > However, this uniqueness is only about unification, but that's just > one part of elaboration. There is also a degree of freedom in deciding > where to insert implicit applications and lambdas, and Agda's choice > of insertions is not really unique. In general, I think it's > practically realistic to have unification which?produces unique > solutions, but not that realistic to have elaboration which?produces > unique output. > > Fr?d?ric Blanqui > ezt ?rta (id?pont: 2020. aug. 25., > K, 12:33): > > Hi. How do you know that a unification problem in Agda (hence modulo > definitional equality right?) has a unique solution? > > Le 25/08/2020 ? 10:56, Nils Anders Danielsson a ?crit?: > > On 2020-08-25 06:42, Henning Basold wrote: > >> reasoning about commuting diagrams in category theory is quite > neat to > >> do in Agda, although better heuristics to figure out implicit > >> arguments need to be implemented. > > > > Unlike several other systems Agda does not instantiate implicit > > arguments unless the solution is unique (if we ignore bugs). Do > you have > > an example where Agda fails to find a unique solution, and you think > > Agda should have found it? In that case, please post it on the bug > > tracker. > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Tue Aug 25 15:10:58 2020 From: capn.freako at gmail.com (David Banas) Date: Tue, 25 Aug 2020 06:10:58 -0700 Subject: [Agda] PLFA - Negation - Exercise Classical In-Reply-To: References: Message-ID: Oh, gosh! I didn't even think to wonder if there might be a more appropriate venue for my PLFA-related questions. My sincerest apologies to anyone, who found that inappropriate. :( And my sincerest thanks to those who responded. :) -db On Tue, Aug 25, 2020 at 2:40 AM Philip Wadler wrote: > Thank you to the list for dealing with PLFA questions! > > I'm happy for this to continue, but if the list is not happy, there is an > alternative mailing list available: > plfa-interest at inf.ed.ac.uk > http://lists.inf.ed.ac.uk/mailman/listinfo/plfa-interest > > Go well, -- P > > . \ Philip Wadler, Professor of Theoretical Computer Science, > . /\ School of Informatics, University of Edinburgh > . / \ and Senior Research Fellow, IOHK > . http://homepages.inf.ed.ac.uk/wadler/ > > > > On Tue, 25 Aug 2020 at 04:39, David Banas wrote: > >> Oh, of course, by defining (and then using) *absurd*: >> >> absurd : ? {A : Set} >> ? ? >> -- >> ? A >> absurd () >> >> A??A???A?A : ? {A : Set} >> ? A ? ? A >> --------- >> ? ? ? A ? A >> A??A???A?A (inj? a) = ? _ ? a >> A??A???A?A (inj? ?A) = ? y ? absurd (y ?A) >> >> >> >> On Mon, Aug 24, 2020 at 8:14 PM David Banas >> wrote: >> >>> *Hint: what is the type of y? What is the type of the other term that >>> you already have? What can you derive from these two terms? * >>> >>> I can derive bottom, but how does that help me produce an A? >>> >>> >>> On Mon, Aug 24, 2020 at 7:28 PM Nicolai Kraus >>> wrote: >>> >>>> In the second case, you have to construct a function ? ? A ? A. Your >>>> attempt ? () can construct a function from the empty type to any other >>>> type. But ? ? A is in general not the empty type, so Agda complains. >>>> You can write ? y ? ? instead, but you still need to replace '?' by the >>>> right expression. Hint: what is the type of y? What is the type of the >>>> other term that you already have? What can you derive from these two terms? >>>> >>>> Your construction of ???-elim-inv is correct, but I don't see how to >>>> use it for your original exercise. I am not sure what you mean by "Agda is >>>> not using it". If you want Agda to use it, then you would have to tell Agda >>>> how to use it. >>>> >>>> Nicolai >>>> >>>> >>>> >>>> On Tue, Aug 25, 2020 at 3:13 AM David Banas >>>> wrote: >>>> >>>>> Hi all, >>>>> >>>>> In trying the "Classical" exercise near the end of the *Negation* >>>>> chapter in PLFA, I'm trying to show that excluded middle implies double >>>>> negation elimination with: >>>>> >>>>> A??A???A?A : ? {A : Set} >>>>> ? A ? ? A >>>>> --------- >>>>> ? ? ? A ? A >>>>> A??A???A?A (inj? a) = ? _ ? a >>>>> A??A???A?A (inj? ?A) = ?() >>>>> >>>>> >>>>> But Agda is complaining: >>>>> >>>>> ? (? A) should be empty, but that's not obvious to me >>>>> when checking that the expression ? () has type ? (? A) ? A >>>>> >>>>> >>>>> I wrote a function proving that not-A implies not-//A: >>>>> >>>>> ???-elim-inv : ? {A : Set} >>>>> ? ? A >>>>> ------- >>>>> ? ? ? ? A >>>>> ???-elim-inv ?x = ? f ? f ?x >>>>> >>>>> >>>>> And Agda is happy with that proof, but not using it when evaluating >>>>> the code above. And I can't quite figure out how to incorporate the proof >>>>> supplied by the second block of code into the evaluation of the first. >>>>> >>>>> Can anyone get me unstuck? >>>>> >>>>> Thanks! >>>>> -db >>>>> >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>> >>>> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From puttamalac at gmail.com Tue Aug 25 15:34:57 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Tue, 25 Aug 2020 15:34:57 +0200 Subject: [Agda] Uniqueness [Was: Re: Hanging out with the Lean crowd] In-Reply-To: References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> Message-ID: > What is the elaborated right-hand side of f? Is it "id" or "id {A = }"? Well, this is an example for something which may be up to taste, or which may vary depending on the rest of the implementation. If "f" is a top-level definition, and we use meta-freezing like in Agda, then "id {?A}" only results in a useless frozen meta. If "f" is a local definition and we expect "?A" to be solved, then it might make sense to insert the application, or we might want to leave it polymorphic even in that case. We might even have let-generalization, in which case we can insert application but immediately re-generalize. Or we might have some mechanism for delaying insertions. > Can you elaborate on this? To define what uniqueness of elaboration means, we have to specify a relation between core syntax and surface syntax, which holds when a core term is a valid elaboration of a surface term. A sensible definition for this relation is that the core term can only contain filled holes and extra implicit insertions relative to the surface syntax. I think that this is not quite enough, because it allows insertion of arbitrary number of superfluous implicit lambdas, e.g. we may elaborate "let x = true in x" to "let x = \{x : Bool} -> true in x {true}". So I think we should also add a condition like "inserted implicit lambdas must have actually dependent implicit function types", so "\{x : Bool} -> true" is illegal because it has type "{x : Bool} -> Bool". So there's already a bit of a complication when we try to define what uniqueness of elaboration means. Anyway, with the more sensible definition of valid insertion, we still have a large number of different valid elaboration strategies. For example, we may or may not include HM-style let-generalization, as both choices are valid! It seems to me that implementors must pick specific insertion strategies, if they want the system to be practical. In some weak settings, like H-M or predicative System F, it is feasible to have unique elaboration, because elaboration is "railroaded" by the restrictions on typing and surface syntax. But if we allow full dependent types together with first-class implicit function types, we have tremendous freedom to insert such functions, and I don't think there is anymore a nice & natural specification of valid insertion, such that elaboration produces output which is unique with respect to that. Instead, elaboration follows a particular insertion strategy which is more "algorithmic" than "declarative". Nils Anders Danielsson ezt ?rta (id?pont: 2020. aug. 25., K, 14:22): > On 2020-08-25 12:49, Andr?s Kov?cs wrote: > > However, this uniqueness is only about unification, but that's just > > one part of elaboration. There is also a degree of freedom in deciding > > where to insert implicit applications and lambdas, and Agda's choice > > of insertions is not really unique. > > Example: > > id : {A : Set} ? A ? A > id x = x > > f : ? > f = id > > What is the elaborated right-hand side of f? Is it "id" or > "id {A = }"? > > > In general, I think it's practically realistic to have unification > > which produces unique solutions, but not that realistic to have > > elaboration which produces unique output. > > Can you elaborate on this? > > -- > /NAD > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nk480 at cl.cam.ac.uk Tue Aug 25 15:36:02 2020 From: nk480 at cl.cam.ac.uk (Neel Krishnaswami) Date: Tue, 25 Aug 2020 14:36:02 +0100 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> Message-ID: <242c72a3-d189-0dac-869a-07514de066cc@cl.cam.ac.uk> Hi, I didn't know that solutions remained unique even if you solved constraints lazily. Is there a reference for this? Best, Neel On 25/08/2020 09:56, Nils Anders Danielsson wrote: > > Unlike several other systems Agda does not instantiate implicit > arguments unless the solution is unique (if we ignore bugs). Do you have > an example where Agda fails to find a unique solution, and you think > Agda should have found it? In that case, please post it on the bug > tracker. > From jesper.louis.andersen at gmail.com Wed Aug 26 14:31:18 2020 From: jesper.louis.andersen at gmail.com (Jesper Louis Andersen) Date: Wed, 26 Aug 2020 14:31:18 +0200 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: Message-ID: On Fri, Aug 21, 2020 at 1:23 PM Jesper Cockx wrote: > - IRC: An open system but based on archaic technology. I'm having a hard > time browsing the history of a channel when I'm not always connected. > IRC is a weapon from a more civilized age. > - Slack: Seems to be the de facto standard for many people and we used it > successfully during the latest Agda meeting. However, it is commercial > software and keeping a full history is not free. > Slack has one big disadvantage: it silos you, and having multiple slack systems open isn't that useful in the long run. It completely fails to accept cross-interaction between different communities. > - Gitter: Is well integrated with Github but feels otherwise quite > barebones compared to Slack. > Skipping this one, never tried it. > - Discord: Many features are more aimed at gamers than programmers. Some > people used it for screensharing during the Agda meeting. It is commercial > software and we'd have to pay for certain features > Discord is in many ways the spiritual successor to IRC. It allows a single account to be a member of multiple servers, ie., the hierarchy is Server->Channel->Message, whereas the Slack hierarchy is missing the "Server" part. > - Zulip: Has a nice threaded interface to conversations that can take a > while to get used to. It is 100% open source software and is explicitly > aimed at open source communities (https://zulipchat.com/for/open-source/). > The HoTT community also seems to be using it quite effectively. > Skipping this one as well, since I've never tried it. Seems to get a lot of traction however. You usually want: * Async communication, since people live all over the world and they don't always have time, so catching up with older discussions are important. * Low latency communication. Email is acceptable for high-latency. * Since this is Agda: probably unicode support and also support for going fully bazonk on notation hell should be built in. * Threading/Topic'ing. Because they tend to form and go on a tangent. * Ability to be part of multiple communities at the same time. Otherwise, people end up having to make a choice, which silos people and slashes through cross-community building. * Search indexing which work(tm). Slack has had a long history of being weak in this regard. -- J. -------------- next part -------------- An HTML attachment was scrubbed... URL: From don at jorgebs.es Wed Aug 26 14:41:22 2020 From: don at jorgebs.es (=?UTF-8?Q?Jorge_Bl=C3=A1zquez_Saborido?=) Date: Wed, 26 Aug 2020 12:41:22 +0000 (UTC) Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: Message-ID: I think Matrix (the protocol) already supports threads, but it isn't implemented in any client yet. Here[https://github.com/vector-im/element-web/issues/2349] is the relevant issue for Element. I would go with Matrix, since with that feature it will have all the advantages of Zulip without the disadvantages. Regards, Jorge Bl?zquez Saborido -------------- next part -------------- An HTML attachment was scrubbed... URL: From publicityifl at gmail.com Wed Aug 26 14:41:39 2020 From: publicityifl at gmail.com (Jurriaan Hage) Date: Wed, 26 Aug 2020 07:41:39 -0500 Subject: [Agda] First and Only Call for Participation for IFL 2020 (Implementation and Application of Functional Languages) Message-ID: Hello, Please, find below the first and final call for participation for IFL 2020. Please forward these to anyone you think may be interested. Apologies for any duplicates you may receive. best regards, Jurriaan Hage Publicity Chair of IFL ======================================================= IFL 2020 32nd Symposium on Implementation and Application of Functional Languages Call for Participation venue: online 2nd - 4th September 2020 https://www.cs.kent.ac.uk/events/2020/ifl20/ ======================================================== ### Scope The goal of the IFL symposia is to bring together researchers actively engaged in the implementation and application of functional and function-based programming languages. IFL 2020 will be a venue for researchers to present and discuss new ideas and concepts, work in progress, and publication-ripe results related to the implementation and application of functional languages and function-based programming. ### Registration The symposium will be run via Zoom (zoom.us). If you can use Zoom, then you can participate. Please register for free via Eventbrite on the symposium webpage: https://www.cs.kent.ac.uk/events/2020/ifl20/ ### Programme Day 1: Wednesday, 2 September 12:45 Welcome 13:00 Nico Naus and Johan Jeuring: End-user feedback in multi-user workflow systems 13:30 Mart Lubbers, Haye B?hm, Pieter Koopman and Rinus Plasmeijer: Asynchronous Shared Data Sources 14:00 Pieter Koopman, Steffen Michels and Rinus Plasmeijer: Dynamic Editors for Well-Typed Expressions 14:30 Bas Lijnse and Rinus Plasmeijer: Asymmetric Composable Web Editors in iTasks 15:00 Social break 15:30 Sven-Olof Nystr?m: A subtyping system for Erlang 16:00 Andrew Marmaduke, Christopher Jenkins and Aaron Stump: Generic Zero-Cost Constructor Subtyping 16:30 Joris Burgers, Jurriaan Hage and Alejandro Serrano: Heuristics-based Type Error Diagnosis for Haskell - The case of GADTs and local reasoning 17:00 Social break 17:30 Kavon Farvardin and John Reppy: A New Backend for Standard ML of New Jersey 18:00 Chaitanya Koparkar, Mike Rainey, Michael Vollmer, Milind Kulkarni and Ryan R. Newton: A Compiler Approach Reconciling Parallelism and Dense Representations for Irregular Trees 18:30 Hans-Nikolai Vie?mann and Sven-Bodo Scholz: Effective Host-GPU Memory Mangement Through Code Generation 20:00 Virtual Pub Day 2: Thursday, 3 September 10:00 Virtual Breakfast 13:00 Michal Gajda: Less Arbitrary waiting time 13:30 S?lr?n Halla Einarsd?ttir and Nicholas Smallbone: Template-based Theory Exploration: Discovering Properties of Functional Programs by Testing 14:00 P?ter Bereczky, D?niel Horp?csi, Judit K?szegi, Soma Szeier and Simon Thompson: Validating Formal Semantics by Comparative Testing 14:30 Social break 15:00 Gergo Erdi: An Adventure in Symbolic Execution 15:30 Joshua M. Schappel, Sachin Mahashabde and Marco T. Morazan: Using OO Design Patterns in a Functional Programming Setting 16:00 Filipe Varj?o: Functional Programming and Interval Arithmetic with High Accuracy 16:30 Social break 17:00 Laith Sakka, Chaitanya Koparkar, Michael Vollmer, Vidush Singhal, Sam Tobin-Hochstadt, Ryan R. Newton and Milind Kulkarni: General Deforestation Using Fusion, Tupling and Intensive Redundancy Analysis 17:30 Benjamin Mourad and Matteo Cimini: A Declarative Gradualizer with Lang-n-Change 18:00 Maheen Riaz Contractor and Matthew Fluet: Type- and Control-Flow Directed Defunctionalization 19:30 Virtual Pub Day 3: Friday, 4 September 10:00 Virtual Breakfast 13:00 Michal Gajda: Towards a more perfect union type 13:30 Folkert de Vries, Sjaak Smetsers and Sven-Bodo Scholz: Container Unification for Uniqueness Types 14:00 Alejandro D?az-Caro, Pablo E. Mart?nez L?pez and Cristian Sottile: Polymorphic System I 14:30 Social break 15:00 Michal Gajda: Schema-driven mutation of datatype with multiple representations 15:30 Alexandre Garcia de Oliveira, Mauro Jaskelioff and Ana Cristina Vieira de Melo: On Structuring Pure Functional Programs with Monoidal Profunctors 16:00 Sara Moreira, Pedro Vasconcelos and M?rio Florido: Resource Analysis for Lazy Evaluation with Polynomial Potential 16:30 Social break 17:00 Neil Mitchell, Moritz Kiefer, Pepe Iborra, Luke Lau, Zubin Duggal, Hannes Siebenhandl, Matthew Pickering and Alan Zimmerman: Building an Integrated Development Environment (IDE) on top of a Build System 17:30 Evan Sitt, Xiaotian Su, Beka Grdzelishvili, Zurab Tsinadze, Zongpu Xie, Hossameldin Abdin, Giorgi Botkoveli, Nikola Cenikj, Tringa Sylaj and Viktoria Zsok: Functional Programming Application for Digital Synthesis Implementation 18:00 Jocelyn Serot: HoCL: High level specification of dataflow graphs 19:30 Virtual Pub All times are in British Summer Time (BST), the local time in Canterbury, UK. So please translate these into your own time zone, using a service such as time and date. -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Wed Aug 26 14:48:36 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 26 Aug 2020 13:48:36 +0100 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: Message-ID: <73ce9923-13e8-8d46-c2a1-1490f0555344@strath.ac.uk> This brings up basically the only problem I have with Zulip: it does Slack-style, rather than Discord-style, account management. I.e, you need a new account for each new group you join. In effect, this makes joining new groups more difficult than it needs to be, which is quite a negative if we want to be open to beginners and dabblers. James On 26/08/2020 13:31, Jesper Louis Andersen wrote: > On Fri, Aug 21, 2020 at 1:23 PM Jesper Cockx > wrote: > > - IRC: An open system but based on archaic technology. I'm having a > hard time browsing the history of a channel when I'm not always > connected. > > > IRC is a weapon from a more civilized age. > ? > > - Slack: Seems to be the de facto standard for many people and we > used it successfully during the latest Agda meeting. However, it is > commercial software and keeping a full history is not free. > > > Slack has one big disadvantage: it silos you, and having multiple slack > systems open isn't that useful in the long run. It completely fails to > accept cross-interaction between different communities. > > - Gitter: Is well integrated with Github but feels otherwise quite > barebones compared to Slack. > > > Skipping this one, never tried it. > > - Discord: Many features are more aimed at gamers than programmers. > Some people used it for screensharing during the Agda meeting. It is > commercial software and we'd have to pay for certain features > > > Discord is in many ways the spiritual successor to IRC. It allows a > single account to be a member of multiple servers, ie., the hierarchy is > Server->Channel->Message, whereas the Slack hierarchy is missing the > "Server" part. > > - Zulip: Has a nice threaded interface to conversations that can > take a while to get used to. It is 100% open source software and is > explicitly aimed at open source communities > (https://zulipchat.com/for/open-source/ > ). > The HoTT community also seems to be using it quite effectively. > > > Skipping this one as well, since I've never tried it. Seems to get a lot > of traction however. > You usually want: > > * Async communication, since people live all over the world and they > don't always have time, so catching up with older discussions are important. > * Low latency communication. Email is acceptable for high-latency. > * Since this is Agda: probably unicode support and also support for > going fully bazonk on notation hell should be built in. > * Threading/Topic'ing. Because they tend to form and go on a tangent. > * Ability to be part of multiple communities at the same time. > Otherwise, people end up having to make a choice, which silos people and > slashes through cross-community building. > * Search indexing which work(tm). Slack has had a long history of being > weak in this regard. > > > -- > J. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From capn.freako at gmail.com Thu Aug 27 02:16:55 2020 From: capn.freako at gmail.com (David Banas) Date: Wed, 26 Aug 2020 17:16:55 -0700 Subject: [Agda] 2 tips for my fellow Agda newbies Message-ID: 1. Always using extended lambda syntax (i.e. - \{ ... -> ... }) seems to make the Emacs mode interactive goal solving assistant more capable. 2. `C-c C-c` works not only for case expansion, but also for single term expansion. For instance, it will expand "\{ x -> ... }" to "\{ < foo , bar > -> ...}", when appropriate (i.e. - when x is an existential or product). (Very helpful when first learning existentials.) -db -------------- next part -------------- An HTML attachment was scrubbed... URL: From victor at lopezjuan.com Thu Aug 27 11:55:39 2020 From: victor at lopezjuan.com (=?UTF-8?Q?V=c3=adctor_L=c3=b3pez_Juan?=) Date: Thu, 27 Aug 2020 11:55:39 +0200 Subject: [Agda] Uniqueness [Was: Re: Hanging out with the Lean crowd] In-Reply-To: <2541e179-10f6-b068-8c04-390bcc22c9ea@inria.fr> References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> <2541e179-10f6-b068-8c04-390bcc22c9ea@inria.fr> Message-ID: Den 2020-08-25 kl. 15:36, skrev Neel Krishnaswami: > > I didn't know that solutions remained unique even if you solved > constraints lazily. Is there a reference for this? Den 2020-08-25 kl. 14:54, skrev Fr?d?ric Blanqui: > > Le 25/08/2020 ? 12:49, Andr?s Kov?cs a ?crit?: >> Fr?d?ric: by solving only pattern unification problems, which have >> definitionaly unique solutions, > > Could you provide a reference please? A good one would be Jason Reed's 2009 paper [1], which shows this for the ?? calculus. Andreas Abel and Brigitte Pientka generalize it to the ??? calculus [2]. [1]: https://www.cs.cmu.edu/~jcreed/papers/lfmtp2009.pdf [2]: https://link.springer.com/chapter/10.1007/978-3-642-21691-6_5 From Thorsten.Altenkirch at nottingham.ac.uk Fri Aug 28 11:22:10 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 28 Aug 2020 09:22:10 +0000 Subject: [Agda] Overloaded constructor trouble Message-ID: Ok, let?s say I want to show that suc is injective: open import Relation.Binary.PropositionalEquality open import Data.Nat inj-suc : {m n : ?} ? suc m ? suc n ? m ? n inj-suc = {!!} So far so good but at some point I decide to use Fin as well. open import Relation.Binary.PropositionalEquality open import Data.Nat open import Data.Fin inj-suc : {m n : ?} ? suc m ? suc n ? m ? n inj-suc = {!!} But now things get yellow ? Ok agda cannot infer which suc I want to use, even though only one actually works. This is annoying, especially if you are writing a book and are reluctant to write inj-suc : {m n : ?} ? _?_ {A = ?} (suc m) (suc n) ? m ? n inj-suc = {!!} instead (this is ugly). I have two questions: are there any good workarounds? And is there a way to fix it? Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thiemann at informatik.uni-freiburg.de Fri Aug 28 11:27:58 2020 From: thiemann at informatik.uni-freiburg.de (Peter Thiemann) Date: Fri, 28 Aug 2020 11:27:58 +0200 Subject: [Agda] Overloaded constructor trouble In-Reply-To: References: Message-ID: Hi Thorsten, modules are your friend, again. module _ where ? open import Data.Nat (suc) ? inj-suc : {m n : ?} ? suc m ? suc n ? m ? n ? inj-suc = {!!}? or you just open Fin for the definitions where you need it. -Peter PS I ran into this issue when using ==-Reasoning and ~=-Reasoning in the same module On 28. August 2020 at 11:22:30, Thorsten Altenkirch (thorsten.altenkirch at nottingham.ac.uk) wrote: > Ok, let?s say I want to show that suc is injective: > > open import Relation.Binary.PropositionalEquality > open import Data.Nat > > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > inj-suc = {!!} > > So far so good but at some point I decide to use Fin as well. > > open import Relation.Binary.PropositionalEquality > open import Data.Nat > open import Data.Fin > > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > inj-suc = {!!} > > But now things get yellow ? Ok agda cannot infer which suc I want to use, even though only > one actually works. > > This is annoying, especially if you are writing a book and are reluctant to write > > inj-suc : {m n : ?} ? _?_ {A = ?} (suc m) (suc n) ? m ? n > inj-suc = {!!} > > instead (this is ugly). > > I have two questions: are there any good workarounds? And is there a way to fix it? > > Cheers, > Thorsten > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From ulf.norell at gmail.com Fri Aug 28 11:32:19 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Fri, 28 Aug 2020 11:32:19 +0200 Subject: [Agda] Overloaded constructor trouble In-Reply-To: References: Message-ID: The nicer way to disambiguate is inj-suc : {m n : ?} ? ?.suc m ? suc n ? m ? n inj-suc = {!!} / Ulf On Fri, Aug 28, 2020 at 11:28 AM Peter Thiemann < thiemann at informatik.uni-freiburg.de> wrote: > Hi Thorsten, > > modules are your friend, again. > > module _ where > open import Data.Nat (suc) > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > inj-suc = {!!} > > or you just open Fin for the definitions where you need it. > > -Peter > > PS I ran into this issue when using ==-Reasoning and ~=-Reasoning in the > same module > > > On 28. August 2020 at 11:22:30, Thorsten Altenkirch ( > thorsten.altenkirch at nottingham.ac.uk) wrote: > > Ok, let?s say I want to show that suc is injective: > > > > open import Relation.Binary.PropositionalEquality > > open import Data.Nat > > > > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > > inj-suc = {!!} > > > > So far so good but at some point I decide to use Fin as well. > > > > open import Relation.Binary.PropositionalEquality > > open import Data.Nat > > open import Data.Fin > > > > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > > inj-suc = {!!} > > > > But now things get yellow ? Ok agda cannot infer which suc I want to > use, even though only > > one actually works. > > > > This is annoying, especially if you are writing a book and are reluctant > to write > > > > inj-suc : {m n : ?} ? _?_ {A = ?} (suc m) (suc n) ? m ? n > > inj-suc = {!!} > > > > instead (this is ugly). > > > > I have two questions: are there any good workarounds? And is there a way > to fix it? > > > > Cheers, > > Thorsten > > > > > > > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please contact the sender and delete the email and > > attachment. > > > > Any views or opinions expressed by the author of this email do not > > necessarily reflect the views of the University of Nottingham. Email > > communications with the University of Nottingham may be monitored > > where permitted by law. > > > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Fri Aug 28 11:34:33 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 28 Aug 2020 09:34:33 +0000 Subject: [Agda] Overloaded constructor trouble In-Reply-To: References: Message-ID: Thank you, but I don't think this works for me. I need the definitions in various places. Thorsten ?On 28/08/2020, 10:28, "Peter Thiemann" wrote: Hi Thorsten, modules are your friend, again. module _ where open import Data.Nat (suc) inj-suc : {m n : ?} ? suc m ? suc n ? m ? n inj-suc = {!!} or you just open Fin for the definitions where you need it. -Peter PS I ran into this issue when using ==-Reasoning and ~=-Reasoning in the same module On 28. August 2020 at 11:22:30, Thorsten Altenkirch (thorsten.altenkirch at nottingham.ac.uk) wrote: > Ok, let?s say I want to show that suc is injective: > > open import Relation.Binary.PropositionalEquality > open import Data.Nat > > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > inj-suc = {!!} > > So far so good but at some point I decide to use Fin as well. > > open import Relation.Binary.PropositionalEquality > open import Data.Nat > open import Data.Fin > > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > inj-suc = {!!} > > But now things get yellow ? Ok agda cannot infer which suc I want to use, even though only > one actually works. > > This is annoying, especially if you are writing a book and are reluctant to write > > inj-suc : {m n : ?} ? _?_ {A = ?} (suc m) (suc n) ? m ? n > inj-suc = {!!} > > instead (this is ugly). > > I have two questions: are there any good workarounds? And is there a way to fix it? > > Cheers, > Thorsten > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From frederic.blanqui at inria.fr Fri Aug 28 14:24:54 2020 From: frederic.blanqui at inria.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCbGFucXVp?=) Date: Fri, 28 Aug 2020 14:24:54 +0200 Subject: [Agda] Uniqueness [Was: Re: Hanging out with the Lean crowd] In-Reply-To: References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> <2541e179-10f6-b068-8c04-390bcc22c9ea@inria.fr> Message-ID: <2f3f3c0c-089d-d500-c649-8e705e33f672@inria.fr> Thank you for these references. However, if I understand correctly, in both cases, it is about unification in LF modulo beta, eta and projections only. So, this does not include user recursive definitions... Le 27/08/2020 ? 11:55, V?ctor L?pez Juan a ?crit?: > Den 2020-08-25 kl. 15:36, skrev Neel Krishnaswami: > > > > I didn't know that solutions remained unique even if you solved > > constraints lazily. Is there a reference for this? > > Den 2020-08-25 kl. 14:54, skrev Fr?d?ric Blanqui: >> >> Le 25/08/2020 ? 12:49, Andr?s Kov?cs a ?crit?: >>> Fr?d?ric: by solving only pattern unification problems, which have >>> definitionaly unique solutions, >> >> Could you provide a reference please? > > A good one would be Jason Reed's 2009 paper [1], which shows this for > the ?? calculus. > Andreas Abel and Brigitte Pientka generalize it to the ??? calculus [2]. > > [1]: https://www.cs.cmu.edu/~jcreed/papers/lfmtp2009.pdf > [2]: https://link.springer.com/chapter/10.1007/978-3-642-21691-6_5 From capn.freako at gmail.com Fri Aug 28 15:11:22 2020 From: capn.freako at gmail.com (David Banas) Date: Fri, 28 Aug 2020 06:11:22 -0700 Subject: [Agda] A philosophical question on absurd. Message-ID: Hi all, I'm brand new to Agda and the Curry-Howard isomorphism (and really loving this new exploration of both!), and I have a *philosophical* objection to how the *absurd* function is used to generate whatever we need to complete a proof. I understand how we are able to satisfy the Agda compiler with the definition of *absurd*; my objection isn't mechanical/technical. What bothers me is a feeling that I'm "cheating" when I use this function that can never be called, in order to "produce" that which I need to complete my proof. I wonder if someone could offer a different perspective on this, for consideration. Thanks! -db -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Fri Aug 28 15:28:50 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Fri, 28 Aug 2020 15:28:50 +0200 Subject: [Agda] A philosophical question on absurd. In-Reply-To: References: Message-ID: Hi, I'm by no means an expert, but it seems to me that this "computational emptyness" of absurd is just corresponding to the fact that in constructive logic, you can't have proof by contradiction, only proof of negation. That is, at the end absurd will always prove a negation. It has type _|_ -> A for some A. You will never be able to construct an A with absurd, only ever its negation. Manuel On 28.08.20 15:11, David Banas wrote: > Hi all, > > I'm brand new to Agda and the Curry-Howard isomorphism (and really > loving this new exploration of both!), and I have a /philosophical/ > objection to how the *absurd* function is used to generate whatever we > need to complete a proof. > > I understand how we are able to satisfy the Agda compiler with the > definition of *absurd*; my objection isn't mechanical/technical. > > What bothers me is a feeling that I'm "cheating" when I use this > function that can never be called, in order to "produce" that which I > need to complete my proof. > > I wonder if someone could offer a different perspective on this, for > consideration. > > Thanks! > -db > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.pouillard+agda at gmail.com Fri Aug 28 16:05:34 2020 From: nicolas.pouillard+agda at gmail.com (Nicolas Pouillard) Date: Fri, 28 Aug 2020 16:05:34 +0200 Subject: [Agda] A philosophical question on absurd. In-Reply-To: References: Message-ID: Hi, One way to understand that you are not cheating when you pass an argument to *absurd *is to realise that this piece of code is already unreachable. Syntactically it seems that one could reach this part of the code with input values. However the whole system is designed such that it is not possible. Nicolas On Fri, Aug 28, 2020 at 3:29 PM Manuel B?renz wrote: > Hi, > > I'm by no means an expert, but it seems to me that this "computational > emptyness" of absurd is just corresponding to the fact that in constructive > logic, you can't have proof by contradiction, only proof of negation. That > is, at the end absurd will always prove a negation. It has type _|_ -> A > for some A. You will never be able to construct an A with absurd, only ever > its negation. > > Manuel > On 28.08.20 15:11, David Banas wrote: > > Hi all, > > I'm brand new to Agda and the Curry-Howard isomorphism (and really loving > this new exploration of both!), and I have a *philosophical* objection to > how the *absurd* function is used to generate whatever we need to > complete a proof. > > I understand how we are able to satisfy the Agda compiler with the > definition of *absurd*; my objection isn't mechanical/technical. > > What bothers me is a feeling that I'm "cheating" when I use this function > that can never be called, in order to "produce" that which I need to > complete my proof. > > I wonder if someone could offer a different perspective on this, for > consideration. > > Thanks! > -db > > > _______________________________________________ > Agda mailing listAgda at lists.chalmers.sehttps://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.stucki at gmail.com Fri Aug 28 16:15:49 2020 From: sandro.stucki at gmail.com (Sandro Stucki) Date: Fri, 28 Aug 2020 16:15:49 +0200 Subject: [Agda] A philosophical question on absurd. In-Reply-To: References: Message-ID: Hi David, I can offer a few perspectives. Whether or not you find them convincing will depend on your prior beliefs. (BTW, I assume that your definition of "absurd" is similar to the one in Haskell's Data.Void or that of ?-elim from the Data.Empty module in the Agda stdlib) First, if you already believe that the Curry-Howard isomorphism is true, then the logical interpretation of ?-elim is just that anything follows from falsehood (aka, the explosion principle, or "ex falso quodlibet") which is an important principle of both classical and intuitionistic logic. See e.g. https://en.wikipedia.org/wiki/Principle_of_explosion But that's not very convincing if you're trying to justify Curry-Howard rather than taking it at face value. The second perspective is set-theoretic. If you believe that lambda terms can be interpreted (at least intuitively) as set-theoretic functions, then "?-elim {A}" is a function from the empty set to some arbitrary set A. Since set-theoretic functions are relations mapping every element in their domain to exactly one element in their codomain, ?-elim is simply the empty relation. There are no elements in the domain, so no mapping is required. This is true no matter what the codomain A is. A similar perspective is to interpret "?-elim {A}" as a proof of the predicate "? x ? ?. A(x)", which holds vacuously, simply because the "set" ? is empty so A(x) trivially holds for all elements of ?. Finally, if you are a fan of category theory and you believe in the last part of the Curry-Howard-Lambek correspondence, then ? has the property of being initial (in some suitably chosen bicartesian-closed category) and hence there is a unique morphism from ? to any Object A. Hope that helps /Sandro On Fri, Aug 28, 2020 at 3:12 PM David Banas wrote: > > Hi all, > > I'm brand new to Agda and the Curry-Howard isomorphism (and really loving this new exploration of both!), and I have a philosophical objection to how the absurd function is used to generate whatever we need to complete a proof. > > I understand how we are able to satisfy the Agda compiler with the definition of absurd; my objection isn't mechanical/technical. > > What bothers me is a feeling that I'm "cheating" when I use this function that can never be called, in order to "produce" that which I need to complete my proof. > > I wonder if someone could offer a different perspective on this, for consideration. > > Thanks! > -db > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Thorsten.Altenkirch at nottingham.ac.uk Fri Aug 28 17:08:19 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 28 Aug 2020 15:08:19 +0000 Subject: [Agda] A philosophical question on absurd. In-Reply-To: References: Message-ID: <5FE99624-23C0-4B16-9040-6BA43932A7AD@nottingham.ac.uk> The absurdity of absurd doesn?t only show up in the propositions-as-types explanation. Even purely logical the bottom elimination rule has the same counterintuitive property: ex falso quod libet, from false follows everything. The issue is rather linguistic in nature there isn?t really a counterpart to False in natural language. In my logic course I explained that False should be translated as ?pigs can fly?. This also explains the definition of ?not P? as ?P -> False?. I used the following example: if a girl wants to say ?I am not going to marry you?, she could say ?If I am going to marry you then pigs can fly?. It means no. ? Thorsten From: Agda on behalf of David Banas Date: Friday, 28 August 2020 at 14:12 To: Agda mailing list Subject: [Agda] A philosophical question on absurd. Hi all, I'm brand new to Agda and the Curry-Howard isomorphism (and really loving this new exploration of both!), and I have a philosophical objection to how the absurd function is used to generate whatever we need to complete a proof. I understand how we are able to satisfy the Agda compiler with the definition of absurd; my objection isn't mechanical/technical. What bothers me is a feeling that I'm "cheating" when I use this function that can never be called, in order to "produce" that which I need to complete my proof. I wonder if someone could offer a different perspective on this, for consideration. Thanks! -db This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lehmann at tet.tu-berlin.de Fri Aug 28 17:32:38 2020 From: lehmann at tet.tu-berlin.de (Marcus Christian Lehmann) Date: Fri, 28 Aug 2020 17:32:38 +0200 Subject: [Agda] multiple instance resolution and negation Message-ID: <1a896686-b1a9-e2fc-4199-912e1e21adff@tet.tu-berlin.de> Dear Agda community, Is there a possibility to make instances like ? i1 : {{ a : A }} ? ? ? i2 : {{ b : B }} ? ? ? i3 : {{ c : C }} ? ? unambiguous in an instance resolution? CONTEXT: I am investigating on the usefulness of instance arguments for partial functions such as the positive square root function. In this particular example, the square root function takes as an additional argument a proof that the argument is nonnegative: ? sqrt : (x : X) ? {{p : (0? ? x)}} ? X When _?_ is defined in terms of _<_ and ? as ? _?_ : X ? X ? Set ?' ? a ? b = (b < a) ? ? then Agda complains that ? "Instance arguments with explicit arguments are never considered by" ? "instance search, so having an instance argument ? p : 0? ? x ? has" ? "no effect." ? "when checking that the expression ? p : 0? ? x ? ? X is a type" I came up with a different definition ? _??_ : X ? X ? Set ?' ? a ?? b = {{p : b < a}} ? ? that works on ? sqrt : (x : X) ? {{p : (0? ?? x)}} ? X when used like so: ? inst-? : ?{?} {A : Set ?} ? (A ? ?) ? {{a : A}} ? ? ? inst-? f {{a}} = f a ? test1 : (x : X) ? (0? ? x) ? X ? test1 x 0?x = let instance _ = inst-? 0?x ??????????????? in sqrt x -- works! but when multiple instances are in scope ? test2 : (x y z : X) ? (0? ? x) ? (0? ? y) ? (0? ? z) ? X ? test2 x y z 0?x 0?y 0?z = ??? let instance 0?x? : 0? ?? x ???????????????? 0?x? = inst-? 0?x ???????????????? 0?y? : 0? ?? y ???????????????? 0?y? = inst-? 0?y ???????????????? 0?z? : 0? ?? z ???????????????? 0?z? = inst-? 0?z ??? -- Goal: X ??? -- Have: ? p : 0? ?? x ? ? X ??? in sqrt y -- error! then Agda complains: ? _p_51 : 0? ?? y ? errorFailed to solve the following constraints: ??? Resolve instance argument ????? _p_51 ??????? : {? = ?? : Agda.Primitive.Level} {?' = ?'' : Agda.Primitive.Level} ????????? (X? : Set ??) (0?? : X?) (_ References: <5FE99624-23C0-4B16-9040-6BA43932A7AD@nottingham.ac.uk> Message-ID: On 28/08/2020 16:08, Thorsten Altenkirch wrote: > from false follows everything It might be (a little) better to say that *anything* whatever holds of an inhabitant of False. With a universe, or large elimination we can define a type-valued function Anything(x) : Type (x : False). Then the "strong" eliminator for False gives us (Pi x : False) Anything(x) Hank From capn.freako at gmail.com Fri Aug 28 18:07:53 2020 From: capn.freako at gmail.com (David Banas) Date: Fri, 28 Aug 2020 09:07:53 -0700 Subject: [Agda] A philosophical question on absurd. In-Reply-To: References: Message-ID: Ah, thank you; that helps. Sort of a back-propagation of absurdity, as it were? If something is calling absurd, then it must be absurd, as well; is that it? Thanks! -db > On Aug 28, 2020, at 7:05 AM, Nicolas Pouillard wrote: > > Hi, > > One way to understand that you are not cheating when you pass an argument to absurd is to realise that this piece of code is already unreachable. > Syntactically it seems that one could reach this part of the code with input values. However the whole system is designed such that it is not possible. > > Nicolas > > On Fri, Aug 28, 2020 at 3:29 PM Manuel B?renz > wrote: > Hi, > > I'm by no means an expert, but it seems to me that this "computational emptyness" of absurd is just corresponding to the fact that in constructive logic, you can't have proof by contradiction, only proof of negation. That is, at the end absurd will always prove a negation. It has type _|_ -> A for some A. You will never be able to construct an A with absurd, only ever its negation. > > Manuel > > On 28.08.20 15:11, David Banas wrote: >> Hi all, >> >> I'm brand new to Agda and the Curry-Howard isomorphism (and really loving this new exploration of both!), and I have a philosophical objection to how the absurd function is used to generate whatever we need to complete a proof. >> >> I understand how we are able to satisfy the Agda compiler with the definition of absurd; my objection isn't mechanical/technical. >> >> What bothers me is a feeling that I'm "cheating" when I use this function that can never be called, in order to "produce" that which I need to complete my proof. >> >> I wonder if someone could offer a different perspective on this, for consideration. >> >> Thanks! >> -db >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From capn.freako at gmail.com Fri Aug 28 18:15:18 2020 From: capn.freako at gmail.com (David Banas) Date: Fri, 28 Aug 2020 09:15:18 -0700 Subject: [Agda] A philosophical question on absurd. In-Reply-To: References: Message-ID: Sorry, I just realized that I sent that last message w/o any context. Here is what I was replying to: > Hi, > > One way to understand that you are not cheating when you pass an argument to absurd is to realise that this piece of code is already unreachable. > Syntactically it seems that one could reach this part of the code with input values. However the whole system is designed such that it is not possible. > > Nicolas Thanks to all, who took time to respond! This really is a wonderfully engaging community. :) -db > On Aug 28, 2020, at 9:07 AM, David Banas wrote: > > Ah, thank you; that helps. > Sort of a back-propagation of absurdity, as it were? > If something is calling absurd, then it must be absurd, as well; is that it? > > Thanks! > -db > > >> On Aug 28, 2020, at 7:05 AM, Nicolas Pouillard > wrote: >> >> Hi, >> >> One way to understand that you are not cheating when you pass an argument to absurd is to realise that this piece of code is already unreachable. >> Syntactically it seems that one could reach this part of the code with input values. However the whole system is designed such that it is not possible. >> >> Nicolas >> >> On Fri, Aug 28, 2020 at 3:29 PM Manuel B?renz > wrote: >> Hi, >> >> I'm by no means an expert, but it seems to me that this "computational emptyness" of absurd is just corresponding to the fact that in constructive logic, you can't have proof by contradiction, only proof of negation. That is, at the end absurd will always prove a negation. It has type _|_ -> A for some A. You will never be able to construct an A with absurd, only ever its negation. >> >> Manuel >> >> On 28.08.20 15:11, David Banas wrote: >>> Hi all, >>> >>> I'm brand new to Agda and the Curry-Howard isomorphism (and really loving this new exploration of both!), and I have a philosophical objection to how the absurd function is used to generate whatever we need to complete a proof. >>> >>> I understand how we are able to satisfy the Agda compiler with the definition of absurd; my objection isn't mechanical/technical. >>> >>> What bothers me is a feeling that I'm "cheating" when I use this function that can never be called, in order to "produce" that which I need to complete my proof. >>> >>> I wonder if someone could offer a different perspective on this, for consideration. >>> >>> Thanks! >>> -db >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lehmann at tet.tu-berlin.de Sat Aug 29 13:50:21 2020 From: lehmann at tet.tu-berlin.de (Marcus Christian Lehmann) Date: Sat, 29 Aug 2020 13:50:21 +0200 Subject: [Agda] multiple instance resolution and negation In-Reply-To: <1a896686-b1a9-e2fc-4199-912e1e21adff@tet.tu-berlin.de> References: <1a896686-b1a9-e2fc-4199-912e1e21adff@tet.tu-berlin.de> Message-ID: <2df5b188-4fb8-fdff-7d8f-750e4d4cb0ab@tet.tu-berlin.de> For everyone with a similar problem: I found that using an identity function `!_` declared in an `abstract` block ? abstract ??? !_ : ?{?} {X : Type ?} ? X ? X ??? ! x = x does the trick of "blocking" Agda's instance inspection. Within that `abstract` block it is possible to proof ? !-? : ?{?} {X : Type ?} ? (! X) ? X ? !-? = refl which can be used to define ? !!_ : ?{?} {X : Type ?} ? X ? ! X ? !!_ {X = X} x = transport (sym (!-? {X = X})) x I've assembled a minimal example how this works and I hope this instance resolution behavior does not change in the future. kind regards, Christian EXAMPLE: {-# OPTIONS --cubical --no-import-sorts #-} module Test3 where open import Cubical.Foundations.Everything renaming (_?? to _???; assoc to ?-assoc) open import Cubical.Foundations.Logic abstract ? !_ : ?{?} {X : Type ?} ? X ? X ? ! x = x ? !-? : ?{?} {X : Type ?} ? (! X) ? X ? !-? = refl -- makes use of the definition of `!_` within this block ? !!_ : ?{?} {X : Type ?} ? X ? ! X ? !!_ {X = X} x = transport (sym (!-? {X = X})) x ? !!??_ : ?{?} {X : Type ?} ? ! X ? X ? !!??_ {X = X} x = transport (!-? {X = X}) x ? infix 1 !_ ? infix 1 !!_ ? infix 1 !!??_ -- !-?' : ?{?} {X : Type ?} ? (! X) ? X -- !-?' = refl -- cannot make use of the definition of `!_` anymore hPropRel : ? {?} (A B : Type ?) (?' : Level) ? Type (?-max ? (?-suc ?')) hPropRel A B ?' = A ? B ? hProp ?' module TestB {? ?'} (X : Type ?) ???????????? (0? : X) (_+_ _?_ : X ? X ? X) (_<_ : hPropRel X X ?') ???????????? (let infixl 5 _+_; _+_ = _+_) where ? _?_ : hPropRel X X ?' ? x ? y = ?(y < x) ? postulate ??? sqrt : (x : X) ? {{ ! [ 0? ? x ] }} ? X ??? 0?x? : ? x ? [ 0? ? (x ? x) ] ? instance -- module-scope instances ??? _ = ? {x} ? !! 0?x? x ? test4 : (x y z : X) ? [ 0? ? x ] ? [ 0? ? y ] ? X ? test4 x y z 0?x 0?y = ??? let instance -- let-scope instances ????????? _ = !! 0?x ????????? _ = !! 0?y ????????? _ = !! 0?x? x -- preferred over the instance from module-scope ??? in ( (sqrt x)?????? -- works ?????? + (sqrt y)?????? -- also works ?????? + (sqrt (z ? z)) -- uses instance from module scope ?????? + (sqrt (x ? x)) -- uses instance from let-scope (?) ?????? ) From guillaume.brunerie at gmail.com Sat Aug 29 14:34:19 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Sat, 29 Aug 2020 14:34:19 +0200 Subject: [Agda] multiple instance resolution and negation In-Reply-To: <2df5b188-4fb8-fdff-7d8f-750e4d4cb0ab@tet.tu-berlin.de> References: <1a896686-b1a9-e2fc-4199-912e1e21adff@tet.tu-berlin.de> <2df5b188-4fb8-fdff-7d8f-750e4d4cb0ab@tet.tu-berlin.de> Message-ID: Hi Marcus, A better way of preventing a definition to reduce is to use a record: record NonNegative (x : X) : Set where constructor NonNegative-in field NonNegative-out : 0 ? x This way you get that `NonNegative x` does not reduce to anything, so you can use it as an instance argument without issues, but at the same time it is still equivalent to `0 ? x` via the two functions NonNegative-in and NonNegative-out (which are definitionally inverse to each other). You could also directly define _?_ as a record whose only field has the definition you currently have as its type, so that it doesn?t reduce to a function type (although I have a feeling that a more specialized type class like NonNegative might be better). Best, Guillaume Den l?r 29 aug. 2020 kl 13:50 skrev Marcus Christian Lehmann : > > For everyone with a similar problem: > > I found that using an identity function `!_` declared in an `abstract` block > > abstract > !_ : ?{?} {X : Type ?} ? X ? X > ! x = x > > does the trick of "blocking" Agda's instance inspection. Within that > `abstract` block it is possible to proof > > !-? : ?{?} {X : Type ?} ? (! X) ? X > !-? = refl > > which can be used to define > > !!_ : ?{?} {X : Type ?} ? X ? ! X > !!_ {X = X} x = transport (sym (!-? {X = X})) x > > I've assembled a minimal example how this works and I hope this instance > resolution behavior does not change in the future. > > kind regards, > Christian > > EXAMPLE: > > {-# OPTIONS --cubical --no-import-sorts #-} > > module Test3 where > > open import Cubical.Foundations.Everything renaming (_?? to _???; assoc > to ?-assoc) > open import Cubical.Foundations.Logic > > abstract > !_ : ?{?} {X : Type ?} ? X ? X > ! x = x > > !-? : ?{?} {X : Type ?} ? (! X) ? X > !-? = refl -- makes use of the definition of `!_` within this block > > !!_ : ?{?} {X : Type ?} ? X ? ! X > !!_ {X = X} x = transport (sym (!-? {X = X})) x > > !!??_ : ?{?} {X : Type ?} ? ! X ? X > !!??_ {X = X} x = transport (!-? {X = X}) x > > infix 1 !_ > infix 1 !!_ > infix 1 !!??_ > > -- !-?' : ?{?} {X : Type ?} ? (! X) ? X > -- !-?' = refl -- cannot make use of the definition of `!_` anymore > > hPropRel : ? {?} (A B : Type ?) (?' : Level) ? Type (?-max ? (?-suc ?')) > hPropRel A B ?' = A ? B ? hProp ?' > > module TestB {? ?'} (X : Type ?) > (0? : X) (_+_ _?_ : X ? X ? X) (_<_ : hPropRel X X ?') > (let infixl 5 _+_; _+_ = _+_) where > > _?_ : hPropRel X X ?' > x ? y = ?(y < x) > > postulate > sqrt : (x : X) ? {{ ! [ 0? ? x ] }} ? X > 0?x? : ? x ? [ 0? ? (x ? x) ] > > instance -- module-scope instances > _ = ? {x} ? !! 0?x? x > > test4 : (x y z : X) ? [ 0? ? x ] ? [ 0? ? y ] ? X > test4 x y z 0?x 0?y = > let instance -- let-scope instances > _ = !! 0?x > _ = !! 0?y > _ = !! 0?x? x -- preferred over the instance from module-scope > in ( (sqrt x) -- works > + (sqrt y) -- also works > + (sqrt (z ? z)) -- uses instance from module scope > + (sqrt (x ? x)) -- uses instance from let-scope (?) > ) > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From lehmann at tet.tu-berlin.de Sat Aug 29 16:00:11 2020 From: lehmann at tet.tu-berlin.de (Marcus Christian Lehmann) Date: Sat, 29 Aug 2020 16:00:11 +0200 Subject: [Agda] multiple instance resolution and negation In-Reply-To: References: <1a896686-b1a9-e2fc-4199-912e1e21adff@tet.tu-berlin.de> <2df5b188-4fb8-fdff-7d8f-750e4d4cb0ab@tet.tu-berlin.de> Message-ID: Dear Guillaume, Am 29.08.20 um 14:34 schrieb Guillaume Brunerie: > A better way of preventing a definition to reduce is to use a record: > ... > This way you get that `NonNegative x` does not reduce to anything, ... Thank you for pointing that out! I was wondering about this behavior on a different occasion already. > ... so you can use it as an instance argument without issues, ... I have successfully tried out your recommendation with ? record !_ {?} (X : Type ?) : Type ? where ??? inductive ??? constructor !!_ ??? field x : X ? open !_ hiding (x) ? infix 1 !!_ ? infix 1 !_ for which I can affirm that the the previous code still compiles without any changes! (nice!) > but at the same time it is still equivalent to `0 ? x` via the two functions > NonNegative-in and NonNegative-out (which are definitionally inverse > to each other). Yes. One easily gets these three to hold ? !-iso?? : ?{?} {X : Type ?} ? Iso (! X)?? X ? !-????? : ?{?} {X : Type ?} ????? (! X) ? X ? !-equiv : ?{?} {X : Type ?} ????? (! X) ? X > You could also directly define _?_ as a record whose only field has > the definition you currently have as its type, so that it doesn?t > reduce to a function type (although I have a feeling that a more > specialized type class like NonNegative might be better). Well, I like the annotation-like general way since it does not makes necessary to come up with new names for each property. But this might break in some application where a more explicit fallback might be needed. I'll settle for this variant for now and investigate its usefulness over time. kind regards, Christian updated EXAMPLE: {-# OPTIONS --cubical --no-import-sorts #-} module Test4 where open import Cubical.Foundations.Everything renaming (_?? to _???; assoc to ?-assoc) open import Cubical.Foundations.Logic open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv record !_ {?} (X : Type ?) : Type ? where ? inductive ? constructor !!_ ? field x : X open !_ hiding (x) infix 1 !!_ infix 1 !_ ? !-iso : ?{?} {X : Type ?} ? Iso (! X) X ? Iso.fun????? !-iso = !_.x ? Iso.inv????? !-iso = !!_ ? Iso.rightInv !-iso = ?????? x? ? refl ? Iso.leftInv? !-iso = ?{ (!! x) ? refl } ? !-? : ?{?} {X : Type ?} ? (! X) ? X ? !-? {X = X} = isoToPath !-iso ? !-equiv : ?{?} {X : Type ?} ? (! X) ? X ? !-equiv = !_.x , ? where .equiv-proof x ? ((!! x) , refl) , ?{ ((!! y) , p) ? ? i ? (!! p (~ i)) , (? j ? p (~ i ? j)) } hPropRel : ? {?} (A B : Type ?) (?' : Level) ? Type (?-max ? (?-suc ?')) hPropRel A B ?' = A ? B ? hProp ?' module TestB {? ?'} (X : Type ?) ???????????? (0? : X) (_+_ _?_ : X ? X ? X) (_<_ : hPropRel X X ?') ???????????? (let infixl 5 _+_; _+_ = _+_) where ? _?_ : hPropRel X X ?' ? x ? y = ?(y < x) ? postulate ??? sqrt : (x : X) ? {{ ! [ 0? ? x ] }} ? X ??? 0?x? : ? x ? [ 0? ? (x ? x) ] ? instance -- module-scope instances ??? _ = ? {x} ? !! 0?x? x ? test4 : (x y z : X) ? [ 0? ? x ] ? [ 0? ? y ] ? X ? test4 x y z 0?x 0?y = ??? let instance -- let-scope instances ????????? _ = !! 0?x ????????? _ = !! 0?y ????????? _ = !! 0?x? x -- preferred over the instance from module-scope ??? in ( (sqrt x)?????? -- works ?????? + (sqrt y)?????? -- also works ?????? + (sqrt (z ? z)) -- uses instance from module scope ?????? + (sqrt (x ? x)) -- uses instance from let-scope (?) ?????? ) From mechvel at scico.botik.ru Sat Aug 29 23:26:08 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 30 Aug 2020 00:26:08 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> Message-ID: <23b29b65108df92bd36d81a37d8ffa7c@scico.botik.ru> On 2020-08-23 00:21, mechvel at scico.botik.ru wrote: > Guillaume, > > thank you for explaining things in simple words. > > On 2020-08-22 18:21, Guillaume Brunerie wrote: >> [..] > >> Not that there is anything wrong with that, you are free to believe >> whatever you want, but I still find it a bit strange to >> unconditionally accept the existence of infinite sets given that our >> entire experience of life is finite. >> [..] Personally, I somehow believe in platonism, in that it is set independently of our knowledge for each statement and each interpretation of whether it is true there or not, that, in particular, all this is solved somewhere for infinite objects. But this is only a belief. And it is a strong assumption. So that if something can be proved without using excluded middle, it is desirable to do this. Also everyone will agree with that existence proof + algorithm to construct the corresponding object is essentially more than only an abstract existence proof. Regards, -- SM From mechvel at scico.botik.ru Sat Aug 29 23:44:28 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 30 Aug 2020 00:44:28 +0300 Subject: [Agda] Hanging out with the Lean crowd In-Reply-To: <23b29b65108df92bd36d81a37d8ffa7c@scico.botik.ru> References: <2b82eeee-bc5e-7780-a9c3-5d153979858b@cs.bham.ac.uk> <6618641c03d781cc471a8385e4135cce@scico.botik.ru> <8ab872a7-43e8-70e0-53ec-27a772dc483a@cs.bham.ac.uk> <842cc58d57a46a85d619d0423d18fd79@scico.botik.ru> <6e3a6433-8f70-445b-d645-a7ae306ce747@cs.bham.ac.uk> <9227dc6c534c24e6561bea70f48cfe7b@scico.botik.ru> <23b29b65108df92bd36d81a37d8ffa7c@scico.botik.ru> Message-ID: <4bfd1c1ff1e02e4d045ad1c329090484@scico.botik.ru> On 2020-08-30 00:26, mechvel at scico.botik.ru wrote: > On 2020-08-23 00:21, mechvel at scico.botik.ru wrote: >> [..] > > So that if something can be proved without using excluded middle, it > is desirable to do this. I would also add: the results that can be proved without using excluded middle constitute may be 1/30 of essential results in mathematics. But this 1/30 is still a large piece. Regards, ------ Sergei From guillaume.allais at ens-lyon.org Sun Aug 30 13:52:57 2020 From: guillaume.allais at ens-lyon.org (G. Allais) Date: Sun, 30 Aug 2020 12:52:57 +0100 Subject: [Agda] Overloaded constructor trouble In-Reply-To: References: Message-ID: <43017417-9e33-b4cb-0a1a-d0d6b481fd32@ens-lyon.org> Hi Thorsten, Each inductive type declares its own module so you could manually disambiguate one of the `suc` to `?.suc`. Alternatively, knowing that overloaded constructors are disambiguated in a type-directed way you could add a type annotation using `_?_`. Finally you could wait until this feature request gets added to Agda: https://github.com/agda/agda/issues/3227 ================================================================= open import Data.Nat.Base open import Data.Fin.Base open import Function.Base open import Relation.Binary.PropositionalEquality inj-suc? : {m n : ?} ? ?.suc m ? suc n ? m ? n inj-suc? = {!!} inj-suc? : {m n : ?} ? (? ? suc m) ? suc n ? m ? n inj-suc? = {!!} ================================================================= Best, gallais On 28/08/2020 10:22, Thorsten Altenkirch wrote: > Ok, let?s say I want to show that suc is injective: > > open import Relation.Binary.PropositionalEquality > open import Data.Nat > > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > inj-suc = {!!} > > So far so good but at some point I decide to use Fin as well. > > open import Relation.Binary.PropositionalEquality > open import Data.Nat > open import Data.Fin > > inj-suc : {m n : ?} ? suc m ? suc n ? m ? n > inj-suc = {!!} > > But now things get yellow ? Ok agda cannot infer which suc I want to use, even though only one actually works. > > This is annoying, especially if you are writing a book and are reluctant to write > > inj-suc : {m n : ?} ? _?_ {A = ?} (suc m) (suc n) ? m ? n > inj-suc = {!!} > > instead (this is ugly). > > I have two questions: are there any good workarounds? And is there a way to fix it? > > Cheers, > Thorsten > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cguillaume.allais%40strath.ac.uk%7C057a1b476fa84199c4c008d84b33de71%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637342033433943838&sdata=kxkKQRwF50ix%2F8UdgoBjn8I00eDqR%2BZ3NH0v7bJftOc%3D&reserved=0 > From abela at chalmers.se Mon Aug 31 11:35:46 2020 From: abela at chalmers.se (Andreas Abel) Date: Mon, 31 Aug 2020 11:35:46 +0200 Subject: [Agda] BOPL / PPDP 2020 call for participation (register until 3 Sep) Message-ID: <51ac4735-3492-4616-d287-0f7a8644bfe6@chalmers.se> CALL FOR PARTICIPATION: BOPL 2020 Bologna Federated Conference on Programming Languages September 7-10, 2020 Online at https://bopl.cs.unibo.it Registration deadline: September 3, 2020 Registration fee: 30 euros. The Bologna Federated Conference on Programming Languages brings together four top level international conferences related to programming languages and software architectures: - PPDP: 22nd International Symposium on Principles and Practice of Declarative Programming - LOPSTR: 30th International Symposium on Logic-Based Program Synthesis and Transformation - WFLP: 28th International Workshop on Functional and Logic Programming - 3rd International Conference on Microservices 2020 The program will include a plenary talk by Jos? Meseguer and an industrial session with talks by representatives of leading companies. The overall program is available at https://bopl.cs.unibo.it/events. Due to the ongoing COVID-19 situation, BOPL 2020 will be held online. Please, refer to the attending page https://bopl.cs.unibo.it/attending.html for instructions concerning how to register and how to join the sessions of the conference. For any specific request please use the contact form at https://bopl.cs.unibo.it/contact. ------------------------------------------------------------------------------------------------------------ Publicity Chair of BOPL 2020 Stefano Pio Zingaro, PhD Dept. of Computer Science and Engineering Univ. of Bologna -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From victor at lopezjuan.com Mon Aug 31 11:44:02 2020 From: victor at lopezjuan.com (=?UTF-8?Q?V=c3=adctor_L=c3=b3pez_Juan?=) Date: Mon, 31 Aug 2020 11:44:02 +0200 Subject: [Agda] Uniqueness [Was: Re: Hanging out with the Lean crowd] In-Reply-To: <2f3f3c0c-089d-d500-c649-8e705e33f672@inria.fr> References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> <2541e179-10f6-b068-8c04-390bcc22c9ea@inria.fr> <2f3f3c0c-089d-d500-c649-8e705e33f672@inria.fr> Message-ID: <28eded53-3371-a4a2-1443-5ca1419d1b99@lopezjuan.com> Hi Fr?d?ric, I hope someone comes up with a better reference for this? As far as I know, there are two works which also address the issue of "recursive" functions on Booleans. - Adam Gundry's PhD thesis (?4.2.5, ?"Rigid-rigid decomposition"; see also Figure 4.12) [1], which considers the issue in a setting where terms are fully normalized, the recursor on Booleans is an eliminator, and terms contain twin variable annotations to facilitate dynamic pattern unification. - My own licentiate thesis (?4.5.8) [2], building upon the former and with a theory which is closer to Agda, but relies on inconsistent assumptions (Type : Type). The formulation of uniqueness (here, completeness of rules) is done using the usual judgmental equality. As noted, both differ somewhat from the variant MLTT used in Agda. I wish I could be of more help. But, do you have some way in mind in which user recursive definitions could affect uniqueness? ? V?ctor [1]: https://adam.gundry.co.uk/pub/thesis/thesis-2013-12-03.pdf#subsection.4.2.5 [2]: https://lopezjuan.com/project/licentiate/licentiate-printer.pdf#42 Den 2020-08-28 kl. 14:24, skrev Fr?d?ric Blanqui: > Thank you for these references. > > However, if I understand correctly, in both cases, it is about > unification in LF modulo beta, eta and projections only. So, this does > not include user recursive definitions... > > > Le 27/08/2020 ? 11:55, V?ctor L?pez Juan a ?crit?: >> Den 2020-08-25 kl. 15:36, skrev Neel Krishnaswami: >> > >> > I didn't know that solutions remained unique even if you solved >> > constraints lazily. Is there a reference for this? >> >> Den 2020-08-25 kl. 14:54, skrev Fr?d?ric Blanqui: >>> >>> Le 25/08/2020 ? 12:49, Andr?s Kov?cs a ?crit?: >>>> Fr?d?ric: by solving only pattern unification problems, which have >>>> definitionaly unique solutions, >>> >>> Could you provide a reference please? >> >> A good one would be Jason Reed's 2009 paper [1], which shows this for >> the ?? calculus. >> Andreas Abel and Brigitte Pientka generalize it to the ??? calculus [2]. >> >> [1]: https://www.cs.cmu.edu/~jcreed/papers/lfmtp2009.pdf >> [2]: https://link.springer.com/chapter/10.1007/978-3-642-21691-6_5 From mechvel at scico.botik.ru Mon Aug 31 14:48:12 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 31 Aug 2020 15:48:12 +0300 Subject: [Agda] strangely cannot reproduce a report Message-ID: <45212b72c3059f19ffe41e07663995f2@scico.botik.ru> People, Several times I observed a very strange effect. This time the code is ----------------------------------------- foo {pairs?} {pairs?'} pairs??pl?-pairs?' {p} {e} p,e?pairs = let pairs = map fromNZ-inFirst pairs?; pairs' = map fromNZ-inFirst pairs?' ((P , e') , P,e'?pairs? , p,e=?from-P,e') = ?-map? setoid?? setoid-CN p,e?pairs -- debug : Nonzero -- (1) -- debug = P p' = fromNZ P; (p?p' , e?e') = p,e=?from-P,e' (Q , Q,e'?pairs?' , P~Q) = pairs??pl?-pairs?' P,e'?pairs? -- (2) -- pairs??pl?-pairs?' {P} {e'} P,e'?pairs? -- (3) ... ... ------------------------------------------- Agda 2.6.1 (under emacs) (ghc 8.8.3) reports _snd_2297 : Subsetoid.Member (Submagma.subsetoid nzSubmagma) (proj? (proj? (proj?(Membership.find setoid?? (Data.List.Relation.Unary.Any.Properties.map? p,e?pairs))))) [ at /home/mechvel/inAgda/doconA/3.0/source/CancellativeSemiring-II.agda:675,33-51 ] for the line of (2). I guess that this is due to implicit arguments being not resolved for the function pairs??pl?-pairs?' in the line (2) (BTW: why Agda does not put any explaining humanly words to such reports?). All right, I insert there the implicits {P} {e'}, as in the line (3). Now it reports that P in the line (3) has a wrong type. ** A critical point. I am surprised, and insert the two debug lines (1), to check the resolved type of P. Now there start adventures. The whole file is type-checked! Then, remove the "debug" lines - and it again is type-checked! Then I return to the variant of the line (2), obtain the unsolved-like report, insert there implicit arguments, as in the line (3). And now it is type checked! I fail to reproduce the report of a wrong type of P. I delete Foo.agdai, and repeat the whole session without emacs, by calling > agda $agdaLibOpt Foo.agda And I fail to reproduce the report about P. This effect is not for the first time. The impression is that Agda learns something from previous sessions. A smart girl! Earlier I thought that this was because I forget about some typos made, so that I fail to really reproduce a session. But this time it looks more clear, I did things attentively. May be this is due to that emacs sets something invisible for me when I edit Foo.agda? For example, I wrote "{P}", and occasionally pressed some key, and something invisible has been inserted there? If it was a system or a hardware corruption, then I probably would not be able to sensibly type-check, compile and run the tests in a large project, as I did. Has people met with such effects? Thanks, ------ Sergei From matthewdaggitt at gmail.com Mon Aug 31 15:32:26 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Mon, 31 Aug 2020 21:32:26 +0800 Subject: [Agda] [ANNOUNCE] Agda Standard Library 1.4 release candidate 1 Message-ID: Dear all, The Agda Team is pleased to announce the first release candidate of version 1.4 of the standard library. The release candidate has been tested using Agda 2.6.1. The new version of the library can be downloaded here . Please report any issues you may encounter with the new version of the library on the Github issues page . If no major issues are found we will aim to release the official version 1.4 in the next couple of weeks. Best wishes, Matthew, on behalf of the Agda Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Mon Aug 31 19:45:31 2020 From: carette at mcmaster.ca (Carette, Jacques) Date: Mon, 31 Aug 2020 17:45:31 +0000 Subject: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) In-Reply-To: References: <5d331a71-1e42-ec61-64e0-9dd4fc78b712@enigmage.de> <0c7fb8f9-9545-4b11-4d66-2596b96fd286@enigmage.de> <9a31bde3-d67d-2069-1b81-0c77ae2bc18a@cse.gu.se> Message-ID: We should not let this die with no action. I personally agree with Jesper?s analysis below. The Agda community is already using email and github effectively and successfully. Those should stay as is, IMHO. The question is trying to try a ?single? real-time synchronous channel, i.e. have it be somehow the ?official? channel. It does indeed look like Zulip and Matrix.org are the leading candidates. I?m slightly partial to Zulip (as I?m already involved in 2 streams already), but willing to try Matrix.org if there is a strong push for that. AFAIK, both are open. Jacques From: Agda On Behalf Of Jesper Cockx Sent: August 25, 2020 5:33 AM To: Nils Anders Danielsson Cc: agda list Subject: Re: [Agda] On IRC, Slack, Gitter, Discord, and Zulip (re: Hanging out with the Lean crowd) Let me try to summarize the discussion so far: - One important point is that there is a fundamental difference between slow-form asynchronous communication channels (e.g. email, github, reddit, discourse) and real-time synchronous channels (e.g. IRC, slack, discord, zulip, matrix.org, ...). While some of these systems can also been used for the other purpose, the general requirements seem different enough that having two separate platforms is warranted. - For asynchronous communication, email is very ingrained and difficult to replace completely. It would be interesting to investigate alternatives such as discourse at some point, but I won't push for that at the moment. - From all the synchronous channels, the two that got the most positive reaction are Zulip and Matrix.org. Zulip seems to be mature and well-loved for its integrations and threaded conversations. Matrix is the only truly open platform and does more or less everything that Slack does. I would like to try out either Zulip or Matrix during the next online Agda meeting (in place of Slack). Personally I would prefer Zulip, since the integration with Github is rather nice, and I've come to like the threaded model of conversation. For the kind of conversations we had on the Slack channel so far, these features seem to be more important than the possibility to connect via different clients offered by Matrix. -- Jesper On Mon, Aug 24, 2020 at 11:01 AM Nils Anders Danielsson > wrote: On 2020-08-21 14:41, Manuel B?renz wrote: > Would an alternative with a good email integration (i.e. read threads > by receiving email, answer & start threads by sending an email) work > for you? I think something based on an open standard sounds more appealing than something closed (everything else being equal). -- /NAD _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From frederic.blanqui at inria.fr Mon Aug 31 21:09:55 2020 From: frederic.blanqui at inria.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCbGFucXVp?=) Date: Mon, 31 Aug 2020 21:09:55 +0200 Subject: [Agda] Uniqueness [Was: Re: Hanging out with the Lean crowd] In-Reply-To: <28eded53-3371-a4a2-1443-5ca1419d1b99@lopezjuan.com> References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> <2541e179-10f6-b068-8c04-390bcc22c9ea@inria.fr> <2f3f3c0c-089d-d500-c649-8e705e33f672@inria.fr> <28eded53-3371-a4a2-1443-5ca1419d1b99@lopezjuan.com> Message-ID: <4be8df8b-2b58-0512-3e46-505397d218a4@inria.fr> Le 31/08/2020 ? 11:44, V?ctor L?pez Juan a ?crit?: > Hi Fr?d?ric, > > I hope someone comes up with a better reference for this? > > As far as I know, there are two works which also address the issue of > "recursive" functions on Booleans. > > - Adam Gundry's PhD thesis (?4.2.5, ?"Rigid-rigid decomposition"; see > also Figure 4.12) [1], which considers the issue in a setting where > terms are fully normalized, the recursor on Booleans is an eliminator, > and terms contain twin variable annotations to facilitate dynamic > pattern unification. > > - My own licentiate thesis (?4.5.8) [2], building upon the former and > with a theory which is closer to Agda, but relies on inconsistent > assumptions (Type : Type). The formulation of uniqueness (here, > completeness of rules) is done using the usual judgmental equality. > > As noted, both differ somewhat from the variant MLTT used in Agda. > > I wish I could be of more help. > > But, do you have some way in mind in which user recursive definitions > could affect uniqueness? > Well, modulo the definitions of addition and multiplication on natural numbers, some polynomials have several solutions. Thank you for your interesting references anyway. Best regards, Fr?d?ric. > ? V?ctor > > [1]: > https://adam.gundry.co.uk/pub/thesis/thesis-2013-12-03.pdf#subsection.4.2.5 > [2]: https://lopezjuan.com/project/licentiate/licentiate-printer.pdf#42 > > Den 2020-08-28 kl. 14:24, skrev Fr?d?ric Blanqui: >> Thank you for these references. >> >> However, if I understand correctly, in both cases, it is about >> unification in LF modulo beta, eta and projections only. So, this >> does not include user recursive definitions... >> >> >> Le 27/08/2020 ? 11:55, V?ctor L?pez Juan a ?crit?: >>> Den 2020-08-25 kl. 15:36, skrev Neel Krishnaswami: >>> > >>> > I didn't know that solutions remained unique even if you solved >>> > constraints lazily. Is there a reference for this? >>> >>> Den 2020-08-25 kl. 14:54, skrev Fr?d?ric Blanqui: >>>> >>>> Le 25/08/2020 ? 12:49, Andr?s Kov?cs a ?crit?: >>>>> Fr?d?ric: by solving only pattern unification problems, which have >>>>> definitionaly unique solutions, >>>> >>>> Could you provide a reference please? >>> >>> A good one would be Jason Reed's 2009 paper [1], which shows this >>> for the ?? calculus. >>> Andreas Abel and Brigitte Pientka generalize it to the ??? calculus >>> [2]. >>> >>> [1]: https://www.cs.cmu.edu/~jcreed/papers/lfmtp2009.pdf >>> [2]: https://link.springer.com/chapter/10.1007/978-3-642-21691-6_5 From mechvel at scico.botik.ru Mon Aug 31 21:27:53 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 31 Aug 2020 22:27:53 +0300 Subject: [Agda] [ANNOUNCE] Agda Standard Library 1.4 release candidate 1 In-Reply-To: References: Message-ID: <0419910c006d738616fd14dc47f63208@scico.botik.ru> On 2020-08-31 16:32, Matthew Daggitt wrote: > Dear all, > > The Agda Team is pleased to announce the first release candidate of > version 1.4 of the standard library. > [..] It is written there in CHANGELOG.md " The module `Relation.Binary.PropositionalEquality` has been growing in size and now depends on a lot of other parts of the library, even though its basic functionality does not. To fix this some of its parts have been factored out. `Relation.Binary.PropositionalEquality.Core` already existed. Added are: ```agda Relation.Binary.PropositionalEquality.Properties Relation.Binary.PropositionalEquality.Algebra ``` These new modules are re-exported by `Relation.Binary.PropositionalEquality` and so these changes should be invisble to current users, but can be useful to authors of large libraries. " Can you, please, explain: what is the difference between writing module Foo where open import Relation.Binary.PropositionalEquality using (foo) ... and module Foo Where open import Relation.Binary.PropositionalEquality.Core using (foo) ... (assuming that foo is in ...Core) ? Is the latter better for the authors of large libraries? Why? Do you mean that fewer modules of standard library will be type-checked? (because if PropositionalEquality is type-checked, then Agda needs to type-check at list once all the modules it imports). Does this make a difference to Foo.agdai ? its size? Thanks, ------ Sergei From victor at lopezjuan.com Tue Sep 1 09:23:29 2020 From: victor at lopezjuan.com (=?UTF-8?Q?V=c3=adctor_L=c3=b3pez_Juan?=) Date: Tue, 1 Sep 2020 09:23:29 +0200 Subject: [Agda] Uniqueness [Was: Re: Hanging out with the Lean crowd] In-Reply-To: <4be8df8b-2b58-0512-3e46-505397d218a4@inria.fr> References: <489BEEDA-1FE3-46FD-B8F1-1B23E4BEEF15@math.fsu.edu> <24dfa12a-25c9-fa7d-58db-4697d58f540d@strath.ac.uk> <42bcf9b8-b77c-6155-3eb6-a2764718e825@liacs.leidenuniv.nl> <2541e179-10f6-b068-8c04-390bcc22c9ea@inria.fr> <2f3f3c0c-089d-d500-c649-8e705e33f672@inria.fr> <28eded53-3371-a4a2-1443-5ca1419d1b99@lopezjuan.com> <4be8df8b-2b58-0512-3e46-505397d218a4@inria.fr> Message-ID: Den 2020-08-31 kl. 21:09, skrev Fr?d?ric Blanqui: > Well, modulo the definitions of addition and multiplication on natural > numbers, some polynomials have several solutions. I see! This got me thinking. I think that those cases where this would be an issue are outside the scope of what the Agda unifier tries to achieve. Here is some detailed analysis for the setting you mention, with polynomials on the natural numbers: -------- Take a constraint ? ? p ?? ? q ?? : Nat, where p and q are polynomials, and ?? is a metavariable of type Nat. After normalizing both sides of the constraint, there are six possibilities: (i) p and q are constants. Then the constraint does not give information about (??). (ii) both sides are headed by a suc contructor. E.g. ? ? suc (p ??) ? suc (q ??) : Nat. Then the suc constructor can be removed. (iii) Both sides are headed by a incompatible constructors. E.g. ? ? suc (p ??) ? zero : Nat. Then the constraint has no solution. (iv) one of p or q is the identity, and the other is a constant. E.g ? ? ?? ? 2 : Nat. Then the constraint can be solved, as it is in the pattern fragment. (v) p or q is the identity, the other is a function of (??) E.g ? ? ?? ? ?? * ?? : Nat. Then the constraint does not pass the occurs check, as the head metavariable of the LHS (??) occurs rigidly on the RHS. Therefore Agda will not use this constraint to gain information about ??. (vi) Either p or q are non-trivial polynomials. E.g ? ? ?? * 1 ? ?? * ?? : Nat (with multiplication defined by recursion on the first argument). Then at least one of the sides is an irreducible term, but which could possibly reduce if ?? were to be instantiated. That is, it is not a "strongly neutral" term. Agda will thus not use this constraint to glean information about ??. --- To sum up, the equational theory behind the user-defined functions should not affect uniqueness, as those constraints with terms that could reduce after a metavariable instantiation will not be used in order to obtain solutions. (There is some form of injectivity analysis of user definitions which may allow more constraints to be used, but this does not change the general picture). ? V?ctor Den 2020-08-31 kl. 21:09, skrev Fr?d?ric Blanqui: > > Le 31/08/2020 ? 11:44, V?ctor L?pez Juan a ?crit?: >> Hi Fr?d?ric, >> >> I hope someone comes up with a better reference for this? >> >> As far as I know, there are two works which also address the issue of >> "recursive" functions on Booleans. >> >> - Adam Gundry's PhD thesis (?4.2.5, ?"Rigid-rigid decomposition"; see >> also Figure 4.12) [1], which considers the issue in a setting where >> terms are fully normalized, the recursor on Booleans is an eliminator, >> and terms contain twin variable annotations to facilitate dynamic >> pattern unification. >> >> - My own licentiate thesis (?4.5.8) [2], building upon the former and >> with a theory which is closer to Agda, but relies on inconsistent >> assumptions (Type : Type). The formulation of uniqueness (here, >> completeness of rules) is done using the usual judgmental equality. >> >> As noted, both differ somewhat from the variant MLTT used in Agda. >> >> I wish I could be of more help. >> >> But, do you have some way in mind in which user recursive definitions >> could affect uniqueness? >> > Well, modulo the definitions of addition and multiplication on natural > numbers, some polynomials have several solutions. > > Thank you for your interesting references anyway. > > Best regards, > > Fr?d?ric. > > >> ? V?ctor >> >> [1]: >> https://adam.gundry.co.uk/pub/thesis/thesis-2013-12-03.pdf#subsection.4.2.5 >> >> [2]: https://lopezjuan.com/project/licentiate/licentiate-printer.pdf#42 >> >> Den 2020-08-28 kl. 14:24, skrev Fr?d?ric Blanqui: >>> Thank you for these references. >>> >>> However, if I understand correctly, in both cases, it is about >>> unification in LF modulo beta, eta and projections only. So, this >>> does not include user recursive definitions... >>> >>> >>> Le 27/08/2020 ? 11:55, V?ctor L?pez Juan a ?crit?: >>>> Den 2020-08-25 kl. 15:36, skrev Neel Krishnaswami: >>>> > >>>> > I didn't know that solutions remained unique even if you solved >>>> > constraints lazily. Is there a reference for this? >>>> >>>> Den 2020-08-25 kl. 14:54, skrev Fr?d?ric Blanqui: >>>>> >>>>> Le 25/08/2020 ? 12:49, Andr?s Kov?cs a ?crit?: >>>>>> Fr?d?ric: by solving only pattern unification problems, which have >>>>>> definitionaly unique solutions, >>>>> >>>>> Could you provide a reference please? >>>> >>>> A good one would be Jason Reed's 2009 paper [1], which shows this >>>> for the ?? calculus. >>>> Andreas Abel and Brigitte Pientka generalize it to the ??? calculus >>>> [2]. >>>> >>>> [1]: https://www.cs.cmu.edu/~jcreed/papers/lfmtp2009.pdf >>>> [2]: https://link.springer.com/chapter/10.1007/978-3-642-21691-6_5 From matthewdaggitt at gmail.com Tue Sep 1 13:15:56 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Tue, 1 Sep 2020 19:15:56 +0800 Subject: [Agda] [ANNOUNCE] Agda Standard Library 1.4 release candidate 1 In-Reply-To: <0419910c006d738616fd14dc47f63208@scico.botik.ru> References: <0419910c006d738616fd14dc47f63208@scico.botik.ru> Message-ID: Hi Sergei, > Can you, please, explain: what is the difference between writing ... open import Relation.Binary.PropositionalEquality using (foo) > ... > and ... open import Relation.Binary.PropositionalEquality.Core using (foo) > ... > The former will have dependencies on all the imports listed at the top of `Relation.Binary.PropositionalEquality(.Algebra/Properties)` which includes the entire `Algebra` and `Relation.Binary` hierarchies. This can make it time consuming to load the module and increase the memory overhead. The CHANGELOG wording perhaps needs updating for the full release, as users should not import `Core` modules directly , and as we don't provide guarantees about their content. Best, Matthew On Tue, Sep 1, 2020 at 3:27 AM wrote: > On 2020-08-31 16:32, Matthew Daggitt wrote: > > Dear all, > > > > The Agda Team is pleased to announce the first release candidate of > > version 1.4 of the standard library. > > [..] > > It is written there in CHANGELOG.md > " > The module `Relation.Binary.PropositionalEquality` has been growing in > size and > now depends on a lot of other parts of the library, even though its > basic > functionality does not. To fix this some of its parts have been > factored out. > `Relation.Binary.PropositionalEquality.Core` already existed. Added > are: > ```agda > Relation.Binary.PropositionalEquality.Properties > Relation.Binary.PropositionalEquality.Algebra > ``` > These new modules are re-exported by > `Relation.Binary.PropositionalEquality` > and so these changes should be invisble to current users, but can be > useful > to authors of large libraries. > " > > Can you, please, explain: what is the difference between writing > module Foo where > open import Relation.Binary.PropositionalEquality using (foo) > ... > and > module Foo Where > open import Relation.Binary.PropositionalEquality.Core using (foo) > ... > (assuming that foo is in ...Core) > ? > Is the latter better for the authors of large libraries? Why? > Do you mean that fewer modules of standard library will be type-checked? > (because if PropositionalEquality is type-checked, then Agda needs to > type-check > at list once all the modules it imports). > Does this make a difference to Foo.agdai ? its size? > > Thanks, > > ------ > Sergei > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Tue Sep 1 14:39:12 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 01 Sep 2020 15:39:12 +0300 Subject: [Agda] [ANNOUNCE] Agda Standard Library 1.4 release candidate 1 In-Reply-To: References: <0419910c006d738616fd14dc47f63208@scico.botik.ru> Message-ID: On 2020-09-01 14:15, Matthew Daggitt wrote: > [..] >> Can you, please, explain: what is the difference between writing >> ... >> open import Relation.Binary.PropositionalEquality using (foo) >> ... Call it Foo-I.agda. >> and >> ... >> open import Relation.Binary.PropositionalEquality.Core using (foo) >> ... Call it Foo-II.agda. > The former will have dependencies on all the imports listed at the top > of `Relation.Binary.PropositionalEquality(.Algebra/Properties)` which > includes the entire `Algebra` and `Relation.Binary` hierarchies. This > can make it time consuming to load the module and increase the memory > overhead. Sorry, I need to understand certain details about Agda. Suppose that we do > agda $agdaLibOpt Foo-I.agda -- call it TCommand (1) Does "to load" mean to type-check? Or may be it means to take some ready .agdai modules into memory? (2) What precisely makes TCommand more time consuming than for Foo-II ? Is it type-checking an additional large part of the standard library? (call it LargeLibPart). But this is only for the first call of TCommand. When developing a project, after some implementation is edited in Foo-I, the next TCommang for Foo-I.agda will not require type-checking LargeLibPart. Right? On the other hand, it needs for find where foo is defined. To do this, it takes many ready .agdai modules into memory and searches there for foo, and finds its declaration in ..Core. Right? So that it occurs that a large memory and time is still spent to get .agdai of LargeLibPart into memory and to search in them. Am I missing something? > The CHANGELOG wording perhaps needs updating for the full release, as > users should not import `Core` modules directly [1], and as we don't > provide guarantees about their content. I am totally confused. You write that Foo-I (that imports `Core' in-directly is expensive to type-check, because it "will have dependencies on all the imports listed at the top of `Relation.Binary.PropositionalEquality(.Algebra/Properties)` ... ". The only way to avoid this is to import foo directly from `Core'. Right? And then, you write "users should not import `Core` modules directly [1]". So, how does one import the above foo ? Regards, -- SM > > On Tue, Sep 1, 2020 at 3:27 AM wrote: > >> On 2020-08-31 16:32, Matthew Daggitt wrote: >>> Dear all, >>> >>> The Agda Team is pleased to announce the first release candidate >> of >>> version 1.4 of the standard library. >>> [..] >> >> It is written there in CHANGELOG.md >> " >> The module `Relation.Binary.PropositionalEquality` has been >> growing in >> size and >> now depends on a lot of other parts of the library, even though >> its >> basic >> functionality does not. To fix this some of its parts have been >> factored out. >> `Relation.Binary.PropositionalEquality.Core` already existed. >> Added >> are: >> ```agda >> Relation.Binary.PropositionalEquality.Properties >> Relation.Binary.PropositionalEquality.Algebra >> ``` >> These new modules are re-exported by >> `Relation.Binary.PropositionalEquality` >> and so these changes should be invisble to current users, but can be >> >> useful >> to authors of large libraries. >> " >> >> Can you, please, explain: what is the difference between writing >> module Foo where >> open import Relation.Binary.PropositionalEquality using (foo) >> ... >> and >> module Foo Where >> open import Relation.Binary.PropositionalEquality.Core using (foo) >> ... >> (assuming that foo is in ...Core) >> ? >> Is the latter better for the authors of large libraries? Why? >> Do you mean that fewer modules of standard library will be >> type-checked? >> (because if PropositionalEquality is type-checked, then Agda needs >> to >> type-check >> at list once all the modules it imports). >> Does this make a difference to Foo.agdai ? its size? >> >> Thanks, >> >> ------ >> Sergei > > > Links: > ------ > [1] > https://github.com/agda/agda-stdlib/blob/1309c75160e3125e1ce35b0b3db748821c75e22a/README.agda#L247 > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Tue Sep 1 23:29:15 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 02 Sep 2020 00:29:15 +0300 Subject: [Agda] bug? Message-ID: <53c4653a9ed6eae35246bbd2404b8aae@scico.botik.ru> Dear Agda developers, I am testing lib-1.4-rc1 under Agda 2.6.1, ghc-8.8.3, Ubuntu Linux 18.04. Many modules in my large application have been ported. But the current module is not type-checked. I have composed of this a self-contained and small code - which is attached. Probably the type checker is responsible. Less probably this is of lib-1.4-rc1. And I doubt whether something is wrong in the program itself. > agda $agdaLibOpt Bug.agda reports a strange thing for the last line of the attached program: " Checking Bug (/home/mechvel/agda/toSave/bugs/sept1-2020/Bug.agda). /home/mechvel/agda/toSave/bugs/sept1-2020/Bug.agda:60,15-45 Refusing to invert pattern matching of Data.List.foldl because the maximum depth (50) has been reached. Most likely this means you have an unsatisfiable constraint, but it could also mean that you need to increase the maximum depth using the flag --inversion-max-depth=N when checking that the inferred type of an application All (_? n) (reverse (_x_114 ? ... " I recall, this code worked under lib-1.3 (it is not for sure that it is the very same code). There the constraint was satisfiable, and with lib-1.4-rc1 it is not. What might all this mean? Thanks, ------ Sergei -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Bug.agda URL: From claudio.sacerdoticoen at unibo.it Wed Sep 2 17:42:33 2020 From: claudio.sacerdoticoen at unibo.it (Claudio Sacerdoti Coen) Date: Wed, 2 Sep 2020 15:42:33 +0000 Subject: [Agda] LFMTP 2020 Post-Proceedings: Call for Papers Message-ID: [Apologies if you received multiple copies of this CFP] CALL FOR PAPERS Logical Frameworks and Meta-Languages: Theory and Practice (Post-Proceedings) LFMTP 2020 https://lfmtp.org/workshops/2020/ Abstract submission deadline: 2 October 2020 Paper submission deadline: 9 October 2020 ABOUT LFMTP Logical frameworks and meta-languages form a common substrate for representing, implementing and reasoning about a wide variety of deductive systems of interest in logic and computer science. Their design, implementation and their use in reasoning tasks, ranging from the correctness of software to the properties of formal systems, have been the focus of considerable research over the last two decades. This workshop will bring together designers, implementors and practitioners to discuss various aspects impinging on the structure and utility of logical frameworks, including the treatment of variable binding, inductive and co-inductive reasoning techniques and the expressiveness and lucidity of the reasoning process. The LFMTP 2020 workshop adopts a post-proceedings publication model. The workshop itself took place on 29-30 June 2020 online, jointly with IJCAR and FSCD. Now that the workshop has concluded, we solicit submissions of full papers for the post-proceedings of LFMTP 2020, which will go through the normal peer-review process. Submission is open to all; attendance at the workshop is not prerequisite. Submissions related to the following topics are welcome: * Encoding and reasoning about the meta-theory of programming languages, process calculi and related formally specified systems. * Formalisation of model-theoretic and proof-theoretic semantics of logics. * Theoretical and practical issues concerning the treatment of variable binding, especially the representation of, and reasoning about, datatypes defined from binding signatures. * Logical treatments of inductive and co-inductive definitions and associated reasoning techniques, including inductive types of higher dimension in homotopy type theory. * Graphical languages for building proofs and their applications in geometry, equational reasoning and category theory. * New theory contributions: canonical and substructural frameworks, contextual frameworks, proof-theoretic foundations supporting binders, functional programming over logical frameworks, homotopy and cubical type theory. * Applications of logical frameworks: proof-carrying architectures, proof exchange and transformation, program refactoring, etc. * Techniques for programming with binders in functional programming languages such as Haskell, OCaml or Agda, and logic programming languages such as lambda Prolog or Alpha-Prolog. * Design and implementation of systems and tools related to meta-languages and logical frameworks IMPORTANT DATES All deadlines are established as the end of day (23:59) AoE. * Abstract submission deadline: 2 October 2020 * Paper submission deadline: 9 October 2020 * Notification to authors: 20 November 2020 * Final version due: 4 December 2020 SUBMISSION INFORMATION Submitted papers should be in PDF, formatted using the EPTCS LaTeX style. The length is restricted to 15 pages. Submission is via EasyChair: https://easychair.org/my/conference?conf=lfmtp2020 All submissions will be peer-reviewed and accepted papers will be published in the Electronic Proceedings in Theoretical Computer Science (EPTCS) series. PROGRAM COMMITTEE David Baelde, LSV, ENS Paris-Saclay & Inria Paris Fr?d?ric Blanqui, INRIA Alberto Ciaffaglione, University of Udine Dennis M?ller, Friedrich-Alexander-University Erlangen-N?rnberg Michael Norrish, Data61 Carlos Olarte, Universidade Federal do Rio Grande do Norde Claudio Sacerdoti Coen, University of Bologna (PC Co-Chair) Ulrich Sch?pp, fortiss GmbH Alwen Tiu, Australian National University (PC Co-Chair) Tjark Weber, Uppsala University -- You received this message because you are subscribed to the Google Groups "Abella" group. To unsubscribe from this group and stop receiving emails from it, send an email to abella-theorem-prover+unsubscribe at googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/abella-theorem-prover/CA%2BovoGab90ML0kuEK9pfq_a-Pp%3DugP1m%3DC76mjooeMUVKXQmAA%40mail.gmail.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Thu Sep 3 19:51:03 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Thu, 3 Sep 2020 19:51:03 +0200 Subject: [Agda] Question about transport and cubical Message-ID: Hi, I'm just reading the docs on Agda's Cubical TT support, and stumbled over this: transp : ? {?} (A : I ? Set ?) (r : I) (a : A i0) ? A i1 There is an additional side condition to be satisfied for |transp A r a| to type-check, which is that |A| has to be /constant/ on |r|.This means that |A| should be a constant function whenever the constraint |r = i1| is satisfied. https://agda.readthedocs.io/en/v2.6.1/language/cubical.html#transport I don't understand what that means. A is introduced before r. By definition, A does not depend on r, because r isn't even in scope for A. So any constraint on r doesn't have any effect on A. In fact, r never appears again in the type signature. So vacuously, A is constant on r because it doesn't use r. Probably I'm just misunderstanding something basic. Best regards, Manuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From leo at halfaya.org Thu Sep 3 20:07:29 2020 From: leo at halfaya.org (John Leo) Date: Thu, 3 Sep 2020 11:07:29 -0700 Subject: [Agda] Question about transport and cubical In-Reply-To: References: Message-ID: I'm not sure either what the author of this page meant by "A has to be constant on r". Perhaps it is just poor wording but it doesn't make sense to me either. It doesn't appear in the original Cubical Agda paper. If you ignore that everything else seems fine, though. The key point is that when r = i1 then transp must satisfy the additional constraint that "transp A i1 a = a" for all "a" and when r = i0 there is no additional constraint. John On Thu, Sep 3, 2020 at 10:51 AM Manuel B?renz wrote: > Hi, > > I'm just reading the docs on Agda's Cubical TT support, and stumbled over > this: > > transp : ? {?} (A : I ? Set ?) (r : I) (a : A i0) ? A i1 > > There is an additional side condition to be satisfied for transp A r a to > type-check, which is that A has to be *constant* on r. This means that A > should be a constant function whenever the constraint r = i1 is > satisfied. > > https://agda.readthedocs.io/en/v2.6.1/language/cubical.html#transport > > I don't understand what that means. A is introduced before r. By > definition, A does not depend on r, because r isn't even in scope for A. So > any constraint on r doesn't have any effect on A. In fact, r never appears > again in the type signature. So vacuously, A is constant on r because it > doesn't use r. > > Probably I'm just misunderstanding something basic. > > Best regards, Manuel > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Thu Sep 3 20:12:09 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Thu, 3 Sep 2020 20:12:09 +0200 Subject: [Agda] Fwd: Question about transport and cubical In-Reply-To: References: Message-ID: <853c2c5a-cab7-73d9-2610-3e24a5f99dcd@enigmage.de> I'm still confused. r doesn't influence the type of a in the expression transp A r a. If it was transp: ?{?} (A : I ? Set ?) (r : I) (a : A i0) ? A r or something else where r is actually used in the rest of the signature, that would make sense, but how does setting some unrelated variable to a value influence the transport? -------- Forwarded Message -------- Subject: Re: [Agda] Question about transport and cubical Date: Thu, 3 Sep 2020 18:06:46 +0000 From: Thorsten Altenkirch To: Manuel B?renz Yes, this puzzled me as well first. ? What is meant is that if you know r=i1 where r is any expression then A i = A j for any i,j : I. Then transp A r a : A i1 ? You need this because if =i1 then transp A r a = a, but the lhs is in A i0 and the rhs is in A i1. ? Thorsten ? *From: *Agda on behalf of Manuel B?renz *Date: *Thursday, 3 September 2020 at 18:51 *To: *"agda at lists.chalmers.se" *Subject: *[Agda] Question about transport and cubical ? Hi, I'm just reading the docs on Agda's Cubical TT support, and stumbled over this: transp: ?{?} (A : I ? Set ?) (r : I) (a : A i0) ? A i1 There is an additional side condition to be satisfied for transp||A||r||ato type-check, which is that Ahas to be /constant/ on r. This means that Ashould be a constant function whenever the constraint r||=||i1is satisfied. https://agda.readthedocs.io/en/v2.6.1/language/cubical.html#transport I don't understand what that means. A is introduced before r. By definition, A does not depend on r, because r isn't even in scope for A. So any constraint on r doesn't have any effect on A. In fact, r never appears again in the type signature. So vacuously, A is constant on r because it doesn't use r. Probably I'm just misunderstanding something basic. Best regards, Manuel This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From leo at halfaya.org Thu Sep 3 20:19:22 2020 From: leo at halfaya.org (John Leo) Date: Thu, 3 Sep 2020 11:19:22 -0700 Subject: [Agda] Fwd: Question about transport and cubical In-Reply-To: <853c2c5a-cab7-73d9-2610-3e24a5f99dcd@enigmage.de> References: <853c2c5a-cab7-73d9-2610-3e24a5f99dcd@enigmage.de> Message-ID: Thorsten's explanation is good. Just ignore the phrase " A has to be constant on r". Everything else makes sense. If you want to know why there is this additional condition, read the Cubical Agda paper. John On Thu, Sep 3, 2020 at 11:12 AM Manuel B?renz wrote: > I'm still confused. r doesn't influence the type of a in the expression > transp A r a. If it was > > transp : ? {?} (A : I ? Set ?) (r : I) (a : A i0) ? A r > > > or something else where r is actually used in the rest of the signature, > that would make sense, but how does setting some unrelated variable to a > value influence the transport? > > -------- Forwarded Message -------- > Subject: Re: [Agda] Question about transport and cubical > Date: Thu, 3 Sep 2020 18:06:46 +0000 > From: Thorsten Altenkirch > > To: Manuel B?renz > > Yes, this puzzled me as well first. > > > > What is meant is that if you know r=i1 where r is any expression then A i > = A j for any i,j : I. > > Then transp A r a : A i1 > > > > You need this because if =i1 then transp A r a = a, but the lhs is in A i0 > and the rhs is in A i1. > > > > Thorsten > > > > *From: *Agda > on behalf of Manuel B?renz > > *Date: *Thursday, 3 September 2020 at 18:51 > *To: *"agda at lists.chalmers.se" > > *Subject: *[Agda] Question about transport and cubical > > > > Hi, > > I'm just reading the docs on Agda's Cubical TT support, and stumbled over > this: > > transp : ? {?} (A : I ? Set ?) (r : I) (a : A i0) ? A i1 > > There is an additional side condition to be satisfied for transp A r a to > type-check, which is that A has to be *constant* on r. This means that A > should be a constant function whenever the constraint r = i1 is > satisfied. > > https://agda.readthedocs.io/en/v2.6.1/language/cubical.html#transport > > I don't understand what that means. A is introduced before r. By > definition, A does not depend on r, because r isn't even in scope for A. So > any constraint on r doesn't have any effect on A. In fact, r never appears > again in the type signature. So vacuously, A is constant on r because it > doesn't use r. > > Probably I'm just misunderstanding something basic. > > Best regards, Manuel > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Thu Sep 3 21:19:11 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Thu, 3 Sep 2020 21:19:11 +0200 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: Message-ID: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> Thanks Thorsten for the extended explanation. I think I now understand that the point is that we might call transp in a situation where A is an expression that may contain r. Taking John's advice to ignore that phrase, I look at the following: There is an additional side condition to be satisfied for |transp A r a| to type-check, which is [...] that |A| should be a constant function whenever the constraint |r = i1| is satisfied. One part of the confusion was probably that I thought about A as a closed expression, since there is a binding of the same name directly before in the type signature. But in this sentence, A is meant to be any expression, and it may contain r as a free variable. I still don't understand what's meant by Ashould be a constant function. Who checks that? Obviously the semantics of A has to be constant, after all that's the point behind cubical type theory, isn't it? So I guess it must mean that the sort-of-lambda-expression must be a constant function in that it doesn't depend on its argument. Is Cubical Agda able to check whether functions of type I -> Set are constant? How does the check work? ? _ . A is constant, but is ? i . (? _ . A) i constant for that matter? Or does it normalize A i0 and A i1 and then tries to unify them? I realize that this is maybe not the place to discuss articles. But I believe it's the right place to talk about the documentation of the language. During ICFP I got the impression that I'm not the only one struggling with an intuitive understanding of how to use Cubical Agda. Keeping the documentation understandable is important to improve that. Especially on an intricate topic like equality reasoning, confusing wording can be an obstruction. For example: However when |r| is equal to |i1| the |transp| function will compute as the identity function. At the end, doesn't transp A i always compute as the identity function? Isn't the point of transport to just verify that two types are equal so we can safely coerce? I believe I can sort of see what the argument is intending to say, it's more like "transp A i1 must be able to have the type {B : Set l} -> B -> B, so in the branch where transp is called with r = i1 we must have that A is constantly B.", but I might be misunderstanding this again. It is sometimes said that HoTT solves the problem of equality, but it seems to me more like that it pushes the problem to documentation and conversation, because we don't have good words to talk about the different kinds of equality. If I can make sense of this all, I'll try and improve this part of the docs. -------- Forwarded Message -------- Subject: Re: [Agda] Fwd: Question about transport and cubical Date: Thu, 3 Sep 2020 18:28:07 +0000 From: Thorsten Altenkirch To: Manuel B?renz Ok, we now have equational assumptions like r=i1 where r is some expression of type I. For example a variable like i. ? Now the type A also uses ?r? and you can check that if r==i1 then A is constant. ?It may contain a match on r and if r=i1 then the branch doesn?t mention the paremeter. ? This is a requirement for the expression ?transp A r a? to typecheck. E.g. in my example it would be transp A i a which has the type A i1. Assuming r=i1 it is equal to a : A i0. But this deosn?t matter because of the condition on A. ? I think the best way to understand this is to start proving something about transp and then to write down each step of the derivation in a comment. Then you realize why you need it. ? Thorsten ? *From: *Agda on behalf of Manuel B?renz *Date: *Thursday, 3 September 2020 at 19:12 *To: *"agda at lists.chalmers.se" *Subject: *[Agda] Fwd: Question about transport and cubical ? I'm still confused. r doesn't influence the type of a in the expression transp A r a. If it was transp: ?{?} (A : I ? Set ?) (r : I) (a : A i0) ? A r ? or something else where r is actually used in the rest of the signature, that would make sense, but how does setting some unrelated variable to a value influence the transport? -------- Forwarded Message -------- *Subject: * Re: [Agda] Question about transport and cubical *Date: * Thu, 3 Sep 2020 18:06:46 +0000 *From: * Thorsten Altenkirch *To: * Manuel B?renz ? Yes, this puzzled me as well first. ? What is meant is that if you know r=i1 where r is any expression then A i = A j for any i,j : I. Then transp A r a : A i1 ? You need this because if =i1 then transp A r a = a, but the lhs is in A i0 and the rhs is in A i1. ? Thorsten ? *From: *Agda on behalf of Manuel B?renz *Date: *Thursday, 3 September 2020 at 18:51 *To: *"agda at lists.chalmers.se" *Subject: *[Agda] Question about transport and cubical ? Hi, I'm just reading the docs on Agda's Cubical TT support, and stumbled over this: transp: ?{?} (A : I ? Set ?) (r : I) (a : A i0) ? A i1 There is an additional side condition to be satisfied for transp||A||r||ato type-check, which is that Ahas to be /constant/ on r. This means that Ashould be a constant function whenever the constraint r||=||i1is satisfied. https://agda.readthedocs.io/en/v2.6.1/language/cubical.html#transport I don't understand what that means. A is introduced before r. By definition, A does not depend on r, because r isn't even in scope for A. So any constraint on r doesn't have any effect on A. In fact, r never appears again in the type signature. So vacuously, A is constant on r because it doesn't use r. Probably I'm just misunderstanding something basic. Best regards, Manuel This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. ? Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. ? ? ? This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From leo at halfaya.org Thu Sep 3 22:04:26 2020 From: leo at halfaya.org (John Leo) Date: Thu, 3 Sep 2020 13:04:26 -0700 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> Message-ID: Let me respond to some of your questions, although I am not an expert. >But in this sentence, A is meant to be any expression, and it may contain r as a free variable. I don't believe it is possible for A to contain r as a free variable. A has type A : I ? Set ?. It is typical to use "r" to denote the input to a function whose domain is the interval; I think this is part of the confusion. But A should not be allowed to contain any reference to interval variables other than its bound input. Thorston mentions that A can pattern match on "r" (here he is using r to refer to the input of A rather than the specific r passed to transport) but I don't believe this is correct (see section 3.1 of the Cubical Agda paper). One can only pattern match on an interval when creating "Partial" elements (see later in the doc). Someone correct me if I'm wrong. >I still don't understand what's meant by A should be a constant function. Since the type of A is I ? Set ? it simply means that the value of A must not depend on its input (a member of the interval type). Of course there are some followup questions: How is this checked by the typechecker? And if A can't depend on its input why not just force it to have type Set ?? I haven't looked at the code but I assume the check is a basic syntactic check that if A is of the form ? i ? B then i cannot appear in B (so it may exclude functions which are not syntactically constant). However my understanding (again correct me if I'm wrong) is that this check only takes place when typechecking "transp A r" and r is not known to be i0. In the case r=i0 there is no constraint on A and A is allowed to be nonconstant. This happens in the definition of transport immediately below: "transport p a = transp (? i ? p i) i0 a". In this case A is not necessarily constant. >At the end, doesn't transp A i always compute as the identity function? Isn't the point of transport to just verify that two types are equal so we can safely coerce? No, transport takes a proof of the equality of two types as an input and then does the coercion. It need not be the identity function. For example, using the non-refl self-equivalence of Bool, transport should send true to false and vice-versa. John -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersmortberg at gmail.com Thu Sep 3 22:09:09 2020 From: andersmortberg at gmail.com (Anders Mortberg) Date: Thu, 3 Sep 2020 22:09:09 +0200 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> Message-ID: Thanks for the many questions! I totally agree that the documentation for Cubical Agda should improve, especially the part about transp. The current version of the documentation was mostly written by me to explain some of the (quite technical) ideas from the paper where we introduced the transp operation: https://arxiv.org/abs/1802.01170 I'll try to answer some of your questions below. On Thu, Sep 3, 2020 at 9:19 PM Manuel B?renz wrote: > Thanks Thorsten for the extended explanation. I think I now understand > that the point is that we might call transp in a situation where A is an > expression that may contain r. > Yeah, so A is just any function out of the interval into the universe. So it can contain any interval variables that are currently in scope. For example, given some B : I -> Set and u : B i0 we can write (in pseudo-Agda): \(j : I). transp (\(i : I). B (i /\ j)) j u This is an example where the "A" contains the "r" (in this case A is \(i : I). B (i /\ j) and r is j). > Taking John's advice to ignore that phrase, I look at the following: > > There is an additional side condition to be satisfied for transp A r a to > type-check, which is [...] that A should be a constant function whenever > the constraint r = i1 is satisfied. > > One part of the confusion was probably that I thought about A as a closed > expression, since there is a binding of the same name directly before in > the type signature. But in this sentence, A is meant to be any expression, > and it may contain r as a free variable. > > I still don't understand what's meant by A should be a constant function. > Who checks that? Obviously the semantics of A has to be constant, after all > that's the point behind cubical type theory, isn't it? So I guess it must > mean that the sort-of-lambda-expression must be a constant function in that > it doesn't depend on its argument. Is Cubical Agda able to check whether > functions of type I -> Set are constant? How does the check work? ? _ . A > is constant, but is ? i . (? _ . A) i constant for that matter? Or does it > normalize A i0 and A i1 and then tries to unify them? > Agda checks it during conversion checking. One way to do it is to check that whenever r = i1 then A is convertible with \(_ : I). A i0. In other words that A is a constant function whenever r = i1. > I realize that this is maybe not the place to discuss articles. But I > believe it's the right place to talk about the documentation of the > language. During ICFP I got the impression that I'm not the only one > struggling with an intuitive understanding of how to use Cubical Agda. > Keeping the documentation understandable is important to improve that. > Especially on an intricate topic like equality reasoning, confusing wording > can be an obstruction. For example: > > However when r is equal to i1 the transp function will compute as the > identity function. > > At the end, doesn't transp A i always compute as the identity function? > Isn't the point of transport to just verify that two types are equal so we > can safely coerce? I believe I can sort of see what the argument is > intending to say, it's more like "transp A i1 must be able to have the type > {B : Set l} -> B -> B, so in the branch where transp is called with r = i1 > we must have that A is constantly B.", but I might be misunderstanding this > again. > > The transp function does not always compute as the identity function. For instance if A is defined using univalence applied to some equivalence e, then "transp A i0 u" will apply the first projection of e (i.e. the function) to u. That is, given e : Equiv X Y and x : X then transp (ua e) i0 x = fst e x (up to a path, see https://github.com/agda/cubical/blob/master/Cubical/Foundations/Univalence.agda#L233 for the proof) > It is sometimes said that HoTT solves the problem of equality, but it > seems to me more like that it pushes the problem to documentation and > conversation, because we don't have good words to talk about the different > kinds of equality. > > If I can make sense of this all, I'll try and improve this part of the > docs. > > That's very welcome! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Fri Sep 4 00:10:34 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Thu, 3 Sep 2020 22:10:34 +0000 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de>, Message-ID: <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Hi John, I hope Anders answer clarifies the situation. Sent from my iPhone > On 3 Sep 2020, at 21:04, John Leo wrote: > > ? > Let me respond to some of your questions, although I am not an expert. > > >But in this sentence, A is meant to be any expression, and it may contain r as a free variable. > > I don't believe it is possible for A to contain r as a free variable. A has type A : I ? Set ?. It is typical to use "r" to denote the input to a function whose domain is the interval; I think this is part of the confusion. But A should not be allowed to contain any reference to interval variables other than its bound input. There is an interesting confusion here. ?r? is a meta variable standing for a term not an object variable which may or may not appear in A. However it can be a variable in the current context which occurs in A. > > Thorston mentions that A can pattern match on "r" (here he is using r to refer to the input of A rather than the specific r passed to transport) but I don't believe this is correct (see section 3.1 of the Cubical Agda paper). One can only pattern match on an interval when creating "Partial" elements (see later in the doc). Someone correct me if I'm wrong. > Yes exactly this is the point. The systems which are implemented via pattern matching simplify due to constraints like r=i1 and as a result A may become a constant function. > >I still don't understand what's meant by A should be a constant function. > > Since the type of A is I ? Set ? it simply means that the value of A must not depend on its input (a member of the interval type). Of course there are some followup questions: How is this checked by the typechecker? And if A can't depend on its input why not just force it to have type Set ?? > > I haven't looked at the code but I assume the check is a basic syntactic check that if A is of the form ? i ? B then i cannot appear in B (so it may exclude functions which are not syntactically constant). However my understanding (again correct me if I'm wrong) is that this check only takes place when typechecking "transp A r" and r is not known to be i0. In the case r=i0 there is no constraint on A and A is allowed to be nonconstant. This happens in the definition of transport immediately below: "transport p a = transp (? i ? p i) i0 a". In this case A is not necessarily constant. > > >At the end, doesn't transp A i always compute as the identity function? Isn't the point of transport to just verify that two types are equal so we can safely coerce? > > No, transport takes a proof of the equality of two types as an input and then does the coercion. It need not be the identity function. For example, using the non-refl self-equivalence of Bool, transport should send true to false and vice-versa. > > John > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From leo at halfaya.org Fri Sep 4 00:37:37 2020 From: leo at halfaya.org (John Leo) Date: Thu, 3 Sep 2020 15:37:37 -0700 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: Yes thanks Anders for the clarifications. I was incorrect in saying r can't appear free in A (I forgot about the case in which transp appears in a larger context which contains more interval variables) and also that the code would only check that the input of A was ignored--checking that "A is convertible with \(_ : I). A i0" is certainly more sophisticated and will catch more cases. However as far as I understand one could still define a function that is propositionally equal to a constant function but not definitionally equal and the conversion checker would not be able to handle this case. Maybe it would be best to explicitly say " A is convertible with \(_ : I). A i0" in the documentation. John On Thu, Sep 3, 2020 at 3:10 PM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > Hi John, > > I hope Anders answer clarifies the situation. > > Sent from my iPhone > > > On 3 Sep 2020, at 21:04, John Leo wrote: > > > > ? > > Let me respond to some of your questions, although I am not an expert. > > > > >But in this sentence, A is meant to be any expression, and it may > contain r as a free variable. > > > > I don't believe it is possible for A to contain r as a free variable. A > has type A : I ? Set ?. It is typical to use "r" to denote the input to a > function whose domain is the interval; I think this is part of the > confusion. But A should not be allowed to contain any reference to interval > variables other than its bound input. > > There is an interesting confusion here. ?r? is a meta variable standing > for a term not an object variable which may or may not appear in A. However > it can be a variable in the current context which occurs in A. > > > > Thorston mentions that A can pattern match on "r" (here he is using r to > refer to the input of A rather than the specific r passed to transport) but > I don't believe this is correct (see section 3.1 of the Cubical Agda > paper). One can only pattern match on an interval when creating "Partial" > elements (see later in the doc). Someone correct me if I'm wrong. > > > > Yes exactly this is the point. The systems which are implemented via > pattern matching simplify due to constraints like r=i1 and as a result A > may become a constant function. > > > > >I still don't understand what's meant by A should be a constant > function. > > > > Since the type of A is I ? Set ? it simply means that the value of A > must not depend on its input (a member of the interval type). Of course > there are some followup questions: How is this checked by the typechecker? > And if A can't depend on its input why not just force it to have type Set ?? > > > > I haven't looked at the code but I assume the check is a basic syntactic > check that if A is of the form ? i ? B then i cannot appear in B (so it may > exclude functions which are not syntactically constant). However my > understanding (again correct me if I'm wrong) is that this check only takes > place when typechecking "transp A r" and r is not known to be i0. In the > case r=i0 there is no constraint on A and A is allowed to be nonconstant. > This happens in the definition of transport immediately below: "transport p > a = transp (? i ? p i) i0 a". In this case A is not necessarily constant. > > > > >At the end, doesn't transp A i always compute as the identity function? > Isn't the point of transport to just verify that two types are equal so we > can safely coerce? > > > > No, transport takes a proof of the equality of two types as an input and > then does the coercion. It need not be the identity function. For example, > using the non-refl self-equivalence of Bool, transport should send true to > false and vice-versa. > > > > John > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leo at halfaya.org Fri Sep 4 01:05:27 2020 From: leo at halfaya.org (John Leo) Date: Thu, 3 Sep 2020 16:05:27 -0700 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: I do have one further point I'd like clarified. Is the check for the r=i1 condition for transp done only when r is not known to be i0 or is it always done? For example is the check run at all when transport p (defined as "transp (? i ? p i) i0") is called? I assume not. For example in the following code notnot : (b : Bool) ? not (not b) ? b notnot true = refl notnot false = refl e : Bool ? Bool e = isoToPath (iso not not notnot notnot) a = transp (? i ? e i) i0 true b = transp (? _ ? Bool) i1 true c = transp (? i ? e i) i1 true I get that "a" and "b" typecheck ("a" evaluates to false and "b" to true as expected) but "c" fails to typecheck with the following error, which I assume is due to "e" not being definitionally constant. But perhaps I'm still confused. primGlue Bool (? .x ? (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) ; (i = i1) ? Bool , idEquiv Bool }) _ .fst) (? .x ? (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) ; (i = i1) ? Bool , idEquiv Bool }) _ .snd) != Bool of type Type when checking that the expression transp (? i ? e i) i1 true has type _28 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersmortberg at gmail.com Fri Sep 4 08:08:56 2020 From: andersmortberg at gmail.com (Anders Mortberg) Date: Fri, 4 Sep 2020 08:08:56 +0200 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: Yes, John's understanding of that very opaque error message is correct. When checking c Agda will have to verify that whenever i1=i1 (that is "everywhere") then (? i ? e i) is a constant function. This is clearly not the case as: (? i ? e i) /= (? i ? Bool) This is what the error message is trying to say, but e has been unfolded too far and there is some mysterious metavariable _28. Your understanding of what happens when r is i0 is also correct, in that case the condition r=i1 is just i0=i1 which is absurd and there is nothing to check as anything follows from an absurd assumption. This is why a typechecks. In general r is some element of dM(X), i.e. an element of the free De Morgan algebra on some subset X of the dimension variables currently in context. One way to check if some judgment holds when r=i1 is to first convert r to disjunctive normal form and propagate the _=i1 all the way down to the atoms. This gives us a big disjunction of conjuncts where each conjunct corresponds to a list of substitutions. For example if r is (i /\ j) \/ ~ k then r=i1 will reduce to ((i = i1) /\ (j = i1)) \/ (k = i0) To check that some judgment J holds in this context restriction amounts to checking that it holds either when (i = i1) and (j = i1) or when (k = i0). If I write G for the ambient context we hence need to check G, (i = i1) /\ (j = i1) |- J G, (k = i0) |- J which boils down to checking G |- J(i1/i)(i1/j) G |- J(i0/k) I don't think Cubical Agda actually performs these substitutions as it's too expensive to always substitute, but this intuitive algorithm can maybe be helpful to understand how one can typecheck cubical programs. -- Anders On Fri, Sep 4, 2020 at 1:05 AM John Leo wrote: > > I do have one further point I'd like clarified. Is the check for the r=i1 condition for transp done only when r is not known to be i0 or is it always done? For example is the check run at all when transport p (defined as "transp (? i ? p i) i0") is called? I assume not. For example in the following code > > notnot : (b : Bool) ? not (not b) ? b > notnot true = refl > notnot false = refl > > e : Bool ? Bool > e = isoToPath (iso not not notnot notnot) > > a = transp (? i ? e i) i0 true > b = transp (? _ ? Bool) i1 true > c = transp (? i ? e i) i1 true > > I get that "a" and "b" typecheck ("a" evaluates to false and "b" to true as expected) but "c" fails to typecheck with the following error, which I assume is due to "e" not being definitionally constant. But perhaps I'm still confused. > > primGlue Bool > (? .x ? > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) > ; (i = i1) ? Bool , idEquiv Bool > }) > _ .fst) > (? .x ? > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) > ; (i = i1) ? Bool , idEquiv Bool > }) > _ .snd) > != Bool of type Type > when checking that the expression transp (? i ? e i) i1 true has > type _28 > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From leo at halfaya.org Fri Sep 4 15:16:32 2020 From: leo at halfaya.org (John Leo) Date: Fri, 4 Sep 2020 06:16:32 -0700 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: Thanks so much Anders for the detailed explanation! It's extremely helpful. John On Thu, Sep 3, 2020 at 11:09 PM Anders Mortberg wrote: > Yes, John's understanding of that very opaque error message is > correct. When checking c Agda will have to verify that whenever i1=i1 > (that is "everywhere") then (? i ? e i) is a constant function. This > is clearly not the case as: > > (? i ? e i) /= (? i ? Bool) > > This is what the error message is trying to say, but e has been > unfolded too far and there is some mysterious metavariable _28. > > > Your understanding of what happens when r is i0 is also correct, in > that case the condition r=i1 is just i0=i1 which is absurd and there > is nothing to check as anything follows from an absurd assumption. > This is why a typechecks. > > > In general r is some element of dM(X), i.e. an element of the free De > Morgan algebra on some subset X of the dimension variables currently > in context. One way to check if some judgment holds when r=i1 is to > first convert r to disjunctive normal form and propagate the _=i1 all > the way down to the atoms. This gives us a big disjunction of > conjuncts where each conjunct corresponds to a list of substitutions. > For example if r is (i /\ j) \/ ~ k then r=i1 will reduce to > > ((i = i1) /\ (j = i1)) \/ (k = i0) > > To check that some judgment J holds in this context restriction > amounts to checking that it holds either when (i = i1) and (j = i1) or > when (k = i0). If I write G for the ambient context we hence need to > check > > G, (i = i1) /\ (j = i1) |- J > G, (k = i0) |- J > > which boils down to checking > > G |- J(i1/i)(i1/j) > G |- J(i0/k) > > I don't think Cubical Agda actually performs these substitutions as > it's too expensive to always substitute, but this intuitive algorithm > can maybe be helpful to understand how one can typecheck cubical > programs. > > -- > Anders > > On Fri, Sep 4, 2020 at 1:05 AM John Leo wrote: > > > > I do have one further point I'd like clarified. Is the check for the > r=i1 condition for transp done only when r is not known to be i0 or is it > always done? For example is the check run at all when transport p (defined > as "transp (? i ? p i) i0") is called? I assume not. For example in the > following code > > > > notnot : (b : Bool) ? not (not b) ? b > > notnot true = refl > > notnot false = refl > > > > e : Bool ? Bool > > e = isoToPath (iso not not notnot notnot) > > > > a = transp (? i ? e i) i0 true > > b = transp (? _ ? Bool) i1 true > > c = transp (? i ? e i) i1 true > > > > I get that "a" and "b" typecheck ("a" evaluates to false and "b" to true > as expected) but "c" fails to typecheck with the following error, which I > assume is due to "e" not being definitionally constant. But perhaps I'm > still confused. > > > > primGlue Bool > > (? .x ? > > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) > > ; (i = i1) ? Bool , idEquiv Bool > > }) > > _ .fst) > > (? .x ? > > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) > > ; (i = i1) ? Bool , idEquiv Bool > > }) > > _ .snd) > > != Bool of type Type > > when checking that the expression transp (? i ? e i) i1 true has > > type _28 > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anka.213 at gmail.com Fri Sep 4 17:03:27 2020 From: anka.213 at gmail.com (=?utf-8?Q?Andreas_K=C3=A4llberg?=) Date: Fri, 4 Sep 2020 17:03:27 +0200 Subject: [Agda] Question about transport and cubical In-Reply-To: References: Message-ID: <42F79A9E-385C-49BF-A6A9-7ED8C82085C4@gmail.com> The wording is indeed confusing. I think, by ?constant on r?, they mean ?constant when r is i1?, which is consistent with phrasing used in some other contexts in the paper, especially regarding comp, where "on ?? means ?the faces of a cube where ? is i1?. I think I?ve seen this concept being called a ?face lattice? somewhere. If we didn?t have this restriction, we could have a function like this: bad-refl : ? {?} {A B : Set ?} ? A ? B ? A ? B bad-refl p a = transp (? i ? p i) i1 a which would evaluate to bad-refl : ? {?} {A B : Set ?} ? A ? B ? A ? B bad-refl p a = refl a which obviously doesn?t type check. Regards, Andreas > On 3 Sep 2020, at 20:07, John Leo wrote: > > I'm not sure either what the author of this page meant by "A has to be constant on r". Perhaps it is just poor wording but it doesn't make sense to me either. It doesn't appear in the original Cubical Agda paper. > > If you ignore that everything else seems fine, though. The key point is that when r = i1 then transp must satisfy the additional constraint that "transp A i1 a = a" for all "a" and when r = i0 there is no additional constraint. > > John > >> On Thu, Sep 3, 2020 at 10:51 AM Manuel B?renz wrote: >> Hi, >> >> I'm just reading the docs on Agda's Cubical TT support, and stumbled over this: >> >>> transp : ? {?} (A : I ? Set ?) (r : I) (a : A i0) ? A i1 >>> >>> There is an additional side condition to be satisfied for transp A r a to type-check, which is that A has to be constant on r. This means that A should be a constant function whenever the constraint r = i1 is satisfied. >> >> https://agda.readthedocs.io/en/v2.6.1/language/cubical.html#transport >> >> I don't understand what that means. A is introduced before r. By definition, A does not depend on r, because r isn't even in scope for A. So any constraint on r doesn't have any effect on A. In fact, r never appears again in the type signature. So vacuously, A is constant on r because it doesn't use r. >> >> Probably I'm just misunderstanding something basic. >> >> Best regards, Manuel >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From dan.krejsa at gmail.com Sat Sep 5 14:06:19 2020 From: dan.krejsa at gmail.com (Dan Krejsa) Date: Sat, 5 Sep 2020 05:06:19 -0700 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: Hi, Why isn't transp declared like this: transp : ? {?} (A : I ? I ? Set ?) (r : I) ? A i0 r ? A i1 r with an intended usage that 'A s i1' is definitionally independent of s ? On Fri, Sep 4, 2020 at 6:17 AM John Leo wrote: > Thanks so much Anders for the detailed explanation! It's extremely helpful. > > John > > On Thu, Sep 3, 2020 at 11:09 PM Anders Mortberg > wrote: > >> Yes, John's understanding of that very opaque error message is >> correct. When checking c Agda will have to verify that whenever i1=i1 >> (that is "everywhere") then (? i ? e i) is a constant function. This >> is clearly not the case as: >> >> (? i ? e i) /= (? i ? Bool) >> >> This is what the error message is trying to say, but e has been >> unfolded too far and there is some mysterious metavariable _28. >> >> >> Your understanding of what happens when r is i0 is also correct, in >> that case the condition r=i1 is just i0=i1 which is absurd and there >> is nothing to check as anything follows from an absurd assumption. >> This is why a typechecks. >> >> >> In general r is some element of dM(X), i.e. an element of the free De >> Morgan algebra on some subset X of the dimension variables currently >> in context. One way to check if some judgment holds when r=i1 is to >> first convert r to disjunctive normal form and propagate the _=i1 all >> the way down to the atoms. This gives us a big disjunction of >> conjuncts where each conjunct corresponds to a list of substitutions. >> For example if r is (i /\ j) \/ ~ k then r=i1 will reduce to >> >> ((i = i1) /\ (j = i1)) \/ (k = i0) >> >> To check that some judgment J holds in this context restriction >> amounts to checking that it holds either when (i = i1) and (j = i1) or >> when (k = i0). If I write G for the ambient context we hence need to >> check >> >> G, (i = i1) /\ (j = i1) |- J >> G, (k = i0) |- J >> >> which boils down to checking >> >> G |- J(i1/i)(i1/j) >> G |- J(i0/k) >> >> I don't think Cubical Agda actually performs these substitutions as >> it's too expensive to always substitute, but this intuitive algorithm >> can maybe be helpful to understand how one can typecheck cubical >> programs. >> >> -- >> Anders >> >> On Fri, Sep 4, 2020 at 1:05 AM John Leo wrote: >> > >> > I do have one further point I'd like clarified. Is the check for the >> r=i1 condition for transp done only when r is not known to be i0 or is it >> always done? For example is the check run at all when transport p (defined >> as "transp (? i ? p i) i0") is called? I assume not. For example in the >> following code >> > >> > notnot : (b : Bool) ? not (not b) ? b >> > notnot true = refl >> > notnot false = refl >> > >> > e : Bool ? Bool >> > e = isoToPath (iso not not notnot notnot) >> > >> > a = transp (? i ? e i) i0 true >> > b = transp (? _ ? Bool) i1 true >> > c = transp (? i ? e i) i1 true >> > >> > I get that "a" and "b" typecheck ("a" evaluates to false and "b" to >> true as expected) but "c" fails to typecheck with the following error, >> which I assume is due to "e" not being definitionally constant. But perhaps >> I'm still confused. >> > >> > primGlue Bool >> > (? .x ? >> > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) >> > ; (i = i1) ? Bool , idEquiv Bool >> > }) >> > _ .fst) >> > (? .x ? >> > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) >> > ; (i = i1) ? Bool , idEquiv Bool >> > }) >> > _ .snd) >> > != Bool of type Type >> > when checking that the expression transp (? i ? e i) i1 true has >> > type _28 >> > >> > >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Mon Sep 7 12:20:48 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Mon, 7 Sep 2020 12:20:48 +0200 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: Yes, that seems a good question to me as well. Relatedly: I wanted to start improving the docs, but the Github link is broken: https://github.com/agda/agda/blob/v2.6.1/doc/user-manual/language/cubical.rst I reached the link from https://agda.readthedocs.io/en/v2.6.1/language/cubical.html On 05.09.20 14:06, Dan Krejsa wrote: > Hi, > > Why isn't transp declared like this: > > transp : ? {?} (A : I ? I ? Set ?) (r : I) ? A i0r ? A i1 r > > with an intended usage that 'A s i1' is definitionally independent of s ? > > On Fri, Sep 4, 2020 at 6:17 AM John Leo > wrote: > > Thanks so much Anders for the detailed explanation! It's extremely > helpful. > > John > > On Thu, Sep 3, 2020 at 11:09 PM Anders Mortberg > > wrote: > > Yes, John's understanding of that very opaque error message is > correct. When checking c Agda will have to verify that > whenever i1=i1 > (that is "everywhere") then (? i ? e i) is a constant > function. This > is clearly not the case as: > > (? i ? e i) /= (? i ? Bool) > > This is what the error message is trying to say, but e has been > unfolded too far and there is some mysterious metavariable _28. > > > Your understanding of what happens when r is i0 is also > correct, in > that case the condition r=i1 is just i0=i1 which is absurd and > there > is nothing to check as anything follows from an absurd assumption. > This is why a typechecks. > > > In general r is some element of dM(X), i.e. an element of the > free De > Morgan algebra on some subset X of the dimension variables > currently > in context. One way to check if some judgment holds when r=i1 > is to > first convert r to disjunctive normal form and propagate the > _=i1 all > the way down to the atoms. This gives us a big disjunction of > conjuncts where each conjunct corresponds to a list of > substitutions. > For example if r is (i /\ j) \/ ~ k then r=i1 will reduce to > > ((i = i1) /\ (j = i1)) \/ (k = i0) > > To check that some judgment J holds in this context restriction > amounts to checking that it holds either when (i = i1) and (j > = i1) or > when (k = i0). If I write G for the ambient context we hence > need to > check > > G, (i = i1) /\ (j = i1) |- J > G, (k = i0) |- J > > which boils down to checking > > G |- J(i1/i)(i1/j) > G |- J(i0/k) > > I don't think Cubical Agda actually performs these > substitutions as > it's too expensive to always substitute, but this intuitive > algorithm > can maybe be helpful to understand how one can typecheck cubical > programs. > > -- > Anders > > On Fri, Sep 4, 2020 at 1:05 AM John Leo > wrote: > > > > I do have one further point I'd like clarified. Is the check > for the r=i1 condition for transp done only when r is not > known to be i0 or is it always done? For example is the check > run at all when transport p (defined as "transp (? i ? p i) > i0") is called? I assume not. For example in the following code > > > > notnot : (b : Bool) ? not (not b) ? b > > notnot true? = refl > > notnot false = refl > > > > e : Bool ? Bool > > e = isoToPath (iso not not notnot notnot) > > > > a = transp (? i ? e i) i0 true > > b = transp (? _ ? Bool) i1 true > > c = transp (? i ? e i) i1 true > > > > I get that "a" and "b" typecheck ("a" evaluates to false and > "b" to true as expected) but "c" fails to typecheck with the > following error, which I assume is due to "e" not being > definitionally constant. But perhaps I'm still confused. > > > > primGlue Bool > > (? .x ? > >? ? (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) > >? ? ? ?; (i = i1) ? Bool , idEquiv Bool > >? ? ? ?}) > >? ? _ .fst) > > (? .x ? > >? ? (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) > >? ? ? ?; (i = i1) ? Bool , idEquiv Bool > >? ? ? ?}) > >? ? _ .snd) > > != Bool of type Type > > when checking that the expression transp (? i ? e i) i1 true has > > type _28 > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel at enigmage.de Mon Sep 7 12:37:00 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Mon, 7 Sep 2020 12:37:00 +0200 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: Thanks for all your comments. I've tried to compile it into a PR: https://github.com/agda/agda/pull/4914/ On 07.09.20 12:20, Manuel B?renz wrote: > > Yes, that seems a good question to me as well. > > Relatedly: I wanted to start improving the docs, but the Github link > is broken: > https://github.com/agda/agda/blob/v2.6.1/doc/user-manual/language/cubical.rst > > I reached the link from > https://agda.readthedocs.io/en/v2.6.1/language/cubical.html > > On 05.09.20 14:06, Dan Krejsa wrote: >> Hi, >> >> Why isn't transp declared like this: >> >> transp : ? {?} (A : I ? I ? Set ?) (r : I) ? A i0r ? A i1 r >> >> with an intended usage that 'A s i1' is definitionally independent of s ? >> >> On Fri, Sep 4, 2020 at 6:17 AM John Leo > > wrote: >> >> Thanks so much Anders for the detailed explanation! It's >> extremely helpful. >> >> John >> >> On Thu, Sep 3, 2020 at 11:09 PM Anders Mortberg >> > wrote: >> >> Yes, John's understanding of that very opaque error message is >> correct. When checking c Agda will have to verify that >> whenever i1=i1 >> (that is "everywhere") then (? i ? e i) is a constant >> function. This >> is clearly not the case as: >> >> (? i ? e i) /= (? i ? Bool) >> >> This is what the error message is trying to say, but e has been >> unfolded too far and there is some mysterious metavariable _28. >> >> >> Your understanding of what happens when r is i0 is also >> correct, in >> that case the condition r=i1 is just i0=i1 which is absurd >> and there >> is nothing to check as anything follows from an absurd >> assumption. >> This is why a typechecks. >> >> >> In general r is some element of dM(X), i.e. an element of the >> free De >> Morgan algebra on some subset X of the dimension variables >> currently >> in context. One way to check if some judgment holds when r=i1 >> is to >> first convert r to disjunctive normal form and propagate the >> _=i1 all >> the way down to the atoms. This gives us a big disjunction of >> conjuncts where each conjunct corresponds to a list of >> substitutions. >> For example if r is (i /\ j) \/ ~ k then r=i1 will reduce to >> >> ((i = i1) /\ (j = i1)) \/ (k = i0) >> >> To check that some judgment J holds in this context restriction >> amounts to checking that it holds either when (i = i1) and (j >> = i1) or >> when (k = i0). If I write G for the ambient context we hence >> need to >> check >> >> G, (i = i1) /\ (j = i1) |- J >> G, (k = i0) |- J >> >> which boils down to checking >> >> G |- J(i1/i)(i1/j) >> G |- J(i0/k) >> >> I don't think Cubical Agda actually performs these >> substitutions as >> it's too expensive to always substitute, but this intuitive >> algorithm >> can maybe be helpful to understand how one can typecheck cubical >> programs. >> >> -- >> Anders >> >> On Fri, Sep 4, 2020 at 1:05 AM John Leo > > wrote: >> > >> > I do have one further point I'd like clarified. Is the >> check for the r=i1 condition for transp done only when r is >> not known to be i0 or is it always done? For example is the >> check run at all when transport p (defined as "transp (? i ? >> p i) i0") is called? I assume not. For example in the >> following code >> > >> > notnot : (b : Bool) ? not (not b) ? b >> > notnot true? = refl >> > notnot false = refl >> > >> > e : Bool ? Bool >> > e = isoToPath (iso not not notnot notnot) >> > >> > a = transp (? i ? e i) i0 true >> > b = transp (? _ ? Bool) i1 true >> > c = transp (? i ? e i) i1 true >> > >> > I get that "a" and "b" typecheck ("a" evaluates to false >> and "b" to true as expected) but "c" fails to typecheck with >> the following error, which I assume is due to "e" not being >> definitionally constant. But perhaps I'm still confused. >> > >> > primGlue Bool >> > (? .x ? >> >? ? (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot >> notnot) >> >? ? ? ?; (i = i1) ? Bool , idEquiv Bool >> >? ? ? ?}) >> >? ? _ .fst) >> > (? .x ? >> >? ? (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot >> notnot) >> >? ? ? ?; (i = i1) ? Bool , idEquiv Bool >> >? ? ? ?}) >> >? ? _ .snd) >> > != Bool of type Type >> > when checking that the expression transp (? i ? e i) i1 >> true has >> > type _28 >> > >> > >> > >> > _______________________________________________ >> > Agda mailing list >> > Agda at lists.chalmers.se >> > https://lists.chalmers.se/mailman/listinfo/agda >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.krejsa at gmail.com Mon Sep 7 18:01:17 2020 From: dan.krejsa at gmail.com (Dan Krejsa) Date: Mon, 7 Sep 2020 09:01:17 -0700 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: Hi, > Why isn't transp declared like this: > transp : ? {?} (A : I ? I ? Set ?) (r : I) ? A i0 r ? A i1 r If one switches the order of the arguments of A, one gets instead transp: ? {?} (A : I ? I ? Set ?) (r : I) ? A r i0 ? A r i1 with the 'intended usage' that 'A i1 s' is definitionally independent of s. Ignoring that condition, that looks just like a specialization of 'transport' to the path (\i -> A r i). Which I'm guessing means that it is not strong enough, assuming transp is supposed to be stronger than transport. >From my point of view, the weird thing about the actual 'tansp' type transp : ? {?} (A : I ? Set ?) (r : I) (a : A i0) ? A i1 is one is left wondering, if A is held fix and r varies, how is 'transp A r : A i0 ? A i1' supposed to vary with r? It seems in the intended usage is never that 'A is held fixed and r varies', so why not encode that dependence by making the dependence of A on r explicit? - Dan On Mon, Sep 7, 2020 at 3:37 AM Manuel B?renz wrote: > Thanks for all your comments. I've tried to compile it into a PR: > https://github.com/agda/agda/pull/4914/ > On 07.09.20 12:20, Manuel B?renz wrote: > > Yes, that seems a good question to me as well. > > Relatedly: I wanted to start improving the docs, but the Github link is > broken: > https://github.com/agda/agda/blob/v2.6.1/doc/user-manual/language/cubical.rst > > I reached the link from > https://agda.readthedocs.io/en/v2.6.1/language/cubical.html > On 05.09.20 14:06, Dan Krejsa wrote: > > Hi, > > Why isn't transp declared like this: > > transp : ? {?} (A : I ? I ? Set ?) (r : I) ? A i0 r ? A i1 r > > > with an intended usage that 'A s i1' is definitionally independent of s ? > > > On Fri, Sep 4, 2020 at 6:17 AM John Leo wrote: > >> Thanks so much Anders for the detailed explanation! It's extremely >> helpful. >> >> John >> >> On Thu, Sep 3, 2020 at 11:09 PM Anders Mortberg >> wrote: >> >>> Yes, John's understanding of that very opaque error message is >>> correct. When checking c Agda will have to verify that whenever i1=i1 >>> (that is "everywhere") then (? i ? e i) is a constant function. This >>> is clearly not the case as: >>> >>> (? i ? e i) /= (? i ? Bool) >>> >>> This is what the error message is trying to say, but e has been >>> unfolded too far and there is some mysterious metavariable _28. >>> >>> >>> Your understanding of what happens when r is i0 is also correct, in >>> that case the condition r=i1 is just i0=i1 which is absurd and there >>> is nothing to check as anything follows from an absurd assumption. >>> This is why a typechecks. >>> >>> >>> In general r is some element of dM(X), i.e. an element of the free De >>> Morgan algebra on some subset X of the dimension variables currently >>> in context. One way to check if some judgment holds when r=i1 is to >>> first convert r to disjunctive normal form and propagate the _=i1 all >>> the way down to the atoms. This gives us a big disjunction of >>> conjuncts where each conjunct corresponds to a list of substitutions. >>> For example if r is (i /\ j) \/ ~ k then r=i1 will reduce to >>> >>> ((i = i1) /\ (j = i1)) \/ (k = i0) >>> >>> To check that some judgment J holds in this context restriction >>> amounts to checking that it holds either when (i = i1) and (j = i1) or >>> when (k = i0). If I write G for the ambient context we hence need to >>> check >>> >>> G, (i = i1) /\ (j = i1) |- J >>> G, (k = i0) |- J >>> >>> which boils down to checking >>> >>> G |- J(i1/i)(i1/j) >>> G |- J(i0/k) >>> >>> I don't think Cubical Agda actually performs these substitutions as >>> it's too expensive to always substitute, but this intuitive algorithm >>> can maybe be helpful to understand how one can typecheck cubical >>> programs. >>> >>> -- >>> Anders >>> >>> On Fri, Sep 4, 2020 at 1:05 AM John Leo wrote: >>> > >>> > I do have one further point I'd like clarified. Is the check for the >>> r=i1 condition for transp done only when r is not known to be i0 or is it >>> always done? For example is the check run at all when transport p (defined >>> as "transp (? i ? p i) i0") is called? I assume not. For example in the >>> following code >>> > >>> > notnot : (b : Bool) ? not (not b) ? b >>> > notnot true = refl >>> > notnot false = refl >>> > >>> > e : Bool ? Bool >>> > e = isoToPath (iso not not notnot notnot) >>> > >>> > a = transp (? i ? e i) i0 true >>> > b = transp (? _ ? Bool) i1 true >>> > c = transp (? i ? e i) i1 true >>> > >>> > I get that "a" and "b" typecheck ("a" evaluates to false and "b" to >>> true as expected) but "c" fails to typecheck with the following error, >>> which I assume is due to "e" not being definitionally constant. But perhaps >>> I'm still confused. >>> > >>> > primGlue Bool >>> > (? .x ? >>> > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) >>> > ; (i = i1) ? Bool , idEquiv Bool >>> > }) >>> > _ .fst) >>> > (? .x ? >>> > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) >>> > ; (i = i1) ? Bool , idEquiv Bool >>> > }) >>> > _ .snd) >>> > != Bool of type Type >>> > when checking that the expression transp (? i ? e i) i1 true has >>> > type _28 >>> > >>> > >>> > >>> > _______________________________________________ >>> > Agda mailing list >>> > Agda at lists.chalmers.se >>> > https://lists.chalmers.se/mailman/listinfo/agda >>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > > _______________________________________________ > Agda mailing listAgda at lists.chalmers.sehttps://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing listAgda at lists.chalmers.sehttps://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersmortberg at gmail.com Tue Sep 8 10:42:06 2020 From: andersmortberg at gmail.com (Anders Mortberg) Date: Tue, 8 Sep 2020 10:42:06 +0200 Subject: [Agda] Fwd: Fwd: Question about transport and cubical In-Reply-To: References: <752441ef-c63a-b546-0faf-18ba6c917fb2@enigmage.de> <60B09697-680D-43A7-8DF8-1F8C44DFA0CD@exmail.nottingham.ac.uk> Message-ID: I don't really see why this operation would be simpler to understand than the standard transp, but what is crucial for making things work is that we can use transp to define all of the coe^r->s operations from cartesian cubical type theory: https://github.com/agda/cubical/blob/master/Cubical/Foundations/CartesianKanOps.agda -- Anders On Mon, Sep 7, 2020 at 5:57 PM Dan Krejsa wrote: > > Hi, > > > Why isn't transp declared like this: > > transp : ? {?} (A : I ? I ? Set ?) (r : I) ? A i0 r ? A i1 r > > If one switches the order of the arguments of A, one gets instead > > transp: ? {?} (A : I ? I ? Set ?) (r : I) ? A r i0 ? A r i1 > > with the 'intended usage' that 'A i1 s' is definitionally independent of s. > > Ignoring that condition, that looks just like a specialization of 'transport' to > the path (\i -> A r i). Which I'm guessing means that it is not strong enough, > assuming transp is supposed to be stronger than transport. > > From my point of view, the weird thing about the actual 'tansp' type > > transp : ? {?} (A : I ? Set ?) (r : I) (a : A i0) ? A i1 > > is one is left wondering, if A is held fix and r varies, how is > > 'transp A r : A i0 ? A i1' supposed to vary with r? > > It seems in the intended usage is never that 'A is held fixed and r varies', so why > not encode that dependence by making the dependence of A on r explicit? > > - Dan > > > > On Mon, Sep 7, 2020 at 3:37 AM Manuel B?renz wrote: >> >> Thanks for all your comments. I've tried to compile it into a PR: https://github.com/agda/agda/pull/4914/ >> >> On 07.09.20 12:20, Manuel B?renz wrote: >> >> Yes, that seems a good question to me as well. >> >> Relatedly: I wanted to start improving the docs, but the Github link is broken: https://github.com/agda/agda/blob/v2.6.1/doc/user-manual/language/cubical.rst >> >> I reached the link from https://agda.readthedocs.io/en/v2.6.1/language/cubical.html >> >> On 05.09.20 14:06, Dan Krejsa wrote: >> >> Hi, >> >> Why isn't transp declared like this: >> >> transp : ? {?} (A : I ? I ? Set ?) (r : I) ? A i0 r ? A i1 r >> >> with an intended usage that 'A s i1' is definitionally independent of s ? >> >> >> On Fri, Sep 4, 2020 at 6:17 AM John Leo wrote: >>> >>> Thanks so much Anders for the detailed explanation! It's extremely helpful. >>> >>> John >>> >>> On Thu, Sep 3, 2020 at 11:09 PM Anders Mortberg wrote: >>>> >>>> Yes, John's understanding of that very opaque error message is >>>> correct. When checking c Agda will have to verify that whenever i1=i1 >>>> (that is "everywhere") then (? i ? e i) is a constant function. This >>>> is clearly not the case as: >>>> >>>> (? i ? e i) /= (? i ? Bool) >>>> >>>> This is what the error message is trying to say, but e has been >>>> unfolded too far and there is some mysterious metavariable _28. >>>> >>>> >>>> Your understanding of what happens when r is i0 is also correct, in >>>> that case the condition r=i1 is just i0=i1 which is absurd and there >>>> is nothing to check as anything follows from an absurd assumption. >>>> This is why a typechecks. >>>> >>>> >>>> In general r is some element of dM(X), i.e. an element of the free De >>>> Morgan algebra on some subset X of the dimension variables currently >>>> in context. One way to check if some judgment holds when r=i1 is to >>>> first convert r to disjunctive normal form and propagate the _=i1 all >>>> the way down to the atoms. This gives us a big disjunction of >>>> conjuncts where each conjunct corresponds to a list of substitutions. >>>> For example if r is (i /\ j) \/ ~ k then r=i1 will reduce to >>>> >>>> ((i = i1) /\ (j = i1)) \/ (k = i0) >>>> >>>> To check that some judgment J holds in this context restriction >>>> amounts to checking that it holds either when (i = i1) and (j = i1) or >>>> when (k = i0). If I write G for the ambient context we hence need to >>>> check >>>> >>>> G, (i = i1) /\ (j = i1) |- J >>>> G, (k = i0) |- J >>>> >>>> which boils down to checking >>>> >>>> G |- J(i1/i)(i1/j) >>>> G |- J(i0/k) >>>> >>>> I don't think Cubical Agda actually performs these substitutions as >>>> it's too expensive to always substitute, but this intuitive algorithm >>>> can maybe be helpful to understand how one can typecheck cubical >>>> programs. >>>> >>>> -- >>>> Anders >>>> >>>> On Fri, Sep 4, 2020 at 1:05 AM John Leo wrote: >>>> > >>>> > I do have one further point I'd like clarified. Is the check for the r=i1 condition for transp done only when r is not known to be i0 or is it always done? For example is the check run at all when transport p (defined as "transp (? i ? p i) i0") is called? I assume not. For example in the following code >>>> > >>>> > notnot : (b : Bool) ? not (not b) ? b >>>> > notnot true = refl >>>> > notnot false = refl >>>> > >>>> > e : Bool ? Bool >>>> > e = isoToPath (iso not not notnot notnot) >>>> > >>>> > a = transp (? i ? e i) i0 true >>>> > b = transp (? _ ? Bool) i1 true >>>> > c = transp (? i ? e i) i1 true >>>> > >>>> > I get that "a" and "b" typecheck ("a" evaluates to false and "b" to true as expected) but "c" fails to typecheck with the following error, which I assume is due to "e" not being definitionally constant. But perhaps I'm still confused. >>>> > >>>> > primGlue Bool >>>> > (? .x ? >>>> > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) >>>> > ; (i = i1) ? Bool , idEquiv Bool >>>> > }) >>>> > _ .fst) >>>> > (? .x ? >>>> > (? { (i = i0) ? Bool , isoToEquiv (iso not not notnot notnot) >>>> > ; (i = i1) ? Bool , idEquiv Bool >>>> > }) >>>> > _ .snd) >>>> > != Bool of type Type >>>> > when checking that the expression transp (? i ? e i) i1 true has >>>> > type _28 >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > Agda mailing list >>>> > Agda at lists.chalmers.se >>>> > https://lists.chalmers.se/mailman/listinfo/agda >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From marko at dimjasevic.net Wed Sep 9 09:00:10 2020 From: marko at dimjasevic.net (Marko =?UTF-8?Q?Dimja=C5=A1evi=C4=87?=) Date: Wed, 09 Sep 2020 09:00:10 +0200 Subject: [Agda] Resolving a universe level problem Message-ID: Dear Agda community, I've been working out an alternative formalisation of De Bruijn indices to that of provided in a book Programming Language Foundations in Agda: https://plfa.github.io/DeBruijn/#13523 #_ : ? {?} ? (n : ?) ? ? ? lookup ? n # n = ` count n My goal is to define an alternative #_ under the name #'_ such that it relies on no postulates, which are used in functions count and lookup that #_ depends on. I guess it should be possible to check statically that the index provided does not go out of context bounds. However, I am stuck with a universe level problem that I could use your help with. In my attempt I end up with an error reading: /home/marko/projects/agda/plfa-exercises/plfa/DeBruijn.agda:104,42-60 Set !=< suc n Nat.? Context-size ? of type Set? when checking that the expression n < Context-size ? has type n < Context-size ? with the first line of #'_ highlighted in yellow, indicating the problem in the return type of #'_. Here is a self-contained code excerpt that leads to the error (my apologies for not having a shorter snippet): module DeBruijn where open import Data.Empty using (?) open import Data.Nat as Nat using (?; zero; suc; _<_; s?s; z?n) open import Data.Nat.Properties using (?-pred) open import Data.Unit using (?; tt) infix 4 _?_ infix 4 _?_ infixl 5 _,_ infixr 7 _?_ infix 5 ?_ infix 5 ?_ infixl 7 _?_ infix 8 `suc_ infix 9 `_ infix 9 S_ -- Types data Type : Set where _?_ : Type ? Type ? Type `? : Type -- Contexts data Context : Set where ? : Context _,_ : Context ? Type ? Context Context-size : Context ? ? Context-size ? = zero Context-size (c , _) = suc (Context-size c) -- Variables and the lookup judgment data _?_ : Context ? Type ? Set where Z : ? {? A} --------- ? ? , A ? A S_ : ? {? A B} ? ? ? A --------- ? ? , B ? A -- Terms and the typing judgment data _?_ : Context ? Type ? Set where `_ : ? {? A} ? ? ? A ----- ? ? ? A ?_ : ? {? A B} ? ? , A ? B --------- ? ? ? A ? B _?_ : ? {? A B} ? ? ? A ? B ? ? ? A --------- ? ? ? B `zero : ? {?} --------- ? ? ? `? `suc_ : ? {?} ? ? ? `? ------ ? ? ? `? case : ? {? A} ? ? ? `? ? ? ? A ? ? , `? ? A ---------- ? ? ? A ?_ : ? {? A} ? ? , A ? A --------- ? ? ? A lookup' : (c : Context) ? (n : ?) ? (n < Context-size c) ? Type lookup' (_ , A) zero _ = A lookup' (? , _) (suc n) ?-suc = lookup' ? n (?-pred ?-suc) count' : ? {?} ? (n : ?) ? (s : n < Context-size ?) ? ? ? lookup' ? n s count' {_ , _} zero _ = Z count' {? , A} (suc n) ?-suc = S (count' n (?-pred ?-suc)) _??_ : ? (m n : ?) ? Set zero ?? n = ? suc m ?? zero = ? suc m ?? suc n = m ?? n soundness-< : ?(m n : ?) ? suc m ?? n ? m < n soundness-< zero (suc n) tt = s?s z?n soundness-< (suc m) (suc n) m??n = s?s (soundness-< m n m??n) #'_ : ? {?} ? (n : ?) ? ? ? lookup' ? n (n < Context-size ?) #'_ {?} n = ` count' n (soundness-< n (Context-size ?) tt) -- Regards, Marko Dimja?evi? https://dimjasevic.net/marko Mastodon: https://mamot.fr/@mdimjasevic PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA Learn email self-defense! https://emailselfdefense.fsf.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From Jesper at sikanda.be Wed Sep 9 09:12:16 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Wed, 9 Sep 2020 09:12:16 +0200 Subject: [Agda] Resolving a universe level problem In-Reply-To: References: Message-ID: Hi Marco, Here Agda is complaining that you gave it a type (something of type `Set`), but it expected something of type `suc n Nat.? Context-size ?`. Indeed, you gave `n < Context-size ?` in the type of #'_, but you should've given a *proof* of that type. One way to fix the problem is by adding an extra argument of this type to the function `#'_`. By adding an argument of this type, you make explicit the precondition that the number `n` should not be greater than the length of the context, which was implicit in the plfa version. -- Jesper On Wed, Sep 9, 2020 at 9:01 AM Marko Dimja?evi? wrote: > Dear Agda community, > > I've been working out an alternative formalisation of De Bruijn indices to > that of provided in a book Programming Language Foundations in Agda: > > https://plfa.github.io/DeBruijn/#13523 > > #_ : ? {?} ? (n : ?) ? ? ? lookup ? n > # n = ` count n > > My goal is to define an alternative #_ under the name #'_ such that it > relies on no postulates, which are used in functions count and lookup that > #_ depends on. I guess it should be possible to check statically that the > index provided does not go out of context bounds. However, I am stuck with > a universe level problem that I could use your help with. > > > In my attempt I end up with an error reading: > > /home/marko/projects/agda/plfa-exercises/plfa/DeBruijn.agda:104,42-60 > Set !=< suc n Nat.? Context-size ? of type Set? > when checking that the expression n < Context-size ? has type > n < Context-size ? > > with the first line of #'_ highlighted in yellow, indicating the problem in > the return type of #'_. > > Here is a self-contained code excerpt that leads to the error (my apologies > for not having a shorter snippet): > > > module DeBruijn where > > open import Data.Empty using (?) > open import Data.Nat as Nat using (?; zero; suc; _<_; s?s; z?n) > open import Data.Nat.Properties using (?-pred) > open import Data.Unit using (?; tt) > > infix 4 _?_ > infix 4 _?_ > infixl 5 _,_ > > infixr 7 _?_ > > infix 5 ?_ > infix 5 ?_ > infixl 7 _?_ > infix 8 `suc_ > infix 9 `_ > infix 9 S_ > > -- Types > data Type : Set where > _?_ : Type ? Type ? Type > `? : Type > > -- Contexts > data Context : Set where > ? : Context > _,_ : Context ? Type ? Context > > Context-size : Context ? ? > Context-size ? = zero > Context-size (c , _) = suc (Context-size c) > > -- Variables and the lookup judgment > data _?_ : Context ? Type ? Set where > > Z : ? {? A} > --------- > ? ? , A ? A > > S_ : ? {? A B} > ? ? ? A > --------- > ? ? , B ? A > > -- Terms and the typing judgment > data _?_ : Context ? Type ? Set where > > `_ : ? {? A} > ? ? ? A > ----- > ? ? ? A > > ?_ : ? {? A B} > ? ? , A ? B > --------- > ? ? ? A ? B > > _?_ : ? {? A B} > ? ? ? A ? B > ? ? ? A > --------- > ? ? ? B > > `zero : ? {?} > --------- > ? ? ? `? > > `suc_ : ? {?} > ? ? ? `? > ------ > ? ? ? `? > > case : ? {? A} > ? ? ? `? > ? ? ? A > ? ? , `? ? A > ---------- > ? ? ? A > > ?_ : ? {? A} > ? ? , A ? A > --------- > ? ? ? A > > lookup' : (c : Context) ? (n : ?) ? (n < Context-size c) ? Type > lookup' (_ , A) zero _ = A > lookup' (? , _) (suc n) ?-suc = lookup' ? n (?-pred ?-suc) > > count' : ? {?} ? (n : ?) ? (s : n < Context-size ?) ? ? ? lookup' ? n s > count' {_ , _} zero _ = Z > count' {? , A} (suc n) ?-suc = S (count' n (?-pred ?-suc)) > > _??_ : ? (m n : ?) ? Set > zero ?? n = ? > suc m ?? zero = ? > suc m ?? suc n = m ?? n > > soundness-< : ?(m n : ?) ? suc m ?? n ? m < n > soundness-< zero (suc n) tt = s?s z?n > soundness-< (suc m) (suc n) m??n = s?s (soundness-< m n m??n) > > #'_ : ? {?} ? (n : ?) ? ? ? lookup' ? n (n < Context-size ?) > #'_ {?} n = ` count' n (soundness-< n (Context-size ?) tt) > > > -- > Regards, > Marko Dimja?evi? > https://dimjasevic.net/marko > Mastodon: https://mamot.fr/@mdimjasevic > PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA > Learn email self-defense! https://emailselfdefense.fsf.org > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marko at dimjasevic.net Wed Sep 9 12:31:55 2020 From: marko at dimjasevic.net (Marko =?UTF-8?Q?Dimja=C5=A1evi=C4=87?=) Date: Wed, 09 Sep 2020 12:31:55 +0200 Subject: [Agda] Resolving a universe level problem In-Reply-To: References: Message-ID: Dear Jesper, On Wed, 2020-09-09 at 09:12 +0200, Jesper Cockx wrote: > > Here Agda is complaining that you gave it a type (something of type > `Set`), but it expected something of type `suc n Nat.? Context-size ?`. > Indeed, you gave `n < Context-size ?` in the type of #'_, but you > should've given a *proof* of that type. One way to fix the problem is by > adding an extra argument of this type to the function `#'_`. By adding an > argument of this type, you make explicit the precondition that the number > `n` should not be greater than the length of the context, which was > implicit in the plfa version. Jesper, thank you a lot for pointing this out! You're right, I confused a theorem for a proof. This got it working: #'_ : ? {?} ? (n : ?) ? {s : suc n ?? (Context-size ?)} ? ? ? lookup' ? n (soundness-< n (Context-size ?) s) #'_ {?} n {s} = ` count' n (soundness-< n (Context-size ?) s) Now #'_ can be used the same way as #_ without making the user provide an explicit within-context-bounds proof. -- Kind regards, Marko -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From marko at dimjasevic.net Fri Sep 11 08:50:42 2020 From: marko at dimjasevic.net (Marko =?UTF-8?Q?Dimja=C5=A1evi=C4=87?=) Date: Fri, 11 Sep 2020 08:50:42 +0200 Subject: [Agda] Multi-line comments in literate Agda files Message-ID: Dear all, Is it possible to write multi-line comments in literate Agda files? I have a file with a .lagda.md filename extension loaded in the Agda Emacs mode (defined in 'agda2-mode.el'). I'm making some changes to the code in it and because type-checking takes so much time (when loading a file with C-c C- l), I'd like to comment out the part of the file below my changes such that I don't waste time on type-checking definitions that are not affecting my changes. I attempted to comment out that part of the file by enclosing it in {- and -}, however, that doesn't comment it out. It looks like the first code block nullifies the opening multi-line comment delimiter. For example, in the following snippet: {- Given the above, we can convert a natural to a corresponding de Bruijn index, looking up its type in the context: ``` count : ? {?} ? (n : ?) ? (p : n < length ?) ? ? ? lookup ? n p count {_ , _} zero _ = Z count {? , _} (suc n) (s?s p) = S (count n p) ``` -} the part that start the code block, i.e. ```, ends the comment span and start a code block that gets type-checked. Is this a bug or a feature? Should I be writing multi-line comments in literate Agda files in some other way? -- Regards, Marko Dimja?evi? https://dimjasevic.net/marko Mastodon: https://mamot.fr/@mdimjasevic PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA Learn email self-defense! https://emailselfdefense.fsf.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From Jesper at sikanda.be Fri Sep 11 09:45:08 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 11 Sep 2020 09:45:08 +0200 Subject: [Agda] Multi-line comments in literate Agda files In-Reply-To: References: Message-ID: Hi Marko, I believe the literal Agda mode *only* looks at the parts between the begin- and end-code markers (in this case ```). This includes begin- and end-comment markers, so in this case they are ignored. One trick you could use is to put some text immediately after the first triple backtick, which will cause Agda to ignore the whole block. E.g. ```ignore count : ? {?} ? (n : ?) ? (p : n < length ?) ? ? ? lookup ? n p count {_ , _} zero _ = Z count {? , _} (suc n) (s?s p) = S (count n p) ``` Hope that helps! -- Jesper On Fri, Sep 11, 2020 at 8:51 AM Marko Dimja?evi? wrote: > Dear all, > > Is it possible to write multi-line comments in literate Agda files? I have > a file with a .lagda.md filename extension loaded in the Agda Emacs mode > (defined in 'agda2-mode.el'). I'm making some changes to the code in it and > because type-checking takes so much time (when loading a file with C-c C- > l), I'd like to comment out the part of the file below my changes such that > I don't waste time on type-checking definitions that are not affecting my > changes. > > I attempted to comment out that part of the file by enclosing it in {- and > -}, however, that doesn't comment it out. It looks like the first code > block nullifies the opening multi-line comment delimiter. For example, in > the following snippet: > > {- > Given the above, we can convert a natural to a corresponding > de Bruijn index, looking up its type in the context: > ``` > count : ? {?} ? (n : ?) ? (p : n < length ?) ? ? ? lookup ? n p > count {_ , _} zero _ = Z > count {? , _} (suc n) (s?s p) = S (count n p) > ``` > -} > > > the part that start the code block, i.e. ```, ends the comment span and > start a code block that gets type-checked. > > Is this a bug or a feature? > > Should I be writing multi-line comments in literate Agda files in some > other way? > > > -- > Regards, > Marko Dimja?evi? > https://dimjasevic.net/marko > Mastodon: https://mamot.fr/@mdimjasevic > PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA > Learn email self-defense! https://emailselfdefense.fsf.org > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marko at dimjasevic.net Fri Sep 11 15:01:33 2020 From: marko at dimjasevic.net (Marko =?UTF-8?Q?Dimja=C5=A1evi=C4=87?=) Date: Fri, 11 Sep 2020 15:01:33 +0200 Subject: [Agda] Multi-line comments in literate Agda files In-Reply-To: References: Message-ID: <077a819ddbac3d820d82cd402ca0ec20b7e7fdcb.camel@dimjasevic.net> Hi Jesper, On Fri, 2020-09-11 at 09:45 +0200, Jesper Cockx wrote: > Hi Marko, > > I believe the literal Agda mode *only* looks at the parts between the > begin- and end-code markers (in this case ```). This includes begin- and > end-comment markers, so in this case they are ignored. One trick you > could use is to put some text immediately after the first triple > backtick, which will cause Agda to ignore the whole block. E.g. > > ```ignore > count : ? {?} ? (n : ?) ? (p : n < length ?) ? ? ? lookup ? n p > count {_ , _} zero _ = Z > count {? , _} (suc n) (s?s p) = S (count n p) > ``` Thanks for the pointer, but my hope was I can comment out half a file in one stroke, and this isn't it as there are lots of code blocks I'd have to invalidate in isolation per your suggestion. For now I'm copying the relevant definitions into a separate self-contained file/buffer and type-checking that until it is done, and then I copy back to the original literate Agda file the updates I just made in the separate buffer. It ain't the best experience, but it is faster than type-checking the whole literate file. -- Cheers, Marko -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From jonas.hoefer at stud.htwk-leipzig.de Fri Sep 11 15:08:59 2020 From: jonas.hoefer at stud.htwk-leipzig.de (jonas.hoefer at stud.htwk-leipzig.de) Date: Fri, 11 Sep 2020 15:08:59 +0200 Subject: [Agda] Size Issue when Modelling Effectful Data Structures and Computations Message-ID: Hello, I have a problem involving universe levels. I'm trying to implement scoped effects (based on "Effect Handlers in Scope" by Wu et al.) in Agda. I follow the the higher order approach from the paper. It models effects using a free monad over a higher order functor. The approach leads to a tree structure with an existential type in (potential) every node. I would like to store special data types which use the tree type itself in the existential type variable, but this obviously leads to size issues. I have outlined the problem and some ideas in the following gist. It contains a minimal example of the structure and a larger example for context. https://gist.github.com/JonasHoefer/f0a61744b1cb9cf1f649cfe3bcf414bb I'm not sure how to proceed at this point. Are there any standard approaches to deal with or transform this kind of size issues? Storing arbitrary types of the same level is of course not possible, but I'm dealing with just a limited set of "too large" data types (i.e. just those which continue the tree). This is not witnessed by the implementation but I don't know how to use this fact. Would it be possible (and practical) to work with always increasing universe levels? Thanks, Jonas From nad at cse.gu.se Fri Sep 11 15:11:06 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Fri, 11 Sep 2020 15:11:06 +0200 Subject: [Agda] Multi-line comments in literate Agda files In-Reply-To: <077a819ddbac3d820d82cd402ca0ec20b7e7fdcb.camel@dimjasevic.net> References: <077a819ddbac3d820d82cd402ca0ec20b7e7fdcb.camel@dimjasevic.net> Message-ID: <07f8b971-bcc5-2330-eeb9-638aebd81418@cse.gu.se> On 2020-09-11 15:01, Marko Dimja?evi? wrote: > Thanks for the pointer, but my hope was I can comment out half a file in > one stroke, and this isn't it as there are lots of code blocks I'd have to > invalidate in isolation per your suggestion. The following seems to work: ``` {-# OPTIONS --warning=noOverlappingTokensWarning #-} {- ``` ``` -} ``` -- /NAD From manuel at enigmage.de Fri Sep 11 15:23:07 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Fri, 11 Sep 2020 15:23:07 +0200 Subject: [Agda] Size Issue when Modelling Effectful Data Structures and Computations In-Reply-To: References: Message-ID: Hi Jonas, Great that you're implementing scoped effects! I'm not the greatest Agda expert, but I had a similar problem once and I solved it by making all set levels as polymorphic as possible. You'd have to index (or parametrise? I always confuse them) every record type by set levels, e.g. record Container {l} : Set (lsuc l) or something like that. Manuel On 11.09.20 15:08, jonas.hoefer at stud.htwk-leipzig.de wrote: > Hello, > > I have a problem involving universe levels. > > I'm trying to implement scoped effects (based on "Effect Handlers in Scope" > by Wu et al.) in Agda. I follow the the higher order approach from the paper. > It models effects using a free monad over a higher order functor. > > The approach leads to a tree structure with an existential type in > (potential) every node. I would like to store special data types which use > the tree type itself in the existential type variable, but this obviously > leads to size issues. I have outlined the problem and some ideas in the > following gist. It contains a minimal example of the structure and a larger > example for context. > > https://gist.github.com/JonasHoefer/f0a61744b1cb9cf1f649cfe3bcf414bb > > I'm not sure how to proceed at this point. Are there any standard approaches > to deal with or transform this kind of size issues? > Storing arbitrary types of the same level is of course not possible, but I'm > dealing with just a limited set of "too large" data types (i.e. just those > which continue the tree). This is not witnessed by the implementation but I > don't know how to use this fact. > Would it be possible (and practical) to work with always increasing universe > levels? > > Thanks, > Jonas > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From u.zalakain.1 at research.gla.ac.uk Fri Sep 11 20:02:19 2020 From: u.zalakain.1 at research.gla.ac.uk (Uma Zalakain (PGR)) Date: Fri, 11 Sep 2020 18:02:19 +0000 Subject: [Agda] Multi-line comments in literate Agda files In-Reply-To: <077a819ddbac3d820d82cd402ca0ec20b7e7fdcb.camel@dimjasevic.net> References: , <077a819ddbac3d820d82cd402ca0ec20b7e7fdcb.camel@dimjasevic.net> Message-ID: Hi Marko, Maybe commenting with '--' could be a temporary workaround? Prepending '-- ' to every line in an emacs buffer (assuming evil mode) should only take a few keystrokes, and can be made into a macro (and same for uncommenting). It might prevent Agda from interpretting triple backtics as the end of comments. Hope it helps, Uma --- pronoun: she website: umazalakain.info twitter: @typer_uma desk: SAWB F112 ________________________________ From: Agda on behalf of Marko Dimja?evi? Sent: 11 September 2020 14:01 To: Jesper Cockx Cc: agda list Subject: Re: [Agda] Multi-line comments in literate Agda files Hi Jesper, On Fri, 2020-09-11 at 09:45 +0200, Jesper Cockx wrote: > Hi Marko, > > I believe the literal Agda mode *only* looks at the parts between the > begin- and end-code markers (in this case ```). This includes begin- and > end-comment markers, so in this case they are ignored. One trick you > could use is to put some text immediately after the first triple > backtick, which will cause Agda to ignore the whole block. E.g. > > ```ignore > count : ? {?} ? (n : ?) ? (p : n < length ?) ? ? ? lookup ? n p > count {_ , _} zero _ = Z > count {? , _} (suc n) (s?s p) = S (count n p) > ``` Thanks for the pointer, but my hope was I can comment out half a file in one stroke, and this isn't it as there are lots of code blocks I'd have to invalidate in isolation per your suggestion. For now I'm copying the relevant definitions into a separate self-contained file/buffer and type-checking that until it is done, and then I copy back to the original literate Agda file the updates I just made in the separate buffer. It ain't the best experience, but it is faster than type-checking the whole literate file. -- Cheers, Marko -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Fri Sep 11 21:56:20 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 11 Sep 2020 21:56:20 +0200 Subject: [Agda] Agda Implementors' Meeting XXXIII: Call for talks and participation Message-ID: The thirty-third Agda Implementors' Meeting will take place online from Monday 2020-10-12 to Friday 2020-10-23. The meeting will be organized in a similar way to AIM XXXII, with a reduced program spread over two weeks. See the wiki for details: https://wiki.portal.chalmers.se/agda/Main/AIMXXXIII You can register by sending me an email at jesper at sikanda.be, or by editing the wiki page directly. Please also send me an email if you would like to give a talk, preferably before 2020-10-05. Best regards, Jesper -------------- next part -------------- An HTML attachment was scrubbed... URL: From marko at dimjasevic.net Fri Sep 11 22:39:21 2020 From: marko at dimjasevic.net (Marko =?UTF-8?Q?Dimja=C5=A1evi=C4=87?=) Date: Fri, 11 Sep 2020 22:39:21 +0200 Subject: [Agda] Multi-line comments in literate Agda files In-Reply-To: <07f8b971-bcc5-2330-eeb9-638aebd81418@cse.gu.se> References: <077a819ddbac3d820d82cd402ca0ec20b7e7fdcb.camel@dimjasevic.net> <07f8b971-bcc5-2330-eeb9-638aebd81418@cse.gu.se> Message-ID: <411d4d3ddb5ebd5d7b4e43f26eed2f3ca2270266.camel@dimjasevic.net> On Fri, 2020-09-11 at 15:11 +0200, Nils Anders Danielsson wrote: > > The following seems to work: > > ``` > {-# OPTIONS --warning=noOverlappingTokensWarning #-} > > {- > ``` > > ``` > -} > ``` Thank you Nils, that did the trick! I just had to put the pragma at the very beginning of the file. Opening a multi-line comment in a code block then comments out everything until the closing delimiter. Uma, thank you for your suggestion! What Nils proposed requires less typing from me, so I'll go with his proposal. -- Kind regards, Marko -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From effectfully at gmail.com Sat Sep 12 13:13:33 2020 From: effectfully at gmail.com (Roman) Date: Sat, 12 Sep 2020 14:13:33 +0300 Subject: [Agda] Multi-line comments in literate Agda files In-Reply-To: <411d4d3ddb5ebd5d7b4e43f26eed2f3ca2270266.camel@dimjasevic.net> References: <077a819ddbac3d820d82cd402ca0ec20b7e7fdcb.camel@dimjasevic.net> <07f8b971-bcc5-2330-eeb9-638aebd81418@cse.gu.se> <411d4d3ddb5ebd5d7b4e43f26eed2f3ca2270266.camel@dimjasevic.net> Message-ID: > Uma, thank you for your suggestion! What Nils proposed requires less typing from me, so I'll go with his proposal. You can type C-c C-x M-; and that will comment out everything below the line you're at (including the line). From jonas.hoefer at stud.htwk-leipzig.de Sat Sep 12 14:11:09 2020 From: jonas.hoefer at stud.htwk-leipzig.de (jonas.hoefer at stud.htwk-leipzig.de) Date: Sat, 12 Sep 2020 14:11:09 +0200 Subject: [Agda] Size Issue when Modelling Effectful Data Structures and Computations In-Reply-To: References: Message-ID: <53213155d8ee2443acde58da5a8a32cf.squirrel@webmail.htwk-leipzig.de> Hi Manuel, thanks for your answer. > Great that you're implementing scoped effects! I'm glad you're interested! Scoped effects them self already work. Currently I'm primarily trying to add effectful data structures to an implementation without explicit scope delimiters, but this turned out to be quite difficult. > You'd have to index (or parametrise? I always confuse them) every record type > by set levels, e.g. record Container {l} : Set (lsuc l) or something > like that. I already did some experiments with a level polymorphic implementation, but things got complicated rather fast. As far as I can tell, parameterizing the implementation just allows to push the problem up a level? (potentially infinitely often; hence my original question about the practicality of working with increasing universe levels). Please correct me if I'm wrong about the increasing levels. I did some more experiments and wrote up another sketch using universe polymorphism. It's probably not the cleanest implementation of the idea, but it demonstrates some consequences. https://gist.github.com/JonasHoefer/0e3940b8c2a7264fde06aea5ddd967c0 It's now possible to pass data structures to scoped effects, but implementation comes with it's one set of problems thanks to the universe polymorphism. The computation has to be lifted manually via up : Free ℓ C A → Free (suc ℓ) C A which has to be implemented per effect/via a type class to lift the shape type. Effects have to work on every level and therefore are of kind Setω. Therefore I'm not sure if this approach works when writing larger programs were computations and data from different levels have to interact (especially lifting between two unrelated levels). While writing the sketch I noticed another problem with this approach I'm not sure how to deal with. When mapping a scoped effect over an effectful data structure (a prime candidate would be sharing of nondeterminism) the level of the outermost computation increases by the depth of the structure. This would imply that the level of the result depends on data and that to find bounds for the level all branches of computation have to be traversed (but the branches of Free are described by positions functions i.e. the second element of ⟦ C ⟧ ...). This seems impractical if not impossible. At this point I unfortunately out of ideas on how to improve this approach. Thanks, Jonas ?: See the last example. The Shape contains the captured computation (Free ...), but Free contains a Shape in the impure constructor. The second Free therefore has to be larger (which is now possible thanks to universe polymorphism). From ulf.norell at gmail.com Mon Sep 14 10:04:15 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Mon, 14 Sep 2020 10:04:15 +0200 Subject: [Agda] [ANNOUNCE] Agda 2.6.1.1 Message-ID: Dear all, The Agda Team is pleased to announce the release of Agda 2.6.1.1. Version 2.6.1.1 is exactly the same as 2.6.1 except it can be built with ghc 8.10.2. Installation: cabal update && cabal install Agda Enjoy! / Ulf -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Mon Sep 14 14:40:24 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 14 Sep 2020 14:40:24 +0200 Subject: [Agda] Size Issue when Modelling Effectful Data Structures and Computations In-Reply-To: <53213155d8ee2443acde58da5a8a32cf.squirrel@webmail.htwk-leipzig.de> References: <53213155d8ee2443acde58da5a8a32cf.squirrel@webmail.htwk-leipzig.de> Message-ID: On 2020-09-12 14:11, jonas.hoefer at stud.htwk-leipzig.de wrote: > Please correct me if I'm wrong about the increasing levels. I did some > more experiments and wrote up another sketch using universe > polymorphism. It's probably not the cleanest implementation of the > idea, but it demonstrates some consequences. > > https://gist.github.com/JonasHoefer/0e3940b8c2a7264fde06aea5ddd967c0 In that code you use Set?. I took your first example and made it universe-polymorphic in a more normal way. Note that the last example works fine: {-# OPTIONS --cumulativity #-} open import Data.Bool open import Data.Product open import Data.Sum open import Data.Unit open import Data.Maybe open import Level private variable a : Level record Container a : Set (suc a) where constructor _?_/_ field Shape : Set a Pos : Shape ? Set a Ctx : (s : Shape) ? Pos s ? Maybe {a = suc a} (Set a) open Container public ?_? : Container a ? (Set a ? Set a) ? Set a ? Set a ? S ? P / C ? F A = ?[ s ? S ] ((p : P s) ? F (fromMaybe A (C s p))) data Free (C : Container a) (A : Set a) : Set a where pure : A ? Free C A impure : ? C ? (Free C) A ? Free C A data List? (C : Container a) (A : Set a) : Set a where nil : List? C A cons : Free C A ? Free C (List? C A) ? List? C A data OpShape a : Set (suc a) where op? : (X : Set a) ? OpShape a OpPos : OpShape a ? Set a OpPos (op? X) = ? ? X OpCtx : (s : OpShape a) ? OpPos s ? Maybe (Set (suc a)) OpCtx (op? X) (inj? tt) = just X OpCtx (op? X) (inj? x) = nothing Op : ? a ? Container (suc a) Op a = OpShape a ? OpPos / OpCtx op : {A : Set a} ? Free (Op a) A ? Free (Op a) A op {A = A} ma = impure (op? A , ? { (inj? tt) ? ma; (inj? x) ? pure x }) foo bar : Free (Op a) (List? (Op a) Bool) foo = pure nil bar = op foo -- /NAD From jonas.hoefer at stud.htwk-leipzig.de Tue Sep 15 10:10:02 2020 From: jonas.hoefer at stud.htwk-leipzig.de (jonas.hoefer at stud.htwk-leipzig.de) Date: Tue, 15 Sep 2020 10:10:02 +0200 Subject: [Agda] Size Issue when Modelling Effectful Data Structures and Computations In-Reply-To: References: <53213155d8ee2443acde58da5a8a32cf.squirrel@webmail.htwk-leipzig.de> Message-ID: Hello > Note that the last example works fine: Your code only seems works with the current Agda version from the Master branch not Agda version 2.6.1 (or 2.6.1.1). I don't think the last example should work. It fails in version 2.6.1 with the error message "Set (suc a) is not less or equal than Set a". > foo bar : Free (Op a) (Listᴹ (Op a) Bool) > foo = pure nil > bar = op foo Op a produces a container of level suc a. Free and Listᴹ both use the level of their container i.e. suc a. op expects an argument of level a (not suc a, because the stored type is smaller), but passing foo seems to work. > op : {A : Set a} → Free (Op a) A → Free (Op a) A > op {A = A} ma = impure (opˢ A , λ { (inj₁ tt) → ma; (inj₂ x) → pure x }) Replacing Set a with Set (suc a) in the definition of op fails with the same error, but the following works. > op′ : {a : Level} {A : Set (suc a)} → Free (Op a) A → Free (Op a) A > op′ {a} {A} ma = op {a} ma Passing {A} directly as an argument to op also yields the error, but omitting it works. I think this behavior is a bug in the current version, because the following implementation of Russel's paradox type checks with my build of the latest version (commit 832057961873856915c41745c37e055ff4b2c583). {-# OPTIONS --cumulativity #-} open import Data.Bool open import Data.Empty open import Data.Product open import Data.Sum open import Data.Unit open import Data.Maybe open import Function open import Level open import Relation.Binary.PropositionalEquality private variable a : Level record Container a : Set (suc a) where constructor _◁_/_ field Shape : Set a Pos : Shape → Set a Ctx : (s : Shape) → Pos s → Maybe {a = suc a} (Set a) open Container public ⟦_⟧ : Container a → (Set a → Set a) → Set a → Set a ⟦ S ◁ P / C ⟧ F A = Σ[ s ∈ S ] ((p : P s) → F (fromMaybe A (C s p))) data Free {a : Level} (C : Container a) (A : Set a) : Set a where pure : A → Free C A impure : ⟦ C ⟧ (λ A → Free C A) A → Free C A data Listᴹ (C : Container a) (A : Set a) : Set a where nil : Listᴹ C A cons : Free C A → Free C (Listᴹ C A) → Listᴹ C A ROp : ∀ a → Container (suc a) ROp a = Set a ◁ id / λ _ _ → nothing rop : {a : Level} {A : Set a} → Free (ROp a) A rop {_} {A} = impure (A , pure) rop′ : {a : Level} {A : Set (suc a)} → Free (ROp a) A rop′ = rop rop₁ : {A : Set₁} → Free (ROp 0ℓ) A rop₁ = rop′ _bind_ : {A B : Set (suc a)} → Free (ROp a) A → (A → Free (ROp a) B) → Free (ROp a) B pure x bind k = k x impure (X , pf) bind k = impure (X , λ p → pf p bind k) M : Set₁ M = Free (ROp 0ℓ) ⊥ m : (I : Set₁) → (I → M) → M m I pf = rop₁ {I} bind pf -- Now we can follow some implementation of Russell's Paradox -- http://www.cs.nott.ac.uk/~psztxa/g53cfr/l20.html/l20.html _∈_ : M → M → Set₁ a ∈ (impure (I , f)) = ∃[ i ] (a ≡ f i) _∉_ : M → M → Set₁ x ∉ y = x ∈ y → ⊥ R : M R = m (Σ M λ s → s ∉ s) proj₁ lem-1 : {X : M} → X ∈ R → X ∉ X lem-1 ((s , s∉s) , p) = subst₂ _∉_ p' p' s∉s where p' = sym p lem-2 : {X : M} → X ∉ X → X ∈ R lem-2 {X} X∉X = ((X , X∉X) , refl) lem-3 : R ∉ R lem-3 R∈R = lem-1 R∈R R∈R contr : ⊥ contr = lem-3 (lem-2 {R} lem-3) Jonas From Jesper at sikanda.be Tue Sep 15 10:42:30 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 15 Sep 2020 10:42:30 +0200 Subject: [Agda] Size Issue when Modelling Effectful Data Structures and Computations In-Reply-To: References: <53213155d8ee2443acde58da5a8a32cf.squirrel@webmail.htwk-leipzig.de> Message-ID: Hi Jonas, If you can prove false, then it is reasonable to assume that you indeed found a bug in the current version of Agda. Could you please report this issue on the bug tracker at github.com/agda/agda/issues? Somehow the unicode did not come through correctly which makes the code hard to read. -- Jesper On Tue, Sep 15, 2020 at 10:10 AM wrote: > Hello > > > Note that the last example works fine: > > Your code only seems works with the current Agda version from the Master > branch > not Agda version 2.6.1 (or 2.6.1.1). I don't think the last example should > work. > It fails in version 2.6.1 with the error message "Set (suc a) is not less > or > equal than Set a". > > > foo bar : Free (Op a) (Listᴹ (Op a) Bool) > > foo = pure nil > > bar = op foo > > Op a produces a container of level suc a. Free and Listᴹ both use > the level of > their container i.e. suc a. op expects an argument of level a (not suc a, > because the stored type is smaller), but passing foo seems to work. > > > op : {A : Set a} → Free (Op a) A → Free (Op a) A > > op {A = A} ma = impure (opˢ A , λ { (inj₁ tt) → > ma; (inj₂ x) → pure x }) > > Replacing Set a with Set (suc a) in the definition of op fails with the > same > error, but the following works. > > > op′ : {a : Level} {A : Set (suc a)} → Free (Op a) A → > Free (Op a) A > > op′ {a} {A} ma = op {a} ma > > Passing {A} directly as an argument to op also yields the error, but > omitting > it works. I think this behavior is a bug in the current version, because > the > following implementation of Russel's paradox type checks with my build of > the > latest version (commit 832057961873856915c41745c37e055ff4b2c583). > > {-# OPTIONS --cumulativity #-} > > open import Data.Bool > open import Data.Empty > open import Data.Product > open import Data.Sum > open import Data.Unit > open import Data.Maybe > > open import Function > open import Level > > open import Relation.Binary.PropositionalEquality > > private > variable > a : Level > > record Container a : Set (suc a) where > constructor _◁_/_ > field > Shape : Set a > Pos : Shape → Set a > Ctx : (s : Shape) → Pos s → Maybe {a = suc a} (Set a) > > open Container public > > ⟦_⟧ : Container a → (Set a → Set a) → > Set a → Set a > ⟦ S ◁ P / C ⟧ F A = Σ[ s ∈ S ] ((p : P s) > → F (fromMaybe A (C s p))) > > data Free {a : Level} (C : Container a) (A : Set a) : Set a where > pure : A → Free C A > impure : ⟦ C ⟧ (λ A → Free C A) A → > Free C A > > data Listᴹ (C : Container a) (A : Set a) : Set a where > nil : Listᴹ C A > cons : Free C A → Free C (Listᴹ C A) → Listᴹ C > A > > ROp : ∀ a → Container (suc a) > ROp a = Set a ◁ id / λ _ _ → nothing > > rop : {a : Level} {A : Set a} → Free (ROp a) A > rop {_} {A} = impure (A , pure) > > rop′ : {a : Level} {A : Set (suc a)} → Free (ROp a) A > rop′ = rop > > rop₁ : {A : Set₁} → Free (ROp 0ℓ) A > rop₁ = rop′ > > _bind_ : {A B : Set (suc a)} → Free (ROp a) A → (A → > Free (ROp a) B) > → Free (ROp a) B > pure x bind k = k x > impure (X , pf) bind k = impure (X , λ p → pf p bind k) > > M : Set₁ > M = Free (ROp 0ℓ) ⊥ > > m : (I : Set₁) → (I → M) → M > m I pf = rop₁ {I} bind pf > > -- Now we can follow some implementation of Russell's Paradox > -- http://www.cs.nott.ac.uk/~psztxa/g53cfr/l20.html/l20.html > > _∈_ : M → M → Set₁ > a ∈ (impure (I , f)) = ∃[ i ] (a ≡ f i) > > _∉_ : M → M → Set₁ > x ∉ y = x ∈ y → ⊥ > > R : M > R = m (Σ M λ s → s ∉ s) proj₁ > > lem-1 : {X : M} → X ∈ R → X ∉ X > lem-1 ((s , s∉s) , p) = subst₂ _∉_ p' p' s∉s > where p' = sym p > > lem-2 : {X : M} → X ∉ X → X ∈ R > lem-2 {X} X∉X = ((X , X∉X) , refl) > > lem-3 : R ∉ R > lem-3 R∈R = lem-1 R∈R R∈R > > contr : ⊥ > contr = lem-3 (lem-2 {R} lem-3) > > Jonas > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joris.ceulemans at vub.be Tue Sep 15 19:15:24 2020 From: joris.ceulemans at vub.be (Joris Ceulemans) Date: Tue, 15 Sep 2020 19:15:24 +0200 Subject: [Agda] Info about instance resolution in macro Message-ID: Hello, When defining a macro, is it possible to get information on whether instance resolution for a specific instance metavariable succeeds or not and based on that do different things? Attached is a small example of what I have in mind. I tried working with "noConstraints" but that doesn't work (or at least not the way that I use it). Best, Joris -------------- next part -------------- A non-text attachment was scrubbed... Name: InstanceInMacro.agda Type: text/x-agda Size: 1163 bytes Desc: not available URL: From ulf.norell at gmail.com Wed Sep 16 08:43:56 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Wed, 16 Sep 2020 08:43:56 +0200 Subject: [Agda] Info about instance resolution in macro In-Reply-To: References: Message-ID: Interaction between instance search and tactics is currently a little flaky. Could you add your problem to this issue: https://github.com/agda/agda/issues/4777 I believe the problem in your case is that instance search runs after the macro, and there's currently no way to force it to happen during the macro call. / Ulf On Tue, Sep 15, 2020 at 7:15 PM Joris Ceulemans wrote: > Hello, > > > When defining a macro, is it possible to get information on whether > instance resolution for a specific instance metavariable succeeds or not > and based on that do different things? > > Attached is a small example of what I have in mind. I tried working with > "noConstraints" but that doesn't work (or at least not the way that I > use it). > > > Best, > > Joris > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrei.h.popescu at gmail.com Wed Sep 16 15:23:51 2020 From: andrei.h.popescu at gmail.com (Andrei Popescu) Date: Wed, 16 Sep 2020 14:23:51 +0100 Subject: [Agda] CPP 2021 abstract deadline due soon (in ~23 hours) Message-ID: Dear potential CPP authors, Please note that, if you intend to submit a paper to CPP 2021, you would need to register it with an abstract very soon, namely by 16 September 2020 at 23:59 AoE (UTC-12h) The submission can be uploaded by 22 September 2020 at 23:59 AoE (UTC-12h). Finally, one piece of news we can share is that now it?s official: CPP 2021 will be a virtual meeting, where all papers are presented online! The updated call for papers can be found at https://popl21.sigplan.org/home/CPP-2021#Call-for-Papers Best wishes, Andrei & Catalin (CPP 2021 program chairs) -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Fri Sep 18 04:45:38 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Fri, 18 Sep 2020 10:45:38 +0800 Subject: [Agda] [ANNOUNCE] Standard library v1.4 Message-ID: Dear all, The Agda Team is very pleased to announce the release of the standard library 1.4. The library has been tested using Agda 2.6.1.1. and 2.6.1. The new version of the library, CHANGELOG and README are available at http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary Highlights include: - First instance modules, which provide Functor, Monad, Applicative instances for various datatypes. Found under Data.X.Instances. - New standardised numeric predicates NonZero, Positive, Negative, NonPositive, NonNegative, especially designed to work as instance arguments. - A hierarchy of metric spaces and functions, including a specialisation to ?. Best wishes, Matthew, on behalf of the Agda Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From tarmo at cs.ioc.ee Tue Sep 22 17:20:35 2020 From: tarmo at cs.ioc.ee (Tarmo Uustalu) Date: Tue, 22 Sep 2020 18:20:35 +0300 Subject: [Agda] ETAPS 2021 2nd joint call for papers Message-ID: <20200922182035.1400f835@cs.ioc.ee> ****************************************************************** JOINT CALL FOR PAPERS 24th European Joint Conferences on Theory and Practice of Software ETAPS 2021 Luxembourg, Luxembourg, 27 March-1 April 2021 http://www.etaps.org/2021 ****************************************************************** We are closely monitoring the development of the COVID-19 pandemic. If it is not viable to hold ETAPS 2021 as a physical conference, we will run it virtually on the same dates. We will decide in January 2021 at the latest. If ETAPS 2021 can go ahead as a physical conference, accepted authors may still present remotely. -- ABOUT ETAPS -- ETAPS is the primary European forum for academic and industrial researchers working on topics relating to software science. ETAPS, established in 1998, is a confederation of four annual conferences, accompanied by satellite workshops. ETAPS 2021 is the twenty-fourth event in the series. -- MAIN CONFERENCES (29 March-1 April) -- * ESOP: European Symposium on Programming (PC chair: Nobuko Yoshida, Imperial College London, UK) * FASE: Fundamental Approaches to Software Engineering (PC chairs: Esther Guerra, Univ. Aut?noma de Madrid, Spain, and Mari?lle Stoelinga, Univ. Twente, The Netherlands) * FoSSaCS: Foundations of Software Science and Computation Structures (PC chairs: Stefan Kiefer, Univ. of Oxford, UK, and Christine Tasson, IRIF, Univ. Paris Diderot, France) * TACAS: Tools and Algorithms for the Construction and Analysis of Systems (PC chairs: Jan Friso Groote, Techn. Univ. Eindhoven, The Netherlands, and Kim G. Larsen, Aalborg Univ., Denmark) TACAS '21 will host the 10th Competition on Software Verification (SV-COMP). -- INVITED SPEAKERS -- The invited speakers and tutorialists planned for ETAPS 2020 have been reinvited: * Unifying speakers: Lars Birkedal (Aarhus Universitet, Denmark) a further speaker to be reconfirmed * ESOP invited speaker: Isil Dillig (University of Texas at Austin, USA) * FASE invited speaker: Willem Visser (Stellenbosch University, South Africa) * Tutorial speakers: Erika ?brah?m (RWTH Aachen University, Germany) Madhusudan Parthasararathy (University of Illinois at Urbana-Champaign, USA) -- IMPORTANT DATES * Papers due: 15 October 2020 23:59 AoE (=GMT-12) * Rebuttal (ESOP, FoSSaCS and, for selected papers, TACAS): 7 December 00:01 AoE - 9 December 23:59 AoE * Notification: 23 December 2020 * Camera-ready versions due: 22 January 2021 -- SUBMISSION INSTRUCTIONS -- The four main conferences of ETAPS 2021 solicit contributions of the following types. All page limits are given **excluding bibliography**. * ESOP: regular research papers of max 25 pp * FASE: regular research papers and empirical evaluation papers of max 18 pp, tool demonstration papers of max 6 pp + mandatory appendix of max 6 pp, * FoSSaCS: regular research papers of max 18 pp * TACAS: regular research papers, case study papers and regular tool papers of max 16 pp, tool demonstration papers of max 6 pp For definitions of the different paper types and specific instructions, where they are present, see the webpages of the individual conferences. All accepted papers will appear in the conference proceedings and have presentations during the conference. A condition of submission is that, if the submission is accepted, one of the authors attends the conference to give the presentation. **Remote attendance and presentation will be possible if ETAPS 2021 goes ahead as a physical conference.** Submitted papers must be in English presenting original research. They must be unpublished and not submitted for publication elsewhere. In particular, simultaneous submission of the same contribution to multiple ETAPS conferences is forbidden. Submissions must follow the formatting guidelines of Springer's LNCS and be submitted electronically in pdf through the Easychair author interface of the respective conference. Submissions not adhering to the specified format and length may be rejected immediately. FASE will use double-blind reviewing. Authors are asked to omit their names and institutions; refer to own prior work in the third person; not to include acknowledgements that might identify them. Regular tool paper and tool demonstration paper submissions to TACAS must be accompanied by an artifact. The artifact will be evaluated and the outcome will be taken into account in the acceptance decision of the paper. ESOP and FoSSaCS will use an author rebuttal phase. TACAS will have rebuttal for selected papers. -- PUBLICATION The proceedings will be published in the Advanced Research in Computing and Software Science (ARCoSS) subline of Springer's LNCS series. The proceedings volumes will appear in gold open access, so the published versions of all papers will be available for everyone to download from the publisher's website freely, from the date of online publication, perpetually. The copyright of the papers will remain with the authors. -- SATELLITE EVENTS (27-28 March) -- A number of satellite workshops will take place before the main conferences. -- CITY AND HOST INSTITUTION -- Luxembourg is the capital of the small European nation of the same name. Built amid deep gorges cut by the Alzette and P?trusse rivers, it is famed for its ruins of medieval fortifications. The vast Bock Casemates tunnel network encompasses a dungeon, prison and the Archaeological Crypt, considered the city's birthplace. Along ramparts above, the Chemin de la Corniche promenade offers dramatic viewpoints. ETAPS 2021 is organised by the Interdisciplinary Centre for Security, Reliability and Trust (SnT), Universit? du Luxembourg. -- ORGANIZERS -- General chair: Peter Y. A. Ryan (SnT & Universit? du Luxembourg) Workshops chair: Joaquin Garcia-Alfaro (Telecom SudParis, France) Organization chair: Peter Roenne (SnT Luxembourg) Event manager: Magali Martin (SnT Luxembourg) -- FURTHER INFORMATION -- Please do not hesitate to contact the organizers at etaps2021 at uni.lu . From gusmacwa at student.gu.se Wed Sep 23 18:35:13 2020 From: gusmacwa at student.gu.se (Warrick Macmillan) Date: Wed, 23 Sep 2020 18:35:13 +0200 Subject: [Agda] Agda and machine learning Message-ID: Dear All, I'm currently writing my Msc thesis on the topic of natural language <-> formal proof translation, using GF, and have been highly intrigued by the dichotomy of a rule-based formalization approach as opposed to the so-called Autoformalization scheme recently outlined by Szegedy [1]. Szegedy contends "that in the coming years we will see automated systems to rival humans in general reasoning and the fastest path to achieve this is by creating automated mathematical reasoning systems via autoformalization." He then poses the question : "Will we ever arrive at the point where an AI agent can learn to do reasoning as well as the best humans in the world in most established domains of mathematics?" I see interpretations of this perspective varying from extreme optimism - a new, reformulated Entscheidungsproblem whereby some "mechanical AI agent" can decide the existence of a proof better than a human, and perhaps even a priori formulate what to prove - to a highly cynical view that this is just wishful thinking from another silicon valley technocrat. I've heard, for instance, that Voevodsky wasn't very enthusiastic about automated proving in gereral. Thomas Hales says of Szegedy's group : "Their ambitions are inspiring, the resources and research methodologies at Google are grandiose, but I would not personally bet on their time frame."[2] As far as I'm aware, much of the (still) early work using machine learning in proof search targets either satisfiability problems, which is somewhat outside the interests of most type theorists[3], or tactic-based languages like HOL and Coq [4] where the learning of a proof isn't at the level of constructing a term that could then be presented in a human legible format, and large, fairly standard libraries already exist. My appreciation of Agda is stays true to Martin-L?f's original vision of a programming language in which one can write proofs. I bring this up here because it seems that using machine learning to produce Agda code doesn't yet seem compatible with Szegedy's proposal - especiallty since it doesn't yet have tactics. Other writing in [1] dicuss various other aspects of this space, yet Agda is hardly mentioned. How do you see the upcoming role of machine learning in theorem proving, formalization, and interactive proof development, with particular reference to Agda? Warrick [1] A Promising Path Towards Autoformalization and General AI, https://link.springer.com/chapter/10.1007/978-3-030-53518-6_1 [2] AN ARGUMENT FOR CONTROLLED NATURALLANGUAGES IN MATHEMATICS https://jiggerwit.files.wordpress.com/2019/06/header.pdf [3] Neural networks and the satisfiability problem https://searchworks.stanford.edu/view/13250178 [4] HOList: AnEnvironment forMachineLearning ofHigher-OrderTheoremProving https://arxiv.org/pdf/1904.03241.pdf -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Thu Sep 24 15:15:14 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Thu, 24 Sep 2020 16:15:14 +0300 Subject: [Agda] Agda and machine learning In-Reply-To: References: Message-ID: <00015970d706181e838c28fe14aa3534@scico.botik.ru> On 2020-09-23 19:35, Warrick Macmillan wrote: > Dear All, > > I'm currently writing my Msc thesis on the topic of natural language > <-> formal proof translation, using GF, and have been highly intrigued > by the dichotomy of a rule-based formalization approach as opposed to > the so-called Autoformalization scheme recently outlined by Szegedy > [1]. > > Szegedy contends "that in the coming years we will see > automated systems to rival humans in general reasoning and the fastest > path to achieve this is by creating automated mathematical reasoning > systems via autoformalization." > > He then poses the question : "Will we ever arrive at the point where > an AI agent can learn to do reasoning as well as the best humans in > the world in most established domains of mathematics?" > In the chess game this is done - with exception of a few number of positions which are better solved by the human best players than by a program. The result is clear: because grandmasters like to consult with a program when analyzing a chess position. A chess program is really a great authority for them. This is after 60 years of developing chess programs. With mathematics it is different. Currently no mathematician would consult with a program: "What is a way to prove the theorem T? To apply induction by n? Or to apply the method of projections modulo the ideals I, J ... ? Or to represent the thing as linear operators and to apply the linear representation theory? Or to try to reduce T to the theorem of implicit function? ... ". Nothing of this sort happens - so far. Currently, provers can only solve the problems like the following. (1) A very simple problems. For example, to prove reverse (reverse xs) == xs for a list xs, or to prove that _*_ in unary system for natural numbers is commutative (m * n == n * n). Not more complex than this. (2) Concrete problems for which humans have designed a general algorithm for solution. For example, to solve a linear system (large systems are often difficult to solve). The point (2) is similar to the fact that some machines can run 1 mile must faster than a human. Example I. Consider a program for _+_ for binary numbers in Data.Nat.Bin in the standard Agda library. I do not think that any currently existing prover can prove associativity for this _+_: "forall x y z ((x + y) + z == x + (y + z))". The same is with Example II. Prove that merge sorting is equivalent to sorting by insertion: forall xs (mergeSort xs == sortByInsertion xs). There are millions of such simple problems. I think, a powerful provers will be designed for algebra within about 20 - 40 years, the ones that will be able to solve problems more complex than (I) and (II). > My appreciation of Agda is stays true to Martin-L?f's original vision > of a programming language in which one can write proofs. I bring this > up here because it seems that using machine learning to produce Agda > code doesn't yet seem compatible with Szegedy's proposal - especiallty > since it doesn't yet have tactics. Other writing in [1] dicuss > various other aspects of this space, yet Agda is hardly mentioned. > > How do you see the upcoming role of machine learning in theorem > proving, formalization, and interactive proof development, with > particular reference to Agda? It is possible to write provers (tactics) as applied libraries for Agda. For example, the unfailing Knuth-Bendix completion procedure. A programmer will set in one's program a call for such a procedure instead of inventing and placing in the program a lengthy proof for some equalities. But it will be difficult to predict how expensive will be type-check for such program (I expect so it is in the Coq system). Regards, ------ Sergei From mechvel at scico.botik.ru Thu Sep 24 18:15:11 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Thu, 24 Sep 2020 19:15:11 +0300 Subject: [Agda] Agda and machine learning In-Reply-To: <00015970d706181e838c28fe14aa3534@scico.botik.ru> References: <00015970d706181e838c28fe14aa3534@scico.botik.ru> Message-ID: <73cc742961056aeef63abd6595fb7c85@scico.botik.ru> On 2020-09-24 16:15, mechvel at scico.botik.ru wrote: >> [..] > (1) A very simple problems. For example, to prove reverse (reverse xs) > == xs > for a list xs, > or to prove that _*_ in unary system for natural numbers is > commutative > (m * n == n * n). > [..] Fixing a typo: this should be (m * n == n * m). -- SM From marko at dimjasevic.net Fri Sep 25 13:00:30 2020 From: marko at dimjasevic.net (Marko =?UTF-8?Q?Dimja=C5=A1evi=C4=87?=) Date: Fri, 25 Sep 2020 13:00:30 +0200 Subject: [Agda] Suspicious normalisation Message-ID: Dear Agda community, I cannot understand why can an expression ?? two ? two be normalised (by running C-c C-n) at all for the code snippet below. It normalises to: ?? `suc (`suc `zero) ? (`suc (`suc `zero)) module LambdaVar where open import Data.Bool using (Bool; true; false; T) open import Data.String using (String) open import Data.Unit using (tt) Id : Set Id = String infix 5 ?_?_ infix 8 `suc_ infix 9 `_ data Term : Set where `_ : Id ? Term ?_?_ : Id ? Term ? Term `zero : Term `suc_ : Term ? Term two : Term two = `suc `suc `zero var? : Term ? Bool var? (` _) = true var? _ = false ??_?_ : (t : Term) ? {_ : T (var? t)} ? Term ? Term ??_?_ (` x) {tt} N = ? x ? N Shouldn't it be impossible to normalise ?? two ? two due to the implicit argument to ??_?_ that doesn't allow Term t to be anything but a variable? -- Regards, Marko Dimja?evi? https://dimjasevic.net/marko Mastodon: https://mamot.fr/@mdimjasevic PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA Learn email self-defense! https://emailselfdefense.fsf.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From guillaume.brunerie at gmail.com Fri Sep 25 13:21:10 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Fri, 25 Sep 2020 13:21:10 +0200 Subject: [Agda] Suspicious normalisation In-Reply-To: References: Message-ID: It seems perfectly reasonable to me that it reduces. The thing is that it has an unsolved implicit argument of type Data.Empty.?, so there would be unsolvable yellow if you try to use this term in a consistent context, but there is no reason why that should prevent it from normalizing. Depending on your use case, maybe you can use an instance argument instead of an implicit argument, this way it will fail instead of reducing, but work when the first argument is a variable. Best, Guillaume Den fre 25 sep. 2020 kl 13:00 skrev Marko Dimja?evi? : > Dear Agda community, > > I cannot understand why can an expression > > ?? two ? two > > be normalised (by running C-c C-n) at all for the code snippet below. It > normalises to: > > ?? `suc (`suc `zero) ? (`suc (`suc `zero)) > > > module LambdaVar where > > open import Data.Bool using (Bool; true; false; T) > open import Data.String using (String) > open import Data.Unit using (tt) > > Id : Set > Id = String > > infix 5 ?_?_ > infix 8 `suc_ > infix 9 `_ > > data Term : Set where > `_ : Id ? Term > ?_?_ : Id ? Term ? Term > `zero : Term > `suc_ : Term ? Term > > > two : Term > two = `suc `suc `zero > > var? : Term ? Bool > var? (` _) = true > var? _ = false > > ??_?_ : (t : Term) ? {_ : T (var? t)} ? Term ? Term > ??_?_ (` x) {tt} N = ? x ? N > > > Shouldn't it be impossible to normalise ?? two ? two due to the implicit > argument to ??_?_ that doesn't allow Term t to be anything but a variable? > > > -- > Regards, > Marko Dimja?evi? > https://dimjasevic.net/marko > Mastodon: https://mamot.fr/@mdimjasevic > PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA > Learn email self-defense! https://emailselfdefense.fsf.org > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Sun Sep 27 00:23:34 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 27 Sep 2020 01:23:34 +0300 Subject: [Agda] testing Agda-2.6.1 on a large project Message-ID: Dear all, I have tested Agda 2.6.1 + lib-4.1 on a certain large project of computer algebra. This is kind of a report about the _cost of type checking and compilation_. Earlier it was DoCon-A-2.02 under Agda-2.5.4.2, and it took the minimum of 13 Gb memory to type-check, and for 15 Gb the type check took 2700 sec. (on a 3 GHz machine). Now it is rewritten into a certain DoCon-A-3.0 under Agda-2.6.1 + lib-1.4, ghc-8.8.3, MAlonzo. and it takes the minimum of 3 Gb memory to type-check, and for 3 Gb the type check takes 234 sec, then, compilation takes ~ 300 sec. So the type check cost has reduced about 4 times for memory and about 12 times for time. This gives us a real hope for that a large part of computer algebra (somewhat 10-20 times larger than this DoCon-A-3.0) can be type-checked and compiled in Agda at a reasonable cost. The functionality of DoCon-A-3.0 is about 10% larger, it includes certified multivariate polynomial arithmetic. But the design has changed. * It is much more close to Standard library, * parametrized modules are used more widely, * generally, the design style is as it is traditional in Agda. So that I cannot say that this is the very same library ported to Agda-2.6.1. Regards, ------ Sergei From marko at dimjasevic.net Sun Sep 27 21:25:37 2020 From: marko at dimjasevic.net (Marko =?UTF-8?Q?Dimja=C5=A1evi=C4=87?=) Date: Sun, 27 Sep 2020 21:25:37 +0200 Subject: [Agda] Suspicious normalisation In-Reply-To: References: Message-ID: <648e963709bc209f7af1eb6f9251ddc633feb665.camel@dimjasevic.net> Hi Guillaume, On Fri, 2020-09-25 at 13:21 +0200, Guillaume Brunerie wrote: > It seems perfectly reasonable to me that it reduces. > The thing is that it has an unsolved implicit argument of type > Data.Empty.?, so there would be unsolvable yellow if you try to use this > term in a consistent context, but there is no reason why that should > prevent it from normalizing. Why is it an unsolved argument? Perhaps I could use some reading on solving (implicit) arguments, but my understanding is that the type becomes either Data.Empty.? or Data.Unit.? and at that point it should be clear if the first explicit argument to function ??_?_ is valid or not. I don't have anything highlighted in yellow due to the definition of ??_?_. The only place where it is actually used is in a definition of plus?, for which you'd need the full version of Term [1]: plus? : Term plus? = ?? + ? ?? m ? ?? n ? case? m [zero? n |suc m ? `suc (+ ? m ? n) ] where + = ` "+" m = ` "m" n = ` "n" This type-checks and loads just fine. > Depending on your use case, maybe you can use an instance argument > instead of an implicit argument, this way it will fail instead of > reducing, but work when the first argument is a variable. Thank you for the suggestion! I tried using an instance argument, but the outcome is the same: everything type-checks just fine and there are no yellow highlights. [1] Use the definition of Term as in https://plfa.github.io/Lambda/ -- Regards, Marko Dimja?evi? https://dimjasevic.net/marko Mastodon: https://mamot.fr/@mdimjasevic PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA Learn email self-defense! https://emailselfdefense.fsf.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From fredrik.nordvall-forsberg at strath.ac.uk Mon Sep 28 11:56:26 2020 From: fredrik.nordvall-forsberg at strath.ac.uk (Fredrik Nordvall Forsberg) Date: Mon, 28 Sep 2020 10:56:26 +0100 Subject: [Agda] Suspicious normalisation In-Reply-To: References: Message-ID: Dear Marko, On 25/09/2020 12:00, Marko Dimja?evi? wrote: > I cannot understand why can an expression > > ?? two ? two > > be normalised (by running C-c C-n) at all for the code snippet below. It > normalises to: > > ?? `suc (`suc `zero) ? (`suc (`suc `zero)) Note that the only reduction that has happened here is is that the two arguments has been replaced by their definition `suc (`suc `zero); in particular, the function ??_?_ is stuck, and has not reduced, for two reasons: 1. its first argument does not match its only defining pattern (` x); 2. its implicit argument is still an unsolved meta, so its unknown if it matches its only defining pattern tt yet. You can see more clearly what is going on either by toggling the display of implicit arguments in the Agda menu, in which case the "normalised" term is ??_?_ (`suc (`suc `zero)) {_19} (`suc (`suc `zero)) [here _19 is the unsolved meta of type ?] or by writing the term as a definition in your source file, eg test = ?? two ? two in which case you can see the yellow highlighting because of the same unsolved meta. You replied to Guillaume: > I don't have anything highlighted in yellow due to the definition of ??_?_. Indeed, the definition of ??_?_ is fine; it is in its use ?? two ? two that you have an unsolved implicit argument. Best wishes, Fred > > module LambdaVar where > > open import Data.Bool using (Bool; true; false; T) > open import Data.String using (String) > open import Data.Unit using (tt) > > Id : Set > Id = String > > infix 5 ?_?_ > infix 8 `suc_ > infix 9 `_ > > data Term : Set where > `_ : Id ? Term > ?_?_ : Id ? Term ? Term > `zero : Term > `suc_ : Term ? Term > > > two : Term > two = `suc `suc `zero > > var? : Term ? Bool > var? (` _) = true > var? _ = false > > ??_?_ : (t : Term) ? {_ : T (var? t)} ? Term ? Term > ??_?_ (` x) {tt} N = ? x ? N > > > Shouldn't it be impossible to normalise ?? two ? two due to the implicit > argument to ??_?_ that doesn't allow Term t to be anything but a variable? From guillaume.brunerie at gmail.com Mon Sep 28 11:56:56 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Mon, 28 Sep 2020 11:56:56 +0200 Subject: [Agda] Suspicious normalisation In-Reply-To: <648e963709bc209f7af1eb6f9251ddc633feb665.camel@dimjasevic.net> References: <648e963709bc209f7af1eb6f9251ddc633feb665.camel@dimjasevic.net> Message-ID: Den s?n 27 sep. 2020 kl 21:25 skrev Marko Dimja?evi? : > > Hi Guillaume, > > On Fri, 2020-09-25 at 13:21 +0200, Guillaume Brunerie wrote: > > It seems perfectly reasonable to me that it reduces. > > The thing is that it has an unsolved implicit argument of type > > Data.Empty.?, so there would be unsolvable yellow if you try to use this > > term in a consistent context, but there is no reason why that should > > prevent it from normalizing. > > > Why is it an unsolved argument? > > Perhaps I could use some reading on solving (implicit) arguments, but my > understanding is that the type becomes either Data.Empty.? or Data.Unit.? > and at that point it should be clear if the first explicit argument to > function ??_?_ is valid or not. You seem to be confusing the value and the type of an implicit argument. It is true that the type of the implicit argument becomes either ? or ?, but in order for it to be solved you need an actual *value* (of type either ? or ?). In the case of ?, Agda knows that there is a unique (up to definitional equality) value of that type, and therefore solves it for you. But in the case of ?, Agda is waiting for a element of type ? but doesn?t know which one you mean, so it is unsolved. You do get yellow if you write the following (which was your initial question, except that you don?t see yellow when doing C-c C-n) t : Term t = ?? two ? two And note that having an (implicit or not) argument of type ? is not "invalid" in any way. In an inconsistent context, you could find a term of type ? and use it for your implicit argument, for instance (same as before but in an inconsistent context and without yellow): u : ? ? Term u abs = ??_?_ two {abs} two > I don't have anything highlighted in yellow due to the definition of ??_?_. Yes, that?s because you only use it in "valid" cases, and therefore Agda automatically solves the implicit argument because it has type ?. > The only place where it is actually used is in a definition of plus?, for > which you'd need the full version of Term [1]: > > plus? : Term > plus? = ?? + ? ?? m ? ?? n ? > case? m > [zero? n > |suc m ? `suc (+ ? m ? n) ] > where > + = ` "+" > m = ` "m" > n = ` "n" > > > This type-checks and loads just fine. > > > > Depending on your use case, maybe you can use an instance argument > > instead of an implicit argument, this way it will fail instead of > > reducing, but work when the first argument is a variable. > > > Thank you for the suggestion! I tried using an instance argument, but the > outcome is the same: everything type-checks just fine and there are no > yellow highlights. If you try to normalize ?? two ? two when using an instance argument you will get an error, which is what I thought you were trying to get. I?m not quite sure anymore which problem you are trying to solve. Best, Guillaume > [1] Use the definition of Term as in https://plfa.github.io/Lambda/ > > > -- > Regards, > Marko Dimja?evi? > https://dimjasevic.net/marko > Mastodon: https://mamot.fr/@mdimjasevic > PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA > Learn email self-defense! https://emailselfdefense.fsf.org From P.Achten at cs.ru.nl Tue Sep 29 15:39:12 2020 From: P.Achten at cs.ru.nl (Peter Achten) Date: Tue, 29 Sep 2020 15:39:12 +0200 Subject: [Agda] [TFP'21] first call for papers: Trends in Functional Programming 2021, 17-19 February (with Lambda Days 2021 & TFPIE 2021) Message-ID: ------------------------------------------------------------------------- ???????????????????? First call for papers ??????? 22nd Symposium on Trends in Functional Programming ????????????????????????? tfp2021.org ------------------------------------------------------------------------- The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions. * TFP offers a supportive reviewing process designed to help less experienced ? authors succeed, with two rounds of review, both before and after the ? symposium itself. Authors have an opportunity to address reviewers' concerns ? before final decisions on publication in the proceedings. * TFP offers two "best paper" awards, the John McCarthy award for best paper, ? and the David Turner award for best student paper. * TFP is co-located with Lambda Days in beautiful Krakow. Lambda Days is a ? vibrant developer conference with hundreds of attendees and a lively programme ? of talks on functional programming in practice. Due to the covid pandemic, ? the event is online with a lot of attention to interaction and getting to ? socialize with the community. Important Dates --------------- Submission deadline for pre-symposium review:???? 20th November, 2020 Submission deadline for draft papers:???????????? 15th January, 2021 Symposium dates:????????????????????????????????? 17-19th February, 2021 * We strongly encourage authors to submit their work for the first deadline. ? Authors whose papers are accepted for presentation, but not immediately for the ? proceedings in this first round, will have almost two months to address the ? reviewers' concerns. Papers submitted for the first deadline will also have ? priority for the presentation slots at the symposium. Visit tfp2021.org for more information. From capn.freako at gmail.com Tue Sep 29 16:01:03 2020 From: capn.freako at gmail.com (David Banas) Date: Tue, 29 Sep 2020 07:01:03 -0700 Subject: [Agda] Why the light gray highlighting here? Message-ID: Hi all, I'm wondering why the second line in my definition for `*xor*` below is being partially highlighted in a very light gray background, as shown. Thanks, -db data Bin : Set where ?? : Bin _O : Bin ? Bin _I : Bin ? Bin _xor_ : Bin ? Bin ? Bin ?? xor y = y x xor ?? = x (x O) xor (y O) = (x xor y) O (x O) xor (y I) = (x xor y) I (x I) xor (y O) = (x xor y) I (x I) xor (y I) = (x xor y) O -------------- next part -------------- An HTML attachment was scrubbed... URL: From fdhzs2010 at hotmail.com Tue Sep 29 16:04:14 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Tue, 29 Sep 2020 14:04:14 +0000 Subject: [Agda] Why the light gray highlighting here? In-Reply-To: References: Message-ID: because this line does not hold definitionally and you have to prove it. this is just a reminder. this definition itself isn't doing anything wrong. Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Agda on behalf of David Banas Sent: September 29, 2020 10:01 AM To: Agda mailing list Subject: [Agda] Why the light gray highlighting here? Hi all, I'm wondering why the second line in my definition for `xor` below is being partially highlighted in a very light gray background, as shown. Thanks, -db data Bin : Set where ?? : Bin _O : Bin ? Bin _I : Bin ? Bin _xor_ : Bin ? Bin ? Bin ?? xor y = y x xor ?? = x (x O) xor (y O) = (x xor y) O (x O) xor (y I) = (x xor y) I (x I) xor (y O) = (x xor y) I (x I) xor (y I) = (x xor y) O -------------- next part -------------- An HTML attachment was scrubbed... URL: From godzbanebane at gmail.com Tue Sep 29 16:08:00 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Tue, 29 Sep 2020 17:08:00 +0300 Subject: [Agda] Why the light gray highlighting here? In-Reply-To: References: Message-ID: Hi! Related links in the wiki: https://agda.readthedocs.io/en/v2.6.1.1/tools/emacs-mode.html#highlight https://agda.readthedocs.io/en/v2.6.1.1/language/function-definitions.html#case-trees I'm just still not sure what is meant by "hold definitionally" in this context, seeing as how he is currently defining a function, not trying to prove anything based on the case tree of some function. Could someone clarify this? ====== Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From fdhzs2010 at hotmail.com Tue Sep 29 16:12:34 2020 From: fdhzs2010 at hotmail.com (Jason -Zhong Sheng- Hu) Date: Tue, 29 Sep 2020 14:12:34 +0000 Subject: [Agda] Why the light gray highlighting here? In-Reply-To: References: , Message-ID: to expand, "not hold definitionally" means that Agda does not recognize x xor ?? = x as a definitional equality, as opposed to ?? xor y = y namely, Agda knows ?? xor y and y are identical. The reason is, the function is defined by first doing a case split on x?. so the case tree on x? is expanded. writing x xor ?? = x is the same as writing ?? xor ?? = x (x O) xor ?? = x O (x I) xor ?? = x I Thanks, Jason Hu https://hustmphrrr.github.io/ ________________________________ From: Georgi Lyubenov Sent: September 29, 2020 10:08 AM To: Jason -Zhong Sheng- Hu Cc: David Banas ; Agda mailing list Subject: Re: [Agda] Why the light gray highlighting here? Hi! Related links in the wiki: https://agda.readthedocs.io/en/v2.6.1.1/tools/emacs-mode.html#highlight https://agda.readthedocs.io/en/v2.6.1.1/language/function-definitions.html#case-trees I'm just still not sure what is meant by "hold definitionally" in this context, seeing as how he is currently defining a function, not trying to prove anything based on the case tree of some function. Could someone clarify this? ====== Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Achten at cs.ru.nl Tue Sep 29 16:39:04 2020 From: P.Achten at cs.ru.nl (Peter Achten) Date: Tue, 29 Sep 2020 16:39:04 +0200 Subject: [Agda] [TFPIE'21] First Call For Papers: Trends in Functional Programming *in Education* 2021, 16 February (with Lambda Days 2021 & TFP 2021) Message-ID: <447c8e28-8f8d-064d-c88c-2a310697c0b8@cs.ru.nl> -------------------------------- ?? TFPIE 2021 Call for papers -------------------------------- https://wiki.tfpie.science.ru.nl/TFPIE2021#TFPIE_2021 (February 16 2021, co-organized with TFP 2021 and Lambda Days 2021) The goal of the International Workshops on Trends in Functional Programming in Education is to gather researchers, professors, teachers, and all professionals that use or are interested in the use of functional programming in education. TFPIE aims to be a venue where novel ideas, classroom-tested ideas, and work in progress on the use of functional programming in education are discussed. The one-day workshop will foster a spirit of open discussion by having a review process for publication after the workshop. TFPIE 2021 welcomes submissions in the above mentioned areas. This year many teaching programmes have had to make a rapid transition to online teaching, and we explicitly solicit papers that explore this area of teaching functional programming. Topics of interest include, but are not limited to: -? FP and beginning CS students -? FP and Computational Thinking -? FP and Artificial Intelligence -? FP in Robotics -? FP and Music -? Advanced FP for undergraduates -? FP in graduate education -? Engaging students in research using FP -? FP in Programming Languages -? FP in the high school curriculum -? FP as a stepping stone to other CS topics -? FP and Philosophy -? The pedagogy of teaching FP -? FP and e-learning: MOOCs, automated assessment etc. -? Best Lectures - more details below In addition to papers, we are requesting best lecture presentations. What's your best lecture topic in an FP related course? Do you have a fun way to present FP concepts to novices or perhaps an especially interesting presentation of a difficult topic? In either case, please consider sharing it. Best lecture topics will be selected for presentation based on a short abstract describing the lecture and its interest to TFPIE attendees. The length of the presentation should be comparable to that of a paper. On top of the lecture itself, the presentation can also provide commentary on the lecture. Submissions Potential presenters are invited to submit an extended abstract (4-6 pages) or a draft paper (up to 20 pages) in EPTCS style. The authors of accepted presentations will have their preprints and their slides made available on the workshop's website. Papers and abstracts can be submitted via easychair at the following link: https://easychair.org/conferences/?conf=tfpie2021 After the workshop, presenters are invited to submit (a revised version of) their article for review. The PC will select the best articles. We plan to publish them in the Electronic Proceedings in Theoretical Computer Science (EPTCS). Articles rejected for presentation and extended abstracts will not be formally reviewed by the PC. Dates -? Submission deadline: January 11 2021, Anywhere on Earth. -? Notification: January 15 2021 -? Workshop: February 16 2021 -? Submission for formal review: April 20 2021, Anywhere on Earth. -? Notification of full article: June 7 2021 -? Camera ready: July 1st 2021 Program Committee (under construction) - Peter Achten,??? Radboud University, Netherlands (chair) - Edwin Brady,???? University of St Andrews, UK - Laura Castro,??? Universidade da Coru?a, Spain - Stephen Chang,?? University of Massachusetts Boston, USA - Youyou Cong,???? Tokyo Institute of Technology, Japan - Matthew Flatt,?? University of Utah, USA - Alex Gerdes,???? University of Gothenburg, Sweden - Prabhakar Ragde, University of Waterloo, Canada - Melinda T?th,??? E?tv?s Lor?nd University, Hungary Registration TFPIE is part of Lambda Days. Please visit the Lambda Days 2021 pages when registration information becomes available. Registration is mandatory for at least one author of every paper that is presented at the workshop. Only papers that have been presented at TFPIE may be submitted to the post-reviewing process. Information on Lambda Days is available at https://www.lambdadays.org/lambdadays2021 Information on TFP???????? is available at http://tfp2021.org From wadler at inf.ed.ac.uk Tue Sep 29 18:12:57 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Tue, 29 Sep 2020 17:12:57 +0100 Subject: [Agda] Why the light gray highlighting here? In-Reply-To: References: Message-ID: See: https://plfa.github.io/Decidable/#logical-connectives Go well, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Tue, 29 Sep 2020 at 15:01, David Banas wrote: > Hi all, > > I'm wondering why the second line in my definition for `*xor*` below is > being partially highlighted in a very light gray background, as shown. > > Thanks, > -db > > data Bin : Set where > ?? : Bin > _O : Bin ? Bin > _I : Bin ? Bin > > _xor_ : Bin ? Bin ? Bin > ?? xor y = y > x xor ?? = x > (x O) xor (y O) = (x xor y) O > (x O) xor (y I) = (x xor y) I > (x I) xor (y O) = (x xor y) I > (x I) xor (y I) = (x xor y) O > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From capn.freako at gmail.com Tue Sep 29 19:04:45 2020 From: capn.freako at gmail.com (David Banas) Date: Tue, 29 Sep 2020 10:04:45 -0700 Subject: [Agda] Bit-wise XOR for Word64? Message-ID: <3333D537-7DFA-4661-A738-BDCBF58D8A05@gmail.com> Hi all, Is there a bit-wise XOR operator for the Word64 type available in Agda? Thanks, -db From marko at dimjasevic.net Tue Sep 29 19:27:05 2020 From: marko at dimjasevic.net (Marko =?UTF-8?Q?Dimja=C5=A1evi=C4=87?=) Date: Tue, 29 Sep 2020 19:27:05 +0200 Subject: [Agda] Suspicious normalisation In-Reply-To: References: Message-ID: Dear Fredrik and Guillaume, Thank you both for your replies! Now I understand the issue and I have a few follow-up remarks below. On Mon, 2020-09-28 at 10:56 +0100, Fredrik Nordvall Forsberg wrote: > > Note that the only reduction that has happened here is is that the two > arguments has been replaced by their definition `suc (`suc `zero); in > particular, the function ??_?_ is stuck, and has not reduced, for two > reasons: > > 1. its first argument does not match its only defining pattern (` x); > 2. its implicit argument is still an unsolved meta, so its unknown if it > matches its only defining pattern tt yet. If this is the case, wouldn't it be desirable for the Emacs function associated with C-c C-n (namely, agda2-compute-normalised-maybe-toplevel in my case) to indicate to the user that the expression is stuck? There is another function agda2-compute-normalised-toplevel, but it gives the same result when ?? two ? two is its argument, so based on that I don't see the difference between the two Emacs functions. > You can see more clearly what is going on either by toggling the display > of implicit arguments in the Agda menu, in which case the "normalised" > term is > > ??_?_ (`suc (`suc `zero)) {_19} (`suc (`suc `zero)) > > [here _19 is the unsolved meta of type ?] This unsolved meta explains it! Thank you for pointing out how to make it visible. -- Regards, Marko Dimja?evi? https://dimjasevic.net/marko Mastodon: https://mamot.fr/@mdimjasevic PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA Learn email self-defense! https://emailselfdefense.fsf.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: From guillaume.brunerie at gmail.com Tue Sep 29 22:36:54 2020 From: guillaume.brunerie at gmail.com (Guillaume Brunerie) Date: Tue, 29 Sep 2020 22:36:54 +0200 Subject: [Agda] Suspicious normalisation In-Reply-To: References: Message-ID: Den tis 29 sep. 2020 kl 19:27 skrev Marko Dimja?evi? : > > Dear Fredrik and Guillaume, > > Thank you both for your replies! Now I understand the issue and I have a > few follow-up remarks below. > > > On Mon, 2020-09-28 at 10:56 +0100, Fredrik Nordvall Forsberg wrote: > > > > Note that the only reduction that has happened here is is that the two > > arguments has been replaced by their definition `suc (`suc `zero); in > > particular, the function ??_?_ is stuck, and has not reduced, for two > > reasons: > > > > 1. its first argument does not match its only defining pattern (` x); > > 2. its implicit argument is still an unsolved meta, so its unknown if it > > matches its only defining pattern tt yet. > > > If this is the case, wouldn't it be desirable for the Emacs function > associated with C-c C-n (namely, agda2-compute-normalised-maybe-toplevel in > my case) to indicate to the user that the expression is stuck? There is > another function agda2-compute-normalised-toplevel, but it gives the same > result when ?? two ? two is its argument, so based on that I don't see the > difference between the two Emacs functions. The result of C-c C-n is always stuck, by definition. What C-c C-n does is to reduce the given term until it can?t be reduced anymore (= is stuck). Best, Guillaume > > You can see more clearly what is going on either by toggling the display > > of implicit arguments in the Agda menu, in which case the "normalised" > > term is > > > > ??_?_ (`suc (`suc `zero)) {_19} (`suc (`suc `zero)) > > > > [here _19 is the unsolved meta of type ?] > > > This unsolved meta explains it! Thank you for pointing out how to make it > visible. > > > -- > Regards, > Marko Dimja?evi? > https://dimjasevic.net/marko > Mastodon: https://mamot.fr/@mdimjasevic > PGP key ID: 056E61A6F3B6C9323049DBF9565EE9641503F0AA > Learn email self-defense! https://emailselfdefense.fsf.org From william.lawrence.harrison at gmail.com Tue Sep 29 23:40:02 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Tue, 29 Sep 2020 17:40:02 -0400 Subject: [Agda] Verifying type inference in Agda? Message-ID: Hi, I?m wondering if anyone has a pointer to a case study of verifying a type inference algorithm in Agda? Simple examples (even a toy example) would be alright (even preferred). I?m mainly interested in the structuring of the verifications in Agda. Thanks, Bill Sent from my iPad From thiemann at informatik.uni-freiburg.de Wed Sep 30 08:50:24 2020 From: thiemann at informatik.uni-freiburg.de (Peter Thiemann) Date: Wed, 30 Sep 2020 08:50:24 +0200 Subject: [Agda] Verifying type inference in Agda? In-Reply-To: References: Message-ID: <6897190D-611B-4689-86E0-321192C29CA4@informatik.uni-freiburg.de> IIRC Kenichi Asai has looked into that based on Conor's unification algorithm. -Peter > On 29. Sep 2020, at 23:40, William Harrison wrote: > > Hi, > > I?m wondering if anyone has a pointer to a case study of verifying a type inference algorithm in Agda? Simple examples (even a toy example) would be alright (even preferred). I?m mainly interested in the structuring of the verifications in Agda. > > Thanks, > Bill > > Sent from my iPad > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From wadler at inf.ed.ac.uk Wed Sep 30 12:10:59 2020 From: wadler at inf.ed.ac.uk (Philip Wadler) Date: Wed, 30 Sep 2020 11:10:59 +0100 Subject: [Agda] Verifying type inference in Agda? In-Reply-To: References: Message-ID: See https://plfa.github.io/Inference/ which provides a textbook account of bidirectional inference for STLC. Go well, -- P . \ Philip Wadler, Professor of Theoretical Computer Science, . /\ School of Informatics, University of Edinburgh . / \ and Senior Research Fellow, IOHK . http://homepages.inf.ed.ac.uk/wadler/ On Tue, 29 Sep 2020 at 22:40, William Harrison < william.lawrence.harrison at gmail.com> wrote: > Hi, > > I?m wondering if anyone has a pointer to a case study of verifying a type > inference algorithm in Agda? Simple examples (even a toy example) would be > alright (even preferred). I?m mainly interested in the structuring of the > verifications in Agda. > > Thanks, > Bill > > Sent from my iPad > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From nad at cse.gu.se Wed Sep 30 13:17:15 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 30 Sep 2020 13:17:15 +0200 Subject: [Agda] Bit-wise XOR for Word64? In-Reply-To: <3333D537-7DFA-4661-A738-BDCBF58D8A05@gmail.com> References: <3333D537-7DFA-4661-A738-BDCBF58D8A05@gmail.com> Message-ID: On 2020-09-29 19:04, David Banas wrote: > Is there a bit-wise XOR operator for the Word64 type available in > Agda? If there isn't, then you can define it yourself using the FFI: open import Agda.Builtin.Word postulate _xor_ : Word64 ? Word64 ? Word64 {-# FOREIGN GHC import qualified Data.Bits #-} {-# COMPILE GHC _xor_ = Data.Bits.xor #-} -- Optional: Postulated properties. However, note that this definition of _xor_ does not compute at compile-time. An alternative would be to define _xor_ using primWord64ToNat and primWord64FromNat, but the resulting code would presumably be less efficient. -- /NAD From thomas at lopatic.de Wed Sep 30 13:41:44 2020 From: thomas at lopatic.de (Thomas Lopatic) Date: Wed, 30 Sep 2020 13:41:44 +0200 Subject: [Agda] Why the light gray highlighting here? In-Reply-To: References: Message-ID: Hello there, I think that the most practical consequence of what Agda is warning you about is that some applications of _xor_ won't reduce as expected. Let's normalize something in Emacs based on your definitions: norm? : Bin ? Bin norm? y = { ?? xor y }0 Normalizing the above goal reduces it to y. That's expected, because that's the definitional equality given by your first _xor_ clause, which says that "?? xor y" is equal to y by definition. Now for the highlighted line. Let's normalize again: norm? : Bin ? Bin norm? x = { x xor ?? }1 We normalize the above goal... and... and... aaaaaaaand... nothing happens. It's "normalized" to "x xor ??". What's going on? After all, the second clause says that, by definition, "x xor ??" is equal to x. That's definitional equality! Go use it, Agda! Why would you use the first clause's definitional equality for reduction, but not the second clause's? --- Start of undergraduate handwaving. Somebody please speak up, if I'm spreading fake news here. --- For efficient reduction of applications of your _xor_ function, Agda builds a decision tree based on your pattern matches. When reducing an application, Agda consults this decision tree to figure out which of the clauses to pick for the arguments given in the application. At each level of the tree, one of the arguments is consulted to decide which branch to take to the next level of the tree. When Agda hits a leaf, this leaf tells her which clause to pick. In your case, the first level of the decision tree corresponds to the first argument. Is it ??? Or is it O? Or I? In the first normalization above, the one about "?? xor y", this question can be answered: The first argument is ??. So Agda can proceed to the second level of the decision tree, i.e., to the second argument. Progress! In the second normalization above, however, Agda cannot answer this question. The first argument is x. Could be anything. Agda thus doesn't know which branch of the decision tree to take at the first level, so she can't proceed to the next level, i.e., to the second argument. End of story. No reduction to x for us. Too bad, so sad. --- End of undergraduate handwaving. --- I typically encounter this when it impacts propositional equality in proofs and my ability to refl my way out of a proof. Let's consider again the first of the above normalizations. I can refl my way out of this: proof? : ? y ? ?? xor y ? y proof? y = refl Why does this work? Well, as seen above, "?? xor y" reduces (normalizes) to y, so we have "y ? y", which is refl. In contrast, I cannot refl my way out of this: proof? : ? x ? x xor ?? ? x proof? x = refl -- does not type-check As seen in the second "normalization" above, "x xor ??" doesn't reduce. So, we are stuck with "x xor ?? ? x", which isn't refl. What to do about it? In order to make it past the first level of the decision tree, we need to give Agda as the first argument a concrete data constructor for Bin to work with, instead of just x. Based on this data constructor Agda can then pick which branch to take from the first to the second level. But which of the constructors do we use in lieu of x? Well, as x can be anything, the answer is: all of them. This is accomplished by a case split on x. Let's ask Agda's Emacs mode to do this for us: proof? ?? = { }2 proof? (x O) = { }3 proof? (x I) = { }4 Now we can refl out way out of this again: proof? ?? = refl proof? (x O) = refl proof? (x I) = refl While the above scenarios are easy to spot, this can also bite you in proofs where a function has a larger number of arguments. I find that I sometimes unexpectedly have to case-split on an argument, because that's what the decision tree wants, even though my proof doesn't require the resulting cases of the argument to be considered separately. I then put the proof shared between the resulting cases in a lemma and use that lemma to prove the cases in one simple step per case, just like the above three refls. All in all, if a function application doesn't reduce, then you need to figure out what the decision tree really wants from you. If you prefer a more rigorous answer to all of this, then there's the following paper by Jesper Cockx and Andreas Abel, which explains elaboration from clauses to a case tree in detail: https://www.cambridge.org/core/journals/journal-of-functional-programming/article/elaborating-dependent-copattern-matching-no-pattern-left-behind/F13CECDAB2B6200135D45452CA44A8B3 So, that's how definitional equality seems to kind of break down sometimes. Thence the highlighting. I hope all of this helps to provide some additional context. Thomas On 2020-09-29 16:01, David Banas wrote: > Hi all, > > I'm wondering why the second line in my definition for `XOR` below is > being partially highlighted in a very light gray background, as shown. > > Thanks, > -db > > data Bin : Set where > ?? : Bin > _O : Bin ? Bin > _I : Bin ? Bin > > _xor_ : Bin ? Bin ? Bin > ?? xor y = y > x xor ?? = x > (x O) xor (y O) = (x xor y) O > (x O) xor (y I) = (x xor y) I > (x I) xor (y O) = (x xor y) I > (x I) xor (y I) = (x xor y) O > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From nad at cse.gu.se Wed Sep 30 14:31:57 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 30 Sep 2020 14:31:57 +0200 Subject: [Agda] Why the light gray highlighting here? In-Reply-To: References: Message-ID: On 2020-09-30 13:41, Thomas Lopatic wrote: > What's going on? After all, the second clause says that, by > definition, "x xor ??" is equal to x. That's definitional equality! Go > use it, Agda! Why would you use the first clause's definitional > equality for reduction, but not the second clause's? Consider the following definition: f : Bool ? Bool ? Bool f true _ = true f _ true = false f false false = false Note that the first two clauses disagree on the result for the inputs true and true. -- /NAD From thomas at lopatic.de Wed Sep 30 15:27:37 2020 From: thomas at lopatic.de (Thomas Lopatic) Date: Wed, 30 Sep 2020 15:27:37 +0200 Subject: [Agda] Why the light gray highlighting here? In-Reply-To: References: Message-ID: On 2020-09-30 14:31, Nils Anders Danielsson wrote: > On 2020-09-30 13:41, Thomas Lopatic wrote: >> What's going on? After all, the second clause says that, by >> definition, "x xor ??" is equal to x. That's definitional equality! Go >> use it, Agda! Why would you use the first clause's definitional >> equality for reduction, but not the second clause's? > > Consider the following definition: > > f : Bool ? Bool ? Bool > f true _ = true > f _ true = false > f false false = false > > Note that the first two clauses disagree on the result for the inputs > true and true. Oooooooh! Thank you for that insight. Thomas From asai at is.ocha.ac.jp Wed Sep 30 16:33:39 2020 From: asai at is.ocha.ac.jp (Kenichi Asai) Date: Wed, 30 Sep 2020 23:33:39 +0900 Subject: [Agda] Verifying type inference in Agda? In-Reply-To: <6897190D-611B-4689-86E0-321192C29CA4@informatik.uni-freiburg.de> References: <6897190D-611B-4689-86E0-321192C29CA4@informatik.uni-freiburg.de> Message-ID: <20200930143339.GA34893@pllab.is.ocha.ac.jp> > IIRC Kenichi Asai has looked into that based on Conor's unification > algorithm. I put it here, if you are interested: http://pllab.is.ocha.ac.jp/~asai/papers/paper2017.pdf -- Kenichi Asai From laniel at seas.upenn.edu Thu Oct 1 05:48:10 2020 From: laniel at seas.upenn.edu (Daniel Lee) Date: Wed, 30 Sep 2020 20:48:10 -0700 Subject: [Agda] Help with stuck unification/intrinsic typing in general Message-ID: Hi all, I'm super new to Agda and the Agda community. Hopefully this is the right place to ask something like this, but please call me out if it isn't. I'm working on an Agda development for a QTT formalization. I'm trying to use an intrinsically typed representation for terms, but run into unification issues when trying to define substitution. Substitution: [image: Screen Shot 2020-09-30 at 8.34.38 PM.png] Error message: [image: Screen Shot 2020-09-30 at 8.34.50 PM.png] Application def: [image: Screen Shot 2020-09-30 at 8.35.05 PM.png] I'm sort of at a loss for how to get around this. Is the issue because of the functions in the return type? More broadly, it seems like intrinsic typing is the Agda way of doing things, and gives a lot for free. And it works really well in the STLC example given in the PLFA textbook. But for a more complicated type system like this, I'm starting to think it might be easier to use extrinsic typing? I've also had to rely on the REWRITE pragma which I just learned isn't allowed in --safe due to potential non-convergence. Does someone maybe have experience with this and could speak to pros/cons of using intrinsic vs extrinsic typing here? Thanks, Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2020-09-30 at 8.34.38 PM.png Type: image/png Size: 9933 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2020-09-30 at 8.34.50 PM.png Type: image/png Size: 24441 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2020-09-30 at 8.35.05 PM.png Type: image/png Size: 8827 bytes Desc: not available URL: From nk480 at cl.cam.ac.uk Thu Oct 1 10:44:03 2020 From: nk480 at cl.cam.ac.uk (Neel Krishnaswami) Date: Thu, 1 Oct 2020 09:44:03 +0100 Subject: [Agda] Help with stuck unification/intrinsic typing in general In-Reply-To: References: Message-ID: <12cc95ae-b65b-e89a-1f52-893533175a87@cl.cam.ac.uk> Dear Daniel. In general, intrinsically typed representations are definitely the way to go when your object language does not have a conversion relation. If your language does have a conversion or judgemental equality relation, then intrinsic representations are enormously harder to work with. The basic issue is that the datatype representing typing will have proof trees corresponding to derivations of judgemental equality, and quotienting by the derivation of convertibility is giant PITA. (This is still active research, and I'm not actually up to date on where the state of the art here is -- probably Thorsten knows.) In your particular case, however, it looks like you have a different problem. The _._ constructor in your screen shot has the type: _?_ : ?{?} {?? ?? : Context ?} {A B q} ??? ? ?? ? A -? q ?? B ??? ? ?? ? A ??? ? (q ** ?? ++ ??) ? B Here, the return type of the function has an index which has function calls in it: ??? ... ? (*q ** ?? ++ ??*) ? B The Agda type inference algorithm uses unification, and unification problems involving calls to arbitrary functions are, in general, hopeless. *Unification and pattern match coverage will generally only work reliably if the return type's indices contain expressions made only from variables and data constructors. * ** If memory serves, Conor McBride calls indices containing function calls "green slime", and warns people never to touch it. The way to keep from being contaminated by green slime is to use an explicit equality -- if you change your datatype declaration to the following: _?_ : ?{?} {?? ?? ? : Context ?} {A B q} ??? ? ?? ? A -? q ?? B ??? ? ?? ? A ??? ? ? ? q ** ?? ++ ?? ??? ? ? ? B The case splitter will see the variable ? and happily introduce a case for the _?_ constructor. But in the case branch, you will possess the equality ? ? q ** ?? ++ ?? which you can use to do any necessary reasoning yourself, thereby sparing the match coverage algorithm from having to do arbitrary mathematical reasoning. Best, Neel On 01/10/2020 04:48, Daniel Lee wrote: > Hi all, > > I'm super new to Agda and the Agda community. Hopefully this is the right > place to ask something like this, but please call me out if it isn't. > > > I'm working on an Agda development for a QTT formalization. I'm trying to > use an intrinsically typed representation for terms, but run into > unification issues when trying to define substitution. > > Substitution: > [image: Screen Shot 2020-09-30 at 8.34.38 PM.png] > > Error message: > [image: Screen Shot 2020-09-30 at 8.34.50 PM.png] > > Application def: > [image: Screen Shot 2020-09-30 at 8.35.05 PM.png] > > I'm sort of at a loss for how to get around this. Is the issue because of > the functions in the return type? > > More broadly, it seems like intrinsic typing is the Agda way of doing > things, and gives a lot for free. And it works really well in the STLC > example given in the PLFA textbook. But for a more complicated type system > like this, I'm starting to think it might be easier to use extrinsic > typing? I've also had to rely on the REWRITE pragma which I just learned > isn't allowed in --safe due to potential non-convergence. > Does someone maybe have experience with this and could speak to pros/cons > of using intrinsic vs extrinsic typing here? > > Thanks, > Daniel > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -- Neel Krishnaswami nk480 at cl.cam.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Thu Oct 1 12:32:49 2020 From: guillaume.allais at ens-lyon.org (guillaume allais) Date: Thu, 1 Oct 2020 11:32:49 +0100 Subject: [Agda] Help with stuck unification/intrinsic typing in general In-Reply-To: <12cc95ae-b65b-e89a-1f52-893533175a87@cl.cam.ac.uk> References: <12cc95ae-b65b-e89a-1f52-893533175a87@cl.cam.ac.uk> Message-ID: <67e82658-8e1f-99d0-7368-2a9e925aa04d@ens-lyon.org> Hi all, This is indeed the right move. An additional trick one can play is to use an *inductive* 4-place relation `? ? q ** ?? ++ ??` instead of a mere equality proof. With this extra structure, you will be able to perform induction directly on the proof rather than having to do case analysis on `?` and `??` and use the proof of equality to dismiss the impossible cases. This should make the whole experience more pleasant. Best, gallais On 01/10/2020 09:44, Neel Krishnaswami wrote: > > Dear Daniel. > > In general, intrinsically typed representations are definitely the way > to go when your object language does not have a conversion relation. > > If your language does have a conversion or judgemental equality > relation, then intrinsic representations are enormously harder to work > with. The basic issue is that the datatype representing typing will > have proof trees corresponding to derivations of judgemental equality, > and quotienting by the derivation of convertibility is giant PITA. > (This is still active research, and I'm not actually up to date on > where the state of the art here is -- probably Thorsten knows.) > > In your particular case, however, it looks like you have a different > problem. The _._ constructor in your screen shot has the type: > > _?_ : ?{?} {?? ?? : Context ?} {A B q} > ??? ? ?? ? A -? q ?? B > ??? ? ?? ? A > ??? ? (q ** ?? ++ ??) ? B > > Here, the return type of the function has an index which has function > calls in it: > > ??? ... ? (*q ** ?? ++ ??*) ? B > > The Agda type inference algorithm uses unification, and unification > problems involving calls to arbitrary functions are, in general, > hopeless. *Unification and pattern match coverage will generally only > work reliably if the return type's indices contain expressions made > only from variables and data constructors. * > > If memory serves, Conor McBride calls indices containing function > calls "green slime", and warns people never to touch it. The way to > keep from being contaminated by green slime is to use an explicit > equality -- if you change your datatype declaration to the following: > > _?_ : ?{?} {?? ?? ? : Context ?} {A B q} > ??? ? ?? ? A -? q ?? B > ??? ? ?? ? A > ??? ? ? ? q ** ?? ++ ?? > ??? ? ? ? B > > The case splitter will see the variable ? and happily introduce a case > for the _?_ constructor. But in the case branch, you will possess the > equality ? ? q ** ?? ++ ?? which you can use to do any necessary > reasoning yourself, thereby sparing the match coverage algorithm from > having to do arbitrary mathematical reasoning. > > Best, > Neel > > On 01/10/2020 04:48, Daniel Lee wrote: >> Hi all, >> >> I'm super new to Agda and the Agda community. Hopefully this is the right >> place to ask something like this, but please call me out if it isn't. >> >> >> I'm working on an Agda development for a QTT formalization. I'm trying to >> use an intrinsically typed representation for terms, but run into >> unification issues when trying to define substitution. >> >> Substitution: >> [image: Screen Shot 2020-09-30 at 8.34.38 PM.png] >> >> Error message: >> [image: Screen Shot 2020-09-30 at 8.34.50 PM.png] >> >> Application def: >> [image: Screen Shot 2020-09-30 at 8.35.05 PM.png] >> >> I'm sort of at a loss for how to get around this. Is the issue because of >> the functions in the return type? >> >> More broadly, it seems like intrinsic typing is the Agda way of doing >> things, and gives a lot for free. And it works really well in the STLC >> example given in the PLFA textbook. But for a more complicated type system >> like this, I'm starting to think it might be easier to use extrinsic >> typing? I've also had to rely on the REWRITE pragma which I just learned >> isn't allowed in --safe due to potential non-convergence. >> Does someone maybe have experience with this and could speak to pros/cons >> of using intrinsic vs extrinsic typing here? >> >> Thanks, >> Daniel >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > -- > Neel Krishnaswami > nk480 at cl.cam.ac.uk > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cguillaume.allais%40strath.ac.uk%7Cec25fc40f26f43e1903108d865e62ade%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637371386947907230&sdata=%2FZY4zKWoYjDwh0yDY%2BO0S76IWk9WC5caow98WgTuBxw%3D&reserved=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.lawrence.harrison at gmail.com Thu Oct 1 22:19:52 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Thu, 1 Oct 2020 16:19:52 -0400 Subject: [Agda] Question about inequality and absurd patterns Message-ID: Hi- I have a question about proving inequalities (?) in Agda. It's probably such a stupid question that I should be embarrassed for asking it, but, fortunately, I lost my capacity to feel embarrassment years ago. In the following Agda code, the "good" definition works, but the "bad" one does not and yields the commented complaint. I assume that (?) insists on literal term equality and that is the source of the different responses from Agda. Is there any way of evaluating under the (?)? I'm formulating a typed language using strings for variables, and so this sort of inequality calculation is involving in variable dereference. I've attached a minimal example. Thanks in advance. good : "x" ? "y" good () bad : "x" ? Data.Vec.head ("y" ? "y" ? []) bad () {- Failed to solve the following constraints: Is empty: "x" ? head ("y" ? "y" ? []) [ at <...snip...>/MinimalExample.agda:11,5-7 ] -} -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MinimalExample.agda Type: application/octet-stream Size: 385 bytes Desc: not available URL: From mechvel at scico.botik.ru Fri Oct 2 00:32:14 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 02 Oct 2020 01:32:14 +0300 Subject: [Agda] Question about inequality and absurd patterns In-Reply-To: References: Message-ID: On 2020-10-01 23:19, William Harrison wrote: > Hi- > > I have a question about proving inequalities (?) in Agda. It's > probably such a stupid question that I should be embarrassed for > asking it, but, fortunately, I lost my capacity to feel embarrassment > years ago. > > In the following Agda code, the "good" definition works, but the "bad" > one does not and yields the commented complaint. I assume that (?) > insists on literal term equality and that is the source of the > different responses from Agda. Is there any way of evaluating under > the (?)? I'm formulating a typed language using strings for > variables, and so this sort of inequality calculation is involving in > variable dereference. I've attached a minimal example. Thanks in > advance. > >> good : "x" ? "y" >> >> good () >> >> bad : "x" ? Data.Vec.head ("y" ? "y" ? []) >> >> bad () >> >> {- >> >> Failed to solve the following constraints: >> >> Is empty: "x" ? head ("y" ? "y" ? []) >> >> [ at <...snip...>/MinimalExample.agda:11,5-7 ] >> >> -} And bad = good is type-checked (in Agda 2.6.1). I do not guess what is the matter. -- SM From Jesper at sikanda.be Fri Oct 2 08:58:58 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 2 Oct 2020 08:58:58 +0200 Subject: [Agda] Question about inequality and absurd patterns In-Reply-To: References: Message-ID: Hi Bill, This is an unfortunate bug in the latest release of Agda, see https://github.com/agda/agda/issues/4882. It's already been fixed on the development version, so the fix should come once 2.6.2 is released. -- Jesper On Fri, Oct 2, 2020 at 12:33 AM wrote: > On 2020-10-01 23:19, William Harrison wrote: > > Hi- > > > > I have a question about proving inequalities (?) in Agda. It's > > probably such a stupid question that I should be embarrassed for > > asking it, but, fortunately, I lost my capacity to feel embarrassment > > years ago. > > > > In the following Agda code, the "good" definition works, but the "bad" > > one does not and yields the commented complaint. I assume that (?) > > insists on literal term equality and that is the source of the > > different responses from Agda. Is there any way of evaluating under > > the (?)? I'm formulating a typed language using strings for > > variables, and so this sort of inequality calculation is involving in > > variable dereference. I've attached a minimal example. Thanks in > > advance. > > > >> good : "x" ? "y" > >> > >> good () > >> > >> bad : "x" ? Data.Vec.head ("y" ? "y" ? []) > >> > >> bad () > >> > >> {- > >> > >> Failed to solve the following constraints: > >> > >> Is empty: "x" ? head ("y" ? "y" ? []) > >> > >> [ at <...snip...>/MinimalExample.agda:11,5-7 ] > >> > >> -} > > And > bad = good > > is type-checked (in Agda 2.6.1). > I do not guess what is the matter. > > -- > SM > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Fri Oct 2 11:48:40 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 2 Oct 2020 11:48:40 +0200 Subject: [Agda] Agda Implementors' Meeting XXXIII: Call for talks and participation In-Reply-To: References: Message-ID: Hi all, This is a gentle reminder to register for the Agda meeting which starts in a little over a week. There are still open slots for talks, so if you'd like to give one please let me know (preferably before Monday the 5th). Best regards, Jesper On Fri, Sep 11, 2020 at 9:56 PM Jesper Cockx wrote: > The thirty-third Agda Implementors' Meeting will take place online from > Monday 2020-10-12 to Friday 2020-10-23. The meeting will be organized in a > similar way to AIM XXXII, with a reduced program spread over two weeks. See > the wiki for details: > > https://wiki.portal.chalmers.se/agda/Main/AIMXXXIII > > You can register by sending me an email at jesper at sikanda.be, or by > editing the wiki page directly. Please also send me an email if you would > like to give a talk, preferably before 2020-10-05. > > Best regards, > Jesper > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Vlad.Rusu at inria.fr Fri Oct 2 14:36:08 2020 From: Vlad.Rusu at inria.fr (vlad) Date: Fri, 2 Oct 2020 14:36:08 +0200 Subject: [Agda] nontermination and Sized types Message-ID: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> Dear Agda users, I am new to this list and fairly new to Agda as well. While attempting a certain development I've run into an issue about non-termination, in a setting where I was expecting Sized types to ensure termination. I think I have an explanation why this happens, but I would like to see what specialists have to say. Apologies in advance for the long post. Consider the following piece of code (V1) : /{-#? OPTIONS --size #-}// //open import Size// //postulate// //? P : Size ? Set// //? P-Size :? (? (i : Size) ? (? (j : Size< i) ? P j) ? P i)// //nonterminating : ? (i : Size) ? P i// //nonterminating i = P-Size i ? { j ? nonterminating j } / The recursive call to /nonterminating/ is /j /of type /Size< i/, where/i : Size/ is the argument of /nonterminating/. So, I would expect Agda to accepts this, since the Size argument /j/ of the recursive call is less than the Size argument /i/ of the function. However, Agda rejects this as, well, ... nonterminating. While trying to understand what's going on I modified the code as follows : I've replaced the postulate by hypotheses in the definition (V2) : /nonterminating' :? (P : Size ? Set)// //????????????????????????????? (P-Size :? (? (i : Size) ? (? (j : Size< i) ? P j) ? P i)) ?// //????????????????????????????? ( ? (i : Size) ? P i)// //nonterminating' P P-Size i = P-Size i ???? { j ? nonterminating' P P-Size j? }/ Looking at (V2) one can notice that /nonterminating' / looks like a well-founded induction principle for the /_<_///relation on /Size/, defined by /j < i /iff/(t : Size< i)./ Which is strange since /_<_/ is *not* well founded, as /? < ? /holds. Indeed, if /nonterminating'/ were accepted then it could be used to prove that /_<_ /is well? founded: just take /P s = "there is no infinite <-decreasing sequance starting at s"/. So, I believe the Agda termination checker rightfully rejects the definition (V2). However, the termination checker also rejects (V1), which to me looks not obviously problematic. It is not, I believe, equivalent to to (V2) : (V2) says something about *all* predicates /P/ with such-and-such properties, whereas (V1) just postulates the properties for *some* (also postulated) predicate P/./ So, I'm assuming the following happens. The Agda termination checker, presumably based on some type system, rejects (V2), and rightly so because accepting it would leads to an inconsistency : /_<_//is well founded/ vs. /? < ?/. Now, termination is undecidable, so the termination checker/underlying type system necessarily rejects more definitions than it theoretically should. So, it also rejects? (V1), as, due to inevitable approximations in this undecidable setting,? it it does not distinguish the possibly unproblematic (V1) from the definitely problematic (V2). ?Does any of this make sense ? ?Thanks in advance for any explanations ! - Vlad Rusu -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.allais at ens-lyon.org Fri Oct 2 15:16:23 2020 From: guillaume.allais at ens-lyon.org (guillaume allais) Date: Fri, 2 Oct 2020 14:16:23 +0100 Subject: [Agda] nontermination and Sized types In-Reply-To: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> References: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> Message-ID: Hi Vlad, I agree with you: to prevent inconsistencies Agda rejects more programs than necessary. In the case we are interested in, Agda has a notion of "trusted" sources of `Size< i` that may be use to prove termination of a definition using sized types. And arbitrary functions are not one such trusted sources (they're essentially inductive types & projections out of record IIRC). Best, gallais On 02/10/2020 13:36, vlad wrote: > > Dear Agda users, > > I am new to this list and fairly new to Agda as well. While attempting > a certain development I've run into an issue about non-termination, in > a setting where I was expecting Sized types to ensure termination. I > think I have an explanation why this happens, but I would like to see > what specialists have to say. Apologies in advance for the long post. > > Consider the following piece of code (V1) : > > /{-#? OPTIONS --size #-}// > //open import Size// > //postulate// > //? P : Size ? Set// > //? P-Size :? (? (i : Size) ? (? (j : Size< i) ? P j) ? P i)// > //nonterminating : ? (i : Size) ? P i// > //nonterminating i = P-Size i ? { j ? nonterminating j } / > > The recursive call to /nonterminating/ is /j /of type /Size< i/, > where/i : Size/ is the argument of /nonterminating/. So, I would > expect Agda to accepts this, since the Size argument /j/ of the > recursive call is less than the Size argument /i/ of the function. > However, Agda rejects this as, well, ... nonterminating. While trying > to understand what's going on I modified the code as follows : I've > replaced the postulate by hypotheses in the definition (V2) : > > /nonterminating' :? (P : Size ? Set)// > //????????????????????????????? (P-Size :? (? (i : Size) ? (? (j : > Size< i) ? P j) ? P i)) ?// > //????????????????????????????? ( ? (i : Size) ? P i)// > //nonterminating' P P-Size i = P-Size i ???? { j ? nonterminating' P > P-Size j? }/ > > Looking at (V2) one can notice that /nonterminating' / looks like a > well-founded induction principle for the /_<_///relation on /Size/, > defined by /j < i /iff/(t : Size< i)./ Which is strange since /_<_/ is > *not* well founded, as /? < ? /holds. Indeed, if /nonterminating'/ > were accepted then it could be used to prove that /_<_ /is well? > founded: just take /P s = "there is no infinite <-decreasing sequance > starting at s"/. So, I believe the Agda termination checker rightfully > rejects the definition (V2). > > However, the termination checker also rejects (V1), which to me looks > not obviously problematic. It is not, I believe, equivalent to to (V2) > : (V2) says something about *all* predicates /P/ with such-and-such > properties, whereas (V1) just postulates the properties for *some* > (also postulated) predicate P/./ > > So, I'm assuming the following happens. The Agda termination checker, > presumably based on some type system, rejects (V2), and rightly so > because accepting it would leads to an inconsistency : /_<_//is well > founded/ vs. /? < ?/. Now, termination is undecidable, so the > termination checker/underlying type system necessarily rejects more > definitions than it theoretically should. So, it also rejects (V1), > as, due to inevitable approximations in this undecidable setting,? it > it does not distinguish the possibly unproblematic (V1) from the > definitely problematic (V2). > > ?Does any of this make sense ? > > ?Thanks in advance for any explanations ! > > - Vlad Rusu > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=02%7C01%7Cguillaume.allais%40strath.ac.uk%7C2621c4e07e464f077c5508d866cfd38d%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637372390376274061&sdata=b8TfnaT0geUFasxnk37guF9xVws%2F%2FZuV8Dn%2BOTn4fBg%3D&reserved=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From amp12 at cam.ac.uk Fri Oct 2 15:52:58 2020 From: amp12 at cam.ac.uk (Andrew M. Pitts) Date: Fri, 2 Oct 2020 13:52:58 +0000 Subject: [Agda] nontermination and Sized types In-Reply-To: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> References: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> Message-ID: > On 2 Oct 2020, at 13:36, vlad wrote: > > Looking at (V2) one can notice that nonterminating' looks like a well-founded induction principle for the _<_ relation on Size, defined by j < i iff (t : Size< i). Which is strange since _<_ is *not* well founded, as ? < ? holds. Indeed, if nonterminating' were accepted then it could be used to prove that _<_ is well founded: just take P s = "there is no infinite <-decreasing sequance starting at s". So, I believe the Agda termination checker rightfully rejects the definition (V2). I believe issue #3026 is still open and that at the moment (v2.6.1) Agda allows one to prove _<_ for Size is well-founded and hence derive a logical inconsistency. :-) Andy From Vlad.Rusu at inria.fr Sat Oct 3 09:33:35 2020 From: Vlad.Rusu at inria.fr (vlad) Date: Sat, 3 Oct 2020 09:33:35 +0200 Subject: [Agda] nontermination and Sized types In-Reply-To: References: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> Message-ID: Thank you very much for the information. IMO this bug and others (incompatibility of sized types with equality, ...) should be better documented. Best regards, ?- Vlad On 02/10/2020 15:52, Andrew M. Pitts wrote: >> On 2 Oct 2020, at 13:36, vlad wrote: >> >> Looking at (V2) one can notice that nonterminating' looks like a well-founded induction principle for the _<_ relation on Size, defined by j < i iff (t : Size< i). Which is strange since _<_ is *not* well founded, as ? < ? holds. Indeed, if nonterminating' were accepted then it could be used to prove that _<_ is well founded: just take P s = "there is no infinite <-decreasing sequance starting at s". So, I believe the Agda termination checker rightfully rejects the definition (V2). > I believe issue #3026 is still open and that at the moment (v2.6.1) Agda allows one to prove _<_ for Size is well-founded and hence derive a logical inconsistency. :-) > > Andy > > > From james.wood.100 at strath.ac.uk Sat Oct 3 15:24:31 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sat, 3 Oct 2020 14:24:31 +0100 Subject: [Agda] nontermination and Sized types In-Reply-To: References: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> Message-ID: My experience, as an occasional user of this stuff, is that `Size<` is broken, and you have to make do with `?`, `_?_`, &c. This makes it a really bad thing that the example in the documentation uses `Size<` (if my impressions are correct). James On 03/10/2020 08:33, vlad wrote: > Thank you very much for the information. IMO this bug and others > (incompatibility of sized types with equality, ...) should be better > documented. > > Best regards, > > ?- Vlad > > On 02/10/2020 15:52, Andrew M. Pitts wrote: >>> On 2 Oct 2020, at 13:36, vlad wrote: >>> >>> Looking at (V2) one can notice that nonterminating'? looks like a >>> well-founded induction principle for the _<_ relation on Size, >>> defined by j < i iff (t : Size< i). Which is strange since _<_ is >>> *not* well founded, as ? < ? holds. Indeed, if nonterminating' were >>> accepted then it could be used to prove that _<_ is? well? founded: >>> just take P s = "there is no infinite <-decreasing sequance starting >>> at s". So, I believe the Agda termination checker rightfully rejects >>> the definition (V2). >> I believe issue #3026 is still open and that at the moment (v2.6.1) >> Agda allows one to prove _<_ for Size is well-founded and hence derive >> a logical inconsistency. :-) >> >> Andy >> >> >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From Vlad.Rusu at inria.fr Sat Oct 3 19:38:11 2020 From: Vlad.Rusu at inria.fr (Vlad) Date: Sat, 3 Oct 2020 19:38:11 +0200 Subject: [Agda] nontermination and Sized types In-Reply-To: <4C9FC92C-FF0B-4BF2-B496-8B6CE0BB0DD9@cl.cam.ac.uk> References: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> <4C9FC92C-FF0B-4BF2-B496-8B6CE0BB0DD9@cl.cam.ac.uk> Message-ID: Thank you all for the answers so far. I have a further question, and I'm anxious to know the answer like my Agda development depended on it (which it does) : in one of the discussions about issues with sized types https://github.com/agda/agda/issues/2820 there is the following code : data [Size<_] (i : Size) : Set where ? box : Size< i ? [Size< i ] unbox : ? {i} ? [Size< i ] ? Size< i unbox (box j) = j elim : ? ? {p} ? (P : Size ? Set p) ? ? (? i ? ((j : [Size< i ]) ? P (unbox j)) ? P i) ? ? ? i ? P i elim P f i = f i ? { (box j) ? elim P f j } If understand correctly, "elim" is *not* a well-founded induction principle on Size (which would be wrong) but something approaching it... which turns out to be enough for me. Thus, I would like to know whether there is a *known* inconsistency that can be derived using "elim". I tried using it to prove an actual well-founded induction principle on Size? and that seems impossible, so there's at least some hope. - Vlad From mechvel at scico.botik.ru Sat Oct 3 21:32:12 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 03 Oct 2020 22:32:12 +0300 Subject: [Agda] termination problem Message-ID: <43c0b0c4acfe8615c5b5a2e8f5ccdb49@scico.botik.ru> Dear Agda developers, There is a certain particular effect in termination check in Agda-2.6.1. -- Sum of two monomial lists. For the same exponents the coefficients are summed by -- _+_. If e > e', then the first head monomial is put ahead. -- It is almost same as merging lists. _+ms_ : Op? (List Mon) [] +ms mons' = mons' mons +ms [] = mons ((mon? a e) ? mons) +ms ((mon? b e') ? mons') = with <-cmp e e' ... | tri> _ _ _ = (mon? a e) ? (mons +ms ((mon? b e') ? mons')) ... | tri< _ _ _ = (mon? b e') ? (((mon? a e) ? mons) +ms mons') ... | tri? _ _ _ = (mon? (a + b) e) ? (mons +ms mons') On the right hand side, +ms is applied to the two lists, and at least one of these lists is a tail of the corresponding argument on the left hand side. Agda reports of unproved termination. All right, this is a known effect. One has to introduce a counter as an additional argument. Instead I try another version for the last sentence: ((mon? a e) ? mons) +ms ((mon? b e') ? mons') = with <-cmp e e' | (mon? b e') ? (((mon? a e) ? mons) +ms mons') -- I | (mon? (a + b) e) ? (mons +ms mons') -- II | (mon? a e) ? (mons +ms ((mon? b e') ? mons')) -- III ... | tri< _ _ _ | xs | _ | _ = xs ... | tri? _ _ _ | _ | ys | _ = ys ... | tri> _ _ _ | _ | _ | zs = zs And it is type-checked. 1) Can you, please, comment this? 2) For a good performance, only a single term among {I, II, II} needs to be computed. Will this be so? Thanks, ------ Sergei From tarmo at cs.ioc.ee Sun Oct 4 13:47:42 2020 From: tarmo at cs.ioc.ee (Tarmo Uustalu) Date: Sun, 4 Oct 2020 14:47:42 +0300 Subject: [Agda] ETAPS 2021 final joint call for papers Message-ID: <20201004144742.744d63ec@cs.ioc.ee> ****************************************************************** JOINT CALL FOR PAPERS 24th European Joint Conferences on Theory and Practice of Software ETAPS 2021 Luxembourg, Luxembourg, 27 March-1 April 2021 http://www.etaps.org/2021 ****************************************************************** We are closely monitoring the development of the COVID-19 pandemic. If it is not viable to hold ETAPS 2021 as a physical conference, we will run it virtually on the same dates. We will decide in January 2021 at the latest. If ETAPS 2021 can go ahead as a physical conference, accepted authors may still present remotely. -- ABOUT ETAPS -- ETAPS is the primary European forum for academic and industrial researchers working on topics relating to software science. ETAPS, established in 1998, is a confederation of four annual conferences, accompanied by satellite workshops. ETAPS 2021 is the twenty-fourth event in the series. -- MAIN CONFERENCES (29 March-1 April) -- * ESOP: European Symposium on Programming (PC chair: Nobuko Yoshida, Imperial College London, UK) * FASE: Fundamental Approaches to Software Engineering (PC chairs: Esther Guerra, Univ. Aut?noma de Madrid, Spain, and Mari?lle Stoelinga, Univ. Twente, The Netherlands) * FoSSaCS: Foundations of Software Science and Computation Structures (PC chairs: Stefan Kiefer, Univ. of Oxford, UK, and Christine Tasson, IRIF, Univ. Paris Diderot, France) * TACAS: Tools and Algorithms for the Construction and Analysis of Systems (PC chairs: Jan Friso Groote, Techn. Univ. Eindhoven, The Netherlands, and Kim G. Larsen, Aalborg Univ., Denmark) TACAS '21 will host the 10th Competition on Software Verification (SV-COMP). -- INVITED SPEAKERS -- The invited speakers and tutorialists planned for ETAPS 2020 have been reinvited: * Unifying speakers: Lars Birkedal (Aarhus Universitet, Denmark) Jane Hillston (University of Edinburgh, UK) * ESOP invited speaker: Isil Dillig (University of Texas at Austin, USA) * FASE invited speaker: Willem Visser (Stellenbosch University, South Africa) * Tutorial speakers: Erika ?brah?m (RWTH Aachen University, Germany) Madhusudan Parthasararathy (University of Illinois at Urbana-Champaign, USA) -- IMPORTANT DATES * Papers due: 15 October 2020 23:59 AoE (=GMT-12) * Rebuttal (ESOP, FoSSaCS and, for selected papers, TACAS): 7 December 00:01 AoE - 9 December 23:59 AoE * Notification: 23 December 2020 * Camera-ready versions due: 22 January 2021 -- SUBMISSION INSTRUCTIONS -- The four main conferences of ETAPS 2021 solicit contributions of the following types. All page limits are given **excluding bibliography**. * ESOP: regular research papers of max 25 pp * FASE: regular research papers and empirical evaluation papers of max 18 pp, tool demonstration papers of max 6 pp + mandatory appendix of max 6 pp, * FoSSaCS: regular research papers of max 18 pp * TACAS: regular research papers, case study papers and regular tool papers of max 16 pp, tool demonstration papers of max 6 pp For definitions of the different paper types and specific instructions, where they are present, see the webpages of the individual conferences. All accepted papers will appear in the conference proceedings and have presentations during the conference. A condition of submission is that, if the submission is accepted, one of the authors attends the conference to give the presentation. **Remote attendance and presentation will be possible if ETAPS 2021 goes ahead as a physical conference.** Submitted papers must be in English presenting original research. They must be unpublished and not submitted for publication elsewhere. In particular, simultaneous submission of the same contribution to multiple ETAPS conferences is forbidden. Submissions must follow the formatting guidelines of Springer's LNCS and be submitted electronically in pdf through the Easychair author interface of the respective conference. Submissions not adhering to the specified format and length may be rejected immediately. FASE will use double-blind reviewing. Authors are asked to omit their names and institutions; refer to own prior work in the third person; not to include acknowledgements that might identify them. Regular tool paper and tool demonstration paper submissions to TACAS must be accompanied by an artifact. The artifact will be evaluated and the outcome will be taken into account in the acceptance decision of the paper. ESOP and FoSSaCS will use an author rebuttal phase. TACAS will have rebuttal for selected papers. -- PUBLICATION The proceedings will be published in the Advanced Research in Computing and Software Science (ARCoSS) subline of Springer's LNCS series. The proceedings volumes will appear in gold open access, so the published versions of all papers will be available for everyone to download from the publisher's website freely, from the date of online publication, perpetually. The copyright of the papers will remain with the authors. -- SATELLITE EVENTS (27-28 March) -- A number of satellite workshops will take place before the main conferences. -- CITY AND HOST INSTITUTION -- Luxembourg is the capital of the small European nation of the same name. Built amid deep gorges cut by the Alzette and P?trusse rivers, it is famed for its ruins of medieval fortifications. The vast Bock Casemates tunnel network encompasses a dungeon, prison and the Archaeological Crypt, considered the city's birthplace. Along ramparts above, the Chemin de la Corniche promenade offers dramatic viewpoints. ETAPS 2021 is organised by the Interdisciplinary Centre for Security, Reliability and Trust (SnT), Universit? du Luxembourg. -- ORGANIZERS -- General chair: Peter Y. A. Ryan (SnT & Universit? du Luxembourg) Workshops chair: Joaquin Garcia-Alfaro (Telecom SudParis, France) Organization chair: Peter Roenne (SnT Luxembourg) Event manager: Magali Martin (SnT Luxembourg) -- FURTHER INFORMATION -- Please do not hesitate to contact the organizers at etaps2021 at uni.lu . From amp12 at cam.ac.uk Sun Oct 4 15:06:39 2020 From: amp12 at cam.ac.uk (Andrew M. Pitts) Date: Sun, 4 Oct 2020 13:06:39 +0000 Subject: [Agda] Help with understanding REWRITE Message-ID: <5EF91F92-1CED-4B21-B66E-5DF7C4454663@cl.cam.ac.uk> I?m struggling to understand an aspect of --rewriting in Agda (2.6.1) and wonder if someone can help? The following artificial example illustrates my problem (which is more complicated and less artificial). --- {-# OPTIONS --rewriting #-} open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite data C (S : Set) : Set? where mkC : (A : Set) (e : A ? S) ? --------- C S Cset : (S : Set) ? C S ? Set Cset S (mkC A e) = A Cequ : (S : Set)(c : C S) ? Cset S c ? S Cequ S (mkC A e) = e {-# REWRITE Cequ #-} ? this is not accepted! ?? Given S : Set, the datatype C S contains values given by a set A and a proof that A equals S. Can we make that proof definitional rather than propositional, using a REWRITE? Apparently not ? if you check the above Agda code, Agda 2.6.1 complains -- Cequ is not a legal rewrite rule, since the following variables are -- not bound by the left hand side: S -- when checking the pragma REWRITE Cequ The ?left-hand side? it refers to is Cset S c, which certainly contains an occurrence of S. Why is S not ?bound by? this left-hand side? I declared the type of Cequ to be (S : Set)(c : C S) ? Cset S c ? S bu Agda 2.6.1 reports it to be (S : Set) (c : C S) ? Cset _ c ? S Note the underscore. Presumably this is why REWRITE Cequ is not accepted. Where did that underscore come from? And is there some way to avoid it and have the REWRITE accepted? Andy From mechvel at scico.botik.ru Sun Oct 4 19:19:48 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sun, 04 Oct 2020 20:19:48 +0300 Subject: [Agda] a strange "unsolved" report Message-ID: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> Dear Agda developers, There is a question about the following code fragment: ----------------------------------------------------- +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? mons''} ... = aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') where m = mon? a e; m' = mon? b e'; m'' = mon? c e'' mmons = m ? mons -- * -- m'mons' : List Mon -- (I-s) m'mons' = m' ? mons' -- (I) m''mons'' = m'' ? mons'' ... ----------------------------------------------------- Agda 2.6.1 reports " Sort _1156 [ at ...Over-abelianGroup.agda:414,5-12 ] _1157 : _1156 [ at ...Over-abelianGroup.agda:414,5-12 ] _1159 : _1157 [ at ...Over-abelianGroup.agda:414,15-25 ] " I guess this is the kind of "unsolved metas". And the first "unsolved" is about the line marked (I). The previous line (marked *) is solved - while it is not any more clear than (I). Then, after adding the signature (I-s), everything is type-checked. 1) This necessity to add signature in the middle of an array of short assignments of the same type looks strange. 2) There are many similar fragments in the program, and I never observed such an effect. What might this mean? -- SM From james.wood.100 at strath.ac.uk Sun Oct 4 22:30:39 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sun, 4 Oct 2020 21:30:39 +0100 Subject: [Agda] a strange "unsolved" report In-Reply-To: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> References: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> Message-ID: <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> Hi Sergei, Quick questions first: is `_?_` overloaded at all in this context? That'd be my guess for why Agda has no clue what the type is supposed to be. Regards, James On 04/10/2020 18:19, mechvel at scico.botik.ru wrote: > Dear Agda developers, > > There is a question about the following code fragment: > > ----------------------------------------------------- > +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? > mons''} ... = > > ??? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') > ??? where > ??? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' > > ??? mmons = m ? mons???????????????? -- * > > ??? -- m'mons' : List Mon??????????? -- (I-s) > ??? m'mons' = m' ? mons'???????????? -- (I) > > ??? m''mons'' = m'' ? mons'' > ??? ... > ----------------------------------------------------- > > Agda 2.6.1 reports > " > Sort _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] > _1157 : _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] > _1159 : _1157? [ at ...Over-abelianGroup.agda:414,15-25 ] > " > > I guess this is the kind of "unsolved metas". > And the first "unsolved" is about the line marked (I). > > The previous line (marked *) is solved - while it is not any more clear > than (I). > > Then, after adding the signature (I-s), everything is type-checked. > 1) This necessity to add signature in the middle of an array of short > assignments of the same > ?? type looks strange. > 2) There are many similar fragments in the program, and I never observed > such an effect. > > What might this mean? > > -- > SM > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From mechvel at scico.botik.ru Mon Oct 5 00:43:09 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 05 Oct 2020 01:43:09 +0300 Subject: [Agda] a strange "unsolved" report In-Reply-To: <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> References: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> Message-ID: <56d7e986a1222e2fb618b4823fb0534d@scico.botik.ru> On 2020-10-04 23:30, James Wood wrote: > Hi Sergei, > > Quick questions first: is `_?_` overloaded at all in this context? > That'd be my guess for why Agda has no clue what the type is supposed > to be. > It is overloaded. But there are other similar assignments before and around (like the one marked with *), and Agda does resolve them without providing a signature. -- SM > On 04/10/2020 18:19, mechvel at scico.botik.ru wrote: >> Dear Agda developers, >> >> There is a question about the following code fragment: >> >> ----------------------------------------------------- >> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >> mons''} ... = >> >> ??? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >> ??? where >> ??? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >> >> ??? mmons = m ? mons???????????????? -- * >> >> ??? -- m'mons' : List Mon??????????? -- (I-s) >> ??? m'mons' = m' ? mons'???????????? -- (I) >> >> ??? m''mons'' = m'' ? mons'' >> ??? ... >> ----------------------------------------------------- >> >> Agda 2.6.1 reports >> " >> Sort _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >> _1157 : _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >> _1159 : _1157? [ at ...Over-abelianGroup.agda:414,15-25 ] >> " >> >> I guess this is the kind of "unsolved metas". >> And the first "unsolved" is about the line marked (I). >> >> The previous line (marked *) is solved - while it is not any more >> clear >> than (I). >> >> Then, after adding the signature (I-s), everything is type-checked. >> 1) This necessity to add signature in the middle of an array of short >> assignments of the same >> ?? type looks strange. >> 2) There are many similar fragments in the program, and I never >> observed >> such an effect. >> >> What might this mean? >> >> -- >> SM >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From james.wood.100 at strath.ac.uk Mon Oct 5 00:47:11 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sun, 4 Oct 2020 23:47:11 +0100 Subject: [Agda] a strange "unsolved" report In-Reply-To: <56d7e986a1222e2fb618b4823fb0534d@scico.botik.ru> References: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> <56d7e986a1222e2fb618b4823fb0534d@scico.botik.ru> Message-ID: <4e6b667f-a64d-e4b0-17f0-94c5f3057e6b@strath.ac.uk> Is `mmons` used somewhere, maybe giving a hint as to what type to check it at? James On 04/10/2020 23:43, mechvel at scico.botik.ru wrote: > On 2020-10-04 23:30, James Wood wrote: >> Hi Sergei, >> >> Quick questions first: is `_?_` overloaded at all in this context? >> That'd be my guess for why Agda has no clue what the type is supposed >> to be. >> > > It is overloaded. > But there are other similar assignments before and around (like the one > marked with *), > and Agda does resolve them without providing a signature. > > -- > SM > > > >> On 04/10/2020 18:19, mechvel at scico.botik.ru wrote: >>> Dear Agda developers, >>> >>> There is a question about the following code fragment: >>> >>> ----------------------------------------------------- >>> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >>> mons''} ... = >>> >>> ??? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >>> ??? where >>> ??? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >>> >>> ??? mmons = m ? mons???????????????? -- * >>> >>> ??? -- m'mons' : List Mon??????????? -- (I-s) >>> ??? m'mons' = m' ? mons'???????????? -- (I) >>> >>> ??? m''mons'' = m'' ? mons'' >>> ??? ... >>> ----------------------------------------------------- >>> >>> Agda 2.6.1 reports >>> " >>> Sort _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>> _1157 : _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>> _1159 : _1157? [ at ...Over-abelianGroup.agda:414,15-25 ] >>> " >>> >>> I guess this is the kind of "unsolved metas". >>> And the first "unsolved" is about the line marked (I). >>> >>> The previous line (marked *) is solved - while it is not any more clear >>> than (I). >>> >>> Then, after adding the signature (I-s), everything is type-checked. >>> 1) This necessity to add signature in the middle of an array of short >>> assignments of the same >>> ?? type looks strange. >>> 2) There are many similar fragments in the program, and I never observed >>> such an effect. >>> >>> What might this mean? >>> >>> -- >>> SM >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> From nad at cse.gu.se Mon Oct 5 09:14:09 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 5 Oct 2020 09:14:09 +0200 Subject: [Agda] nontermination and Sized types In-Reply-To: References: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> Message-ID: On 2020-10-03 09:33, vlad wrote: > IMO this bug and others (incompatibility of sized types with equality, > ...) should be better documented. It might be possible to fix the problems with sized types (see https://github.com/agda/agda/issues/2820), but I'm not aware of anyone that is working on that at the moment. I think we'll make --sized-types incompatible with --safe: Add --safe-except-for-sized-types? https://github.com/agda/agda/issues/4908 -- /NAD From manuel at enigmage.de Mon Oct 5 09:38:02 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Mon, 5 Oct 2020 09:38:02 +0200 Subject: [Agda] nontermination and Sized types In-Reply-To: References: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> Message-ID: <52f961bf-af26-fc71-2e7b-de71ff6217d7@enigmage.de> On 05.10.20 09:14, Nils Anders Danielsson wrote: > On 2020-10-03 09:33, vlad wrote: >> IMO this bug and others (incompatibility of sized types with equality, >> ...) should be better documented. > > It might be possible to fix the problems with sized types (see > https://github.com/agda/agda/issues/2820), but I'm not aware of anyone > that is working on that at the moment. It would be great if someone could lead the development to fix these issues at the upcoming Agda Implementors Meeting. I'd be interested to participate but don't know where to begin. From Jesper at sikanda.be Mon Oct 5 11:03:07 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Mon, 5 Oct 2020 11:03:07 +0200 Subject: [Agda] Help with understanding REWRITE In-Reply-To: <5EF91F92-1CED-4B21-B66E-5DF7C4454663@cl.cam.ac.uk> References: <5EF91F92-1CED-4B21-B66E-5DF7C4454663@cl.cam.ac.uk> Message-ID: Hi Andrew, This seems to be an unfortunate interaction between --rewriting and an optimization performed by Agda, the detection of "projection-like" functions. Agda detects that the function `Cset` is projection-like, which allows it to erase the first argument. Unfortunately this means the argument is no longer available for the rewrite rule either. If you want, you can turn off the optimization using the `--no-projection-like` flag. I'm not sure if there's currently an option to turn it off on a case-by-case basis. -- Jesper On Sun, Oct 4, 2020 at 3:07 PM Andrew M. Pitts wrote: > I?m struggling to understand an aspect of --rewriting in Agda (2.6.1) and > wonder if someone can help? > > The following artificial example illustrates my problem (which is more > complicated and less artificial). > > --- > {-# OPTIONS --rewriting #-} > > open import Agda.Builtin.Equality > open import Agda.Builtin.Equality.Rewrite > > data C (S : Set) : Set? where > mkC : > (A : Set) > (e : A ? S) > ? --------- > C S > > Cset : (S : Set) ? C S ? Set > Cset S (mkC A e) = A > > Cequ : (S : Set)(c : C S) ? Cset S c ? S > Cequ S (mkC A e) = e > > {-# REWRITE Cequ #-} ? this is not accepted! > > ?? > > Given S : Set, the datatype C S contains values given by a set A and a > proof that A equals S. Can we make that proof definitional rather than > propositional, using a REWRITE? Apparently not ? if you check the above > Agda code, Agda 2.6.1 complains > > -- Cequ is not a legal rewrite rule, since the following variables are > -- not bound by the left hand side: S > -- when checking the pragma REWRITE Cequ > > The ?left-hand side? it refers to is Cset S c, which certainly contains an > occurrence of S. Why is S not ?bound by? this left-hand side? I declared > the type of Cequ to be > > (S : Set)(c : C S) ? Cset S c ? S > > bu Agda 2.6.1 reports it to be > > (S : Set) (c : C S) ? Cset _ c ? S > > Note the underscore. Presumably this is why REWRITE Cequ is not accepted. > > Where did that underscore come from? And is there some way to avoid it and > have the REWRITE accepted? > > Andy > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amp12 at cam.ac.uk Mon Oct 5 12:44:02 2020 From: amp12 at cam.ac.uk (Andrew M. Pitts) Date: Mon, 5 Oct 2020 10:44:02 +0000 Subject: [Agda] Help with understanding REWRITE In-Reply-To: References: <5EF91F92-1CED-4B21-B66E-5DF7C4454663@cl.cam.ac.uk> Message-ID: <907D925A-9F79-434F-BF0D-86CB53AE667D@cl.cam.ac.uk> Dear Jesper, Aha, so that?s where the underscore comes from! Projection-like analysis was something of which I was unaware until you mentioned it. Selectively turning it off would be nice, but for now I can get by with the global --no-projection-like Very many thanks, Andy > On 5 Oct 2020, at 10:03, Jesper Cockx wrote: > > Hi Andrew, > > This seems to be an unfortunate interaction between --rewriting and an optimization performed by Agda, the detection of "projection-like" functions. Agda detects that the function `Cset` is projection-like, which allows it to erase the first argument. Unfortunately this means the argument is no longer available for the rewrite rule either. > > If you want, you can turn off the optimization using the `--no-projection-like` flag. I'm not sure if there's currently an option to turn it off on a case-by-case basis. > > -- Jesper > > On Sun, Oct 4, 2020 at 3:07 PM Andrew M. Pitts wrote: > I?m struggling to understand an aspect of --rewriting in Agda (2.6.1) and wonder if someone can help? > > The following artificial example illustrates my problem (which is more complicated and less artificial). > > --- > {-# OPTIONS --rewriting #-} > > open import Agda.Builtin.Equality > open import Agda.Builtin.Equality.Rewrite > > data C (S : Set) : Set? where > mkC : > (A : Set) > (e : A ? S) > ? --------- > C S > > Cset : (S : Set) ? C S ? Set > Cset S (mkC A e) = A > > Cequ : (S : Set)(c : C S) ? Cset S c ? S > Cequ S (mkC A e) = e > > {-# REWRITE Cequ #-} ? this is not accepted! > > ?? > > Given S : Set, the datatype C S contains values given by a set A and a proof that A equals S. Can we make that proof definitional rather than propositional, using a REWRITE? Apparently not ? if you check the above Agda code, Agda 2.6.1 complains > > -- Cequ is not a legal rewrite rule, since the following variables are > -- not bound by the left hand side: S > -- when checking the pragma REWRITE Cequ > > The ?left-hand side? it refers to is Cset S c, which certainly contains an occurrence of S. Why is S not ?bound by? this left-hand side? I declared the type of Cequ to be > > (S : Set)(c : C S) ? Cset S c ? S > > bu Agda 2.6.1 reports it to be > > (S : Set) (c : C S) ? Cset _ c ? S > > Note the underscore. Presumably this is why REWRITE Cequ is not accepted. > > Where did that underscore come from? And is there some way to avoid it and have the REWRITE accepted? > > Andy > > > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Vlad.Rusu at inria.fr Mon Oct 5 16:18:37 2020 From: Vlad.Rusu at inria.fr (vlad) Date: Mon, 5 Oct 2020 16:18:37 +0200 Subject: [Agda] nontermination and Sized types Message-ID: <7b548e09-f642-1810-f2d4-e550b0899bea@inria.fr> > My experience, as an occasional user of this stuff, is that `Size<` is > broken, and you have to make do with `?`, `_?_`, &c. This makes it a > really bad thing that the example in the documentation uses `Size<` (if > my impressions are correct). > > James > The Codata implementations in the standard library also use Size< quite extensively: they use Thunks, which use Size<. I don't see any way of dealing with coinductive (record) definitions without Size<.? ? works for inductive definitions, because, e.g.,? one can write ??? data list {A : Set}: { k : Size} ?? Set where ??? ??? ? cons : ? {k} ?? A ? list{A} {k} ? list{A} {? k} However, for coinductive records, I don't see how to replace the Size< in the standard definition (below) by anything else: ??? record stream{A : Set} {k : Size} : Set where ? ??? ?? coinductive ? ??? ?? field ?? ?? ??? ? head : A ?? ?? ??? ? tail :? {j : Size< k} ? stream{A} {j} I've tried a couple of things but got parsing or typechecking errors.? Does anybody know a way to define the above without Size< ? Best regards - Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at abn.sh Mon Oct 5 17:01:29 2020 From: me at abn.sh (Alexander Ben Nasrallah) Date: Mon, 5 Oct 2020 17:01:29 +0200 Subject: [Agda] Using Haskell type class constraints with Agda types Message-ID: <20201005150129.GA18947@schiggy.abn.local> Hi there, I'm currently playing around with Agdas FFI. I know that "There is (currently) no way to map a Haskell type with type class constraints to an Agda type." The manual describes a workaround for how to pass postulated Haskell types to postulated functions with type class contraints in Agda. https://agda.readthedocs.io/en/v2.6.1.1/language/foreign-function-interface.html#handling-typeclass-constraints I was wondering if it is possible to modify the workaround, so I can pass a non-postulated Agda type to postulated functions with constraints. Concrete I would like to (de)serialize JSON using Aeson. Therefore I defined a record `ToJSON` which shall resemble the `ToJSON` type class. Now I would like to pass `ToJSON` instance arguments to postulated functions with `ToJSON` type class contraints. I unsuccessfully tried a few approaches. Here is my current work in progress: https://gitlab.com/neosimsim/verified-parsing/-/blob/aeson/src/Foreign/Haskell/Data/Aeson.agda#L34 Does anyone have any ideas, how to make this work or is it just not possible (yet)? Kind regards Alex From mechvel at scico.botik.ru Mon Oct 5 18:37:08 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 05 Oct 2020 19:37:08 +0300 Subject: [Agda] a strange "unsolved" report In-Reply-To: <4e6b667f-a64d-e4b0-17f0-94c5f3057e6b@strath.ac.uk> References: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> <56d7e986a1222e2fb618b4823fb0534d@scico.botik.ru> <4e6b667f-a64d-e4b0-17f0-94c5f3057e6b@strath.ac.uk> Message-ID: <209c19f39cb4837476243a0275c2313d@scico.botik.ru> On 2020-10-05 01:47, James Wood wrote: > Is `mmons` used somewhere, maybe giving a hint as to what type to check > it at? > It has m = mon? a e; m' = mon? b e' m'' = mon? c e''; mmons = m ? mons m'mons' : List Mon -- Agda forces me to set this signature m'mons' = m' ? mons' m m' m'' : Mon, mon? a constructor for the record Mon. and mons mons' mons'' : List Mon are derived from the head function pattern: m = mon? a e; m' = mon? b e'; m'' = mon? c e'' mmons m'mons m''mons : List Mon are computed by the assignments mmons = m ? mons -- * m'mons' : List Mon m'mons' = m' ? mons' m''mons'' = m'' ? mons'' _?_ is overloaded by open import Data.List using (List; []; _?_ ...), open import Data.List.Relation.Unary.All as AllM using (All; []; _?_) It does work. But it looks new and a bit strange that it chooses one assignment in the middle of an array of similar assignments, and requires a signature for it: ----------------------------------------------------------------------------- +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? mons''} ord-ees ord-e'es' ord-e''es'' (suc l) l?'+[l?'+l?']?l' = aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') where a+b = a + b; b+c = b + c m = mon? a e; m' = mon? b e' m'' = mon? c e'' mmons = m ? mons m'mons' : List Mon -- (I) forced m'mons' = m' ? mons' m''mons'' = m'' ? mons'' es = map Mon.exp mons; es' = map Mon.exp mons'; es'' = map Mon.exp mons'' mons'+mons'' = mons' +ms mons'' ... aux : Tri (e < e') (e ? e') (e > e') ? Tri (e' < e'') (e' ? e'') (e' > e'') ? Tri (e < e'') (e ? e'') (e > e'') ? ((m ? mons) +ms (m' ? mons')) +ms (m'' ? mons'') =ms (m ? mons) +ms ((m' ? mons') +ms (m'' ? mons'')) -- many patterns for aux : aux (tri> _ _ e>e') (tri< e' _ _ e>e'') = ... ... ------------------------------------------------------------------------------ The effect is only in the assigments before `aux'. -- SM > On 04/10/2020 23:43, mechvel at scico.botik.ru wrote: >> On 2020-10-04 23:30, James Wood wrote: >>> Hi Sergei, >>> >>> Quick questions first: is `_?_` overloaded at all in this context? >>> That'd be my guess for why Agda has no clue what the type is supposed >>> to be. >>> >> >> It is overloaded. >> But there are other similar assignments before and around (like the >> one >> marked with *), >> and Agda does resolve them without providing a signature. >> >> -- >> SM >> >> >> >>> On 04/10/2020 18:19, mechvel at scico.botik.ru wrote: >>>> Dear Agda developers, >>>> >>>> There is a question about the following code fragment: >>>> >>>> ----------------------------------------------------- >>>> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >>>> mons''} ... = >>>> >>>> ??? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >>>> ??? where >>>> ??? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >>>> >>>> ??? mmons = m ? mons???????????????? -- * >>>> >>>> ??? -- m'mons' : List Mon??????????? -- (I-s) >>>> ??? m'mons' = m' ? mons'???????????? -- (I) >>>> >>>> ??? m''mons'' = m'' ? mons'' >>>> ??? ... >>>> ----------------------------------------------------- >>>> >>>> Agda 2.6.1 reports >>>> " >>>> Sort _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>> _1157 : _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>> _1159 : _1157? [ at ...Over-abelianGroup.agda:414,15-25 ] >>>> " >>>> >>>> I guess this is the kind of "unsolved metas". >>>> And the first "unsolved" is about the line marked (I). >>>> >>>> The previous line (marked *) is solved - while it is not any more >>>> clear >>>> than (I). >>>> >>>> Then, after adding the signature (I-s), everything is type-checked. >>>> 1) This necessity to add signature in the middle of an array of >>>> short >>>> assignments of the same >>>> ?? type looks strange. >>>> 2) There are many similar fragments in the program, and I never >>>> observed >>>> such an effect. >>>> >>>> What might this mean? >>>> >>>> -- >>>> SM >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From james.wood.100 at strath.ac.uk Mon Oct 5 21:13:04 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Mon, 5 Oct 2020 20:13:04 +0100 Subject: [Agda] a strange "unsolved" report In-Reply-To: <209c19f39cb4837476243a0275c2313d@scico.botik.ru> References: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> <56d7e986a1222e2fb618b4823fb0534d@scico.botik.ru> <4e6b667f-a64d-e4b0-17f0-94c5f3057e6b@strath.ac.uk> <209c19f39cb4837476243a0275c2313d@scico.botik.ru> Message-ID: I don't see any uses of `mmons` in the code you've posted so far. I'm more surprised that that definition checks than that the others don't. Notice that, for example, the following definition does not check. open import Data.List open import Data.List.Relation.Unary.All test : (A : Set) (x : A) (xs : List A) ? _ test A x xs = x ? xs Sort _3 [ at /sharedhome/home/james/Documents/agda/Scratch.agda:6,42-43 ] _4 : _3 [ at /sharedhome/home/james/Documents/agda/Scratch.agda:6,42-43 ] _6 : _4 (A = A) (x = x) (xs = xs) [ at /sharedhome/home/james/Documents/agda/Scratch.agda:7,15-21 ] ???? Errors ???????????????????????????????????????????????? Unsolved constraints Meanwhile, the following checks because `foo` is used somewhere which makes its type obvious. open import Data.List open import Data.List.Relation.Unary.All test : (A : Set) (x : A) (xs : List A) ? List A test A x xs = foo where foo = x ? xs So I think `mmons` must be being used, and the others not (or not in a context which gives enough of a hint as to their types). Regards, James On 05/10/2020 17:37, mechvel at scico.botik.ru wrote: > On 2020-10-05 01:47, James Wood wrote: >> Is `mmons` used somewhere, maybe giving a hint as to what type to check >> it at? >> > > It has > ?? m?? = mon? a e;???? m'??? = mon? b e' > ?? m'' = mon? c e'';?? mmons = m ? mons > > ?? m'mons' : List Mon???? -- Agda forces me to set this signature > ?? m'mons' = m' ? mons' > > m m' m'' : Mon,???? mon? a constructor for the record Mon. > and > mons mons' mons'' : List Mon?? are derived from the head function pattern: > > ? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' > > mmons m'mons m''mons :? List Mon?? are computed by the assignments > > ? mmons = m ? mons???????????????? -- * > > ? m'mons' : List Mon > ? m'mons' = m' ? mons' > > ? m''mons'' = m'' ? mons'' > > _?_? is overloaded by > > ? open import Data.List using (List; []; _?_ ...), > ? open import Data.List.Relation.Unary.All as AllM using (All; []; _?_) > > > It does work. But it looks new and a bit strange that it chooses one > assignment in the middle > of an array of similar assignments, and requires a signature for it: > > ----------------------------------------------------------------------------- > > +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? mons''} > ????????????? ord-ees ord-e'es' ord-e''es'' (suc l) l?'+[l?'+l?']?l' = > > ????????????? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') > ??? where > ??? a+b = a + b;?????? b+c = b + c > ??? m?? = mon? a e;??? m'? = mon? b e' > ??? m'' = mon? c e'' > > ??? mmons = m ? mons > > ??? m'mons' : List Mon????? -- (I)? forced > ??? m'mons' = m' ? mons' > > ??? m''mons'' = m'' ? mons'' > ??? es = map Mon.exp mons;? es' = map Mon.exp mons';? es'' = map Mon.exp > mons'' > > ??? mons'+mons'' = mons' +ms mons'' > ??? ... > > ??? aux : Tri (e < e')?? (e ? e')?? (e > e')?? ? > ????????? Tri (e' < e'') (e' ? e'') (e' > e'') ? > ????????? Tri (e < e'')? (e ? e'')? (e > e'')? ? > > ????????? ((m ? mons) +ms (m' ? mons')) +ms (m'' ? mons'')? =ms > ????????? (m ? mons) +ms ((m' ? mons') +ms (m'' ? mons'')) > > ??? -- many patterns for? aux : > > ??? aux (tri> _ _ e>e') (tri< e' _ _ e>e'') =? ... > > ??? ... > ------------------------------------------------------------------------------ > > > The effect is only in the assigments before `aux'. > > -- > SM > > > > >> On 04/10/2020 23:43, mechvel at scico.botik.ru wrote: >>> On 2020-10-04 23:30, James Wood wrote: >>>> Hi Sergei, >>>> >>>> Quick questions first: is `_?_` overloaded at all in this context? >>>> That'd be my guess for why Agda has no clue what the type is supposed >>>> to be. >>>> >>> >>> It is overloaded. >>> But there are other similar assignments before and around (like the one >>> marked with *), >>> and Agda does resolve them without providing a signature. >>> >>> -- >>> SM >>> >>> >>> >>>> On 04/10/2020 18:19, mechvel at scico.botik.ru wrote: >>>>> Dear Agda developers, >>>>> >>>>> There is a question about the following code fragment: >>>>> >>>>> ----------------------------------------------------- >>>>> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >>>>> mons''} ... = >>>>> >>>>> ??? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >>>>> ??? where >>>>> ??? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >>>>> >>>>> ??? mmons = m ? mons???????????????? -- * >>>>> >>>>> ??? -- m'mons' : List Mon??????????? -- (I-s) >>>>> ??? m'mons' = m' ? mons'???????????? -- (I) >>>>> >>>>> ??? m''mons'' = m'' ? mons'' >>>>> ??? ... >>>>> ----------------------------------------------------- >>>>> >>>>> Agda 2.6.1 reports >>>>> " >>>>> Sort _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>>> _1157 : _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>>> _1159 : _1157? [ at ...Over-abelianGroup.agda:414,15-25 ] >>>>> " >>>>> >>>>> I guess this is the kind of "unsolved metas". >>>>> And the first "unsolved" is about the line marked (I). >>>>> >>>>> The previous line (marked *) is solved - while it is not any more >>>>> clear >>>>> than (I). >>>>> >>>>> Then, after adding the signature (I-s), everything is type-checked. >>>>> 1) This necessity to add signature in the middle of an array of short >>>>> assignments of the same >>>>> ?? type looks strange. >>>>> 2) There are many similar fragments in the program, and I never >>>>> observed >>>>> such an effect. >>>>> >>>>> What might this mean? >>>>> >>>>> -- >>>>> SM >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> From ulf.norell at gmail.com Tue Oct 6 11:16:04 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 6 Oct 2020 11:16:04 +0200 Subject: [Agda] Using Haskell type class constraints with Agda types In-Reply-To: <20201005150129.GA18947@schiggy.abn.local> References: <20201005150129.GA18947@schiggy.abn.local> Message-ID: Hi Alexander, In this particular case, the easiest solution is to bind to encode for the Value type and apply toJSON on the Agda side: postulate encodeValue : Value ? ByteString {-# COMPILE GHC encodeValue = encode #-} encode : ? ToJSON A ? ? A ? ByteString encode x = encodeValue (toJSON x) A slightly more general approach is to define a type that packs up an element with its toJSON function, define the ToJSON instance for that in Haskell, and specialize encode to that type: data WithToJSON (A : Set) : Set where mkWithToJSON : (A ? Value) ? A ? WithToJSON A {-# FOREIGN GHC data WithToJSON a = WithToJSON (a -> Value) a instance ToJSON (WithToJSON a) where toJSON (WithToJSON f x) = f x #-} {-# COMPILE GHC WithToJSON = data WithToJSON (WithToJSON) #-} withToJSON : ? ToJSON A ? ? A ? WithToJSON A withToJSON x = mkWithToJSON toJSON x postulate encodeDyn : WithToJSON A ? ByteString {-# COMPILE GHC encodeDyn = \ _ -> encode #-} encode : ? ToJSON A ? ? A ? ByteString encode x = encodeDyn (withToJSON x) Complete example: https://gist.github.com/UlfNorell/bb7b807e7de013a7daca310da123c834 / Ulf On Mon, Oct 5, 2020 at 5:02 PM Alexander Ben Nasrallah wrote: > Hi there, > > I'm currently playing around with Agdas FFI. I know that "There is > (currently) no way to map a Haskell type with type class constraints to > an Agda type." The manual describes a workaround for how to pass > postulated Haskell types to postulated functions with type class > contraints in Agda. > > > https://agda.readthedocs.io/en/v2.6.1.1/language/foreign-function-interface.html#handling-typeclass-constraints > > I was wondering if it is possible to modify the > workaround, so I can pass a non-postulated Agda type to postulated > functions with constraints. > > Concrete I would like to (de)serialize JSON using Aeson. Therefore I > defined a record `ToJSON` which shall resemble the `ToJSON` type class. > Now I would like to pass `ToJSON` instance arguments to postulated > functions with `ToJSON` type class contraints. > > I unsuccessfully tried a few approaches. Here is my current work in > progress: > > > https://gitlab.com/neosimsim/verified-parsing/-/blob/aeson/src/Foreign/Haskell/Data/Aeson.agda#L34 > > Does anyone have any ideas, how to make this work or is it just not > possible (yet)? > > Kind regards > Alex > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Tue Oct 6 12:16:57 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Tue, 6 Oct 2020 12:16:57 +0200 Subject: [Agda] nontermination and Sized types In-Reply-To: References: <3c463a2e-9c62-82b9-c8be-5d3698aba055@inria.fr> Message-ID: <8d514223-a5b2-7192-8a42-26a41505d43c@cse.gu.se> On 2020-10-03 15:24, James Wood wrote: > My experience, as an occasional user of this stuff, is that `Size<` is > broken, and you have to make do with `?`, `_?_`, &c. The problems are not restricted to Size<_: https://github.com/agda/agda/issues/2820#issuecomment-704172549 -- /NAD From me at abn.sh Tue Oct 6 16:52:41 2020 From: me at abn.sh (Alexander Ben Nasrallah) Date: Tue, 6 Oct 2020 16:52:41 +0200 Subject: [Agda] Using Haskell type class constraints with Agda types In-Reply-To: References: <20201005150129.GA18947@schiggy.abn.local> Message-ID: <20201006145241.GA23176@schiggy.abn.local> Hi Ulf, Thanks a lot. Looks like the first web server written in Agda is only a matter of time then ^^ Alex From mechvel at scico.botik.ru Tue Oct 6 20:25:57 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 06 Oct 2020 21:25:57 +0300 Subject: [Agda] a strange "unsolved" report In-Reply-To: References: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> <56d7e986a1222e2fb618b4823fb0534d@scico.botik.ru> <4e6b667f-a64d-e4b0-17f0-94c5f3057e6b@strath.ac.uk> <209c19f39cb4837476243a0275c2313d@scico.botik.ru> Message-ID: <2fdd95abf6ceaf52dbcf19b0550605f5@scico.botik.ru> On 2020-10-05 22:13, James Wood wrote: > I don't see any uses of `mmons` in the code you've posted so far. I'm > more surprised that that definition checks than that the others don't. Each of mmons, m'mons', m''mons'' is used below in the function aux, like this: begin? monsSetoid ? ... (m ? mons) +ms (m' ? (mons' +ms m''mons'')) ?? =ms-reflexive $ cong (mmons +ms_) $ sym $ ----- +ms-step> {b} {e'} {c} {e''} {mons'} {mons''} e'>e'' ? ... ? > Notice that, for example, the following definition does not check. > > open import Data.List > open import Data.List.Relation.Unary.All > > test : (A : Set) (x : A) (xs : List A) ? _ > test A x xs = x ? xs > > Sort _3 [ at > /sharedhome/home/james/Documents/agda/Scratch.agda:6,42-43 ] > _4 : _3 [ at > /sharedhome/home/james/Documents/agda/Scratch.agda:6,42-43 ] > _6 : _4 (A = A) (x = x) (xs = xs) [ at > /sharedhome/home/james/Documents/agda/Scratch.agda:7,15-21 ] > > ???? Errors ???????????????????????????????????????????????? > Unsolved constraints > > Meanwhile, the following checks because `foo` is used somewhere which > makes its type obvious. > > open import Data.List > open import Data.List.Relation.Unary.All > > test : (A : Set) (x : A) (xs : List A) ? List A > test A x xs = foo > where > foo = x ? xs It is checked not because foo is used below, but because the result type is set List A, while in the first your example it is "_". I discover this by setting "... ? _" to your second example. - ? I am sorry, my main example is not reduced, this "aux" is the most lengthy proofs in the project. Anyway it is checked when the signature for m'mons' is provided. > So I think `mmons` must be being used, and the others not (or not in a > context which gives enough of a hint as to their types). All the three are used in aux in similar way, but may be m'mons' is used in a slightly different way. So that you guess may occur true. Thank you. -- SM > On 05/10/2020 17:37, mechvel at scico.botik.ru wrote: >> On 2020-10-05 01:47, James Wood wrote: >>> Is `mmons` used somewhere, maybe giving a hint as to what type to >>> check >>> it at? >>> >> >> It has >> ?? m?? = mon? a e;???? m'??? = mon? b e' >> ?? m'' = mon? c e'';?? mmons = m ? mons >> >> ?? m'mons' : List Mon???? -- Agda forces me to set this signature >> ?? m'mons' = m' ? mons' >> >> m m' m'' : Mon,???? mon? a constructor for the record Mon. >> and >> mons mons' mons'' : List Mon?? are derived from the head function >> pattern: >> >> ? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >> >> mmons m'mons m''mons :? List Mon?? are computed by the assignments >> >> ? mmons = m ? mons???????????????? -- * >> >> ? m'mons' : List Mon >> ? m'mons' = m' ? mons' >> >> ? m''mons'' = m'' ? mons'' >> >> _?_? is overloaded by >> >> ? open import Data.List using (List; []; _?_ ...), >> ? open import Data.List.Relation.Unary.All as AllM using (All; []; >> _?_) >> >> >> It does work. But it looks new and a bit strange that it chooses one >> assignment in the middle >> of an array of similar assignments, and requires a signature for it: >> >> ----------------------------------------------------------------------------- >> >> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >> mons''} >> ????????????? ord-ees ord-e'es' ord-e''es'' (suc l) l?'+[l?'+l?']?l' = >> >> ????????????? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >> ??? where >> ??? a+b = a + b;?????? b+c = b + c >> ??? m?? = mon? a e;??? m'? = mon? b e' >> ??? m'' = mon? c e'' >> >> ??? mmons = m ? mons >> >> ??? m'mons' : List Mon????? -- (I)? forced >> ??? m'mons' = m' ? mons' >> >> ??? m''mons'' = m'' ? mons'' >> ??? es = map Mon.exp mons;? es' = map Mon.exp mons';? es'' = map >> Mon.exp >> mons'' >> >> ??? mons'+mons'' = mons' +ms mons'' >> ??? ... >> >> ??? aux : Tri (e < e')?? (e ? e')?? (e > e')?? ? >> ????????? Tri (e' < e'') (e' ? e'') (e' > e'') ? >> ????????? Tri (e < e'')? (e ? e'')? (e > e'')? ? >> >> ????????? ((m ? mons) +ms (m' ? mons')) +ms (m'' ? mons'')? =ms >> ????????? (m ? mons) +ms ((m' ? mons') +ms (m'' ? mons'')) >> >> ??? -- many patterns for? aux : >> >> ??? aux (tri> _ _ e>e') (tri< e' _ _ e>e'') =? ... >> >> ??? ... >> ------------------------------------------------------------------------------ >> >> >> The effect is only in the assigments before `aux'. >> >> -- >> SM >> >> >> >> >>> On 04/10/2020 23:43, mechvel at scico.botik.ru wrote: >>>> On 2020-10-04 23:30, James Wood wrote: >>>>> Hi Sergei, >>>>> >>>>> Quick questions first: is `_?_` overloaded at all in this context? >>>>> That'd be my guess for why Agda has no clue what the type is >>>>> supposed >>>>> to be. >>>>> >>>> >>>> It is overloaded. >>>> But there are other similar assignments before and around (like the >>>> one >>>> marked with *), >>>> and Agda does resolve them without providing a signature. >>>> >>>> -- >>>> SM >>>> >>>> >>>> >>>>> On 04/10/2020 18:19, mechvel at scico.botik.ru wrote: >>>>>> Dear Agda developers, >>>>>> >>>>>> There is a question about the following code fragment: >>>>>> >>>>>> ----------------------------------------------------- >>>>>> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >>>>>> mons''} ... = >>>>>> >>>>>> ??? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >>>>>> ??? where >>>>>> ??? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >>>>>> >>>>>> ??? mmons = m ? mons???????????????? -- * >>>>>> >>>>>> ??? -- m'mons' : List Mon??????????? -- (I-s) >>>>>> ??? m'mons' = m' ? mons'???????????? -- (I) >>>>>> >>>>>> ??? m''mons'' = m'' ? mons'' >>>>>> ??? ... >>>>>> ----------------------------------------------------- >>>>>> >>>>>> Agda 2.6.1 reports >>>>>> " >>>>>> Sort _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>>>> _1157 : _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>>>> _1159 : _1157? [ at ...Over-abelianGroup.agda:414,15-25 ] >>>>>> " >>>>>> >>>>>> I guess this is the kind of "unsolved metas". >>>>>> And the first "unsolved" is about the line marked (I). >>>>>> >>>>>> The previous line (marked *) is solved - while it is not any more >>>>>> clear >>>>>> than (I). >>>>>> >>>>>> Then, after adding the signature (I-s), everything is >>>>>> type-checked. >>>>>> 1) This necessity to add signature in the middle of an array of >>>>>> short >>>>>> assignments of the same >>>>>> ?? type looks strange. >>>>>> 2) There are many similar fragments in the program, and I never >>>>>> observed >>>>>> such an effect. >>>>>> >>>>>> What might this mean? >>>>>> >>>>>> -- >>>>>> SM >>>>>> _______________________________________________ >>>>>> Agda mailing list >>>>>> Agda at lists.chalmers.se >>>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>> >>>>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From james.wood.100 at strath.ac.uk Tue Oct 6 22:44:37 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Tue, 6 Oct 2020 21:44:37 +0100 Subject: [Agda] a strange "unsolved" report In-Reply-To: <2fdd95abf6ceaf52dbcf19b0550605f5@scico.botik.ru> References: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> <56d7e986a1222e2fb618b4823fb0534d@scico.botik.ru> <4e6b667f-a64d-e4b0-17f0-94c5f3057e6b@strath.ac.uk> <209c19f39cb4837476243a0275c2313d@scico.botik.ru> <2fdd95abf6ceaf52dbcf19b0550605f5@scico.botik.ru> Message-ID: What happens if you replace uses of `m'mons'` by its definition? Or is there a way you could `let` bind it? (More reply below) On 06/10/2020 19:25, mechvel at scico.botik.ru wrote: > On 2020-10-05 22:13, James Wood wrote: >> I don't see any uses of `mmons` in the code you've posted so far. I'm >> more surprised that that definition checks than that the others don't. > > Each of mmons, m'mons', m''mons'' is used below in the function aux, > like this: > > ?begin? monsSetoid ? > ?? ... > ?? (m ? mons) +ms (m' ? (mons' +ms m''mons'')) > ??????????????????????? ?? =ms-reflexive $ cong (mmons +ms_) $ sym $ > ???????????????????????????????????????????????? ----- > ?????????????????????????? +ms-step> {b} {e'} {c} {e''} {mons'} {mons''} > e'>e'' > ???????????????????????? ? > ?? ... > ?? > > > >> Notice that, for example, the following definition does not check. >> >> ? open import Data.List >> ? open import Data.List.Relation.Unary.All >> >> ? test : (A : Set) (x : A) (xs : List A) ? _ >> ? test A x xs = x ? xs >> >> Sort _3? [ at >> /sharedhome/home/james/Documents/agda/Scratch.agda:6,42-43 ] >> _4 : _3? [ at >> /sharedhome/home/james/Documents/agda/Scratch.agda:6,42-43 ] >> _6 : _4 (A = A) (x = x) (xs = xs)? [ at >> /sharedhome/home/james/Documents/agda/Scratch.agda:7,15-21 ] >> >> ???? Errors ???????????????????????????????????????????????? >> Unsolved constraints >> >> Meanwhile, the following checks because `foo` is used somewhere which >> makes its type obvious. >> >> ? open import Data.List >> ? open import Data.List.Relation.Unary.All >> >> ? test : (A : Set) (x : A) (xs : List A) ? List A >> ? test A x xs = foo >> ??? where >> ??? foo = x ? xs > > It is checked not because foo is used below, but because the result type > is set > List A,? while in the first your example it is "_". > I discover this by setting? "... ? _"? to your second example. > - ? The point of this example is that, as far as I'm aware, `where` declarations are not inlined for type checking, but nonetheless Agda has managed to check the definition of `foo` based on the context in which it is used. This behaviour is slightly different to that of top-level definitions, as the non-workingness of this example shows: module _ (A : Set) (x : A) (xs : List A) where foo = x ? xs test : List A test = foo > I am sorry, my main example is not reduced, this "aux" is the most > lengthy proofs in the project. > Anyway it is checked when the signature for m'mons' is provided. > > >> So I think `mmons` must be being used, and the others not (or not in a >> context which gives enough of a hint as to their types). > > All the three are used in aux in similar way, but may be? m'mons'? is > used in a slightly > different way. So that you guess may occur true. > > Thank you. > > -- > SM > > > >> On 05/10/2020 17:37, mechvel at scico.botik.ru wrote: >>> On 2020-10-05 01:47, James Wood wrote: >>>> Is `mmons` used somewhere, maybe giving a hint as to what type to check >>>> it at? >>>> >>> >>> It has >>> ?? m?? = mon? a e;???? m'??? = mon? b e' >>> ?? m'' = mon? c e'';?? mmons = m ? mons >>> >>> ?? m'mons' : List Mon???? -- Agda forces me to set this signature >>> ?? m'mons' = m' ? mons' >>> >>> m m' m'' : Mon,???? mon? a constructor for the record Mon. >>> and >>> mons mons' mons'' : List Mon?? are derived from the head function >>> pattern: >>> >>> ? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >>> >>> mmons m'mons m''mons :? List Mon?? are computed by the assignments >>> >>> ? mmons = m ? mons???????????????? -- * >>> >>> ? m'mons' : List Mon >>> ? m'mons' = m' ? mons' >>> >>> ? m''mons'' = m'' ? mons'' >>> >>> _?_? is overloaded by >>> >>> ? open import Data.List using (List; []; _?_ ...), >>> ? open import Data.List.Relation.Unary.All as AllM using (All; []; _?_) >>> >>> >>> It does work. But it looks new and a bit strange that it chooses one >>> assignment in the middle >>> of an array of similar assignments, and requires a signature for it: >>> >>> ----------------------------------------------------------------------------- >>> >>> >>> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >>> mons''} >>> ????????????? ord-ees ord-e'es' ord-e''es'' (suc l) l?'+[l?'+l?']?l' = >>> >>> ????????????? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >>> ??? where >>> ??? a+b = a + b;?????? b+c = b + c >>> ??? m?? = mon? a e;??? m'? = mon? b e' >>> ??? m'' = mon? c e'' >>> >>> ??? mmons = m ? mons >>> >>> ??? m'mons' : List Mon????? -- (I)? forced >>> ??? m'mons' = m' ? mons' >>> >>> ??? m''mons'' = m'' ? mons'' >>> ??? es = map Mon.exp mons;? es' = map Mon.exp mons';? es'' = map Mon.exp >>> mons'' >>> >>> ??? mons'+mons'' = mons' +ms mons'' >>> ??? ... >>> >>> ??? aux : Tri (e < e')?? (e ? e')?? (e > e')?? ? >>> ????????? Tri (e' < e'') (e' ? e'') (e' > e'') ? >>> ????????? Tri (e < e'')? (e ? e'')? (e > e'')? ? >>> >>> ????????? ((m ? mons) +ms (m' ? mons')) +ms (m'' ? mons'')? =ms >>> ????????? (m ? mons) +ms ((m' ? mons') +ms (m'' ? mons'')) >>> >>> ??? -- many patterns for? aux : >>> >>> ??? aux (tri> _ _ e>e') (tri< e' _ _ e>e'') =? ... >>> >>> ??? ... >>> ------------------------------------------------------------------------------ >>> >>> >>> >>> The effect is only in the assigments before `aux'. >>> >>> -- >>> SM >>> >>> >>> >>> >>>> On 04/10/2020 23:43, mechvel at scico.botik.ru wrote: >>>>> On 2020-10-04 23:30, James Wood wrote: >>>>>> Hi Sergei, >>>>>> >>>>>> Quick questions first: is `_?_` overloaded at all in this context? >>>>>> That'd be my guess for why Agda has no clue what the type is supposed >>>>>> to be. >>>>>> >>>>> >>>>> It is overloaded. >>>>> But there are other similar assignments before and around (like the >>>>> one >>>>> marked with *), >>>>> and Agda does resolve them without providing a signature. >>>>> >>>>> -- >>>>> SM >>>>> >>>>> >>>>> >>>>>> On 04/10/2020 18:19, mechvel at scico.botik.ru wrote: >>>>>>> Dear Agda developers, >>>>>>> >>>>>>> There is a question about the following code fragment: >>>>>>> >>>>>>> ----------------------------------------------------- >>>>>>> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >>>>>>> mons''} ... = >>>>>>> >>>>>>> ??? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >>>>>>> ??? where >>>>>>> ??? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >>>>>>> >>>>>>> ??? mmons = m ? mons???????????????? -- * >>>>>>> >>>>>>> ??? -- m'mons' : List Mon??????????? -- (I-s) >>>>>>> ??? m'mons' = m' ? mons'???????????? -- (I) >>>>>>> >>>>>>> ??? m''mons'' = m'' ? mons'' >>>>>>> ??? ... >>>>>>> ----------------------------------------------------- >>>>>>> >>>>>>> Agda 2.6.1 reports >>>>>>> " >>>>>>> Sort _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>>>>> _1157 : _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>>>>> _1159 : _1157? [ at ...Over-abelianGroup.agda:414,15-25 ] >>>>>>> " >>>>>>> >>>>>>> I guess this is the kind of "unsolved metas". >>>>>>> And the first "unsolved" is about the line marked (I). >>>>>>> >>>>>>> The previous line (marked *) is solved - while it is not any more >>>>>>> clear >>>>>>> than (I). >>>>>>> >>>>>>> Then, after adding the signature (I-s), everything is type-checked. >>>>>>> 1) This necessity to add signature in the middle of an array of >>>>>>> short >>>>>>> assignments of the same >>>>>>> ?? type looks strange. >>>>>>> 2) There are many similar fragments in the program, and I never >>>>>>> observed >>>>>>> such an effect. >>>>>>> >>>>>>> What might this mean? >>>>>>> >>>>>>> -- >>>>>>> SM >>>>>>> _______________________________________________ >>>>>>> Agda mailing list >>>>>>> Agda at lists.chalmers.se >>>>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> _______________________________________________ >>>>>> Agda mailing list >>>>>> Agda at lists.chalmers.se >>>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>>> >>>>>> >>>>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> From mechvel at scico.botik.ru Wed Oct 7 12:23:29 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Wed, 07 Oct 2020 13:23:29 +0300 Subject: [Agda] a strange "unsolved" report In-Reply-To: References: <267d4daad4ed43d11c92365ee4bfe1f4@scico.botik.ru> <9e844b06-02b9-adab-e62d-8adc23f1e8e4@strath.ac.uk> <56d7e986a1222e2fb618b4823fb0534d@scico.botik.ru> <4e6b667f-a64d-e4b0-17f0-94c5f3057e6b@strath.ac.uk> <209c19f39cb4837476243a0275c2313d@scico.botik.ru> <2fdd95abf6ceaf52dbcf19b0550605f5@scico.botik.ru> Message-ID: <7879a5e57ac6766b8eb1c9795c98941a@scico.botik.ru> On 2020-10-06 23:44, James Wood wrote: > What happens if you replace uses of `m'mons'` by its definition? Or is > there a way you could `let` bind it? > [..] If the lines m'mons' : List Mon m'mons' = m' ? mons' are removed, and m'mons' is replaced everywhere with its definition (m' ? mons'), then the module is checked. To try the `let' binding for it is difficult, too much of refactoring. -- ?? > On 06/10/2020 19:25, mechvel at scico.botik.ru wrote: >> On 2020-10-05 22:13, James Wood wrote: >>> I don't see any uses of `mmons` in the code you've posted so far. I'm >>> more surprised that that definition checks than that the others >>> don't. >> >> Each of mmons, m'mons', m''mons'' is used below in the function aux, >> like this: >> >> ?begin? monsSetoid ? >> ?? ... >> ?? (m ? mons) +ms (m' ? (mons' +ms m''mons'')) >> ??????????????????????? ?? =ms-reflexive $ cong (mmons +ms_) $ sym $ >> ???????????????????????????????????????????????? ----- >> ?????????????????????????? +ms-step> {b} {e'} {c} {e''} {mons'} >> {mons''} >> e'>e'' >> ???????????????????????? ? >> ?? ... >> ?? >> >> >> >>> Notice that, for example, the following definition does not check. >>> >>> ? open import Data.List >>> ? open import Data.List.Relation.Unary.All >>> >>> ? test : (A : Set) (x : A) (xs : List A) ? _ >>> ? test A x xs = x ? xs >>> >>> Sort _3? [ at >>> /sharedhome/home/james/Documents/agda/Scratch.agda:6,42-43 ] >>> _4 : _3? [ at >>> /sharedhome/home/james/Documents/agda/Scratch.agda:6,42-43 ] >>> _6 : _4 (A = A) (x = x) (xs = xs)? [ at >>> /sharedhome/home/james/Documents/agda/Scratch.agda:7,15-21 ] >>> >>> ???? Errors ???????????????????????????????????????????????? >>> Unsolved constraints >>> >>> Meanwhile, the following checks because `foo` is used somewhere which >>> makes its type obvious. >>> >>> ? open import Data.List >>> ? open import Data.List.Relation.Unary.All >>> >>> ? test : (A : Set) (x : A) (xs : List A) ? List A >>> ? test A x xs = foo >>> ??? where >>> ??? foo = x ? xs >> >> It is checked not because foo is used below, but because the result >> type >> is set >> List A,? while in the first your example it is "_". >> I discover this by setting? "... ? _"? to your second example. >> - ? > > The point of this example is that, as far as I'm aware, `where` > declarations are not inlined for type checking, but nonetheless Agda > has > managed to check the definition of `foo` based on the context in which > it is used. This behaviour is slightly different to that of top-level > definitions, as the non-workingness of this example shows: > > module _ (A : Set) (x : A) (xs : List A) where > > foo = x ? xs > > test : List A > test = foo > >> I am sorry, my main example is not reduced, this "aux" is the most >> lengthy proofs in the project. >> Anyway it is checked when the signature for m'mons' is provided. >> >> >>> So I think `mmons` must be being used, and the others not (or not in >>> a >>> context which gives enough of a hint as to their types). >> >> All the three are used in aux in similar way, but may be? m'mons'? is >> used in a slightly >> different way. So that you guess may occur true. >> >> Thank you. >> >> -- >> SM >> >> >> >>> On 05/10/2020 17:37, mechvel at scico.botik.ru wrote: >>>> On 2020-10-05 01:47, James Wood wrote: >>>>> Is `mmons` used somewhere, maybe giving a hint as to what type to >>>>> check >>>>> it at? >>>>> >>>> >>>> It has >>>> ?? m?? = mon? a e;???? m'??? = mon? b e' >>>> ?? m'' = mon? c e'';?? mmons = m ? mons >>>> >>>> ?? m'mons' : List Mon???? -- Agda forces me to set this signature >>>> ?? m'mons' = m' ? mons' >>>> >>>> m m' m'' : Mon,???? mon? a constructor for the record Mon. >>>> and >>>> mons mons' mons'' : List Mon?? are derived from the head function >>>> pattern: >>>> >>>> ? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >>>> >>>> mmons m'mons m''mons :? List Mon?? are computed by the assignments >>>> >>>> ? mmons = m ? mons???????????????? -- * >>>> >>>> ? m'mons' : List Mon >>>> ? m'mons' = m' ? mons' >>>> >>>> ? m''mons'' = m'' ? mons'' >>>> >>>> _?_? is overloaded by >>>> >>>> ? open import Data.List using (List; []; _?_ ...), >>>> ? open import Data.List.Relation.Unary.All as AllM using (All; []; >>>> _?_) >>>> >>>> >>>> It does work. But it looks new and a bit strange that it chooses one >>>> assignment in the middle >>>> of an array of similar assignments, and requires a signature for it: >>>> >>>> ----------------------------------------------------------------------------- >>>> >>>> >>>> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' ? >>>> mons''} >>>> ????????????? ord-ees ord-e'es' ord-e''es'' (suc l) l?'+[l?'+l?']?l' >>>> = >>>> >>>> ????????????? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >>>> ??? where >>>> ??? a+b = a + b;?????? b+c = b + c >>>> ??? m?? = mon? a e;??? m'? = mon? b e' >>>> ??? m'' = mon? c e'' >>>> >>>> ??? mmons = m ? mons >>>> >>>> ??? m'mons' : List Mon????? -- (I)? forced >>>> ??? m'mons' = m' ? mons' >>>> >>>> ??? m''mons'' = m'' ? mons'' >>>> ??? es = map Mon.exp mons;? es' = map Mon.exp mons';? es'' = map >>>> Mon.exp >>>> mons'' >>>> >>>> ??? mons'+mons'' = mons' +ms mons'' >>>> ??? ... >>>> >>>> ??? aux : Tri (e < e')?? (e ? e')?? (e > e')?? ? >>>> ????????? Tri (e' < e'') (e' ? e'') (e' > e'') ? >>>> ????????? Tri (e < e'')? (e ? e'')? (e > e'')? ? >>>> >>>> ????????? ((m ? mons) +ms (m' ? mons')) +ms (m'' ? mons'')? =ms >>>> ????????? (m ? mons) +ms ((m' ? mons') +ms (m'' ? mons'')) >>>> >>>> ??? -- many patterns for? aux : >>>> >>>> ??? aux (tri> _ _ e>e') (tri< e' _ _ e>e'') =? ... >>>> >>>> ??? ... >>>> ------------------------------------------------------------------------------ >>>> >>>> >>>> >>>> The effect is only in the assigments before `aux'. >>>> >>>> -- >>>> SM >>>> >>>> >>>> >>>> >>>>> On 04/10/2020 23:43, mechvel at scico.botik.ru wrote: >>>>>> On 2020-10-04 23:30, James Wood wrote: >>>>>>> Hi Sergei, >>>>>>> >>>>>>> Quick questions first: is `_?_` overloaded at all in this >>>>>>> context? >>>>>>> That'd be my guess for why Agda has no clue what the type is >>>>>>> supposed >>>>>>> to be. >>>>>>> >>>>>> >>>>>> It is overloaded. >>>>>> But there are other similar assignments before and around (like >>>>>> the >>>>>> one >>>>>> marked with *), >>>>>> and Agda does resolve them without providing a signature. >>>>>> >>>>>> -- >>>>>> SM >>>>>> >>>>>> >>>>>> >>>>>>> On 04/10/2020 18:19, mechvel at scico.botik.ru wrote: >>>>>>>> Dear Agda developers, >>>>>>>> >>>>>>>> There is a question about the following code fragment: >>>>>>>> >>>>>>>> ----------------------------------------------------- >>>>>>>> +ms-assoc-aux {mon? a e ? mons} {mon? b e' ? mons'} {mon? c e'' >>>>>>>> ? >>>>>>>> mons''} ... = >>>>>>>> >>>>>>>> ??? aux (<-cmp e e') (<-cmp e' e'') (<-cmp e e'') >>>>>>>> ??? where >>>>>>>> ??? m = mon? a e;? m' = mon? b e';?? m'' = mon? c e'' >>>>>>>> >>>>>>>> ??? mmons = m ? mons???????????????? -- * >>>>>>>> >>>>>>>> ??? -- m'mons' : List Mon??????????? -- (I-s) >>>>>>>> ??? m'mons' = m' ? mons'???????????? -- (I) >>>>>>>> >>>>>>>> ??? m''mons'' = m'' ? mons'' >>>>>>>> ??? ... >>>>>>>> ----------------------------------------------------- >>>>>>>> >>>>>>>> Agda 2.6.1 reports >>>>>>>> " >>>>>>>> Sort _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>>>>>> _1157 : _1156? [ at ...Over-abelianGroup.agda:414,5-12 ] >>>>>>>> _1159 : _1157? [ at ...Over-abelianGroup.agda:414,15-25 ] >>>>>>>> " >>>>>>>> >>>>>>>> I guess this is the kind of "unsolved metas". >>>>>>>> And the first "unsolved" is about the line marked (I). >>>>>>>> >>>>>>>> The previous line (marked *) is solved - while it is not any >>>>>>>> more >>>>>>>> clear >>>>>>>> than (I). >>>>>>>> >>>>>>>> Then, after adding the signature (I-s), everything is >>>>>>>> type-checked. >>>>>>>> 1) This necessity to add signature in the middle of an array of >>>>>>>> short >>>>>>>> assignments of the same >>>>>>>> ?? type looks strange. >>>>>>>> 2) There are many similar fragments in the program, and I never >>>>>>>> observed >>>>>>>> such an effect. >>>>>>>> >>>>>>>> What might this mean? >>>>>>>> >>>>>>>> -- >>>>>>>> SM >>>>>>>> _______________________________________________ >>>>>>>> Agda mailing list >>>>>>>> Agda at lists.chalmers.se >>>>>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Agda mailing list >>>>>>> Agda at lists.chalmers.se >>>>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>>>> >>>>>>> >>>>>>> >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda >>>>> >>>>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From deligu at di.unito.it Fri Oct 9 23:15:22 2020 From: deligu at di.unito.it (Ugo de'Liguoro) Date: Fri, 9 Oct 2020 23:15:22 +0200 Subject: [Agda] CfP for TYPES 2020 postproceedings: Message-ID: <5d06ca73-9c8d-8deb-9a15-f6a007488b56@di.unito.it> Post-proceedings of the?TYPES 2020 ???? 26th International Conference on Types for Proofs and Programs ? ? ? ? ? ? ? ? ? ? ? ? ? Open call for papers TYPES is a major forum for the presentation of research on all aspects of type theory and its applications. TYPES 2020 wasn?t held in Turin as planned because of the COVID-19 outbreak. Nonetheless the significant number of submissions and registrations testified the interest for TYPES in our community, motivating us to plan publishing post-proceedings. The post-proceedings volume will be published in LIPIcs, Leibniz International Proceedings in Informatics , an open-access series of conference proceedings. Submission to this post-proceedings volume is open to everyone, also to those who did not submit a contribution to the conference. We welcome high-quality descriptions of original work, as well as position papers, overview papers, and system descriptions. Submissions should be written in English, not overlapping with published or simultaneously submitted work to a journal or a conference with archival proceedings. We would like to invite all researchers that study and apply type systems to share their results. In particular, we welcome submissions on the following topics: * Foundations of type theory and constructive mathematics; * Homotopy type theory; * Applications of type theory; * Dependently typed programming; * Industrial uses of type theory technology; * Meta-theoretic studies of type systems; * Proof assistants and proof technology; * Automation in computer-assisted reasoning; * Links between type theory and functional programming; * Formalizing mathematics using type theory; * Type theory in linguistics. Important dates: * Paper submission: 19 October 31 October 2020 * Author notification: 18 January 2021 * Final version: ?15 February 2021 * Publication (presumably): end of March 2021 Details: * Papers have to be written in LaTex and adhere to the style requirements of LIPIcs . * The recommended length of a paper is 12-15 pages, excluding front-page(s) (authors, affiliation, keywords, abstract, ...), bibliography and an appendix of max 5 pages. If you need more pages, please ask the editors. * Papers have to be submitted in pdf through EasyChair: https://easychair.org/conferences/?conf=types2020postproceed * Accepted papers will be charged of 60:00?, according to LIPIcs policy for publication costs (https://www.dagstuhl.de/en/publications/lipics/processing-charge/) * In case of questions, please contact one of the editors. Editors: * Ugo de?Liguoro (Universit? di Torino) * Stefano Berardi (Universit? di Torino) * Thorsten Altenkirch (University of Nottingham) -- Ugo de'Liguoro Associate Professor of Computer Science Dipartimento di Informatica Universit? di Torino Corso Svizzera 185, 10149, Torino, Italy phone +39 011 6706766 - fax: +39 011 751603 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Vlad.Rusu at inria.fr Sat Oct 17 23:38:09 2020 From: Vlad.Rusu at inria.fr (Vlad Rusu) Date: Sat, 17 Oct 2020 23:38:09 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False Message-ID: The following code shows how a slightly wrong use of sized types in a definition of natural numbers leads to a proof of? ?. --------------{-# OPTIONS --sized --safe? #-} open import Relation.Binary.PropositionalEquality as Eq open import Data.Empty using (?; ?-elim) open import Size -------------- auxiliary-------------- ?-elim : ? {A B : Set}? ? (A ? B)? ? A? ? B ?-elim L M = L M -- a trick found on the Web_ data [Size<_] (i : Size) : Set where ? box : Size< i ? [Size< i ] unbox : ? {i} ? [Size< i ] ? Size< i unbox (box j) = j --size eliminators size-elim :? (P : Size ? Set) ? (? i ? ((j : [Size< i ]) ? P (unbox j)) ? P i) ?? ? i ? P i size-elim P Hind i = Hind _ ? { (box j) ? size-elim P Hind j } size-elimproved : (P : Size ? Set) ? (? i ? ((j : (Size< i)) ? P j ) ? P i) ?? ? i ? P i size-elimproved P Hind i = ?-elim (? {Hind' ? size-elim P Hind' i }) ??????????????????????? ? {i' Hind' ? Hind i' (? { j' ? Hind' (box j')? }) } ------------ end auxiliary----------- -- one might think that the following is a definition natural numbers using some Size arguments data ?? {s : Size} :? Set where ?zero :? ? ?suc : ({s' : Size< s} ? ? {s'}) ? ? {s} -- the definition is slightly wrong ("suc" should not contain ()-parentheses) and leads to a proof of ? -- introducing foo, a certain natural number foo : ? foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ -- foo is a successor to itself bar : foo ? suc foo bar = refl -- which is forbidden baz : ? (n : ?) ? (n ? suc ? { _ } ? n?? ) ? ? baz _ () --hence... zut : ? zut = baz foo bar From manuel at enigmage.de Mon Oct 19 11:15:56 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Mon, 19 Oct 2020 11:15:56 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: References: Message-ID: <33bf4590-fa2f-ec3b-d645-7c73f12ec2cd@enigmage.de> Thanks for finding this. I guess this is in a longer tradition of problems with the sized types implementation, see e.g. https://github.com/agda/agda/issues/2820, https://github.com/agda/agda/issues/3026, https://github.com/agda/agda/issues/1428. I don't understand whether it has overlap with existing issues. You don't use the infinity size, nor equality. So maybe it's a new kind of issue, coming from interaction of sizes with inductive types? Anyways, I guess it makes sense to report at https://github.com/agda/agda? On 17.10.20 23:38, Vlad Rusu wrote: > The following code shows how a slightly wrong use of sized types in a > definition of natural numbers leads to a proof of? ?. > > --------------{-# OPTIONS --sized --safe? #-} > open import Relation.Binary.PropositionalEquality as Eq > open import Data.Empty using (?; ?-elim) > open import Size > > > -------------- auxiliary-------------- > ?-elim : ? {A B : Set}? ? (A ? B)? ? A? ? B > ?-elim L M = L M > -- a trick found on the Web_ > data [Size<_] (i : Size) : Set where > ? box : Size< i ? [Size< i ] > unbox : ? {i} ? [Size< i ] ? Size< i > unbox (box j) = j > > --size eliminators > size-elim :? (P : Size ? Set) ? (? i ? ((j : [Size< i ]) ? P (unbox > j)) ? P i) ?? ? i ? P i > size-elim P Hind i = Hind _ ? { (box j) ? size-elim P Hind j } > size-elimproved : (P : Size ? Set) ? (? i ? ((j : (Size< i)) ? P j ) ? > P i) ?? ? i ? P i > size-elimproved P Hind i = ?-elim (? {Hind' ? size-elim P Hind' i }) > ??????????????????????? ? {i' Hind' ? Hind i' (? { j' ? Hind' (box > j')? }) } > ------------ end auxiliary----------- > > -- one might think that the following is a definition natural numbers > using some Size arguments > data ?? {s : Size} :? Set where > ?zero :? ? > ?suc : ({s' : Size< s} ? ? {s'}) ? ? {s} > > -- the definition is slightly wrong ("suc" should not contain > ()-parentheses) and leads to a proof of ? > > -- introducing foo, a certain natural number > foo : ? > foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ > > -- foo is a successor to itself > bar : foo ? suc foo > bar = refl > > -- which is forbidden > baz : ? (n : ?) ? (n ? suc ? { _ } ? n?? ) ? ? > baz _ () > > --hence... > zut : ? > zut = baz foo bar > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From manuel at enigmage.de Mon Oct 19 11:16:27 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Mon, 19 Oct 2020 11:16:27 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: References: Message-ID: <57d3a3d2-3dee-77ec-300b-175f3fd14ceb@enigmage.de> We should discuss this as well at AIM today after the talk. On 17.10.20 23:38, Vlad Rusu wrote: > The following code shows how a slightly wrong use of sized types in a > definition of natural numbers leads to a proof of? ?. > > --------------{-# OPTIONS --sized --safe? #-} > open import Relation.Binary.PropositionalEquality as Eq > open import Data.Empty using (?; ?-elim) > open import Size > > > -------------- auxiliary-------------- > ?-elim : ? {A B : Set}? ? (A ? B)? ? A? ? B > ?-elim L M = L M > -- a trick found on the Web_ > data [Size<_] (i : Size) : Set where > ? box : Size< i ? [Size< i ] > unbox : ? {i} ? [Size< i ] ? Size< i > unbox (box j) = j > > --size eliminators > size-elim :? (P : Size ? Set) ? (? i ? ((j : [Size< i ]) ? P (unbox > j)) ? P i) ?? ? i ? P i > size-elim P Hind i = Hind _ ? { (box j) ? size-elim P Hind j } > size-elimproved : (P : Size ? Set) ? (? i ? ((j : (Size< i)) ? P j ) ? > P i) ?? ? i ? P i > size-elimproved P Hind i = ?-elim (? {Hind' ? size-elim P Hind' i }) > ??????????????????????? ? {i' Hind' ? Hind i' (? { j' ? Hind' (box > j')? }) } > ------------ end auxiliary----------- > > -- one might think that the following is a definition natural numbers > using some Size arguments > data ?? {s : Size} :? Set where > ?zero :? ? > ?suc : ({s' : Size< s} ? ? {s'}) ? ? {s} > > -- the definition is slightly wrong ("suc" should not contain > ()-parentheses) and leads to a proof of ? > > -- introducing foo, a certain natural number > foo : ? > foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ > > -- foo is a successor to itself > bar : foo ? suc foo > bar = refl > > -- which is forbidden > baz : ? (n : ?) ? (n ? suc ? { _ } ? n?? ) ? ? > baz _ () > > --hence... > zut : ? > zut = baz foo bar > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From frederic.blanqui at inria.fr Mon Oct 19 11:23:38 2020 From: frederic.blanqui at inria.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCbGFucXVp?=) Date: Mon, 19 Oct 2020 11:23:38 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: <33bf4590-fa2f-ec3b-d645-7c73f12ec2cd@enigmage.de> References: <33bf4590-fa2f-ec3b-d645-7c73f12ec2cd@enigmage.de> Message-ID: <43696d46-8917-d029-2de5-fb959bb982cd@inria.fr> Hello. I see many problems with sized types in Agda. Is it really just a matter of implementation? Some issues are several years old and haven't been fixed yet. I am curious: where are described the theoretical grounds of the current implementation? Le 19/10/2020 ? 11:15, Manuel B?renz a ?crit?: > Thanks for finding this. I guess this is in a longer tradition of > problems with the sized types implementation, see e.g. > https://github.com/agda/agda/issues/2820, > https://github.com/agda/agda/issues/3026, > https://github.com/agda/agda/issues/1428. > > I don't understand whether it has overlap with existing issues. You > don't use the infinity size, nor equality. So maybe it's a new kind of > issue, coming from interaction of sizes with inductive types? > > Anyways, I guess it makes sense to report at https://github.com/agda/agda? > > On 17.10.20 23:38, Vlad Rusu wrote: >> The following code shows how a slightly wrong use of sized types in a >> definition of natural numbers leads to a proof of? ?. >> >> --------------{-# OPTIONS --sized --safe? #-} >> open import Relation.Binary.PropositionalEquality as Eq >> open import Data.Empty using (?; ?-elim) >> open import Size >> >> >> -------------- auxiliary-------------- >> ?-elim : ? {A B : Set}? ? (A ? B)? ? A? ? B >> ?-elim L M = L M >> -- a trick found on the Web_ >> data [Size<_] (i : Size) : Set where >> ? box : Size< i ? [Size< i ] >> unbox : ? {i} ? [Size< i ] ? Size< i >> unbox (box j) = j >> >> --size eliminators >> size-elim :? (P : Size ? Set) ? (? i ? ((j : [Size< i ]) ? P (unbox >> j)) ? P i) ?? ? i ? P i >> size-elim P Hind i = Hind _ ? { (box j) ? size-elim P Hind j } >> size-elimproved : (P : Size ? Set) ? (? i ? ((j : (Size< i)) ? P j ) ? >> P i) ?? ? i ? P i >> size-elimproved P Hind i = ?-elim (? {Hind' ? size-elim P Hind' i }) >> ??????????????????????? ? {i' Hind' ? Hind i' (? { j' ? Hind' (box >> j')? }) } >> ------------ end auxiliary----------- >> >> -- one might think that the following is a definition natural numbers >> using some Size arguments >> data ?? {s : Size} :? Set where >> ?zero :? ? >> ?suc : ({s' : Size< s} ? ? {s'}) ? ? {s} >> >> -- the definition is slightly wrong ("suc" should not contain >> ()-parentheses) and leads to a proof of ? >> >> -- introducing foo, a certain natural number >> foo : ? >> foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ >> >> -- foo is a successor to itself >> bar : foo ? suc foo >> bar = refl >> >> -- which is forbidden >> baz : ? (n : ?) ? (n ? suc ? { _ } ? n?? ) ? ? >> baz _ () >> >> --hence... >> zut : ? >> zut = baz foo bar >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From manuel at enigmage.de Mon Oct 19 11:31:32 2020 From: manuel at enigmage.de (=?UTF-8?Q?Manuel_B=c3=a4renz?=) Date: Mon, 19 Oct 2020 11:31:32 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: <43696d46-8917-d029-2de5-fb959bb982cd@inria.fr> References: <33bf4590-fa2f-ec3b-d645-7c73f12ec2cd@enigmage.de> <43696d46-8917-d029-2de5-fb959bb982cd@inria.fr> Message-ID: You may be interested as well to join the discussion at AIM today. See https://agda.zulipchat.com/#narrow/stream/257010-aim-xxxiii/topic/Sized.20types if you want to join. As far as I am aware the theoretical background is explained in https://dl.acm.org/doi/10.1145/2500365.2500591 or http://www.cse.chalmers.se/~abela/jfp15.pdf, but the implementation doesn't follow the theory exactly, because there are workarounds necessary when touching (co?)inductive types, or at least datatype definitions, I believe. Someone who understands the problem and the implementation better than me please speak up if I'm blathering nonsense here. On 19.10.20 11:23, Fr?d?ric Blanqui wrote: > Hello. I see many problems with sized types in Agda. Is it really just > a matter of implementation? Some issues are several years old and > haven't been fixed yet. I am curious: where are described the > theoretical grounds of the current implementation? > > Le 19/10/2020 ? 11:15, Manuel B?renz a ?crit?: >> Thanks for finding this. I guess this is in a longer tradition of >> problems with the sized types implementation, see e.g. >> https://github.com/agda/agda/issues/2820, >> https://github.com/agda/agda/issues/3026, >> https://github.com/agda/agda/issues/1428. >> >> I don't understand whether it has overlap with existing issues. You >> don't use the infinity size, nor equality. So maybe it's a new kind of >> issue, coming from interaction of sizes with inductive types? >> >> Anyways, I guess it makes sense to report at >> https://github.com/agda/agda? >> >> On 17.10.20 23:38, Vlad Rusu wrote: >>> The following code shows how a slightly wrong use of sized types in a >>> definition of natural numbers leads to a proof of? ?. >>> >>> --------------{-# OPTIONS --sized --safe? #-} >>> open import Relation.Binary.PropositionalEquality as Eq >>> open import Data.Empty using (?; ?-elim) >>> open import Size >>> >>> >>> -------------- auxiliary-------------- >>> ?-elim : ? {A B : Set}? ? (A ? B)? ? A? ? B >>> ?-elim L M = L M >>> -- a trick found on the Web_ >>> data [Size<_] (i : Size) : Set where >>> ?? box : Size< i ? [Size< i ] >>> unbox : ? {i} ? [Size< i ] ? Size< i >>> unbox (box j) = j >>> >>> --size eliminators >>> size-elim :? (P : Size ? Set) ? (? i ? ((j : [Size< i ]) ? P (unbox >>> j)) ? P i) ?? ? i ? P i >>> size-elim P Hind i = Hind _ ? { (box j) ? size-elim P Hind j } >>> size-elimproved : (P : Size ? Set) ? (? i ? ((j : (Size< i)) ? P j ) ? >>> P i) ?? ? i ? P i >>> size-elimproved P Hind i = ?-elim (? {Hind' ? size-elim P Hind' i }) >>> ???????????????????????? ? {i' Hind' ? Hind i' (? { j' ? Hind' (box >>> j')? }) } >>> ------------ end auxiliary----------- >>> >>> -- one might think that the following is a definition natural numbers >>> using some Size arguments >>> data ?? {s : Size} :? Set where >>> ??zero :? ? >>> ??suc : ({s' : Size< s} ? ? {s'}) ? ? {s} >>> >>> -- the definition is slightly wrong ("suc" should not contain >>> ()-parentheses) and leads to a proof of ? >>> >>> -- introducing foo, a certain natural number >>> foo : ? >>> foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ >>> >>> -- foo is a successor to itself >>> bar : foo ? suc foo >>> bar = refl >>> >>> -- which is forbidden >>> baz : ? (n : ?) ? (n ? suc ? { _ } ? n?? ) ? ? >>> baz _ () >>> >>> --hence... >>> zut : ? >>> zut = baz foo bar >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Vlad.Rusu at inria.fr Mon Oct 19 13:44:26 2020 From: Vlad.Rusu at inria.fr (vlad) Date: Mon, 19 Oct 2020 13:44:26 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False Message-ID: <4e1ed43f-4f59-90f7-a989-643ed7c29d6e@inria.fr> > Thanks for finding this. I guess this is in a longer tradition of > problems with the sized types implementation, see e.g. > https://github.com/agda/agda/issues/2820, > https://github.com/agda/agda/issues/3026, > https://github.com/agda/agda/issues/1428. > > I don't understand whether it has overlap with existing issues. You > don't use the infinity size, nor equality. So maybe it's a new kind of > issue, coming from interaction of sizes with inductive types? It is an elaboration on the bug about well-founded induction and sized types (https://github.com/agda/agda/issues/3026). The main difference with the latter is that, instead of importing the well-founded module of Agda's library, I am using an apparently innocent definition of a sized inductive type : data ?? {s : Size} :? Set where ? zero :? ? ? suc : ({s' : Size< s} ? ? {s'}) ? ? {s} as an accessibility predicate for the relation between sized induced by the construction Size<. By using the "size-elimproved" construction (also an elaboration of code found here: https://github.com/agda/agda/issues/2820#issuecomment-339969286) I can then define a "natural number" for each size, including infinity (note that sizes are implicit arguments, so infinity does not show up in the code, but it's there all right). For size = infinity, the "natural number" foo : ? foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ is easily shown to be a successor of itself, which the definition of "natural numbers" forbids, hence the proof of False. Overall, I'm not sure it's worth a new bug report, as it is an elaboration of existing constructions. My main point in showing this is that one may easily "believe" that one is defining natural numbers with sizes e.g. for writing non-structural recursive functions over them (like integer division), while in effect writing something else, with unpleasant consequences. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanzhiyan at gmail.com Mon Oct 19 17:05:31 2020 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Mon, 19 Oct 2020 17:05:31 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: <4e1ed43f-4f59-90f7-a989-643ed7c29d6e@inria.fr> References: <4e1ed43f-4f59-90f7-a989-643ed7c29d6e@inria.fr> Message-ID: The issue here is only incidentally about sized types. but rather an issue with the check for when an absurd pattern (i.e. "()") is allowed: https://github.com/agda/agda/issues/4995 Btw, the type you defined is more like co-natural numbers, i.e. with an extra point at infinity, so it's quite natural to have a fix-point for `suc`. On Mon, Oct 19, 2020 at 1:44 PM vlad wrote: > > Thanks for finding this. I guess this is in a longer tradition of > problems with the sized types implementation, see e.g. > https://github.com/agda/agda/issues/2820, > https://github.com/agda/agda/issues/3026, > https://github.com/agda/agda/issues/1428. > > I don't understand whether it has overlap with existing issues. You > don't use the infinity size, nor equality. So maybe it's a new kind of > issue, coming from interaction of sizes with inductive types? > > It is an elaboration on the bug about well-founded induction and sized types (https://github.com/agda/agda/issues/3026). The main difference with the latter is that, instead of importing the well-founded module of Agda's library, I am using an apparently innocent definition of a sized inductive type : > > data ? {s : Size} : Set where > zero : ? > suc : ({s' : Size< s} ? ? {s'}) ? ? {s} > > as an accessibility predicate for the relation between sized induced by the construction Size<. By using the "size-elimproved" construction (also an elaboration of code found here: https://github.com/agda/agda/issues/2820#issuecomment-339969286) I can then define a "natural number" for each size, including infinity (note that sizes are implicit arguments, so infinity does not show up in the code, but it's there all right). For size = infinity, the "natural number" > > foo : ? > foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ > > is easily shown to be a successor of itself, which the definition of "natural numbers" forbids, hence the proof of False. > > Overall, I'm not sure it's worth a new bug report, as it is an elaboration of existing constructions. My main point in showing this is that one may easily "believe" that one is defining natural numbers with sizes e.g. for writing non-structural recursive functions over them (like integer division), while in effect writing something else, with unpleasant consequences. > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From andrei.paskevich at lri.fr Mon Oct 19 18:17:41 2020 From: andrei.paskevich at lri.fr (Andrei Paskevich) Date: Mon, 19 Oct 2020 18:17:41 +0200 Subject: [Agda] F-IDE 2021 - Call for Papers Message-ID: <20201019161741.GA1318921@tikki.lri.fr> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Vlad.Rusu at inria.fr Mon Oct 19 18:22:38 2020 From: Vlad.Rusu at inria.fr (vlad) Date: Mon, 19 Oct 2020 18:22:38 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: References: <4e1ed43f-4f59-90f7-a989-643ed7c29d6e@inria.fr> Message-ID: <6b6e88a9-8937-fd90-e949-d8cb1830e83c@inria.fr> Thank you for the reply. Hmm, there are some things I don't understand. On 19/10/2020 17:05, Andrea Vezzosi wrote: > The issue here is only incidentally about sized types. but rather an > issue with the check for when an absurd pattern (i.e. "()") is > allowed: > > https://github.com/agda/agda/issues/4995 Unlike that issue I do not use a postulate but I am using sized types, so how can my issue only incidentally be about sized types? > Btw, the type you defined is more like co-natural numbers, i.e. with > an extra point at infinity, so it's quite natural to have a fix-point > for `suc`. Ok, perhaps the notation is confusing. If I syntactically rewrite the definition data? ? {s : Size} :? Set where ? zero :? ? ? suc : ({s' : Size< s} ? ? {s'}) ? ? {s} as follows, with Acc instead of ?, acc instead of suc, with explicit instead of implicit sizes, and forgetting the zero constructor, which was there just to make the above look like a definition of natural numbers anyway: data Acc (s : Size) : Set where ??? acc : ((s' : Size< s)? ? Acc s') ? Acc s then Acc reads as the accessibility predicate for the relation _<_? on Size such that i < j iff i : Size< j. The issue I raised can of course be rephrased by proving that the accessible part of the relation _<_ coincides with the whole relation, in particular, Acc ?, and since _<_ is not well-founded (? On Mon, Oct 19, 2020 at 1:44 PM vlad wrote: >> Thanks for finding this. I guess this is in a longer tradition of >> problems with the sized types implementation, see e.g. >> https://github.com/agda/agda/issues/2820, >> https://github.com/agda/agda/issues/3026, >> https://github.com/agda/agda/issues/1428. >> >> I don't understand whether it has overlap with existing issues. You >> don't use the infinity size, nor equality. So maybe it's a new kind of >> issue, coming from interaction of sizes with inductive types? >> >> It is an elaboration on the bug about well-founded induction and sized types (https://github.com/agda/agda/issues/3026). The main difference with the latter is that, instead of importing the well-founded module of Agda's library, I am using an apparently innocent definition of a sized inductive type : >> >> data ? {s : Size} : Set where >> zero : ? >> suc : ({s' : Size< s} ? ? {s'}) ? ? {s} >> >> as an accessibility predicate for the relation between sized induced by the construction Size<. By using the "size-elimproved" construction (also an elaboration of code found here: https://github.com/agda/agda/issues/2820#issuecomment-339969286) I can then define a "natural number" for each size, including infinity (note that sizes are implicit arguments, so infinity does not show up in the code, but it's there all right). For size = infinity, the "natural number" >> >> foo : ? >> foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ >> >> is easily shown to be a successor of itself, which the definition of "natural numbers" forbids, hence the proof of False. >> >> Overall, I'm not sure it's worth a new bug report, as it is an elaboration of existing constructions. My main point in showing this is that one may easily "believe" that one is defining natural numbers with sizes e.g. for writing non-structural recursive functions over them (like integer division), while in effect writing something else, with unpleasant consequences. >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda From sanzhiyan at gmail.com Tue Oct 20 10:37:30 2020 From: sanzhiyan at gmail.com (Andrea Vezzosi) Date: Tue, 20 Oct 2020 10:37:30 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: <6b6e88a9-8937-fd90-e949-d8cb1830e83c@inria.fr> References: <4e1ed43f-4f59-90f7-a989-643ed7c29d6e@inria.fr> <6b6e88a9-8937-fd90-e949-d8cb1830e83c@inria.fr> Message-ID: Using sizes as freely as Agda allows, the distinction between data and codata gets quite blurred, but that does not necessarily lead to an unsound system. The fact that _<_ is not well-founded on sizes is what is unsound, and I argue also agda refuting cycles in your ? {?}. Regarding Acc, It's true that for any specific size "Acc s" corresponds to "s" being accessible. But then well-foundedness of _<_ implies `Acc s` is equivalent to the unit type for any `s`, so any two elements you define in it are going to be equal. Regarding how your `?` can be the (sized) conatural numbers, my point is that for the functor F F : (Size -> Set) -> Size -> Set F X i = Maybe ((j : Size< i) -> X j) the least and greatest fixed points coincide, so whether you construct it with "data" or a coinductive record it does not make a difference. You'll get a `? : Size -> Set` which can be shown to be antitone in the size. I would agree that it's a bit of an obscure interaction though, and might deserve a warning. On Mon, Oct 19, 2020 at 6:22 PM vlad wrote: > > Thank you for the reply. Hmm, there are some things I don't understand. > > On 19/10/2020 17:05, Andrea Vezzosi wrote: > > The issue here is only incidentally about sized types. but rather an > > issue with the check for when an absurd pattern (i.e. "()") is > > allowed: > > > > https://github.com/agda/agda/issues/4995 > Unlike that issue I do not use a postulate but I am using sized types, > so how can my issue only incidentally be about sized types? > > Btw, the type you defined is more like co-natural numbers, i.e. with > > an extra point at infinity, so it's quite natural to have a fix-point > > for `suc`. > > Ok, perhaps the notation is confusing. If I syntactically rewrite the > definition > > data ? {s : Size} : Set where > zero : ? > suc : ({s' : Size< s} ? ? {s'}) ? ? {s} > > as follows, with Acc instead of ?, acc instead of suc, with explicit > instead of implicit sizes, and forgetting the zero constructor, which > was there just to make the above look like a definition of natural > numbers anyway: > > data Acc (s : Size) : Set where > > acc : ((s' : Size< s) ? Acc s') ? Acc s > > then Acc reads as the accessibility predicate for the relation _<_ on > Size such that i < j iff i : Size< j. The issue I raised can of course > be rephrased by proving that the accessible part of the relation _<_ > coincides with the whole relation, in particular, Acc ?, and since _<_ > is not well-founded (? instead of Acc for that purpose, they're interchangeable here. > > Now, Acc is an inductive definition, and so is ?. I don't see how the > latter can denote co-natural numbers, which AFAIK require a coinductive > definition? > > Mind, I'm not saying that ? above is the appropriate way of defining > sized natural numbers. But Agda accepts it - and it shouldn't, because > after a few steps one gets a proof of False in safe mode... > > > > On Mon, Oct 19, 2020 at 1:44 PM vlad wrote: > >> Thanks for finding this. I guess this is in a longer tradition of > >> problems with the sized types implementation, see e.g. > >> https://github.com/agda/agda/issues/2820, > >> https://github.com/agda/agda/issues/3026, > >> https://github.com/agda/agda/issues/1428. > >> > >> I don't understand whether it has overlap with existing issues. You > >> don't use the infinity size, nor equality. So maybe it's a new kind of > >> issue, coming from interaction of sizes with inductive types? > >> > >> It is an elaboration on the bug about well-founded induction and sized types (https://github.com/agda/agda/issues/3026). The main difference with the latter is that, instead of importing the well-founded module of Agda's library, I am using an apparently innocent definition of a sized inductive type : > >> > >> data ? {s : Size} : Set where > >> zero : ? > >> suc : ({s' : Size< s} ? ? {s'}) ? ? {s} > >> > >> as an accessibility predicate for the relation between sized induced by the construction Size<. By using the "size-elimproved" construction (also an elaboration of code found here: https://github.com/agda/agda/issues/2820#issuecomment-339969286) I can then define a "natural number" for each size, including infinity (note that sizes are implicit arguments, so infinity does not show up in the code, but it's there all right). For size = infinity, the "natural number" > >> > >> foo : ? > >> foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ > >> > >> is easily shown to be a successor of itself, which the definition of "natural numbers" forbids, hence the proof of False. > >> > >> Overall, I'm not sure it's worth a new bug report, as it is an elaboration of existing constructions. My main point in showing this is that one may easily "believe" that one is defining natural numbers with sizes e.g. for writing non-structural recursive functions over them (like integer division), while in effect writing something else, with unpleasant consequences. > >> > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> https://lists.chalmers.se/mailman/listinfo/agda From Vlad.Rusu at inria.fr Tue Oct 20 11:09:13 2020 From: Vlad.Rusu at inria.fr (vlad) Date: Tue, 20 Oct 2020 11:09:13 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: References: <4e1ed43f-4f59-90f7-a989-643ed7c29d6e@inria.fr> <6b6e88a9-8937-fd90-e949-d8cb1830e83c@inria.fr> Message-ID: <0aea0a29-2721-ee22-e76d-e13a8406598a@inria.fr> Thanks again for the answer. All this is very informative. It does IMO deserve to be properly documented, in papers and in the tool, since it contradicts the usual discourse that? inductive types should be defined using data, coinductive types should be defined using records, and sizes are just a way to ensure termination/productivity. Hopefully all this will be clarified (and the corresponding soundness bugs will be fixed) in a future release. When this happens I'll be happy to use Agda again. On 20/10/2020 10:37, Andrea Vezzosi wrote: > Using sizes as freely as Agda allows, the distinction between data and > codata gets quite blurred, but that does not necessarily lead to an > unsound system. > > The fact that _<_ is not well-founded on sizes is what is unsound, and > I argue also agda refuting cycles in your ? {?}. > > Regarding Acc, It's true that for any specific size "Acc s" > corresponds to "s" being accessible. But then well-foundedness of _<_ > implies `Acc s` is equivalent to the unit type for any `s`, so any two > elements you define in it are going to be equal. > > Regarding how your `?` can be the (sized) conatural numbers, my point > is that for the functor F > > F : (Size -> Set) -> Size -> Set > F X i = Maybe ((j : Size< i) -> X j) > > the least and greatest fixed points coincide, so whether you construct > it with "data" or a coinductive record it does not make a difference. > You'll get a `? : Size -> Set` which can be shown to be antitone in > the size. > > I would agree that it's a bit of an obscure interaction though, and > might deserve a warning. > > On Mon, Oct 19, 2020 at 6:22 PM vlad wrote: >> Thank you for the reply. Hmm, there are some things I don't understand. >> >> On 19/10/2020 17:05, Andrea Vezzosi wrote: >>> The issue here is only incidentally about sized types. but rather an >>> issue with the check for when an absurd pattern (i.e. "()") is >>> allowed: >>> >>> https://github.com/agda/agda/issues/4995 >> Unlike that issue I do not use a postulate but I am using sized types, >> so how can my issue only incidentally be about sized types? >>> Btw, the type you defined is more like co-natural numbers, i.e. with >>> an extra point at infinity, so it's quite natural to have a fix-point >>> for `suc`. >> Ok, perhaps the notation is confusing. If I syntactically rewrite the >> definition >> >> data ? {s : Size} : Set where >> zero : ? >> suc : ({s' : Size< s} ? ? {s'}) ? ? {s} >> >> as follows, with Acc instead of ?, acc instead of suc, with explicit >> instead of implicit sizes, and forgetting the zero constructor, which >> was there just to make the above look like a definition of natural >> numbers anyway: >> >> data Acc (s : Size) : Set where >> >> acc : ((s' : Size< s) ? Acc s') ? Acc s >> >> then Acc reads as the accessibility predicate for the relation _<_ on >> Size such that i < j iff i : Size< j. The issue I raised can of course >> be rephrased by proving that the accessible part of the relation _<_ >> coincides with the whole relation, in particular, Acc ?, and since _<_ >> is not well-founded (?> instead of Acc for that purpose, they're interchangeable here. >> >> Now, Acc is an inductive definition, and so is ?. I don't see how the >> latter can denote co-natural numbers, which AFAIK require a coinductive >> definition? >> >> Mind, I'm not saying that ? above is the appropriate way of defining >> sized natural numbers. But Agda accepts it - and it shouldn't, because >> after a few steps one gets a proof of False in safe mode... >> >> >>> On Mon, Oct 19, 2020 at 1:44 PM vlad wrote: >>>> Thanks for finding this. I guess this is in a longer tradition of >>>> problems with the sized types implementation, see e.g. >>>> https://github.com/agda/agda/issues/2820, >>>> https://github.com/agda/agda/issues/3026, >>>> https://github.com/agda/agda/issues/1428. >>>> >>>> I don't understand whether it has overlap with existing issues. You >>>> don't use the infinity size, nor equality. So maybe it's a new kind of >>>> issue, coming from interaction of sizes with inductive types? >>>> >>>> It is an elaboration on the bug about well-founded induction and sized types (https://github.com/agda/agda/issues/3026). The main difference with the latter is that, instead of importing the well-founded module of Agda's library, I am using an apparently innocent definition of a sized inductive type : >>>> >>>> data ? {s : Size} : Set where >>>> zero : ? >>>> suc : ({s' : Size< s} ? ? {s'}) ? ? {s} >>>> >>>> as an accessibility predicate for the relation between sized induced by the construction Size<. By using the "size-elimproved" construction (also an elaboration of code found here: https://github.com/agda/agda/issues/2820#issuecomment-339969286) I can then define a "natural number" for each size, including infinity (note that sizes are implicit arguments, so infinity does not show up in the code, but it's there all right). For size = infinity, the "natural number" >>>> >>>> foo : ? >>>> foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ >>>> >>>> is easily shown to be a successor of itself, which the definition of "natural numbers" forbids, hence the proof of False. >>>> >>>> Overall, I'm not sure it's worth a new bug report, as it is an elaboration of existing constructions. My main point in showing this is that one may easily "believe" that one is defining natural numbers with sizes e.g. for writing non-structural recursive functions over them (like integer division), while in effect writing something else, with unpleasant consequences. >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda From frederic.blanqui at inria.fr Tue Oct 20 12:15:23 2020 From: frederic.blanqui at inria.fr (=?UTF-8?B?RnLDqWTDqXJpYyBCbGFucXVp?=) Date: Tue, 20 Oct 2020 12:15:23 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: <0aea0a29-2721-ee22-e76d-e13a8406598a@inria.fr> References: <4e1ed43f-4f59-90f7-a989-643ed7c29d6e@inria.fr> <6b6e88a9-8937-fd90-e949-d8cb1830e83c@inria.fr> <0aea0a29-2721-ee22-e76d-e13a8406598a@inria.fr> Message-ID: <2d610820-5f8c-d4c1-ef99-ffdb833cd6c9@inria.fr> Hi. Where can I find the definitions of Size and SizeSizeUniv. Is SizeUniv typable, and what is the type of Size->SizeUniv? In other words, what are the PTS axioms and rules for the sort SizeUniv? However, https://agda.readthedocs.io/en/v2.6.1.1/language/built-ins.html#sized-types says that SizeUniv:SizeUniv, which doesn't seem like a good idea in a type system, and Size<:..Size->SizeUniv. I don't know what is ..Size. Thanks for your help. Fr?d?ric. Le 20/10/2020 ? 11:09, vlad a ?crit?: > Thanks again for the answer. All this is very informative. It does IMO > deserve to be properly documented, in papers and in the tool, since it > contradicts the usual discourse that? inductive types should be > defined using data, coinductive types should be defined using records, > and sizes are just a way to ensure termination/productivity. Hopefully > all this will be clarified (and the corresponding soundness bugs will > be fixed) in a future release. When this happens I'll be happy to use > Agda again. > > On 20/10/2020 10:37, Andrea Vezzosi wrote: >> Using sizes as freely as Agda allows, the distinction between data and >> codata gets quite blurred, but that does not necessarily lead to an >> unsound system. >> >> The fact that _<_ is not well-founded on sizes is what is unsound, and >> I argue also agda refuting cycles in your? ? {?}. >> >> Regarding Acc,? It's true that for any specific size "Acc s" >> corresponds to "s" being accessible. But then? well-foundedness of _<_ >> implies `Acc s` is equivalent to the unit type for any `s`, so any two >> elements you define in it are going to be equal. >> >> Regarding how your `?` can be the (sized) conatural numbers, my point >> is that for the functor F >> >> ? F : (Size -> Set) -> Size -> Set >> ? F X i = Maybe ((j : Size< i) -> X j) >> >> the least and greatest fixed points coincide, so whether you construct >> it with "data" or a coinductive record it does not make a difference. >> You'll get a `? : Size -> Set` which can be shown to be antitone in >> the size. >> >> I would agree that it's a bit of an obscure interaction though, and >> might deserve a warning. >> >> On Mon, Oct 19, 2020 at 6:22 PM vlad wrote: >>> Thank you for the reply. Hmm, there are some things I don't understand. >>> >>> On 19/10/2020 17:05, Andrea Vezzosi wrote: >>>> The issue here is only incidentally about sized types. but rather an >>>> issue with the check for when an absurd pattern (i.e. "()") is >>>> allowed: >>>> >>>> https://github.com/agda/agda/issues/4995 >>> Unlike that issue I do not use a postulate but I am using sized types, >>> so how can my issue only incidentally be about sized types? >>>> Btw, the type you defined is more like co-natural numbers, i.e. with >>>> an extra point at infinity, so it's quite natural to have a fix-point >>>> for `suc`. >>> Ok, perhaps the notation is confusing. If I syntactically rewrite the >>> definition >>> >>> data? ? {s : Size} :? Set where >>> ??? zero :? ? >>> ??? suc : ({s' : Size< s} ? ? {s'}) ? ? {s} >>> >>> as follows, with Acc instead of ?, acc instead of suc, with explicit >>> instead of implicit sizes, and forgetting the zero constructor, which >>> was there just to make the above look like a definition of natural >>> numbers anyway: >>> >>> data Acc (s : Size) : Set where >>> >>> ????? acc : ((s' : Size< s)? ? Acc s') ? Acc s >>> >>> then Acc reads as the accessibility predicate for the relation _<_? on >>> Size such that i < j iff i : Size< j. The issue I raised can of course >>> be rephrased by proving that the accessible part of the relation _<_ >>> coincides with the whole relation, in particular, Acc ?, and since _<_ >>> is not well-founded (?>> instead of Acc for that purpose, they're interchangeable here. >>> >>> Now, Acc is an inductive definition, and so is ?. I don't see how the >>> latter can denote co-natural numbers, which AFAIK require a coinductive >>> definition? >>> >>> Mind, I'm not saying that ? above is the appropriate way of defining >>> sized natural numbers. But Agda accepts it - and it shouldn't, because >>> after a few steps one gets a proof of False in safe mode... >>> >>> >>>> On Mon, Oct 19, 2020 at 1:44 PM vlad wrote: >>>>> Thanks for finding this. I guess this is in a longer tradition of >>>>> problems with the sized types implementation, see e.g. >>>>> https://github.com/agda/agda/issues/2820, >>>>> https://github.com/agda/agda/issues/3026, >>>>> https://github.com/agda/agda/issues/1428. >>>>> >>>>> I don't understand whether it has overlap with existing issues. You >>>>> don't use the infinity size, nor equality. So maybe it's a new >>>>> kind of >>>>> issue, coming from interaction of sizes with inductive types? >>>>> >>>>> It is an elaboration on the bug about well-founded induction and >>>>> sized types (https://github.com/agda/agda/issues/3026). The main >>>>> difference with the latter is that, instead of importing the >>>>> well-founded module of Agda's library, I am using an apparently >>>>> innocent definition of a sized inductive type : >>>>> >>>>> data ?? {s : Size} :? Set where >>>>> ??? zero :? ? >>>>> ??? suc : ({s' : Size< s} ? ? {s'}) ? ? {s} >>>>> >>>>> as an accessibility predicate for the relation between sized >>>>> induced by the construction Size<. By using the "size-elimproved" >>>>> construction (also an elaboration of code found here: >>>>> https://github.com/agda/agda/issues/2820#issuecomment-339969286) I >>>>> can then define a "natural number" for each size, including >>>>> infinity (note that sizes are implicit arguments, so infinity does >>>>> not show up in the code, but it's there all right). For size = >>>>> infinity, the "natural number" >>>>> >>>>> foo : ? >>>>> foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ >>>>> >>>>> is easily shown to be a successor of itself, which the definition >>>>> of "natural numbers" forbids, hence the proof of False. >>>>> >>>>> Overall, I'm not sure it's worth a new bug report, as it is an >>>>> elaboration of existing constructions. My main point in showing >>>>> this is that one may easily "believe" that one is defining natural >>>>> numbers with sizes e.g. for writing non-structural recursive >>>>> functions over them (like integer division), while in effect >>>>> writing something else, with unpleasant consequences. >>>>> >>>>> _______________________________________________ >>>>> Agda mailing list >>>>> Agda at lists.chalmers.se >>>>> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Thu Oct 22 13:36:18 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Thu, 22 Oct 2020 13:36:18 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: References: Message-ID: Hi Vlad, I just fixed issue #4995 this morning, this also means your example is no longer accepted by the development version of Agda: Failed to solve the following constraints: > Is empty: n ? suc (? {_} ? n) (blocked on _s_49) > -- Jesper On Sat, Oct 17, 2020 at 11:39 PM Vlad Rusu wrote: > The following code shows how a slightly wrong use of sized types in a > definition of natural numbers leads to a proof of ?. > > --------------{-# OPTIONS --sized --safe #-} > open import Relation.Binary.PropositionalEquality as Eq > open import Data.Empty using (?; ?-elim) > open import Size > > > -------------- auxiliary-------------- > ?-elim : ? {A B : Set} ? (A ? B) ? A ? B > ?-elim L M = L M > -- a trick found on the Web_ > data [Size<_] (i : Size) : Set where > box : Size< i ? [Size< i ] > unbox : ? {i} ? [Size< i ] ? Size< i > unbox (box j) = j > > --size eliminators > size-elim : (P : Size ? Set) ? (? i ? ((j : [Size< i ]) ? P (unbox j)) > ? P i) ? ? i ? P i > size-elim P Hind i = Hind _ ? { (box j) ? size-elim P Hind j } > size-elimproved : (P : Size ? Set) ? (? i ? ((j : (Size< i)) ? P j ) ? P > i) ? ? i ? P i > size-elimproved P Hind i = ?-elim (? {Hind' ? size-elim P Hind' i }) > ? {i' Hind' ? Hind i' (? { j' ? Hind' (box j') > }) } > ------------ end auxiliary----------- > > -- one might think that the following is a definition natural numbers > using some Size arguments > data ? {s : Size} : Set where > zero : ? > suc : ({s' : Size< s} ? ? {s'}) ? ? {s} > > -- the definition is slightly wrong ("suc" should not contain > ()-parentheses) and leads to a proof of ? > > -- introducing foo, a certain natural number > foo : ? > foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ > > -- foo is a successor to itself > bar : foo ? suc foo > bar = refl > > -- which is forbidden > baz : ? (n : ?) ? (n ? suc ? { _ } ? n ) ? ? > baz _ () > > --hence... > zut : ? > zut = baz foo bar > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Vlad.Rusu at inria.fr Thu Oct 22 14:23:38 2020 From: Vlad.Rusu at inria.fr (Vlad Rusu) Date: Thu, 22 Oct 2020 14:23:38 +0200 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: References: Message-ID: <6a691df4-a709-eafc-9310-0ec4ac2b5854@inria.fr> Hi Jesper, Thanks for the information. On issue less is good news. However, from what I understand from earlier exchanges on this list, the more serious issue with sized types is the inequality ? Hi Vlad, > > I just fixed issue #4995 this morning, this also means your example is > no longer accepted by the development version of Agda: > > Failed to solve the following constraints: > ? Is empty: n ? suc (? {_} ? n) (blocked on _s_49) > > > -- Jesper > > On Sat, Oct 17, 2020 at 11:39 PM Vlad Rusu > wrote: > > The following code shows how a slightly wrong use of sized types in a > definition of natural numbers leads to a proof of? ?. > > --------------{-# OPTIONS --sized --safe? #-} > open import Relation.Binary.PropositionalEquality as Eq > open import Data.Empty using (?; ?-elim) > open import Size > > > -------------- auxiliary-------------- > ?-elim : ? {A B : Set}? ? (A ? B)? ? A? ? B > ?-elim L M = L M > -- a trick found on the Web_ > data [Size<_] (i : Size) : Set where > ?? box : Size< i ? [Size< i ] > unbox : ? {i} ? [Size< i ] ? Size< i > unbox (box j) = j > > --size eliminators > size-elim :? (P : Size ? Set) ? (? i ? ((j : [Size< i ]) ? P > (unbox j)) > ? P i) ?? ? i ? P i > size-elim P Hind i = Hind _ ? { (box j) ? size-elim P Hind j } > size-elimproved : (P : Size ? Set) ? (? i ? ((j : (Size< i)) ? P j > ) ? P > i) ?? ? i ? P i > size-elimproved P Hind i = ?-elim (? {Hind' ? size-elim P Hind' i }) > ???????????????????????? ? {i' Hind' ? Hind i' (? { j' ? Hind' > (box j') > }) } > ------------ end auxiliary----------- > > -- one might think that the following is a definition natural numbers > using some Size arguments > data ?? {s : Size} :? Set where > ??zero :? ? > ??suc : ({s' : Size< s} ? ? {s'}) ? ? {s} > > -- the definition is slightly wrong ("suc" should not contain > ()-parentheses) and leads to a proof of ? > > -- introducing foo, a certain natural number > foo : ? > foo = size-elimproved (? s ? ?{s}) (? _ H ? suc ? { {j} ? H j } ) _ > > -- foo is a successor to itself > bar : foo ? suc foo > bar = refl > > -- which is forbidden > baz : ? (n : ?) ? (n ? suc ? { _ } ? n?? ) ? ? > baz _ () > > --hence... > zut : ? > zut = baz foo bar > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Vlad.Rusu at inria.fr Fri Oct 23 00:22:26 2020 From: Vlad.Rusu at inria.fr (vlad) Date: Fri, 23 Oct 2020 00:22:26 +0200 Subject: [Agda] =?utf-8?q?any_known_proof_of_=E2=8A=A5_that_does_not_synt?= =?utf-8?q?actically_use_=E2=88=9E_=3F?= In-Reply-To: References: Message-ID: <2bdbbb13-cad7-af8a-64c3-716105ae968b@inria.fr> Dear Agda developers, You're getting a lot of those recently? - and thank you for the answers -? but I have yet another question about sized types. if I'm not mistaken, all the proofs of ? based in sized types discussed in the bug reports do syntactically use ?, so I was wondering: is there any known proof of ? where the size constant ? does not (syntactically) occur? Implicit ocurrences ({?} or _ ), and renamings, are also forbidden. all the best, - Vlad From Jesper at sikanda.be Fri Oct 23 09:43:53 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 23 Oct 2020 09:43:53 +0200 Subject: [Agda] =?utf-8?q?any_known_proof_of_=E2=8A=A5_that_does_not_synt?= =?utf-8?q?actically_use_=E2=88=9E_=3F?= In-Reply-To: <2bdbbb13-cad7-af8a-64c3-716105ae968b@inria.fr> References: <2bdbbb13-cad7-af8a-64c3-716105ae968b@inria.fr> Message-ID: Hi Vlad, All known issues with sized types being able to prove false should be listed here: https://github.com/agda/agda/issues?q=is%3Aissue+is%3Aopen+label%3Afalse+label%3Asized-types. >From those, the only one that does not immediately seem to involve infinity is https://github.com/agda/agda/issues/4483, but it seems to me the issue is no longer valid on the current development version of Agda. -- Jesper On Fri, Oct 23, 2020 at 12:23 AM vlad wrote: > Dear Agda developers, > > You're getting a lot of those recently - and thank you for the answers > - but I have yet another question about sized types. > > if I'm not mistaken, all the proofs of ? based in sized types discussed > in the bug reports do syntactically use ?, so I was wondering: > > is there any known proof of ? where the size constant ? does not > (syntactically) occur? Implicit ocurrences ({?} or _ ), and renamings, > are also forbidden. > > all the best, > > - Vlad > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vlad.rusu at inria.fr Fri Oct 23 11:25:35 2020 From: vlad.rusu at inria.fr (Vlad Rusu) Date: Fri, 23 Oct 2020 11:25:35 +0200 (CEST) Subject: [Agda] =?utf-8?q?any_known_proof_of_=E2=8A=A5_that_does_not_synt?= =?utf-8?q?actically_use_=E2=88=9E_=3F?= Message-ID: <1776224854.4125609.1603445135638.JavaMail.zimbra@zcs-store9.inria.fr> An HTML attachment was scrubbed... URL: From abela at chalmers.se Sun Nov 1 23:24:17 2020 From: abela at chalmers.se (Andreas Abel) Date: Sun, 1 Nov 2020 23:24:17 +0100 Subject: [Agda] agda2lagda (Halloween edition): Agda for the illiterate Message-ID: Hello Agda community, I found that I find writing literate Agda tedious, so I wrote a small tool https://andreasabel.github.io/agda2lagda/ that converts an ordinary Agda file into a LaTeX literate one, turning comments into text and program text into code blocks. It also turns underlined text into headings. Here is a small showcase: http://www.cse.chalmers.se/~abela/#cr-sk Strong normalization for simply-typed combinatory algebra using Girard?s reducibility candidates formalized in Agda (Title, abstract and acknowledgements done in LaTeX, the main part comes from the Agda file.) I imagine the following use case: You started doing some Agda prototyping. Then the project grows, and you consider a publication. You use agda2lagda to convert your code into literate code and continue from there. Have fun! --Andreas -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www.cse.chalmers.se/~abela/ From wkr1u18 at soton.ac.uk Mon Nov 2 11:55:55 2020 From: wkr1u18 at soton.ac.uk (rozowski w.k. (wkr1u18)) Date: Mon, 2 Nov 2020 10:55:55 +0000 Subject: [Agda] Converting intrinsically typed terms Message-ID: Hello everyone! I'm relatively new to Agda (recently just went through first two Parts of PLFA), so I'm sorry if my question is obvious or don't appropriate for this forum. I am writing to ask for any advice how to formalise type correct transformations between intrinsically typed terms. Currently, while doing my BSc thesis, I am working on formalizing a paper about framework for specifying abstract machines, as a series of transforms between STLC and intermediate languages including combinators (eg. push? to push on stack, ?? to pop from stack and bind to variable, _?_ to perform sequencing). Each intermediate language adds a pair of push and lambda combinators to work with different parts of machine - eg. environments, continuations. Each of the intermediate languages is a subset of the following ones. The type rules (and way of building terms - because intrinsic typing) for those combinators, are: push?_ : ? {? A} ? ? ? A ----- ? ? ? R? A ??_ : ? {? A B} ? ? , A ? B --------- ? ? ? A ?? B _?_ : ? {? A B} ? ? ? R? A ? ? ? A ?? B --------- ? ? ? B (Rs A is just annotated type for something of type A being stored on stack) I managed to use the PLFA formalism and add typing rules for lambda calculus extended with pair of combinators for the stack and sequencing operators. The extended semantics now include: ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} ? L ?? L? --------------- ? M ? L ?? M ? L? ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} ? Value V ? M ?? M? --------------- ? M ? V ?? M? ? V ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} ------------------- ? (push? W) ? (?? N) ?? N [ W ] The part I am having trouble with is formalising a transform between terms from STLC to this intermediate language. One of the transforms introduced by this paper is: Va : ???s Va [[x]] = pushs x Va [[?x.E]] = pushs (?sx.Va [[E]] ) Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f As the STLC is the subset of the first combinator language, I just defined transform from the language to itself: I defined map between types, contexts and variables lookup Va-type : Type ? Type Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) Va-type `? = R? `? Va-type (R? x) = R? (Va-type x) Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) Va-context : Context ? Context Va-context ? = ? Va-context (x , x?) = ( Va-context x , Va-type x? ) Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) Va-var Z = Z Va-var (S x) = S Va-var x And the problematic part is declaring the transform between terms: Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) Va (` x) = ` Va-var x Va (? x) = push? (?? Va x) -- Here is the hole I cannot come up with filling it Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) Va `zero = push? `zero Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for dealing with sucessors of Nats - currently left like this to pass the typecheck -- Combinators from intermediate language are mapped to itself Va (push? x) = push? Va x Va (?? x) = ?? Va x Va (x ? x?) = Va x ? Va x? The only bit, I am not able to formalise is the "app" combinator, as standard lookup using #_ doesnt work when mapping between terms. Do you happen to have any advice for me, how to tackle such transformations? Is there anything I am missing in my way of formalising? Did any of you worked with type correct transformations of terms in de Brujin typed terms and have any tips for me? I would be most grateful if I could hear back from you! Best, Wojciech -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Mon Nov 2 12:28:19 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Mon, 2 Nov 2020 12:28:19 +0100 Subject: [Agda] slightly wrong sized datatype definition leads to proof of False In-Reply-To: <2d610820-5f8c-d4c1-ef99-ffdb833cd6c9@inria.fr> References: <4e1ed43f-4f59-90f7-a989-643ed7c29d6e@inria.fr> <6b6e88a9-8937-fd90-e949-d8cb1830e83c@inria.fr> <0aea0a29-2721-ee22-e76d-e13a8406598a@inria.fr> <2d610820-5f8c-d4c1-ef99-ffdb833cd6c9@inria.fr> Message-ID: On 2020-10-20 12:15, Fr?d?ric Blanqui wrote: > Where can I find the definitions of Size and Size https://github.com/agda/agda-stdlib/blob/master/src/Size.agda imports > Agda.Builtin.Size but I don't know where to find this module. (Sorry, > I am not familiar with Agda.) This module may not be very useful to you: https://github.com/agda/agda/blob/02fe8918eb5c22bf75de040a4952c148858badb0/src/data/lib/prim/Agda/Builtin/Size.agda -- /NAD From Graham.Hutton at nottingham.ac.uk Tue Nov 3 10:52:19 2020 From: Graham.Hutton at nottingham.ac.uk (Graham Hutton) Date: Tue, 3 Nov 2020 09:52:19 +0000 Subject: [Agda] Journal of Functional Programming - Call for PhD Abstracts Message-ID: <8C3FB908-F501-4AC7-88B1-FD032F9E86D8@nottingham.ac.uk> Dear all, If you or one of your students recently completed a PhD in the area of functional programming, please submit the dissertation abstract for publication in JFP: simple process, no refereeing, open access, 200 published to date, deadline 30th November 2020. Please share! Best wishes, Graham Hutton ============================================================ CALL FOR PHD ABSTRACTS Journal of Functional Programming Deadline: 30th November 2020 http://tinyurl.com/jfp-phd-abstracts ============================================================ PREAMBLE: Many students complete PhDs in functional programming each year. As a service to the community, twice per year the Journal of Functional Programming publishes the abstracts from PhD dissertations completed during the previous year. The abstracts are made freely available on the JFP website, i.e. not behind any paywall. They do not require any transfer of copyright, merely a license from the author. A dissertation is eligible for inclusion if parts of it have or could have appeared in JFP, that is, if it is in the general area of functional programming. The abstracts are not reviewed. Please submit dissertation abstracts according to the instructions below. We welcome submissions from both the PhD student and PhD advisor/supervisor although we encourage them to coordinate. ============================================================ SUBMISSION: Please submit the following information to Graham Hutton by 30th November 2020: o Dissertation title: (including any subtitle) o Student: (full name) o Awarding institution: (full name and country) o Date of PhD award: (month and year; depending on the institution, this may be the date of the viva, corrections being approved, graduation ceremony, or otherwise) o Advisor/supervisor: (full names) o Dissertation URL: (please provide a permanently accessible link to the dissertation if you have one, such as to an institutional repository or other public archive; links to personal web pages should be considered a last resort) o Dissertation abstract: (plain text, maximum 350 words; you may use \emph{...} for emphasis, but we prefer no other markup or formatting; if your original abstract exceeds the word limit, please submit an abridged version within the limit) Please do not submit a copy of the dissertation itself, as this is not required. JFP reserves the right to decline to publish abstracts that are not deemed appropriate. ============================================================ PHD ABSTRACT EDITOR: Graham Hutton School of Computer Science University of Nottingham Nottingham NG8 1BB United Kingdom ============================================================ This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From florian.engel at student.uni-tuebingen.de Tue Nov 3 21:27:44 2020 From: florian.engel at student.uni-tuebingen.de (Florian Engel) Date: Tue, 03 Nov 2020 21:27:44 +0100 Subject: [Agda] Negative coinductive sized types References: <87d00u7nbi.fsf@student.uni-tuebingen.de> Message-ID: <87h7q6gp8f.fsf@student.uni-tuebingen.de> Hi all, I'm trying to implement the ham function from [1] This is how far I've get so far record Stream (i : Size) (A : Set) : Set where coinductive field hd : A tl : ? {j : Size< i} ? Stream j A open Stream cons : {i : Size} {j : Size< i} {A : Set} ? A -> Stream i A ? Stream j A hd (cons x _) = x tl (cons _ xs) = xs leq : {C : Set} ? ? ? ? ? ? ? C ? C ? C leq zero _ t _ = t leq (suc x) zero _ f = f leq (suc x) (suc y) t f = leq x y t f merge : {i : Size} ? Stream i (? ?) ? Stream i (? ?) ? Stream i (? ?) hd (merge xs ys) = min (hd xs) (hd ys) tl (merge xs ys) = leq (hd xs) (hd ys) (cons (hd ys) (merge (tl xs) (tl ys))) (cons (hd xs) (merge (tl xs) (tl ys))) agda cannot solve the size constraints for merge in the tl case because the output depth of cons is smaller than the input. I don't understand why i can't give cons the type cons : {i : Size} {j : Size< i} {A : Set} ? A -> Stream j A ? Stream i A Shouldn't the minimal depth of the output be larger than the input? Best regards Florian [1] https://www.researchgate.net/publication/220485445_MiniAgda_Integrating_Sized_and_Dependent_Types -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From nad at cse.gu.se Wed Nov 4 10:57:52 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 4 Nov 2020 10:57:52 +0100 Subject: [Agda] Negative coinductive sized types In-Reply-To: <87h7q6gp8f.fsf@student.uni-tuebingen.de> References: <87d00u7nbi.fsf@student.uni-tuebingen.de> <87h7q6gp8f.fsf@student.uni-tuebingen.de> Message-ID: On 2020-11-03 21:27, Florian Engel wrote: > I don't understand why i can't give cons the type > > cons : {i : Size} {j : Size< i} {A : Set} ? A -> Stream j A ? Stream i A The following type works: {i : Size} {A : Set} ? A ? Stream i A ? Stream (? i) A -- /NAD From conal at conal.net Wed Nov 4 17:51:49 2020 From: conal at conal.net (Conal Elliott) Date: Wed, 4 Nov 2020 08:51:49 -0800 Subject: [Agda] Converting intrinsically typed terms In-Reply-To: References: Message-ID: Hi Wojciech. Since you are starting with the STLC, you might find it helpful to factor compilation through cartesian closed categories (CCCs). Then you can use a standard translation for the first part (STLC?CCCs) and define the rest as familiar algebraic operations: identity, sequential composition, projections, parallel composition, etc, all with standard laws they must satisfy (associativity of composition etc). I?ve described such an approach in a paper draft , and there?s a corresponding Agda implementation . Best of luck! - Conal On Mon, Nov 2, 2020 at 2:56 AM rozowski w.k. (wkr1u18) wrote: > Hello everyone! > > I'm relatively new to Agda (recently just went through first two Parts of > PLFA), so I'm sorry if my question is obvious or don't appropriate for this > forum. > I am writing to ask for any advice how to formalise type correct > transformations between intrinsically typed terms. > > Currently, while doing my BSc thesis, I am working on formalizing a paper > about framework for specifying abstract machines, as a series of transforms > between STLC and intermediate languages including combinators (eg. push? to > push on stack, ?? to pop from stack and bind to variable, _?_ to perform > sequencing). Each intermediate language adds a pair of push and lambda > combinators to work with different parts of machine - eg. environments, > continuations. Each of the intermediate languages is a subset of the > following ones. > > The type rules (and way of building terms - because intrinsic typing) for > those combinators, are: > push?_ : ? {? A} > ? ? ? A > ----- > ? ? ? R? A > > ??_ : ? {? A B} > ? ? , A ? B > --------- > ? ? ? A ?? B > > _?_ : ? {? A B} > ? ? ? R? A > ? ? ? A ?? B > --------- > ? ? ? B > > (Rs A is just annotated type for something of type A being stored on > stack) > > I managed to use the PLFA formalism and add typing rules for lambda > calculus extended with pair of combinators for the stack and sequencing > operators. The extended semantics now include: > > ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} > ? L ?? L? > --------------- > ? M ? L ?? M ? L? > > ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} > ? Value V > ? M ?? M? > --------------- > ? M ? V ?? M? ? V > > ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} > ------------------- > ? (push? W) ? (?? N) ?? N [ W ] > > The part I am having trouble with is formalising a transform between terms > from STLC to this intermediate language. One of the transforms introduced > by this paper is: > > Va : ???s > > Va [[x]] = pushs x > Va [[?x.E]] = pushs (?sx.Va [[E]] ) > Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f > > As the STLC is the subset of the first combinator language, I just > defined transform from the language to itself: I defined map between types, > contexts and variables lookup > > Va-type : Type ? Type > Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) > Va-type `? = R? `? > Va-type (R? x) = R? (Va-type x) > Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) > > Va-context : Context ? Context > Va-context ? = ? > Va-context (x , x?) = ( Va-context x , Va-type x? ) > > Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) > Va-var Z = Z > Va-var (S x) = S Va-var x > > And the problematic part is declaring the transform between terms: > > Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) > Va (` x) = ` Va-var x > Va (? x) = push? (?? Va x) > > -- Here is the hole I cannot come up with filling it > Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) > Va `zero = push? `zero > Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for > dealing with sucessors of Nats - currently left like this to pass the > typecheck > > -- Combinators from intermediate language are mapped to itself > Va (push? x) = push? Va x > Va (?? x) = ?? Va x > Va (x ? x?) = Va x ? Va x? > > The only bit, I am not able to formalise is the "app" combinator, as > standard lookup using #_ doesnt work when mapping between terms. > Do you happen to have any advice for me, how to tackle such > transformations? Is there anything I am missing in my way of formalising? > Did any of you worked with type correct transformations of terms in de > Brujin typed terms and have any tips for me? > > I would be most grateful if I could hear back from you! > > Best, > Wojciech > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From florian.engel at student.uni-tuebingen.de Wed Nov 4 19:29:28 2020 From: florian.engel at student.uni-tuebingen.de (Florian Engel) Date: Wed, 04 Nov 2020 19:29:28 +0100 Subject: [Agda] Negative coinductive sized types In-Reply-To: References: <87d00u7nbi.fsf@student.uni-tuebingen.de> <87h7q6gp8f.fsf@student.uni-tuebingen.de> Message-ID: <87ft5pgemd.fsf@student.uni-tuebingen.de> Unfortunately, with this type, agda still can't solve the size constraint in merge. I suppose this is because the destructor tl gives back a stream with some size smaller than its input stream, but it don't know how much smaller. I think if i could define the stream type like the following it should work. codata Stream (A : Set) : Size ? Set where hd : Stream A i ? A tl : Stream A (? i) ? Stream A i Is something like that possible? Nils Anders Danielsson writes: > On 2020-11-03 21:27, Florian Engel wrote: >> I don't understand why i can't give cons the type >> >> cons : {i : Size} {j : Size< i} {A : Set} ? A -> Stream j A ? Stream i A > > The following type works: > > {i : Size} {A : Set} ? A ? Stream i A ? Stream (? i) A -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From effectfully at gmail.com Wed Nov 4 21:37:05 2020 From: effectfully at gmail.com (Roman) Date: Wed, 4 Nov 2020 23:37:05 +0300 Subject: [Agda] A tutorial on inference in Agda Message-ID: Hi folks, I wrote a tutorial on how Agda infers things: https://htmlpreview.github.io/?https://github.com/effectfully/inference-in-agda/blob/master/InferenceInAgda.html It targets the users of Agda and does not cover highly advanced topics like higher-order unification, but otherwise it should be pretty comprehensive. Any comments, suggestions, ideas, criticism etc would be appreciated. Best regards. From icfp.publicity at googlemail.com Thu Nov 5 03:55:43 2020 From: icfp.publicity at googlemail.com (Sam Tobin-Hochstadt) Date: Wed, 04 Nov 2020 21:55:43 -0500 Subject: [Agda] Call for Workshop Proposals: ICFP 2021 Message-ID: <5fa369af7ef3b_5b58f294-482@homer.mail> CALL FOR WORKSHOP AND CO-LOCATED EVENT PROPOSALS ICFP 2021 26th ACM SIGPLAN International Conference on Functional Programming August 22 - 27, 2021 Daejon, Korea https://icfp21.sigplan.org/ The 26th ACM SIGPLAN International Conference on Functional Programming will be held in Daejon, Korea on August 22-27, 2021, with the possibility of a virtual conference. ICFP provides a forum for researchers and developers to hear about the latest work on the design, implementations, principles, and uses of functional programming. Proposals are invited for workshops (and other co-located events, such as symposiums) to be affiliated with ICFP 2021 and sponsored by SIGPLAN. These events should be less formal and more focused than ICFP itself, include sessions that enable interaction among the attendees, and foster the exchange of new ideas. The preference is for one-day events, but other schedules can also be considered. The workshops are scheduled to occur on August 22rd (the day before ICFP) and 26-27th of August (the two days after ICFP). ---------------------------------------------------------------------- Submission details Deadline for submission: November 27, 2020 Notification of acceptance: December 15, 2020 Prospective organizers of workshops or other co-located events are invited to submit a completed workshop proposal form in plain text format to the ICFP 2021 workshop co-chairs (Leonidas Lampropoulos and Zoe Paraskevopoulou) via email to icfp-workshops-2021 at googlegroups.com by November 27, 2020. (For proposals of co-located events other than workshops, please fill in the workshop proposal form and just leave blank any sections that do not apply.) Please note that this is a firm deadline. Organizers will be notified if their event proposal is accepted by December 15, 2020, and if successful, depending on the event, they will be asked to produce a final report after the event has taken place that is suitable for publication in SIGPLAN Notices. The proposal form is available at: http://www.icfpconference.org/icfp2021-files/icfp21-workshops-form.txt Further information about SIGPLAN sponsorship is available at: http://www.sigplan.org/Resources/Proposals/Sponsored/ ---------------------------------------------------------------------- Selection committee The proposals will be evaluated by a committee comprising the following members of the ICFP 2021 organizing committee, together with the members of the SIGPLAN executive committee. Workshop Co-Chair: Zoe Paraskevopoulou (Northeastern University) Workshop Co-Chair: Leonidas Lampropoulos (University of Maryland) General Chair: Sukyoung Ryu (KAIST) Program Chair: Ronald Garcia (University of British Columbia) ---------------------------------------------------------------------- Further information Any queries should be addressed to the workshop co-chairs (Zoe Paraskevopoulou and Leonidas Lampropoulos), via email to icfp-workshops-2021 at googlegroups.com. From W.S.Swierstra at uu.nl Fri Nov 6 08:30:01 2020 From: W.S.Swierstra at uu.nl (Swierstra, W.S. (Wouter)) Date: Fri, 6 Nov 2020 07:30:01 +0000 Subject: [Agda] Converting intrinsically typed terms In-Reply-To: References: Message-ID: Hi Wojciech, Thanks for your message on the Agda mailing list. Which paper are you trying to formalize? That would really help me understand whether or not you're on the right track here. Good luck with your project! Wouter ________________________________________ From: Agda on behalf of rozowski w.k. (wkr1u18) Sent: Monday, 2 November 2020 11:55 To: Agda users Subject: [Agda] Converting intrinsically typed terms Hello everyone! I'm relatively new to Agda (recently just went through first two Parts of PLFA), so I'm sorry if my question is obvious or don't appropriate for this forum. I am writing to ask for any advice how to formalise type correct transformations between intrinsically typed terms. Currently, while doing my BSc thesis, I am working on formalizing a paper about framework for specifying abstract machines, as a series of transforms between STLC and intermediate languages including combinators (eg. push? to push on stack, ?? to pop from stack and bind to variable, _?_ to perform sequencing). Each intermediate language adds a pair of push and lambda combinators to work with different parts of machine - eg. environments, continuations. Each of the intermediate languages is a subset of the following ones. The type rules (and way of building terms - because intrinsic typing) for those combinators, are: push?_ : ? {? A} ? ? ? A ----- ? ? ? R? A ??_ : ? {? A B} ? ? , A ? B --------- ? ? ? A ?? B _?_ : ? {? A B} ? ? ? R? A ? ? ? A ?? B --------- ? ? ? B (Rs A is just annotated type for something of type A being stored on stack) I managed to use the PLFA formalism and add typing rules for lambda calculus extended with pair of combinators for the stack and sequencing operators. The extended semantics now include: ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} ? L ?? L? --------------- ? M ? L ?? M ? L? ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} ? Value V ? M ?? M? --------------- ? M ? V ?? M? ? V ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} ------------------- ? (push? W) ? (?? N) ?? N [ W ] The part I am having trouble with is formalising a transform between terms from STLC to this intermediate language. One of the transforms introduced by this paper is: Va : ???s Va [[x]] = pushs x Va [[?x.E]] = pushs (?sx.Va [[E]] ) Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f As the STLC is the subset of the first combinator language, I just defined transform from the language to itself: I defined map between types, contexts and variables lookup Va-type : Type ? Type Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) Va-type `? = R? `? Va-type (R? x) = R? (Va-type x) Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) Va-context : Context ? Context Va-context ? = ? Va-context (x , x?) = ( Va-context x , Va-type x? ) Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) Va-var Z = Z Va-var (S x) = S Va-var x And the problematic part is declaring the transform between terms: Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) Va (` x) = ` Va-var x Va (? x) = push? (?? Va x) -- Here is the hole I cannot come up with filling it Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) Va `zero = push? `zero Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for dealing with sucessors of Nats - currently left like this to pass the typecheck -- Combinators from intermediate language are mapped to itself Va (push? x) = push? Va x Va (?? x) = ?? Va x Va (x ? x?) = Va x ? Va x? The only bit, I am not able to formalise is the "app" combinator, as standard lookup using #_ doesnt work when mapping between terms. Do you happen to have any advice for me, how to tackle such transformations? Is there anything I am missing in my way of formalising? Did any of you worked with type correct transformations of terms in de Brujin typed terms and have any tips for me? I would be most grateful if I could hear back from you! Best, Wojciech From wkr1u18 at soton.ac.uk Fri Nov 6 11:24:22 2020 From: wkr1u18 at soton.ac.uk (rozowski w.k. (wkr1u18)) Date: Fri, 6 Nov 2020 10:24:22 +0000 Subject: [Agda] Converting intrinsically typed terms In-Reply-To: References: , Message-ID: Hello Everyone! Thank you so much for your reply! 1 ) Conal - Thanks for suggestion! It's nice to hear from you, especially given the fact I loved your paper on backpropagation I found some while a go! 2) Mietek - Thanks a lot! Just joined this channel and would love to discuss the problem I have. I do understand that my mail could have been cumbersome - sorry! 3) Wouter - The paper I am formalising is https://www.cs.tufts.edu/comp/150FP/archive/remi-douence/functional-vms.pdf - Right now I have formalised the first intermediate language and trying to formalise tranform Va (page 9, the paper has proof of it's well-typedness on page 46). Besides intrinsically typed version (my code: https://gist.github.com/wkr1u18/e32b670ce50b4ee248f7c72e80123b29) - I tried extrinsically typed version following the PLFA formalism ( here is what I have so far https://gist.github.com/wkr1u18/97ce47d221fc30b1f40c7e26b69eecd9), so I could separately define the transform on the terms and then prove the welltypedness of the transform. Best, Wojciech ________________________________ From: Swierstra, W.S. (Wouter) Sent: 06 November 2020 07:30 To: rozowski w.k. (wkr1u18) ; agda at lists.chalmers.se Subject: Re: Converting intrinsically typed terms CAUTION: This e-mail originated outside the University of Southampton. Hi Wojciech, Thanks for your message on the Agda mailing list. Which paper are you trying to formalize? That would really help me understand whether or not you're on the right track here. Good luck with your project! Wouter ________________________________________ From: Agda on behalf of rozowski w.k. (wkr1u18) Sent: Monday, 2 November 2020 11:55 To: Agda users Subject: [Agda] Converting intrinsically typed terms Hello everyone! I'm relatively new to Agda (recently just went through first two Parts of PLFA), so I'm sorry if my question is obvious or don't appropriate for this forum. I am writing to ask for any advice how to formalise type correct transformations between intrinsically typed terms. Currently, while doing my BSc thesis, I am working on formalizing a paper about framework for specifying abstract machines, as a series of transforms between STLC and intermediate languages including combinators (eg. push? to push on stack, ?? to pop from stack and bind to variable, _?_ to perform sequencing). Each intermediate language adds a pair of push and lambda combinators to work with different parts of machine - eg. environments, continuations. Each of the intermediate languages is a subset of the following ones. The type rules (and way of building terms - because intrinsic typing) for those combinators, are: push?_ : ? {? A} ? ? ? A ----- ? ? ? R? A ??_ : ? {? A B} ? ? , A ? B --------- ? ? ? A ?? B _?_ : ? {? A B} ? ? ? R? A ? ? ? A ?? B --------- ? ? ? B (Rs A is just annotated type for something of type A being stored on stack) I managed to use the PLFA formalism and add typing rules for lambda calculus extended with pair of combinators for the stack and sequencing operators. The extended semantics now include: ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} ? L ?? L? --------------- ? M ? L ?? M ? L? ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} ? Value V ? M ?? M? --------------- ? M ? V ?? M? ? V ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} ------------------- ? (push? W) ? (?? N) ?? N [ W ] The part I am having trouble with is formalising a transform between terms from STLC to this intermediate language. One of the transforms introduced by this paper is: Va : ???s Va [[x]] = pushs x Va [[?x.E]] = pushs (?sx.Va [[E]] ) Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f As the STLC is the subset of the first combinator language, I just defined transform from the language to itself: I defined map between types, contexts and variables lookup Va-type : Type ? Type Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) Va-type `? = R? `? Va-type (R? x) = R? (Va-type x) Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) Va-context : Context ? Context Va-context ? = ? Va-context (x , x?) = ( Va-context x , Va-type x? ) Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) Va-var Z = Z Va-var (S x) = S Va-var x And the problematic part is declaring the transform between terms: Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) Va (` x) = ` Va-var x Va (? x) = push? (?? Va x) -- Here is the hole I cannot come up with filling it Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) Va `zero = push? `zero Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for dealing with sucessors of Nats - currently left like this to pass the typecheck -- Combinators from intermediate language are mapped to itself Va (push? x) = push? Va x Va (?? x) = ?? Va x Va (x ? x?) = Va x ? Va x? The only bit, I am not able to formalise is the "app" combinator, as standard lookup using #_ doesnt work when mapping between terms. Do you happen to have any advice for me, how to tackle such transformations? Is there anything I am missing in my way of formalising? Did any of you worked with type correct transformations of terms in de Brujin typed terms and have any tips for me? I would be most grateful if I could hear back from you! Best, Wojciech -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Fri Nov 6 12:53:07 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 6 Nov 2020 11:53:07 +0000 Subject: [Agda] Converting intrinsically typed terms In-Reply-To: References: Message-ID: <6D9C8842-47B2-496C-B2E8-B248098EBD46@nottingham.ac.uk> I don?t agree that one should use CCCs because CCCs introduce the misleading identification of contexts and types. It is preferable to use a contextual version of CCCs, basically Categories with Families for simple types. I can provide more details if there is interest. Thorsten From: Agda on behalf of Conal Elliott Date: Wednesday, 4 November 2020 at 16:52 To: "rozowski w.k. (wkr1u18)" Cc: Agda users Subject: Re: [Agda] Converting intrinsically typed terms Hi Wojciech. Since you are starting with the STLC, you might find it helpful to factor compilation through cartesian closed categories (CCCs). Then you can use a standard translation for the first part (STLC?CCCs) and define the rest as familiar algebraic operations: identity, sequential composition, projections, parallel composition, etc, all with standard laws they must satisfy (associativity of composition etc). I?ve described such an approach in a paper draft, and there?s a corresponding Agda implementation. Best of luck! - Conal On Mon, Nov 2, 2020 at 2:56 AM rozowski w.k. (wkr1u18) > wrote: Hello everyone! I'm relatively new to Agda (recently just went through first two Parts of PLFA), so I'm sorry if my question is obvious or don't appropriate for this forum. I am writing to ask for any advice how to formalise type correct transformations between intrinsically typed terms. Currently, while doing my BSc thesis, I am working on formalizing a paper about framework for specifying abstract machines, as a series of transforms between STLC and intermediate languages including combinators (eg. push? to push on stack, ?? to pop from stack and bind to variable, _?_ to perform sequencing). Each intermediate language adds a pair of push and lambda combinators to work with different parts of machine - eg. environments, continuations. Each of the intermediate languages is a subset of the following ones. The type rules (and way of building terms - because intrinsic typing) for those combinators, are: push?_ : ? {? A} ? ? ? A ----- ? ? ? R? A ??_ : ? {? A B} ? ? , A ? B --------- ? ? ? A ?? B _?_ : ? {? A B} ? ? ? R? A ? ? ? A ?? B --------- ? ? ? B (Rs A is just annotated type for something of type A being stored on stack) I managed to use the PLFA formalism and add typing rules for lambda calculus extended with pair of combinators for the stack and sequencing operators. The extended semantics now include: ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} ? L ?? L? --------------- ? M ? L ?? M ? L? ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} ? Value V ? M ?? M? --------------- ? M ? V ?? M? ? V ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} ------------------- ? (push? W) ? (?? N) ?? N [ W ] The part I am having trouble with is formalising a transform between terms from STLC to this intermediate language. One of the transforms introduced by this paper is: Va : ???s Va [[x]] = pushs x Va [[?x.E]] = pushs (?sx.Va [[E]] ) Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f As the STLC is the subset of the first combinator language, I just defined transform from the language to itself: I defined map between types, contexts and variables lookup Va-type : Type ? Type Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) Va-type `? = R? `? Va-type (R? x) = R? (Va-type x) Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) Va-context : Context ? Context Va-context ? = ? Va-context (x , x?) = ( Va-context x , Va-type x? ) Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) Va-var Z = Z Va-var (S x) = S Va-var x And the problematic part is declaring the transform between terms: Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) Va (` x) = ` Va-var x Va (? x) = push? (?? Va x) -- Here is the hole I cannot come up with filling it Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) Va `zero = push? `zero Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for dealing with sucessors of Nats - currently left like this to pass the typecheck -- Combinators from intermediate language are mapped to itself Va (push? x) = push? Va x Va (?? x) = ?? Va x Va (x ? x?) = Va x ? Va x? The only bit, I am not able to formalise is the "app" combinator, as standard lookup using #_ doesnt work when mapping between terms. Do you happen to have any advice for me, how to tackle such transformations? Is there anything I am missing in my way of formalising? Did any of you worked with type correct transformations of terms in de Brujin typed terms and have any tips for me? I would be most grateful if I could hear back from you! Best, Wojciech _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron-stump at uiowa.edu Sat Nov 7 00:24:27 2020 From: aaron-stump at uiowa.edu (Aaron Stump) Date: Fri, 6 Nov 2020 17:24:27 -0600 Subject: [Agda] Converting intrinsically typed terms In-Reply-To: <6D9C8842-47B2-496C-B2E8-B248098EBD46@nottingham.ac.uk> References: <6D9C8842-47B2-496C-B2E8-B248098EBD46@nottingham.ac.uk> Message-ID: On Fri, Nov 6, 2020 at 5:53 AM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > I don?t agree that one should use CCCs because CCCs introduce the > misleading identification of contexts and types. It is preferable to use a > contextual version of CCCs, basically Categories with Families for simple > types. I can provide more details if there is interest. > Yes, please! Aaron > > Thorsten > > > > *From: *Agda on behalf of Conal Elliott < > conal at conal.net> > *Date: *Wednesday, 4 November 2020 at 16:52 > *To: *"rozowski w.k. (wkr1u18)" > *Cc: *Agda users > *Subject: *Re: [Agda] Converting intrinsically typed terms > > > > Hi Wojciech. Since you are starting with the STLC, you might find it > helpful to factor compilation through cartesian closed categories (CCCs). > Then you can use a standard translation for the first part (STLC?CCCs) and > define the rest as familiar algebraic operations: identity, sequential > composition, projections, parallel composition, etc, all with standard laws > they must satisfy (associativity of composition etc). I?ve described such > an approach in a paper draft > , and > there?s a corresponding Agda implementation > . Best of luck! - > Conal > > > > On Mon, Nov 2, 2020 at 2:56 AM rozowski w.k. (wkr1u18) < > wkr1u18 at soton.ac.uk> wrote: > > Hello everyone! > > > > I'm relatively new to Agda (recently just went through first two Parts of > PLFA), so I'm sorry if my question is obvious or don't appropriate for this > forum. > > I am writing to ask for any advice how to formalise type correct > transformations between intrinsically typed terms. > > > > Currently, while doing my BSc thesis, I am working on formalizing a paper > about framework for specifying abstract machines, as a series of transforms > between STLC and intermediate languages including combinators (eg. push? > to push on stack, ?? to pop from stack and bind to variable, _?_ to > perform sequencing). Each intermediate language adds a pair of push and > lambda combinators to work with different parts of machine - eg. > environments, continuations. Each of the intermediate languages is a subset > of the following ones. > > > > The type rules (and way of building terms - because intrinsic typing) for > those combinators, are: > > push?_ : ? {? A} > > ? ? ? A > > ----- > > ? ? ? R? A > > > > ??_ : ? {? A B} > > ? ? , A ? B > > --------- > > ? ? ? A ?? B > > > > _?_ : ? {? A B} > > ? ? ? R? A > > ? ? ? A ?? B > > --------- > > ? ? ? B > > > > (Rs A is just annotated type for something of type A being stored on > stack) > > > > I managed to use the PLFA formalism and add typing rules for lambda > calculus extended with pair of combinators for the stack and sequencing > operators. The extended semantics now include: > > > > ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} > > ? L ?? L? > > --------------- > > ? M ? L ?? M ? L? > > > > ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} > > ? Value V > > ? M ?? M? > > --------------- > > ? M ? V ?? M? ? V > > > > ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} > > ------------------- > > ? (push? W) ? (?? N) ?? N [ W ] > > > > The part I am having trouble with is formalising a transform between terms > from STLC to this intermediate language. One of the transforms introduced > by this paper is: > > > > Va : ???s > > > > Va [[x]] = pushs x > > Va [[?x.E]] = pushs (?sx.Va [[E]] ) > > Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f > > > > As the STLC is the subset of the first combinator language, I just > defined transform from the language to itself: I defined map between types, > contexts and variables lookup > > > > Va-type : Type ? Type > > Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) > > Va-type `? = R? `? > > Va-type (R? x) = R? (Va-type x) > > Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) > > > > Va-context : Context ? Context > > Va-context ? = ? > > Va-context (x , x?) = ( Va-context x , Va-type x? ) > > > > Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) > > Va-var Z = Z > > Va-var (S x) = S Va-var x > > > > And the problematic part is declaring the transform between terms: > > > > Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) > > Va (` x) = ` Va-var x > > Va (? x) = push? (?? Va x) > > > > -- Here is the hole I cannot come up with filling it > > Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) > > Va `zero = push? `zero > > Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for > dealing with sucessors of Nats - currently left like this to pass the > typecheck > > > > -- Combinators from intermediate language are mapped to itself > > Va (push? x) = push? Va x > > Va (?? x) = ?? Va x > > Va (x ? x?) = Va x ? Va x? > > > > The only bit, I am not able to formalise is the "app" combinator, as > standard lookup using #_ doesnt work when mapping between terms. > > Do you happen to have any advice for me, how to tackle such > transformations? Is there anything I am missing in my way of formalising? > Did any of you worked with type correct transformations of terms in de > Brujin typed terms and have any tips for me? > > > > I would be most grateful if I could hear back from you! > > > > Best, > > Wojciech > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From conal at conal.net Sat Nov 7 01:14:36 2020 From: conal at conal.net (Conal Elliott) Date: Fri, 6 Nov 2020 16:14:36 -0800 Subject: [Agda] Converting intrinsically typed terms In-Reply-To: References: <6D9C8842-47B2-496C-B2E8-B248098EBD46@nottingham.ac.uk> Message-ID: I'd love to hear more as well. On Fri, Nov 6, 2020 at 3:24 PM Aaron Stump wrote: > > On Fri, Nov 6, 2020 at 5:53 AM Thorsten Altenkirch < > Thorsten.Altenkirch at nottingham.ac.uk> wrote: > >> I don?t agree that one should use CCCs because CCCs introduce the >> misleading identification of contexts and types. It is preferable to use a >> contextual version of CCCs, basically Categories with Families for simple >> types. I can provide more details if there is interest. >> > > Yes, please! > > Aaron > > > >> >> Thorsten >> >> >> >> *From: *Agda on behalf of Conal Elliott >> >> *Date: *Wednesday, 4 November 2020 at 16:52 >> *To: *"rozowski w.k. (wkr1u18)" >> *Cc: *Agda users >> *Subject: *Re: [Agda] Converting intrinsically typed terms >> >> >> >> Hi Wojciech. Since you are starting with the STLC, you might find it >> helpful to factor compilation through cartesian closed categories (CCCs). >> Then you can use a standard translation for the first part (STLC?CCCs) and >> define the rest as familiar algebraic operations: identity, sequential >> composition, projections, parallel composition, etc, all with standard laws >> they must satisfy (associativity of composition etc). I?ve described such >> an approach in a paper draft >> , and >> there?s a corresponding Agda implementation >> . Best of luck! - >> Conal >> >> >> >> On Mon, Nov 2, 2020 at 2:56 AM rozowski w.k. (wkr1u18) < >> wkr1u18 at soton.ac.uk> wrote: >> >> Hello everyone! >> >> >> >> I'm relatively new to Agda (recently just went through first two Parts of >> PLFA), so I'm sorry if my question is obvious or don't appropriate for this >> forum. >> >> I am writing to ask for any advice how to formalise type correct >> transformations between intrinsically typed terms. >> >> >> >> Currently, while doing my BSc thesis, I am working on formalizing a paper >> about framework for specifying abstract machines, as a series of transforms >> between STLC and intermediate languages including combinators (eg. push? >> to push on stack, ?? to pop from stack and bind to variable, _?_ to >> perform sequencing). Each intermediate language adds a pair of push and >> lambda combinators to work with different parts of machine - eg. >> environments, continuations. Each of the intermediate languages is a subset >> of the following ones. >> >> >> >> The type rules (and way of building terms - because intrinsic typing) for >> those combinators, are: >> >> push?_ : ? {? A} >> >> ? ? ? A >> >> ----- >> >> ? ? ? R? A >> >> >> >> ??_ : ? {? A B} >> >> ? ? , A ? B >> >> --------- >> >> ? ? ? A ?? B >> >> >> >> _?_ : ? {? A B} >> >> ? ? ? R? A >> >> ? ? ? A ?? B >> >> --------- >> >> ? ? ? B >> >> >> >> (Rs A is just annotated type for something of type A being stored on >> stack) >> >> >> >> I managed to use the PLFA formalism and add typing rules for lambda >> calculus extended with pair of combinators for the stack and sequencing >> operators. The extended semantics now include: >> >> >> >> ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} >> >> ? L ?? L? >> >> --------------- >> >> ? M ? L ?? M ? L? >> >> >> >> ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} >> >> ? Value V >> >> ? M ?? M? >> >> --------------- >> >> ? M ? V ?? M? ? V >> >> >> >> ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} >> >> ------------------- >> >> ? (push? W) ? (?? N) ?? N [ W ] >> >> >> >> The part I am having trouble with is formalising a transform between >> terms from STLC to this intermediate language. One of the transforms >> introduced by this paper is: >> >> >> >> Va : ???s >> >> >> >> Va [[x]] = pushs x >> >> Va [[?x.E]] = pushs (?sx.Va [[E]] ) >> >> Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f >> >> >> >> As the STLC is the subset of the first combinator language, I just >> defined transform from the language to itself: I defined map between types, >> contexts and variables lookup >> >> >> >> Va-type : Type ? Type >> >> Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) >> >> Va-type `? = R? `? >> >> Va-type (R? x) = R? (Va-type x) >> >> Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) >> >> >> >> Va-context : Context ? Context >> >> Va-context ? = ? >> >> Va-context (x , x?) = ( Va-context x , Va-type x? ) >> >> >> >> Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) >> >> Va-var Z = Z >> >> Va-var (S x) = S Va-var x >> >> >> >> And the problematic part is declaring the transform between terms: >> >> >> >> Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) >> >> Va (` x) = ` Va-var x >> >> Va (? x) = push? (?? Va x) >> >> >> >> -- Here is the hole I cannot come up with filling it >> >> Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) >> >> Va `zero = push? `zero >> >> Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for >> dealing with sucessors of Nats - currently left like this to pass the >> typecheck >> >> >> >> -- Combinators from intermediate language are mapped to itself >> >> Va (push? x) = push? Va x >> >> Va (?? x) = ?? Va x >> >> Va (x ? x?) = Va x ? Va x? >> >> >> >> The only bit, I am not able to formalise is the "app" combinator, as >> standard lookup using #_ doesnt work when mapping between terms. >> >> Do you happen to have any advice for me, how to tackle such >> transformations? Is there anything I am missing in my way of formalising? >> Did any of you worked with type correct transformations of terms in de >> Brujin typed terms and have any tips for me? >> >> >> >> I would be most grateful if I could hear back from you! >> >> >> >> Best, >> >> Wojciech >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> >> This message and any attachment are intended solely for the addressee >> and may contain confidential information. If you have received this >> message in error, please contact the sender and delete the email and >> attachment. >> >> Any views or opinions expressed by the author of this email do not >> necessarily reflect the views of the University of Nottingham. Email >> communications with the University of Nottingham may be monitored >> where permitted by law. >> >> >> >> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.lawrence.harrison at gmail.com Sat Nov 7 01:20:59 2020 From: william.lawrence.harrison at gmail.com (William Harrison) Date: Fri, 6 Nov 2020 19:20:59 -0500 Subject: [Agda] Converting intrinsically typed terms In-Reply-To: References: Message-ID: <139866E1-EF32-4E2C-8D8E-6E1373CEA1C7@gmail.com> Who am I kidding? I want to hear the details, too. Sent from my iPad > On Nov 6, 2020, at 7:15 PM, Conal Elliott wrote: > > ? > I'd love to hear more as well. > >> On Fri, Nov 6, 2020 at 3:24 PM Aaron Stump wrote: >> >>> On Fri, Nov 6, 2020 at 5:53 AM Thorsten Altenkirch wrote: >>> I don?t agree that one should use CCCs because CCCs introduce the misleading identification of contexts and types. It is preferable to use a contextual version of CCCs, basically Categories with Families for simple types. I can provide more details if there is interest. >>> >> >> Yes, please! >> >> Aaron >> >> >>> >>> Thorsten >>> >>> >>> >>> From: Agda on behalf of Conal Elliott >>> Date: Wednesday, 4 November 2020 at 16:52 >>> To: "rozowski w.k. (wkr1u18)" >>> Cc: Agda users >>> Subject: Re: [Agda] Converting intrinsically typed terms >>> >>> >>> >>> Hi Wojciech. Since you are starting with the STLC, you might find it helpful to factor compilation through cartesian closed categories (CCCs). Then you can use a standard translation for the first part (STLC?CCCs) and define the rest as familiar algebraic operations: identity, sequential composition, projections, parallel composition, etc, all with standard laws they must satisfy (associativity of composition etc). I?ve described such an approach in a paper draft, and there?s a corresponding Agda implementation. Best of luck! - Conal >>> >>> >>> >>> On Mon, Nov 2, 2020 at 2:56 AM rozowski w.k. (wkr1u18) wrote: >>> >>> Hello everyone! >>> >>> >>> >>> I'm relatively new to Agda (recently just went through first two Parts of PLFA), so I'm sorry if my question is obvious or don't appropriate for this forum. >>> >>> I am writing to ask for any advice how to formalise type correct transformations between intrinsically typed terms. >>> >>> >>> >>> Currently, while doing my BSc thesis, I am working on formalizing a paper about framework for specifying abstract machines, as a series of transforms between STLC and intermediate languages including combinators (eg. push? to push on stack, ?? to pop from stack and bind to variable, _?_ to perform sequencing). Each intermediate language adds a pair of push and lambda combinators to work with different parts of machine - eg. environments, continuations. Each of the intermediate languages is a subset of the following ones. >>> >>> >>> >>> The type rules (and way of building terms - because intrinsic typing) for those combinators, are: >>> >>> push?_ : ? {? A} >>> >>> ? ? ? A >>> >>> ----- >>> >>> ? ? ? R? A >>> >>> >>> >>> ??_ : ? {? A B} >>> >>> ? ? , A ? B >>> >>> --------- >>> >>> ? ? ? A ?? B >>> >>> >>> >>> _?_ : ? {? A B} >>> >>> ? ? ? R? A >>> >>> ? ? ? A ?? B >>> >>> --------- >>> >>> ? ? ? B >>> >>> >>> >>> (Rs A is just annotated type for something of type A being stored on stack) >>> >>> >>> >>> I managed to use the PLFA formalism and add typing rules for lambda calculus extended with pair of combinators for the stack and sequencing operators. The extended semantics now include: >>> >>> >>> >>> ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} >>> >>> ? L ?? L? >>> >>> --------------- >>> >>> ? M ? L ?? M ? L? >>> >>> >>> >>> ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} >>> >>> ? Value V >>> >>> ? M ?? M? >>> >>> --------------- >>> >>> ? M ? V ?? M? ? V >>> >>> >>> >>> ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} >>> >>> ------------------- >>> >>> ? (push? W) ? (?? N) ?? N [ W ] >>> >>> >>> >>> The part I am having trouble with is formalising a transform between terms from STLC to this intermediate language. One of the transforms introduced by this paper is: >>> >>> >>> >>> Va : ???s >>> >>> >>> >>> Va [[x]] = pushs x >>> >>> Va [[?x.E]] = pushs (?sx.Va [[E]] ) >>> >>> Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f >>> >>> >>> >>> As the STLC is the subset of the first combinator language, I just defined transform from the language to itself: I defined map between types, contexts and variables lookup >>> >>> >>> >>> Va-type : Type ? Type >>> >>> Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) >>> >>> Va-type `? = R? `? >>> >>> Va-type (R? x) = R? (Va-type x) >>> >>> Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) >>> >>> >>> >>> Va-context : Context ? Context >>> >>> Va-context ? = ? >>> >>> Va-context (x , x?) = ( Va-context x , Va-type x? ) >>> >>> >>> >>> Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) >>> >>> Va-var Z = Z >>> >>> Va-var (S x) = S Va-var x >>> >>> >>> >>> And the problematic part is declaring the transform between terms: >>> >>> >>> >>> Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) >>> >>> Va (` x) = ` Va-var x >>> >>> Va (? x) = push? (?? Va x) >>> >>> >>> >>> -- Here is the hole I cannot come up with filling it >>> >>> Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) >>> >>> Va `zero = push? `zero >>> >>> Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for dealing with sucessors of Nats - currently left like this to pass the typecheck >>> >>> >>> >>> -- Combinators from intermediate language are mapped to itself >>> >>> Va (push? x) = push? Va x >>> >>> Va (?? x) = ?? Va x >>> >>> Va (x ? x?) = Va x ? Va x? >>> >>> >>> >>> The only bit, I am not able to formalise is the "app" combinator, as standard lookup using #_ doesnt work when mapping between terms. >>> >>> Do you happen to have any advice for me, how to tackle such transformations? Is there anything I am missing in my way of formalising? Did any of you worked with type correct transformations of terms in de Brujin typed terms and have any tips for me? >>> >>> >>> >>> I would be most grateful if I could hear back from you! >>> >>> >>> >>> Best, >>> >>> Wojciech >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> This message and any attachment are intended solely for the addressee >>> and may contain confidential information. If you have received this >>> message in error, please contact the sender and delete the email and >>> attachment. >>> >>> Any views or opinions expressed by the author of this email do not >>> necessarily reflect the views of the University of Nottingham. Email >>> communications with the University of Nottingham may be monitored >>> where permitted by law. >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Sat Nov 7 09:26:13 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Sat, 7 Nov 2020 16:26:13 +0800 Subject: [Agda] General notion of equality for syntactically equal objects with different types from the same datatype family? Message-ID: Hi everyone, I'm trying to prove something a lemma that looks something like: ```agda open import Data.Fin open import Data.Nat open import Relation.Binary.PropositionalEquality to?-inject? : ? {n} {i : Fin n} ? to? (inject? i) ? to? i to?-inject? = {!!} ``` Note `inject?` doesn't change the syntactic form of `i`, only it's type. In this simple case it is easy enough to prove inductively, but I've currently got a harder case where `inject?` is more complicated. So I was thinking about using heterogeneous equality and generalising this to something of the form: ``` import Relation.Binary.HeterogeneousEquality as H using (_?_) to?-cong : ? {m n} {i : Fin m} {j : Fin n} ? i ? j ? to? i ? to? j to?-cong H.refl = refl inject?-? : ? {n} (i : Fin n) ? inject? i ? i inject?-? zero = H.refl inject?-? (suc i) = H.cong suc (inject?-? i) ``` The problem is of course that the two cases of `inject?-?` don't type check as the two sides don't have the same type. Examining the first case, we want to assert that `zero : Fin n` and `zero : Fin (suc n)` are equal. In heterogeneous equality, despite working for terms of different types, the constructor `refl` can only be applied when those two types can be proved to be propositionally equal. I suspect I'm going to have to define a custom notion of equality over `Fin`, but I just thought I'd check that there isn't a more general notion of equality out there that I could use that I'm missing? It's probably a silly question, as a purely syntactic notion of equality that entirely ignores the types seems very unlikely to be undefinable. But I thought perhaps the fact that they belonged to the same datatype might give some wriggle room... Cheers, Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Sat Nov 7 14:37:58 2020 From: carette at mcmaster.ca (Carette, Jacques) Date: Sat, 7 Nov 2020 13:37:58 +0000 Subject: [Agda] General notion of equality for syntactically equal objects with different types from the same datatype family? In-Reply-To: References: Message-ID: I?m going to discourage you from going down this road. Here?s an analogy: you are trying to show that the ?bit patterns? that represent values of two different types are the same. While this can be true, and can be a useful truth (for optimizing computations), it isn?t necessarily a good notion of ?equality?. Which you yourself recognize. Whenever I?ve been in the same situation (and it happened a lot in the early days of the work on the Pi reversible language), the eventual resolution usually involved having some type have 2 indices instead of 1, even though the indices were provably equal. And that was indeed the crux: the indices were merely propositionally equal, not definitionally equal. [Permutations, I see you!]. Of course, your setting might be entirely different. In any case, if you persist down this road, I?d encourage you to see it as a ?bit pattern are the same?, i.e. an issue of syntactic representation, rather than being about equality. Jacques From: Agda On Behalf Of Matthew Daggitt Sent: November 7, 2020 3:26 AM To: Agda mailing list Subject: [Agda] General notion of equality for syntactically equal objects with different types from the same datatype family? Hi everyone, I'm trying to prove something a lemma that looks something like: ```agda open import Data.Fin open import Data.Nat open import Relation.Binary.PropositionalEquality to?-inject? : ? {n} {i : Fin n} ? to? (inject? i) ? to? i to?-inject? = {!!} ``` Note `inject?` doesn't change the syntactic form of `i`, only it's type. In this simple case it is easy enough to prove inductively, but I've currently got a harder case where `inject?` is more complicated. So I was thinking about using heterogeneous equality and generalising this to something of the form: ``` import Relation.Binary.HeterogeneousEquality as H using (_?_) to?-cong : ? {m n} {i : Fin m} {j : Fin n} ? i ? j ? to? i ? to? j to?-cong H.refl = refl inject?-? : ? {n} (i : Fin n) ? inject? i ? i inject?-? zero = H.refl inject?-? (suc i) = H.cong suc (inject?-? i) ``` The problem is of course that the two cases of `inject?-?` don't type check as the two sides don't have the same type. Examining the first case, we want to assert that `zero : Fin n` and `zero : Fin (suc n)` are equal. In heterogeneous equality, despite working for terms of different types, the constructor `refl` can only be applied when those two types can be proved to be propositionally equal. I suspect I'm going to have to define a custom notion of equality over `Fin`, but I just thought I'd check that there isn't a more general notion of equality out there that I could use that I'm missing? It's probably a silly question, as a purely syntactic notion of equality that entirely ignores the types seems very unlikely to be undefinable. But I thought perhaps the fact that they belonged to the same datatype might give some wriggle room... Cheers, Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: From puttamalac at gmail.com Sat Nov 7 15:45:41 2020 From: puttamalac at gmail.com (=?UTF-8?B?QW5kcsOhcyBLb3bDoWNz?=) Date: Sat, 7 Nov 2020 15:45:41 +0100 Subject: [Agda] General notion of equality for syntactically equal objects with different types from the same datatype family? In-Reply-To: References: Message-ID: > > Note `inject?` doesn't change the syntactic form of `i`, only it's type. This is not correct. Inject1 changes the implicit Nat indices in Fin constructors. There is no notion of equality which is more "syntactic" than definitional equality. If two terms are not equal by refl, they are not syntactically equal. Matthew Daggitt ezt ?rta (id?pont: 2020. nov. 7., Szo, 9:26): > Hi everyone, > I'm trying to prove something a lemma that looks something like: > ```agda > open import Data.Fin > open import Data.Nat > open import Relation.Binary.PropositionalEquality > > to?-inject? : ? {n} {i : Fin n} ? to? (inject? i) ? to? i > to?-inject? = {!!} > ``` > Note `inject?` doesn't change the syntactic form of `i`, only it's type. > In this simple case it is easy enough to prove inductively, but I've > currently got a harder case where `inject?` is more complicated. So I was > thinking about using heterogeneous equality and generalising this to > something of the form: > ``` > import Relation.Binary.HeterogeneousEquality as H using (_?_) > > to?-cong : ? {m n} {i : Fin m} {j : Fin n} ? i ? j ? to? i ? to? j > to?-cong H.refl = refl > > inject?-? : ? {n} (i : Fin n) ? inject? i ? i > inject?-? zero = H.refl > inject?-? (suc i) = H.cong suc (inject?-? i) > ``` > The problem is of course that the two cases of `inject?-?` don't type > check as the two sides don't have the same type. Examining the first case, > we want to assert that `zero : Fin n` and `zero : Fin (suc n)` are equal. > In heterogeneous equality, despite working for terms of different types, > the constructor `refl` can only be applied when those two types can be > proved to be propositionally equal. > > I suspect I'm going to have to define a custom notion of equality over > `Fin`, but I just thought I'd check that there isn't a more general notion > of equality out there that I could use that I'm missing? It's probably a > silly question, as a purely syntactic notion of equality that entirely > ignores the types seems very unlikely to be undefinable. But I thought > perhaps the fact that they belonged to the same datatype might give some > wriggle room... > Cheers, > Matthew > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesper at sikanda.be Sat Nov 7 18:16:12 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Sat, 7 Nov 2020 18:16:12 +0100 Subject: [Agda] General notion of equality for syntactically equal objects with different types from the same datatype family? In-Reply-To: References: Message-ID: Indeed, expanding the implicit arguments you get `zero {n} : Fin (suc n)` and `zero {suc n} : Fin (suc (suc n))`, which are definitely not syntactically equal. There exist languages that have a notion of "equality up to erasure" such as Cedille (https://github.com/cedille), but Agda does not have such a notion. -- Jesper On Sat, Nov 7, 2020 at 3:46 PM Andr?s Kov?cs wrote: > Note `inject?` doesn't change the syntactic form of `i`, only it's type. > > > This is not correct. Inject1 changes the implicit Nat indices in Fin > constructors. There is no notion of equality which is more "syntactic" than > definitional equality. If two terms are not equal by refl, they are not > syntactically equal. > > Matthew Daggitt ezt ?rta (id?pont: 2020. nov. > 7., Szo, 9:26): > >> Hi everyone, >> I'm trying to prove something a lemma that looks something like: >> ```agda >> open import Data.Fin >> open import Data.Nat >> open import Relation.Binary.PropositionalEquality >> >> to?-inject? : ? {n} {i : Fin n} ? to? (inject? i) ? to? i >> to?-inject? = {!!} >> ``` >> Note `inject?` doesn't change the syntactic form of `i`, only it's type. >> In this simple case it is easy enough to prove inductively, but I've >> currently got a harder case where `inject?` is more complicated. So I was >> thinking about using heterogeneous equality and generalising this to >> something of the form: >> ``` >> import Relation.Binary.HeterogeneousEquality as H using (_?_) >> >> to?-cong : ? {m n} {i : Fin m} {j : Fin n} ? i ? j ? to? i ? to? j >> to?-cong H.refl = refl >> >> inject?-? : ? {n} (i : Fin n) ? inject? i ? i >> inject?-? zero = H.refl >> inject?-? (suc i) = H.cong suc (inject?-? i) >> ``` >> The problem is of course that the two cases of `inject?-?` don't type >> check as the two sides don't have the same type. Examining the first case, >> we want to assert that `zero : Fin n` and `zero : Fin (suc n)` are equal. >> In heterogeneous equality, despite working for terms of different types, >> the constructor `refl` can only be applied when those two types can be >> proved to be propositionally equal. >> >> I suspect I'm going to have to define a custom notion of equality over >> `Fin`, but I just thought I'd check that there isn't a more general notion >> of equality out there that I could use that I'm missing? It's probably a >> silly question, as a purely syntactic notion of equality that entirely >> ignores the types seems very unlikely to be undefinable. But I thought >> perhaps the fact that they belonged to the same datatype might give some >> wriggle room... >> Cheers, >> Matthew >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Mon Nov 9 06:22:08 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Mon, 9 Nov 2020 13:22:08 +0800 Subject: [Agda] General notion of equality for syntactically equal objects with different types from the same datatype family? In-Reply-To: References: Message-ID: Thanks everyone for their replies. In particular, thank you for Andr?s and Jesper for pointing out I was forgetting about the implicit arguments! Cheers, Matthew On Sun, Nov 8, 2020 at 1:16 AM Jesper Cockx wrote: > Indeed, expanding the implicit arguments you get `zero {n} : Fin (suc n)` > and `zero {suc n} : Fin (suc (suc n))`, which are definitely not > syntactically equal. There exist languages that have a notion of "equality > up to erasure" such as Cedille (https://github.com/cedille), but Agda > does not have such a notion. > > -- Jesper > > On Sat, Nov 7, 2020 at 3:46 PM Andr?s Kov?cs wrote: > >> Note `inject?` doesn't change the syntactic form of `i`, only it's type. >> >> >> This is not correct. Inject1 changes the implicit Nat indices in Fin >> constructors. There is no notion of equality which is more "syntactic" than >> definitional equality. If two terms are not equal by refl, they are not >> syntactically equal. >> >> Matthew Daggitt ezt ?rta (id?pont: 2020. nov. >> 7., Szo, 9:26): >> >>> Hi everyone, >>> I'm trying to prove something a lemma that looks something like: >>> ```agda >>> open import Data.Fin >>> open import Data.Nat >>> open import Relation.Binary.PropositionalEquality >>> >>> to?-inject? : ? {n} {i : Fin n} ? to? (inject? i) ? to? i >>> to?-inject? = {!!} >>> ``` >>> Note `inject?` doesn't change the syntactic form of `i`, only it's type. >>> In this simple case it is easy enough to prove inductively, but I've >>> currently got a harder case where `inject?` is more complicated. So I was >>> thinking about using heterogeneous equality and generalising this to >>> something of the form: >>> ``` >>> import Relation.Binary.HeterogeneousEquality as H using (_?_) >>> >>> to?-cong : ? {m n} {i : Fin m} {j : Fin n} ? i ? j ? to? i ? to? j >>> to?-cong H.refl = refl >>> >>> inject?-? : ? {n} (i : Fin n) ? inject? i ? i >>> inject?-? zero = H.refl >>> inject?-? (suc i) = H.cong suc (inject?-? i) >>> ``` >>> The problem is of course that the two cases of `inject?-?` don't type >>> check as the two sides don't have the same type. Examining the first case, >>> we want to assert that `zero : Fin n` and `zero : Fin (suc n)` are equal. >>> In heterogeneous equality, despite working for terms of different types, >>> the constructor `refl` can only be applied when those two types can be >>> proved to be propositionally equal. >>> >>> I suspect I'm going to have to define a custom notion of equality over >>> `Fin`, but I just thought I'd check that there isn't a more general notion >>> of equality out there that I could use that I'm missing? It's probably a >>> silly question, as a purely syntactic notion of equality that entirely >>> ignores the types seems very unlikely to be undefinable. But I thought >>> perhaps the fact that they belonged to the same datatype might give some >>> wriggle room... >>> Cheers, >>> Matthew >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From conal at conal.net Tue Nov 10 05:39:05 2020 From: conal at conal.net (Conal Elliott) Date: Mon, 9 Nov 2020 20:39:05 -0800 Subject: [Agda] Inference difficulties Message-ID: I?ve been encountering inference difficulties working with agda-categories. I?ve whittled down the problem to a simplified example that doesn?t use agda-categories (source also attached as T8.agda): open import Levelopen import Algebra.Bundles using (Magma)open import Relation.Binary using (Rel)open import Function.Equality using (_?_) renaming (id to ?-id)record Cat (o ? : Level) : Set (suc (o ? ?)) where infix 4 _?_ field Obj : Set o _?_ : Rel Obj ? id : ? {A} ? A ? A -- ... elidedM : Cat _ _M = record { Obj = Magma 0? 0? ; _?_ = ? A B ? Magma.setoid A ? Magma.setoid B ; id = ?-id -- ... } open Cat M_ : ? {A : Magma 0? 0?} ? A ? A_ = id The error message (referring to the use of id in the last line): __?__27 : Algebra.Core.Op? (Magma.Carrier A) [ at /Users/conal/Agda/cat-linear/src/T8.agda:24,5-7 ]_?-cong_30 : Algebra.Definitions.Congruent? (? z z? ? (A Magma.? z) z?) __?__27 [ at /Users/conal/Agda/cat-linear/src/T8.agda:24,5-7 ] If I replace Magma by a structure with more operations, such as Ring, I see more such errors, failing to infer each operation and associated property. I?m stumped and would appreciate any insights about causes and cures for this inference failure. ? Conal -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: T8.agda Type: application/octet-stream Size: 850 bytes Desc: not available URL: From Jesper at sikanda.be Tue Nov 10 09:50:08 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 10 Nov 2020 09:50:08 +0100 Subject: [Agda] Inference difficulties In-Reply-To: References: Message-ID: Hi Conal, I believe you're being bitten by the automatic insertion of implicit lambda abstractions. When Agda tries to check an expression at an implicit pi type like ? `{A : Magma 0? 0?} ? A ? A`, it will automatically insert an abstraction `? {A} ? ...` Likewise, when checking `id` it will automatically insert an implicit argument `{_}`. So the expression Agda actually tries to check is not `id` but `? {A} ?id {_}`. But now there's many possible solutions for the `_`, and Agda doesn't know which one to pick! To work around the automatic insertion, you need to pass the `A` explicitly, for example like this: ``` id' : ? {A : Magma 0? 0?} ? A ? A id' {A} = id {A} ``` There were two papers at ICFP this year that propose more intelligent strategies for the insertion of implicits ( https://dl.acm.org/doi/10.1145/3408971 and https://dl.acm.org/doi/10.1145/3408983), but neither of them has been implemented for Agda so far. -- Jesper On Tue, Nov 10, 2020 at 5:40 AM Conal Elliott wrote: > I?ve been encountering inference difficulties working with > agda-categories. I?ve whittled down the problem to a simplified example > that doesn?t use agda-categories (source also attached as T8.agda): > > open import Levelopen import Algebra.Bundles using (Magma)open import Relation.Binary using (Rel)open import Function.Equality using (_?_) renaming (id to ?-id)record Cat (o ? : Level) : Set (suc (o ? ?)) where infix 4 _?_ field Obj : Set o _?_ : Rel Obj ? id : ? {A} ? A ? A -- ... elidedM : Cat _ _M = record { Obj = Magma 0? 0? ; _?_ = ? A B ? Magma.setoid A ? Magma.setoid B ; id = ?-id -- ... } open Cat M_ : ? {A : Magma 0? 0?} ? A ? A_ = id > > The error message (referring to the use of id in the last line): > > __?__27 : Algebra.Core.Op? (Magma.Carrier A) [ at /Users/conal/Agda/cat-linear/src/T8.agda:24,5-7 ]_?-cong_30 : Algebra.Definitions.Congruent? (? z z? ? (A Magma.? z) z?) __?__27 [ at /Users/conal/Agda/cat-linear/src/T8.agda:24,5-7 ] > > If I replace Magma by a structure with more operations, such as Ring, I > see more such errors, failing to infer each operation and associated > property. > > I?m stumped and would appreciate any insights about causes and cures for > this inference failure. > > ? Conal > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From conal at conal.net Tue Nov 10 19:17:16 2020 From: conal at conal.net (Conal Elliott) Date: Tue, 10 Nov 2020 10:17:16 -0800 Subject: [Agda] Inference difficulties In-Reply-To: References: Message-ID: Thanks for the explanation, Jesper! Indeed, all of my failing examples can be made to work if I explicitly insert enough implicit arguments at the right places. On Tue, Nov 10, 2020 at 12:50 AM Jesper Cockx wrote: > Hi Conal, > > I believe you're being bitten by the automatic insertion of implicit > lambda abstractions. When Agda tries to check an expression at an implicit > pi type like ? `{A : Magma 0? 0?} ? A ? A`, it will automatically insert an > abstraction `? {A} ? ...` Likewise, when checking `id` it will > automatically insert an implicit argument `{_}`. So the expression Agda > actually tries to check is not `id` but `? {A} ?id {_}`. But now there's > many possible solutions for the `_`, and Agda doesn't know which one to > pick! > > To work around the automatic insertion, you need to pass the `A` > explicitly, for example like this: > > ``` > id' : ? {A : Magma 0? 0?} ? A ? A > id' {A} = id {A} > ``` > > There were two papers at ICFP this year that propose more intelligent > strategies for the insertion of implicits ( > https://dl.acm.org/doi/10.1145/3408971 and > https://dl.acm.org/doi/10.1145/3408983), but neither of them has been > implemented for Agda so far. > > -- Jesper > > On Tue, Nov 10, 2020 at 5:40 AM Conal Elliott wrote: > >> I?ve been encountering inference difficulties working with >> agda-categories. I?ve whittled down the problem to a simplified example >> that doesn?t use agda-categories (source also attached as T8.agda): >> >> open import Levelopen import Algebra.Bundles using (Magma)open import Relation.Binary using (Rel)open import Function.Equality using (_?_) renaming (id to ?-id)record Cat (o ? : Level) : Set (suc (o ? ?)) where infix 4 _?_ field Obj : Set o _?_ : Rel Obj ? id : ? {A} ? A ? A -- ... elidedM : Cat _ _M = record { Obj = Magma 0? 0? ; _?_ = ? A B ? Magma.setoid A ? Magma.setoid B ; id = ?-id -- ... } open Cat M_ : ? {A : Magma 0? 0?} ? A ? A_ = id >> >> The error message (referring to the use of id in the last line): >> >> __?__27 : Algebra.Core.Op? (Magma.Carrier A) [ at /Users/conal/Agda/cat-linear/src/T8.agda:24,5-7 ]_?-cong_30 : Algebra.Definitions.Congruent? (? z z? ? (A Magma.? z) z?) __?__27 [ at /Users/conal/Agda/cat-linear/src/T8.agda:24,5-7 ] >> >> If I replace Magma by a structure with more operations, such as Ring, I >> see more such errors, failing to infer each operation and associated >> property. >> >> I?m stumped and would appreciate any insights about causes and cures for >> this inference failure. >> >> ? Conal >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at cse.gu.se Wed Nov 11 09:24:59 2020 From: nad at cse.gu.se (Nils Anders Danielsson) Date: Wed, 11 Nov 2020 09:24:59 +0100 Subject: [Agda] Negative coinductive sized types In-Reply-To: <87ft5pgemd.fsf@student.uni-tuebingen.de> References: <87d00u7nbi.fsf@student.uni-tuebingen.de> <87h7q6gp8f.fsf@student.uni-tuebingen.de> <87ft5pgemd.fsf@student.uni-tuebingen.de> Message-ID: On 2020-11-04 19:29, Florian Engel wrote: > Unfortunately, with this type, agda still can't solve the size constraint > in merge. Your code is not self-contained, but I suspect that you can fix your problem by giving cons the following type signature: {i : Size} {A : Set} ? A ? Stream i A ? Stream i A -- /NAD From Graham.Hutton at nottingham.ac.uk Wed Nov 11 16:49:42 2020 From: Graham.Hutton at nottingham.ac.uk (Graham Hutton) Date: Wed, 11 Nov 2020 15:49:42 +0000 Subject: [Agda] Three new Teaching Assistant positions in Nottingham Message-ID: <6EE5E75F-ED15-4993-BB25-AAEAC551BFA0@nottingham.ac.uk> Dear all, As part of a strategic expansion, the School of Computer Science at the University of Nottingham is seeking to make three new permanent appointments at Teaching Assistant level: https://www.nottingham.ac.uk/jobs/currentvacancies/ref/SCI290020 Applicants with expertise in functional programming are strongly encouraged! The deadline for applications is 11th December 2020. Best wishes, Graham ? Professor Graham Hutton School of Computer Science University of Nottingham, UK http://www.cs.nott.ac.uk/~pszgmh This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From Thorsten.Altenkirch at nottingham.ac.uk Fri Nov 13 13:32:00 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Fri, 13 Nov 2020 12:32:00 +0000 Subject: [Agda] Teaching positions at Nottingham Message-ID: <5E2ED16A-7B37-49BF-8CA9-C443C501AC95@nottingham.ac.uk> Hi, We are advertising teaching positions in Nottingham and are very keen to hire people with a functional programming background. A PhD is not required. https://www.nottingham.ac.uk/jobs/currentvacancies/ref/SCI290020 The deadline for applications is 11th December 2020. Cheers, Thorsten This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brunocdsoliveira at googlemail.com Tue Nov 17 06:47:01 2020 From: brunocdsoliveira at googlemail.com (Bruno Oliveira) Date: Tue, 17 Nov 2020 13:47:01 +0800 Subject: [Agda] APLAS 2020 Call for Participation Message-ID: Dear all, CALL FOR PARTICIPATION The 18th Asian Symposium on Programming Languages and Systems (APLAS 2020) Online, November 30th-December 2nd, 2020 (JST) (JST = Japan Standard Time = UTC+09) https://conf.researchr.org/home/aplas-2020 APLAS aims to stimulate programming language research by providing a forum for the presentation of latest results and the exchange of ideas in programming languages and systems. APLAS is based in Asia but is an international forum that serves the worldwide programming languages community. APLAS 2020 will be held online from Mon, November 30th to Wed, December 2nd, 2020. The three-day event includes, three keynote talks, six regular sessions, and one poster session. The registration is now open at: https://conf.researchr.org/attending/aplas-2020/registration The registration deadline is: Tue, November 24th, 2020 (AoE). There is no registration fee; no payment information is required. The registration covers all online activities (in Slack and/or Zoom). Keynote Speakers: * Luca Cardelli (University of Oxford) "Integrated Scientific Modeling and Lab Automation" * Hidehiko Masuhara (Tokyo Institute of Technology) "Object Support for GPU Programming: Why and How" * Nadia Polikarpova (University of California at San Diego) "Generating Programs from Types" For the detailed conference program, see https://conf.researchr.org/program/aplas-2020/program-aplas-2020 Best Regards, Bruno Oliveira -------------- next part -------------- An HTML attachment was scrubbed... URL: From florian.engel at student.uni-tuebingen.de Tue Nov 17 11:52:39 2020 From: florian.engel at student.uni-tuebingen.de (Florian Engel) Date: Tue, 17 Nov 2020 11:52:39 +0100 Subject: [Agda] Negative coinductive sized types In-Reply-To: References: <87d00u7nbi.fsf@student.uni-tuebingen.de> <87h7q6gp8f.fsf@student.uni-tuebingen.de> <87ft5pgemd.fsf@student.uni-tuebingen.de> Message-ID: <874klo5k7c.fsf@student.uni-tuebingen.de> Nils Anders Danielsson writes: > Your code is not self-contained, but I suspect that you can fix your > problem by giving cons the following type signature: > > {i : Size} {A : Set} ? A ? Stream i A ? Stream i A That worked. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 487 bytes Desc: not available URL: From andrei.h.popescu at gmail.com Fri Nov 20 14:19:57 2020 From: andrei.h.popescu at gmail.com (Andrei Popescu) Date: Fri, 20 Nov 2020 13:19:57 +0000 Subject: [Agda] two proof-assistant friendly posts of Lecturer in Cybersecurity at University of Sheffield: deadline 3rd December 2020 Message-ID: Greetings, University of Sheffield has opened two posts of Lecturer in Cybersecurity. Details can be found here: https://www.jobs.ac.uk/job/CCG201/lecturer-in-cybersecurity-two-posts Please note that "formalisation and proof of system security properties" is listed first under "suitable areas". Best wishes, Andrei From mechvel at scico.botik.ru Mon Nov 23 18:02:31 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 23 Nov 2020 20:02:31 +0300 Subject: [Agda] when to set underscore suffix? Message-ID: <08945c9ff8b28664580a724864f48f85@scico.botik.ru> People, Standard library has the ?_ function for negation. Probably, the underscore is set for a better parsing when ? is composed with something (?). But for example, length : List A -> Nat is not suffixed with underscore. What is the difference? When underscore is good in an unary function name? Thanks, ------ Sergei From godzbanebane at gmail.com Mon Nov 23 18:47:32 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Mon, 23 Nov 2020 19:47:32 +0200 Subject: [Agda] when to set underscore suffix? In-Reply-To: <08945c9ff8b28664580a724864f48f85@scico.botik.ru> References: <08945c9ff8b28664580a724864f48f85@scico.botik.ru> Message-ID: Hi, it's useful when you want to often use it with other operators, e.g.: data Bla : Set where bla : Bla _B+_ : Bla -> Bla -> Bla _B+_ _ _ = bla infixr 30 _B+_ data Thing : Set where op_ : Bla -> Thing b : Thing b = op bla B+ bla This doesn't work if op_ is not an operator. ====== Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Mon Nov 23 19:49:34 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Mon, 23 Nov 2020 21:49:34 +0300 Subject: [Agda] when to set underscore suffix? In-Reply-To: References: <08945c9ff8b28664580a724864f48f85@scico.botik.ru> Message-ID: <5f1470288fdc58200aeb250b99d6c815@scico.botik.ru> On 2020-11-23 20:47, Georgi Lyubenov wrote: > Hi, it's useful when you want to often use it with other operators, > e.g.: > > data Bla : Set where > bla : Bla > > _B+_ : Bla -> Bla -> Bla > _B+_ _ _ = bla > > infixr 30 _B+_ > > data Thing : Set where > op_ : Bla -> Thing > > b : Thing > b = op bla B+ bla > > This doesn't work if op_ is not an operator. > What is an operator? A function which name has underscore in it? -- SM From godzbanebane at gmail.com Mon Nov 23 19:51:36 2020 From: godzbanebane at gmail.com (Georgi Lyubenov) Date: Mon, 23 Nov 2020 20:51:36 +0200 Subject: [Agda] when to set underscore suffix? In-Reply-To: <5f1470288fdc58200aeb250b99d6c815@scico.botik.ru> References: <08945c9ff8b28664580a724864f48f85@scico.botik.ru> <5f1470288fdc58200aeb250b99d6c815@scico.botik.ru> Message-ID: That's what I'm referring to, yes. For more examples of usage you can check Part 2 of https://plfa.github.io/ ====== Georgi -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Mon Nov 23 23:05:21 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 24 Nov 2020 01:05:21 +0300 Subject: [Agda] when to set underscore suffix? In-Reply-To: References: <08945c9ff8b28664580a724864f48f85@scico.botik.ru> <5f1470288fdc58200aeb250b99d6c815@scico.botik.ru> Message-ID: <3e0fff0852980112cd21d5474ceba9b7@scico.botik.ru> On 2020-11-23 21:51, Georgi Lyubenov wrote: > That's what I'm referring to, yes. For more examples of usage you can > check Part 2 of https://plfa.github.io/ > I do not find there any explanation on the subject. And I suspect that every unary function is going to be combined with operators. For example, length : List A -> Nat, is combined with _++_, _+_, _?_ and is likely to be combined with _*_, +_. Still it has not underscore. May be underscore for the function name foo is used when the author is eager for more possibility to skip brackets in expressions with foo (?) Regards, ------ Sergei From james.wood.100 at strath.ac.uk Mon Nov 23 23:50:50 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Mon, 23 Nov 2020 22:50:50 +0000 Subject: [Agda] when to set underscore suffix? In-Reply-To: <08945c9ff8b28664580a724864f48f85@scico.botik.ru> References: <08945c9ff8b28664580a724864f48f85@scico.botik.ru> Message-ID: <911aa0f8-5c8a-5dbf-aa18-1ccd037510ef@strath.ac.uk> ?_ can be combined with itself ? see, for example, stdlib's Axiom.DoubleNegationElimination (https://agda.github.io/agda-stdlib/Axiom.DoubleNegationElimination.html), where `? ? P` can be used instead of `? (? P)`. I think you'll find in stdlib that prefix operators tend to have symbolic, rather than alphabetic, names (e.g, ?_, +_, -_). This convention probably traces back to the fact that in most other programming languages, symbols are handled syntactically differently to other names, so the reader is more alert that there might be something special happening, even in Agda. In particular, in Haskell, symbolic names are always infix, while alphanumeric names behave like normal Agda names. The only counterexample to this convention I can think of is begin_, used as part of equational reasoning syntax, which I guess is supposed to look like a keyword with an unusual syntax following. James On 23/11/2020 17:02, mechvel at scico.botik.ru wrote: > People, > > Standard library has the? ?_? function for negation. > Probably, the underscore is set for a better parsing when? ?? is > composed with > something (?). > But for example, > ??????? length : List A -> Nat > > is not suffixed with underscore. > What is the difference? > When underscore is good in an unary function name? > > Thanks, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=04%7C01%7Cjames.wood.100%40strath.ac.uk%7Ccf58932699e849abba9e08d88fd1963f%7C631e0763153347eba5cd0457bee5944e%7C0%7C1%7C637417477901481695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=ZqzykW0JEYA4j8fbSPIUqXisRIL46SGR4xWa7paTExI%3D&reserved=0 > From mechvel at scico.botik.ru Fri Nov 27 20:22:30 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 27 Nov 2020 22:22:30 +0300 Subject: [Agda] forced arguments in EqReasoning Message-ID: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> Dear Agda developers, I am sorry for repeating an issue. It keeps on biting. The reasoning step of the the kind foo + 0 == foo + ((- largeExpression) + largeExpression) is normally coded as +cong? (=sym (-x+x largeExpression)), where "-x+x" is a proof for "forall x -> (- x) + x == 0". This is sufficient for simple types. For example, for Nat, Integer. For more complex types, Agda forces me to write this: begin? fooSetoid ? fT + 0? ?? +?cong? {fT} {0?} {(- largeExpression) + largeExpression} $ =?sym {(- largeExpression) + largeExpression} {0?} $ -f+f largeExpression ? fT + ((- largeExpression) + largeExpression) ... ? It this source code, largeExpression is written 7 times instead of 3. And real proofs often contain 5-10 versions of largeExpression that are forced to be copied this way and pollute the source. This presents a problem: whether it is possible to invent a tool for deriving such implicits (and thus to reduce the applied source proofs volume several times). Regards, ------ Sergei From mechvel at scico.botik.ru Fri Nov 27 21:28:39 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Fri, 27 Nov 2020 23:28:39 +0300 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> Message-ID: <1a99b4fe459ce0dd9635ea73b19f0ea2@scico.botik.ru> On 2020-11-27 22:22, mechvel at scico.botik.ru wrote: > [..] > The reasoning step of the the kind > foo + 0 == foo + ((- largeExpression) + > largeExpression) > is normally coded as > +cong? (=sym (-x+x largeExpression)), > [..] > For more complex types, Agda forces me to write this: > begin? fooSetoid ? > fT + 0? > ?? +?cong? {fT} {0?} {(- largeExpression) + largeExpression} > $ > =?sym {(- largeExpression) + largeExpression} {0?} $ > -f+f largeExpression > ? > fT + ((- largeExpression) + largeExpression) > > ... > ? > > It this source code, largeExpression is written 7 times instead of 3. > [..] As Agda does not allow to skip such large implicits, we could replace them with the denotation {I}, {II}, {III}, {IV} .... The proof remains clear, due to the expressions in the left hand column and due to the function names, such as "+?cong?, =?sym, -f+f". But this needs to write separately an array of the formulae with a certain comment: " -- ignore this garbage ---- I = largeExpression-1 ... IV = largeExpression-4 --------------------------- " -- SM From mechvel at scico.botik.ru Fri Nov 27 22:50:16 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 28 Nov 2020 00:50:16 +0300 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> Message-ID: <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> On 2020-11-27 22:22, mechvel at scico.botik.ru wrote: > [..] > > For more complex types, Agda forces me to write this: > begin? fooSetoid ? > fT + 0? > ?? +?cong? {fT} {0?} {(- largeExpression) + largeExpression} > $ > =?sym {(- largeExpression) + largeExpression} {0?} $ > -f+f largeExpression > ? > fT + ((- largeExpression) + largeExpression) > ... > ? > > It this source code, largeExpression is written 7 times instead of 3. > And real proofs often contain 5-10 versions of largeExpression that > are forced to be copied this way and pollute the source. The most nasty is the "sym" combinator. For example, its step in Reasoining can represented as eq : largeExpr1 *? x =? largeExpression2 eq = =?sym {largeExpression2} {largeExpresssion1} (lemma largeExpr1 x) I am not an expert in this are. But here is a naive consideration. Suppose the type checker rewrites the implementation for eq as eq = =?sym {Y} {Z} eq' where eq' : largeExpression2 =? largeExpr1 *? x eq' = lemma largeExpr1 x, where Y and Z are new variables. What terms to substitute for Y and Z in order for eq to have the needed type? If the type checker is able to solve this, then it would not require these large implicit arguments. ? -- SM From guillaume.allais at ens-lyon.org Sat Nov 28 00:19:13 2020 From: guillaume.allais at ens-lyon.org (guillaume allais) Date: Fri, 27 Nov 2020 23:19:13 +0000 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> Message-ID: <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> Hi Sergei, Is your notion of equivalence by any change defined by recursion on its inputs? That would explain why you're getting really bad inference despite the equational reasoning combinators being designed to make inference as strong as possible. Best, On 27/11/2020 21:50, mechvel at scico.botik.ru wrote: > On 2020-11-27 22:22, mechvel at scico.botik.ru wrote: >> [..] >> >> For more complex types, Agda forces me to write this: >> ? begin? fooSetoid ? >> ??? fT + 0? >> ?????????? ?? +?cong? {fT} {0?} {(- largeExpression) + >> largeExpression} $ >> ??????????????? =?sym {(- largeExpression) + largeExpression} {0?} $ >> ??????????????? -f+f largeExpression >> ??????????? ? >> ??? fT + ((- largeExpression) + largeExpression) >> ??? ... >> ? ? >> >> It this source code,? largeExpression? is written 7 times instead of 3. >> And real proofs often contain 5-10 versions of largeExpression that >> are forced to be copied this way and pollute the source. > > The most nasty is the "sym" combinator. > For example, its step in Reasoining can represented as > > ? eq :? largeExpr1 *? x =? largeExpression2 > ? eq =? =?sym {largeExpression2} {largeExpresssion1} > ???????????????????????????????? (lemma largeExpr1 x) > > I am not an expert in this are. But here is a naive consideration. > Suppose the type checker rewrites the implementation for? eq? as > > ? eq =? =?sym {Y} {Z} eq' > ??????? where > ??????? eq' : largeExpression2 =? largeExpr1 *? x > ??????? eq' = lemma largeExpr1 x, > > where Y and Z are new variables. What terms to substitute for Y and Z > in order for? eq? to have the needed type? > If the type checker is able to solve this, then it would not require > these large implicit arguments. > ? > > -- > SM > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=04%7C01%7Cguillaume.allais%40strath.ac.uk%7C0206289743574a9be04408d8931e736b%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637421106314023035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CUrWBN2ydEe8xllykjX2gSI3m4xkdSfw9xwQzEAVgUA%3D&reserved=0 > From mechvel at scico.botik.ru Sat Nov 28 11:32:52 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 28 Nov 2020 13:32:52 +0300 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> Message-ID: <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> On 2020-11-28 02:19, guillaume allais wrote: > Hi Sergei, > > Is your notion of equivalence by any change defined by recursion on its > inputs? > That would explain why you're getting really bad inference despite the > equational > reasoning combinators being designed to make inference as strong as > possible. > In the last example as below ("begin? fooSetoid ?") it is of polSetoid - of setoid of polynomials. And its equivalence _=?_is the _pointwise equality_ of certain ordered lists of pairs. The first component in a pair belongs to the specified CommutativeRing R, the second is of Nat. The first components are compared by _?_ of R, the second components compared by _?_. The pointwise equality of lists is taken from lib-1.4, I expect it is implemented by a certain recursion on input that you write about. Is it? But earlier I dealt with the same difficulty with the equality reasoning which does not apply recursion: generic arithmetic of fractions over a GCDRing R. The equality =fr on fractions is defined by applying once the equality _?_ on R: (Fr num denom denom?0) =fr (Fr num' denom' denom'?0) = num * denom' ? num' * denom, where _?_ and _*_ re of R. Still there was the same problem with implicits in EqReasoning for _=fr_. I wrote >> eq = =?sym {Y} {Z} eq' >> where >> eq' : largeExpression2 =? largeExpr1 *? x >> eq' = lemma largeExpr1 x, >> >> where Y and Z are new variables. What terms to substitute for Y and Z >> in order for eq to have the needed type? >> If the type checker is able to solve this, then it would not require >> these large implicit arguments. But the left hand column begin? fooSetoid ? fT + 0? fT + ((- largeExpression) + largeExpression) ... already has these terms. They only need to be substituted for X and Y. Why EqReasoning cannot do this? -- SM > > > On 27/11/2020 21:50, mechvel at scico.botik.ru wrote: >> On 2020-11-27 22:22, mechvel at scico.botik.ru wrote: >>> [..] >>> >>> For more complex types, Agda forces me to write this: >>> ? begin? fooSetoid ? >>> ??? fT + 0? >>> ?????????? ?? +?cong? {fT} {0?} {(- largeExpression) + >>> largeExpression} $ >>> ??????????????? =?sym {(- largeExpression) + largeExpression} {0?} $ >>> ??????????????? -f+f largeExpression >>> ??????????? ? >>> ??? fT + ((- largeExpression) + largeExpression) >>> ??? ... >>> ? ? >>> >>> It this source code,? largeExpression? is written 7 times instead of >>> 3. >>> And real proofs often contain 5-10 versions of largeExpression that >>> are forced to be copied this way and pollute the source. >> >> The most nasty is the "sym" combinator. >> For example, its step in Reasoining can represented as >> >> ? eq :? largeExpr1 *? x =? largeExpression2 >> ? eq =? =?sym {largeExpression2} {largeExpresssion1} >> ???????????????????????????????? (lemma largeExpr1 x) >> >> I am not an expert in this are. But here is a naive consideration. >> Suppose the type checker rewrites the implementation for? eq? as >> >> ? eq =? =?sym {Y} {Z} eq' >> ??????? where >> ??????? eq' : largeExpression2 =? largeExpr1 *? x >> ??????? eq' = lemma largeExpr1 x, >> >> where Y and Z are new variables. What terms to substitute for Y and Z >> in order for? eq? to have the needed type? >> If the type checker is able to solve this, then it would not require >> these large implicit arguments. >> ? >> >> -- SM >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=04%7C01%7Cguillaume.allais%40strath.ac.uk%7C0206289743574a9be04408d8931e736b%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637421106314023035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CUrWBN2ydEe8xllykjX2gSI3m4xkdSfw9xwQzEAVgUA%3D&reserved=0 > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From sandro.stucki at gmail.com Sat Nov 28 12:45:20 2020 From: sandro.stucki at gmail.com (Sandro Stucki) Date: Sat, 28 Nov 2020 12:45:20 +0100 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> Message-ID: As Guillaume has already hinted at, the problem isn't with equality reasoning per se, it is, I believe, to do with unification. I have seen this problem whenever an equivalence _?A_ on some type A is defined not as a separate data-type, but via a definition of the form a ?A b = f a ?B f b where _?B_ is an equivalence over some type B and f is a function/expression from B's to A's. Typical examples are where f is a projection or some computation involving B's. The definition of _?A_ could also involve some pattern matching -- it doesn't matter, as long as it's not a data-type definition. This is what Guillaume meant by defining _?A_ via recursion (I think). Your explanation about =fr indicates that this is the case for you. I think what happens is that during unification/type checking, the definition of a ?A b gets expanded and the original terms a and b are "computed away" so the unifier cannot use them any longer to instantiate the hidden/implicit arguments of _?A_ or those of the equational reasoning combinators. Someone with more insight into Agda's unification machinery, please correct me if I am wrong. The workaround is to wrap the direct definition in a data-type or record. That requires some extra constructors/projections to convert between direct proofs of equality and the wrapped ones, but the problem with implicit arguments seems to disappear. Here's an example from the agda-categories library: https://github.com/agda/agda-categories/blob/master/src/Categories/Morphism/IsoEquiv.agda I hope that helps. Cheers /Sandro On Sat, Nov 28, 2020, 11:33 wrote: > On 2020-11-28 02:19, guillaume allais wrote: > > Hi Sergei, > > > > Is your notion of equivalence by any change defined by recursion on its > > inputs? > > That would explain why you're getting really bad inference despite the > > equational > > reasoning combinators being designed to make inference as strong as > > possible. > > > > > In the last example as below ("begin? fooSetoid ?") > it is of polSetoid - of setoid of polynomials. And its equivalence > _=?_is > the _pointwise equality_ of certain ordered lists of pairs. The first > component > in a pair belongs to the specified CommutativeRing R, the second is of > Nat. > The first components are compared by _?_ of R, the second components > compared > by _?_. > The pointwise equality of lists is taken from lib-1.4, I expect it is > implemented > by a certain recursion on input that you write about. > Is it? > > But earlier I dealt with the same difficulty with the equality reasoning > which does > not apply recursion: generic arithmetic of fractions over a GCDRing R. > The equality =fr on fractions is defined by applying once the equality > _?_ > on R: > (Fr num denom denom?0) =fr (Fr num' denom' denom'?0) = > num * denom' ? num' * denom, > where _?_ and _*_ re of R. > Still there was the same problem with implicits in EqReasoning for > _=fr_. > > I wrote > > >> eq = =?sym {Y} {Z} eq' > >> where > >> eq' : largeExpression2 =? largeExpr1 *? x > >> eq' = lemma largeExpr1 x, > >> > >> where Y and Z are new variables. What terms to substitute for Y and Z > >> in order for eq to have the needed type? > >> If the type checker is able to solve this, then it would not require > >> these large implicit arguments. > > But the left hand column > begin? fooSetoid ? > fT + 0? > fT + ((- largeExpression) + largeExpression) > ... > > already has these terms. They only need to be substituted for X and Y. > Why EqReasoning cannot do this? > > -- > SM > > > > > > > > On 27/11/2020 21:50, mechvel at scico.botik.ru wrote: > >> On 2020-11-27 22:22, mechvel at scico.botik.ru wrote: > >>> [..] > >>> > >>> For more complex types, Agda forces me to write this: > >>> begin? fooSetoid ? > >>> fT + 0? > >>> ?? +?cong? {fT} {0?} {(- largeExpression) + > >>> largeExpression} $ > >>> =?sym {(- largeExpression) + largeExpression} {0?} $ > >>> -f+f largeExpression > >>> ? > >>> fT + ((- largeExpression) + largeExpression) > >>> ... > >>> ? > >>> > >>> It this source code, largeExpression is written 7 times instead of > >>> 3. > >>> And real proofs often contain 5-10 versions of largeExpression that > >>> are forced to be copied this way and pollute the source. > >> > >> The most nasty is the "sym" combinator. > >> For example, its step in Reasoining can represented as > >> > >> eq : largeExpr1 *? x =? largeExpression2 > >> eq = =?sym {largeExpression2} {largeExpresssion1} > >> (lemma largeExpr1 x) > >> > >> I am not an expert in this are. But here is a naive consideration. > >> Suppose the type checker rewrites the implementation for eq as > >> > >> eq = =?sym {Y} {Z} eq' > >> where > >> eq' : largeExpression2 =? largeExpr1 *? x > >> eq' = lemma largeExpr1 x, > >> > >> where Y and Z are new variables. What terms to substitute for Y and Z > >> in order for eq to have the needed type? > >> If the type checker is able to solve this, then it would not require > >> these large implicit arguments. > >> ? > >> > >> -- SM > >> _______________________________________________ > >> Agda mailing list > >> Agda at lists.chalmers.se > >> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=04%7C01%7Cguillaume.allais%40strath.ac.uk%7C0206289743574a9be04408d8931e736b%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637421106314023035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CUrWBN2ydEe8xllykjX2gSI3m4xkdSfw9xwQzEAVgUA%3D&reserved=0 > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Sat Nov 28 13:04:52 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 28 Nov 2020 15:04:52 +0300 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> Message-ID: <77be5afefbd71cbd91795629c591f645@scico.botik.ru> On 2020-11-28 02:19, guillaume allais wrote: > Hi Sergei, > > Is your notion of equivalence by any change defined by recursion on its > inputs? > That would explain why you're getting really bad inference despite the > equational > reasoning combinators being designed to make inference as strong as > possible. > In the last example, there is recursion in _=?_. The simplest ready example does not apply recursion for equality. Probably the matter is in a nontrivial equality on records expressed in the record fields. May be you mean a composition of equality definitions? Consider this: module Fraction.I {? ?=} (R : GCDDomain ? ?=) where open GCDDomain R using (_?_; _?_; _?_; ?refl; ?sym; ?trans; ?resp?; ...) renaming (Carrier to C) ... record Fraction : Set (? ? ?=) where constructor fr? field num : C denom : C denom?0 : denom ? 0# coprime : Coprime num denom open Fraction _=fr_ : Rel Fraction ?= f =fr g = (num f * denom g) ? (num g * denom f) ... _*fr_ : Op? Fraction (fr? n? d? d??0 co-n?d?) *fr (fr? n? d? d??0 co-n?d?) = fr? n?'n?' d?'d?' d?'d?'?0 coprime-n?'n?'-d?'d?' where n?' = ... ... -- There is not any recursion here, only several arithmetic operations in R, -- and non-recursive proofs with _?_ in R. *fr-cong : Congruent? _=fr_ _*fr_ *fr-cong {f} {f'} {g} {g'} f=fr=f' g=fr=g' = begin f *fr g ?? *fr?*? f g ? f *? g ?? *?cong {f} {f'} {g} {g'} f=fr=f' g=fr=g' ? f' *? g' ?? =fr-sym {f' *fr g'} {f' *? g'} (*fr?*? f' g') ? f' *fr g' ? where open Fr-Reasoning -- equational reasoning of lib-1.4 for fractionSetoid ------------------------------------------------ Consider this _sym_ (=fr-sym) in the last step. Agda 2.6.1 does not allow to skip any implicit argument in it. But their terms are exactly neighbors in the left hand column. Can EqReasoning observe the left hand columns, compare the terms and substitute them automatically as needed? Further, this proof uses *fr?*? and *?cong. This uses a certain pair of maps Fraction R <--> Prefraction R. The Prefraction record is similar to Fraction, but the _coprime_ condition is skipped. And the proofs for Prefraction arithmetic do not suffer of this problem of forced implicit arguments in EqReasoning. So: there are records over R: Prefraction and Fraction. Arithmetic and equality on Fraction uses the ones of Prefraction, (do you consider this as recursion in equality?). Prefraction does not force writing unneeded implicits in EqReasoning, and Fraction does force such. So, there are equality _=1_ and EqReasoning of record (I) which call for equality _=2_ and EqReasoning of record (II). I do not know, may be, the effect is due to this composition. And with polynomial, the equality on the record of Pol calls for the equality on the record on Mon, the equality on the record on Mon calls for basic _?_ on R and for _?_ on Nat, also here is the pointwise equality on lists. Regards, -- SM From mechvel at scico.botik.ru Sat Nov 28 13:51:30 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 28 Nov 2020 15:51:30 +0300 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> Message-ID: <29e12d636c4823ba0c6f187afcc00a8a@scico.botik.ru> On 2020-11-28 14:45, Sandro Stucki wrote: > As Guillaume has already hinted at, the problem isn't with equality > reasoning per se, it is, I believe, to do with unification. I have > seen this problem whenever an equivalence _?A_ on some type A is > defined not as a separate data-type, but via a definition of the form > > a ?A b = f a ?B f b > > where _?B_ is an equivalence over some type B and f is a > function/expression from B's to A's. Typical examples are where f is a > projection or some computation involving B's. The definition of _?A_ > could also involve some pattern matching -- it doesn't matter, as long > as it's not a data-type definition. This is what Guillaume meant by > defining _?A_ via recursion (I think). Your explanation about =fr > indicates that this is the case for you. So, see my last letter, with record Fraction ... > I think what happens is that during unification/type checking, the > definition of a ?A b gets expanded and the original terms a and b > are "computed away" so the unifier cannot use them any longer to > instantiate the hidden/implicit arguments of _?A_ or those of the > equational reasoning combinators. Someone with more insight into > Agda's unification machinery, please correct me if I am wrong. > > The workaround is to wrap the direct definition in a data-type or > record. That requires some extra constructors/projections to convert > between direct proofs of equality and the wrapped ones, but the > problem with implicit arguments seems to disappear. > In my example with Fraction and Prefraction (in my last letter) everything looks wrapped enough, I do not know what kind of wrapping do you mean. Wrapping it into something more is a complication of the data structure. It is simpler to enumerate the needed implicits as -- not for reading --- I = largeImplcit-1 ... IV = largeImplcit-4 ---------------------- and then use "{I} ... {IV}" in EqReasoning. Only a) this still takes a certain garbage volume, b) the programmer spends effort to trace which i <- {I ... IV} to set to which argument in the combinators. If Agda developers think that there is a real chance to fix this effect with forced implicits, and if they ask, I could try to provide a reduced example. Regards, ------ Sergei > Here's an example from the agda-categories library: > > https://github.com/agda/agda-categories/blob/master/src/Categories/Morphism/IsoEquiv.agda > > I hope that helps. > > Cheers > /Sandro > > On Sat, Nov 28, 2020, 11:33 wrote: > >> On 2020-11-28 02:19, guillaume allais wrote: >>> Hi Sergei, >>> >>> Is your notion of equivalence by any change defined by recursion >> on its >>> inputs? >>> That would explain why you're getting really bad inference despite >> the >>> equational >>> reasoning combinators being designed to make inference as strong >> as >>> possible. >>> >> >> In the last example as below ("begin? fooSetoid ?") >> it is of polSetoid - of setoid of polynomials. And its equivalence >> >> _=?_is >> the _pointwise equality_ of certain ordered lists of pairs. The >> first >> component >> in a pair belongs to the specified CommutativeRing R, the second is >> of >> Nat. >> The first components are compared by _?_ of R, the second >> components >> compared >> by _?_. >> The pointwise equality of lists is taken from lib-1.4, I expect it >> is >> implemented >> by a certain recursion on input that you write about. >> Is it? >> >> But earlier I dealt with the same difficulty with the equality >> reasoning >> which does >> not apply recursion: generic arithmetic of fractions over a GCDRing >> R. >> The equality =fr on fractions is defined by applying once the >> equality >> _?_ >> on R: >> (Fr num denom denom?0) =fr (Fr num' denom' denom'?0) = >> num * denom' ? num' * denom, >> where _?_ and _*_ re of R. >> Still there was the same problem with implicits in EqReasoning for >> _=fr_. >> >> I wrote >> >>>> eq = =?sym {Y} {Z} eq' >>>> where >>>> eq' : largeExpression2 =? largeExpr1 *? x >>>> eq' = lemma largeExpr1 x, >>>> >>>> where Y and Z are new variables. What terms to substitute for Y >> and Z >>>> in order for eq to have the needed type? >>>> If the type checker is able to solve this, then it would not >> require >>>> these large implicit arguments. >> >> But the left hand column >> begin? fooSetoid ? >> fT + 0? >> fT + ((- largeExpression) + largeExpression) >> ... >> >> already has these terms. They only need to be substituted for X and >> Y. >> Why EqReasoning cannot do this? >> >> -- >> SM >> >>> >>> >>> On 27/11/2020 21:50, mechvel at scico.botik.ru wrote: >>>> On 2020-11-27 22:22, mechvel at scico.botik.ru wrote: >>>>> [..] >>>>> >>>>> For more complex types, Agda forces me to write this: >>>>> begin? fooSetoid ? >>>>> fT + 0? >>>>> ?? +?cong? {fT} {0?} {(- largeExpression) + >>>>> largeExpression} $ >>>>> =?sym {(- largeExpression) + largeExpression} >> {0?} $ >>>>> -f+f largeExpression >>>>> ? >>>>> fT + ((- largeExpression) + largeExpression) >>>>> ... >>>>> ? >>>>> >>>>> It this source code, largeExpression is written 7 times >> instead of >>>>> 3. >>>>> And real proofs often contain 5-10 versions of largeExpression >> that >>>>> are forced to be copied this way and pollute the source. >>>> >>>> The most nasty is the "sym" combinator. >>>> For example, its step in Reasoining can represented as >>>> >>>> eq : largeExpr1 *? x =? largeExpression2 >>>> eq = =?sym {largeExpression2} {largeExpresssion1} >>>> (lemma largeExpr1 x) >>>> >>>> I am not an expert in this are. But here is a naive >> consideration. >>>> Suppose the type checker rewrites the implementation for eq as >>>> >>>> eq = =?sym {Y} {Z} eq' >>>> where >>>> eq' : largeExpression2 =? largeExpr1 *? x >>>> eq' = lemma largeExpr1 x, >>>> >>>> where Y and Z are new variables. What terms to substitute for Y >> and Z >>>> in order for eq to have the needed type? >>>> If the type checker is able to solve this, then it would not >> require >>>> these large implicit arguments. >>>> ? >>>> >>>> -- SM >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> >> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=04%7C01%7Cguillaume.allais%40strath.ac.uk%7C0206289743574a9be04408d8931e736b%7C631e0763153347eba5cd0457bee5944e%7C0%7C0%7C637421106314023035%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CUrWBN2ydEe8xllykjX2gSI3m4xkdSfw9xwQzEAVgUA%3D&reserved=0 >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >> _______________________________________________ >> Agda mailing list >> Agda at lists.chalmers.se >> https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From sandro.stucki at gmail.com Sat Nov 28 14:12:17 2020 From: sandro.stucki at gmail.com (Sandro Stucki) Date: Sat, 28 Nov 2020 14:12:17 +0100 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <29e12d636c4823ba0c6f187afcc00a8a@scico.botik.ru> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> <29e12d636c4823ba0c6f187afcc00a8a@scico.botik.ru> Message-ID: > > > > The workaround is to wrap the direct definition in a data-type or > > record. That requires some extra constructors/projections to convert > > between direct proofs of equality and the wrapped ones, but the > > problem with implicit arguments seems to disappear. > > > > In my example with Fraction and Prefraction (in my last letter) > everything looks wrapped enough, I do not know what kind of wrapping > do you mean. > Your definition of _=fr_ is not a data type or record. It's exactly the sort of definition I was referring to, where one relation is defined in terms of another, via computation. _=fr_ : Rel Fraction ?= f =fr g = (num f * denom g) ? (num g * denom f) Have a look at the example I linked to to see what I mean by wrapping: record _?_ (i j : A ? B) : Set e where constructor ?_? open _?_ using (from) field from-? : from i ? from j The record has a single field from-? with the type that corresponds exactly to to the derived notion of equation we want. In your case that field would have type (num f * denom g) ? (num g * denom f) You can then provide a proof of the equality using ? p ? instead of p. The point of the record is for Agda to remember the two parameters f and g, which it 'forgets' when you provide a value of the defined equality type directly. (More details at https://github.com/agda/agda-categories/blob/9e603a3dd00be0b6040f13db38967ecff085e05b/src/Categories/Morphism/IsoEquiv.agda#L55 ) Cheers /Sandro -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Sat Nov 28 14:25:50 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sat, 28 Nov 2020 13:25:50 +0000 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> <29e12d636c4823ba0c6f187afcc00a8a@scico.botik.ru> Message-ID: <7096ea53-d799-7eed-02bc-16b10dfc432b@strath.ac.uk> In particular, the definition of _=fr_ forgets about the denom?0 field from each side, so they cannot be reconstructed by unification. James On 28/11/2020 13:12, Sandro Stucki wrote: > > > The workaround is to wrap the direct definition in a data-type or > > record. That requires some extra constructors/projections to convert > > between direct proofs of equality and the wrapped ones, but the > > problem with implicit arguments seems to disappear. > > > > In my example with Fraction and Prefraction (in my last letter) > everything looks wrapped enough, I do not know what kind of wrapping > do you mean. > > > Your definition of _=fr_ is not a data type or record. It's exactly the > sort of definition I was referring to, where one relation is defined in > terms of another, via computation. > > ? ?_=fr_ :? Rel Fraction ?= > ? ?f =fr g =? (num f * denom g) ? (num g * denom f) > > Have a look at the example I linked to to see what I mean by wrapping: > > record _?_ (i j : A ? B) : Set e where > ? constructor ?_? > ? open _?_ using (from) > ? field from-? : from i ? from j > > The record has a single field from-? with the type that corresponds > exactly to to the derived notion of equation we want. In your case that > field would have type > > ? (num f * denom g) ? (num g * denom f) > > You can then provide a proof of the equality using ? p ? instead of > p.?The?point of the record is for Agda to remember the two parameters f > and g, which it 'forgets' when you provide a value of the defined > equality type directly. > > (More details at > https://github.com/agda/agda-categories/blob/9e603a3dd00be0b6040f13db38967ecff085e05b/src/Categories/Morphism/IsoEquiv.agda#L55 > > ) > > Cheers > /Sandro > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.chalmers.se%2Fmailman%2Flistinfo%2Fagda&data=04%7C01%7Cjames.wood.100%40strath.ac.uk%7C17a6b02f5b6a4c96a52c08d8939f46df%7C631e0763153347eba5cd0457bee5944e%7C0%7C1%7C637421660175430405%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=AS6G7ZZiPz8jb4wUO20GvIp6JrCmKxeqOxUZamrsa9w%3D&reserved=0 > From mechvel at scico.botik.ru Sat Nov 28 17:03:18 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 28 Nov 2020 19:03:18 +0300 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> <29e12d636c4823ba0c6f187afcc00a8a@scico.botik.ru> Message-ID: <5235c6976391f42e02f8c0270a80a8e0@scico.botik.ru> On 2020-11-28 16:12, Sandro Stucki wrote: >> > >>> The workaround is to wrap the direct definition in a data-type or >>> record. That requires some extra constructors/projections to >> convert >>> between direct proofs of equality and the wrapped ones, but the >>> problem with implicit arguments seems to disappear. >>> >> >> In my example with Fraction and Prefraction (in my last letter) >> everything looks wrapped enough, I do not know what kind of wrapping >> do you mean. > > Your definition of _=fr_ is not a data type or record. It's exactly > the sort of definition I was referring to, where one relation is > defined in terms of another, via computation. > > _=fr_ : Rel Fraction ?= > f =fr g = (num f * denom g) ? (num g * denom f) > > Have a look at the example I linked to to see what I mean by wrapping: > > record _?_ (i j : A ? B) : Set e where > constructor ?_? > open _?_ using (from) > field from-? : from i ? from j > > The record has a single field from-? with the type that corresponds > exactly to to the derived notion of equation we want. In your case > that field would have type > > (num f * denom g) ? (num g * denom f) > > You can then provide a proof of the equality using ? p ? instead > of p. The point of the record is for Agda to remember the two > parameters f and g, which it 'forgets' when you provide a value of the > defined equality type directly. > May be you mean that data _=fr'_ : Rel Fraction _ where eqFr : {f g : Fraction} ? (num f) * (denom g) ? (num g) * (denom f) ? f =fr' g will do in my case? Also James Wood writes that the definition of =fr (and thus =fr' too) ignore certain parts of the Fraction record (the two remaining fields), and so the unification will not work in =fr (if so, then probably for =fr' too). ? And still the definition _=fr_ : Rel Fraction _ f =fr g = (num f * denom g) ? (num g * denom f) looks as the most natural. I doubt greatly of whether it worth to twist/complicate it for the purpose to make a certain unification work more widely. -- SM From james.wood.100 at strath.ac.uk Sat Nov 28 17:17:47 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sat, 28 Nov 2020 16:17:47 +0000 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <5235c6976391f42e02f8c0270a80a8e0@scico.botik.ru> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> <29e12d636c4823ba0c6f187afcc00a8a@scico.botik.ru> <5235c6976391f42e02f8c0270a80a8e0@scico.botik.ru> Message-ID: <26f33d5c-35bf-48e1-691c-c8acf27c2f58@strath.ac.uk> On 28/11/2020 16:03, mechvel at scico.botik.ru wrote: > Also James Wood writes that the definition of =fr (and thus =fr' too) > ignore certain > parts of the Fraction record (the two remaining fields), and so the > unification will > not work in? =fr > (if so, then probably for =fr' too). > ? In reply to the parenthetical remark, precisely not. With `record` or `data`, it is fine, because those definitions do not compute automatically. This is the key part of Sandro's _?_ example. I think, in fact, exactly the same thing is happening in that example (fields being missed). > The point of the record is for Agda to remember the two parameters f > and g, which it 'forgets' when you provide a value of the defined > equality type directly. James From mechvel at scico.botik.ru Sat Nov 28 18:54:48 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Sat, 28 Nov 2020 20:54:48 +0300 Subject: [Agda] forced arguments in EqReasoning In-Reply-To: <26f33d5c-35bf-48e1-691c-c8acf27c2f58@strath.ac.uk> References: <708da197dff7e7084c77c69c8914983f@scico.botik.ru> <3b9cb15a8d1d20b8001d464e5273f1cd@scico.botik.ru> <25e0db94-cad1-3dd0-a0e0-990d0fd03621@ens-lyon.org> <345060e4c4180f4914bd72a4e2c6dd39@scico.botik.ru> <29e12d636c4823ba0c6f187afcc00a8a@scico.botik.ru> <5235c6976391f42e02f8c0270a80a8e0@scico.botik.ru> <26f33d5c-35bf-48e1-691c-c8acf27c2f58@strath.ac.uk> Message-ID: <2d8050e38c7376999072a05d909c54de@scico.botik.ru> On 2020-11-28 19:17, James Wood wrote: > On 28/11/2020 16:03, mechvel at scico.botik.ru wrote: >> Also James Wood writes that the definition of =fr (and thus =fr' too) >> ignore certain >> parts of the Fraction record (the two remaining fields), and so the >> unification will >> not work in? =fr >> (if so, then probably for =fr' too). >> ? > In reply to the parenthetical remark, precisely not. With `record` or > `data`, it is fine, because those definitions do not compute > automatically. This is the key part of Sandro's _?_ example. I think, > in fact, exactly the same thing is happening in that example (fields > being missed). > >> The point of the record is for Agda to remember the two parameters f >> and g, which it 'forgets' when you provide a value of the defined >> equality type directly. I have an impression that these implicits in EqReasoning can be solved automatically for any design of _=fr_. Consider *fr-cong : Congruent? _=fr_ _*fr_ *fr-cong {f} {f'} {g} {g'} f=fr=f' g=fr=g' = begin ... f' *? g' ?? =fr-sym {f' *fr g'} {f' *? g'} (*fr?*? f' g') ? f' *fr g' ? where open Fr-Reasoning Let us write this as begin ... f' *? g' ?? =fr-sym {X} {Y} (*fr?*? f' g') ? f' *fr g' ? Let us abstract it further to begin ... I ?? =fr-sym {X} {Y} (*fr?*? f' g') ? II ?, where X and Y are unknown terms. Normalization does not happen at this stage, no computation. The goal of the last step is I =fr II. =fr-sym has type (Symmetric _=fr_). So, the solution X := II = f' *fr g'; Y := I = f' *? g' is always satisfactory. So, in the step of f' *? g' ?? =fr-sym (*fr?*? f' g') ? f' *fr g' the implicits are found automatically. Normalization does not happen at this stage, no computation. After the terms for X and Y are substituted, it (may be) applies normalization (I do not know, I currently do not think of when normalization is applied), and all the type checker work, and this will form a proof for the goal. Suppose I write a program, and see =fr-sym on the top of RHS, and see I and II in the left hand column, and unsolved things are reported for this line. Then I automatically, without thinking, copy the expressions I and II to {II} and {I} to the arguments of =fr-sym in RHS. And this is always satisfactory. Why cannot this be done by the type checker or may be by a library function near EqReasoning ? Or is it for the Reflection tool? At what stage can this be done? Am I missing something? The next question will be: what if =fr-sym is not on the top? For example, f +fr g ?? +fr-cong =fr-refl (=fr-sym g'=g) ? f +fr g' One has to discover that "{g'} {g}" need to be inserted after "=fr-sym". As normalization is not applied at this step, it is evident that these expressions are found in a similar way. ? Regards, -- SM The expressions are From andrei.h.popescu at gmail.com Mon Nov 30 11:00:00 2020 From: andrei.h.popescu at gmail.com (Andrei Popescu) Date: Mon, 30 Nov 2020 10:00:00 +0000 Subject: [Agda] fully funded PhD position at University of Sheffield on the formal verification of industrial robots Message-ID: Dear Agda users, We have a PhD position at University of Sheffield that can lead to high-impact work using a proof assistant. The PhD project is titled "Formal Specification and Verification of the Safe Interaction between Humans and Industrial Robots" and will be supervised by myself (more about me at https://www.andreipopescu.uk/) and some experts in industrial robots from Sheffield's Advanced Manufacturing Research Centre (AMRC, https://www.amrc.co.uk/). The position is for 42 months, is fully funded from EPSRC, and has no teaching obligations attached. The two constraints are that it is restricted to UK and EU students only, and has to start by 8 February 2021. Taking into account the Covid-19 pandemic, there may be the opportunity to start the PhD remotely and arrive in Sheffield at a later time, when it is safe to travel. More details are shown at https://www.findaphd.com/phds/project/formal-specification-and-verification-of-the-safe-interaction-between-humans-and-industrial-robots/?p127388 I am also happy to answer any questions by email (a.popescu at sheffield.ac.uk). Please disseminate to potentially interested people. Best wishes, Andrei From m.escardo at cs.bham.ac.uk Mon Nov 30 20:41:35 2020 From: m.escardo at cs.bham.ac.uk (Martin Escardo) Date: Mon, 30 Nov 2020 19:41:35 +0000 Subject: [Agda] Agda on raspberry pi 4 Message-ID: <40a2f903-a778-66f1-8b21-bda885574dc2@cs.bham.ac.uk> Just for fun. I managed to install Agda in the raspberry pi 4 (with 4gb of ram). $ time cabal install Agda Resolving dependencies... Build profile: -w ghc-8.8.3 -O1 In order, the following will be built (use -v for more details): - Agda-2.6.1.2 (lib:Agda, exe:agda, exe:agda-mode) (requires build) Starting Agda-2.6.1.2 (all, legacy fallback) Building Agda-2.6.1.2 (all, legacy fallback) Installing Agda-2.6.1.2 (all, legacy fallback) Completed Agda-2.6.1.2 (all, legacy fallback) Symlinking 'agda' Symlinking 'agda-mode' real 1944m55.766s (this is 1.35 days) user 381m14.921s (6.35 hours) sys 247m33.846s (4.11 hours) The above is just the Agda phase of the cabal install. The first cabal install did everything but failed in the above step for lack of enough ram and swap (it had 1gb of swap), and it took a couple of days before failing. But it compiled everything else successfully. I added 26gb of swap to be able to succeed as above. Moreover, I booted from an ssd rather than from an sd card. This is running in Ubuntu 20.10, official release for the raspberry pi (64 bit). I didn't succeed with previous versions of ubuntu or with other debian based linux distributions. If anybody wants the .cabal tree to avoid the recompilation, I can provide it. Its size is 1.8gb. I type-checked my repository TypeTopology. It took 29min, and half of the total amount of ram was used (so no swap). For comparison, this takes 10 minutes in a core i3, 5 minutes in a core i5, and 3.5 minutes in a core i7. Martin From amantini.andrea at gmail.com Tue Dec 1 13:35:25 2020 From: amantini.andrea at gmail.com (Andrea Amantini) Date: Tue, 1 Dec 2020 13:35:25 +0100 Subject: [Agda] Agda Interactive Notebooks Message-ID: Dear all, I'd like to share some info on our platform for collaborative interactive polyglot notebooks https://nextjournal.com where we?re working on some experimental Agda support. Some example first: - https://nextjournal.com/plfa/ToC (Programming Language Foundations in Agda; Kokke, Wadler, Siek) - https://nextjournal.com/agda/euclid-theorem (Strickland) - https://nextjournal.com/zampino/russell-paradox (based on an Altenkirch?s lecture) - https://nextjournal.com/zampino/finite-decidable-setoids You can get started by remixing any of the above articles, or our Agda template - https://nextjournal.com/nextjournal/agda-template - https://nextjournal.com/try/nextjournal/agda-template On the teaching side, students at University of Bergen collaborate on shared notes for their PhD seminar on MLTT and Univalence: - https://nextjournal.com/uib-types/journal-part-2 (shared with permission from the authors) This is how our Agda environment is built, it?s also a Notebook :-) which I try to update on a regular basis: - https://nextjournal.com/nextjournal/agda-environment but you could provide your own as long as you install our fork of Agda Jupyter Kernel on top - https://github.com/nextjournal/agda-kernel. We currently support only a subset of Agda Emacs mode given the constraints of Jupyter interaction. So apart from type-checking code, the kernel currently supports Agsy Auto, Give, Split, Refine (via Tab) and Context Inspection (via Shift+Tab). It would be nice to explore richer interactions in the future, possibly via a custom Haskell Socket REPL-ish thing, is there prior work in that direction? Nextjournal runtimes/environments are easily shareable and reusable (both in the same notebook or across different documents) and in the specific case of Agda, exported runtimes are immediately importable as Agda modules (see Euclid's Theorem formalisation above). I'll be very glad to help anyone willing to port existing work to nextjournal for teaching, publication or blogging. So far we?re able to import markdown and jupyter ipynb formats (Strickland's essay above was converted from LaTeX (.lagda) to markdown via Pandoc first). More built-in conversions might come soon. Signup is free and there?s special deals for students/academics should anyone need more computing power than the free plan allows... but that shouldn?t be the most common case with Agda. Looking forward for feedback, have a nice day, Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From lo.zampino at gmail.com Tue Dec 1 19:53:35 2020 From: lo.zampino at gmail.com (Andrea Amantini) Date: Tue, 1 Dec 2020 19:53:35 +0100 Subject: [Agda] Agda Interactive Notebooks Message-ID: Dear all, I'd like to share some facts on our platform for collaborative interactive polyglot notebooks https://nextjournal.com where we?re working on some experimental support for Agda. Some example first: - https://nextjournal.com/plfa/ToC (Programming Language Foundations in Agda; Kokke, Siek, Wadler) - https://nextjournal.com/agda/euclid-theorem (Strickland) - https://nextjournal.com/zampino/russell-paradox (based on an Altenkirch?s lecture) - https://nextjournal.com/zampino/finite-decidable-setoids You can get started by remixing any of the above articles, or our Agda template - https://nextjournal.com/nextjournal/agda-template - https://nextjournal.com/try/nextjournal/agda-template On the teaching side, students at University of Bergen collaborate on shared notes for their PhD seminar on MLTT and Univalence: - https://nextjournal.com/uib-types/journal-part-2 (shared with permission from the authors) This is how our Agda environment is built, it?s also a Notebook :-) which I try to update on a regular basis: - https://nextjournal.com/nextjournal/agda-environment but you could build your own as long as you install our fork of Agda Jupyter Kernel along with Agda dependencies: https://github.com/nextjournal/agda-kernel. We currently support only a subset of Agda Emacs Mode given the constraints of Jupyter interaction: apart from type-checking code, the kernel currently supports Agsy Auto, Give, Split, Refine (via Tab) and Context Inspection (via Shift+Tab). It would be nice to explore richer interactions in the future, possibly via a custom Haskell Socket REPL-ish thing, is there prior work in that direction? Nextjournal runtimes/environments are easily shareable and reusable (both in the same notebook or across different documents) and in the specific case of Agda, exported runtimes are immediately importable as Agda modules (see Euclid's Theorem formalisation above). I'll be very glad to help anyone willing to port existing work to nextjournal for teaching, publication or blogging. So far we?re able to import markdown and jupyter ipynb formats (Strickland's essay above was converted from LaTeX (.lagda) to markdown via Pandoc first). More built-in conversions might come soon. Signup is free and there?s special deals for students/academics should anyone need more computing power than the free plan allows... but that shouldn?t be the most common case with Agda. Looking forward for feedback, have a nice day, Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From harley.eades at gmail.com Tue Dec 1 22:52:44 2020 From: harley.eades at gmail.com (Harley D. Eades III) Date: Tue, 1 Dec 2020 16:52:44 -0500 Subject: [Agda] Converting intrinsically typed terms In-Reply-To: <139866E1-EF32-4E2C-8D8E-6E1373CEA1C7@gmail.com> References: <139866E1-EF32-4E2C-8D8E-6E1373CEA1C7@gmail.com> Message-ID: We are all awaiting these details. :-) Harley On Fri, Nov 6, 2020 at 7:21 PM William Harrison < william.lawrence.harrison at gmail.com> wrote: > Who am I kidding? I want to hear the details, too. > > Sent from my iPad > > On Nov 6, 2020, at 7:15 PM, Conal Elliott wrote: > > ? > I'd love to hear more as well. > > On Fri, Nov 6, 2020 at 3:24 PM Aaron Stump wrote: > >> >> On Fri, Nov 6, 2020 at 5:53 AM Thorsten Altenkirch < >> Thorsten.Altenkirch at nottingham.ac.uk> wrote: >> >>> I don?t agree that one should use CCCs because CCCs introduce the >>> misleading identification of contexts and types. It is preferable to use a >>> contextual version of CCCs, basically Categories with Families for simple >>> types. I can provide more details if there is interest. >>> >> >> Yes, please! >> >> Aaron >> >> >> >>> >>> Thorsten >>> >>> >>> >>> *From: *Agda on behalf of Conal >>> Elliott >>> *Date: *Wednesday, 4 November 2020 at 16:52 >>> *To: *"rozowski w.k. (wkr1u18)" >>> *Cc: *Agda users >>> *Subject: *Re: [Agda] Converting intrinsically typed terms >>> >>> >>> >>> Hi Wojciech. Since you are starting with the STLC, you might find it >>> helpful to factor compilation through cartesian closed categories (CCCs). >>> Then you can use a standard translation for the first part (STLC?CCCs) and >>> define the rest as familiar algebraic operations: identity, sequential >>> composition, projections, parallel composition, etc, all with standard laws >>> they must satisfy (associativity of composition etc). I?ve described such >>> an approach in a paper draft >>> , and >>> there?s a corresponding Agda implementation >>> . Best of luck! - >>> Conal >>> >>> >>> >>> On Mon, Nov 2, 2020 at 2:56 AM rozowski w.k. (wkr1u18) < >>> wkr1u18 at soton.ac.uk> wrote: >>> >>> Hello everyone! >>> >>> >>> >>> I'm relatively new to Agda (recently just went through first two Parts >>> of PLFA), so I'm sorry if my question is obvious or don't appropriate for >>> this forum. >>> >>> I am writing to ask for any advice how to formalise type correct >>> transformations between intrinsically typed terms. >>> >>> >>> >>> Currently, while doing my BSc thesis, I am working on formalizing a >>> paper about framework for specifying abstract machines, as a series of >>> transforms between STLC and intermediate languages including combinators >>> (eg. push? to push on stack, ?? to pop from stack and bind to variable, >>> _?_ to perform sequencing). Each intermediate language adds a pair of >>> push and lambda combinators to work with different parts of machine - eg. >>> environments, continuations. Each of the intermediate languages is a subset >>> of the following ones. >>> >>> >>> >>> The type rules (and way of building terms - because intrinsic typing) >>> for those combinators, are: >>> >>> push?_ : ? {? A} >>> >>> ? ? ? A >>> >>> ----- >>> >>> ? ? ? R? A >>> >>> >>> >>> ??_ : ? {? A B} >>> >>> ? ? , A ? B >>> >>> --------- >>> >>> ? ? ? A ?? B >>> >>> >>> >>> _?_ : ? {? A B} >>> >>> ? ? ? R? A >>> >>> ? ? ? A ?? B >>> >>> --------- >>> >>> ? ? ? B >>> >>> >>> >>> (Rs A is just annotated type for something of type A being stored on >>> stack) >>> >>> >>> >>> I managed to use the PLFA formalism and add typing rules for lambda >>> calculus extended with pair of combinators for the stack and sequencing >>> operators. The extended semantics now include: >>> >>> >>> >>> ?-??? : ? {? A B} {L L? : ? ? A ?? B} {M : ? ? R? A} >>> >>> ? L ?? L? >>> >>> --------------- >>> >>> ? M ? L ?? M ? L? >>> >>> >>> >>> ?-??? : ? {? A B} {V : ? ? A ?? B} {M M? : ? ? R? A} >>> >>> ? Value V >>> >>> ? M ?? M? >>> >>> --------------- >>> >>> ? M ? V ?? M? ? V >>> >>> >>> >>> ?-?? : ? {? A B} {N : ? , A ? B} {W : ? ? A} >>> >>> ------------------- >>> >>> ? (push? W) ? (?? N) ?? N [ W ] >>> >>> >>> >>> The part I am having trouble with is formalising a transform between >>> terms from STLC to this intermediate language. One of the transforms >>> introduced by this paper is: >>> >>> >>> >>> Va : ???s >>> >>> >>> >>> Va [[x]] = pushs x >>> >>> Va [[?x.E]] = pushs (?sx.Va [[E]] ) >>> >>> Va [[E1 E2]] = Va [[E2]] o Va [[E1]] o app with app = ?sf.f >>> >>> >>> >>> As the STLC is the subset of the first combinator language, I just >>> defined transform from the language to itself: I defined map between types, >>> contexts and variables lookup >>> >>> >>> >>> Va-type : Type ? Type >>> >>> Va-type (x ? x?) = R? ( (Va-type x) ?? (Va-type x?) ) >>> >>> Va-type `? = R? `? >>> >>> Va-type (R? x) = R? (Va-type x) >>> >>> Va-type (x ?? x?) = (Va-type x) ?? (Va-type x?) >>> >>> >>> >>> Va-context : Context ? Context >>> >>> Va-context ? = ? >>> >>> Va-context (x , x?) = ( Va-context x , Va-type x? ) >>> >>> >>> >>> Va-var : ? {? A} ? ? ? A ? ((Va-context ?) ? (Va-type A)) >>> >>> Va-var Z = Z >>> >>> Va-var (S x) = S Va-var x >>> >>> >>> >>> And the problematic part is declaring the transform between terms: >>> >>> >>> >>> Va : ? {? A} ? ? ? A ? (Va-context ?) ? (Va-type A) >>> >>> Va (` x) = ` Va-var x >>> >>> Va (? x) = push? (?? Va x) >>> >>> >>> >>> -- Here is the hole I cannot come up with filling it >>> >>> Va {?} (x ? x?) = (push? (Va x?)) ? ((push? (Va x)) ? (?? {!!} )) >>> >>> Va `zero = push? `zero >>> >>> Va (`suc x) = push? (`zero) -- paper doesn't provide any notion for >>> dealing with sucessors of Nats - currently left like this to pass the >>> typecheck >>> >>> >>> >>> -- Combinators from intermediate language are mapped to itself >>> >>> Va (push? x) = push? Va x >>> >>> Va (?? x) = ?? Va x >>> >>> Va (x ? x?) = Va x ? Va x? >>> >>> >>> >>> The only bit, I am not able to formalise is the "app" combinator, as >>> standard lookup using #_ doesnt work when mapping between terms. >>> >>> Do you happen to have any advice for me, how to tackle such >>> transformations? Is there anything I am missing in my way of formalising? >>> Did any of you worked with type correct transformations of terms in de >>> Brujin typed terms and have any tips for me? >>> >>> >>> >>> I would be most grateful if I could hear back from you! >>> >>> >>> >>> Best, >>> >>> Wojciech >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >>> This message and any attachment are intended solely for the addressee >>> and may contain confidential information. If you have received this >>> message in error, please contact the sender and delete the email and >>> attachment. >>> >>> Any views or opinions expressed by the author of this email do not >>> necessarily reflect the views of the University of Nottingham. Email >>> communications with the University of Nottingham may be monitored >>> where permitted by law. >>> >>> >>> >>> >>> _______________________________________________ >>> Agda mailing list >>> Agda at lists.chalmers.se >>> https://lists.chalmers.se/mailman/listinfo/agda >>> >> _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hancock at fastmail.fm Fri Dec 4 14:08:41 2020 From: hancock at fastmail.fm (Peter Hancock) Date: Fri, 4 Dec 2020 13:08:41 +0000 Subject: [Agda] Agda on raspberry pi 4 In-Reply-To: <40a2f903-a778-66f1-8b21-bda885574dc2@cs.bham.ac.uk> References: <40a2f903-a778-66f1-8b21-bda885574dc2@cs.bham.ac.uk> Message-ID: <2979bb04-19e9-4b5c-59db-fe716f408129@fastmail.fm> On 30/11/2020 19:41, Martin Escardo wrote: > Just for fun. > > I managed to install Agda in the raspberry pi 4 (with 4gb of ram). >> $ time cabal install Agda > Resolving dependencies... ... > real 1944m55.766s (this is 1.35 days) ... Mine took: real 757m33.261s (ie. overnight) This was on an 8GB pi 4B, on a slowish SSD. Sampling the swap occasionally, I saw around 6G usage. The biggest hassle was cobbling together a keyboard and screen to set up wifi and ssh. It seems to be possible to the 32-bit RealVNC server on (64 bit) ubuntu 12.10: https://www.youtube.com/watch?v=qxey8eKi9bE&feature=youtu.be This (maybe) lets you use Agda in the normal way with a remote graphical emacs. Peter From conal at conal.net Mon Dec 7 06:42:10 2020 From: conal at conal.net (Conal Elliott) Date: Sun, 6 Dec 2020 21:42:10 -0800 Subject: [Agda] Isomorphisms, equational reasoning, and level changes Message-ID: I?m trying to do ?equational? reasoning on types where the equivalence is a flavor of isomorphism (_?_ from Function.Bundles, specializing Inverse from that module). The types of begin_ in Relation.Binary.PropositionalEquality and sym in IsEquivalence, however, appear to disallow changing type during the chain of reasoning; i.e., for proving A ~ B they require that A and B have the same type. For many equivalence relations, this restriction is fine, but isomorphisms often relate types having different levels, which is the problem I?m encountering. Is there a known workaround? Thanks, - Conal -------------- next part -------------- An HTML attachment was scrubbed... URL: From melkon.or at gmail.com Tue Dec 8 11:56:42 2020 From: melkon.or at gmail.com (Orestis Melkonian) Date: Tue, 8 Dec 2020 12:56:42 +0200 Subject: [Agda] Weird instance propagation between parameterised modules Message-ID: <0d1240a1-0d34-355f-65d1-6f131fd54623@gmail.com> Hi y'all, I came across a rather peculiar issue when simultaneously using instance arguments, parameterised modules and generalized variables. I tried to find a minimal-enough example to demonstrate this, tested on Agda-2.6.1. Let's assume we have an Eq typeclass in a separate file: ```Eq.agda module Eq where open import Agda.Builtin.Bool record Eq (A : Set) : Set where ? field ??? _==_ : A ? A ? Bool open Eq {{...}} public ``` Then a module parameterised over some type A having (decidable) equality: ```M1.agda open import Eq module M1 (A : Set) {{_ : Eq A}} where postulate ? B : Set variable ? n : B postulate ? P : B ? Set postulate ? p? : P n ``` All fine so far, but what if I want to split that file, e.g. to work on p? there: ```M2.agda open import Eq module M2 (A : Set) {{_ : Eq A}} where open import M1 A postulate p? : P n ``` But now there is an error: ``` No instance of type Eq A was found in scope. when checking that n is a valid argument to a function of type ? _ = x : Eq A ? ? M1.B A ? Set ``` Amusingly, this is solved if we pass `it` as the instance argument! ```M2.agda open import Eq module M2 (A : Set) {{_ : Eq A}} where open import M1 A {{it}} postulate p? : P n ``` I am wondering if I am missing something, or this is actually a bug.. Moreover, shouldn't all occurrences of `{{it}}` be meaningless? Cheers, --OM From ulf.norell at gmail.com Tue Dec 8 12:12:24 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 8 Dec 2020 12:12:24 +0100 Subject: [Agda] Weird instance propagation between parameterised modules In-Reply-To: <0d1240a1-0d34-355f-65d1-6f131fd54623@gmail.com> References: <0d1240a1-0d34-355f-65d1-6f131fd54623@gmail.com> Message-ID: This looks like a bug. Can you file an issue? / Ulf On Tue, Dec 8, 2020 at 11:56 AM Orestis Melkonian wrote: > Hi y'all, > > I came across a rather peculiar issue when simultaneously using instance > arguments, parameterised modules and generalized variables. I tried to > find a minimal-enough example to demonstrate this, tested on Agda-2.6.1. > > Let's assume we have an Eq typeclass in a separate file: > ```Eq.agda > module Eq where > > open import Agda.Builtin.Bool > > record Eq (A : Set) : Set where > field > _==_ : A ? A ? Bool > open Eq {{...}} public > ``` > > Then a module parameterised over some type A having (decidable) equality: > > ```M1.agda > open import Eq > > module M1 (A : Set) {{_ : Eq A}} where > > postulate > B : Set > variable > n : B > postulate > P : B ? Set > > postulate > p? : P n > ``` > > All fine so far, but what if I want to split that file, e.g. to work on > p? there: > ```M2.agda > open import Eq > > module M2 (A : Set) {{_ : Eq A}} where > > open import M1 A > > postulate p? : P n > ``` > But now there is an error: > ``` > No instance of type Eq A was found in scope. > when checking that n is a valid argument to a function of type > ? _ = x : Eq A ? ? M1.B A ? Set > ``` > > Amusingly, this is solved if we pass `it` as the instance argument! > ```M2.agda > open import Eq > module M2 (A : Set) {{_ : Eq A}} where > > open import M1 A {{it}} > > postulate p? : P n > ``` > > I am wondering if I am missing something, or this is actually a bug.. > Moreover, shouldn't all occurrences of `{{it}}` be meaningless? > > Cheers, > --OM > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From melkon.or at gmail.com Tue Dec 8 12:16:14 2020 From: melkon.or at gmail.com (Orestis Melkonian) Date: Tue, 8 Dec 2020 13:16:14 +0200 Subject: [Agda] Weird instance propagation between parameterised modules In-Reply-To: References: <0d1240a1-0d34-355f-65d1-6f131fd54623@gmail.com> Message-ID: <28a5b104-da22-5ca6-945a-9660098efcea@gmail.com> Done: https://github.com/agda/agda/issues/5093 --OM On 12/8/20 1:12 PM, Ulf Norell wrote: > This looks like a bug. Can you file an issue? > > / Ulf > > On Tue, Dec 8, 2020 at 11:56 AM Orestis Melkonian > wrote: > > Hi y'all, > > I came across a rather peculiar issue when simultaneously using > instance > arguments, parameterised modules and generalized variables. I > tried to > find a minimal-enough example to demonstrate this, tested on > Agda-2.6.1. > > Let's assume we have an Eq typeclass in a separate file: > ```Eq.agda > module Eq where > > open import Agda.Builtin.Bool > > record Eq (A : Set) : Set where > ?? field > ???? _==_ : A ? A ? Bool > open Eq {{...}} public > ``` > > Then a module parameterised over some type A having (decidable) > equality: > > ```M1.agda > open import Eq > > module M1 (A : Set) {{_ : Eq A}} where > > postulate > ?? B : Set > variable > ?? n : B > postulate > ?? P : B ? Set > > postulate > ?? p? : P n > ``` > > All fine so far, but what if I want to split that file, e.g. to > work on > p? there: > ```M2.agda > open import Eq > > module M2 (A : Set) {{_ : Eq A}} where > > open import M1 A > > postulate p? : P n > ``` > But now there is an error: > ``` > No instance of type Eq A was found in scope. > when checking that n is a valid argument to a function of type > ? _ = x : Eq A ? ? M1.B A ? Set > ``` > > Amusingly, this is solved if we pass `it` as the instance argument! > ```M2.agda > open import Eq > module M2 (A : Set) {{_ : Eq A}} where > > open import M1 A {{it}} > > postulate p? : P n > ``` > > I am wondering if I am missing something, or this is actually a bug.. > Moreover, shouldn't all occurrences of `{{it}}` be meaningless? > > Cheers, > --OM > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthewdaggitt at gmail.com Tue Dec 8 12:24:59 2020 From: matthewdaggitt at gmail.com (Matthew Daggitt) Date: Tue, 8 Dec 2020 19:24:59 +0800 Subject: [Agda] Isomorphisms, equational reasoning, and level changes In-Reply-To: References: Message-ID: Hi Conal, I think the existing specialised reasoning combinators in Function.Related for the old function hierarchy infrastructure do what you want. See Data.List.Relation.Unary.Any.Properties for an example of how these can be used. Unfortunately this has not yet been ported across to the new function hierarchy... I haven't thought deeply about how the standard reasoning combinators could be made to work with this level of generality. Let me know if you come up with something! Cheers, Matthew On Mon, Dec 7, 2020 at 1:42 PM Conal Elliott wrote: > I?m trying to do ?equational? reasoning on types where the equivalence is > a flavor of isomorphism (_?_ from Function.Bundles, specializing Inverse from > that module). The types of begin_ in Relation.Binary.PropositionalEquality > and sym in IsEquivalence, however, appear to disallow changing type > during the chain of reasoning; i.e., for proving A ~ B they require that A > and B have the same type. For many equivalence relations, this > restriction is fine, but isomorphisms often relate types having different > levels, which is the problem I?m encountering. Is there a known workaround? > > Thanks, - Conal > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From P.Achten at cs.ru.nl Tue Dec 8 16:52:10 2020 From: P.Achten at cs.ru.nl (Peter Achten) Date: Tue, 8 Dec 2020 16:52:10 +0100 Subject: [Agda] [TFP'21] second call for papers: Trends in Functional Programming 2021, 18-19 February (online event with Lambda Days 2021 & TFPIE 2021) Message-ID: <2d701a6d-7894-1305-2358-0de57d6384a5@cs.ru.nl> ------------------------------------------------------------------------- ???????????????????? Second call for papers ??????? 22nd Symposium on Trends in Functional Programming ????????????????????????? tfp2021.org ------------------------------------------------------------------------- Did you miss the deadline to submit a paper to Trends in Functional Programming http://tfp2021.org/? No worries -- it's not too late! Submission is open until January 15th 2021, for a presentation slot at the event and post-symposium reviewing. The symposium on Trends in Functional Programming (TFP) is an international forum for researchers with interests in all aspects of functional programming, taking a broad view of current and future trends in the area. It aspires to be a lively environment for presenting the latest research results, and other contributions. * TFP offers a supportive reviewing process designed to help less experienced ? authors succeed, with two rounds of review, both before and after the ? symposium itself. Authors have an opportunity to address reviewers' concerns ? before final decisions on publication in the proceedings. * TFP offers two "best paper" awards, the John McCarthy award for best paper, ? and the David Turner award for best student paper. * TFP is co-located with Lambda Days in beautiful Krakow. Lambda Days is a vibrant ? developer conference with hundreds of attendees and a lively programme of talks on ? functional programming in practice. Due to the covid pandemic, the event is online ? with a lot of attention to interaction and getting to socialize with the community. Important Dates --------------- Submission deadline for pre-symposium review:?? 20th November, 2020? -- passed -- Submission deadline for draft papers:?????????? 15th January, 2021 Symposium dates:??????????????????????????????? 18-19th February, 2021 Visit http://tfp2021.org/ for more information. From laniel at seas.upenn.edu Tue Dec 15 02:40:29 2020 From: laniel at seas.upenn.edu (Daniel Lee) Date: Mon, 14 Dec 2020 17:40:29 -0800 Subject: [Agda] Tips for working around proof relevance Message-ID: Hi everyone, I'm an undergraduate in CS, trying to use this winter break to learn category theory via Categories in Context (and hopefully topology and HoTT). I thought it would be cool to formalize in Agda at the same time. Here's the link to the Agda development for reference: https://github.com/dan-iel-lee/categories-in-agda . Relevant files are probably "Core" and "Examples/Comma". I've run into a roadblock, specifically with proving that the comma category is a category, but which I imagine could be an issue in the future as well. I've defined the arrows in the category as: ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f Where h and k are the component arrows, and the body of the Sigma is the commutativity condition. Defining composition and identity are relatively straightforward, but proving the left/right unit and associativity properties become difficult because it requires proving that the identities are identified. And because there are a lot of steps, compositions,... involved, the Goal is super hard to read and I don't know where to start in trying to prove it. I managed to work around it by enforcing that all the hom-sets are sets (in the sense that their identification types are all identical). Is there a nice way to prove this without using proof irrelevance though? All help is very very appreciated. Thanks :))) Best, Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Tue Dec 15 03:16:28 2020 From: carette at mcmaster.ca (Carette, Jacques) Date: Tue, 15 Dec 2020 02:16:28 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: Message-ID: Categories defined using propositional equality are very hard to work with. I?m not surprised things went sideways. Here?s a full construction of the Comma Category in Agda https://agda.github.io/agda-categories/Categories.Category.Construction.Comma.html In Setoid-Enriched categories, we get to define what equivalent arrows are. In particular, the proofs are not part of the definition, and that makes life much simpler. Recommendation: if you?re going to insist on using propositional equality, do yourself a favour, and use ?with-K. That will already help. Eventually, you?ll likely have to assume function extensionality as well. Jacques From: Agda On Behalf Of Daniel Lee Sent: December 14, 2020 8:40 PM To: agda at lists.chalmers.se Subject: [Agda] Tips for working around proof relevance Hi everyone, I'm an undergraduate in CS, trying to use this winter break to learn category theory via Categories in Context (and hopefully topology and HoTT). I thought it would be cool to formalize in Agda at the same time. Here's the link to the Agda development for reference: https://github.com/dan-iel-lee/categories-in-agda . Relevant files are probably "Core" and "Examples/Comma". I've run into a roadblock, specifically with proving that the comma category is a category, but which I imagine could be an issue in the future as well. I've defined the arrows in the category as: ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f Where h and k are the component arrows, and the body of the Sigma is the commutativity condition. Defining composition and identity are relatively straightforward, but proving the left/right unit and associativity properties become difficult because it requires proving that the identities are identified. And because there are a lot of steps, compositions,... involved, the Goal is super hard to read and I don't know where to start in trying to prove it. I managed to work around it by enforcing that all the hom-sets are sets (in the sense that their identification types are all identical). Is there a nice way to prove this without using proof irrelevance though? All help is very very appreciated. Thanks :))) Best, Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolai.kraus at gmail.com Tue Dec 15 04:22:14 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Tue, 15 Dec 2020 03:22:14 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: Message-ID: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> Hi Daniel, nice Agda project! But using the winter break to learn category theory, topology, HoTT, AND to formalise things in Agda sounds pretty ambitious to me ;-) The short answer to your question is "no". There's no nice way to do this without the assumption that hom-sets are sets (or another assumption). Actually, there is just no way at all, not even an ugly one. It's not just involved and tedious and hard to read, it's not provable. The comma category construction does not work for the notion of categories that you use. To see why, look at your Agda code: When you define the objects of the comma category, you need to use objects + morphisms of the original categories. When you define the morphisms of the comma category, you? need to use morphisms + composition of the original categories. When you define composition in the comma category, you need composition + associativity of the original categories. Do you see where this is going? You always need "one level more" of the original categories than you currently define in the comma category. Thus, when you want to prove associativity for the comma category, you should expect that you need more than only associativity of the original categories: you also need the first coherence condition for associativity, known as "MacLane's pentagon". MacLane's pentagon doesn't show up explicitly for standard categories (where it is automatic), but it shows up when you study e.g. bicategories. Something similar happens for the identity laws. The notion of categories that you currently consider is badly behaved. We call them "wild categories" (or "naive" or "incoherent" or "approximate"). They are higher-dimensional categories, but with almost all coherence structure removed. To understand why this is bad, think about categories where you don't require composition to be associative: you can probably imagine that all sorts of constructions from standard category theory will break. Your approach to require hom-sets to be sets is the standard approach. It ensures that the categories behave like standard 1-categories. It implies MacLane's pentagon coherence and all other coherences. Thus, it's a really strong assumption, but it's the right assumption if you want to do 1-category theory in this style. This is also how it's done in the HoTT book. I think this is equivalent to Jacques' approach with setoids, but I haven't checked this in detail. ("Equivalent" in the sense that the two approaches should make the same constructions possible, not equivalent in terms of how tedious things can become.) "--with-K" would, of course, imply that hom-sets are sets. But it also would mean that the type of objects (and everything else) is a set. This is quite restrictive. For example, your development wouldn't capture univalent categories. I don't know whether the added convenience would make up for the loss of generality. The issue that you found here is a pretty deep one. This issue, together with things that are very much related, causes the problem and motivates the constructions in this paper: https://arxiv.org/abs/2009.01883 See also Section 3.2, "Deficiency of Wild/Incoherent Structure", for a discussion. Especially Example 9, which uses a slice category (special case of the comma category, where one can already see the issues). Best, Nicolai On 15/12/2020 01:40, Daniel Lee wrote: > Hi everyone, > > I'm an undergraduate in CS, trying to use this winter break to learn > category theory via Categories in Context (and hopefully topology and > HoTT). I thought it would be cool to formalize in Agda at the same time. > > Here's the link to the Agda development for reference: > https://github.com/dan-iel-lee/categories-in-agda . Relevant files are > probably "Core" and "Examples/Comma". > > > I've run into a roadblock, specifically with proving that the comma > category is a category, but which I imagine could be an issue in the > future as well. > > I've defined the arrows in the category as: > ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f > > Where h and k are the component arrows, and the body of the Sigma is > the commutativity condition. Defining composition and identity are > relatively straightforward, but proving the left/right unit and > associativity properties become difficult because?it requires proving > that the identities are identified. And because there are a lot of > steps, compositions,... involved, the Goal is super hard to read and I > don't know where to start in trying to prove it. I managed to work > around it by enforcing that all the hom-sets are sets (in the sense > that their identification types are all identical). Is there a nice > way to prove this without using proof irrelevance though? > > All help is very very appreciated. Thanks :))) > > Best, > Daniel > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From laniel at seas.upenn.edu Tue Dec 15 07:49:42 2020 From: laniel at seas.upenn.edu (Daniel Lee) Date: Mon, 14 Dec 2020 22:49:42 -0800 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> Message-ID: Hi Nicolai, Jacques, Thanks for the pointers! I have indeed already had to assume function extensionality. So just to make sure I understand correctly, the reason that associativity is impossible to prove in the "wild categories" setting is that you not only need associativity in the original category, but also a sort of "second level" notion of associativity in the composition of the commutative diagrams? And the reason it goes through when you assume that hom-sets are sets is that any two commutative diagrams, as long as their components are the same, are now assumed to be identical. Is that right? Then, is it possible to add this higher-dimensional coherence rather than removing higher-dimensional structure completely? I think I'll try out the setoid approach Jacques suggested, it does seem like it could make things easier. Are there any major downsides to this approach which would be useful to know. I've heard of talk of "setoid hell" before where you build up a ton of extra proof obligations. Should I be worried about that in this case? Lastly, how would you recommend defining hom/represented functors? Currently, I've used a universe category parametrized by some level 'c' whose objects are 'Set c'. Will I run into similar issues with "wildness" if I don't enforce that the objects in the category are sets? Thanks again for the help. Best, Daniel On Mon, Dec 14, 2020 at 7:22 PM Nicolai Kraus wrote: > Hi Daniel, > > nice Agda project! But using the winter break to learn category theory, > topology, HoTT, AND to formalise things in Agda sounds pretty ambitious to > me ;-) > > The short answer to your question is "no". There's no nice way to do this > without the assumption that hom-sets are sets (or another assumption). > Actually, there is just no way at all, not even an ugly one. It's not just > involved and tedious and hard to read, it's not provable. The comma > category construction does not work for the notion of categories that you > use. > > To see why, look at your Agda code: > When you define the objects of the comma category, you need to use objects > + morphisms of the original categories. > When you define the morphisms of the comma category, you need to use > morphisms + composition of the original categories. > When you define composition in the comma category, you need composition + > associativity of the original categories. > Do you see where this is going? You always need "one level more" of the > original categories than you currently define in the comma category. > Thus, when you want to prove associativity for the comma category, you > should expect that you need more than only associativity of the original > categories: you also need the first coherence condition for associativity, > known as "MacLane's pentagon". MacLane's pentagon doesn't show up > explicitly for standard categories (where it is automatic), but it shows up > when you study e.g. bicategories. Something similar happens for the > identity laws. > > The notion of categories that you currently consider is badly behaved. We > call them "wild categories" (or "naive" or "incoherent" or "approximate"). > They are higher-dimensional categories, but with almost all coherence > structure removed. To understand why this is bad, think about categories > where you don't require composition to be associative: you can probably > imagine that all sorts of constructions from standard category theory will > break. > > Your approach to require hom-sets to be sets is the standard approach. It > ensures that the categories behave like standard 1-categories. It implies > MacLane's pentagon coherence and all other coherences. Thus, it's a really > strong assumption, but it's the right assumption if you want to do > 1-category theory in this style. This is also how it's done in the HoTT > book. I think this is equivalent to Jacques' approach with setoids, but I > haven't checked this in detail. ("Equivalent" in the sense that the two > approaches should make the same constructions possible, not equivalent in > terms of how tedious things can become.) > > "--with-K" would, of course, imply that hom-sets are sets. But it also > would mean that the type of objects (and everything else) is a set. This is > quite restrictive. For example, your development wouldn't capture univalent > categories. I don't know whether the added convenience would make up for > the loss of generality. > > The issue that you found here is a pretty deep one. This issue, together > with things that are very much related, causes the problem and motivates > the constructions in this paper: > https://arxiv.org/abs/2009.01883 > See also Section 3.2, "Deficiency of Wild/Incoherent Structure", for a > discussion. Especially Example 9, which uses a slice category (special case > of the comma category, where one can already see the issues). > > Best, > Nicolai > > > On 15/12/2020 01:40, Daniel Lee wrote: > > Hi everyone, > > I'm an undergraduate in CS, trying to use this winter break to learn > category theory via Categories in Context (and hopefully topology and > HoTT). I thought it would be cool to formalize in Agda at the same time. > > Here's the link to the Agda development for reference: > https://github.com/dan-iel-lee/categories-in-agda . Relevant files are > probably "Core" and "Examples/Comma". > > > I've run into a roadblock, specifically with proving that the comma > category is a category, but which I imagine could be an issue in the future > as well. > > I've defined the arrows in the category as: > ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f > > Where h and k are the component arrows, and the body of the Sigma is the > commutativity condition. Defining composition and identity are relatively > straightforward, but proving the left/right unit and associativity > properties become difficult because it requires proving that the identities > are identified. And because there are a lot of steps, compositions,... > involved, the Goal is super hard to read and I don't know where to start in > trying to prove it. I managed to work around it by enforcing that all the > hom-sets are sets (in the sense that their identification types are all > identical). Is there a nice way to prove this without using proof > irrelevance though? > > All help is very very appreciated. Thanks :))) > > Best, > Daniel > > _______________________________________________ > Agda mailing listAgda at lists.chalmers.sehttps://lists.chalmers.se/mailman/listinfo/agda > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Tue Dec 15 10:39:10 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 15 Dec 2020 09:39:10 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: , Message-ID: <5949B626-9D52-49FE-ADEC-8FA7723D86F6@exmail.nottingham.ac.uk> Why are there hard to work with? Set-enriched categories are unnecessary when using cubical Agda! All this setoid stuff should be removed! Thorsten Sent from my iPhone On 15 Dec 2020, at 02:16, Carette, Jacques wrote: ? Categories defined using propositional equality are very hard to work with. I?m not surprised things went sideways. Here?s a full construction of the Comma Category in Agda https://agda.github.io/agda-categories/Categories.Category.Construction.Comma.html In Setoid-Enriched categories, we get to define what equivalent arrows are. In particular, the proofs are not part of the definition, and that makes life much simpler. Recommendation: if you?re going to insist on using propositional equality, do yourself a favour, and use ?with-K. That will already help. Eventually, you?ll likely have to assume function extensionality as well. Jacques From: Agda On Behalf Of Daniel Lee Sent: December 14, 2020 8:40 PM To: agda at lists.chalmers.se Subject: [Agda] Tips for working around proof relevance Hi everyone, I'm an undergraduate in CS, trying to use this winter break to learn category theory via Categories in Context (and hopefully topology and HoTT). I thought it would be cool to formalize in Agda at the same time. Here's the link to the Agda development for reference: https://github.com/dan-iel-lee/categories-in-agda . Relevant files are probably "Core" and "Examples/Comma". I've run into a roadblock, specifically with proving that the comma category is a category, but which I imagine could be an issue in the future as well. I've defined the arrows in the category as: ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f Where h and k are the component arrows, and the body of the Sigma is the commutativity condition. Defining composition and identity are relatively straightforward, but proving the left/right unit and associativity properties become difficult because it requires proving that the identities are identified. And because there are a lot of steps, compositions,... involved, the Goal is super hard to read and I don't know where to start in trying to prove it. I managed to work around it by enforcing that all the hom-sets are sets (in the sense that their identification types are all identical). Is there a nice way to prove this without using proof irrelevance though? All help is very very appreciated. Thanks :))) Best, Daniel _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.stucki at gmail.com Tue Dec 15 11:04:13 2020 From: sandro.stucki at gmail.com (Sandro Stucki) Date: Tue, 15 Dec 2020 11:04:13 +0100 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <5949B626-9D52-49FE-ADEC-8FA7723D86F6@exmail.nottingham.ac.uk> References: <5949B626-9D52-49FE-ADEC-8FA7723D86F6@exmail.nottingham.ac.uk> Message-ID: > Why are there hard to work with? Set-enriched categories are unnecessary when using cubical Agda! > > All this setoid stuff should be removed! That was not very constructive Thorsten. I bet you can do better than just claiming the existence of a solution to Daniel's problem in cubical Agda and actually provide one... /Sandro On Tue, Dec 15, 2020 at 10:39 AM Thorsten Altenkirch wrote: > > Why are there hard to work with? Set-enriched categories are unnecessary when using cubical Agda! > > All this setoid stuff should be removed! > > Thorsten > > Sent from my iPhone > > On 15 Dec 2020, at 02:16, Carette, Jacques wrote: > > ? > > Categories defined using propositional equality are very hard to work with. I?m not surprised things went sideways. > > > > Here?s a full construction of the Comma Category in Agda https://agda.github.io/agda-categories/Categories.Category.Construction.Comma.html > > > > In Setoid-Enriched categories, we get to define what equivalent arrows are. In particular, the proofs are not part of the definition, and that makes life much simpler. > > > > Recommendation: if you?re going to insist on using propositional equality, do yourself a favour, and use ?with-K. That will already help. Eventually, you?ll likely have to assume function extensionality as well. > > > > Jacques > > > > From: Agda On Behalf Of Daniel Lee > Sent: December 14, 2020 8:40 PM > To: agda at lists.chalmers.se > Subject: [Agda] Tips for working around proof relevance > > > > Hi everyone, > > > > I'm an undergraduate in CS, trying to use this winter break to learn category theory via Categories in Context (and hopefully topology and HoTT). I thought it would be cool to formalize in Agda at the same time. > > > > Here's the link to the Agda development for reference: https://github.com/dan-iel-lee/categories-in-agda . Relevant files are probably "Core" and "Examples/Comma". > > > > > > I've run into a roadblock, specifically with proving that the comma category is a category, but which I imagine could be an issue in the future as well. > > > > I've defined the arrows in the category as: > > ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f > > > > Where h and k are the component arrows, and the body of the Sigma is the commutativity condition. Defining composition and identity are relatively straightforward, but proving the left/right unit and associativity properties become difficult because it requires proving that the identities are identified. And because there are a lot of steps, compositions,... involved, the Goal is super hard to read and I don't know where to start in trying to prove it. I managed to work around it by enforcing that all the hom-sets are sets (in the sense that their identification types are all identical). Is there a nice way to prove this without using proof irrelevance though? > > > > All help is very very appreciated. Thanks :))) > > > > Best, > > Daniel > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From Jesper at sikanda.be Tue Dec 15 11:52:34 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Tue, 15 Dec 2020 11:52:34 +0100 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <5949B626-9D52-49FE-ADEC-8FA7723D86F6@exmail.nottingham.ac.uk> Message-ID: How is https://odr.chalmers.se/bitstream/20.500.12380/256404/1/256404.pdf for a solution? -- Jesper On Tue, Dec 15, 2020 at 11:05 AM Sandro Stucki wrote: > > Why are there hard to work with? Set-enriched categories are unnecessary > when using cubical Agda! > > > > All this setoid stuff should be removed! > > That was not very constructive Thorsten. > I bet you can do better than just claiming the existence of a solution > to Daniel's problem in cubical Agda and actually provide one... > > /Sandro > > > On Tue, Dec 15, 2020 at 10:39 AM Thorsten Altenkirch > wrote: > > > > Why are there hard to work with? Set-enriched categories are unnecessary > when using cubical Agda! > > > > All this setoid stuff should be removed! > > > > Thorsten > > > > Sent from my iPhone > > > > On 15 Dec 2020, at 02:16, Carette, Jacques wrote: > > > > ? > > > > Categories defined using propositional equality are very hard to work > with. I?m not surprised things went sideways. > > > > > > > > Here?s a full construction of the Comma Category in Agda > https://agda.github.io/agda-categories/Categories.Category.Construction.Comma.html > > > > > > > > In Setoid-Enriched categories, we get to define what equivalent arrows > are. In particular, the proofs are not part of the definition, and that > makes life much simpler. > > > > > > > > Recommendation: if you?re going to insist on using propositional > equality, do yourself a favour, and use ?with-K. That will already help. > Eventually, you?ll likely have to assume function extensionality as well. > > > > > > > > Jacques > > > > > > > > From: Agda On Behalf Of Daniel Lee > > Sent: December 14, 2020 8:40 PM > > To: agda at lists.chalmers.se > > Subject: [Agda] Tips for working around proof relevance > > > > > > > > Hi everyone, > > > > > > > > I'm an undergraduate in CS, trying to use this winter break to learn > category theory via Categories in Context (and hopefully topology and > HoTT). I thought it would be cool to formalize in Agda at the same time. > > > > > > > > Here's the link to the Agda development for reference: > https://github.com/dan-iel-lee/categories-in-agda . Relevant files are > probably "Core" and "Examples/Comma". > > > > > > > > > > > > I've run into a roadblock, specifically with proving that the comma > category is a category, but which I imagine could be an issue in the future > as well. > > > > > > > > I've defined the arrows in the category as: > > > > ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f > > > > > > > > Where h and k are the component arrows, and the body of the Sigma is the > commutativity condition. Defining composition and identity are relatively > straightforward, but proving the left/right unit and associativity > properties become difficult because it requires proving that the identities > are identified. And because there are a lot of steps, compositions,... > involved, the Goal is super hard to read and I don't know where to start in > trying to prove it. I managed to work around it by enforcing that all the > hom-sets are sets (in the sense that their identification types are all > identical). Is there a nice way to prove this without using proof > irrelevance though? > > > > > > > > All help is very very appreciated. Thanks :))) > > > > > > > > Best, > > > > Daniel > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > This message and any attachment are intended solely for the addressee > > and may contain confidential information. If you have received this > > message in error, please contact the sender and delete the email and > > attachment. > > > > Any views or opinions expressed by the author of this email do not > > necessarily reflect the views of the University of Nottingham. Email > > communications with the University of Nottingham may be monitored > > where permitted by law. > > > > > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Tue Dec 15 13:22:29 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Tue, 15 Dec 2020 12:22:29 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <5949B626-9D52-49FE-ADEC-8FA7723D86F6@exmail.nottingham.ac.uk> Message-ID: <4B81715F-9075-44B7-ABBA-35B06D3E4168@nottingham.ac.uk> I am just unhappy with Jacques proposing an outdated approach. The definition of a category is completely standard the only additional equation you need is to make sure that homsets are actually sets, i.e. you have to add one extra constructor. These are precategories in the sense of the HoTT book. You may want to add an additional axiom to state that the category is univalent (basically saying that isomorphism and equality agree) - that is what is called a category in HoTT. I prefer the terminology category / univalent category. Nicolai gave a more constructive answer, so indeed you need to add the condition that homsets are sets. Otherwise you are not working with categories. Another alternative would be to add K but this is currently inconsistent with cubical. There should be a version of cubical without glue, i.e. without univalence but still with propositional extensionality which is consistent with K. You can fake it but officially you would be inconsistent. I am just bothered that people still advertising setoids where we have something much better now. Next I suggest to program in Cobol... Thorsten ?On 15/12/2020, 10:05, "Sandro Stucki" wrote: > Why are there hard to work with? Set-enriched categories are unnecessary when using cubical Agda! > > All this setoid stuff should be removed! That was not very constructive Thorsten. I bet you can do better than just claiming the existence of a solution to Daniel's problem in cubical Agda and actually provide one... /Sandro On Tue, Dec 15, 2020 at 10:39 AM Thorsten Altenkirch wrote: > > Why are there hard to work with? Set-enriched categories are unnecessary when using cubical Agda! > > All this setoid stuff should be removed! > > Thorsten > > Sent from my iPhone > > On 15 Dec 2020, at 02:16, Carette, Jacques wrote: > > > > Categories defined using propositional equality are very hard to work with. I?m not surprised things went sideways. > > > > Here?s a full construction of the Comma Category in Agda https://agda.github.io/agda-categories/Categories.Category.Construction.Comma.html > > > > In Setoid-Enriched categories, we get to define what equivalent arrows are. In particular, the proofs are not part of the definition, and that makes life much simpler. > > > > Recommendation: if you?re going to insist on using propositional equality, do yourself a favour, and use ?with-K. That will already help. Eventually, you?ll likely have to assume function extensionality as well. > > > > Jacques > > > > From: Agda On Behalf Of Daniel Lee > Sent: December 14, 2020 8:40 PM > To: agda at lists.chalmers.se > Subject: [Agda] Tips for working around proof relevance > > > > Hi everyone, > > > > I'm an undergraduate in CS, trying to use this winter break to learn category theory via Categories in Context (and hopefully topology and HoTT). I thought it would be cool to formalize in Agda at the same time. > > > > Here's the link to the Agda development for reference: https://github.com/dan-iel-lee/categories-in-agda . Relevant files are probably "Core" and "Examples/Comma". > > > > > > I've run into a roadblock, specifically with proving that the comma category is a category, but which I imagine could be an issue in the future as well. > > > > I've defined the arrows in the category as: > > ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f > > > > Where h and k are the component arrows, and the body of the Sigma is the commutativity condition. Defining composition and identity are relatively straightforward, but proving the left/right unit and associativity properties become difficult because it requires proving that the identities are identified. And because there are a lot of steps, compositions,... involved, the Goal is super hard to read and I don't know where to start in trying to prove it. I managed to work around it by enforcing that all the hom-sets are sets (in the sense that their identification types are all identical). Is there a nice way to prove this without using proof irrelevance though? > > > > All help is very very appreciated. Thanks :))) > > > > Best, > > Daniel > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From nicolai.kraus at gmail.com Wed Dec 16 03:08:07 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Wed, 16 Dec 2020 02:08:07 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> Message-ID: On Tue, Dec 15, 2020 at 6:49 AM Daniel Lee wrote: > So just to make sure I understand correctly, the reason that associativity > is impossible to prove in the "wild categories" setting is that you not > only need associativity in the original category, but also a sort of > "second level" notion of associativity in the composition of the > commutative diagrams? > Yes, that's right. > And the reason it goes through when you assume that hom-sets are sets is > that any two commutative diagrams, as long as their components are the > same, are now assumed to be identical. Is that right? > Exactly! > Then, is it possible to add this higher-dimensional coherence rather than > removing higher-dimensional structure completely? > Yes, it's possible. But then you're not using ordinary categories (a.k.a. 1-categories a.k.a. categories) anymore, then you would work with generalizations. There are many different such generalizations of 1-categories, an overview is here: https://ncatlab.org/nlab/show/higher+category+theory These generalizations are more powerful and (in many situations) more useful than 1-categories, but also more complicated and often harder to work with. It's a trade-off, as always. The generalization that I'm most interested in is (infinity,1)-categories [see nLab link above] because this is the simplest well-behaved notion of category which the type-theoretic universe is an instance of. Put differently, if you want to work with a well-behaved notion of category and you need the universe to be such a category, then you either need to make an assumption such as --with-K, or you need to go to at least (infinity,1)-categories. If you don't want to go there and work with 1-categories, you can restrict the universe to h-sets; this will be a perfectly fine 1-category. Adding the coherences is hard in practice and in theory, see here for approaches: https://arxiv.org/abs/1707.03693 (popl'18) https://arxiv.org/abs/2009.01883 > I think I'll try out the setoid approach Jacques suggested, it does seem > like it could make things easier. Are there any major downsides to this > approach which would be useful to know. I've heard of talk of "setoid hell" > before where you build up a ton of extra proof obligations. Should I be > worried about that in this case? > I think the options that you have are: (1) the approach you currently use, i.e. standard Agda, postulate function extensionality (2) use setoids for the hom-sets of categories (3) use cubical Agda with sets (h-sets) for the hom-sets. Some people here have voiced some pretty strong opinions. I'm not the right person to give advice on how to implement things, but I personally would definitely check out possibility 3. 1&2 can certainly work, and people here have done it very successfully with these strategies, but 1&2 have drawbacks that you've already encountered or heard of. In comparison, cubical Agda allows you to do things in a clean and conceptually satisfying way. > Lastly, how would you recommend defining hom/represented functors? > Currently, I've used a universe category parametrized by some level 'c' > whose objects are 'Set c'. Will I run into similar issues with "wildness" > if I don't enforce that the objects in the category are sets? > It really depends on the definition of category that you want to work with. My suggestion would be to use 1-categories (not the generalizations, save that for later), where you require the hom-sets to be sets, as you already did. If you do this, 'Set' (or 'Set c') is not a category, so what you've written doesn't even type check anymore. But 'Set' restricted to sets (i.e. Sigma(A : Set). is-set(A)) works just fine as a replacement. Cheers, Nicolai > Thanks again for the help. > > Best, > Daniel > > On Mon, Dec 14, 2020 at 7:22 PM Nicolai Kraus > wrote: > >> Hi Daniel, >> >> nice Agda project! But using the winter break to learn category theory, >> topology, HoTT, AND to formalise things in Agda sounds pretty ambitious to >> me ;-) >> >> The short answer to your question is "no". There's no nice way to do this >> without the assumption that hom-sets are sets (or another assumption). >> Actually, there is just no way at all, not even an ugly one. It's not just >> involved and tedious and hard to read, it's not provable. The comma >> category construction does not work for the notion of categories that you >> use. >> >> To see why, look at your Agda code: >> When you define the objects of the comma category, you need to use >> objects + morphisms of the original categories. >> When you define the morphisms of the comma category, you need to use >> morphisms + composition of the original categories. >> When you define composition in the comma category, you need composition + >> associativity of the original categories. >> Do you see where this is going? You always need "one level more" of the >> original categories than you currently define in the comma category. >> Thus, when you want to prove associativity for the comma category, you >> should expect that you need more than only associativity of the original >> categories: you also need the first coherence condition for associativity, >> known as "MacLane's pentagon". MacLane's pentagon doesn't show up >> explicitly for standard categories (where it is automatic), but it shows up >> when you study e.g. bicategories. Something similar happens for the >> identity laws. >> >> The notion of categories that you currently consider is badly behaved. We >> call them "wild categories" (or "naive" or "incoherent" or "approximate"). >> They are higher-dimensional categories, but with almost all coherence >> structure removed. To understand why this is bad, think about categories >> where you don't require composition to be associative: you can probably >> imagine that all sorts of constructions from standard category theory will >> break. >> >> Your approach to require hom-sets to be sets is the standard approach. It >> ensures that the categories behave like standard 1-categories. It implies >> MacLane's pentagon coherence and all other coherences. Thus, it's a really >> strong assumption, but it's the right assumption if you want to do >> 1-category theory in this style. This is also how it's done in the HoTT >> book. I think this is equivalent to Jacques' approach with setoids, but I >> haven't checked this in detail. ("Equivalent" in the sense that the two >> approaches should make the same constructions possible, not equivalent in >> terms of how tedious things can become.) >> >> "--with-K" would, of course, imply that hom-sets are sets. But it also >> would mean that the type of objects (and everything else) is a set. This is >> quite restrictive. For example, your development wouldn't capture univalent >> categories. I don't know whether the added convenience would make up for >> the loss of generality. >> >> The issue that you found here is a pretty deep one. This issue, together >> with things that are very much related, causes the problem and motivates >> the constructions in this paper: >> https://arxiv.org/abs/2009.01883 >> See also Section 3.2, "Deficiency of Wild/Incoherent Structure", for a >> discussion. Especially Example 9, which uses a slice category (special case >> of the comma category, where one can already see the issues). >> >> Best, >> Nicolai >> >> >> On 15/12/2020 01:40, Daniel Lee wrote: >> >> Hi everyone, >> >> I'm an undergraduate in CS, trying to use this winter break to learn >> category theory via Categories in Context (and hopefully topology and >> HoTT). I thought it would be cool to formalize in Agda at the same time. >> >> Here's the link to the Agda development for reference: >> https://github.com/dan-iel-lee/categories-in-agda . Relevant files are >> probably "Core" and "Examples/Comma". >> >> >> I've run into a roadblock, specifically with proving that the comma >> category is a category, but which I imagine could be an issue in the future >> as well. >> >> I've defined the arrows in the category as: >> ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f >> >> Where h and k are the component arrows, and the body of the Sigma is the >> commutativity condition. Defining composition and identity are relatively >> straightforward, but proving the left/right unit and associativity >> properties become difficult because it requires proving that the identities >> are identified. And because there are a lot of steps, compositions,... >> involved, the Goal is super hard to read and I don't know where to start in >> trying to prove it. I managed to work around it by enforcing that all the >> hom-sets are sets (in the sense that their identification types are all >> identical). Is there a nice way to prove this without using proof >> irrelevance though? >> >> All help is very very appreciated. Thanks :))) >> >> Best, >> Daniel >> >> _______________________________________________ >> Agda mailing listAgda at lists.chalmers.sehttps://lists.chalmers.se/mailman/listinfo/agda >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From laniel at seas.upenn.edu Wed Dec 16 04:39:23 2020 From: laniel at seas.upenn.edu (Daniel Lee) Date: Tue, 15 Dec 2020 19:39:23 -0800 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> Message-ID: Thank you, this is very helpful! I was thinking about trying cubical Agda, but was a little reluctant since I like to completely understand how things work before using it; i.e. after understanding HoTT and cubical type theory. I'll check it out, but I think I'll most likely try sticking to standard Agda postulating functional extensionality and with the added 'set' requirement for now. Thanks all for the input! Best, Daniel On Tue, Dec 15, 2020 at 6:08 PM Nicolai Kraus wrote: > On Tue, Dec 15, 2020 at 6:49 AM Daniel Lee wrote: > >> So just to make sure I understand correctly, the reason that >> associativity is impossible to prove in the "wild categories" setting is >> that you not only need associativity in the original category, but also a >> sort of "second level" notion of associativity in the composition of the >> commutative diagrams? >> > > Yes, that's right. > > >> And the reason it goes through when you assume that hom-sets are sets is >> that any two commutative diagrams, as long as their components are the >> same, are now assumed to be identical. Is that right? >> > > Exactly! > > >> Then, is it possible to add this higher-dimensional coherence rather than >> removing higher-dimensional structure completely? >> > > Yes, it's possible. But then you're not using ordinary categories (a.k.a. > 1-categories a.k.a. categories) anymore, then you would work with > generalizations. There are many different such generalizations of > 1-categories, an overview is here: > https://ncatlab.org/nlab/show/higher+category+theory > These generalizations are more powerful and (in many situations) more > useful than 1-categories, but also more complicated and often harder to > work with. It's a trade-off, as always. The generalization that I'm most > interested in is (infinity,1)-categories [see nLab link above] because this > is the simplest well-behaved notion of category which the type-theoretic > universe is an instance of. Put differently, if you want to work with a > well-behaved notion of category and you need the universe to be such a > category, then you either need to make an assumption such as --with-K, or > you need to go to at least (infinity,1)-categories. If you don't want to go > there and work with 1-categories, you can restrict the universe to h-sets; > this will be a perfectly fine 1-category. > Adding the coherences is hard in practice and in theory, see here for > approaches: > https://arxiv.org/abs/1707.03693 (popl'18) > https://arxiv.org/abs/2009.01883 > > >> I think I'll try out the setoid approach Jacques suggested, it does seem >> like it could make things easier. Are there any major downsides to this >> approach which would be useful to know. I've heard of talk of "setoid hell" >> before where you build up a ton of extra proof obligations. Should I be >> worried about that in this case? >> > > I think the options that you have are: > (1) the approach you currently use, i.e. standard Agda, postulate function > extensionality > (2) use setoids for the hom-sets of categories > (3) use cubical Agda with sets (h-sets) for the hom-sets. > Some people here have voiced some pretty strong opinions. I'm not the > right person to give advice on how to implement things, but I personally > would definitely check out possibility 3. 1&2 can certainly work, and > people here have done it very successfully with these strategies, but 1&2 > have drawbacks that you've already encountered or heard of. In comparison, > cubical Agda allows you to do things in a clean and conceptually satisfying > way. > > >> Lastly, how would you recommend defining hom/represented functors? >> Currently, I've used a universe category parametrized by some level 'c' >> whose objects are 'Set c'. Will I run into similar issues with "wildness" >> if I don't enforce that the objects in the category are sets? >> > > It really depends on the definition of category that you want to work > with. My suggestion would be to use 1-categories (not the generalizations, > save that for later), where you require the hom-sets to be sets, as you > already did. If you do this, 'Set' (or 'Set c') is not a category, so what > you've written doesn't even type check anymore. But 'Set' restricted to > sets (i.e. Sigma(A : Set). is-set(A)) works just fine as a replacement. > > Cheers, > Nicolai > > > >> Thanks again for the help. >> >> Best, >> Daniel >> >> On Mon, Dec 14, 2020 at 7:22 PM Nicolai Kraus >> wrote: >> >>> Hi Daniel, >>> >>> nice Agda project! But using the winter break to learn category theory, >>> topology, HoTT, AND to formalise things in Agda sounds pretty ambitious to >>> me ;-) >>> >>> The short answer to your question is "no". There's no nice way to do >>> this without the assumption that hom-sets are sets (or another assumption). >>> Actually, there is just no way at all, not even an ugly one. It's not just >>> involved and tedious and hard to read, it's not provable. The comma >>> category construction does not work for the notion of categories that you >>> use. >>> >>> To see why, look at your Agda code: >>> When you define the objects of the comma category, you need to use >>> objects + morphisms of the original categories. >>> When you define the morphisms of the comma category, you need to use >>> morphisms + composition of the original categories. >>> When you define composition in the comma category, you need composition >>> + associativity of the original categories. >>> Do you see where this is going? You always need "one level more" of the >>> original categories than you currently define in the comma category. >>> Thus, when you want to prove associativity for the comma category, you >>> should expect that you need more than only associativity of the original >>> categories: you also need the first coherence condition for associativity, >>> known as "MacLane's pentagon". MacLane's pentagon doesn't show up >>> explicitly for standard categories (where it is automatic), but it shows up >>> when you study e.g. bicategories. Something similar happens for the >>> identity laws. >>> >>> The notion of categories that you currently consider is badly behaved. >>> We call them "wild categories" (or "naive" or "incoherent" or >>> "approximate"). They are higher-dimensional categories, but with almost all >>> coherence structure removed. To understand why this is bad, think about >>> categories where you don't require composition to be associative: you can >>> probably imagine that all sorts of constructions from standard category >>> theory will break. >>> >>> Your approach to require hom-sets to be sets is the standard approach. >>> It ensures that the categories behave like standard 1-categories. It >>> implies MacLane's pentagon coherence and all other coherences. Thus, it's a >>> really strong assumption, but it's the right assumption if you want to do >>> 1-category theory in this style. This is also how it's done in the HoTT >>> book. I think this is equivalent to Jacques' approach with setoids, but I >>> haven't checked this in detail. ("Equivalent" in the sense that the two >>> approaches should make the same constructions possible, not equivalent in >>> terms of how tedious things can become.) >>> >>> "--with-K" would, of course, imply that hom-sets are sets. But it also >>> would mean that the type of objects (and everything else) is a set. This is >>> quite restrictive. For example, your development wouldn't capture univalent >>> categories. I don't know whether the added convenience would make up for >>> the loss of generality. >>> >>> The issue that you found here is a pretty deep one. This issue, together >>> with things that are very much related, causes the problem and motivates >>> the constructions in this paper: >>> https://arxiv.org/abs/2009.01883 >>> See also Section 3.2, "Deficiency of Wild/Incoherent Structure", for a >>> discussion. Especially Example 9, which uses a slice category (special case >>> of the comma category, where one can already see the issues). >>> >>> Best, >>> Nicolai >>> >>> >>> On 15/12/2020 01:40, Daniel Lee wrote: >>> >>> Hi everyone, >>> >>> I'm an undergraduate in CS, trying to use this winter break to learn >>> category theory via Categories in Context (and hopefully topology and >>> HoTT). I thought it would be cool to formalize in Agda at the same time. >>> >>> Here's the link to the Agda development for reference: >>> https://github.com/dan-iel-lee/categories-in-agda . Relevant files are >>> probably "Core" and "Examples/Comma". >>> >>> >>> I've run into a roadblock, specifically with proving that the comma >>> category is a category, but which I imagine could be an issue in the future >>> as well. >>> >>> I've defined the arrows in the category as: >>> ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f >>> >>> Where h and k are the component arrows, and the body of the Sigma is the >>> commutativity condition. Defining composition and identity are relatively >>> straightforward, but proving the left/right unit and associativity >>> properties become difficult because it requires proving that the identities >>> are identified. And because there are a lot of steps, compositions,... >>> involved, the Goal is super hard to read and I don't know where to start in >>> trying to prove it. I managed to work around it by enforcing that all the >>> hom-sets are sets (in the sense that their identification types are all >>> identical). Is there a nice way to prove this without using proof >>> irrelevance though? >>> >>> All help is very very appreciated. Thanks :))) >>> >>> Best, >>> Daniel >>> >>> _______________________________________________ >>> Agda mailing listAgda at lists.chalmers.sehttps://lists.chalmers.se/mailman/listinfo/agda >>> >>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Dec 16 08:36:33 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 16 Dec 2020 07:36:33 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> Message-ID: <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> I think I'll try out the setoid approach Jacques suggested, it does seem like it could make things easier. Are there any major downsides to this approach which would be useful to know. I've heard of talk of "setoid hell" before where you build up a ton of extra proof obligations. Should I be worried about that in this case? Thanks for ignoring me. Been there tried this. Ok, so we define a category with homsetoids. But what about the objects. Ah they are just a type i.e. Set in Agda? But then how do you construct the arrow category? Now arrows become objects so how do we turn a setoid into a type? Ok we better turn the objects into setoids to. But now the arrow are a setoid indexed over a setoid. It is not hard to figure out what this is but by now most of the definition of a caegroy is about setoids. And if everything is a setoid maybe we should just lift all operations on types on setoids. That is exactly what I have done in ?99 (and there are some recent papers about setoid type theory). However, this is basically the idea in cubical agda but you don?t stop at setoids but go on to groupoids and higher groupoids. That is a type has elements, equalities, equalities of equalities and so on. This is what you need to know about HoTT/cubical type theory in a nutshell. However, if you want to reason about ordinary categories then you can cut out all the higher order stuff by adding the condition that homsets satisfy UIP and you are basically saying that they are a setoid without having to make this explicitly. In particular I fail to see what the advantage of Jaques proposal could be, since you can take the quotient of a type and an equivalence relation in cubical agda and there is absolutely no reason to mess up the definition of a category. Thorsten From: Agda on behalf of Daniel Lee Date: Tuesday, 15 December 2020 at 06:50 To: "nicolai.kraus" Cc: "agda at lists.chalmers.se" Subject: Re: [Agda] Tips for working around proof relevance Hi Nicolai, Jacques, Thanks for the pointers! I have indeed already had to assume function extensionality. So just to make sure I understand correctly, the reason that associativity is impossible to prove in the "wild categories" setting is that you not only need associativity in the original category, but also a sort of "second level" notion of associativity in the composition of the commutative diagrams? And the reason it goes through when you assume that hom-sets are sets is that any two commutative diagrams, as long as their components are the same, are now assumed to be identical. Is that right? Then, is it possible to add this higher-dimensional coherence rather than removing higher-dimensional structure completely? I think I'll try out the setoid approach Jacques suggested, it does seem like it could make things easier. Are there any major downsides to this approach which would be useful to know. I've heard of talk of "setoid hell" before where you build up a ton of extra proof obligations. Should I be worried about that in this case? Lastly, how would you recommend defining hom/represented functors? Currently, I've used a universe category parametrized by some level 'c' whose objects are 'Set c'. Will I run into similar issues with "wildness" if I don't enforce that the objects in the category are sets? Thanks again for the help. Best, Daniel On Mon, Dec 14, 2020 at 7:22 PM Nicolai Kraus > wrote: Hi Daniel, nice Agda project! But using the winter break to learn category theory, topology, HoTT, AND to formalise things in Agda sounds pretty ambitious to me ;-) The short answer to your question is "no". There's no nice way to do this without the assumption that hom-sets are sets (or another assumption). Actually, there is just no way at all, not even an ugly one. It's not just involved and tedious and hard to read, it's not provable. The comma category construction does not work for the notion of categories that you use. To see why, look at your Agda code: When you define the objects of the comma category, you need to use objects + morphisms of the original categories. When you define the morphisms of the comma category, you need to use morphisms + composition of the original categories. When you define composition in the comma category, you need composition + associativity of the original categories. Do you see where this is going? You always need "one level more" of the original categories than you currently define in the comma category. Thus, when you want to prove associativity for the comma category, you should expect that you need more than only associativity of the original categories: you also need the first coherence condition for associativity, known as "MacLane's pentagon". MacLane's pentagon doesn't show up explicitly for standard categories (where it is automatic), but it shows up when you study e.g. bicategories. Something similar happens for the identity laws. The notion of categories that you currently consider is badly behaved. We call them "wild categories" (or "naive" or "incoherent" or "approximate"). They are higher-dimensional categories, but with almost all coherence structure removed. To understand why this is bad, think about categories where you don't require composition to be associative: you can probably imagine that all sorts of constructions from standard category theory will break. Your approach to require hom-sets to be sets is the standard approach. It ensures that the categories behave like standard 1-categories. It implies MacLane's pentagon coherence and all other coherences. Thus, it's a really strong assumption, but it's the right assumption if you want to do 1-category theory in this style. This is also how it's done in the HoTT book. I think this is equivalent to Jacques' approach with setoids, but I haven't checked this in detail. ("Equivalent" in the sense that the two approaches should make the same constructions possible, not equivalent in terms of how tedious things can become.) "--with-K" would, of course, imply that hom-sets are sets. But it also would mean that the type of objects (and everything else) is a set. This is quite restrictive. For example, your development wouldn't capture univalent categories. I don't know whether the added convenience would make up for the loss of generality. The issue that you found here is a pretty deep one. This issue, together with things that are very much related, causes the problem and motivates the constructions in this paper: https://arxiv.org/abs/2009.01883 See also Section 3.2, "Deficiency of Wild/Incoherent Structure", for a discussion. Especially Example 9, which uses a slice category (special case of the comma category, where one can already see the issues). Best, Nicolai On 15/12/2020 01:40, Daniel Lee wrote: Hi everyone, I'm an undergraduate in CS, trying to use this winter break to learn category theory via Categories in Context (and hopefully topology and HoTT). I thought it would be cool to formalize in Agda at the same time. Here's the link to the Agda development for reference: https://github.com/dan-iel-lee/categories-in-agda . Relevant files are probably "Core" and "Examples/Comma". I've run into a roadblock, specifically with proving that the comma category is a category, but which I imagine could be an issue in the future as well. I've defined the arrows in the category as: ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f Where h and k are the component arrows, and the body of the Sigma is the commutativity condition. Defining composition and identity are relatively straightforward, but proving the left/right unit and associativity properties become difficult because it requires proving that the identities are identified. And because there are a lot of steps, compositions,... involved, the Goal is super hard to read and I don't know where to start in trying to prove it. I managed to work around it by enforcing that all the hom-sets are sets (in the sense that their identification types are all identical). Is there a nice way to prove this without using proof irrelevance though? All help is very very appreciated. Thanks :))) Best, Daniel _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersmortberg at gmail.com Wed Dec 16 09:12:57 2020 From: andersmortberg at gmail.com (Anders Mortberg) Date: Wed, 16 Dec 2020 09:12:57 +0100 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> Message-ID: Hi Daniel, I don't think you need to know too many details about Cubical Agda to develop basic category theory. The agda/cubical currently has a very tiny category theory library so any contributions are most welcome and there's plenty of low-hanging fruit: https://github.com/agda/cubical/tree/master/Cubical/Categories Feel free to drop me an email and I can give you some concrete suggestions for things to do and where to start in case you're interested. Btw, in my experience univalence is not really necessary when developing the theory of non-univalent 1-categories. So working with postulated funext and hom-sets is really like working in HoTT. What Cubical Agda offers is a version of this system where funext is not a postulate and one has some new primitives for working with paths/equalities. The only caveat is that you cannot pattern-match on paths/equalities using Agda's nice pattern-matching, but in my experience this is a very small price to pay for all the cubical features. You can of course still use J/path-induction manually, but it turns out that you almost never want to do this as most things can be proved more directly. -- Anders On Wed, Dec 16, 2020 at 4:39 AM Daniel Lee wrote: > > Thank you, this is very helpful! I was thinking about trying cubical Agda, but was a little reluctant since I like to completely understand how things work before using it; i.e. after understanding HoTT and cubical type theory. I'll check it out, but I think I'll most likely try sticking to standard Agda postulating functional extensionality and with the added 'set' requirement for now. > > Thanks all for the input! > > Best, > Daniel > > On Tue, Dec 15, 2020 at 6:08 PM Nicolai Kraus wrote: >> >> On Tue, Dec 15, 2020 at 6:49 AM Daniel Lee wrote: >>> >>> So just to make sure I understand correctly, the reason that associativity is impossible to prove in the "wild categories" setting is that you not only need associativity in the original category, but also a sort of "second level" notion of associativity in the composition of the commutative diagrams? >> >> >> Yes, that's right. >> >>> >>> And the reason it goes through when you assume that hom-sets are sets is that any two commutative diagrams, as long as their components are the same, are now assumed to be identical. Is that right? >> >> >> Exactly! >> >>> >>> Then, is it possible to add this higher-dimensional coherence rather than removing higher-dimensional structure completely? >> >> >> Yes, it's possible. But then you're not using ordinary categories (a.k.a. 1-categories a.k.a. categories) anymore, then you would work with generalizations. There are many different such generalizations of 1-categories, an overview is here: >> https://ncatlab.org/nlab/show/higher+category+theory >> These generalizations are more powerful and (in many situations) more useful than 1-categories, but also more complicated and often harder to work with. It's a trade-off, as always. The generalization that I'm most interested in is (infinity,1)-categories [see nLab link above] because this is the simplest well-behaved notion of category which the type-theoretic universe is an instance of. Put differently, if you want to work with a well-behaved notion of category and you need the universe to be such a category, then you either need to make an assumption such as --with-K, or you need to go to at least (infinity,1)-categories. If you don't want to go there and work with 1-categories, you can restrict the universe to h-sets; this will be a perfectly fine 1-category. >> Adding the coherences is hard in practice and in theory, see here for approaches: >> https://arxiv.org/abs/1707.03693 (popl'18) >> https://arxiv.org/abs/2009.01883 >> >>> >>> I think I'll try out the setoid approach Jacques suggested, it does seem like it could make things easier. Are there any major downsides to this approach which would be useful to know. I've heard of talk of "setoid hell" before where you build up a ton of extra proof obligations. Should I be worried about that in this case? >> >> >> I think the options that you have are: >> (1) the approach you currently use, i.e. standard Agda, postulate function extensionality >> (2) use setoids for the hom-sets of categories >> (3) use cubical Agda with sets (h-sets) for the hom-sets. >> Some people here have voiced some pretty strong opinions. I'm not the right person to give advice on how to implement things, but I personally would definitely check out possibility 3. 1&2 can certainly work, and people here have done it very successfully with these strategies, but 1&2 have drawbacks that you've already encountered or heard of. In comparison, cubical Agda allows you to do things in a clean and conceptually satisfying way. >> >>> >>> Lastly, how would you recommend defining hom/represented functors? Currently, I've used a universe category parametrized by some level 'c' whose objects are 'Set c'. Will I run into similar issues with "wildness" if I don't enforce that the objects in the category are sets? >> >> >> It really depends on the definition of category that you want to work with. My suggestion would be to use 1-categories (not the generalizations, save that for later), where you require the hom-sets to be sets, as you already did. If you do this, 'Set' (or 'Set c') is not a category, so what you've written doesn't even type check anymore. But 'Set' restricted to sets (i.e. Sigma(A : Set). is-set(A)) works just fine as a replacement. >> >> Cheers, >> Nicolai >> >> >>> >>> Thanks again for the help. >>> >>> Best, >>> Daniel >>> >>> On Mon, Dec 14, 2020 at 7:22 PM Nicolai Kraus wrote: >>>> >>>> Hi Daniel, >>>> >>>> nice Agda project! But using the winter break to learn category theory, topology, HoTT, AND to formalise things in Agda sounds pretty ambitious to me ;-) >>>> >>>> The short answer to your question is "no". There's no nice way to do this without the assumption that hom-sets are sets (or another assumption). Actually, there is just no way at all, not even an ugly one. It's not just involved and tedious and hard to read, it's not provable. The comma category construction does not work for the notion of categories that you use. >>>> >>>> To see why, look at your Agda code: >>>> When you define the objects of the comma category, you need to use objects + morphisms of the original categories. >>>> When you define the morphisms of the comma category, you need to use morphisms + composition of the original categories. >>>> When you define composition in the comma category, you need composition + associativity of the original categories. >>>> Do you see where this is going? You always need "one level more" of the original categories than you currently define in the comma category. >>>> Thus, when you want to prove associativity for the comma category, you should expect that you need more than only associativity of the original categories: you also need the first coherence condition for associativity, known as "MacLane's pentagon". MacLane's pentagon doesn't show up explicitly for standard categories (where it is automatic), but it shows up when you study e.g. bicategories. Something similar happens for the identity laws. >>>> >>>> The notion of categories that you currently consider is badly behaved. We call them "wild categories" (or "naive" or "incoherent" or "approximate"). They are higher-dimensional categories, but with almost all coherence structure removed. To understand why this is bad, think about categories where you don't require composition to be associative: you can probably imagine that all sorts of constructions from standard category theory will break. >>>> >>>> Your approach to require hom-sets to be sets is the standard approach. It ensures that the categories behave like standard 1-categories. It implies MacLane's pentagon coherence and all other coherences. Thus, it's a really strong assumption, but it's the right assumption if you want to do 1-category theory in this style. This is also how it's done in the HoTT book. I think this is equivalent to Jacques' approach with setoids, but I haven't checked this in detail. ("Equivalent" in the sense that the two approaches should make the same constructions possible, not equivalent in terms of how tedious things can become.) >>>> >>>> "--with-K" would, of course, imply that hom-sets are sets. But it also would mean that the type of objects (and everything else) is a set. This is quite restrictive. For example, your development wouldn't capture univalent categories. I don't know whether the added convenience would make up for the loss of generality. >>>> >>>> The issue that you found here is a pretty deep one. This issue, together with things that are very much related, causes the problem and motivates the constructions in this paper: >>>> https://arxiv.org/abs/2009.01883 >>>> See also Section 3.2, "Deficiency of Wild/Incoherent Structure", for a discussion. Especially Example 9, which uses a slice category (special case of the comma category, where one can already see the issues). >>>> >>>> Best, >>>> Nicolai >>>> >>>> >>>> On 15/12/2020 01:40, Daniel Lee wrote: >>>> >>>> Hi everyone, >>>> >>>> I'm an undergraduate in CS, trying to use this winter break to learn category theory via Categories in Context (and hopefully topology and HoTT). I thought it would be cool to formalize in Agda at the same time. >>>> >>>> Here's the link to the Agda development for reference: https://github.com/dan-iel-lee/categories-in-agda . Relevant files are probably "Core" and "Examples/Comma". >>>> >>>> >>>> I've run into a roadblock, specifically with proving that the comma category is a category, but which I imagine could be an issue in the future as well. >>>> >>>> I've defined the arrows in the category as: >>>> ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f >>>> >>>> Where h and k are the component arrows, and the body of the Sigma is the commutativity condition. Defining composition and identity are relatively straightforward, but proving the left/right unit and associativity properties become difficult because it requires proving that the identities are identified. And because there are a lot of steps, compositions,... involved, the Goal is super hard to read and I don't know where to start in trying to prove it. I managed to work around it by enforcing that all the hom-sets are sets (in the sense that their identification types are all identical). Is there a nice way to prove this without using proof irrelevance though? >>>> >>>> All help is very very appreciated. Thanks :))) >>>> >>>> Best, >>>> Daniel >>>> >>>> _______________________________________________ >>>> Agda mailing list >>>> Agda at lists.chalmers.se >>>> https://lists.chalmers.se/mailman/listinfo/agda >>>> >>>> > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From nicolai.kraus at gmail.com Wed Dec 16 10:09:18 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Wed, 16 Dec 2020 09:09:18 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> Message-ID: On Wed, Dec 16, 2020 at 7:36 AM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > I think I'll try out the setoid approach Jacques suggested, it does seem > like it could make things easier. Are there any major downsides to this > approach which would be useful to know. I've heard of talk of "setoid hell" > before where you build up a ton of extra proof obligations. Should I be > worried about that in this case? > > > > Thanks for ignoring me. > Daniel wrote the cited sentences three hours before you even entered the discussion, Thorsten. This makes your complaint about being ignored pretty unfair. You can't expect that people can predict what you'd write in the future - at least not the people who are new to this list! [1] I agree with the rest of your message :-) [1] (I obviously knew what you were going to say.) Nicolai Been there tried this. Ok, so we define a category with homsetoids. But > what about the objects. Ah they are just a type i.e. Set in Agda? But then > how do you construct the arrow category? Now arrows become objects so how > do we turn a setoid into a type? Ok we better turn the objects into setoids > to. But now the arrow are a setoid indexed over a setoid. It is not hard to > figure out what this is but by now most of the definition of a caegroy is > about setoids. And if everything is a setoid maybe we should just lift all > operations on types on setoids. That is exactly what I have done in ?99 > (and there are some recent papers about setoid type theory). However, this > is basically the idea in cubical agda but you don?t stop at setoids but go > on to groupoids and higher groupoids. That is a type has elements, > equalities, equalities of equalities and so on. This is what you need to > know about HoTT/cubical type theory in a nutshell. However, if you want to > reason about ordinary categories then you can cut out all the higher order > stuff by adding the condition that homsets satisfy UIP and you are > basically saying that they are a setoid without having to make this > explicitly. In particular I fail to see what the advantage of Jaques > proposal could be, since you can take the quotient of a type and an > equivalence relation in cubical agda and there is absolutely no reason to > mess up the definition of a category. > > > > Thorsten > > > > > > *From: *Agda on behalf of Daniel Lee < > laniel at seas.upenn.edu> > *Date: *Tuesday, 15 December 2020 at 06:50 > *To: *"nicolai.kraus" > *Cc: *"agda at lists.chalmers.se" > *Subject: *Re: [Agda] Tips for working around proof relevance > > > > Hi Nicolai, Jacques, > > > > Thanks for the pointers! I have indeed already had to assume function > extensionality. > > > > So just to make sure I understand correctly, the reason that associativity > is impossible to prove in the "wild categories" setting is that you not > only need associativity in the original category, but also a sort of > "second level" notion of associativity in the composition of the > commutative diagrams? And the reason it goes through when you assume that > hom-sets are sets is that any two commutative diagrams, as long as > their components are the same, are now assumed to be identical. Is that > right? > > > > Then, is it possible to add this higher-dimensional coherence rather than > removing higher-dimensional structure completely? > > > > I think I'll try out the setoid approach Jacques suggested, it does seem > like it could make things easier. Are there any major downsides to this > approach which would be useful to know. I've heard of talk of "setoid hell" > before where you build up a ton of extra proof obligations. Should I be > worried about that in this case? > > > > Lastly, how would you recommend defining hom/represented functors? > Currently, I've used a universe category parametrized by some level 'c' > whose objects are 'Set c'. Will I run into similar issues with "wildness" > if I don't enforce that the objects in the category are sets? > > > > Thanks again for the help. > > > > Best, > > Daniel > > > > On Mon, Dec 14, 2020 at 7:22 PM Nicolai Kraus > wrote: > > Hi Daniel, > > nice Agda project! But using the winter break to learn category theory, > topology, HoTT, AND to formalise things in Agda sounds pretty ambitious to > me ;-) > > The short answer to your question is "no". There's no nice way to do this > without the assumption that hom-sets are sets (or another assumption). > Actually, there is just no way at all, not even an ugly one. It's not just > involved and tedious and hard to read, it's not provable. The comma > category construction does not work for the notion of categories that you > use. > > To see why, look at your Agda code: > When you define the objects of the comma category, you need to use objects > + morphisms of the original categories. > When you define the morphisms of the comma category, you need to use > morphisms + composition of the original categories. > When you define composition in the comma category, you need composition + > associativity of the original categories. > Do you see where this is going? You always need "one level more" of the > original categories than you currently define in the comma category. > Thus, when you want to prove associativity for the comma category, you > should expect that you need more than only associativity of the original > categories: you also need the first coherence condition for associativity, > known as "MacLane's pentagon". MacLane's pentagon doesn't show up > explicitly for standard categories (where it is automatic), but it shows up > when you study e.g. bicategories. Something similar happens for the > identity laws. > > The notion of categories that you currently consider is badly behaved. We > call them "wild categories" (or "naive" or "incoherent" or "approximate"). > They are higher-dimensional categories, but with almost all coherence > structure removed. To understand why this is bad, think about categories > where you don't require composition to be associative: you can probably > imagine that all sorts of constructions from standard category theory will > break. > > Your approach to require hom-sets to be sets is the standard approach. It > ensures that the categories behave like standard 1-categories. It implies > MacLane's pentagon coherence and all other coherences. Thus, it's a really > strong assumption, but it's the right assumption if you want to do > 1-category theory in this style. This is also how it's done in the HoTT > book. I think this is equivalent to Jacques' approach with setoids, but I > haven't checked this in detail. ("Equivalent" in the sense that the two > approaches should make the same constructions possible, not equivalent in > terms of how tedious things can become.) > > "--with-K" would, of course, imply that hom-sets are sets. But it also > would mean that the type of objects (and everything else) is a set. This is > quite restrictive. For example, your development wouldn't capture univalent > categories. I don't know whether the added convenience would make up for > the loss of generality. > > The issue that you found here is a pretty deep one. This issue, together > with things that are very much related, causes the problem and motivates > the constructions in this paper: > https://arxiv.org/abs/2009.01883 > See also Section 3.2, "Deficiency of Wild/Incoherent Structure", for a > discussion. Especially Example 9, which uses a slice category (special case > of the comma category, where one can already see the issues). > > Best, > Nicolai > > On 15/12/2020 01:40, Daniel Lee wrote: > > Hi everyone, > > > > I'm an undergraduate in CS, trying to use this winter break to learn > category theory via Categories in Context (and hopefully topology and > HoTT). I thought it would be cool to formalize in Agda at the same time. > > > > Here's the link to the Agda development for reference: > https://github.com/dan-iel-lee/categories-in-agda . Relevant files are > probably "Core" and "Examples/Comma". > > > > > > I've run into a roadblock, specifically with proving that the comma > category is a category, but which I imagine could be an issue in the future > as well. > > > > I've defined the arrows in the category as: > > ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f > > > > Where h and k are the component arrows, and the body of the Sigma is the > commutativity condition. Defining composition and identity are relatively > straightforward, but proving the left/right unit and associativity > properties become difficult because it requires proving that the identities > are identified. And because there are a lot of steps, compositions,... > involved, the Goal is super hard to read and I don't know where to start in > trying to prove it. I managed to work around it by enforcing that all the > hom-sets are sets (in the sense that their identification types are all > identical). Is there a nice way to prove this without using proof > irrelevance though? > > > > All help is very very appreciated. Thanks :))) > > > > Best, > > Daniel > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Dec 16 10:39:45 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 16 Dec 2020 09:39:45 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk>, Message-ID: <3688B20B-DE10-4585-ACCF-8A8B8F0D94A5@exmail.nottingham.ac.uk> I can expect contributors to this list to master time travel, can?t I? :-) Apologies to Daniel! Sent from my iPhone On 16 Dec 2020, at 09:10, Nicolai Kraus wrote: ? On Wed, Dec 16, 2020 at 7:36 AM Thorsten Altenkirch > wrote: I think I'll try out the setoid approach Jacques suggested, it does seem like it could make things easier. Are there any major downsides to this approach which would be useful to know. I've heard of talk of "setoid hell" before where you build up a ton of extra proof obligations. Should I be worried about that in this case? Thanks for ignoring me. Daniel wrote the cited sentences three hours before you even entered the discussion, Thorsten. This makes your complaint about being ignored pretty unfair. You can't expect that people can predict what you'd write in the future - at least not the people who are new to this list! [1] I agree with the rest of your message :-) [1] (I obviously knew what you were going to say.) Nicolai Been there tried this. Ok, so we define a category with homsetoids. But what about the objects. Ah they are just a type i.e. Set in Agda? But then how do you construct the arrow category? Now arrows become objects so how do we turn a setoid into a type? Ok we better turn the objects into setoids to. But now the arrow are a setoid indexed over a setoid. It is not hard to figure out what this is but by now most of the definition of a caegroy is about setoids. And if everything is a setoid maybe we should just lift all operations on types on setoids. That is exactly what I have done in ?99 (and there are some recent papers about setoid type theory). However, this is basically the idea in cubical agda but you don?t stop at setoids but go on to groupoids and higher groupoids. That is a type has elements, equalities, equalities of equalities and so on. This is what you need to know about HoTT/cubical type theory in a nutshell. However, if you want to reason about ordinary categories then you can cut out all the higher order stuff by adding the condition that homsets satisfy UIP and you are basically saying that they are a setoid without having to make this explicitly. In particular I fail to see what the advantage of Jaques proposal could be, since you can take the quotient of a type and an equivalence relation in cubical agda and there is absolutely no reason to mess up the definition of a category. Thorsten From: Agda > on behalf of Daniel Lee > Date: Tuesday, 15 December 2020 at 06:50 To: "nicolai.kraus" > Cc: "agda at lists.chalmers.se" > Subject: Re: [Agda] Tips for working around proof relevance Hi Nicolai, Jacques, Thanks for the pointers! I have indeed already had to assume function extensionality. So just to make sure I understand correctly, the reason that associativity is impossible to prove in the "wild categories" setting is that you not only need associativity in the original category, but also a sort of "second level" notion of associativity in the composition of the commutative diagrams? And the reason it goes through when you assume that hom-sets are sets is that any two commutative diagrams, as long as their components are the same, are now assumed to be identical. Is that right? Then, is it possible to add this higher-dimensional coherence rather than removing higher-dimensional structure completely? I think I'll try out the setoid approach Jacques suggested, it does seem like it could make things easier. Are there any major downsides to this approach which would be useful to know. I've heard of talk of "setoid hell" before where you build up a ton of extra proof obligations. Should I be worried about that in this case? Lastly, how would you recommend defining hom/represented functors? Currently, I've used a universe category parametrized by some level 'c' whose objects are 'Set c'. Will I run into similar issues with "wildness" if I don't enforce that the objects in the category are sets? Thanks again for the help. Best, Daniel On Mon, Dec 14, 2020 at 7:22 PM Nicolai Kraus > wrote: Hi Daniel, nice Agda project! But using the winter break to learn category theory, topology, HoTT, AND to formalise things in Agda sounds pretty ambitious to me ;-) The short answer to your question is "no". There's no nice way to do this without the assumption that hom-sets are sets (or another assumption). Actually, there is just no way at all, not even an ugly one. It's not just involved and tedious and hard to read, it's not provable. The comma category construction does not work for the notion of categories that you use. To see why, look at your Agda code: When you define the objects of the comma category, you need to use objects + morphisms of the original categories. When you define the morphisms of the comma category, you need to use morphisms + composition of the original categories. When you define composition in the comma category, you need composition + associativity of the original categories. Do you see where this is going? You always need "one level more" of the original categories than you currently define in the comma category. Thus, when you want to prove associativity for the comma category, you should expect that you need more than only associativity of the original categories: you also need the first coherence condition for associativity, known as "MacLane's pentagon". MacLane's pentagon doesn't show up explicitly for standard categories (where it is automatic), but it shows up when you study e.g. bicategories. Something similar happens for the identity laws. The notion of categories that you currently consider is badly behaved. We call them "wild categories" (or "naive" or "incoherent" or "approximate"). They are higher-dimensional categories, but with almost all coherence structure removed. To understand why this is bad, think about categories where you don't require composition to be associative: you can probably imagine that all sorts of constructions from standard category theory will break. Your approach to require hom-sets to be sets is the standard approach. It ensures that the categories behave like standard 1-categories. It implies MacLane's pentagon coherence and all other coherences. Thus, it's a really strong assumption, but it's the right assumption if you want to do 1-category theory in this style. This is also how it's done in the HoTT book. I think this is equivalent to Jacques' approach with setoids, but I haven't checked this in detail. ("Equivalent" in the sense that the two approaches should make the same constructions possible, not equivalent in terms of how tedious things can become.) "--with-K" would, of course, imply that hom-sets are sets. But it also would mean that the type of objects (and everything else) is a set. This is quite restrictive. For example, your development wouldn't capture univalent categories. I don't know whether the added convenience would make up for the loss of generality. The issue that you found here is a pretty deep one. This issue, together with things that are very much related, causes the problem and motivates the constructions in this paper: https://arxiv.org/abs/2009.01883 See also Section 3.2, "Deficiency of Wild/Incoherent Structure", for a discussion. Especially Example 9, which uses a slice category (special case of the comma category, where one can already see the issues). Best, Nicolai On 15/12/2020 01:40, Daniel Lee wrote: Hi everyone, I'm an undergraduate in CS, trying to use this winter break to learn category theory via Categories in Context (and hopefully topology and HoTT). I thought it would be cool to formalize in Agda at the same time. Here's the link to the Agda development for reference: https://github.com/dan-iel-lee/categories-in-agda . Relevant files are probably "Core" and "Examples/Comma". I've run into a roadblock, specifically with proving that the comma category is a category, but which I imagine could be an issue in the future as well. I've defined the arrows in the category as: ?[ (h , k) ? d ?? d' ? e ?? e' ] f' ? (? h) ? (? k) ? f Where h and k are the component arrows, and the body of the Sigma is the commutativity condition. Defining composition and identity are relatively straightforward, but proving the left/right unit and associativity properties become difficult because it requires proving that the identities are identified. And because there are a lot of steps, compositions,... involved, the Goal is super hard to read and I don't know where to start in trying to prove it. I managed to work around it by enforcing that all the hom-sets are sets (in the sense that their identification types are all identical). Is there a nice way to prove this without using proof irrelevance though? All help is very very appreciated. Thanks :))) Best, Daniel _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Wed Dec 16 13:34:53 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Wed, 16 Dec 2020 12:34:53 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> Message-ID: <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> On 16/12/2020 07:36, Thorsten Altenkirch wrote: > But then how do you construct the arrow category? The canonical answer to questions like this is to look in agda-categories, and see what it does. In this case (https://github.com/agda/agda-categories/blob/master/src/Categories/Category/Construction/Arrow.agda), it looks like when we make the type of objects of the arrow category, we just forget the equivalence relation on the hom-setoid. Objects of the arrow category (A, B, f) and (A, B, f?) where f ? f? are isomorphic, which should be good enough because we never talk about equality on objects. The answer to the original question about comma categories should be very similar. Best regards, James From Thorsten.Altenkirch at nottingham.ac.uk Wed Dec 16 13:40:07 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 16 Dec 2020 12:40:07 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> Message-ID: But this is not the arrow category it is something else. If you want to implement category theory you need to work with a type theory with a reasonable notion of equality. Setoids are a bad idea because you never hide implementation details. You also want to be able to transport properties among equal elements. The message is simple: don't program in assembly language. Thorsten ?On 16/12/2020, 12:35, "Agda on behalf of James Wood" wrote: On 16/12/2020 07:36, Thorsten Altenkirch wrote: > But then how do you construct the arrow category? The canonical answer to questions like this is to look in agda-categories, and see what it does. In this case (https://github.com/agda/agda-categories/blob/master/src/Categories/Category/Construction/Arrow.agda), it looks like when we make the type of objects of the arrow category, we just forget the equivalence relation on the hom-setoid. Objects of the arrow category (A, B, f) and (A, B, f?) where f ? f? are isomorphic, which should be good enough because we never talk about equality on objects. The answer to the original question about comma categories should be very similar. Best regards, James _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From Thorsten.Altenkirch at nottingham.ac.uk Wed Dec 16 13:43:23 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 16 Dec 2020 12:43:23 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> Message-ID: <0C5DC163-340E-4D15-917C-25E4F62DC574@nottingham.ac.uk> P.S. This library was written before cubical agda. I think we should get rid of all this setoid stuff and do it properly! ?On 16/12/2020, 12:35, "Agda on behalf of James Wood" wrote: On 16/12/2020 07:36, Thorsten Altenkirch wrote: > But then how do you construct the arrow category? The canonical answer to questions like this is to look in agda-categories, and see what it does. In this case (https://github.com/agda/agda-categories/blob/master/src/Categories/Category/Construction/Arrow.agda), it looks like when we make the type of objects of the arrow category, we just forget the equivalence relation on the hom-setoid. Objects of the arrow category (A, B, f) and (A, B, f?) where f ? f? are isomorphic, which should be good enough because we never talk about equality on objects. The answer to the original question about comma categories should be very similar. Best regards, James _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. From p.l.lumsdaine at gmail.com Wed Dec 16 17:20:00 2020 From: p.l.lumsdaine at gmail.com (Peter LeFanu Lumsdaine) Date: Wed, 16 Dec 2020 17:20:00 +0100 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> Message-ID: On Wed, Dec 16, 2020 at 1:40 PM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > > But this is not the arrow category it is something else. No, that construction really is the arrow category (when one is taking ?category? = ?category with hom-setoids?), and behaves in all the ways you expect the construction to behave! It?s not ?forgetting? the setoid-equalities on arrows ? those are still there, just as isomorphisms in the category ? so it doesn?t mean you need to make objects a setoid as well, or anything like that. Following the HoTT/univalent analysis of category theory, one can see that setoid-based categories fit very naturally into the hierarchy of notions of ?(n-)category? with varying levels of ?saturation?. Just like ?precategories? (e.g. categories in classical foundations) don?t assume saturation/univalence at the object level, if you relax saturation at the levels of arrows/equalities as well, then you get categories with hom-setoids. I gave the main details of this in my talk at the memorial conference for Erik Palmgren. Slides: http://logic.math.su.se/palmgren-memorial/slides/Lumsdaine-slides-Palmgren-memorial-conference.pdf Video: https://youtu.be/glC8tC7xdBY Category theory seems to develop well as long as your saturation assumption is of the form ?saturated in levels ?n? for some n. ?Univalent categories? = ?saturated in levels ?0?; ?precategories? = ?saturated in levels ?1?; ?setoid-categories? = ?not saturated at all? ? all of these give a good development of category theory. ?Wild categories? are badly behaved exactly because when you view them in this analysis, they assume ?saturation of arrows? (1-saturation) but NOT ?saturation of 2-cells? (2-saturation, which turns out to be the condition that equality on arrows is propositional). There are certainly reasons (theoretical and practical) to prefer the non-setoid versions for many purposes ? just as there are purposes for which the setoid versions are good ? and also just like how there are advantages and disadvantages to always requiring saturation at the object level. But these are all natural parts of the same mathematical picture ? it certainly isn?t a matter of ?the right mathematical way? vs ?nasty hacks? or ?assembly language?. ?Peter. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Wed Dec 16 20:44:05 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Wed, 16 Dec 2020 19:44:05 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> Message-ID: <41F69196-A88A-4D71-9D45-8166E56A0FC5@nottingham.ac.uk> It is something else because you can still observe the codes underlying the setoid and you can define functions that do not repsect the steoid equality. Setoids are ok once we hide them by making the mandatory. Mixing setoids and sets is harmful. Thorsten From: Agda on behalf of Peter LeFanu Lumsdaine Date: Wednesday, 16 December 2020 at 16:22 To: Thorsten Altenkirch Cc: "agda at lists.chalmers.se" Subject: Re: [Agda] Tips for working around proof relevance On Wed, Dec 16, 2020 at 1:40 PM Thorsten Altenkirch > wrote: > > But this is not the arrow category it is something else. No, that construction really is the arrow category (when one is taking ?category? = ?category with hom-setoids?), and behaves in all the ways you expect the construction to behave! It?s not ?forgetting? the setoid-equalities on arrows ? those are still there, just as isomorphisms in the category ? so it doesn?t mean you need to make objects a setoid as well, or anything like that. Following the HoTT/univalent analysis of category theory, one can see that setoid-based categories fit very naturally into the hierarchy of notions of ?(n-)category? with varying levels of ?saturation?. Just like ?precategories? (e.g. categories in classical foundations) don?t assume saturation/univalence at the object level, if you relax saturation at the levels of arrows/equalities as well, then you get categories with hom-setoids. I gave the main details of this in my talk at the memorial conference for Erik Palmgren. Slides: http://logic.math.su.se/palmgren-memorial/slides/Lumsdaine-slides-Palmgren-memorial-conference.pdf Video: https://youtu.be/glC8tC7xdBY Category theory seems to develop well as long as your saturation assumption is of the form ?saturated in levels ?n? for some n. ?Univalent categories? = ?saturated in levels ?0?; ?precategories? = ?saturated in levels ?1?; ?setoid-categories? = ?not saturated at all? ? all of these give a good development of category theory. ?Wild categories? are badly behaved exactly because when you view them in this analysis, they assume ?saturation of arrows? (1-saturation) but NOT ?saturation of 2-cells? (2-saturation, which turns out to be the condition that equality on arrows is propositional). There are certainly reasons (theoretical and practical) to prefer the non-setoid versions for many purposes ? just as there are purposes for which the setoid versions are good ? and also just like how there are advantages and disadvantages to always requiring saturation at the object level. But these are all natural parts of the same mathematical picture ? it certainly isn?t a matter of ?the right mathematical way? vs ?nasty hacks? or ?assembly language?. ?Peter. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Wed Dec 16 23:59:29 2020 From: carette at mcmaster.ca (Carette, Jacques) Date: Wed, 16 Dec 2020 22:59:29 +0000 Subject: [Agda] agda-categories, a story Message-ID: More precisely, my version of the story; my co-authors can tell their variations. This seems topical, given the recent discussion. I had been co-maintainer of copumpkin?s library. We managed to keep it alive until agda 2.4.3 and limping in 2.4.4. After that, it broke completely ? irrelevance had changed, and things did not seem easily repairable. I tried to use the new Prop instead, but it was too new, and that just did not work. Jason Hu then proposed that we rewrite it, from scratch, to be proof-relevant. And in compatible-with-most-extensions MLTT, so enabling ?safe and ?without-K too. Cubical was then way too new and experimental, and ?main? Agda still needed a proper category theory library. I was quite convinced that that effort would be doomed to fail. However, I was extremely curious as to why/where. I figured it wouldn?t take long to encounter some unsurmountable roadblock, I would learn something cool in that failure, and move on. I had been in ?Setoid hell? before, and it was quite unpleasant indeed. subst-hell, however, is considerably worse, but that?s another story. But, much to our mutual surprise, things did not fail. It wasn?t even hard. One did have to be careful: - avoid strictness at all costs. Never, ever, ever, compare objects for equality. But that?s ok, so does modern category theory. - avoid heterogeneous equality at all costs. That?s ok, so does modern category theory. - explicit levels are your friends. use them, just like types, they guide you to the ?nice? answers. - definitional equality is important. borrow other?s variants of definitions that obey the usual symmetries definitionally. - embrace the fact that, in that setting, bits and pieces of higher category leaks in. And we ended up building the largest, in terms of number of concepts and theorems, category theory library in any proof assistant. [See the paper for the details of that. A preprint is on the arxiv, it?s been accepted to CPP 2021. Though Lean might surpass us soon on sheer size.] Some things work out really, really nicely. For example, a Bicategory is defined as a category-enriched category with 2 extra coherence laws. Very simple. Compare to the ?expanded? definition on the nLab (or in other?s libraries). The setting also saved me at least once: I foolishly believed the too-na?ve version of the Grothendieck construction that?s on Wikipedia and tried to implement it. And it worked? except for that most pesky of Setoid-induced law ?-resp-?. Because, well, it?s false. Because the Grothendieck construction really doesn?t work on the 1-categorical level, it really really does need a Pseudofunctor. The nLab, as usual, saved the day. And while I?m telling a story, categorical stories without Adjoint Functors is not quite complete, right? [I?ll forgo Yoneda, this once ? ]. There are, in the literature, multiple definitions of adjointness, and proofs of their equivalence. The good proofs have weasel words here and there about size issues. Here, Agda shines: the normal encoding of all the definitions ?work?, but the most elegant definition (Hom isomorphism) is not level polymorphic, while the unit-counit definition is! This was quite shocking. There are a few other definitions in CT that are like that too, where only one of the various definitions is fully level-polymorphic. I think this betrays the fact that most of CT was worked out in a set-theoretic meta-theory, where universe sizes are not first-class. Personally, I am a big fan of the ?mathematics multiverse? (thanks for Andrej Bauer for the phrasing), where one ought to explore what mathematics looks like in different meta-theories. I kind of like poking around in various bits of it, whether it?s fashionable or not. Some math, such as category theory, seems remarkably robust with respect to changes in meta-theory (within reason). So, for all who have managed to read this far: do I think that this is THE way to build category theory in Agda? No! It is _A_ way. A perfectly fine, surprisingly workable way. Would it be how I would build it in cubical Agda? Absolutely not! That would seem rather perverse. Jacques PS: Categories with Families. Those have stumped me in this setting. At least, Pi-types in that setting have. It?s subst-hell all over again. I?m going to wait until someone does Bicategories with Families, or whatever a proper 2-categorical equivalent is. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron-stump at uiowa.edu Thu Dec 17 00:20:21 2020 From: aaron-stump at uiowa.edu (Aaron Stump) Date: Wed, 16 Dec 2020 17:20:21 -0600 Subject: [Agda] agda-categories, a story In-Reply-To: References: Message-ID: Thanks for sharing this story, Jacques. Quite interesting reading! Aaron On Wed, Dec 16, 2020 at 4:59 PM Carette, Jacques wrote: > More precisely, my version of the story; my co-authors can tell their > variations. This seems topical, given the recent discussion. > > > > I had been co-maintainer of copumpkin?s library. We managed to keep it > alive until agda 2.4.3 and limping in 2.4.4. After that, it broke > completely ? irrelevance had changed, and things did not seem easily > repairable. I tried to use the new Prop instead, but it was too new, and > that just did not work. > > > > Jason Hu then proposed that we rewrite it, from scratch, to be > proof-relevant. And in compatible-with-most-extensions MLTT, so enabling > ?safe and ?without-K too. Cubical was then way too new and experimental, > and ?main? Agda still needed a proper category theory library. > > > > I was quite convinced that that effort would be doomed to fail. However, I > was extremely curious as to why/where. I figured it wouldn?t take long to > encounter some unsurmountable roadblock, I would learn something cool in > that failure, and move on. I had been in ?Setoid hell? before, and it was > quite unpleasant indeed. subst-hell, however, is considerably worse, but > that?s another story. > > > > But, much to our mutual surprise, things did not fail. It wasn?t even > hard. One did have to be careful: > - avoid strictness at all costs. Never, ever, ever, compare objects for > equality. But that?s ok, so does modern category theory. > - avoid heterogeneous equality at all costs. That?s ok, so does modern > category theory. > - explicit levels are your friends. use them, just like types, they guide > you to the ?nice? answers. > - definitional equality is important. borrow other?s variants of > definitions that obey the usual symmetries definitionally. > - embrace the fact that, in that setting, bits and pieces of higher > category leaks in. > > > > And we ended up building the largest, in terms of number of concepts and > theorems, category theory library in any proof assistant. [See the paper > for the details of that. A preprint is on the arxiv, it?s been accepted to > CPP 2021. Though Lean might surpass us soon on sheer size.] > > > > Some things work out really, really nicely. For example, a Bicategory is > defined as a category-enriched category with 2 extra coherence laws. Very > simple. Compare to the ?expanded? definition on the nLab (or in other?s > libraries). > > > > The setting also saved me at least once: I foolishly believed the > too-na?ve version of the Grothendieck construction that?s on Wikipedia and > tried to implement it. And it worked? except for that most pesky of > Setoid-induced law ?-resp-?. Because, well, it?s false. Because the > Grothendieck construction really doesn?t work on the 1-categorical level, > it really really does need a Pseudofunctor. The nLab, as usual, saved the > day. > > > > And while I?m telling a story, categorical stories without Adjoint > Functors is not quite complete, right? [I?ll forgo Yoneda, this once ? > ]. There are, in the literature, multiple definitions of adjointness, and > proofs of their equivalence. The good proofs have weasel words here and > there about size issues. Here, Agda shines: the normal encoding of all the > definitions ?work?, but the most elegant definition (Hom isomorphism) is > not level polymorphic, while the unit-counit definition is! This was quite > shocking. There are a few other definitions in CT that are like that too, > where only one of the various definitions is fully level-polymorphic. I > think this betrays the fact that most of CT was worked out in a > set-theoretic meta-theory, where universe sizes are not first-class. > > > > Personally, I am a big fan of the ?mathematics multiverse? (thanks for > Andrej Bauer for the phrasing), where one ought to explore what mathematics > looks like in different meta-theories. I kind of like poking around in > various bits of it, whether it?s fashionable or not. Some math, such as > category theory, seems remarkably robust with respect to changes in > meta-theory (within reason). > > > > So, for all who have managed to read this far: do I think that this is THE > way to build category theory in Agda? No! It is _*A*_ way. A perfectly > fine, surprisingly workable way. Would it be how I would build it in > cubical Agda? Absolutely not! That would seem rather perverse. > > > > Jacques > > > > PS: Categories with Families. Those have stumped me in this setting. At > least, Pi-types in that setting have. It?s subst-hell all over again. I?m > going to wait until someone does Bicategories with Families, or whatever a > proper 2-categorical equivalent is. > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From komendantskaya at gmail.com Thu Dec 17 16:02:55 2020 From: komendantskaya at gmail.com (Ekaterina Komendantskaya) Date: Thu, 17 Dec 2020 15:02:55 +0000 Subject: [Agda] PhD studentships in Robotics (Edinburgh Center for Robotics) Message-ID: Dear colleagues, Edinburgh Center for Robotics has published a fresh call for PhD scholarship applications. There will be space for verification and programming language research: see item 3: *" explainable AI, certification, verification, safety, security, multi-agent interactions;"* It is an ideal opportunity for PhD students who wish to apply their knowledge in Programming Languages and Verification to the growing field of Robotics and Autonomous systems research. See below the official advert and contact me directly if you need more information. *************************************** The Edinburgh Centre of Robotics is offering exciting PhD Studentships for September 2021 through the EPSRC Centre for Doctoral Training in Robotics and Autonomous Systems (CDT-RAS). A limited number of industry PhD placements may also be available and information about these opportunities is posted here . *Closing date 29**th** January 2021* Heriot-Watt University and the University of Edinburgh are jointly offering an exciting opportunity to study a PhD through an innovative 4-year PhD training programme, drawing on our extensive experience with postgraduate teaching and research supervision in the area of Robotics and Autonomous Systems. The Centre's goal is to train innovation-ready robotics researchers to be part of a multi-disciplinary team, focusing on *Safe Interaction for Robotics.* PhD candidates specialise in one of the following four areas, whilst gaining a deep understanding of technical aspects and theoretical foundations: 1. *Physical Interactions**: *control, actuation, compliance, sensing, mapping, planning, embodiments, swarms; 2. *People Interactions*: human-robot interaction, affective robotics, smart spaces, human-robot teaming, collaborative decision-making, cobots, multimodal interfaces; 3. *Self-Interactions*: condition monitoring, prognosis, explainable AI, certification, verification, safety, security, multi-agent interactions; 4. *Interaction Enablers*: vision, embedded and parallel computing, novel and soft fabrication methods, optimisation, (transparent) machine learning, deep reinforcement learning and other AI techniques inc. natural language processing (NLP). Achieving impact with robotics also requires non-technical skills, for example an understanding of technology translation, creativity and entrepreneurial processes. These are an essential component of the CDT programme, captured in the #Cauldron training programme. Why join us? ? Flexible programme structure allows students to tailor courses to match research area of interest in year one, ensuring students have a strong general grounding in responsible research, current theory, methods and applications as a solid foundation for their PhD research. ? Cohort approach with activities including group projects and away days encourages peer support and cross fertilisation of ideas. ? Opportunity for international placement in prestigious research laboratory in year three. ? Bespoke #Cauldron training programme to provide non-technical skills such as understanding of technology translation, creativity, and entrepreneurial processes. ? Gateway seminars with prestigious speakers. ? Fund to seed innovation. ? Fully funded posts available paying stipend and Home fees, limited posts for overseas students More information on PhD placements and how to apply: www.edinburgh-robotics.org/apply *************** Prof. Ekaterina Komendantskaya Department of Computer Science School of Mathematical and Computer Sciences Earl Mountbatten Building [ building 21, office G26 ] Heriot-Watt University Edinburgh, UK, EH14 4AS +44 (0)131 451 8283 http://www.macs.hw.ac.uk/~ek19/ http://www.laiv.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From psperatto at vera.com.uy Thu Dec 17 21:24:43 2020 From: psperatto at vera.com.uy (Patricia Peratto) Date: Thu, 17 Dec 2020 17:24:43 -0300 (UYT) Subject: [Agda] installing agda In-Reply-To: <1361511187.3882308.1608236239736.JavaMail.zimbra@vera.com.uy> Message-ID: <213728349.3887813.1608236683935.JavaMail.zimbra@vera.com.uy> I have installed the following software: ghc version 8.6.5 cabal version 2.4.1.0 emacs for windows 27.1 When I execute cabal update it finishes. I have executed cabal install Agda many times. the last time has answered: Starting Agda-2.6.1.2 Building Agda-2.6.1.2 and lasts hours without finishing. I'm missing some step in the installation? Regards, Patricia -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.wood.100 at strath.ac.uk Thu Dec 17 23:18:43 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Thu, 17 Dec 2020 22:18:43 +0000 Subject: [Agda] installing agda In-Reply-To: <213728349.3887813.1608236683935.JavaMail.zimbra@vera.com.uy> References: <213728349.3887813.1608236683935.JavaMail.zimbra@vera.com.uy> Message-ID: Hi Patricia, The apparent stall at exactly this point in the installation is a known problem. You really may have to wait a few hours with it not printing anything. All the best, James On 17/12/2020 20:24, Patricia Peratto wrote: > CAUTION: This email originated outside the University. Check before > clicking links or attachments. > I have installed the following software: > > ghc version 8.6.5 > cabal version 2.4.1.0 > emacs for windows 27.1 > > When I execute cabal update it finishes. > I have? executed cabal install Agda many times. > > the last time has answered: > > Starting? ? ? Agda-2.6.1.2 > Building? ? Agda-2.6.1.2 > > and lasts hours without finishing. > > I'm missing some step in the installation? > > Regards, > Patricia > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > From P.Achten at cs.ru.nl Fri Dec 18 16:54:32 2020 From: P.Achten at cs.ru.nl (Peter Achten) Date: Fri, 18 Dec 2020 16:54:32 +0100 Subject: [Agda] [TFPIE'21] Second Call For Papers: Trends in Functional Programming *in Education* 2021, 16 February 2021 (with Lambda Days 2021 & TFP 2021) Message-ID: <9509f400-0d22-a345-9123-44f94b9e6203@cs.ru.nl> ----------------------------------- ?? TFPIE 2021 2nd Call for papers ----------------------------------- https://wiki.tfpie.science.ru.nl/TFPIE2021#TFPIE_2021 (February 16 2021, co-organized with TFP 2021 and Lambda Days 2021) Because of the covid pandemic, the events are online this year. The goal of the International Workshops on Trends in Functional Programming in Education is to gather researchers, professors, teachers, and all professionals that use or are interested in the use of functional programming in education. TFPIE aims to be a venue where novel ideas, classroom-tested ideas, and work in progress on the use of functional programming in education are discussed. The one-day workshop will foster a spirit of open discussion by having a review process for publication after the workshop. TFPIE 2021 welcomes submissions in the above mentioned areas. This year many teaching programmes have had to make a rapid transition to online teaching, and we explicitly solicit papers that explore this area of teaching functional programming. Topics of interest include, but are not limited to: -? FP and beginning CS students -? FP and Computational Thinking -? FP and Artificial Intelligence -? FP in Robotics -? FP and Music -? Advanced FP for undergraduates -? FP in graduate education -? Engaging students in research using FP -? FP in Programming Languages -? FP in the high school curriculum -? FP as a stepping stone to other CS topics -? FP and Philosophy -? The pedagogy of teaching FP -? FP and e-learning: MOOCs, automated assessment etc. -? Best Lectures - more details below In addition to papers, we are requesting best lecture presentations. What's your best lecture topic in an FP related course? Do you have a fun way to present FP concepts to novices or perhaps an especially interesting presentation of a difficult topic? In either case, please consider sharing it. Best lecture topics will be selected for presentation based on a short abstract describing the lecture and its interest to TFPIE attendees. The length of the presentation should be comparable to that of a paper. On top of the lecture itself, the presentation can also provide commentary on the lecture. Submissions Potential presenters are invited to submit an extended abstract (4-6 pages) or a draft paper (up to 20 pages) in EPTCS style. The authors of accepted presentations will have their preprints and their slides made available on the workshop's website. Papers and abstracts can be submitted via easychair at the following link: https://easychair.org/conferences/?conf=tfpie2021 After the workshop, presenters are invited to submit (a revised version of) their article for review. The PC will select the best articles for publication in the Electronic Proceedings in Theoretical Computer Science (EPTCS). Articles rejected for presentation and extended abstracts will not be formally reviewed by the PC. Dates -? Submission deadline: January 11 2021, Anywhere on Earth. -? Notification: January 15 2021 -? Workshop: February 16 2021 -? Submission for formal review: April 20 2021, Anywhere on Earth. -? Notification of full article: June 7 2021 -? Camera ready: July 1st 2021 Program Committee - Peter Achten,??? Radboud University, Netherlands (chair) - Edwin Brady,???? University of St Andrews, UK - Laura Castro,??? Universidade da Coru?a, Spain - Stephen Chang,?? University of Massachusetts Boston, USA - Youyou Cong,???? Tokyo Institute of Technology, Japan - Matthew Flatt,?? University of Utah, USA - Seth Fogarty,??? Trinity University, USA - Alex Gerdes,???? University of Gothenburg, Sweden - Gabriele Keller, Utrecht University, Netherlands - Prabhakar Ragde, University of Waterloo, Canada - Melinda T?th,??? E?tv?s Lor?nd University, Budapest, Hungary Registration TFPIE is part of Lambda Days. Please visit the Lambda Days 2021 pages when registration information becomes available. Only papers that have been presented at TFPIE may be submitted to the post-reviewing process. Information on Lambda Days is available at https://www.lambdadays.org/lambdadays2021 Information on TFP???????? is available at http://tfp2021.org From Jesper at sikanda.be Fri Dec 18 17:47:35 2020 From: Jesper at sikanda.be (Jesper Cockx) Date: Fri, 18 Dec 2020 17:47:35 +0100 Subject: [Agda] installing agda In-Reply-To: References: <213728349.3887813.1608236683935.JavaMail.zimbra@vera.com.uy> Message-ID: Dear Patricia, There is a known problem with the current release of Agda that is unfortunately still open and causes Agda installation to use very high amounts of memory which can slow down installation to a crawl on some machines, see https://github.com/agda/agda/issues/4521. As a workaround, you can try to `cabal fetch` the source code and then manually edit `Agda.cabal` by removing the two flags `-fexpose-all-unfoldings` and `-fspecialise-aggressively`. (Perhaps someone else knows of an easier way to do that?) I'm really sorry for this problem, especially as you could say I caused it in the first place by adding these flags (with good intentions). I hope we can get https://github.com/agda/agda/pull/5086 merged in quickly and have a minor release soon to fix the problem. Best, Jesper On Thu, Dec 17, 2020 at 11:19 PM James Wood wrote: > Hi Patricia, > > The apparent stall at exactly this point in the installation is a known > problem. You really may have to wait a few hours with it not printing > anything. > > All the best, > James > > On 17/12/2020 20:24, Patricia Peratto wrote: > > CAUTION: This email originated outside the University. Check before > > clicking links or attachments. > > I have installed the following software: > > > > ghc version 8.6.5 > > cabal version 2.4.1.0 > > emacs for windows 27.1 > > > > When I execute cabal update it finishes. > > I have executed cabal install Agda many times. > > > > the last time has answered: > > > > Starting Agda-2.6.1.2 > > Building Agda-2.6.1.2 > > > > and lasts hours without finishing. > > > > I'm missing some step in the installation? > > > > Regards, > > Patricia > > > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolai.kraus at gmail.com Sat Dec 19 22:18:47 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Sat, 19 Dec 2020 21:18:47 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> Message-ID: Peter, thanks a lot for explaining this [again]! It's a really interesting observation that setoid-categories are a "maximally unsaturated" version of 1-categories. What is unfortunate is that such unsaturated notions are very representation-dependent. Different choices of representation, which would lead to equivalent saturated definitions, give non-equivalent unsaturated definitions. Do you have intuition for which choices lead to well-behaved structures? Or is this just a matter of trying it out? My impression is that, in order to get well-behaved structures, we either want no redundancy at all *or* as much redundancy, and thus "leeway", as possible. Here, I mean "redundancy" in the sense of "missing conditions on which components should be identified". Intuition: If we do a construction and all the input is perfect, then we hopefully can expect the result to be perfect, so the construction works. Or, if the input doesn't satisfy any conditions, but we also don't require the output to satisfy any conditions, then the construction also works. But if the input is "partially ok" and the output is required to be "partially ok", then the risk is that the wrong part of the output will be "partially ok". This is similar to what you said about saturation (and probably something similar can be said about strictness). Univalent categories have no redundancy, and the agda-categories library includes a lot of redundancy. What if we remove some redundancy from agda-categories? If, for example, we remove `sym-assoc` in https://agda.github.io/agda-categories/Categories.Category.Core.html and replace all occurrences by what we get from `assoc` and the witness of `IsEquivalence (_?_)`? This would cause more work in some places (judging by the comment on why `sym-assoc` was included), but could all constructions still be fixed? I would expect they can, but I don't think it's a priori clear. Jacques, did you find that some redundancy is really required rather than just convenient in the implementation? Nicolai On 16/12/2020 16:20, Peter LeFanu Lumsdaine wrote: > On Wed, Dec 16, 2020 at 1:40 PM Thorsten Altenkirch > > wrote: > > > > But this is not the arrow category it is something else. > > No, that construction really is the arrow category (when one is taking > ?category? = ?category with hom-setoids?), and behaves in all the ways > you expect the construction to behave!? It?s not ?forgetting? the > setoid-equalities on arrows ? those are still there, just as > isomorphisms in the category ? so it doesn?t mean you need to make > objects a setoid as well, or anything like that. > > Following the HoTT/univalent analysis of category theory, one can see > that setoid-based categories fit very naturally into the hierarchy of > notions of ?(n-)category? with varying levels of ?saturation?.? Just > like ?precategories? (e.g. categories in classical foundations) don?t > assume saturation/univalence at the object level, if you relax > saturation at the levels of arrows/equalities as well, then you get > categories with hom-setoids. > > I gave the main details of this in my talk at the memorial conference > for Erik Palmgren. > Slides: > http://logic.math.su.se/palmgren-memorial/slides/Lumsdaine-slides-Palmgren-memorial-conference.pdf > Video: https://youtu.be/glC8tC7xdBY > > Category theory seems to develop well as long as your saturation > assumption is of the form ?saturated in levels ?n? for some n. > ??Univalent categories? = ?saturated in levels ?0?; ?precategories? = > ?saturated in levels ?1?; ?setoid-categories? = ?not saturated at all? > ? all of these give a good development of category theory. ??Wild > categories? are badly behaved exactly because when you view them in > this analysis, they assume ?saturation of arrows? (1-saturation) but > NOT ?saturation of 2-cells? (2-saturation, which turns out to be the > condition that equality on arrows is propositional). > > There are certainly reasons (theoretical and practical) to prefer the > non-setoid versions for many purposes ? just as there are purposes for > which the setoid versions are good ? and also just like how there are > advantages and disadvantages to always requiring saturation at the > object level.? But these are all natural parts of the same > mathematical picture ? it certainly isn?t a matter of ?the right > mathematical way? vs ?nasty hacks? or ?assembly language?. > > ?Peter. > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolai.kraus at gmail.com Sat Dec 19 22:46:47 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Sat, 19 Dec 2020 21:46:47 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <41F69196-A88A-4D71-9D45-8166E56A0FC5@nottingham.ac.uk> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> <41F69196-A88A-4D71-9D45-8166E56A0FC5@nottingham.ac.uk> Message-ID: On Wed, Dec 16, 2020 at 7:44 PM Thorsten Altenkirch < Thorsten.Altenkirch at nottingham.ac.uk> wrote: > It is something else because you can still observe the codes underlying > the setoid > I think you say this because you view setoid-categories as a hack to make the implementation work. Something can be a hack and, by coincidence (?), a mathematically meaningful concept at the same time. For me, Peter's email/talk explains why this is the case here. It's really not surprising that there are different views: If you have a bicategory, the 2-morphisms could be exposing implementation details (which you want to hide), but they could also be interesting structure (which you want to see). One really has to judge on a case-by-case basis. > and you can define functions that do not repsect the steoid equality. > Functors have to preserve the setoid morphisms. It's part of the structure, in the same way as it's part of the structure that functors act on the category morphisms. Sure, it's not automatic in the sense it is automatic for >=1-saturated/completed categories. Setoids are ok once we hide them by making the mandatory. Mixing setoids > and sets is harmful. > > I don't think "harmful" is the right word here... As Peter has explained, the "mix" gives you a notion of "unsaturated category", and this notion turns out to be well-behaved. Nicolai > > Thorsten > > > > *From: *Agda on behalf of Peter LeFanu > Lumsdaine > *Date: *Wednesday, 16 December 2020 at 16:22 > *To: *Thorsten Altenkirch > *Cc: *"agda at lists.chalmers.se" > *Subject: *Re: [Agda] Tips for working around proof relevance > > > > On Wed, Dec 16, 2020 at 1:40 PM Thorsten Altenkirch < > Thorsten.Altenkirch at nottingham.ac.uk> wrote: > > > > But this is not the arrow category it is something else. > > No, that construction really is the arrow category (when one is taking > ?category? = ?category with hom-setoids?), and behaves in all the ways you > expect the construction to behave! It?s not ?forgetting? the > setoid-equalities on arrows ? those are still there, just as isomorphisms > in the category ? so it doesn?t mean you need to make objects a setoid as > well, or anything like that. > > > > Following the HoTT/univalent analysis of category theory, one can see that > setoid-based categories fit very naturally into the hierarchy of notions of > ?(n-)category? with varying levels of ?saturation?. Just like > ?precategories? (e.g. categories in classical foundations) don?t assume > saturation/univalence at the object level, if you relax saturation at the > levels of arrows/equalities as well, then you get categories with > hom-setoids. > > > > I gave the main details of this in my talk at the memorial conference for > Erik Palmgren. > Slides: > http://logic.math.su.se/palmgren-memorial/slides/Lumsdaine-slides-Palmgren-memorial-conference.pdf > Video: https://youtu.be/glC8tC7xdBY > > > > Category theory seems to develop well as long as your saturation > assumption is of the form ?saturated in levels ?n? for some n. ?Univalent > categories? = ?saturated in levels ?0?; ?precategories? = ?saturated in > levels ?1?; ?setoid-categories? = ?not saturated at all? ? all of these > give a good development of category theory. ?Wild categories? are badly > behaved exactly because when you view them in this analysis, they assume > ?saturation of arrows? (1-saturation) but NOT ?saturation of 2-cells? > (2-saturation, which turns out to be the condition that equality on arrows > is propositional). > > > > There are certainly reasons (theoretical and practical) to prefer the > non-setoid versions for many purposes ? just as there are purposes for > which the setoid versions are good ? and also just like how there are > advantages and disadvantages to always requiring saturation at the object > level. But these are all natural parts of the same mathematical picture ? > it certainly isn?t a matter of ?the right mathematical way? vs ?nasty > hacks? or ?assembly language?. > > > > ?Peter. > > > > > > This message and any attachment are intended solely for the addressee > and may contain confidential information. If you have received this > message in error, please contact the sender and delete the email and > attachment. > > Any views or opinions expressed by the author of this email do not > necessarily reflect the views of the University of Nottingham. Email > communications with the University of Nottingham may be monitored > where permitted by law. > > > > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thorsten.Altenkirch at nottingham.ac.uk Sun Dec 20 13:28:06 2020 From: Thorsten.Altenkirch at nottingham.ac.uk (Thorsten Altenkirch) Date: Sun, 20 Dec 2020 12:28:06 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> <41F69196-A88A-4D71-9D45-8166E56A0FC5@nottingham.ac.uk>, Message-ID: I rather think that is a clever defense of a bad idea. Setoids are the workaround for a lack of extensionality the sooner people stop using them the better. Sent from my iPhone On 19 Dec 2020, at 21:47, Nicolai Kraus wrote: ? On Wed, Dec 16, 2020 at 7:44 PM Thorsten Altenkirch > wrote: It is something else because you can still observe the codes underlying the setoid I think you say this because you view setoid-categories as a hack to make the implementation work. Something can be a hack and, by coincidence (?), a mathematically meaningful concept at the same time. For me, Peter's email/talk explains why this is the case here. It's really not surprising that there are different views: If you have a bicategory, the 2-morphisms could be exposing implementation details (which you want to hide), but they could also be interesting structure (which you want to see). One really has to judge on a case-by-case basis. and you can define functions that do not repsect the steoid equality. Functors have to preserve the setoid morphisms. It's part of the structure, in the same way as it's part of the structure that functors act on the category morphisms. Sure, it's not automatic in the sense it is automatic for >=1-saturated/completed categories. Setoids are ok once we hide them by making the mandatory. Mixing setoids and sets is harmful. I don't think "harmful" is the right word here... As Peter has explained, the "mix" gives you a notion of "unsaturated category", and this notion turns out to be well-behaved. Nicolai Thorsten From: Agda > on behalf of Peter LeFanu Lumsdaine > Date: Wednesday, 16 December 2020 at 16:22 To: Thorsten Altenkirch > Cc: "agda at lists.chalmers.se" > Subject: Re: [Agda] Tips for working around proof relevance On Wed, Dec 16, 2020 at 1:40 PM Thorsten Altenkirch > wrote: > > But this is not the arrow category it is something else. No, that construction really is the arrow category (when one is taking ?category? = ?category with hom-setoids?), and behaves in all the ways you expect the construction to behave! It?s not ?forgetting? the setoid-equalities on arrows ? those are still there, just as isomorphisms in the category ? so it doesn?t mean you need to make objects a setoid as well, or anything like that. Following the HoTT/univalent analysis of category theory, one can see that setoid-based categories fit very naturally into the hierarchy of notions of ?(n-)category? with varying levels of ?saturation?. Just like ?precategories? (e.g. categories in classical foundations) don?t assume saturation/univalence at the object level, if you relax saturation at the levels of arrows/equalities as well, then you get categories with hom-setoids. I gave the main details of this in my talk at the memorial conference for Erik Palmgren. Slides: http://logic.math.su.se/palmgren-memorial/slides/Lumsdaine-slides-Palmgren-memorial-conference.pdf Video: https://youtu.be/glC8tC7xdBY Category theory seems to develop well as long as your saturation assumption is of the form ?saturated in levels ?n? for some n. ?Univalent categories? = ?saturated in levels ?0?; ?precategories? = ?saturated in levels ?1?; ?setoid-categories? = ?not saturated at all? ? all of these give a good development of category theory. ?Wild categories? are badly behaved exactly because when you view them in this analysis, they assume ?saturation of arrows? (1-saturation) but NOT ?saturation of 2-cells? (2-saturation, which turns out to be the condition that equality on arrows is propositional). There are certainly reasons (theoretical and practical) to prefer the non-setoid versions for many purposes ? just as there are purposes for which the setoid versions are good ? and also just like how there are advantages and disadvantages to always requiring saturation at the object level. But these are all natural parts of the same mathematical picture ? it certainly isn?t a matter of ?the right mathematical way? vs ?nasty hacks? or ?assembly language?. ?Peter. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. _______________________________________________ Agda mailing list Agda at lists.chalmers.se https://lists.chalmers.se/mailman/listinfo/agda This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carette at mcmaster.ca Sun Dec 20 18:04:56 2020 From: carette at mcmaster.ca (Jacques Carette) Date: Sun, 20 Dec 2020 12:04:56 -0500 Subject: [Agda] Tips for working around proof relevance In-Reply-To: References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> Message-ID: <79fe0763-99a5-42a3-361c-833cde80bb79@mcmaster.ca> On 2020-Dec.-19 16:18 , Nicolai Kraus wrote: > > Univalent categories have no redundancy, and the agda-categories > library includes a lot of redundancy. What if we remove some > redundancy from agda-categories? If, for example, we remove `sym-assoc` in > https://agda.github.io/agda-categories/Categories.Category.Core.html > and replace all occurrences by what we get from `assoc` and the > witness of `IsEquivalence (_?_)`? This would cause more work in some > places (judging by the comment on why `sym-assoc` was included), but > could all constructions still be fixed? I would expect they can, but I > don't think it's a priori clear. Jacques, did you find that some > redundancy is really required rather than just convenient in the > implementation? "Required" is complicated. The reason for sym-assoc is for definitional equality. This way C.op.op is definitionally equal to C. Otherwise, it is merely propositionally equal, and this means that some things that normally typecheck in category theory no longer do.? This idea first arose in Coq https://arxiv.org/abs/1401.7694 (published in ITP 2014) in work of Gross, Chlipala and Spivak.? Without this, quite a few things end up needing noisy trivial isomorphisms inserted, and higher category theory gets ugly, when it shouldn't. Basically: if you believe that Duality is something that is core to category theory, and that this should be reflected by a lot of double-duals being definitionally true (not just 'op' on categories, but for many other categorical constructions), then this redundancy is something you want. That is one slight cost of being proof-relevant. In practice, because of our "smart constructors", end-users are not affected by this, unless they blindly let Agda expanded out the needed records instead of taking a second to ponder how to best build things. We believe that it is "required", in the sense that this way our statements of most of category theory look very familiar, i.e. correspond closely to what is in textbooks. It is not required in the sense that it would be possible to force things to work without them, at the cost of more and more constructions looking noisy. Not that they would be wrong. A better way to look at it would be that much more of higher category theory would "leak down" without that redundancy. Jacques From james.wood.100 at strath.ac.uk Sun Dec 20 23:16:41 2020 From: james.wood.100 at strath.ac.uk (James Wood) Date: Sun, 20 Dec 2020 22:16:41 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <79fe0763-99a5-42a3-361c-833cde80bb79@mcmaster.ca> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> <79fe0763-99a5-42a3-361c-833cde80bb79@mcmaster.ca> Message-ID: <2b8019d6-8dbf-498e-5d38-0fc08acc89c5@strath.ac.uk> On 20/12/2020 17:04, Jacques Carette wrote: > The reason for sym-assoc is for definitional equality. This way C.op.op > is definitionally equal to C. Otherwise, it is merely propositionally > equal, and this means that some things that normally typecheck in > category theory no longer do. The way stdlib is set up, you don't even get propositional equality without some extra work. With the na?ve definition (i.e, the agda-categories definition without sym-assoc), we get that op (op C) .assoc f g h = sym (sym (C .assoc f g h)) . To get a propositional equality from this to C .assoc f g h, we would need Setoid to give us some propositional equations. We could either enforce that the equivalence relation is h-prop-valued (probably the right thing) or add groupoid coherence laws. On top of that, we would need function extensionality. In any case, we should at least get an equivalence of categories, though I'm not sure how useful that is in practice in a non-univalent setting. In general, I think it's an interesting phenomenon that we can get ourselves into situations where judgemental equality is the only hope. The other example I can think of is how you can have a (badly behaved) category of Sets in plain Agda without using setoids because _?_ is judgementally unital and associative. James From nicolai.kraus at gmail.com Mon Dec 21 09:27:02 2020 From: nicolai.kraus at gmail.com (Nicolai Kraus) Date: Mon, 21 Dec 2020 08:27:02 +0000 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <2b8019d6-8dbf-498e-5d38-0fc08acc89c5@strath.ac.uk> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> <79fe0763-99a5-42a3-361c-833cde80bb79@mcmaster.ca> <2b8019d6-8dbf-498e-5d38-0fc08acc89c5@strath.ac.uk> Message-ID: <2731aa44-f208-47d9-cf8d-9eb7ae78918b@gmail.com> Jacques and James, thanks for the explanations! On 20/12/2020 22:16, James Wood wrote: > The way stdlib is set up, you don't even get propositional equality > without some extra work. Thanks for pointing this out. I wasn't aware of it. Asking the equivalence relation to be valued in h-props would be the first step towards saturation in Peter's hierarchy. Adding groupoid coherence laws would likely become insufficient after a while. Nicolai > To get a propositional equality from this to C .assoc f g h, we would > need Setoid to give us some propositional equations. We could either > enforce that the equivalence relation is h-prop-valued (probably the > right thing) or add groupoid coherence laws. On top of that, we would > need function extensionality. > > In any case, we should at least get an equivalence of categories, > though I'm not sure how useful that is in practice in a non-univalent > setting. In general, I think it's an interesting phenomenon that we > can get ourselves into situations where judgemental equality is the > only hope. The other example I can think of is how you can have a > (badly behaved) category of Sets in plain Agda without using setoids > because _?_ is judgementally unital and associative. > > James > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From andersmortberg at gmail.com Mon Dec 21 18:07:43 2020 From: andersmortberg at gmail.com (Anders Mortberg) Date: Mon, 21 Dec 2020 18:07:43 +0100 Subject: [Agda] Tips for working around proof relevance In-Reply-To: <2731aa44-f208-47d9-cf8d-9eb7ae78918b@gmail.com> References: <3262c7b6-0c18-d191-fd77-371f58612684@gmail.com> <1880BD6E-0982-45A2-A2CF-088F77ACE353@nottingham.ac.uk> <14a9a621-6678-f027-7b5e-e13530461dd6@strath.ac.uk> <79fe0763-99a5-42a3-361c-833cde80bb79@mcmaster.ca> <2b8019d6-8dbf-498e-5d38-0fc08acc89c5@strath.ac.uk> <2731aa44-f208-47d9-cf8d-9eb7ae78918b@gmail.com> Message-ID: The redundancy in the definition of category also pops up in most HoTT/UF libraries with some category theory: https://github.com/HoTT/HoTT/blob/master/theories/Categories/Category/Core.v#L40 https://unimath.github.io/doc/UniMath/4dd5c17/UniMath.CategoryTheory.Categories.html#is_precategory https://github.com/leanprover/lean2/blob/master/hott/algebra/category/precategory.hlean#L19 I learned about this trick from the paper Jacques linked to and having C^op^op being strictly the same as C is indeed very useful. If someone prefers to avoid this trick then they should develop CT in Cubical Agda where it's not necessary as sym is strictly involutive. :-) -- Anders On Mon, Dec 21, 2020 at 9:27 AM Nicolai Kraus wrote: > > Jacques and James, thanks for the explanations! > > On 20/12/2020 22:16, James Wood wrote: > > The way stdlib is set up, you don't even get propositional equality > > without some extra work. > > Thanks for pointing this out. I wasn't aware of it. > Asking the equivalence relation to be valued in h-props would be the > first step towards saturation in Peter's hierarchy. Adding groupoid > coherence laws would likely become insufficient after a while. > > Nicolai > > > To get a propositional equality from this to C .assoc f g h, we would > > need Setoid to give us some propositional equations. We could either > > enforce that the equivalence relation is h-prop-valued (probably the > > right thing) or add groupoid coherence laws. On top of that, we would > > need function extensionality. > > > > In any case, we should at least get an equivalence of categories, > > though I'm not sure how useful that is in practice in a non-univalent > > setting. In general, I think it's an interesting phenomenon that we > > can get ourselves into situations where judgemental equality is the > > only hope. The other example I can think of is how you can have a > > (badly behaved) category of Sets in plain Agda without using setoids > > because _?_ is judgementally unital and associative. > > > > James > > _______________________________________________ > > Agda mailing list > > Agda at lists.chalmers.se > > https://lists.chalmers.se/mailman/listinfo/agda > > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From mechvel at scico.botik.ru Mon Dec 21 22:46:59 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 22 Dec 2020 00:46:59 +0300 Subject: [Agda] irrelevancy annotation Message-ID: Please, how to fix the following example with irrelevancy denotation? module _ {A : Set ?} where data Null : List A ? Set ? where isNull : Null [] head : (xs : List A) .(nn : ? Null xs) ? A head (x ? _) _ = x head [] nn = contradiction isNull _ -- ? test : ? {xs} (nn nn' : ?Null xs) ? head xs nn ? head xs nn' test _ _ = refl The second pattern in `head` cannot be skipped, but I do not find how to fix it. Thanks, ------ Sergei From carette at mcmaster.ca Mon Dec 21 23:04:09 2020 From: carette at mcmaster.ca (Carette, Jacques) Date: Mon, 21 Dec 2020 22:04:09 +0000 Subject: [Agda] irrelevancy annotation In-Reply-To: References: Message-ID: Don't use double-negation. Instead of Null, use an HasElement data-structure. data HasElement : List A ? Set ? where has-elem : (x : A) {xs List A} -> HasElement (x ? xs) Then you need to match on both the list and has-elem enough to reveal the actual head. I don't know why you want this to be irrelevant though. Are you sure you don't want a Vec instead of a List? Lists are best understood as vectors that have forgotten their length. Jacques > -----Original Message----- > From: Agda On Behalf Of > mechvel at scico.botik.ru > Sent: December 21, 2020 4:47 PM > To: agda at lists.chalmers.se > Subject: [Agda] irrelevancy annotation > > Please, > how to fix the following example with irrelevancy denotation? > > module _ {A : Set ?} > where > data Null : List A ? Set ? where isNull : Null [] > > head : (xs : List A) .(nn : ? Null xs) ? A > head (x _) _ = x > head [] nn = contradiction isNull _ -- ? > > test : ? {xs} (nn nn' : ?Null xs) ? head xs nn ? head xs nn' > test _ _ = refl > > The second pattern in `head` cannot be skipped, but I do not find how to fix it. > > Thanks, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda From ulf.norell at gmail.com Tue Dec 22 09:51:04 2020 From: ulf.norell at gmail.com (Ulf Norell) Date: Tue, 22 Dec 2020 09:51:04 +0100 Subject: [Agda] irrelevancy annotation In-Reply-To: References: Message-ID: This should work: contradiction : .? ? A contradiction () head : (xs : List A) .(nn : ? Null xs) ? A head (x ? _) _ = x head [] nn = contradiction (nn isNull) / Ulf On Mon, Dec 21, 2020 at 10:47 PM wrote: > Please, > how to fix the following example with irrelevancy denotation? > > module _ {A : Set ?} > where > data Null : List A ? Set ? where isNull : Null [] > > head : (xs : List A) .(nn : ? Null xs) ? A > head (x ? _) _ = x > head [] nn = contradiction isNull _ -- ? > > test : ? {xs} (nn nn' : ?Null xs) ? head xs nn ? head xs nn' > test _ _ = refl > > The second pattern in `head` cannot be skipped, > but I do not find how to fix it. > > Thanks, > > ------ > Sergei > _______________________________________________ > Agda mailing list > Agda at lists.chalmers.se > https://lists.chalmers.se/mailman/listinfo/agda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mechvel at scico.botik.ru Tue Dec 22 16:09:32 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 22 Dec 2020 18:09:32 +0300 Subject: [Agda] irrelevancy annotation In-Reply-To: References: Message-ID: <8e20bc61d536aa025767c707d116f585@scico.botik.ru> On 2020-12-22 11:51, Ulf Norell wrote: > This should work: > > contradiction : .? ? A > contradiction () > > head : (xs : List A) .(nn : ? Null xs) ? A > head (x ? _) _ = x > head [] nn = contradiction (nn isNull) I see. Thank you. In about 2014, I had an unlucky experience with using irrelevancy annotation, have been stuck with type checking. Does anybody use successfully irrelevancy annotation? Thanks, -- SM From mechvel at scico.botik.ru Tue Dec 22 17:08:03 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 22 Dec 2020 19:08:03 +0300 Subject: [Agda] irrelevancy annotation In-Reply-To: References: Message-ID: <8240417ffccf09860f6f53dadc288ead@scico.botik.ru> On 2020-12-22 01:04, Carette, Jacques wrote: > Don't use double-negation. Instead of Null, use an HasElement > data-structure. > data HasElement : List A ? Set ? where > has-elem : (x : A) {xs List A} -> HasElement (x ? xs) > > Then you need to match on both the list and has-elem enough to reveal > the actual head. Thank you. I am going to try the approach. > I don't know why you want this to be irrelevant though. Because if it is defined head : (xs : List A) ? ? Null xs ? A then `refl' is not a proof for head xs nn ? head xs nn'. Many functions start to depend on the witness for a list non-emptiness. For example, I represent a polynomial in x mainly as a list of monomials, with adding certain conditions for ordering and for the coefficients being nonzero. For example, a*x^3 + b is represented as pol ((a , 3) :: (b , 0) :: []) _ _, where a, b /= 0#. Zero polynomial contains [] in its bag. So the degree function deg for a polynomial needs to be proj? ? head ? Pol.monomials. But it is defined only for a nonzero polynomial. So, deg depends on the witness for ? Null monomials. In algebra, we take it for granted that equal nonzero polynomials have equal degree. Bun with Agda, one needs to explicitly prove and apply the lemma of that deg (`head') is irrelevant on the non-emptiness witness. > Are you sure you don't want a Vec instead of a List? Lists are best > understood as > vectors that have forgotten their length. ? Never thought of this. Rather I thought reversely: List looks more basic than Vector. So, I use my home-made Vector: module OfVector {?} (A : Set ?) (n : ?) where data Vector : Set ? where vec : (xs : List A) ? length xs ? n ? Vector Having a bag of (vec xs _), it is possible to use all rich Standard library functionality for xs : List A. And conversion to List is in one step. And there is no need to add a huge functionality for Vector that would (I expect) actually copy the List functionality. ? -- SM From mechvel at scico.botik.ru Tue Dec 22 17:39:29 2020 From: mechvel at scico.botik.ru (mechvel at scico.botik.ru) Date: Tue, 22 Dec 2020 19:39:29 +0300 Subject: [Agda] irrelevancy annotation In-Reply-To: References: Message-ID: On 2020-12-22 01:04, Carette, Jacques wrote: > Don't use double-negation. Instead of Null, use an HasElement > data-structure. > data HasElement : List A ? Set ? where > has-elem : (x : A) {xs List A} -> HasElement (x ? xs) > > Then you need to match on both the list and has-elem enough to reveal > the actual head. > [..] Yes. This way it looks better: data HasElement : List A ? Set ? where hasElem : (x : A) {xs : List A} ? HasElement (x ? xs) head' : (xs : List A) ? .(he : HasElement xs) ? A head' (x ? _) _ = x test : ? {xs} (nn nn' : HasElement xs) ? head' xs nn ? head' xs nn' test _ _ = refl The second pattern in head' is now omitted. But the proof-relevance effect still needs some treating, because without the `dot', `test' is not proved by refl. -- SM From andrei.h.popescu at gmail.com Tue Dec 22 19:36:53 2020 From: andrei.h.popescu at gmail.com (Andrei Popescu) Date: Tue, 22 Dec 2020 18:36:53 +0000 Subject: [Agda] CPP 2021: Call for Participation and Lightning Talks Message-ID: *** Call for Participation and Lightning Talks *** *** Certified Programs and Proofs (CPP 2021) *** #### Executive Summary * Conference dates: 17-19 January 2021 (extended to 3 days!) * Lightning talks submission deadline: 8 January 2021 (AoE) * Lightning talks session: 18 January 2021 at 20:00 CET * Registration: https://popl21.sigplan.org/attending/Registration - Early registration deadline: 10 January 2021 (!) - Discounted registration available (see below) * Long pre-recorded talks available by: 11 January 2021 (AoE) #### General Information Certified Programs and Proofs (CPP) is an international conference on practical and theoretical topics in all areas that consider formal verification and certification as an essential paradigm. CPP spans areas of computer science, mathematics, logic, and education. CPP is sponsored by ACM SIGPLAN, in cooperation with ACM SIGLOG. For more information please visit https://popl21.sigplan.org/home/CPP-2021 CPP 2021 will be co-located with POPL 2021 and will take place on 17-19 January 2021, as a virtual meeting, where all papers are presented online. For more information about virtual conference organization have a look here: https://popl21.sigplan.org/venue/POPL-2021-venue CPP will also have both long and short versions of presentations, just that for us the short versions are 10 minutes long (not 5). #### Call for Lightning Talks CPP 2021 will include a session of 5-minute talks where attendees can present work-in-progress, preliminary research results, and emerging topics. Submission of such lightning talks proposals is lightweight: all we need is a title, an abstract, and the author names, affiliations, and contact information. - Lightning talks submission deadline: 8 January 2021 (AoE) - Lightning talks session: 18 January 2021 at 20:00 CET - Submission information coming up in the next couple of days at: https://popl21.sigplan.org/home/CPP-2021#Call-for-Participation-and-Lightning-Talks #### Discounted Registration We offer a $10 alternative registration fee for anyone for whom the normal registration fees could be an impediment to participation. #### Industrial Supporters Warm thanks to our generous industrial supporters: - Gold supporter: JetBrains - Silver supporters: Algorand, IOHK, and Nomadic Labs - Bronze supporters: Arm, BedRock Systems Inc, Digital Asset, Galois, Informal Systems Inc, and Zilliqa #### Invited Talks - Tobias Nipkow (Technische Universit?t M?nchen): Teaching Algorithms and Data Structures with a Proof Assistant - Peter Sewell (University of Cambridge): Underpinning the foundations: Sail-based semantics, testing, and reasoning, for production and CHERI-enabled architectures #### Accepted Papers, Program, and Distinguished Paper Awards The list of papers accepted at CPP 2021 is available at https://popl21.sigplan.org/home/CPP-2021#event-overview A preliminary program is also available: https://popl21.sigplan.org/home/CPP-2021#program Starting with this edition we introduced the CPP Distinguished Paper Awards, aimed at accepted submissions that stand out with respect to originality, significance, and clarity. The three Distinguished Papers selected for CPP 2021 are: - A Minimalistic Verified Bootstrapped Compiler (Proof Pearl) by Magnus O. Myreen - Formalizing the Ring of Witt Vectors by Johan Commelin and Robert Y. Lewis - Machine-Checked Semantic Session Typing by Jonas Kastberg Hinrichsen, Daniel Louwrink, Robbert Krebbers and Jesper Bengtson #### Contact For any questions please contact the chairs: Catalin Hritcu , Andrei Popescu , Lennart Beringer From capn.freako at gmail.com Thu Dec 31 23:40:10 2020 From: capn.freako at gmail.com (David Banas) Date: Thu, 31 Dec 2020 14:40:10 -0800 Subject: [Agda] Why are some terms in the Agda goal report colored blue? Message-ID: Hi all, What's the significance of some of the terms in the Agda goal report (in response to: `C-c C-,` in Emacs) being colored blue? Thanks, -db -------------- next part -------------- An HTML attachment was scrubbed... URL: