/home/laney/.irssi/irclogs/Freenode/2011/#agda/May.log

--- Log opened Sun May 01 00:00:28 2011
* Saizan wonders if records with "indices" would make sense01/05 02:09
copumpkinSaizan: how?01/05 02:13
Saizandon't know, by magically knowing how to apply the refinements during eta conversion..01/05 02:14
Saizan  data Split : Tm G T -> Set where01/05 02:15
Saizan    split : ∀ {J S E[_]}{H : Tm J S} -> Context E[_] -> Split E[ H ]01/05 02:15
Saizanit's ugly to have to pattern match on that split constructor01/05 02:17
dolioCoinductive families, man.01/05 02:40
Saizan..i vaguely remember something like that01/05 02:46
djahandarieDon't those not exist anymore?01/05 02:48
Saizanah, yeah, record Foo Nat : Set where proj1 : Foo zero -> Something -- stuff like this, which i'm not sure how much it's related to coinductive families actually01/05 02:49
Saizanthat would just require me to prove the index matches before i can apply the projection though01/05 02:50
dolioThey never existed.01/05 02:52
djahandarieAh01/05 02:52
djahandarieI swear I remember them being around at one point then being removed01/05 02:53
dolioNot in the sense I'm talking about.01/05 02:53
Saizanthe codata stuff was still defined via the constructors01/05 02:58
copumpkinwas codata Moo : Blah -> Set where ... allowed?01/05 02:59
copumpkinI never tried it01/05 02:59
copumpkinand now it's too late :'( :'(01/05 02:59
Saizani think so01/05 02:59
djahandarieSaizan, that's a valid way to define codata though, right? I guess the point here was that writing it in that fashion isn't helpful here01/05 03:00
dolioYes, it was.01/05 03:00
Saizandjahandarie: yeah01/05 03:01
xplatgah, still no luck with this stupid rewrite01/05 03:20
xplaton the plus side, i refactored a bunch of the other code and made it 100 times cleaner01/05 03:21
xplatdefinitional equality sure is way more useful than propositional equality, except when you don't have it :701/05 03:22
copumpkin:O01/05 03:22
copumpkinwhat are you working on again?01/05 03:22
xplatstill Power01/05 03:22
copumpkinah okay01/05 03:22
xplatand still _\||_01/05 03:22
copumpkinxplat: come to Boston so we can all hack on agda together in person!! there's talk of starting a boston hackathon at some point, too01/05 03:23
copumpkinwell actually I'm about to disappear for a couple of weeks myself01/05 03:24
xplati have a working F\_1 which is just «F₁ fs i = uncurry {z = ℓ} _cat_ (⟨ F.F₁ , G.F₁ ⟩ (n ✂′ fs)) i»01/05 03:24
* Saizan wonders what copumpkin will do when he has gathered all the agda/haskellers of the world in boston01/05 03:25
xplat... plus a ginormous \===-subst to get the type right, which unfortunately shows up in the types of the laws, so i'm trying to get rid of it01/05 03:25
copumpkinSaizan: you're on the hit list too, you know01/05 03:25
copumpkinlots of italians in boston! ;)01/05 03:25
xplatSaizan: world conquest01/05 03:25
copumpkin:)01/05 03:25
copumpkinthat's actually edwardk's goal01/05 03:26
xplati have a hard time believing that01/05 03:27
xplati mean, he hasn't even done it yet01/05 03:27
xplatso i'm thinking it's more like a hobby project01/05 03:27
Saizanxplat: so you'd rather have the name of a where-defined lemma in the types of the laws than subst?:)01/05 03:27
copumpkinwell, he tries to bring everyone to Boston, anyway01/05 03:27
djahandarieWorld conquest via. category theory01/05 03:27
xplatSaizan: no, only yes, because it would be smaller01/05 03:28
Saizanit's much easier via type theory, 1) prove bottom 2) ???? 3) quodlibet01/05 03:28
copumpkinlol01/05 03:28
xplatdoesn't ???? usually come before prove bottom?01/05 03:28
copumpkinwell in this case ???? has a name, I guess01/05 03:29
xplatlike 1) assume powersets 2) ???? 3) prove bottom01/05 03:29
Saizan???? is the surprise of having succeeded01/05 03:29
copumpkinaha!01/05 03:29
Saizanif you google for "first class telescopes" you get nasa results01/05 03:33
xplathttp://hpaste.org/46205/they_call_me_an_elitist_becaus01/05 03:37
copumpkinlol01/05 03:37
copumpkindude wtf01/05 03:37
copumpkin:P01/05 03:37
dolioDude.01/05 03:37
copumpkinlots of trans with refl01/05 03:38
xplatyeah, i was surprised that didn't go away01/05 03:38
copumpkinit doesn't know that!01/05 03:38
copumpkinyou must tell it01/05 03:38
doliof x = id (id (id (id (id (id (id (id x)))))))01/05 03:38
copumpkin≣-subst (λ x → x)01/05 03:38
copumpkinthat's a nice subst too01/05 03:39
xplati was all 'hey i can put in these machine-checkable comments'01/05 03:39
Saizanis this normalized?01/05 03:39
xplatcopumpkin: well, it was already a type and there wasn't any common neutral head01/05 03:39
xplat(or type constructor head)01/05 03:39
doliotrans p refl doesn't reduce.01/05 03:40
xplatSaizan: it ... appears to be normalized.01/05 03:40
Saizanhe has a bunch of trans refl p though01/05 03:40
dolioDoes he?01/05 03:40
dolioI guess he does, yeah.01/05 03:41
dolioOh, you know what?01/05 03:41
dolioMaybe neither reduces the way it's usually written.01/05 03:41
dolioOnly trans refl refl reduces.01/05 03:41
dolioBecause it's written 'trans refl refl = refl'.01/05 03:42
Saizanyeah, that's my guess too01/05 03:42
Saizanxplat: go make your trans lazier!01/05 03:42
dolioWorst of both worlds.01/05 03:42
Saizan(for lack of a better word)01/05 03:43
xplatheads neutrality wins, tails reduction loses01/05 03:43
xplati could get rid of the useless trans-refls by making my equational reasoning more obscure01/05 03:44
xplatbut that doesn't solve the basic problem01/05 03:45
xplati'm not sure rewrite does either because then the noise just shows up in withtypes01/05 03:46
xplatbut at least in that case it looks a little better factored01/05 03:47
Saizanif you define "trans refl eq = eq" rather than "trans refl refl = refl" some of those will compute01/05 03:47
Saizanthough i guess that's not a big gain01/05 03:47
copumpkinthe other side seems more useful01/05 03:48
Saizantrue01/05 03:49
xplatyeah, i think more stuff would compute from the other side01/05 03:49
xplatsince usually you go 'set things up with some meaningless definitional equalities so it's obvious how your lemma applies, then apply a couple of lemmas and as soon as it normalizes to the same thing as the goal, BANG! QED01/05 03:51
copumpkinagda needs RULES pragmas01/05 03:52
copumpkinbut they must be supported by proofs!01/05 03:52
copumpkinso automatic rewrite, basically01/05 03:52
Saizancopumpkin++01/05 03:53
xplati was able to eliminate a lot of rewrite·s and \===-subst·s in Support.FinSet by changing my primitives a bit01/05 03:54
copumpkinfeel free to rearrange support by the way01/05 03:55
xplatbut i don't really see a way to do that here yet01/05 03:55
copumpkinI kind of just made it as a bin of stuff that I needed from the standard lib01/05 03:55
copumpkinwithout much thought to its layout01/05 03:55
Eduard_MunteanuHm, that's a really nice idea.01/05 04:18
Eduard_MunteanuThat should probably dispel worries about fusion.01/05 04:19
djahandarieI don't think you actually need rewrite rules for "fusion" (depends on what you consider fusion).01/05 04:22
djahandarieI think edwardk convinced me that you don't but I don't exactly remember01/05 04:23
djahandarieI'm also convinced that he only signs on IRC when he's at work01/05 04:23
Eduard_MunteanuWell I too suppose you don't but the compiler is dumb, I guess.01/05 04:24
Eduard_MunteanuI think he means that in theory you could use any equality to do rewriting, no?01/05 04:24
djahandarieNah, not in that sense01/05 04:24
djahandarieIt was when I was talking about generalizing fusion to combining any catamorphism and anamorphism to their hylomorphism01/05 04:25
djahandarieI think that happens 'automatically' if you build up your function in the right way, but I think he lost me during that conversation so I'm not entirely sure01/05 04:26
Eduard_MunteanuHm, that'd be interesting.01/05 04:26
Eduard_MunteanuBut you need a RULES even for simple stuff like map as far as I've seen.01/05 04:26
Eduard_MunteanuI'll ask him when he's around. Or maybe other folks in here have an idea... :)01/05 04:27
djahandarieHe also mentioned how Yoneda's lemma does something similar, but I didn't understand that either. :p01/05 04:28
djahandarieIt's possible that he didn't understand what I was saying and was talking about something entirely different, I suppose01/05 04:29
copumpkinxplat: I changed some stuff and merged with your power01/05 06:22
copumpkinand changed power a bit to use the new stuff01/05 06:22
copumpkin(just name changes and convenience proofs)01/05 06:22
augurcopumpkin!01/05 06:26
augurhey01/05 06:26
copumpkinyo01/05 06:26
* bambam wonders how to type an arrow with a dot on top of it01/05 07:45
djahandarieBy not using unicode01/05 07:46
bambam⇒⃰01/05 07:46
bambammeh01/05 07:46
Eduard_MunteanuIs ⃰ just a rectangle?01/05 08:40
Eduard_MunteanuI see that in Agda source code but I wonder if it's showing up alright.01/05 08:41
augurEduard_Munteanu: no, it shows up as some sort of thingy here01/05 08:49
augurah, asterisks01/05 08:49
Eduard_MunteanuDamn DejaVu01/05 08:58
Eduard_MunteanuWow... I'm reading some stuff on Isabelle, and it mentions:01/05 12:13
Eduard_Munteanutheorem rev_rev [simp]: "rev(rev xs) = xs"01/05 12:13
Eduard_Munteanu"This theorem command does several things:01/05 12:13
Eduard_Munteanu"It tells Isabelle (via the bracketed attribute simp ) to take the eventual01/05 12:14
Eduard_Munteanutheorem as a simplification rule:01/05 12:14
Eduard_Munteanu(damn, sorry for the crlfs)01/05 12:14
Eduard_MunteanuSo this is actually nicer than what copumpkin said about rewrite rules, it sounds like it uses rewriting in proving as well.01/05 12:15
Eduard_Munteanu"future proofs involving simplification will replace occurrences of rev (rev xs) by xs."01/05 12:16
Saizani thought copumpkin was talking about compile-time computation, mainly01/05 14:46
Saizanbtw, Yoneda f a = forall b. (a -> b) -> f b does fmap fusion, since fmap f y = y . (. f)01/05 14:49
Eduard_MunteanuDo you guys know anything about program refinement?01/05 15:20
Eduard_MunteanuI kinda want to know how formally verified software is done, like seL4, I'm a bit confused.01/05 15:21
Eduard_MunteanuAnything in particular I should go read online?01/05 15:22
copumpkinxplat: https://github.com/copumpkin/categories/commit/31d2dff30bb52c8041f4ee7f69e5f170021129f4#commitcomment-36427601/05 16:01
xplatcopumpkin: i could do that and normally i would, but i'm doing this partially as an efficiency hack and i think that would have the opposite effect :-701/05 18:54
copumpkinboo :)01/05 18:54
copumpkinhe just commented on your branch, too01/05 18:54
copumpkinI wonder how much more efficient one approach is over the other01/05 18:54
xplatwell, using Functors would increase nesting depth and branchiness01/05 18:55
copumpkinah01/05 18:55
xplati'm kind of desperately trying to decrease those so that the pentagon laws and stuff won't expand to a megabyte-sized type01/05 18:56
xplatit sure is a lot easier to reason about a category internally than externally in type theory, huh?01/05 18:59
copumpkinyep :P01/05 18:59
xplatif hiding things in lambdas doesn't work out in the end, the next step is using abstract01/05 19:00
copumpkinyeah01/05 19:00
xplatit's annoying when the difficult equalities you want to compute won't compute and the ones that are textually obvious do01/05 19:02
copumpkinlo01/05 19:02
copumpkinyea01/05 19:02
xplatiwbni when you are using a propositional equality with UIP there would be a property similar to irrelevance that you could use to manage the degree to which the equality proofs are carried around01/05 21:34
dolioEpigram does proof simplification at some point.01/05 21:36
dolioSame time it eta expands.01/05 21:36
dolioPresumably it reduces various equality proofs.01/05 21:36
xplatit seems like all you really need to know about an extensional equation is captured by its type plus the background equalities that the proof assumed01/05 21:37
dolioIt also turns 'map id' into 'id' and such.01/05 21:37
xplatso there could easily be a special rule for reducing terms of equality types even when the usual reductions are blocked by neutral terms01/05 21:39
xplati guess the proof could assume things that are not equalities, but either way, it's the type and the assumptions01/05 21:40
augurwhy is there no /r/agda!01/05 23:09
augurwe should make one!01/05 23:09
crystal-colawhy01/05 23:09
augurcause!01/05 23:09
Saizanthere's /r/dependent_types01/05 23:10
augurlame01/05 23:10
copumpkinaugur: there is one01/05 23:11
copumpkinit just happens to be empty01/05 23:11
dolioI agree, why?01/05 23:11
dolioThere are too many dependent typing reddits already.01/05 23:11
doliotypes, dependent_types01/05 23:11
copumpkinthere's so much traffic to both of them01/05 23:11
copumpkinwe should split it up a bit01/05 23:11
dolioAnd one for each proof assistant.01/05 23:11
copumpkinotherwise it's just a flood01/05 23:11
Eduard_MunteanuI thought you suggested making a 4chan topic for agda :P01/05 23:12
Eduard_Munteanulike /b/ :P01/05 23:12
augurwe could do that too01/05 23:12
augurbrb making coffee01/05 23:14
xplatyeah, we should have a board on 4chan to post pictures of our cool and/or horrifying unicode operators, plus image macros of funny lemmas and miscellaneous math porn01/05 23:18
xplati nominate augur to set this up01/05 23:18
auguroh hi01/05 23:46
augurwhat01/05 23:46
--- Day changed Mon May 02 2011
xplatarr02/05 00:10
xplatwhy does with suck so much?02/05 00:10
dolioWith is awesome.02/05 00:11
* Saizan wonders if pigworker approves of the implementation of with02/05 00:11
Saizanit's taken from a "view from the left", right?02/05 00:12
augurSaizan: yes02/05 00:12
augurtho i think they reference previous work02/05 00:13
augura view form the left is really hard to understand :\02/05 00:13
xplatin "view from the left" it was awesome02/05 00:14
xplatthis version makes my head hurt02/05 00:14
augurwhy so xplat02/05 00:14
xplathttp://hpaste.org/46261/help_me_improve_my_chops02/05 00:14
augurok02/05 00:15
xplatnaturally i want to do either «rewrite rejoin-chops n' m k'» or «with n' chops k'»02/05 00:16
* copumpkin condemns xplat to an eternity in hell with subst02/05 00:16
xplatwith n' chops k' is no use because although it lets me make the left compute, it then forgets where it got the inl from so i can't go any further02/05 00:17
copumpkinxplat: might john major equality help you?02/05 00:17
copumpkinI don't really know what your types are02/05 00:17
copumpkinbut if they're Fins it might be hard to convince regular equality that the indices are the same02/05 00:17
xplatand the rewrite won't work because it can't be convinced that there's a \===-refl of that type to match on02/05 00:18
crystal-colathis paste is not complete02/05 00:18
xplatno, it's not.  which functions would you like to see?02/05 00:19
xplat(and/or types)02/05 00:19
xplatEither is the usual (with inl/inr) and either\_0 is non-dependent either02/05 00:20
xplatstandard library might have it as either' or something02/05 00:21
xplatnew annotation has most of it, you still need your own levels, own + and \===02/05 00:27
xplathm, there's an extra line in (starts with _chops_), i thought i got rid of the mispaste but i missed a little02/05 00:28
xplatcopumpkin: i don't seem to have any problem convincing it that the indices are the same, it's only the values giving me trouble02/05 00:30
copumpkinah02/05 00:30
xplati can't find a way to get past the neutrality of the 'left suc' in chops without losing all information on everything BUT the Either injectors and the indices02/05 00:31
xplater, rather past the neutrality of the recursive call and the need to feed it to 'left suc'02/05 00:32
xplatit doesn't feel like this should be so hard to do :(02/05 00:33
xplatand this whole thing is because i'm trying to write a version of _cat_ that takes its type family precombined02/05 00:35
xplat_cat′_ : ∀ {ℓ} {n m} {A : Fin (n + m) → Set ℓ} (f : (i : Fin n) → A (widen-+ m i)) (g : (j : Fin m) → A (shift n j)) → (k : Fin (n + m)) → A k02/05 00:35
xplatwhich is essentially just either f g (n chops k) but of course then the argument of A doesn't match up02/05 00:37
* xplat tears out clumps of hair02/05 00:38
Saizanxplat: http://hpaste.org/paste/46261/help_me_improve_my_chops_anno#p4626302/05 00:48
Saizanyou could s/| refl = refl/| eq = cong suc eq/g if you prefer02/05 00:49
xplatwat02/05 00:59
xplatdoes that only work because they are in the same with?!02/05 00:59
xplatoh, it's because of the dots?!02/05 01:01
Saizanwell, both02/05 01:03
xplater, no, it still doesn't work, says 'Failed to infer the value of dotted pattern'02/05 01:05
xplatoh, nvm, i failed to replace refl with \===-refl02/05 01:06
Saizanhttp://hpaste.org/paste/46261/help_me_improve_my_chops_anno#p46264 <- felt like using more combinators02/05 01:08
xplat... but now i can't even figure out how to use it to finish my _cat_ :-≀02/05 01:25
* Saizan suspects that more or less the same trick would work02/05 01:27
xplatit seems like no matter what i do with with or rewrite, i get some error or other the heart of which is 'either₀ (widen-+ m) (shift n) (n chops k) != k of type Fin (n + m)'02/05 01:30
Saizanthe problem is that you've k in multiple places, and you want to rewrite just one02/05 01:32
Saizani'd go with subst in a case like that, but i guess that doesn't work for you02/05 01:33
Saizanyou could maybe come up with an explicit helper function which disentangles the various uses of k02/05 01:34
xplathm, i suppose i kind of see your point.  if i rewrite it the place it should be rewritten, i'll end up rewriting it somewhere else too02/05 01:42
* xplat goes with subst for now02/05 01:44
* xplat completely destroys like 20 hours of work because it is no longer needed02/05 01:54
xplatand yet i'm pretty happy about it :)02/05 01:54
xplathm, yellow!  hope i didn't speak too soon.  or delete too soon!02/05 01:56
xplatwell, i did speak a little too soon.  but i refuse to git-magic that stuff back, because aieee02/05 02:37
xplatokay, working F\_1 again02/05 14:42
xplati took a new approach and finished not only _\||_, but another combinator, reduce02/05 18:49
xplatthe new approach was that i generalized from Power C n to Exp C T where T is a type02/05 18:50
xplatand then i separated the 'work' part of the combinators from the 'renumbering' part02/05 18:51
xplatthis turned out to make almost all the equalities definitional02/05 18:51
xplatso simple things actually typecheck without wrapping them in endless substitutions and rewrites02/05 18:52
xplatis there a way to turn an irrelevant record into a module?02/05 21:38
xplat(presumably with everything in it irrelevantized02/05 21:40
xplatyay, done with all the functor parts of the new version of Category.Monoidal.Helpers!  of course i haven't even attempted to load it yet :-/02/05 22:59
Saizanooh, writing a whole module without typechecking it?02/05 23:05
--- Day changed Tue May 03 2011
xplatwell, basically.  it was based off an old module that did typecheck03/05 00:10
xplatnow i need to figure out what operations i need for natural transformations03/05 00:11
xplatthe ones for functors seem really nice to use03/05 00:12
djahandariejoe6, http://www.youtube.com/user/edwardkmett#grid/user/B7F836675DCE009C I highly recommend these videos from copumpkin for some Agda learning. The stuff after the first 1-2 videos is pretty useful for learning how to prove stuff03/05 00:32
djahandarie(If you saw those slides earlier, this is the talk that used them)03/05 00:32
Eduard_Munteanudjahandarie: did edwardk post some of his vids you hinted about?03/05 00:33
Eduard_MunteanuHrm, those seem new.03/05 00:34
Eduard_Munteanu20 Jan this year, seems so.03/05 00:34
djahandarieYep03/05 00:35
joe6djahandarie, thanks a lot. I downloaded them and will start viewing them in the next few days. I am reading the coq'Art book and want to finish it before coming back to agda.03/05 01:23
djahandarieOh yeah, you went to the dark side... :p03/05 01:24
joe6the proofs of coq made no sense to me until I read the "Section 3.2.3.7 Reading a Proof Term" of the Coq'Art book. I wish there was some flag that to output messages in such English translation in agda?03/05 01:27
joe6For example, H : P -> Q is translated to (H) : Assume P -> Q03/05 01:27
joe6in coq, i have a theorem that "Print" as: apply_example =03/05 03:14
joe6fun (H : Q -> R -> T) (H0 : P -> Q) (p : P) => H (H0 p) : (Q -> R -> T) -> (P -> Q) -> P -> R -> T03/05 03:14
joe6Can I consider this: fun (H : Q -> R -> T) (H0 : P -> Q) (p : P) => H (H0 p) to be the equivalent to Agda's type signature?03/05 03:14
joe6with dependent types?03/05 03:14
joe6I noticed that the apply type signature in agda appeared similar to the above, and wanted to check if "by defining tactics" and all that, we are just getting to the type signature with dependent types?03/05 03:15
joe6most of the folks on this irc seem to be proficient with both coq and agda, hence the question..03/05 03:16
gienahhi, I was wondering if there are any plans to make agda build with syb 0.3, since syb 0.3 is part of the current haskell platform, the reason I ask is its a little trick to package agda on gentoo with it depending on syb 0.2.2?03/05 11:28
Saizanbetter ask on the mailing list and/or bugtracker03/05 11:33
gienahSaizan: ok, thanks03/05 11:33
crystal-cola#haskell sure is full of assholes today03/05 12:12
joe6has anyone encountered this?03/05 13:26
joe6Finished Foreign.Haskell.03/05 13:26
joe6/home/j/dev/apps/haskell/agda/install/lib/src/IO/Primitive.agda:21,1-2203/05 13:26
joe6There is no built-in thing called IO03/05 13:26
joe6when checking the pragma BUILTIN IO IO03/05 13:26
joe6make: *** [test] Error 103/05 13:26
joe6it happened when I used "make" in the agda install lib directory03/05 13:27
joe6it is the latest "darcs pull" version03/05 13:27
joe6sorry for the paste, am under the impression that 5 lines paste is ok.03/05 13:27
npouillardjoe6: that is a recent change in Agda, we've made03/05 14:00
npouillardand sent a patch to the std-lib as well but it is still not applied03/05 14:00
npouillardjoe6: ping Nils to apply it03/05 14:02
npouillardor obliterate a few patches03/05 14:02
npouillardor add {#- BUILTIN IO IO #-} but you may run into other similar issues03/05 14:03
npouillardor I can send you a few patches03/05 14:05
joe6npouillard, thanks. how can I get the patches from you? Should I send an email to the mailing list?03/05 14:33
joe6copumpkin, so, you are daniel peebles?03/05 14:41
joe6copumpkin, cool retro hairstyle, btw.03/05 14:41
joe6copumpkin, very nice presentation. It is very helpful to me. Good job.03/05 14:42
npouillardjoe6: you can pull from http://nicolaspouillard.fr/tmp/Agda-next and http://nicolaspouillard.fr/tmp/agda-lib-next03/05 15:10
npouillardboth should03/05 15:11
joe6npouillard, thanks. will send this discussion to the mailing list, is that ok?03/05 15:12
npouillard... be in the official repo soon03/05 15:12
joe6npouillard, ok, will just take your repos, then.03/05 15:12
npouillardif you want but this is a matter of hours before they push those03/05 15:12
joe6npouillard, ok, will give it some time then03/05 15:13
npouillardif you want the latest and greatest agda... :)03/05 15:14
joe6does anyone know where the slides for the "introduction to agda" of copumpkin talk can be found?03/05 15:16
joe6got them, don't bother.03/05 15:20
yrlnryjoe6:  Where are they?03/05 16:51
yrlnrycopumpkin = D Peebles, right?03/05 16:51
yrlnryhttp://dl.dropbox.com/u/361503/Agda%20and%20dependent%20types.pdf if anyone else cares.03/05 16:52
arcatani care, thanks03/05 16:53
joe6yrlnry, yes, sorry that I could not respond earlier.03/05 16:58
yrlnryNo problem at all.03/05 16:58
yrlnryThanks for mentioning it, which was sufficient.03/05 16:58
joe6i have http://pastebin.com/77XcJgpU and i am getting this error: http://pastebin.com/b5Y6ncvm . any thoughts, please?03/05 16:59
joe6yrlnry, it seems to be the most comprehensive tutorial for newbies like me. I could not understand the conor's lecture series. all the mathermatical stuff flew right over my head.03/05 17:00
yrlnryI have trouble understanding what Conor McBride is getting at even when I already understand the topic.03/05 17:01
joe6yrlnry, same here. I would phrase it as "I have trouble understanding what Conor McBride is getting at even when I think I understand the topic.", atleast in the video lecture series. He seems to have some good (easy to understand) papers out there, I think.03/05 17:03
joe6conor seems to be the mathematical theorist guy and coming from the other end of the spectrum, I am out of my depth with his material.03/05 17:04
augurSaizan: you know of anyone who has a strong interest in computation and language?03/05 17:04
auguracademics, i mean03/05 17:04
joe6any thoughts on why this is not valid:03/05 17:05
joe6g : {A : Set} → Type A → Type A → ℕ03/05 17:05
joe6g (isBool) (isBool) = zero03/05 17:05
joe6actually this line : g (isℕ) (isℕ) = (succ zero)03/05 17:05
Saizanaugur: http://www.cs.rutgers.edu/~ccshan/03/05 17:05
augursomeone who isnt one half of barker-and-shan03/05 17:06
augur:p03/05 17:06
joe6this is what the compiler says: Cannot split on the constructor isℕ03/05 17:06
joe6when checking the definition of g03/05 17:06
Eduard_MunteanuAre those the slides from the youtube video?03/05 17:08
Saizanh : Type Bool -> _03/05 17:09
Saizanh isBool = ?03/05 17:09
Saizan^^^ that gives the same error03/05 17:09
Saizanmight actually be a bug03/05 17:09
Eduard_MunteanuWhat Agda version is that anyway?03/05 17:10
Saizanmine is the darcs version03/05 17:10
Eduard_MunteanuOh.03/05 17:10
Saizando you have a released one handy to test?03/05 17:10
Eduard_MunteanuI just erased it and cabal-installed the darcs one :)03/05 17:12
Saizanheh03/05 17:12
Eduard_Munteanujoe6: what are you using?03/05 17:12
joe6Eduard_Munteanu, yes, the slides are from the youtube video03/05 17:14
joe6and agda is the latest "darcs pull" version03/05 17:14
Eduard_MunteanuUh, I guess non-canonical implicits are yummy.03/05 17:15
joe6Agda version 2.2.1103/05 17:15
joe6Saizan, is that a bug in agda?03/05 17:15
Saizanjoe6: not 100% sure03/05 17:16
Saizanit has this problem only for families indexed by Set's03/05 17:17
Saizanso it might actually be intended03/05 17:20
Eduard_Munteanu--injective-type-constructors doesn't seem to fix it :/03/05 17:20
Saizani'd ask on the mailing list :)03/05 17:21
joe6Saizan, just asked on the mailing list03/05 17:32
joe6anyone knows where else I can find this presentation: http://www.slideshare.net/larrytheliquid/intro-to-agda03/05 17:33
joe6the latest agda has become very slow. anyone else noticing this?03/05 18:23
joe6i can define the length of a vector using the same principle as the length of a list. Is there a simpler mechanism to do so? noOfItems : {n : Nat} -> Vec Item n -> n03/05 18:40
joe6can I use something like ? : noOfItems _ = .n03/05 18:41
joe6the emacs interface is taking forever to load the agda file whereas the command line "agda -i" seems to be running pretty quickly. Anyone noticed this?03/05 18:49
Saizanjoe6: n is not a type03/05 19:38
Saizanjoe6: if you want to return n, the type of your result is the type of n, i.e. Nat03/05 19:39
joe6is there an emacs verbose mode? I am trying to load a .agda file (which works fine from the command line interpreter) and it is taking forever. I wish I could see what it is trying to do?03/05 19:58
xplatgah, i am SOOO close to done with Helpers03/05 20:07
xplati just have one function left03/05 20:07
xplatα-over : ∀ {n₁ n₂ n₃} (F₁ : Powerendo n₁) (F₂ : Powerendo n₂) (F₃ : Powerendo n₃) → NaturalTransformation ((F₁ ⊗ F₂) ⊗ F₃) (≣-subst Powerendo (+-assocʳ n₁ n₂ n₃) (F₁ ⊗ (F₂ ⊗ F₃))03/05 20:08
xplatunfortunately it seems to be 'the other 80%'03/05 20:08
joe6npouillard, cannot figure out why emacs does not load my .agda file. I am wondering if it could be because I do not yet have the patches you were trying to get pushed.03/05 20:19
joe6npouillard, and darcs seems to be stuck at : Identifying repository http://nicolaspouillard.fr/tmp/Agda-next format03/05 20:20
joe6npouillard, this worked though. darcs pull http://nicolaspouillard.fr/tmp/agda-lib-next03/05 20:21
joe6Saizan, is there an emacs verbose mode? I am trying to load a .agda file (which works fine from the command line interpreter) and it is taking forever. I wish I could see what it is trying to do?03/05 20:45
joe6Saizan, sorry for asking you specifically. I know copumpkin does not like being asked specifically.03/05 20:45
joe6Saizan, but, I am at my wit's end and cannot figure out what is going on. just spinning wheels.03/05 20:46
joe6C-g might help. let me try that.03/05 20:50
joe6C-g is just stopping the underlying agda loading. Is there a way to see the ghci buffer or the agda messages? What is the key combination for that?03/05 20:55
joe6got it, it is the emacs menu.03/05 20:56
Eduard_Munteanujoe6: did you figure out the compile error you posted earlier?03/05 20:56
joe6Eduard_Munteanu , "Cannot split on the constructor isℕ" ? I did not, I just sent it to the mailing list.03/05 21:00
joe6Eduard_Munteanu, do you know if there is a way to see the ghci buffer in emacs in realtime mode?03/05 21:00
joe6Eduard_Munteanu, when I load an agda file, the emacs seems to hang and I want to see what is happening behind the scenes03/05 21:01
Eduard_MunteanuHrm, no, apart from switching to the ghci buffer... :/03/05 21:01
joe6Eduard_Munteanu, but, i cannot switch to that buffer when the load is happening.03/05 21:01
joe6Eduard_Munteanu,  i tried the split window, but it is not updated03/05 21:01
Saizanjoe6: is your agda executable built out of the same sources as your agda lib?03/05 21:01
Saizane.g. check if the agda -V matches, for example03/05 21:02
Eduard_MunteanuIt happened to me while starting emacs; it was because of linker scripts masquerading as .so files03/05 21:02
Eduard_MunteanuI figured it out by starting Agda within ghci manually, dunno, maybe you can try that.03/05 21:03
joe6Saizan, that could probably explain it. the agda executable has some patch that npouillard sent in. but, the std lib does not yet have the patch that he sent  to them.03/05 21:03
joe6Saizan, and I waited for more than a few hours, and I then pulled his patches from his lib repo and it still did not help.03/05 21:04
joe6Saizan, it seemed to work from the command line.03/05 21:04
joe6Saizan, it is just through the emacs mode.03/05 21:04
joe6agda -V = Agda version 2.2.1103/05 21:05
Saizanjoe6: ghci -package Agda-2.2.11 ?03/05 21:06
joe6is this how everyone gets the std lib? darcs get --lazy http://www.cse.chalmers.se/~nad/repos/lib/03/05 21:07
joe6Saizan, http://pastebin.com/dv1pEqji03/05 21:07
Eduard_MunteanuYeah (I did without --lazy though, Git-ism :D)03/05 21:08
Eduard_MunteanuThat looks fine.03/05 21:08
joe6just getting my std lib again. renamed the old lib to lib.old. let me see if that helps.03/05 21:09
joe6is there no other way to see what emacs is doing? like a verbose emacs agda mode?03/05 21:09
Saizanwe'd have told you if we knew one by this point :)03/05 21:10
Eduard_MunteanuTry loading it manually...03/05 21:10
Eduard_Munteanu:mod + Agda.Interaction.GhciTop03/05 21:10
Saizansome emacs expert would know probably03/05 21:10
joe6why does the library say: Configuring lib-0.0.2.. I think there was a lib-0.5 out there?03/05 21:10
joe6Eduard_Munteanu, after ghci -package Agda-2.2.11 ?03/05 21:11
Eduard_MunteanuioTCM "/path/to/file.agda" Nothing ( cmd_write_highlighting_info "/path/to/file.agda" "/tmp/agda2-modefoobarbaz" )03/05 21:11
Eduard_MunteanuYeah, in ghci03/05 21:11
joe6what is ioTCM?03/05 21:11
joe6Eduard_Munteanu, let me try that03/05 21:11
Eduard_MunteanuI'm just repeating what emacs does for me in the ghci buffer03/05 21:12
Saizanbtw, cabal installing the lib just installs the haskell scripts, it doesn't make it available to the agda mode03/05 21:12
Eduard_MunteanuOh, yeah, you need to do    agda-mode setup   too03/05 21:12
Eduard_MunteanuYou also need to setup paths to the lib.03/05 21:13
Eduard_MunteanuM-x customize-mode03/05 21:13
Eduard_Munteanuand set proper Agda2 Include Dirs03/05 21:13
joe6Saizan, the emacs mode works when I do not have "open import  Data.Vec" in the agda file.03/05 21:13
joe6Saizan, i tried without any open import and it worked fine.03/05 21:14
joe6i think it has to do something with the std lib03/05 21:14
joe6Eduard_Munteanu, I have all that setup.03/05 21:14
Saizanmaybe it's just recompiling the stdlib modules required?03/05 21:14
joe6Eduard_Munteanu, my .emacs file: http://pastebin.com/dUeA8TSL03/05 21:15
joe6Saizan, I tried the recompiling from the cmdline with agda -I03/05 21:15
joe6Saizan, Does emacs mode use different agdai files compared to the emacs mode?03/05 21:15
Eduard_MunteanuNo, vacuously. What did you mean?03/05 21:16
Eduard_Munteanu:)03/05 21:16
Saizanthe executable and the emacs mode should use the same .agdai files, though patches to the source could change the format of the .agdai files03/05 21:17
Saizanrequiring them to be recomputed, assuming agda can recognize they don't match03/05 21:17
joe6i just had "module test1 where" and it loads. I added the line "open import Data.List" and it just seems to hang.03/05 21:20
joe6In the buffers windows list, I do not see the ghci buffer window listed. I remember that I had it an hour ago.03/05 21:20
Eduard_MunteanuTry compiling the file yourself in ghci.03/05 21:22
joe6Eduard_Munteanu, do you know of any instructions that can help with that/03/05 21:26
joe6s,/,?,03/05 21:26
Eduard_MunteanuDid you try the   ioTCM "/path/to/file.agda" Nothing ( cmd_write_highlighting_info "/path/to/file.agda" "/tmp/agda2-modefoobarbaz" )    thingy?03/05 21:27
joe6sorry, i did not. I was not sure about the /tmp/agda2-modefoobarbaz file.03/05 21:27
Eduard_MunteanuI think that's supposed to be a temporary.03/05 21:28
joe6will that file be created automatically?03/05 21:28
Eduard_MunteanuDunno, the idea is to check whether Agda gives any error.03/05 21:28
joe6oh, ok. will do that, then, after the current command line compile finishes.03/05 21:28
joe6could it be this error: http://pastebin.com/HvdhgCn7 that is causing this ?03/05 21:30
Saizanyou shouldn't pass -c if you just want to typecheck and produce the .agdai file03/05 21:32
joe6with -v 5, http://pastebin.com/ZSvGMKfc03/05 21:32
Saizananyhow, i don't think so03/05 21:32
joe6i wish there was a cabal upgrade that can just update all my haskell libraries... Anyway, let me try the ghci method suggested.03/05 21:33
joe6Eduard_Munteanu, is this what you expected: http://pastebin.com/7iBrypgM03/05 21:35
Saizanjoe6: i see you have :set +s in your .ghci file ?03/05 21:36
Saizani wonder if that's the problem.03/05 21:37
joe6Saizan, it worked without the "open import Data.List" line. Would that be expected in this scenario? and, it has been working all along till this morning.03/05 21:38
joe6Saizan, let me see if I can remove the darcs patches that I pulled in this morning.03/05 21:38
Eduard_Munteanujoe6: yeah03/05 21:38
joe6i am doing "darcs unrecord" to all the patches I pull'ed today.03/05 21:44
joe6hopefully, that will help.03/05 21:44
Saizanno03/05 21:45
Saizandarcs unrecord is the wrong command03/05 21:46
Saizanyou'd want darcs unpull, also named darcs obliterate iirc03/05 21:46
Saizanjoe6: anyhow, why not just use the released version?03/05 21:46
xplatargh, these equalities are killing me again03/05 21:48
xplati don't understand the rules as to when you can match on \===-refl and when you can't03/05 21:48
joe6Saizan, oh, ok. thanks.03/05 21:48
joe6Saizan, i do not remember why i was using the latest version. I think someone mentioned some new function that they had added and I did not want to wait for it to be released.03/05 21:49
Eduard_MunteanuMaybe the non-canonical implicits, those are probably the most prominent change.03/05 21:52
xplati now have to prove an equation that has a \===-subst in it and i have no idea how to do that :(03/05 21:53
xplat\===-subst will not compute unless the equation argument does03/05 21:54
Saizanyou can pattern match on whatever expression is building the equation03/05 21:55
xplatin my case i have \===-subst Something (+-assoc\^r n1 n2 n3)03/05 21:55
xplatif i add 'with +-assoc\^r n1 n2 n3' and '... | refl' then the refl won't typecheck03/05 21:56
Saizanyou need to also match on one side of that equation in the same with03/05 21:57
Saizanthat side will get rewritten to the other03/05 21:58
xplatoh.03/05 21:58
Saizanthat's what we did before "rewrite"03/05 21:58
Saizanso maybe rewrite would work here too :)03/05 21:58
xplati'm not sure how to make that work for subst03/05 21:59
Saizani meant just "... rewrite (+-assoc\^r n1 n2 n3) = ..."03/05 22:01
xplatyeah, i'm trying that03/05 22:01
xplatas usual there are matches that can't be rewritten :(03/05 22:02
xplati have a feeling i will be writing 1000 helper functions03/05 22:05
xplateach of which is too nearsighted to notice that the things i am trying to equate don't actually look exactly alike03/05 22:06
Saizanthe amount of trouble you're having with equalities is a bit surprising to me, though i've never needed to optimize for typechecking so aggressively either03/05 22:10
xplati wonder if i have some kind of a mental block with equality types03/05 22:11
xplati mean, i understand what they are in an abstract sense, but with the ways they can actually be used03/05 22:12
Saizana fundamental fact is that matching on refl : A == B; only typechecks if A and B unify, but one oftens have eq : f x == g y; with g and f functions, which won't, so you first abstract one of the two sides using with such that now eq : z == g y; z and g y do unify now, mapping z to g y, so you can pattern match on refl03/05 22:19
Saizanby "now" i mean in this new context03/05 22:20
joe6the latest agda seems a little faster, atleast in compiling. anyone notice that?03/05 22:22
joe6compiling itself, I mean. not agda programs.03/05 22:22
Saizanand only variables bound in the definition you're working with count as unifiable03/05 22:23
xplatoh, so with's forgetfulness becomes a virtue03/05 22:28
xplati successfully made a helper function to commute the \===-subst past a record field selector.  999 to go!03/05 22:31
xplati guess big complicated equations are easier to match/rewrite on than small ones because they are less likely to recur somewhere that they can't be rewritten03/05 22:34
xplat(safely)03/05 22:34
--- Day changed Wed May 04 2011
xplatsay, how do abstract types work in agda?04/05 00:12
Saizanyou can hide definitions behind the use of abstract04/05 00:14
Saizanusers won't see them compute04/05 00:15
xplat'users won't see them compute'?  is this in constrast to 'they won't compute'?04/05 00:16
Saizanwell, they won't compute when used outside the abstract block04/05 00:16
Saizanwhile they'll behave normally inside04/05 00:16
xplatoh04/05 00:17
xplatso when used in an expression outside the abstract block, basically they will behave like postulates?04/05 00:17
Saizanyeah, i think so04/05 00:18
Saizani've used abstract very little04/05 00:18
xplatah.  i think this clears up a lot, but it still leaves me fuzzy on what they will do in e.g. the type signatures of public definitions in the abstract block04/05 00:19
xplatwill they essentially have two signatures, with the outside-visible and inside-visible signatures generated by evaluating the signature source in the respective context?04/05 00:20
Saizani'm not sure if the signature will be normalized before it gets "exported"04/05 00:22
Saizanprobably not04/05 00:23
xplatit seems like it would be hard to use that way, yeah04/05 00:23
Saizanso if you have abstract { X = Y; foo : X}; then bar : Y; bar = foo would be a type error04/05 00:24
joe6can someone please load an agda file and tell me what command runs in the corresponding ghci buffer?04/05 01:13
joe6My emacs is still hanging and I am trying to figure out what it is doing.04/05 01:14
joe6i can see the ioTCM command seems to have run successfully.04/05 01:14
joe6can someone please load an agda file (http://pastebin.com/BTj8EvsP ) and tell me what command runs in the corresponding ghci buffer?04/05 01:14
joe6don't bother. I think I got something.04/05 01:16
Eduard_Munteanujoe6: my bad, there was one more...04/05 01:23
Eduard_MunteanuioTCM "/path/to/file.agda" (Just "/tmp/agda2-mode-foozzbarbaz") ( cmd_load "/path/to/file.agda" [".", "/path/to/lib"] )04/05 01:24
Eduard_MunteanuAfter the other ioTCM04/05 01:24
joe6Eduard_Munteanu, yes, that was the one that was missing earlier.04/05 01:25
joe6thanks04/05 01:25
Eduard_MunteanuAny info on why it might hang? Like errors?04/05 01:26
joe6Eduard_Munteanu, I think there were some patches that went in today and I had only gotten the mornings' patches. I got everything again, and it was just slowly compiling them.04/05 01:32
joe6Eduard_Munteanu, it was interesting that it compiles (make agdai files) inspite of doing the same from the command line with the agda -i command.04/05 01:33
joe6i guess there is something about it how it does it from emacs that is different from how it does with agda -i04/05 01:33
xplatit needs to dump highlighting info too04/05 02:50
joe6can I transfer agdai files between machines, if it is the same agda version and patch number that compiled them?04/05 03:31
Kaidelongso if I am understanding this, in Agda, a function that is parametrically polymorphic actually takes a type as a parameter?04/05 07:34
Kaidelongor did I miss something important?04/05 07:35
arcatanKaidelong: that's my understanding, too.04/05 07:51
kosmikusKaidelong: correct04/05 07:54
kosmikusthat's a very common way of looking at parametric polymorphism. in GHC's core language, for example, which is based on System F (or F-omega), the situation is the same.04/05 07:55
Kaidelongthe thing where the parameter is inferred when left implicit reminds me of functional dependencies04/05 07:56
Kaidelongshould it?04/05 07:56
kosmikusI don't see the connection.04/05 07:56
Kaidelongthe other parameters unique determine the type parameters if the types for the other parameters are known04/05 07:57
Kaidelongerr04/05 07:57
Kaidelongno, just determine, I mean04/05 07:57
kosmikusmmm, ok04/05 07:57
kosmikusfunctional dependencies, you have to declare, and they're enforced04/05 07:58
kosmikusthis isn't the case here04/05 07:58
kosmikusyou can declare any argument as implicit (not just type arguments)04/05 07:58
kosmikusif they can be inferred from the context, it's fine04/05 07:59
kosmikusit perhaps is a bit reminiscent of overloaded functions, which in Haskell can be seen as having implicit arguments (the type class dictionaries), which have to be inferred04/05 08:00
Kaidelongnow I was trying to draw an analogy to prolog, I probably should not try to do this and just accept that it is different from what I've seen before04/05 08:04
kosmikuswell, the algorithm works with unification04/05 08:05
kosmikuswhich is what's also used by Haskell type inference, and also used by Prolog04/05 08:05
kosmikusbut the details are all a bit different04/05 08:05
xplatthe implicit inference in agda is based on the unification algorithm as used by lambda-prolog04/05 12:23
joe6has anyone seen copumpkin? I want to congratulate and thank him for a very good job with "introduction to agda" videos.04/05 12:49
joe6if anyone has not seen them, then they worth a shot (atleast for newbies, like me). Everything just clicked once I saw the videos.04/05 12:49
Saizani think he's on a trip04/05 13:06
joe6Saizan, ok, thanks.04/05 13:13
Eduard_MunteanuIs there any sugar for writing enumerations as 'data'?04/05 13:40
Eduard_MunteanuI mean, something like Haskell's    data Foo = Bar | Baz | Boom | ... | Fubar04/05 13:40
Eduard_MunteanuI'd like something shorter than    constructor : Datatype04/05 13:42
joe6i think there was something like 'Bar Baz Boom Fubar : Datatype'04/05 14:11
joe6has anyone customized their agda-emacs interface to load the agda file automatically on startup?04/05 14:50
Eduard_MunteanuHm, thanks, I'll try it.04/05 14:52
Eduard_MunteanuIt seems to work, thanks.04/05 14:53
xplatsweet!  i once again managed to avoid the equations04/05 15:16
xplatunfortunately i have yellow :)04/05 15:17
Saizana wizard of computation :O04/05 15:17
xplat* :(04/05 15:17
xplatoh, actually there isn't04/05 15:19
xplatexcellent!04/05 15:19
xplati've loaded Monoidal2/Helpers using 1G04/05 15:19
xplatnow i have to see what the real thing will do04/05 15:20
xplatwell, it hit 2482m with no end in sight, so as optimization it seems to be a failure :(04/05 15:47
xplatthe monoidal-related code is even prettier than the last iteration, though, since only one reference to reassociating the underlying products of categories survives04/05 15:48
xplathem04/05 15:50
xplati kind of forgot to change the reference to Helpers to the new version, i was actually testing loading the old version of helpers04/05 15:51
Saizangood news or bad news?04/05 15:52
xplat1161m, about 2 minutes real time04/05 16:02
xplati'm pleased with the experiment04/05 16:03
xplatin the new Category.Monoidal and Category.Monoidal.Helpers, some of the types and imports are two lines, but all the definitions are one-liners04/05 16:11
xplatthe most complicated of which is α-over {n₁} {n₂} {n₃} F₁ F₂ F₃ = α ∘ʳ ((hyp F₁ ∥ hyp F₂) ∥ hyp F₃)04/05 16:12
xplatand i didn't even need those n·s in scope actually04/05 16:13
xplatall the machinery is encapsulated in the two modules in the Category.Power hierarchy04/05 16:15
xplatpushed to github.com/xplat/categories04/05 16:56
djahandarieI need to start playing around with that thing soon...04/05 16:57
xplati wonder if that version of Monoidal is practical to work with.  it couldn't be worse than the prior version anyway.04/05 17:01
joe6any suggestions on how I can get this to compile? http://pastebin.com/jME5902j04/05 17:40
joe6it complains about 129,32-44: .r != (suc (_195 lefttoys righttoys toy)) of type N04/05 17:42
joe6when checking that the expression modRightToys has type Vec Toy (suc (_195 lefttoys righttoys toy))04/05 17:42
joe6agda is complaining about this: http://pastebin.com/HyJJbGig04/05 17:52
joe6I thought that it is ok to have backwardMoves _ [] ()04/05 17:52
joe6as it shows an impossible happening.04/05 17:52
joe6or, is that used only where the result type is a proposition?04/05 17:52
joe6i think I should change the type signature to return a Set04/05 17:54
xplatabsurd patterns can be used regardless of return type04/05 18:00
xplatthe problem is that your argument, rightToys has the type Vec Toy (suc r)04/05 18:02
xplatand [] has type Vec Toy zero04/05 18:03
xplatthose types don't match04/05 18:03
xplatso trying to handle the [] case is pointless to begin with04/05 18:03
joe6xplat, ok, thanks.04/05 18:04
xplati still can't believe i'm actually DONE with the new Monoidal revision04/05 18:06
xplati was starting to think i'd never be done with that04/05 18:07
joe6xplat, any thoughts on this, please? I removed the [] case. The reason I stuck it in there was because there was an error and I was trying to figure out how to resolve it.04/05 18:08
joe6agda complains about : 144,32-44: .r != suc (_195 lefttoys righttoys toy)) of type N when checking that the expression modRightToys has type Vec Toy (suc (_195 lefttoys righttoys toy))04/05 18:09
joe6i think the delete is not doing something right or agda is not able to look at the delete and figure out what needs to be done04/05 18:11
joe6.http://pastebin.com/hjKSNe2G04/05 18:13
joe6code is here: http://pastebin.com/hjKSNe2G04/05 18:13
xplatwhich line is 144 in your original?04/05 18:13
joe6xplat, very sorry about that. I thought I had pasted the code before talking about it.04/05 18:13
xplatwell, you deleted something on the right, right?04/05 18:15
xplatso you used up the Suc in the index of the right vector04/05 18:15
xplater, the suc04/05 18:15
xplatthe rightToys argument to moveBackward has type Vec Toy (suc r)04/05 18:16
xplati think that type is wrong04/05 18:16
joe6xplat, oh, got it.04/05 18:17
joe6thanks a lot.04/05 18:17
joe6xplat, again, thanks a lot. it is pretty pleasing to see everything fit through.04/05 18:27
joe6is there a mechanism to fill in the type signature?04/05 19:16
Saizanyou can put a hole there and then use Auto04/05 19:20
joe6Saizan, ok, thanks.04/05 19:38
joe6does anyone know if I can transfer agdai files  across machines with the same agda version?04/05 19:39
xplatauto doesn't work as well for filling in types as for values (when the difficulty is equal anyway) but it works sometimes04/05 19:41
xplat(for example, it doesn't work that well when you use universe polymorphism)04/05 19:42
xplati'm working on the 'input method' for irssi again04/05 20:14
xplatat first i thought it would be nice to work on it in emacs, until i realized that emacs's perl-mode has an enormous bug which sometimes causes it to highlight and indent incorrectly in a way that is really difficult to fix04/05 20:15
xplatit keeps mistaking the first character of a line for a string04/05 20:16
xplatand if you try to fix it the problem just keeps bubbling backward until it hits the beginning of the file04/05 20:17
joe6can anyone please help, I think I am confused with the types here? http://pastebin.com/NGjhUftm , error message = http://pastebin.com/HE39VyZW04/05 21:04
joe6this is an invalid case that will not happen.04/05 21:05
joe6 forwardMoves (x ∷ y ∷ []) [] ()04/05 21:05
joe6i just added it because without that pattern, I get the incomplete pattern error04/05 21:06
joe6or should I just have it as : forwardMoves (x ∷ y ∷ []) [] = [] , for an invalid pattern, which should never happen?04/05 21:09
augurpeeps!04/05 21:13
augurwhat are some exotic logics/type-theories that are out there?04/05 21:13
xplatbrazilian logic is pretty exotic04/05 21:13
augur:x04/05 21:14
xplatnot a joke04/05 21:14
xplati'm not sure if anybody has made a type theory out of it though04/05 21:14
xplattype theories made from relevant and ordered logics have been used for grammatical purposes04/05 21:16
augurya04/05 21:16
augurok04/05 21:16
auguralso, anyone have any good references for the distinction between True/False as types and true/false as values of a Bool type?04/05 21:16
augurim teaching a bit of type theory to a friend, and when we talked about dependent types, the idea that in a dependent type like (x : X) -> P x, that P x is a proposition and not a bool was hard for him to grasp04/05 21:17
augurand tho i tried to explain that Bool is the type of -judgements- of true or falsity, not the -propositions- True and False, it didnt click04/05 21:18
augurso anyone know of a good place to point him?04/05 21:18
xplatin a type theory Bool doesn't really have much to do with true and false04/05 21:19
augurright, but thats part of the problem04/05 21:19
augurhe didnt understand why we didnt say that P x : Bool04/05 21:19
xplatmost type theories don't even have a distinguished Bool type04/05 21:19
augursince he's used to thinking of predicates as value-level predicates04/05 21:20
augurie judgements04/05 21:20
xplat'judgement' means something else in type theory too04/05 21:20
augurlisten do you have a link or not? :P04/05 21:20
xplatif i had a link would i be going on like this?  :P04/05 21:20
augurprobably!04/05 21:21
xplatany detailed tutorial on theorem-proving for beginners probably goes over this04/05 21:21
xplatnot sure you'll find one for agda, but there are some for coq and isabelle04/05 21:21
augureh, well, its not like prolog theorem proving makes a clear distinction between value-truth and proposition-truth04/05 21:22
auguri mean, its probably mostly problematic because he's coming from a functional programming perspective where you program in functions, not in propositions04/05 21:23
augurand so lambdas and && and map abound, right04/05 21:23
xplatyeah, well, that's why almost half the academic papers about prolog are about what negation actually means04/05 21:23
augurbut the low-level versions of these are all proofs, in a proof system, not propositions04/05 21:23
Saizantry TTFP then :)04/05 21:23
augurTTFP?04/05 21:24
Saizan@where TTFP04/05 21:24
lambdabothttp://www.cs.kent.ac.uk/people/staff/sjt/TTFP/04/05 21:24
augurGASP04/05 21:24
augurlambdabot!04/05 21:24
augurwe need agdabot04/05 21:24
auguroh yes ttfp04/05 21:24
augurok04/05 21:24
xplatagdabot?  you know agda programmers don't RUN code ...04/05 21:24
xplatagda is the only language i've programmed in for over a month without running a program or writing a string literal04/05 21:26
Saizanor you could show him T : Bool -> Set; T true = True; T false = False; so you can say that (T b) is an inhabitable type exactly when b is true04/05 21:26
Saizanmaybe this would be close enough to his internal model to stick04/05 21:26
xplatSaizan: or it could end up just confusing him more04/05 21:27
augurxplat: obviously the only purpose of agdabot would be to typecheck04/05 21:27
xplatagdabot doesn't connect to irc, it's just a bunch of theorems about how an ircbot would behave if it did connect to irc04/05 21:28
joe6i cannot seem to understand what this error is about: (source : http://pastebin.com/U4KTFuR0) error: http://pastebin.com/Z8vfk3kh . Any suggestions, please?04/05 21:31
joe6in something like :  (_216 lefttoys righttoys toy) , what does the _216 refer to?04/05 21:31
joe6it is hard to understand what the error message is saying without knowing how to decipher all those numbers04/05 21:32
Saizanit's saying that modRightToys should be a Vec of Vecs of Toy, while it's only a Vec of Toy04/05 21:34
Saizan_216 is just the name of an unification variable04/05 21:34
Saizani.e. like when ghc comes up with "t0" or something like that04/05 21:35
Saizanthey are rarely important in type errors, especially if they appear only once, since they can't cause a conflit04/05 21:39
Saizan*conflict04/05 21:39
xplatjoe6: to get more detailed: something like (_216 lefttoys righttoys toy) is a placeholder for an implicit type or value that agda has not yet figured out what it should stand for before the type error04/05 21:46
xplatjoe6: in this case, what it turns out to be could depend on what lefttoys, righttoys, or toy are04/05 21:47
joe6ok, thanks.04/05 21:51
xplathuh, why doesn't agda-input come with names for ⨴ and ⨵ ?04/05 21:53
joe6Saizan, xplat, thanks, that helped.04/05 21:53
Saizani don't even have those in my font :P04/05 21:53
xplatU+2A34 MULTIPLICATION SIGN IN LEFT HALF CIRCLE and 2A35 resp. RIGHT04/05 21:54
xplat⨼_⨽04/05 21:57
* Saizan wonders which packages he should install to get them04/05 21:58
augurblah04/05 21:58
joe6any suggestions on how I can figure out how to solve this yellow highlighting: (source : http://pastebin.com/shJZTbpF ) (error: http://pastebin.com/tkzishU5 )04/05 21:59
xplataugur: b̷l̷e̷h̷04/05 22:00
augurthat too!04/05 22:00
xplatjoe6: you don't use the l and r for lastMoveForward (line 50) so there's no basis to figure out what they are04/05 22:03
xplatyou can just get rid of those04/05 22:03
joe6xplat, oh, yes. thanks.04/05 22:12
joe6xplat, that also solved the yellow highlighting issue. Thanks. so, unused implicit arguments cause yellow highlighting?04/05 22:14
augurSaizan: funky logics/type theories?04/05 22:20
Saizanaugur: except for homotopy type theory?04/05 22:22
xplatjoe6: yes, unused arguments are sort of harmless if they are explicit, but if implicit they turn things yellow04/05 22:32
joe6to make a function with vector data types, I can use (suc n) or such and make a terminating function. How do I do that with list? (source : http://pastebin.com/HepTC6Z3 ), non-terminating code: http://pastebin.com/ApebXnKv04/05 22:33
xplatjoe6: because without them being used there are no constraints to give them a value04/05 22:33
joe6xplat, ok, thanks04/05 22:33
joe6i am flattening a tree to a list of lists and I want to make the function terminating. Should I be using the depth of the tree as an index?04/05 22:37
xplatmaybe04/05 22:38
xplati'm having a hard time seeing why the termination checker is having trouble with it to begin with04/05 22:38
joe6xplat, it looks simple, correct? flatten tree To List04/05 22:40
xplatif you manually inline the treesToChoices calls in treeToChoices does it change anything?04/05 22:40
joe6thanks, will try that.04/05 22:40
xplatoh, i see it now04/05 22:40
xplatthe recursive call is going through concatMap, so the termination checker has no way to see that treeToChoices is being applied to a smaller argument04/05 22:41
joe6xplat, like this, you mean: http://pastebin.com/ry4q47nF , did not help though.04/05 22:43
xplatfor all it knows the definition of concatMap could be concatMap f x = f (moveForward blah blah [... x]04/05 22:43
joe6ok, let me try replacing the concatMap with map and then concat later. will that help?04/05 22:44
xplatprobably not04/05 22:44
augurSaizan: yes! except that!04/05 22:44
xplatunfortunately you probably have to recurse explicitly on the list04/05 22:45
joe6when you mean "explicitly", do you mean without concatMap?04/05 22:45
joe6xplat, I think I understand what you are saying.04/05 22:46
joe6xplat, let me try that.04/05 22:46
xplati mean, you basically can't pass treeToChoices to a higher-order function in its definition or the definition of any function mutually recursive with it04/05 22:46
xplatinstead, you have to actually apply it to arguments right there in the definition04/05 22:46
xplattheoretically a smarter recursion checker could pass that function the way you wrote it because the definition of concatMap has no way to get a hold of the constructors for TransitionTo, so it can't pass treeToChoices any term larger than you passed in04/05 22:51
xplatbut agda's termination checker is only smart, not ultra-smart :)04/05 22:52
* Saizan wonders if sized types would accept this04/05 22:52
xplatif so it would be a good argument for sized types04/05 22:58
xplatinterestingly for termination checkers it's okay to have more than one and OR them together04/05 22:59
joe6xplat, your idea worked, working portion of the code: http://pastebin.com/mGjfuY1n04/05 22:59
xplatgreat04/05 23:00
xplathey, i wonder if a future agda could have mixfix sections like ((moveF x y) ::_)04/05 23:02
xplatthey'd be of somewhat limited usefulness for dependent operators, of course, since you could only section from the left anyway, but hey04/05 23:03
joe6my first agda version: http://pastebin.com/auWUSsqH , my new and improved version : http://pastebin.com/WKMrvRG4 , now, it passes the termination checker. Any suggestions, please?04/05 23:56
joe6haskell version of the same solution: http://pastebin.com/2ybVu25n04/05 23:58
--- Day changed Thu May 05 2011
joe6the agda version is definitely bigger. One of the reasons is the inability to be able to use concatMap and having to specify recursion manually.05/05 00:01
Saizanyeah, the inability to use HOFs liberally if you want to please the termination checker is the main drawback coming from haskell, imo05/05 00:03
joe6is the agda program better than the haskell program? I used the type system more in Agda. Can I do anything else better?05/05 00:04
joe6Saizan, yes, that would be such a big improvement in code size to do that05/05 00:04
joe6and also, ease of use.05/05 00:05
SaizanOTOH, transitionTreeToChoices could be easily defined as a tree fold, making the problem moot, though Agda won't generate folds for you automatically05/05 00:06
joe6Saizan, at one point, I was lost while reconciling the type definition with the value definition. I guess if we have more inductive types, it is bound to happen.05/05 00:06
joe6Saizan, do you mean replace the transitionTreeToChoices with a fold? that is a good idea.05/05 00:07
joe6Saizan, should I start doing that?05/05 00:08
Saizanjoe6: well, implementing the tree fold would take roughly as much code05/05 00:09
joe6Saizan, oh, ok.05/05 00:09
joe6Saizan, what do you think of my agda fu?05/05 00:09
joe6Saizan, any areas I can improve upon?05/05 00:10
joe6i am still not good with whole propositions stuff. I will get there some day.05/05 00:11
joe6could I have used dependent types? would that have helped?05/05 00:11
joe6Would that have helped in this program, I mean.05/05 00:11
Saizanthat's quite a weird question, it's a bit like asking "would this paragraph have been better if i used more adjectives?", it's too vague05/05 00:13
joe6haha..05/05 00:28
joe6i am thinking of getting the haskell llvm modules into agda. Any thoughts? good idea or bad idea?05/05 00:28
xplatwell, generally speaking it sounds like a good idea, but i think for you it would be good to try a couple of more projects first05/05 00:53
xplati wish there was a book like TaPL but focusing more on denotational semantics ...05/05 00:57
cayleexplat - I like Tennent's semantics book05/05 01:03
cayleexplat - it takes a similar approach in terms of adding more and more features onto a core language05/05 01:04
xplatrobert d tennent?05/05 01:05
cayleeyes05/05 01:06
cayleeoof...okay, maybe that was a bad recommendation - I think it might be out of print.05/05 01:08
cayleeMy advisor recommended it to me and I happened to find a copy in a used book store05/05 01:09
xplat1991, 'semantics of programming languages'?05/05 01:09
cayleeyeah, that one05/05 01:09
xplatwell, if i happen to run into it ... thanks.05/05 01:11
cayleeSorry - it's the closest thing I know to TaPL for semantics. :-p05/05 01:11
caylee...I also didn't realize it was out of print until I tried to give you an amazon link05/05 01:12
xplatwell, i wouldn't expect anyone to notice if a book they already had went out of print05/05 01:15
cayleespeaking of semantics, has someone written a domain theory library for Agda?05/05 01:16
joe6i am trying to understand the functioning of this type: http://pastebin.com/ShjQ9KpW . what can I give C-c C-d so that it can tell me that the type is AlterList05/05 02:08
joe6other than the empty type, I mean05/05 02:09
cayleeUm, so it's a list whose elements alternate between two types, right? Am I misunderstanding the question?05/05 02:10
joe6caylee, don't bother. I was missing the parens05/05 02:10
joe6it is 0 :: (true :: [])05/05 02:11
joe6i am trying to get C-c C-d to show the data type as List1 or List2. source: http://pastebin.com/MuEndzQ0 , I can get [] to show as List1, but agda gives me some _<number> when I give it true :: []05/05 02:24
joe6any thoughts, please?05/05 02:24
joe6and the same _73 for 8 :: (true :: [])05/05 02:25
joe6i mean it is a different number but in the format of _<number>05/05 02:25
joe6and the same number format when i try (true :: (8 :: (true :: [])))05/05 02:26
appamattoIs Agda useful for general programming?05/05 05:50
djahandarieTheoretically, yes. Practically, no.05/05 05:50
djahandarie* Practically, yes, if you feel like spending a lot of time.05/05 05:51
djahandarieWhich may be considered unpractical. :p05/05 05:51
djahandarieMain issue is library support I'd say. You can bind to Haskell code but it can be annoying and makes your code messy and un-Agda-ish (ring a bell with Haskell FFI maybe? :p)05/05 05:52
djahandarieAnd stuff can be annoying to prove in Agda of course. But usually that is a trade-off one is willing to make if you're using it in the first place.05/05 05:52
Eduard_MunteanuHrm, is there any stdlib way to build subsets and unions of various sets?05/05 07:39
Eduard_Munteanu_⊎_ looks like it05/05 07:43
Eduard_MunteanuHow do I use the State monad? I'm having trouble even getting to 'return'05/05 11:45
Eduard_MunteanuAh, I think i figured it out:05/05 11:54
Eduard_MunteanurunCode : Code → State Machine ⊤05/05 11:54
Eduard_MunteanurunCode [] = let open RawMonadState (StateMonadState Machine) in return tt05/05 11:54
Eduard_MunteanuKinda ugly.05/05 11:54
Eduard_MunteanuI wonder when will the lib start using non-canonical implicits.05/05 11:55
Saizanyou'd usually open it in a larger scope05/05 11:59
Eduard_MunteanuYeah, that's what I did eventually.05/05 12:00
Eduard_MunteanuHopefully with non-canonical implicits opening will go away.05/05 12:01
Saizanreplaced by instantiation05/05 12:07
Eduard_MunteanuHm, how do I get tuples indexed by a set? Say (Fin 4)  ----> (N, N, N, N)05/05 12:16
Eduard_MunteanuI'm looking to turn a data (having lots of nullary constructors) into a record.05/05 12:17
Eduard_MunteanuSo I figure it must be something dual to Σ (Fin 4) (const N)05/05 12:18
Saizanit'd basically be Vec N 405/05 12:19
Saizanyou can define Vec as a function recursing on the natural05/05 12:19
SaizanVec A zero = \top; Vec A (suc n) = A \x Vec A n05/05 12:20
Eduard_MunteanuI'm not sure that helps if I want to use data Name : Set where Foo Bar Baz Boom : Name   instead of Fin 405/05 12:20
Eduard_MunteanuWould this be some sort of Pi type?05/05 12:21
Saizanah, so you want something isomorphic to Σ Name (const N) ?05/05 12:21
Eduard_MunteanuNo, on the contrary, Σ Name (const N) is a sumtype, I want a dual to that, a product type.05/05 12:22
Eduard_MunteanuSo I get values like (1, 3, 5, 3), and be able to say something along the lines of   proj Baz tuple05/05 12:23
Saizanyou could just use Name -> N05/05 12:24
Eduard_MunteanuYeah, though how would I use it as a record?05/05 12:24
Eduard_MunteanuI'd like to be able to update it.05/05 12:25
Saizanwith decidable equality05/05 12:25
Eduard_MunteanuThanks, I'll look at that.05/05 12:26
Saizanif you need something much more advanced you could look at Record05/05 12:28
Saizanin the stdlib05/05 12:28
Saizananother option is to use a Vec via the Fin 4 ~ Name isomorphism05/05 12:29
Eduard_MunteanuHrm, I suppose that'd be the Haskell way, but there you have Enum.05/05 12:32
Eduard_MunteanuActually... if only Vec was   data Vec {a b} {B : Set b} (A : Set a) : B → Set a05/05 12:37
Saizanwhat do you mean by that?05/05 12:40
Eduard_MunteanuWell, if only Vec was indexed by values of an arbitrary set (with a total order on it) instead of naturals.05/05 12:41
Eduard_MunteanuActually, W types look a bit like that, but I'm unsure:05/05 12:42
Eduard_Munteanudata W {a b} (A : Set a) (B : A → Set b) : Set (a ⊔ b) where   sup : (x : A) (f : B x → W A B) → W A B05/05 12:42
Eduard_MunteanuAnd they define head and tail for it.05/05 12:42
Eduard_MunteanuSo I wonder whether   W Name (const N) does what I want.05/05 12:43
Saizanno, that'd be a N-ary tree05/05 12:44
Eduard_MunteanuI don't know much Martin-Loef but it looks to me like I want something like Π types analogous to Σ, though I can't find anything like that in the stdlib.05/05 12:48
SaizanΠ is the analogous to Σ :D05/05 12:53
Saizanand -> is the analogous to using const for the second argument of Σ05/05 12:54
Eduard_MunteanuSo they're not actually dual but Σ subsumes Π? :/05/05 12:55
Saizanhow so?05/05 12:57
Eduard_MunteanuNah, I'm a bit confused.05/05 12:58
SaizanVec, which is a finite product, look a lot like a generalization of Σ because multiplication can be built up by repeated addition05/05 13:01
Eduard_MunteanuOh.05/05 13:02
Eduard_MunteanuOk, I think my problem still boils down to automagically getting a natural from my Names.05/05 13:03
Saizanmh, actually no, it's more becuase a potentially infinitary sum like Σ looks a lot like multiplication :)05/05 13:04
Saizananyhow, yeah05/05 13:05
Eduard_Munteanu(integrals :P)05/05 13:05
Saizanthat's your problem if you want to use Vec05/05 13:05
Saizanit's not if you just stick to Name ->05/05 13:05
Eduard_MunteanuI was trying that too, but it seems difficult to say "update just this, and leave the others alone"05/05 13:06
Eduard_MunteanuThough projections are dead easy.05/05 13:07
Saizanupdate just_this v r x with just_this == x; ... | yes _ = v; ... | no _ = r x05/05 13:08
Eduard_MunteanuAnyway, the reason I'm doing it is because I'm getting around the lack of ST.05/05 13:08
Eduard_MunteanuOh, neat! Thanks :)05/05 13:08
Eduard_MunteanuSaizan: what sort of equality are you using there?05/05 13:26
Eduard_MunteanuI'm having trouble compiling my definition of    update : Reg → (ℤ → ℤ) → (Reg → ℤ) → Reg → ℤ05/05 13:27
Eduard_Munteanuupdate name f old x with name ≡ x; ... | yes _ = f (old x); ... | no _ = old x05/05 13:28
Eduard_MunteanuI wonder whether it should be _≟_05/05 13:30
Eduard_MunteanuThough interestingly ℤ doesn't have it.05/05 13:30
Eduard_Munteanu(oh it does, but it doesn't work)05/05 13:32
Eduard_MunteanuDamn, Reflection stuff doesn't compile.05/05 13:35
Saizan_≡_ is the propositional equality type, i guess?05/05 13:36
Eduard_MunteanuYes, intensional.05/05 13:36
Saizanso you want _≟_ : (x y : Z) -> Dec (x ≡ y)05/05 13:37
Saizan(x y : Z) -> Bool would also work here05/05 13:38
Saizansince you don't do much with the proofs05/05 13:38
Saizanbut it'd be easier to prove things about it later if you use Dec, i think05/05 13:38
Eduard_MunteanuOh I think I need my own _≟_ for Reg.05/05 13:45
Saizanyep05/05 13:45
Saizani should've s/Z/Ref/g05/05 13:46
Saizan*Reg05/05 13:46
Eduard_MunteanuUh, there doesn't seem to be a builtin equality for datatypes, is it?05/05 14:22
Eduard_MunteanuAny way I can avoid writing _≟_ for all cases?05/05 14:23
Saizanwith an isomorphism Name ~ Fin 4 you could reuse the one for Fin, there are some mailing list posts from last year on how to define one quite concisely05/05 14:27
Eduard_MunteanuYeah, it's not just 4, I'll look it up. The idea is they're x86-64 regs, so I've got quite a lot there.05/05 14:33
Saizan"deriving Eq" would be nice though :)05/05 14:39
xplatheh, yeah05/05 14:43
xplatcould reflection do that?05/05 14:43
Eduard_MunteanuI was about to try but for some reason latest darcs stdlib & Agda don't play well05/05 14:43
Eduard_MunteanuSomething about BUILTIN HIDING05/05 14:44
xplatanyone know what stdlib version works with released agda?05/05 14:45
Saizani don't think reflection let you query info about datatypes05/05 14:45
Eduard_MunteanuVersion 0.5. README. Tested with Agda 2.2.10.05/05 14:45
Eduard_Munteanuaccording to the wiki05/05 14:45
Eduard_MunteanuSaizan: no, but I was going to try name equality05/05 14:46
Eduard_MunteanuBut I'm unsure anyway.05/05 14:47
xplathow is a reflective tactic supposed to understand a proof obligation if it can't query what cases need to be satisfied?05/05 14:51
xplatare you supposed to write distinct tactics for every inductive type you create?05/05 14:52
Saizanwell, a solver usually has some quite specific kind of constraints that is meant to handle, but the reflection API is also quite new05/05 14:56
joe6i am trying to write a haskell ffi for a haskell module that I want in agda. Any suggestions/tutorials that can help? I am reading this: http://wiki.portal.chalmers.se/agda/pmwiki.php?n=ReferenceManual.ForeignFunctionInterface , but curious if there is something else out there.05/05 15:02
Eduard_Munteanujoe6: look at http://wiki.portal.chalmers.se/agda/agda.php?n=Main.Libraries you might find useful example code there05/05 15:08
joe6Eduard_Munteanu, thanks05/05 15:13
Eduard_MunteanuHm, this is going well it seems: http://hpaste.org/46390/asm_proving05/05 16:02
Eduard_MunteanuThoughts?05/05 16:02
Eduard_Munteanu(of course, the stuff about operands isn't entirely valid)05/05 16:02
Eduard_MunteanuIn particular using a single value is messy.05/05 16:05
Eduard_Munteanu*single state value05/05 16:06
Saizanmaybe there are some good papers on type systems for asm that could be of inspiration?05/05 16:12
Saizanmaybe even already mechanized ones05/05 16:12
Eduard_MunteanuI've been looking for that sort of stuff. I'm more interested in C though, but this was easier to experiment with. Unfortunately I couldn't find seL4 code, it's not open source.05/05 16:15
Eduard_Munteanuhttp://en.wikipedia.org/wiki/Typed_assembly_language    -- but is this what I want?05/05 16:24
Eduard_MunteanuThe problem is I want the assembly code to be identical to the untyped one.05/05 16:24
Eduard_MunteanuIt'd be hard to sell anything like this to (say) kernel people if the output isn't identical to the input, so memory allocation primitives and such are a no-go.05/05 16:26
Saizanwell, i was hoping you could generate conventional assembly by type erasure, or anyhow that you could steal some formalization techniques05/05 16:28
Eduard_MunteanuHm, George Necula's thesis on proof carrying code looks interesting.05/05 16:32
Saizanthere doesn't seem to be much work on integrating uniqueness and dependent typing05/05 16:58
Eduard_MunteanuI mostly see uniqueness typing interesting from a parformance-related point of view.05/05 17:08
Eduard_MunteanuBut we do have a limited sort of linear typing in sized types, don't we?05/05 17:09
* Eduard_Munteanu hopes for more of this stuff05/05 17:09
Saizani think something like UT would let you implement an ST-like API without unsafecoerce05/05 17:23
Saizani don't see how sized types provide linear typing05/05 17:23
Eduard_MunteanuNah, I meant it's the other way around, sized types are a kind of linear typing.05/05 17:24
Eduard_MunteanuThough arguably this is just for the termination checker AFAIK05/05 17:25
* Saizan forgot much of what he learned about sized types, sadly05/05 17:25
Eduard_MunteanuAnd it's not about ST, but about relying less on the GC and more on straightforward mutation.05/05 17:26
Eduard_MunteanuI wonder if there's anything like principal typing for uniqueness, so you could have the compiler automatically tack Unique onto many types, even behind your back.05/05 17:27
Saizanwell, i just want an heterogenous heap that's not a pain to use :)05/05 17:27
Eduard_Munteanu(arguably a bit like strictness analysis)05/05 17:28
Eduard_MunteanuNecula's been working on some awesome stuff: http://www.cs.berkeley.edu/~necula/05/05 17:38
joe6quick question, I am trying to estimate the time it might take me to port the haskell llvm stuff to agda. atleast the basic functionality to be able to generate llvm from agda.05/05 17:44
joe6any thoughts, please? just an approximation..05/05 17:45
joe6i have messed around with llvm and i think I have a clue of what goes on in llvm. but, i am a bit unsure or uncertain of haskells' type system and monadic objects used in the llvm code.05/05 17:46
joe6any suggestions, please?05/05 17:46
Eduard_MunteanuWriting bindings is a bit cumbersome.05/05 17:46
Eduard_MunteanuI've been working on a bindings generator, but it's nowhere yet ;)05/05 17:47
joe6is writing bindings a matter of days or months?05/05 17:47
joe6for someone, who is just starting off with agda.05/05 17:47
joe6Eduard_Munteanu: you know what I know about agda. for someone like me, would it take months or weeks or do you think I could do it in days?05/05 17:49
Eduard_MunteanuIt's not that bad, but it's tedious.05/05 17:49
Eduard_MunteanuAlso I'm not yet sure what's the correct/best way to deal with typeclasses.05/05 17:49
Eduard_MunteanuSurely you could specialize functions but :/05/05 17:49
Eduard_Munteanujoe6: here's what I did to bind to some ST stuff   http://hpaste.org/46391/st_bindings05/05 17:53
Eduard_MunteanuIt's a bit annoying.05/05 17:53
Eduard_MunteanuI honestly have no clue how long it would take to bind to that LLVM stuff.05/05 17:54
joe6i will take some more time learning agda before taking up that undertaking. I think it will be time well-spent on learning rather than jumping to the task.05/05 17:55
joe6Eduard_Munteanu: atleast, that is what your code told me.05/05 17:55
joe6Eduard_Munteanu: i think it is a good idea too.05/05 17:56
Eduard_MunteanuWell I did that quite early on (not that I'm far into it at any rate :D), I wanted to experiment with bounds checking elimination.05/05 17:56
joe6is there an equivalent of templateHaskell for agda?05/05 18:02
Eduard_Munteanujoe6: hm, syntax declarations?05/05 18:08
Eduard_Munteanujoe6: look in the 2.2.8 release notes05/05 18:09
joe6Eduard_Munteanu: ok, thanks05/05 18:17
joe6btw, how often do you upgrade ghc ?05/05 18:17
joe6Eduard_Munteanu: what is ur ghc version? mine is 7.0.2. I have an itch to upgrade it once a week, but I think it does not need to be updated so often. Correct?05/05 18:19
joe6I am using the version from 16th march now.05/05 18:19
joe6just curious of what the others do.05/05 18:19
* Saizan just uses the latest released version05/05 18:23
Eduard_MunteanuI'm still using 6.12.305/05 18:24
Eduard_MunteanuHrm, what was that thing using Σ to restrict a set based on a predicate?05/05 18:25
Eduard_MunteanuI don't want to end up with a pair :/05/05 18:26
SaizanΣ YourType YourPredicate05/05 18:27
Saizanso you do end up with a pair05/05 18:27
Eduard_MunteanuI've been using    restrict T₁ f = ∀ (a : T₁) → {_ : T (proj₁ ∘ f $ a)} → (proj₂ ∘ f $ a)   syntax restrict T₁ (λ t₁ → t₂) = ⟨ t₁ ∈ T₁ ∥ t₂    _⟩→_ = _,_05/05 18:28
Eduard_Munteanuso I can write   newArray : ∀ {s} {a : Set} → a → ⟨ n ∈ ℕ ∥ nonZero n ⟩ → ST s (STVec s a n)05/05 18:29
Eduard_MunteanuBut copumpkin rightly complained about my use of T :)05/05 18:29
Saizanwell, T is quite orthogonal to this05/05 18:29
Saizanjust make "proj₁ ∘ f : Set" and you can choose to not use T05/05 18:30
Saizanerr05/05 18:30
Saizan(proj₁ ∘ f $ a) : Set05/05 18:30
Eduard_MunteanuAnyway, what I want to do is take    mov : Op → Op → Insn, where data Op : Set where % : Reg → Op; $$ : Imm → Op05/05 18:31
Eduard_Munteanuand find an easy way to specify the second argument must be a register05/05 18:31
Saizanwhy not mov : Op -> Reg -> Insn ?05/05 18:32
Eduard_MunteanuI tried   mov : {reg : Reg} -> Op -> (dest : Op) -> {_ : % reg \== dest} -> Insn, but it can't figure out the implicit proof and reg there05/05 18:32
Eduard_MunteanuSaizan: I want to keep syntax consistent05/05 18:32
Saizanuse "isReg (% _) = \top; isReg _ = \bot" then05/05 18:33
Saizani mean05/05 18:34
Eduard_MunteanuHm, thanks, I'll try that.05/05 18:34
SaizanT is exactly what you want to use if you want the implicit to be inferred like that05/05 18:34
Saizanbut you can also make your decidable predicate return the Set's directly like my isReg above05/05 18:35
Saizanmov : Op -> (dest : Op) -> {_ : isReg dest} -> Insn05/05 18:35
Eduard_MunteanuYeah, though I'm unsure if it'll look nice. I suppose an if-then-else could do05/05 18:36
Saizanif-then-else?05/05 18:36
Eduard_MunteanuWait, that can't pattern match, I forget.05/05 18:37
Eduard_MunteanuThere is an if_then_else_ operator somewhere in the stdlib, IIRC.05/05 18:37
Eduard_MunteanuYup, isReg worked.05/05 18:38
Eduard_MunteanuThanks.05/05 18:38
Eduard_MunteanuIsn't there any way to do pattern-matching inline like with case expressions in Haskell?05/05 18:39
Saizannot yet05/05 18:39
Eduard_MunteanuI'm also trying to write RegOp : Set    RegOp = (dest : Op) → {_ : isReg dest}   to factor it out without using additional syntax though it doesn't like it05/05 18:46
Eduard_MunteanuRegOp⟶_ : Set → Set     RegOp⟶ S = (dest : Op) → {_ : isReg dest} → S   should do though :/05/05 18:48
joe6Eduard_Munteanu: just curious, are you generating asm code?05/05 18:49
Eduard_MunteanuNo, the idea is to take pristine asm code into Agda and prove stuff about it.05/05 18:51
Eduard_MunteanuIn a sense it should generate it, but I'm more interested in typechecking.05/05 18:51
Eduard_MunteanuAny idea if there's a unicode space so I can write RegOp → : Set → Set directly?05/05 18:53
Eduard_MunteanuThat'd be neat!05/05 18:53
Saizanthat'd be seriously evil05/05 19:17
Eduard_MunteanuThere's no record update syntax yet, is there?05/05 19:49
Eduard_MunteanuSaizan: any idea why Agda still wants me to provide pattern matching on ($$ imm) stuff if I use RegOp?05/05 20:54
Eduard_MunteanuIs there any way I can make it understand that case is unreachable?05/05 20:54
xplati'm almost done with this tab-completion-based IM for irssi, and i'm going nuts trying to figure out exactly how it should act05/05 21:23
xplatlike, what if i have an exact match at the end of the string with a single option, plus a shorter exact match with multiple options, and also some partial matches?05/05 21:25
xplatthis is supposed to handle w3c entities as well as agda-input sequences05/05 21:26
xplatthe w3c entities are easy since they are a prefix and suffix code05/05 21:27
xplatagda-input, otoh, can have sequences like \^\i05/05 21:27
Eduard_MunteanuHm, lemme know if you upload it to a Git repo or something05/05 21:31
xplati'm probably going to do that as soon as i get a preliminary version working05/05 21:31
xplatright now i have code to build a trie dictionary, code to help munge variously-formatted source dictionaries into tsv format to feed into the trie builder, and trie lookup code (last is untested, but all are basically complete).  and i have incomplete bits of an interface between the trie lookup and tab completion05/05 21:33
xplatwell, okay, i think i figured out what i want it to do.  getting it to work might be another matter though.05/05 21:53
--- Day changed Fri May 06 2011
augurhmm hmm06/05 08:06
augurx from #epigram: can anyone point to good papers on the consequence-not-coincidence stuff? or examples of proof-of-correctness styles of programming? id like to see what canonical good examples are like06/05 08:10
joe6has anyone tried an agda program that communicates through a socket?06/05 19:00
joe6it seems that helloworld.agda is broken: source: http://pastebin.com/6AzHU2ui , error: http://pastebin.com/0rkmGjGT . any thoughts, please?06/05 19:22
joe6error: There is no built-in thing called IO when checking the pragma BUILTIN IO IO06/05 19:27
SaizanIO got changed recently in the darcs version, no wonder example code is not up to date06/05 19:38
Saizanmaybe there's some that is in the darcs repo06/05 19:39
Saizanmaybe your problem is that you're using the darcs version of the stdlib with the released version of agda, insted?06/05 19:40
joe6Saizan, oh, ok. will search around for the documentation on IO06/05 19:44
joe6Saizan, have you even used a socket from an agda program?06/05 19:44
joe6s/even/ever/06/05 19:44
joe6Saizan: with "even" the sentence takes a condescending tone. I did not mean that.06/05 19:45
Saizanjoe6: no06/05 19:46
joe6Saizan, Do you foresee that being a big deal?06/05 19:49
Saizanjoe6: getting the same API as haskell's one shouldn't be a big deal, with the MAlonzo backend06/05 19:52
Saizanjoe6: assuming you find good enough documentation on the FFI and IO06/05 19:53
joe6Saizan, ok, thanks.06/05 19:55
--- Day changed Sat May 07 2011
Eduard_MunteanuIs there any way to make Agda "see through" IO and FFI at compile-time?07/05 07:24
Eduard_MunteanuI'm thinking of parsing an external file at compile-time.07/05 07:26
Eduard_MunteanuOf course, typechecking might become undecidable / not finish, but I'm willing to take that chance :).07/05 07:27
Saizannot that i know of07/05 07:27
Saizanyou could generate an agda module though07/05 07:28
Eduard_MunteanuI see, thanks, that's my backup plan though.07/05 07:28
Eduard_Munteanu(in fact it might be easier to have a Haskell program doing that anyway)07/05 07:29
augurmcbride's ornamentation stuff is confusing :(07/05 13:58
--- Day changed Sun May 08 2011
augurbeep boop08/05 19:22
Spockztoot toot08/05 19:24
Spockzthis channel is growing, it appears. Good.08/05 19:32
auguranyone read anything on relation calculi?08/05 19:41
joe6growing exponentially!!08/05 23:45
--- Day changed Mon May 09 2011
nappingCan I load the agda input method without running agda-mode?09/05 07:15
augurbeep boop09/05 07:56
kamatsuhi all09/05 10:14
augurhi hi09/05 10:14
kamatsui have run into  a scenario where I need to prove the existence of a certain element in a list09/05 10:14
kamatsuthe problem is the only way I can think to do it is to make a giant disjunction full of equalities09/05 10:15
kamatsuand provide proof a la inr inr inr inr inr inl refl09/05 10:15
kamatsuagda can usually auto-solve this for me, but it's ugly09/05 10:15
kamatsuanyone got any better ideas?09/05 10:16
kamatsuit should be noted that equality here is not always decidable, there are sometimes functions in this list09/05 10:16
augurim not at all good at this so09/05 10:17
kamatsui suspect Agda's upcoming feature, non-canonical implicit arguments, might mean that Agda figures the proofs out and doesn't write them in09/05 10:20
kamatsui'm really missing isabelle's "simp" here which  would completely annihilate the goal and not messy up the code at all09/05 10:20
augurwossat09/05 10:23
kamatsubasically for any obvious proof goals, the Isabelle theorem prover just solves it for you.09/05 10:24
kamatsuso you don't need to write out pointlessly big proofs09/05 10:24
auguri mean the non-canonical implicit args09/05 10:24
kamatsuoh09/05 10:24
kamatsubasically, you have a function09/05 10:25
kamatsublah : {{ blah : Type }} -> foo09/05 10:25
kamatsuif, when you call the function, it can find something of type `Type', it will insert it automatically as the implicit arg09/05 10:25
kamatsuanyway, i'm off for now09/05 10:26
kamatsuif anyone has any good ideas, let me know09/05 10:27
Saizanso you've goals like "x \in _ \:: _ \:: _ \:: _ \:: _ \:: x \:: _"?09/05 12:37
Saizankosmikus: i think you should be able to write a combinator existsAt so that you can write "existsAt 5" instead of "inr inr inr inr inr inl refl"09/05 12:41
kosmikusI'm sure I'd be able to, but I wasn't actually trying to :)09/05 12:46
Saizanit'd look nicer at least :)09/05 12:55
Saizanhttp://hpaste.org/46527/existsat <- it wasn't even complicated, it could use better naming though09/05 13:18
kamatsuhey09/05 13:21
kamatsuwondering if there's a way to have record setters a la haskell?09/05 13:21
kamatsucurrently, creating a record which is exactly the same as another record barring one field is excruciating09/05 13:22
kosmikusSaizan: I was just remarking on you talking to me, whereas you probably meant someone else ...09/05 13:30
Saizankosmikus: ah, yeah, it was for kamatsu..09/05 13:49
* Saizan should pay attention to more than the first letter of a nick09/05 13:50
Saizankamatsu: http://hpaste.org/46527/existsat <- might be useful to you09/05 13:50
kamatsuI figured out something like that09/05 14:00
kamatsubut I'd really prefer it wasn't there at all09/05 14:00
joe6this irc is growing on a daily basis.09/05 14:16
augurSaizan: you know anything about AoPA-like reasoning for program derivation?09/05 14:37
auguror do you know of any good articles on dependently typed code as proof carrying code, but using something other than just vectors?09/05 14:38
Saizanaugur: no09/05 14:46
augur:(09/05 14:46
augurk09/05 14:46
--- Day changed Tue May 10 2011
augurmm..10/05 19:59
auguri think any proof system for type theory will need to have statements like x : X & x : Y -> X = Y10/05 20:00
auguror you'd need to enforce freshness conditions on variables in a number of places10/05 20:01
augurwell, this is true only in the axiom->theorem direction, i guess10/05 20:01
augurtheorem->axiom direction i dont think has this issue10/05 20:02
augurhmm10/05 20:02
Eduard_MunteanuDo you really need that axiom? It is an axiom AFAICT, it kinda forbids subtyping (or any other sort of non-disjoint types)10/05 20:03
augurwell, its just to ensure that your inference rules done combine contexts with shared variables of different types10/05 20:08
auguryou dont want something like   C |- f : a -> b   D |- x : a   =>   C, D |- f x : b10/05 20:09
augurwhere it happens that C contains y : A, and D contains y : B10/05 20:09
augurit might never arise, actually, im not sure10/05 20:10
--- Day changed Wed May 11 2011
Saizanit's nice that if you want to prove something about the logical properties of prolog's predicates you can just translate them into type families11/05 00:50
augurSaizan: oh?11/05 03:20
Saizanaugur: like here http://hpaste.org/46585/proof11/05 11:49
--- Day changed Thu May 12 2011
shlevyDo dependently-typed languages have a notion of type classes?12/05 02:17
djahandarieAgda is getting something called "non-canonical implicit arguments" which can do things similiar to type classes.12/05 02:25
djahandarie(And it can actually do a lot more)12/05 02:25
djahandarieYou don't need type classes to do polymorphism though.12/05 02:26
shlevydjahandarie: Can you expand upon that last bit?12/05 02:26
djahandarieIt isn't exactly polymorphism, but you get similar things by just taking a type as an argument to the function.12/05 02:30
shlevydjahandarie: Oh, I didn't realize agda had first-class types12/05 02:30
djahandariemap : (A : Set) -> (B : Set) -> (A -> B) -> List A -> List B     is a 'polymorphic' map12/05 02:31
* shlevy is very very new to all things agda12/05 02:31
djahandarieAh12/05 02:31
djahandarieThat signature of map I just wrote is an example of using dependent types to get something somewhat like polymorphism12/05 02:32
djahandarieNormally you hide the first two arguments like    map : {A : Set} -> {B : Set} -> (A -> B) -> List A -> List B12/05 02:32
dolioTaking a type as an argument to a function is exactly polymorphism.12/05 02:32
djahandarieI guess. It feels different when things are explicitly passed.12/05 02:35
shlevydjahandarie: Can you give an example of using the polymorphic map?12/05 02:35
shlevydjahandarie: Do you have to explicitly pass all four arguments?12/05 02:35
djahandarieshlevy, the first two arguments can be 'infered' (unified) from the rest of them.12/05 02:36
djahandarieSo you can just pass _ and _ for the first two arguments12/05 02:36
djahandarieBut the {} make that automatic. So calling the second defintion of map would be just like in Haskell.12/05 02:36
shlevydjahandarie: Ah, ok. Thanks!12/05 02:37
rothwell'lo. i'm unable to build the agda 0.5 library: http://pastebin.ca/205714012/05 03:01
rothwellnot really sure how i should fix that12/05 03:01
vsileshi there, is there an online documentation of the stdlib available somewhere ?12/05 13:01
augurvsiles: i think on the site with the lib12/05 13:22
augurlemme find you a link12/05 13:22
augurhttp://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary12/05 13:23
augurthats the best there is12/05 13:23
augurafaik12/05 13:23
vsilesthx12/05 13:24
Eduard_Munteanuvsiles: yeah, read the release notes12/05 15:39
Eduard_MunteanuErm wait you asked something else12/05 15:40
vsilesno it's fine in fact12/05 15:40
vsilesI didn' saw that the readme had links to the library inside12/05 15:40
Eduard_MunteanuThe code itself might be useful if you need more.12/05 15:41
* vsiles has just downloaded the stdlib :p12/05 15:41
nappingWhy does Agda's mixfix parsing require spaces?12/05 19:14
nappingIs it just to separate tokens?12/05 19:15
stevanit's not really the mixfix that requires the spaces? it's the fact that you can have almost any character in identifiers?12/05 19:15
nappingSo, spaces to separate tokens12/05 19:16
nappingPerhaps a nondeterministic lexer could sort it out12/05 19:16
ccasinnapping: yeah, but it's surely undecidable, and not that hard to get into trouble12/05 19:17
nappingundecidable?12/05 19:17
ccasinI mean, if I make two infix operators:12/05 19:17
ccasin[_]12/05 19:17
ccasin[[_]]12/05 19:17
ccasinis [[a]] the latter or two applications of the former?12/05 19:17
nappingAh. That would take a bit more care12/05 19:18
ccasinwith nondeterminism so easy to hit, I think I prefer the current solution :)12/05 19:18
nappingThere are two obvious suggestions, but it does seem to be getting a bit hairy12/05 19:19
nappingIf I remember the paper correctly, the current parser doesn't require nondeterminism at all12/05 19:20
--- Day changed Fri May 13 2011
auguranyone know what this preorder reasoning stuff is13/05 17:12
Saizanit's mostly nicer syntax for uses of transitivity13/05 18:33
augurSaizan: ??13/05 19:55
augurSaizan: do you have any reading you could point me to? this AoPA stuff doesnt really explain the preorder reasoning component13/05 20:54
Saizanaugur: look where it's defined in the standard library, there are some examples13/05 20:55
augurof preorder reasoning??13/05 20:56
Saizanyeah13/05 20:56
auguri didnt realize that there was preorder stuff in the standard library13/05 20:56
augurill give it a look13/05 20:56
xplatbasically preorder reasoning consists of giving a path through the graph of the preorder where you give the path by specifying a series of nodes interspersed with the edges that connect them13/05 21:31
augurxplat: hmm13/05 22:10
augurand how can that be used for specification or derivation, especially extraction?13/05 22:11
wjzzhi all13/05 22:56
wjzzI trying to make agda rewrite one thing inside a goal, but I have no idea how to proceed13/05 22:57
wjzzCan somebody give me a hint?13/05 22:57
wjzzhttp://hpaste.org/46672/how_to_replace13/05 22:57
wjzzI'd like to change the (compare a v) into GT using p13/05 22:58
wjzzI tried using trans with cong but I get an error : "Not implemented: type checking of with application..."13/05 23:00
xplataugur: i really don't know the first thing about extraction, that's a coq thing13/05 23:07
augurxplat: well, by extraction what i mean is giving a proof of an existential where the proof term is given as   exists _ {some preorder reasoning}13/05 23:08
augurand then extracting the witness13/05 23:09
augurapparently that works, without giving the witness explicitly13/05 23:09
auguratleast for AoPA13/05 23:09
xplataugur: preorder reasoning is essentially just a small set of functions that constructs a witness of the relation by composing together all the 'edges' you give using the transitive law for the preorder13/05 23:10
Saizanwjzz: you could use "lem-insert-existing a .(< l , v , t >) (in-below₂ .a t v l p i) rewrite p = ?" with a recent enough Agda13/05 23:13
xplatit's really just an ease-of-use thing -- preorder reasoning is just a nicer format that makes it easier to see what the individual 'steps' are doing13/05 23:13
wjzzSaizan: works great! big thanks!13/05 23:16
djahandarieWait, is this "preorder reasoning" also known as SetoidReasoning?13/05 23:18
Saizanyeah, since the "reasoning" is really about the equivalence relation of the setoid13/05 23:19
djahandarieOkay cool, thanks.13/05 23:19
--- Day changed Sat May 14 2011
xplattechnically preorder reasoning is a different module from setoid reasoning but they're basically the same14/05 00:01
xplati think preorder reasoning might have some additional support for lifting setoid equalities to the preordering via the preorder's reflexive law14/05 00:02
xplatsince i think preorders in the stdlib can be defined relative to a setoid like that14/05 00:02
--- Day changed Sun May 15 2011
augurso im thinking of building a natural deduction proof editor15/05 07:35
augurwhere you construct proofs in natural deduction style directly, rather than through some intermediate ascii code15/05 07:35
augurand it'll be able to spit out your favorite textual representation (e.g. latex + some proof package)15/05 07:36
joe6hello, I think i asked this before, but did not get a response. Just wondering if there is a helloWorld.agda with the new IO mechanism of the agda stdlib?15/05 17:00
Eduard_Munteanujoe6: main = run $ putStrLn "Hello World!"     ?15/05 17:02
Eduard_Munteanu(Is that new?)15/05 17:03
aristidis that smiley in the topic a bat?15/05 17:03
dpiponiCan anyone help me with some agda newbie stuff?15/05 17:26
Eduard_MunteanuWell, just ask away.15/05 17:27
Saizansure15/05 17:29
dpiponiRe: http://hpaste.org/46701/monoid_example I don't know the libraries well. Can I shorten it?15/05 17:29
dpiponiEg. Should I organise the imports differently?15/05 17:29
dpiponiBasically, I know it works, but is it idiomatic agda?15/05 17:29
Saizani think the .Code modules are re-exported from the corresponding ones15/05 17:31
Saizan.Core, i meant15/05 17:32
dpiponiOK That tidies up a tiny bit!15/05 17:33
Eduard_Munteanuopen import Algebra.FunctionProperties using (_≡_)    -- if you need only that thing from that module15/05 17:34
Saizanyou could use _≡_ instead of λ a b → a ≡ b also, same for _∨_, other than that it seems fine15/05 17:34
SaizanEduard_Munteanu: (_≡_) is passed as an argument to the module there15/05 17:34
Eduard_MunteanuOops.15/05 17:35
dpiponiSaizan: I was disappointed to find I could't write a ≈ b = a ≡ b in the record15/05 17:35
* Eduard_Munteanu really wants some record update syntax. :(15/05 17:36
Saizandpiponi: yeah, it's too bad that record doesn't work more like where, i guess they copied this misfeature from haskell15/05 17:36
dpiponiIs there a way to write assoc inline rather than using a non-anonymous proof?15/05 17:38
Saizanif Data.Bool exported a dependent eliminator for Bool you could use that15/05 17:39
Saizani.e. Bool-elim : (P : Bool -> Set) -> P true -> P false -> (x : Bool) -> P x15/05 17:40
Saizandpiponi: in the next version there's going to be pattern matching for lambdas15/05 17:41
Eduard_MunteanuHrm, can't we just have case expressions?15/05 17:42
Eduard_MunteanuI figure that fixes more than one issue.15/05 17:42
Eduard_MunteanuCurrently it's a bit verbose because for every pattern-matching one basically has to define another function.15/05 17:44
Saizanit's easier to add pattern matching to lambdas because you already get a Pi type from the context, while a case expression only gets the result type from the context15/05 17:45
dpiponiHmmm...shouldn't something like "assoc = λ x _ _ = if x then refl else refl" work.15/05 17:45
Eduard_MunteanuI don't think so, for the reason associativity _ _ _ = refl doesn't work, i.e. Agda doesn't see the light.15/05 17:46
Eduard_Munteanuif_then_else_ is just a function15/05 17:46
Saizandpiponi: the type of Data.Bool.if_then_else_ is too restricted for that15/05 17:47
dpiponiWhat's the correct syntax from combining the two FunctionProperties lines into one. Eduard's line gives me an error about not exporting _≡_15/05 17:53
Saizani don't think you can15/05 17:54
dpiponiOK I misunderstood something in the reference manual15/05 17:54
Eduard_MunteanuNah, I thought you were just importing _≡_ from that module, but instead you're opening it with that param.15/05 17:55
dpiponiI think I'm kinda sorta getting the hang of this agda game15/05 17:56
Saizanhttp://hpaste.org/paste/46701/monoid_example_annotation#p46703 <- this works, if you replace the (λ y z → refl) with holes there you can see how they need to be of different types, which if_then_else_ wouldn't allow15/05 17:56
dpiponiBool-elim isn't an ordinary function but a...what do you call these things...dependent functions?15/05 17:58
Saizani guess so, it has a dependent type15/05 17:59
Saizanin the sense that the value 'x' appears in the type15/05 18:00
Eduard_MunteanuIt is pretty much ordinary in Agda :) but it has a rich-enough type so you can carry the two proofs around distinctively.15/05 18:00
dpiponiBTW I couldn't find it but does the standard library already have proofs that all the usual things have the algebraic structures like Bool-∨ already in it?15/05 18:00
Saizani think so15/05 18:01
dpiponiI don't think that last sentence I wrote actually parsed as English,15/05 18:01
Saizansee Data.Bool.Properties15/05 18:01
dpiponiAh! Now I can see what Bool-∨ is supposed to look like!15/05 18:03
dpiponiWhy doesn't 'where' work here: http://hpaste.org/46704/wherefore_not_where15/05 18:10
dpiponiI get  parse error15/05 18:10
Saizanyou've to put that outside of record { .. }, so that it attaches to "Bool-∨ = .."15/05 18:12
Eduard_MunteanuI'm not sure it works inside the record, besides you're missing a ';' now.15/05 18:12
Saizanthe "label = .." parts inside the record { .. } don't count as declarations15/05 18:13
Saizan(sadly)15/05 18:13
* Eduard_Munteanu wonders if let ... in ... might work though15/05 18:14
Eduard_MunteanuBut that's even uglier.15/05 18:14
dpiponiOK. Putting where outside works.15/05 18:14
Saizanyeah, let .. in .. should work, because it's an expression15/05 18:14
dpiponiIs it bad to use the law of the excluded middle as a postulate in agda?15/05 18:37
dpiponiEg. if I want to play with some simple systems of axioms using classical logic.15/05 18:38
Saizanit's consistent to postulate it15/05 18:43
Saizanas with any other postulate it won't compute, which might prevent some types from being considered equal on the nose15/05 18:45
djahandarieHoly smokes15/05 18:56
djahandarie"equal on the nose"?15/05 18:58
Saizanas in have the same normal form, modulo variable renaming15/05 19:02
Saizan"definitionally equal" to be precise15/05 19:02
Saizane.g. subst f (lem ..) x won't compute to x, but with the axiom K you can prove the two are propositionally equal, so you can get past that15/05 19:04
djahandarieAh okay15/05 19:04
djahandarieIs there a real benifit to using K?15/05 19:04
djahandarieI think I saw it in some of the homotopy proofs15/05 19:04
Saizanthe benefit is that dependent pattern matching will work the same for any type, the drawback is that it's inconsistent with the univalence axiom, afaiu homotopy type theory15/05 19:05
Eduard_MunteanuI remember an article on the perspective that constructive logic is more general than classical stuff.15/05 19:07
Saizanafterall all those types, e.g. circle, they are talking about are defined by saying there are more proofs of x == x then refl15/05 19:08
* djahandarie notes down to read more about the homotopy stuff15/05 19:08
Eduard_MunteanuAnd in Agda excluded middle is alright as long as you don't play with some of the more dangerous options, like injective type constructors IIRC.15/05 19:08
Saizanyep15/05 19:08
Saizanconstructive logic can be seen as classical extended with constructive disjunction and existential15/05 19:09
Saizansince the classical ones can be embedded in other ways15/05 19:10
dpiponiSaizan: Mightn't it be that x==x is always proved by refl, but that we can't prove this in the system15/05 19:10
Saizandpiponi: i think with the univalence axiom you can really show there's more than just refl for some types15/05 19:12
Saizanhttp://homotopytypetheory.org/2011/04/29/a-formal-proof-that-pi1s1-is-z/#more-498 <- here they are implementing a bijection between base == base and Z, afaik15/05 19:14
augurhow does this typecheck at all15/05 21:33
augurbegin_ : ∀ {x y} → x IsRelatedTo y → x ∼ y15/05 21:33
augurbegin relTo x∼y = x∼y15/05 21:33
augurshouldnt it be begin (relTo x~y) ??15/05 21:33
doliobegin_ is an operator.15/05 21:41
dolioSo the former parses as the latter.15/05 21:42
vsileswhat's an operator in this context ?15/05 21:45
dolioAnything with an underscore in the name is an operator.15/05 21:45
dolioThe argument goes in place of the underscore, and you can alter its fixity and associativity.15/05 21:46
dolioBut the fixity is always less than the fixity of function application.15/05 21:46
vsilesok, but there's only one _, so I would expect "begin relTo x~y" to be parsed as "(begin relTo) x~y"15/05 21:47
dolioSo begin_, being a prefix operator, binds less tightly than function application, and 'begin f x' = 'begin (f x)'.15/05 21:47
vsilesoh, ok15/05 21:47
augurdolio: mm.. i dont see how tho15/05 22:10
augurbegin is unary not binary15/05 22:10
dolioSo?15/05 22:10
augurdolio: so there's a type mismatch15/05 22:11
augurbegin in the body is binary not unary15/05 22:11
dolioBody of what?15/05 22:12
augurwell not the body but the definition rather than the type sig15/05 22:12
dolioNo it isn't.15/05 22:13
augur??15/05 22:15
--- Day changed Mon May 16 2011
xplatbegin is not binary anywhere16/05 02:37
xplater, begin_16/05 02:37
xplatit is trinary if you count implicit arguments, unary otherwise16/05 02:37
xplatthe definition doesn't specify any arguments in {} so it is being used as unary there16/05 02:38
copumpkinxplat: new version of monoidal? :o16/05 03:54
copumpkinless memory~16/05 03:54
copumpkin!!16/05 03:54
xplatcopumpkin: you're back!16/05 04:01
xplatalso, yes, less memory!   not as much less as i hoped, though, but at least the code is also nicer to write ...16/05 04:01
copumpkinyep! many rainforest and mountain adventures and bribes later, I am back from central america16/05 04:02
copumpkinbut I look forward to seeing what's changed after I catch up on sleep16/05 04:02
augurhmm16/05 04:42
augurim really lost on this AoPA stuff :\16/05 04:42
rothwell'lo. when i try to build the 0.5 standard library, i get a ghc stack overflow. is there some way to fix this?16/05 07:19
rothwellas in... raise the stack limit, or something? perhaps it's OS specific16/05 07:19
xplat_⨴_⨵_ : ∀ {A B B′ C} → Hom B′ C → B ≡₀ B′ → Hom A B → Hom A C16/05 15:44
xplatmaybe that should have B′ ≡₀ B ...16/05 15:45
xplatanyway it's a new branch of categories i'm working on, making that the default composition and _∘_ just a shortcut that uses the refl for _≡₀_16/05 15:46
xplati also have _≡₁_ : ∀ {A B A′ B′} → Hom A B → Hom A′ B′ → Set e , but i think that type might be too general16/05 15:47
xplat(why was i driven to try this?  i found it extremely hard to work with functors and natural transformations where the natural domains or codomains were propositionally but not definitionally equal)16/05 15:55
xplatoh, i also have id₌ : ∀ {A B} → A ≡₀ B → Hom A B16/05 15:58
xplati'm not really certain of what to choose as basic, honestly, because if you have one of _⨴_⨵_ and _∘_ and one of id₌ and id, then unless it's _∘_ and id you can define all of them16/05 16:00
xplatto use a little fantasy agda syntax:16/05 16:03
xplat_∘_ = _⨴ refl ⨵_ ; id = id₌ refl ; g ⨴ eqn ⨵ f = g ∘ id₌ eqn ∘ f ; id₌ eqn = id ⨴ eqn ⨵ id16/05 16:06
xplat(or to use more fantasy syntax, id₌ = id ⨴_⨵ id !)16/05 16:07
xplatmaking _⨴_⨵_ basic complicates the associative law, which is kind of annoying16/05 16:11
xplatbut at the same time it feels like it should be basic16/05 16:12
* copumpkin elects xplat to the position of "Best unicode operator finder ever"16/05 16:12
xplatwell, i wanted just half circles, but i could only find black ones16/05 16:13
xplatdid you have a look at the new monoidal stuff?16/05 16:15
copumpkinnot yet, just got to work today, and slept a lot last night :)16/05 16:16
copumpkinwill check it after I finish catching up on the >500 emails from the past couple of weeks16/05 16:16
xplatthat's a lot of emails16/05 16:18
copumpkin:(16/05 16:19
augurahaha16/05 16:20
auguri made quite a splash in /r/atheism when i countered an unsubstantiated claim about Mac and PC users with another unsubstantiated claim about Mac and PC users16/05 16:21
augurbut instead of saying "the ad's are accidentally accurate", i said "the fact of the matter is this"16/05 16:22
augurand apparently that makes all the difference16/05 16:22
xplatif you said "the fact of the matter i's this" you'd've been fine16/05 16:23
augurwell ok, i said studies have shown yes16/05 16:25
augurbut a claim about studies and a claim about facts are both just as in need of substantiation16/05 16:26
xplatstudies have shown people with iphones get laid more, if you count data mining by dating sites as studies16/05 16:26
augurno reason not to!16/05 16:27
augurtho its ofcourse more accurate to say studies have show people with iphones who participated in this study get laid more16/05 16:27
auguror rather16/05 16:27
augurare more likely to say they get laid16/05 16:27
xplatyes, since it was based on self-reporting16/05 16:28
xplatiirc it did hold across sexes, though16/05 16:29
auguranyway, i just find it hilarious that theres a minor double standard16/05 16:30
augurok fokes, im off to school16/05 16:31
augurbai16/05 16:31
xplatyou can make a factual claim without challenge but you can't make a variety of factual claim that is commonly supposed to be especially reliable without further scrutiny?16/05 16:31
xplati started out that sentence agreeing, but by the time i finished typing it i came around to the view that that really puts the 'minor' in 'minor double standard' ...16/05 16:33
auguroh ai16/05 17:13
xplatanother alternative presents itself: have third and fourth fundamental operations to transport the ends of an arrow along an equality, with a guarantee that the transported arrow equals the original16/05 17:37
xplat(along an equality of objects)16/05 17:37
xplatgah16/05 18:28
xplatyesterday i was having all kinds of seemingly good ideas about this, today it seems like i have turned st00pid16/05 18:29
xplatlike, _\==\_1_ is no longer an equivalence relation by the old definition16/05 18:30
xplatso i try to come up with a more polymorphic definition, and oops it's TOO polymorphic16/05 18:33
Eduard_Munteanuhttp://www.smbc-comics.com/index.php?db=comics&id=2135#comic16/05 23:14
* Eduard_Munteanu tries postulating an _and-i'll-be-damned-if-my-son_ combinator :P16/05 23:14
Mathnerd314doesn't _|_ always work?16/05 23:56
--- Day changed Tue May 17 2011
copumpkinPanic: Unbound name: Category.recCon-NOT-PRINTED [0,13017]@5241940117/05 01:19
copumpkinxplat: blah, my agda is broken17/05 01:35
joe6copumpkin, long time, no see.17/05 02:20
joe6wanted to tell you that your "introduction to agda" videos were very helpful.17/05 02:20
joe6Good job on them. Nice retro-haircut, btw.17/05 02:21
copumpkinhi :)17/05 02:21
copumpkinlol, thanks17/05 02:21
dolioIt's gone now.17/05 02:21
xplat_and-i'll-be-damned-if-my-son_ actually sounds a lot like bot-elim.  only, the theory is usually inconsistent17/05 02:38
xplateek, broken agda17/05 02:40
xplatmy agda is probably broken too since i just updated GHC and HP17/05 02:40
copumpkinhttp://code.google.com/p/agda/issues/detail?id=414&start=10017/05 02:40
xplatbut mine is a pretty trivial sort of 'broken'17/05 02:41
xplatcopumpkin: i guess that hit you compiling 'Category.Category.op' or something17/05 02:42
copumpkinxplat: yep :)17/05 03:15
augurso17/05 07:32
augurhow difficult is it to actually run agda code17/05 07:32
Eduard_MunteanuIt's not, you just write a main and compile17/05 07:36
augurah ok, so its pretty easy then17/05 07:36
Eduard_MunteanuTry something like    main = run $ putStrLn "Hello world!" for a start17/05 07:37
Eduard_Munteanu(you need to tell agda to compile not just to typecheck like C-c C-l)17/05 07:38
copumpkinif you wanted to write a Rel Nat17/05 20:58
copumpkinsuch that n and (n + 1) are related foreach n17/05 20:58
copumpkinhow would you do that?17/05 20:58
copumpkincurrently I have an inductive data type that closely resembles <=17/05 20:59
copumpkinbut instead of forall n. zero <= n17/05 20:59
copumpkinI have 0 relto 1 as the base case17/05 20:59
copumpkinthe other one works the same17/05 20:59
copumpkinI have something that works, but was just wondering if there was a nicer way17/05 20:59
Saizanwhy not just data Foo : Rel Nat where foo : forall {n} -> Foo n (suc n) ?17/05 21:00
copumpkinman17/05 21:00
copumpkinsee, I'm glad I asked :)17/05 21:00
Saizan:)17/05 21:00
* copumpkin kicks himself17/05 21:00
copumpkinoh actually I need <= anyway17/05 21:15
copumpkinor <, maybe17/05 21:16
copumpkin<=17/05 21:16
--- Day changed Wed May 18 2011
Saizancool, we can query for datatype definitions with reflection now18/05 01:12
copumpkinhow so?18/05 01:27
Saizan primDataConstructors : Data-type → List Name18/05 01:29
Saizan primQNameDefinition  : Name → Definition18/05 01:29
Saizanand a Definition might contain a Data-type18/05 01:30
copumpkinwow :)18/05 01:30
copumpkinso has anyone done anything with reflection yet? did that presburger solver ever appear?18/05 01:30
Saizandunno18/05 01:30
Saizanmy guess is that npouillard is working on it to make his binders lib easier to use :)18/05 01:32
copumpkin:)18/05 01:33
* copumpkin walks home18/05 01:33
Saizani wished i could derive eliminators but it's not there yet18/05 01:33
dolioIs there a version of SHE that doesn't bomb on the new mtl?18/05 01:39
Saizani remembered i hacked up one some time i go: http://code.haskell.org/~Saizan/she/18/05 01:44
Saizan(unless darcs pulling is more effort than commenting out the 6 or so lines :)18/05 01:45
copumpkinxplat: do you have a pending push with that globe stuff in it?18/05 02:31
xplatcopumpkin: no, i kind of did it on a whim in a branch where it doesn't belong18/05 03:07
copumpkinah :)18/05 03:07
xplatalso, as has been pointed out it's Globe^{op}18/05 03:09
copumpkinyeah18/05 03:09
xplatjust needs a few things reversed18/05 03:09
copumpkinxplat: did you add more stuff to Support.Nat or should I just reimplement <-trans?18/05 03:32
copumpkinah well, too late :)18/05 03:33
* copumpkin tries to figure out what signature <-unsuc must have18/05 03:34
copumpkinaha18/05 03:34
xplatdid you see the annotation?18/05 03:41
copumpkinoh, nope18/05 03:41
copumpkindamn18/05 03:41
copumpkinwhat's +++?18/05 03:42
copumpkinthe same as the ArrowChoice one?18/05 03:42
xplatyeah18/05 03:42
xplatthere's a def of that in my new push i think18/05 03:42
copumpkinah, I need to merge that18/05 03:42
copumpkingah, this broken agda is biting me18/05 03:46
copumpkina TacticalGrace :O18/05 03:47
TacticalGrace:)18/05 03:47
kamatsuhm, just thinking that this reflection stuff could in the long term add some proof tactics to Agda?18/05 04:02
kamatsuprogramming Agda proof tactics in Agda might be nice18/05 04:02
kamatsumuch better than Coq's untyped mess18/05 04:02
copumpkinthat's the goal18/05 04:04
copumpkinxplat: mind if I adapt your power to the new layout (and de-parametrize the module)?18/05 04:06
copumpkinor maybe not de-parametrize the module yet18/05 04:06
copumpkinxplat: pushed18/05 04:18
copumpkin(merged with your stuff)18/05 04:18
copumpkinso you say monoidal can actually be typechecked these days?18/05 04:19
xplati've been able to18/05 04:25
xplati wouldn't recommend de-parametrizing the module though18/05 04:26
xplati tried threading C through as an implicit before and it worked badly18/05 04:26
xplatthat's why i tried that in the first place18/05 04:26
copumpkinah18/05 04:28
copumpkinmy current thoughts for deparametrizing the modules I have parametrized is to make an internal parametrized module18/05 04:28
copumpkinand then opening it at the end18/05 04:28
copumpkinsince my other attempts have also failed18/05 04:28
copumpkinbut importing parametrized modules is kind of a pain18/05 04:28
xplati've noticed, but i found it worthwhile so far18/05 04:29
copumpkinyeah18/05 04:29
copumpkinit definitely cleans some stuff up a lot18/05 04:29
copumpkinI think the inner parametrized module + opening might be a good approach, but I'm still not sure18/05 04:29
* copumpkin ponders what equality type to use here18/05 04:45
copumpkinoh18/05 04:47
copumpkincan't I just use plain old propositional equality?18/05 04:47
xplatyes18/05 05:04
copumpkinokay, should be done with globe18/05 05:41
copumpkinugliest assoc proof ever18/05 05:41
copumpkinI should really just bite the bullet and rename Category.Agda to Category.Sets or something18/05 05:52
copumpkinand rename Setoids to Sets, and get rid of Sets18/05 05:52
xplatthe assoc proof must have a lot of cases, considering how many cases composition has ...18/05 06:11
copumpkinyeah18/05 06:12
copumpkintrying to figure out how to build a globular set now18/05 06:12
copumpkinI mean, a concrete one18/05 06:12
xplatyou'll probably want some helpers to make them simply without doing all the Functor proofs every time18/05 06:14
copumpkinyeah, probably18/05 06:14
copumpkinbut even figuring out my object and morphism mappings is making my brain hurt a bit :)18/05 06:14
copumpkinmaybe it's time for bed18/05 06:14
copumpkinI have the object mapping I think18/05 06:15
xplatit's just a Set of your n-dimensional globes for each dimension18/05 06:16
copumpkinhmm18/05 06:16
copumpkinI get that in principle18/05 06:16
xplatyou can make one out of a category.  F\_0 0 = C.Obj ; F\_0 1 = \exists\_2 C.Hom ; F_0 (suc (suc _)) = \bot18/05 06:18
copumpkinI was trying to make the agda propositional equality one18/05 06:19
copumpkinseemed super simple :)18/05 06:19
copumpkinobjs : ∀ {ℓ} → (A : Set ℓ) → ℕ → Set ℓ18/05 06:19
copumpkinobjs A zero = A18/05 06:19
copumpkinobjs A (suc n) = (x y : objs A n) → x ≣ y18/05 06:19
xplatyou want existential18/05 06:20
xplata globe knows its ends18/05 06:20
copumpkinhmm18/05 06:20
xplatit doesn't get told them18/05 06:20
copumpkinoh18/05 06:20
copumpkinmakes sense, yeah18/05 06:21
copumpkinthat was what was hurting me for homs18/05 06:21
copumpkingah, no records in mutual blocks18/05 06:22
xplati get pretty disappointed in records sometimes18/05 06:28
xplatcan't refer to preceding fields, can't do pattern-matching defs, can't do other kinds of declaration like data inline, can't go in mutual blocks ...18/05 06:29
copumpkinyeah :/18/05 06:29
xplati guess haskell spoiled me on the consistent application of syntactic sugar.  (except slices with type operators ...)18/05 06:30
copumpkin:)18/05 06:31
copumpkinyeah18/05 06:31
xplat(not consistent as in 'haskell sugars everything', but consistent as in 'if sugar is available in one situation, the same sugar is available in similar/analagous situations too)18/05 06:31
copumpkinyeah18/05 06:32
copumpkinomg we can hack on agda during hac phi! :P18/05 06:33
xplatagda bbq @ hac phi18/05 06:34
xplatgreat, now i have to find a unicode bbq ...18/05 06:34
copumpkin:)18/05 06:37
copumpkinanyway, bedtime here18/05 06:37
cheater__what's hac phi?18/05 14:14
cheater__http://www.haskell.org/haskellwiki/Hac_%CF%8618/05 14:14
cheater__buce18/05 14:14
cheater__nice18/05 14:14
cheater__:)18/05 14:14
mm_freakhello there18/05 16:13
Saizanhi18/05 16:13
mm_freakit seems that agda is very nice for some tasks and that it can be combined well with haskell18/05 16:13
mm_freakunfortunately there is little information about real world applications18/05 16:13
mm_freakbecause right now i'm doing productive development in haskell, and i would like to incorporate agda for some tasks18/05 16:14
Eduard_MunteanuThere is some... http://wiki.portal.chalmers.se/agda/agda.php?n=Main.Libraries18/05 16:14
mm_freakrealistically how successful will i be?18/05 16:14
Eduard_MunteanuBindings are kinda painful to write though, if you need to hook to a large API.18/05 16:14
mm_freaki would write agda code to be used from haskell18/05 16:16
Eduard_MunteanuAh, I wouldn't know about the other way around.18/05 16:16
* Saizan neither18/05 16:16
Eduard_Munteanu(Is it even implemented?)18/05 16:16
mm_freakwhat would i write bindings for then?  for my own code?18/05 16:17
copumpkinit generates haskell code to compile18/05 16:17
copumpkinsurely that haskell code can be used18/05 16:17
Saizanassuming it's still approachable by a human18/05 16:18
Eduard_MunteanuYeah, but what if you have to bind to a myAgdaFunction_xsuaxklasxhaskdfhgwopeiufgop  that changes every time :)18/05 16:18
mm_freaki see18/05 16:18
Saizancalling haskell from agda is a matter of specifying the API in an agda source, instead18/05 16:19
Eduard_MunteanuMaybe have Agda call into Haskell and pass some callbacks? :/18/05 16:20
mm_freakwell, i want to write my main application in haskell, because i make heavy use of concurrency and other abstractions, which are unlikely available in agda18/05 16:21
Eduard_MunteanuThe big problem is Haskell can't always know about all Agda functions because of their types, I guess.18/05 16:21
mm_freaki would be perfectly fine with writing interface functions18/05 16:21
mm_freakquestion is just how well does interfacing agda from haskell works, and how well agda code performs in general18/05 16:22
mm_freakit probably won't beat haskell18/05 16:22
Saizanmm_freak: icbw but i don't think there's any officially supported way to call agda from haskell18/05 16:22
Saizanmm_freak: though you could look at what kind of haskell the MAlonzo backend produces, maybe it's usable18/05 16:23
Eduard_MunteanuI guess Epic was meant as a way to make performance better.18/05 16:23
Eduard_Munteanu*the Epic backend18/05 16:24
copumpkinit doesn't go through haskell though?18/05 16:24
Eduard_MunteanuBut then you can't call into Haskell code, at least not with the same syntax, IIRC.18/05 16:24
Eduard_MunteanuI dunno, it might not. After all Epic exposes some combinator calculus, maybe it's not that difficult to approach it.18/05 16:25
Saizanyou've to go through C :)18/05 16:25
mm_freakbottom line:  there is no official support for what i'd like to do, right?18/05 16:26
copumpkinprobably not18/05 16:26
copumpkinit's also kind of tricky to write agda :)18/05 16:26
Eduard_MunteanuNope, and doing it the other way around is tricky as well.18/05 16:26
Saizanmm_freak: btw, making concurrency available in agda is just a matter of binding Control.Concurrent :)18/05 16:26
mm_freakit was kind of tricky to write haskell in the beginning18/05 16:26
mm_freakSaizan: i really depend on type classes ;)18/05 16:26
Eduard_Munteanumm_freak: we do have some sort of typeclasses now in Agda!18/05 16:27
Eduard_MunteanuThough the standard lib doesn't seem to use it at the moment.18/05 16:27
mm_freakEduard_Munteanu: i read it's not stable yet18/05 16:27
Eduard_MunteanuYeah, latest darcs.18/05 16:27
Eduard_MunteanuFor many things you don't need typeclasses / non-canonical implicits though, since Agda has those implicits and parametrized modules.18/05 16:28
Eduard_Munteanu(though the instance universe is closed, you can't add instances comfortably in some cases)18/05 16:30
mm_freaki don't understand most of this yet18/05 16:32
mm_freakhas anyone of you written a real world application in agda?18/05 16:32
xplatagda doesn't have typeclasses.  it has parameterized modules, although they have to be parameterized on records (or other values) rather than on other modules directly18/05 16:33
xplat(this saves the language implementors having to create a separate type system and expression language for modules)18/05 16:34
Saizanxplat: i think they were referring to the new {{..}} implicits18/05 16:34
Eduard_MunteanuI haven't. I played with the FFI a bit, to experiment with array bounds checking elimination.18/05 16:34
xplat(and you from having to learn it)18/05 16:34
xplatSaizan: i was getting to that18/05 16:34
* Saizan bets they'll be called double-bracket implicits in the future18/05 16:35
Eduard_Munteanuxplat: I thought the reason was so you couldn't break totality18/05 16:35
Eduard_Munteanu(e.g. depending on runtime stuff)18/05 16:35
Eduard_Munteanuerm, not totality per se, but Agda's "well-foundedness" :)18/05 16:36
xplatAgda also has implicit arguments, but they can't simulate typeclasses the way you would in, for example, scala, because they are inferred in a more strict way18/05 16:36
Saizanif you wanted to prevent parametrizing by "runtime stuff" you'd force modules to _not_ be parametrized by values18/05 16:36
Eduard_MunteanuLike you can fool yourself in Haskell into thinking those typeclass-based Peanos actually work at compile time.18/05 16:36
xplatinstead of being sensitive to what's in scope, or anything like that, they get filled in with the only possible value they could have.  if they have more than one possible value, they fail.18/05 16:37
Eduard_MunteanuYeah. And my impression was they were sufficient for most Haskell-like needs.18/05 16:38
xplatso someone invented a new kind of implicit values more similar to scala's, which are in latest unreleased versions of Agda18/05 16:38
mm_freakEduard_Munteanu: they do work at compile time, as long as you don't use reification18/05 16:39
Eduard_MunteanuSaizan: well, values aren't necessarily "runtime", though instance solving is if members are opaque to the type system (like FFI is).18/05 16:39
xplatthey instead try to fill in with any type-correct value in scope, of which only one must be available or they fail too :)18/05 16:39
mm_freakor reflection18/05 16:40
Eduard_MunteanuYeah, reification.18/05 16:40
xplatand in this case it really means 'value', it won't try to find a function with an implicit argument and fill in the implicit argument, so it's a little weaker than scala's implicits or Haskell's typeclass inference18/05 16:40
mm_freakis there a tutorial for agda, which is oriented around writing standalone programs?18/05 16:41
mm_freakor at least includes a chapter on it?18/05 16:41
copumpkinmm_freak: learn the proofs18/05 16:41
copumpkin:P18/05 16:41
copumpkinif you approach it as "I want to write real-world shit" you'll just be using a really fucking annoying haskell that can do less18/05 16:41
copumpkin(with cooler syntax)18/05 16:41
djahandarie(but the cooler syntax is usually ruined by the overuse of Unicode)18/05 16:42
copumpkinruined is in the eye of the beholder18/05 16:42
djahandarieBut I speak for everyone so it's okay18/05 16:42
mm_freakcopumpkin: i'm going to, but i /need/ to consider it, because i don't just want to play with it18/05 16:42
Eduard_MunteanuThere's that Coq-oriented stuff for writing programs.18/05 16:42
Eduard_Munteanu@where certified18/05 16:43
lambdabotI know nothing about certified.18/05 16:43
copumpkinmm_freak: well, I don't think anyone much (except for larrytheliquid) is writing any real programs with it18/05 16:43
copumpkincpdt?18/05 16:43
xplatmm_freak: what is your need for using agda stuff in the real world?18/05 16:43
Eduard_Munteanu@where cpdt18/05 16:43
lambdabotI know nothing about cpdt.18/05 16:43
copumpkinwhat is this real world of which you speak?18/05 16:43
Eduard_Munteanuhttp://adam.chlipala.net/cpdt/18/05 16:43
mm_freakxplat: there is no need, i just love using languages, which nobody understands =P18/05 16:43
mm_freakseriously haskell has made me orders of magnitude more productive compared to C++/C#, which i used before18/05 16:44
Eduard_Munteanumm_freak: well you certainly can FFI to Haskell and write a higher layer that uses dependent types to ensure consistency, prove stuff etc.18/05 16:44
mm_freakand i sense the same potential even to a greater degree in agda18/05 16:45
mm_freakmore powerful language, less time wasted for debugging18/05 16:45
xplatwell, hoping to be orders of magnitude more productive with agda now seems like trying to be orders of magnitude more productive with haskell 1.218/05 16:45
djahandarieHeh18/05 16:45
xplatwhich means, there's cases where you can be, but the tools/libraries situation is such that you usually can't18/05 16:45
mm_freaki understand that, and that's why i'm mainly interested in a combination of haskell and agda18/05 16:46
mm_freakto use agda, where it is more powerful in practice and not only in theory18/05 16:46
Saizandid haskell 1.2 have monadic IO yet? because i think that'd be too advanced :)18/05 16:46
xplatthe FFI wasn't that great in haskell 1.2 either iirc :718/05 16:46
mm_freaki could also imagine combining haskell and agda indirectly as programs communicating through sockets18/05 16:47
mm_freakdo the number crunching in agda, the rest in haskell18/05 16:48
xplati doubt agda would be a speed demon for number crunching either18/05 16:48
xplati think your best bet for numerics in agda is to use it as a certified code generator18/05 16:49
xplator rather, to write one18/05 16:49
mm_freaklook at it this way:  haskell is not a speed demon either compared to C or fortran, but if the algorithm itself changes sufficiently often and your development cycles are much shorter, then you will perform better with haskell18/05 16:50
xplathm, yes18/05 16:50
copumpkinthat is not the case with agda, in my experience so far :)18/05 16:51
copumpkinit still is ridiculously fun18/05 16:51
xplatbut i think there's a lot of dev work to be done to number crunch with numerically stable floating point or something in agda as opposed to, say, computable reals18/05 16:52
xplat(and computable reals probably aren't all that far along in production-ready terms either)18/05 16:52
copumpkinyou can bind to them (IEEE floats) easily18/05 16:52
copumpkinbut it's pretty tricky to model them18/05 16:52
mm_freakmy usual response to "but C is faster than haskell":  my haskell program has long finished calculating the solution, while you are still debugging your C program ;)18/05 16:52
copumpkinassuming you want to prove anything at all about it18/05 16:52
Saizan..and if you don't18/05 16:53
Saizanwhat's the point?18/05 16:53
copumpkinyeah18/05 16:53
copumpkinthere's glguy and my development of machine words18/05 16:53
copumpkinwith all sorts of properties about them18/05 16:53
xplatwell, there could be a point if Agda were as much ahead of haskell in straight-ahead coding as haskell is in front of most other things18/05 16:53
copumpkinso if you want to do machine wordey things, then you can do that18/05 16:54
xplatbut i don't think that's really the case18/05 16:54
xplatat least not yet18/05 16:54
copumpkinI do think the hole machinery makes writing vaguely interesting types (like what I'd do with GADTs and type families in haskell) easier in agda than haskell18/05 16:54
xplatyes, it definitely is, but you also hit corner cases with it18/05 16:55
xplatit needs more support for sucking stuff back into holes to work on, for renaming autonamed variables, for more flexible manipulation of pattern matching18/05 16:55
xplatand there are some straight-up bugs18/05 16:56
Saizansucking stuff back into holes?18/05 16:56
Eduard_MunteanuMeh, I want better pattern-matching too, like case constructs or something equivalent...18/05 16:56
xplatwhere agda-mode fails to generate code or generates wrong code (which gets caught by the compiler)18/05 16:57
Saizanah, emacs' undo usually suffices for that18/05 16:57
copumpkinSaizan: really?18/05 16:57
xplatSaizan: i don't think that fixes your context so you still have to reload after18/05 16:58
copumpkinI want to "un-give" a hole18/05 16:58
copumpkinor un-refine one18/05 16:58
copumpkincause reloading might take 5 minutes18/05 16:58
copumpkinand I didn't like what I gave by accident18/05 16:58
xplatcopumpkin: or what agsy gave for you18/05 16:58
Eduard_Munteanumm_freak: actually I think some people under-emphasize performance issues, which become relevant when writing certain types of code which would benefit from using a higher-level language like Haskell18/05 16:59
mm_freakEduard_Munteanu: i know that…  that's why i reimplemented a lot of things from scratch in haskell18/05 16:59
xplati hit a lot of that with Globe because it always preferred sigmas to taus and i would get lulled into complacency while working the sigma cases18/05 16:59
mm_freakyou can find IRC, SMTP and HTTP implementations from me on hackage18/05 16:59
Saizani was only referring to get back the right source, you do have to reload18/05 17:00
mm_freakat the time of writing, there have been existing implementations, but none of them were fast/flexible enough18/05 17:00
mm_freak(though the IRC library is more of a fun project rather than a really productive one)18/05 17:00
xplatyes, i had the same experience with HTTP a couple of years ago but instead of writing my own i used a different language18/05 17:01
xplat(python; this turned out to be a huge mistake)18/05 17:01
Eduard_MunteanuYeah, I liked spending some time in the performance optimization direction too, since I found it frustrating in some cases that equivalent C code was easier to write, a lot faster and more readable18/05 17:01
Eduard_Munteanu(well this was a compression algorithm, but it probably goes for any cpu-bound task involving mutation)18/05 17:02
mm_freakxplat: i won't go back to a less powerful language18/05 17:02
xplati dunno, you have to go pretty far into the uncanny valley of optimization with haskell before C is both faster AND more readable18/05 17:02
mm_freakeven tried racket with its incredibly elegant CPS-based web framework, but still found haskell better18/05 17:02
xplatmm_freak: my experiment with python caused me to come around to your viewpoint18/05 17:03
Eduard_MunteanuI found adaptive Huffman to be a piss to write.18/05 17:03
Saizanyou need to write a nice lib for adaptive computations first18/05 17:04
Eduard_MunteanuI didn't code that one in C but I expect the C variant to be ~ 2-3x faster at least without any effort.18/05 17:04
xplatadaptive Huffman is pretty annoying.  and usually unworth it too.18/05 17:04
mm_freakxplat: then i'm probably luckier, because i never considered going to a different language, because i viewed this as an opportunity to learn more RFCs and train myself in writing high performance code in haskell18/05 17:04
mm_freakEduard_Munteanu: interestingly i never find equivalent C code easier to write18/05 17:05
xplati think when i was doing this only like 5 people in the world knew what iteratees were18/05 17:05
mm_freakEduard_Munteanu: it's just that you need to figure out how to write imperative code in haskell quickly and readably18/05 17:06
mm_freakit's not always very straightforward18/05 17:06
mm_freakapropos iteratees18/05 17:06
Eduard_MunteanuWell... using STRef for pointers isn't really readable no matter what :)18/05 17:06
xplatEduard_Munteanu: can be if you wrap them18/05 17:07
mm_freaknow that agda supports codata to some extent, how well can you implement the iteratee concept in agda?18/05 17:07
mm_freakor are there better abstractions in agda than in haskell?18/05 17:07
mm_freakEduard_Munteanu: i wouldn't use STRefs anyway18/05 17:07
xplati don't recall needing codata for iteratees18/05 17:08
mm_freakxplat: your stream is not necessarily finite18/05 17:08
Eduard_MunteanuWell, I did investigate zippers for the Huffman trees, but that didn't turn out to be better if you need to keep references around.18/05 17:08
Eduard_MunteanuAnd in the adaptive Huffman it's probably a lot better to have pointers to leaves.18/05 17:09
xplatmm_freak: presumably you would normally present it in finite chunks though18/05 17:09
xplatoh, i guess in agda they might help to write some things on the enumerator side, though, insofar as getting them past the termination checker18/05 17:10
mm_freakyeah18/05 17:10
mm_freakthe enumerator doesn't always know, when it is finished18/05 17:10
mm_freaktackling the awkward squad in agda18/05 17:11
xplatagda is still at the state where actually writing a main and running your code gets you odd looks18/05 17:12
* Eduard_Munteanu also wishes FFI was transparent so you could run those computations in the type system18/05 17:12
mm_freakin agda i'd expect 'main' to be of a totally different type anyway18/05 17:12
Eduard_Munteanuwell, of course, if you marked them as trusted or something18/05 17:13
Saizanit's running the code that's really shameful18/05 17:13
Eduard_Munteanumm_freak: nah, it's just IO \top, IIRC18/05 17:13
mm_freakEduard_Munteanu: right now, yes18/05 17:13
mm_freakbut that doesn't really play well with agda's type system…  it has to trust you that you don't do anything stupid18/05 17:14
mm_freakusing the IO monad in agda feels like using unsafePerformIO in haskell18/05 17:14
xplatso maybe agda will become a real world language when conal gets around to telling us what type main should be :)18/05 17:14
Eduard_MunteanuWhy would it be different in Agda to begin with?18/05 17:15
xplatIO seems like a sloppy concept even in haskell, it stands out even more in Agda?18/05 17:15
mm_freakmain : List Response -> List Request18/05 17:15
Saizanugh18/05 17:15
mm_freakor rather Stream than List18/05 17:16
mm_freakcoroutine-based IO18/05 17:16
Saizanthat would really work well with concurrency18/05 17:16
Saizan"who's thread is this response?"18/05 17:16
Eduard_Munteanumain : TypeOfProofsThatMyProgramWorksAsExpectedTM18/05 17:16
xplatPoset Response -> Poset Request18/05 17:17
Saizan*whose18/05 17:17
xplatbut i think Response and Request have the same type of 'sloppy' in them as IO18/05 17:17
Saizanthe main problem is that to be precise about IO is to model the rest of the machine your program is running on18/05 17:18
xplatthey're still sin bins packed with flying monkeys and nasal demons18/05 17:18
mm_freakSaizan: i don't see a problem with threading:  Request would have a constructor like:  fork : (Stream Response -> Stream Request) -> Request18/05 17:18
* Eduard_Munteanu idly waits for Agda to become self-hosted :P18/05 17:19
xplatmaybe in the future it will18/05 17:19
xplatbut the typechecker will need to use unsafePerformGeneralRecursion18/05 17:20
xplat(the new name for 'fix')18/05 17:20
mm_freakcan you write 'fix' for codata?18/05 17:20
Eduard_MunteanuWell, there aren't really programs that can't be written in Agda, are there?18/05 17:21
Eduard_MunteanuAs in, it's approximately a Turing Machine, if your program always halts.18/05 17:21
copumpkinmm_freak: no18/05 17:21
copumpkinyou can write unfolds :)18/05 17:21
mm_freaki think, it doesn't have to halt18/05 17:21
copumpkinit does have to be productive18/05 17:22
xplatfix is unsafe for both data and codata18/05 17:22
mm_freakcopumpkin: ok, so 'fix' is too general18/05 17:22
copumpkin"general recursion"! :D18/05 17:22
mm_freakyeah =)18/05 17:22
copumpkinwith codata, you get guarded corecursion18/05 17:22
Eduard_MunteanuIf you mean that includes mutual reduction, then isn't it about the compiler being smart enough to see it's total?18/05 17:22
copumpkinbasically means that when you make a recursive call, you must slap a constructor in front of it18/05 17:22
Saizanyou can write fix in the general recursion monad18/05 17:22
Eduard_Munteanu*recursion18/05 17:23
copumpkinEduard_Munteanu?18/05 17:23
xplatwith data, you need to consume constructors often enough.  with codata, you need to produce them often enough.18/05 17:23
mm_freakcopumpkin: with codata you could write the equivalent of 'last (iterate (+1) 0)' in agda, right?18/05 17:23
Eduard_MunteanuI'm wondering why this needs 'fix' at all.18/05 17:23
copumpkinmm_freak: nope18/05 17:23
copumpkinlast is recursion18/05 17:24
Eduard_Munteanucolast :P18/05 17:24
xplatlast won't pass the termination checker if you write it to use codata18/05 17:24
copumpkinto be able to recurse over a colist, you need to be producing shit18/05 17:24
Saizanyou can't write "last : Stram a -> a"18/05 17:24
copumpkinand last doesn't produce anything until it hits the end18/05 17:24
mm_freakso i can write comap, but not colast18/05 17:25
copumpkinyep18/05 17:26
Eduard_MunteanuI think you can have colast for the degenerate case of finite codata types.18/05 17:26
Saizanexcept you don't use co- like that :)18/05 17:26
copumpkinyour corecursive function must be productive18/05 17:26
mm_freakSaizan: i know, i just abbreviated =)18/05 17:26
copumpkinEduard_Munteanu: if it's finite in the sense of it not referring to itself, sure18/05 17:26
xplatyou can write cofirst though18/05 17:26
copumpkinbut if you need to recurse, you can't write last18/05 17:26
copumpkinSaizan: I do!18/05 17:27
* copumpkin points at his nick18/05 17:27
Eduard_Munteanucopumpkin: it could be finite like Fin and still recursive, no?18/05 17:27
Saizancopumpkin: you mean you don't reverse your arrows when you change nick to pumpkin?18/05 17:27
copumpkinoh, I do18/05 17:27
copumpkinEduard_Munteanu: you mean indexed by a regular nat?18/05 17:28
xplatEduard_Munteanu: maybe if you recurse on the (data) index rather than the (codata) value18/05 17:28
copumpkinyou can't even write codata directly anymore18/05 17:28
mm_freakand i can write scanl, but not foldl for codata, right?18/05 17:28
copumpkinmm_freak: yeah18/05 17:28
Eduard_MunteanuYeah18/05 17:28
mm_freaki was never quite sure what corecursion actually is, because i don't have the CT background18/05 17:29
Eduard_MunteanuOh, right, codata isn't special anymore, you just get those funny musical annotations :P18/05 17:29
djahandarieYeah damn those stupid musical annotations18/05 17:29
djahandarieI found this post by conor to be really interesting regarding corecursion: http://www.e-pig.org/epilogue/?p=18618/05 17:30
Saizanmm_freak: recursion is generalized foldr, corecursion is generalized unfoldr,18/05 17:30
mm_freakhow would you encode an infinitely running program in agda without asking for support from haskell?18/05 17:30
djahandarie(In Haskell, so it has unsafeCoerce. He claims to have an actual version of it though.)18/05 17:30
copumpkinmm_freak: with productive codata18/05 17:30
copumpkincorecursion, I mean18/05 17:30
copumpkinmm_freak: presumably if your program isn't doing anything observable and running forever, it's pretty useless18/05 17:31
mm_freakcopumpkin: isn't "productive corecursion" redundant?18/05 17:31
mm_freakSaizan: that's the best explanation i've ever read =)18/05 17:31
xplatyeah, the idea about productive corecursion is that you can encode infinite running, but not infinite spinning18/05 17:31
mm_freakcopumpkin: my question is:  what about the observer?18/05 17:31
copumpkinmm_freak: you can corecurse infinitely if you want, but you won't pass the productivity checker :)18/05 17:32
mm_freaksomething needs to ask for that infinite stream of do-nothings18/05 17:32
copumpkinmm_freak: yeah, that would probably be haskell18/05 17:32
copumpkinjust like haskell's RTS actually goes and "interprets" the IO action that is main18/05 17:32
xplatmm_freak: the same god that runs IO actions in haskell forces top-level codata level by level18/05 17:33
mm_freakcopumpkin: isn't corecursion always productive, otherwise it's not corecursion?18/05 17:33
cheater__what is the productivity checker?18/05 17:33
xplatthe productivity checker is the termination checker's other hat :)18/05 17:33
copumpkinmm_freak: it's still corecursion18/05 17:34
copumpkinit's like we can still write recursive functions that don't necessarily consume constructors in a simple manner, and would still call them recursive18/05 17:34
copumpkinthey wouldn't pass the termination checker18/05 17:34
copumpkinbut are still recursive18/05 17:34
xplatcheater__: it ensures that forcing a single promise only uses a finite amount of computation, otherwise it turns your functions red18/05 17:34
copumpkintake f91 or something18/05 17:34
copumpkinhttp://en.wikipedia.org/wiki/McCarthy_91_function18/05 17:35
xplatmm_freak: it's possible to consistently define corecursion exclusive or productivity as 'like recursion, but on codata instead of data'18/05 17:35
cheater__xplat: aha18/05 17:36
xplat*irrespective of productivity18/05 17:38
mm_freakwhat would be an example of nonproductive corecursion in haskell?18/05 17:39
xplatin haskell general recursion and general corecursion are indistinguishable because data and codata are indistinguishable18/05 17:40
mm_freakyes, but obviously you can't give me an example in agda ;)18/05 17:40
copumpkinmm_freak: say you have concat (repeat [])18/05 17:40
xplatwell, it owuld be possible to give an example in agda that would turn red if you tried to load it18/05 17:41
copumpkinyeah, you couldn't write concat on colists in agda18/05 17:41
copumpkinyou could write concat taking a colist of non-empty colists18/05 17:42
mm_freakncat for lists, concat for colists =P18/05 17:42
xplatconcat is already for lists, so it would have the opposite polarity18/05 17:43
xplatjust like how a comathematician converts cotheorems into ffee18/05 17:43
mm_freaklol18/05 17:43
Eduard_Munteanu:))18/05 17:43
Eduard_MunteanuSpeaking of that I should go make some...18/05 17:44
mm_freak"Perhaps the best example of duality and reflexivity in a biological system is the well-known folk theorem that a coconut is a nut."18/05 17:50
Eduard_MunteanuWow, heh.18/05 17:57
copumpkinxplat: did you take a look at globe to see if I fucked it up somehow?18/05 17:59
copumpkinwow, we're up to 55 users in here18/05 18:00
copumpkinmy obnoxious agda promotion is paying off!18/05 18:00
Eduard_MunteanuWe should send missionaries.18/05 18:00
xplatAgda can bring you certainty in an uncertain world.18/05 18:07
xplatcopumpkin: i think there are a few sigmas and taus that need exchanging18/05 18:14
augurhey peeps18/05 18:14
augurhey copumpkin18/05 18:14
xplataugur: copumpkins are peeps too!18/05 18:14
augurno copumpkins are copeeps18/05 18:14
augurwhich i suppose is a KIND of peep18/05 18:14
augurjust in the opposite cuisine18/05 18:14
xplatis a cobordism a kind of bordism?  is a cooper a kind of oper?18/05 18:15
auguruh18/05 18:15
auguryes?18/05 18:15
augurobviously18/05 18:15
xplatis cooperation a kind of operation?18/05 18:15
auguryes.18/05 18:16
xplatoh, all right them18/05 18:16
augurits an operation in antitime18/05 18:16
xplat*then18/05 18:16
xplatbut is a cone a kind of northeast?18/05 18:17
auguryes18/05 18:17
xplatso the reason people place traffic cones to repel cars is that people don't like to drive northeast!  fascinating.18/05 18:19
copumpkinxplat: ah, okay, that might be behind the trouble I'm having with my globular set then18/05 18:28
copumpkinxplat: I really wish I could write the pentagon law for products :(18/05 18:30
copumpkinboo hoo18/05 18:30
Eduard_MunteanuCan write confluence proof in Agda?18/05 18:33
Eduard_Munteanu:P18/05 18:33
djahandarieWe can only hope that gio doesn't find this channel18/05 18:33
copumpkin:O18/05 18:33
auguroh god18/05 18:34
augurthat guy18/05 18:34
augurthat goi18/05 18:34
augurthat gio18/05 18:34
Eduard_MunteanuHonestly I wish someone could've helped him... what if I have similar questions in the future...18/05 18:38
augurblah. i have to finish writing this paper18/05 18:41
augurx.x18/05 18:41
xplatcopumpkin: have you tried with the new version?18/05 18:45
xplatif it doesn't work with this it means the only alternative probably is to use abstract things ... and abstract things means setoids of objects, if you don't want to go insane, i think18/05 18:47
copumpkinxplat: oh, it's not a monoidal issue18/05 18:51
copumpkinthe very statement of the pentagon law even independent of the monoidal module (just in binary products) is unusable18/05 18:52
copumpkinI guess a different statement of the law might work?18/05 18:52
xplatcopumpkin: yes, a statement designed for the new module will have a different (smaller) type18/05 18:55
copumpkinoh18/05 18:55
copumpkinwill try that then18/05 18:55
xplati'm still mulling over the design of a Category record for a setoid of objects18/05 18:59
xplatlike should equality on arrows be 'aspirational' or local?18/05 19:00
xplat(in the local case it would need extra laws saying that transport preserves equality.  there are also two levels of 'aspirational' but one doesn't allow arrow equality to be irrelevant so it's probably out)18/05 19:01
copumpkinxplat: have any ideas for where to put "internal" things to a category?18/05 20:04
copumpkinCategory.Internal.Monoid ?18/05 20:05
copumpkinI know you don't like hierarchies18/05 20:05
xplathm, Category.Internal.Monoid or Category.Monoid.Internal18/05 20:11
xplati would prefer the latter if it weren't that a monoid isn't a category18/05 20:12
copumpkinmaybe we should try to think of a better "hierarchy" altogether18/05 20:13
copumpkinI just felt the .Internal namespace would be helpful cause there are so many things that can live inside18/05 20:13
xplathm, yes18/05 20:17
xplatit would be nice to keep internal versions of categorical things next to the regular versions, but probably keeping all the internal things together is better18/05 20:18
copumpkinwell, regular versions are things we might not even have in the library (but maybe we should)18/05 20:18
copumpkinthings like a natural number object18/05 20:19
copumpkinmonoids we don't actually have18/05 20:19
xplatinternal thingies are closely related to lawvere theories and their generalizations18/05 20:20
* copumpkin hasn't come across those yet :)18/05 20:20
xplatwell, basically if you think of the lawvere theory of groups18/05 20:23
xplatthen Th(Grp) (the Lawvere theory of groups) is the 'simplest/free' category with at least one internal group18/05 20:24
copumpkin:O18/05 20:25
xplatconversely, an internal group corresponds to a functor from Th(Grp) to your ambient category18/05 20:25
xplat(product-preserving functor)18/05 20:26
xplat(where, of course, the canonical internal group in Th(Grp) ends up as some specific internal group in your category)18/05 20:32
copumpkinhm18/05 20:32
xplatwhich means you can construct an internal group in the point, but that's not a very interesting kind of object :)18/05 20:35
copumpkinI want an internal (infinity, 17)-category18/05 20:36
dylukesFine, try me copumpkin18/05 20:46
dylukes(It's just so much to learn >_<)18/05 20:46
copumpkinum18/05 20:47
copumpkinagda is awesome!18/05 20:47
copumpkinlearn it!1!!18/05 20:47
copumpkinthe more to learn, the more fun to be had18/05 20:47
dylukesI meant emacs.18/05 20:47
copumpkin:P18/05 20:47
dylukesI don't know emacs at *all*.18/05 20:47
copumpkinI don't bother "learning emacs"18/05 20:47
dylukesI feel like it'll be the biggest barrier.18/05 20:47
copumpkinI open emacs18/05 20:47
copumpkinand I make a file, save it with a .agda extension18/05 20:48
copumpkinthen I use the agda key combinations and nothing else :P18/05 20:48
copumpkinthen when I'm done with agda, I close emacs18/05 20:48
dylukeshe18/05 20:48
copumpkinand take a shower18/05 20:48
xplatmy latest quixotic project is:18/05 20:48
xplatto create a horrible dr.moreau-style cross of irssi and emacs18/05 20:49
copumpkin:O18/05 20:49
copumpkinsounds horrifying18/05 20:49
dylukesChances are...18/05 20:49
dylukesirssi can already run as an emacs mode.18/05 20:49
xplatallowing me to work on agda from irssi :)18/05 20:49
djahandariedylukes, it isn't too bad using emacs18/05 20:50
dylukesNo, I just don't *know emacs*18/05 20:50
dylukesast all.18/05 20:50
dylukes:P18/05 20:50
djahandarie'emacs file'18/05 20:50
copumpkinme neither18/05 20:50
djahandarieMove around with the arrow keys, type with the letters18/05 20:50
copumpkindjahandarie nailed it18/05 20:51
xplatunlike vi, you don't have to do much 'learning emacs' to use emacs18/05 20:51
copumpkinespecially if you use a gui emacs18/05 20:51
copumpkinaquamacs is even almost pleasant18/05 20:51
dylukesFile mode specification error: (file-error "Cannot open load file" "haskell-ghci")18/05 20:51
xplatit uses cursor keys as cursor keys, delete as delete, backspace as backspace18/05 20:51
djahandarieYeah. Just keep a cheatsheet open on the side to learn the shortcuts18/05 20:51
dylukesthe second I open it.18/05 20:51
xplatprintable characters self-insert18/05 20:51
Saizandylukes: have you installed the haskell mode?18/05 20:51
dylukes...nope.18/05 20:51
Saizanyou have to :)18/05 20:52
xplatand a lot of the other ones are the same as gnu readline so you might already know them18/05 20:52
xplatthe only pinky-breaking key combinations you really need to know are ^X ^F (open file) ^X ^C (close emacs) ^X o (switch between visible windows) ^X b (switch which window is visible in a pane)18/05 20:54
copumpkinI wish I could convince emacs to stop opening my agda info pane on the right side of the window18/05 20:54
copumpkininstead of at the bottom18/05 20:54
xplat^X ^S (save file) is also helpful18/05 20:54
dylukestried loading aquamacs but it fails :P18/05 20:55
dylukesit can't load zsh, so my .zshrc doesn't run, so agda-mode isn't found.18/05 20:55
dylukesFile error: Cannot open load file, /Users/dlukes/zsh:1: command not found: agda-mode18/05 20:56
dylukesbaw.18/05 20:56
xplatbut it will ask when you exit, and agda-mode saves the file almost any time you do anything anyway18/05 20:56
xplatdylukes: probably agda-mode just isn't on your path?18/05 20:57
dylukesin .zshrc I load it into path.18/05 20:57
dylukesexport PATH=~/.cabal/bin/:$PATH18/05 20:57
xplattry expanding the ~ by hand, just for laughs18/05 20:57
copumpkinI wonder how unfriendly agda is to my ssd18/05 20:57
dylukesShould I put the haskell-mode shit in ~./emacs.d/?18/05 20:58
Saizanor use $HOME18/05 20:58
xplatcopumpkin: SSDs aren't as fragile to repeated writes as they used to be18/05 20:58
copumpkinyeah18/05 20:58
dylukeszsh finds agda-mode either way Saizan18/05 20:58
dylukesits only aqua macs18/05 20:58
dylukesI'll just use regular emacs ^_^18/05 20:58
copumpkinI use aquamacs just fine18/05 20:59
dylukesSo… haskell-mode shit -> ~.emacs.d/?18/05 20:59
xplathm, mine isn't there18/05 21:00
dylukesokay… it loaded fine now...18/05 21:02
dylukesnow, how can has REPL?18/05 21:03
copumpkinno18/05 21:03
dylukes:(18/05 21:04
dylukesso… what chords do I actually need to know?18/05 21:04
dylukesand how does run?18/05 21:04
copumpkinjust save a file as .agda18/05 21:04
copumpkinMoo.agda18/05 21:04
copumpkinwrite in it18/05 21:04
copumpkinmodule Moo where18/05 21:04
copumpkinthen type C-c C-l18/05 21:04
copumpkinit should get some color18/05 21:04
dylukescolor full18/05 21:06
dylukesalright, that works18/05 21:07
dylukesnow...18/05 21:07
dylukeshow do I *save and quit* emacs18/05 21:07
copumpkinin aquamacs, you can use standard combos18/05 21:07
copumpkinlike apple+s18/05 21:07
xplatC-x C-c to quit (any emacs), it'll ask to save anything unsaved that originally came from a file18/05 21:08
xplat(or has been saved to a file before)18/05 21:08
dylukescopumpkin: I feel it'll be more educational to just learn the basics of using emacs >_>18/05 21:08
xplatdon't forget to take a shower after :þ18/05 21:08
dylukesAnd shave18/05 21:09
dylukesso the moss doesn't begin to grow on my face.18/05 21:09
dylukeshttp://cl.ly/6sTL18/05 21:09
dylukesokay18/05 21:09
dylukesI did that.18/05 21:10
dylukes:|18/05 21:10
xplatbelieve it or not, emacs does not directly cause neckbeard18/05 21:10
* copumpkin doesn't have a neckbeard18/05 21:10
copumpkinin fact, I don't have a neck18/05 21:10
copumpkinunless you count that stem18/05 21:10
xplatseems more like that hair thing18/05 21:11
dylukesAgda data types...18/05 21:11
dylukeslook a lot more like GADTs18/05 21:11
copumpkin...are awesome18/05 21:11
dylukesthan regular Haskell data types.18/05 21:11
copumpkinyep18/05 21:11
copumpkinthey are even fancier than GADTs18/05 21:11
copumpkinmmm18/05 21:11
dylukesdata Nat : Set where18/05 21:11
dylukes  zero : Nat18/05 21:11
dylukes  suc : Nat -> Nat18/05 21:12
dylukesossum18/05 21:12
dylukeswhat's "Set" doing there btw?18/05 21:12
dylukesI mean, what's its role?18/05 21:12
dylukesin the declaration18/05 21:12
Saizanit's specifying the type of Nat, not every datatype has type Set18/05 21:12
dylukesAh gotcha.18/05 21:13
xplatdata OverlyIndexed : Nat -> Set where18/05 21:13
dylukesWait, if theres Set,18/05 21:13
dylukesis there something *bigger* than Set >_>?18/05 21:13
xplat  zero : OverlyIndexed zero18/05 21:13
SaizanSet is a lot like * in haskell18/05 21:13
copumpkindylukes: LOTS18/05 21:13
dylukescopumpkin: …infinitely?18/05 21:13
copumpkinyes18/05 21:13
xplat  suc : \all {n} -> OverlyIndexed n -> OverlyIndexed (suc n)18/05 21:13
dylukesxplat: I'm not getting that...18/05 21:13
dylukes>_<18/05 21:13
dylukessorry18/05 21:13
xplatdylukes, it's a ridiculous ADT of a Nat indexed by a Nat which is its exact value :)18/05 21:14
copumpkinxplat: that's almost fin!18/05 21:14
xplatwell, GADT18/05 21:14
dylukesxplat: *confused look*18/05 21:14
dylukes._.18/05 21:14
xplatcopumpkin: almost, but not quite :)18/05 21:15
copumpkinit's an inclusive fin18/05 21:15
dylukeshttp://cl.ly/6tuE18/05 21:15
dylukesD:18/05 21:15
dylukeswhat'd I do wrong18/05 21:15
copumpkinyou need a fixity declaration18/05 21:15
xplatfor each natural n, OverlyIndexed n has a single value, n18/05 21:15
copumpkinit doesn't know which one has higher precedence18/05 21:16
dylukesah gotcha18/05 21:16
dylukeshow should I do that?18/05 21:16
dylukesI mean, _*_ should just have higher left-assoc precedence than _+_18/05 21:16
xplatthat is, zero is the only OverlyIndexed zero, suc zero is the only OverlyIndexed (suc zero), and so on18/05 21:16
copumpkindylukes: so infixl 7 _*_18/05 21:16
dylukesis it infixl like haskell?18/05 21:16
copumpkininfixl 6 _+_18/05 21:16
dylukeswhy 7 and 6 may I ask :P?18/05 21:16
dylukeswhere should I put the fixity declarations by convention?18/05 21:17
xplatcopumpkin: the reason it isn't like Fin is that zero is only in OverlyIndexed 0, not in any of the other fibers18/05 21:17
dylukescopumpkin: where should I put them ?18/05 21:17
copumpkinxplat: oh, yeah18/05 21:17
copumpkindylukes: somewhere above the declarations, I think18/05 21:18
dylukesmmk18/05 21:18
dylukesg2g18/05 21:18
xplati wonder if i should report all my wishes for agda as wishlist bugs18/05 21:27
copumpkinyes!18/05 21:30
copumpkinthen we can go through the wishlist bugs at hac phi and implement them ourselves :P18/05 21:30
copumpkinI might set myself the task of finally reworking the parser stuff a bit as I told NAD I'd do long ago18/05 21:30
kosmikuscopumpkin: you should come to an AIM :)18/05 21:34
kosmikuscopumpkin: but turning the Haskell Hackathons into Agda Hackathons works for me, too :)18/05 21:34
copumpkinI'd love to :) but this one looks like it's by invitation only and getting to japan with a full-time job is tricky18/05 21:34
copumpkinkosmikus: well, the agda implementation is in haskell, so it's not out of place at a haskell hackathon :D18/05 21:34
copumpkinbut I'll probably do some agda at it too18/05 21:34
xplatgetting to japan without a full-time job is pretty tricky too ...18/05 21:35
kosmikuscopumpkin: the place where it'll be has an invite-only policy18/05 21:35
copumpkinyeah :)18/05 21:35
copumpkinaha18/05 21:35
kosmikuscopumpkin: but it was said at the last AIM that whoever wants to go there should send a mail, and they'll try to get them invited18/05 21:36
xplatalbeit in a different way.  or one could have a full-time minimum-wage job and deal with both at once!18/05 21:36
copumpkinI certainly wouldn't mind going :) but I only have limited vacation days18/05 21:36
kosmikusI understand18/05 21:37
kosmikusI don't know yet whether I'll make it to the next AIM either18/05 21:37
kosmikusthere's already ICFP I want to go to, which is a full week18/05 21:37
kosmikustogether with AIM, it'd be 2.5 weeks18/05 21:37
copumpkinyeah18/05 21:48
xplathttps://gist.github.com/97952418/05 21:56
xplat! is arguably more severe than wishlist18/05 21:57
Saizanxplat: the last ! is fulfilled by the darcs version18/05 22:08
xplatrecords in mutual blocks?18/05 22:08
Saizanyep18/05 22:09
xplatpushed :)18/05 22:10
Saizani'd also want "make a stub lemma with the type of an hole"18/05 22:11
copumpkinyes!18/05 22:11
copumpkinthere's also my other wishlist item that's already a ticket18/05 22:11
copumpkinnamely being able to split on multiple variables at once18/05 22:11
xplatmaybe i should add that, but i'd want to have the ticket number in there18/05 22:13
xplatweird, i can't find the ticket18/05 22:38
xplatmaybe it's closed?18/05 22:38
copumpkinwhich?18/05 22:53
copumpkinoh18/05 22:53
copumpkinhttp://code.google.com/p/agda/issues/detail?id=31918/05 22:54
Saizanhow would a trie look like for Nu f -> Nu g functions?18/05 23:27
--- Day changed Thu May 19 2011
copumpkinxplat: which sigmas and taus do I need to flip?19/05 01:56
copumpkinI guess I could actually think about it19/05 01:56
copumpkinbut I prefer to go shopping19/05 01:56
rribeirohello to all19/05 02:09
rribeiroI'm trying to learn agda19/05 02:09
rribeiroand I'm in trouble to prove the commutative property of the add operation19/05 02:10
rribeirocan someone help me with it?19/05 02:10
xplatcopumpkin: the ones that match the left-hand argument should be matching the right-hand one instead19/05 02:11
copumpkinah19/05 02:11
copumpkinrribeiro: sure, let's see some code :)19/05 02:11
copumpkinor19/05 02:11
copumpkindo you have a specific question?19/05 02:11
rribeirocopumpkin,19/05 02:12
xplatbasically, in the globe category sigma and tau aren't projections, they're inclusions19/05 02:12
rribeirothe trouble is the inductive case:19/05 02:12
copumpkinhm19/05 02:12
rribeiron+m≡m+n : ∀ (n m : ℕ) → (n + m) ≡ (m + n)19/05 02:12
rribeiron+m≡m+n zero m = 0+n≡n+0 m19/05 02:13
rribeirothe base case19/05 02:13
rribeirogoes ok... I've proved the lemma 0+n≡n+019/05 02:13
rribeirobut... the inductive case19/05 02:13
xplatand the argument is 'the source and target intersect at their own source and target, so after the first step of injection into a higher-dimensional structure it doesn't matter what other steps you take'19/05 02:13
rribeiron+m≡m+n (succ y) m ={!!}19/05 02:13
copumpkinxplat: hmm, I see19/05 02:14
copumpkinrribeiro: what's your goal in the hole there?19/05 02:14
rribeiroI dont have any idea of how could I build a term of type19/05 02:14
copumpkinand what's your context?19/05 02:14
xplatrribeiro: you need another lemma : n + suc m = suc (n + m)19/05 02:14
rribeirohummm19/05 02:14
rribeiroxplat, in Coq I've used a similar lemma19/05 02:15
rribeiroI'll try it here..19/05 02:15
chegibariHello19/05 11:18
chegibariI'm having problem installing Agda in debian 6. Could anybody help me?19/05 11:21
kosmikuschegibari: I'm not a Debian user, but perhaps I can still help. What's the problem?19/05 12:38
xplatcopumpkin: holy crap, that's a lot of changes since my last pull.  not so much the size, but they're all over the place19/05 14:42
copumpkinyeah :P19/05 14:42
copumpkinminor changes though19/05 14:46
xplatyou changed Hom to _⇒_, that probably had a lot of fallout ...19/05 14:51
copumpkinyeah19/05 14:53
copumpkinseemed a bit cleaner19/05 14:53
xplatmoved module Equiv into Category?19/05 14:53
copumpkinI made polymorphic versions of the equiv laws19/05 14:53
copumpkinso you don't have to worry about opening it once and them getting frozen19/05 14:53
xplatOH.  cool.19/05 14:54
xplatif seems like you could kill a lot of lambdas in op by using flip19/05 14:55
copumpkinyeah19/05 14:55
copumpkinI should do that19/05 14:55
copumpkinor feel free to do it yourself19/05 14:56
copumpkinI need to go to work in a few19/05 14:56
starcloudedhello everybody19/05 15:02
xplat[master 2e5ba39] Exploitation of flip, plus a few extra laws for _<_ .19/05 15:15
starcloudedis there any function that does the same of the decToBool in the Data.Bin?19/05 16:06
copumpkinhow would that work?19/05 16:10
copumpkinalso, why do you want Bool? :(19/05 16:10
starcloudedI want to check an inequality an know if the condition is true or false, cause I want to use the filter function of the Data.List19/05 16:19
starcloudedI want to use something like in the Data.Bin filter (λ n → decToBool (Nat._≤?_ 1 n))19/05 16:24
Saizancan't you just use decToBool?19/05 16:28
copumpkinhe's now using binary naturals19/05 16:29
copumpkinoh19/05 16:29
Saizanso he needs a different _≤?_ ?19/05 16:30
copumpkinthat strict total order has what he wants19/05 16:30
starcloudedyes but the thing is that I check in the standard library and I cant find it19/05 16:30
copumpkinI think he wants a _<=?_ more than a decToBool19/05 16:30
SaizanData.Bin._≟_19/05 16:31
copumpkincompare has all the information19/05 16:31
starcloudedthe function is ⌊_⌋19/05 16:33
SaizandecToBool doesn't exist in the stdlib19/05 16:33
starcloudedthanks19/05 16:33
xplatit seems like there could be a better filter that takes a Dec and gives you a list of sigmas19/05 17:10
copumpkinthat would show that there are no false positives19/05 17:12
copumpkinbut how about false negatives!?19/05 17:12
xplatif you care about that, use better partition!19/05 17:13
xplati pushed another change, although it's kind of pointless19/05 17:16
pumpkinxplat: we also need a proof that the sum of the two partitions' length must be the length of the original19/05 17:17
xplatbasically, a bunch of crap in Support.Nat19/05 17:17
pumpkineven that isn't sufficient19/05 17:17
xplatpumpkin: not really sufficient, you have to p19/05 17:17
pumpkincause you could repeat each element a bunch of times19/05 17:17
xplatyeah, that it's not making things up19/05 17:17
pumpkinso basically, you need a proof that every element in the input list is either in the left or right list19/05 17:17
xplatthat might be available as a free theorem for partition depending on its type though19/05 17:18
xplat(given the length thing)19/05 17:18
pumpkinyou could just be repeating shit19/05 17:18
xplathm, true19/05 17:18
xplatyou really only get the converse19/05 17:19
pumpkinwe should write the "real ultimate filter"19/05 17:19
xplatmy original idea was just to have the information that the predicate is true available as you fold over the result list19/05 17:19
xplatrather than smushing filter's entire spec into the return type19/05 17:20
xplatokay, so presburger arithmetic is decidable at any quantifier depth19/05 17:56
copumpkinyep19/05 17:56
xplatare there more powerful fragments of arithmetic that are decidable if you restrict quantifiers?19/05 17:56
copumpkinon naturals?19/05 17:56
xplatyes19/05 17:56
copumpkinnot that I know of, but I'm not really an expert19/05 17:57
xplatobviously full PA or PRA or whatever is decidable for ground statements19/05 17:57
copumpkinthere's a book by what'shisname19/05 17:57
xplatbut PA is not decidable for diophantine equations (existential quantifiers only)19/05 17:57
copumpkinso you wondering if universal-only would be decidable?19/05 17:58
xplatyeah19/05 17:58
xplatthat is, universal only, purely positive equality19/05 17:59
copumpkinthe people in ##smt might know, but it's pretty quiet in there :)19/05 17:59
xplator even with no disjunction19/05 18:00
xplatalthough if you have subtraction you can imitate disjunction19/05 18:01
xplati think +, *, =, 0, 1, \and, \all would be a good fragment19/05 18:01
xplat(and \top i guess)19/05 18:02
xplatwith a reflective solver for that it would be safe to say 'these are all the laws of algebra you need'19/05 18:04
xplat| More important, in my opinion, is a 1990 result of Gurevic: no finite set of axioms in first-order logic is sufficient to prove all the identities involving addition, multiplication, exponentiation and 1 that hold for the positive natural numbers. You can find this here: R. Gurevic, Equational theory of positive numbers with exponentiation is not finitely axiomatizable, Ann. Pure. Appl. Logic 49 (1990), 1-30.19/05 18:08
xplatso, no good if exponentiation is included19/05 18:09
xplatoh, hm, the equational theory is actually decidable according to http://www.pps.jussieu.fr/~dufour/zeronfa.pdf although it is not finitely axiomatizable19/05 18:20
chegibarikosmikus, I got some help in #debian-haskell on OFTC. They are fixing the packages. Thanks!19/05 18:26
cayleecopumpkin: so how far is your ct in agda formulation?19/05 18:43
djahandarieIs there a scale? :p19/05 18:45
djahandarie"50% of category theory is completed!"19/05 18:45
xplat| For the interested reader, here is how the decision procedure works: from the size of the equa-19/05 18:47
xplattion that has to be verified, it is possible to derive an upper bound; if the two sides coincide for19/05 18:47
xplatall values of the variables up to this upper bound, then they coincide everywhere.19/05 18:47
xplat\yrlnry: what unicode codepoint does your new nick correspond to?19/05 18:47
cayleeWell - there are definitely milestones. Can you encode generic limits and colimits vs well, you can define products19/05 18:47
xplatcartesian products are defined, there's some stuff for limit cones i haven't looked at closely, no proof yet that chosen binary products are monoidal19/05 18:49
cayleek19/05 18:49
\yrlnryxplat:  Sorry, I don't understand why it would corrspond to a codepoint.19/05 18:49
xplat\yrlnry: i guess it could be a sequence of codepoints19/05 18:50
djahandarieOnly cartesian products?19/05 18:50
\yrlnryWill I still be safe here if I admit that \ is the Perl reference-to operator.19/05 18:50
\yrlnry?19/05 18:50
xplatoh, so you are a meta-yrlnry, not a yrlnry symbol19/05 18:51
\yrlnry#git has regular yrlnry banned and I wanted to report a bug.19/05 18:51
djahandarie\yrlnry, the Agda assassins are already on their way.19/05 18:52
xplatit's a strange place in irc where people are more embarrassed about perl usage than ban evasion :)19/05 18:52
djahandarieHeh19/05 18:53
\yrlnryI'm not embarrassed.  Just wary. :)19/05 18:53
xplatembarrassment is just wariness of your fellow human, pushed a little farther into the hindbrain19/05 18:55
\yrlnryI don't think that's right.  My cat clearly suffers from embarrassment when he tries to jump up on a ledge, misses, and falls off.19/05 18:55
xplatwell, fellow creature :)19/05 18:55
\yrlnry"I don't know what the trumpet has to do with it, but my cat and I can sympathize with the part about slipping on the ice while trying to board the school bus."19/05 18:57
cayleexplat: so - in your opinion - is there enough ct already there that one could formalize the D\inf construction as a countable colimit?19/05 18:57
copumpkincaylee: oh sorry, was in a meeting19/05 19:01
copumpkinI'd say about 34% of CT is there19/05 19:01
copumpkin:P19/05 19:02
copumpkinI don't have colimits, and I don't even know what a countable one is :)19/05 19:02
cayleekk19/05 19:02
copumpkinthis is (as might be obvious if you look at it) also an opportunity for me to learn as I go along19/05 19:02
\yrlnryPrumably it's the countable analogue of the thing that people are talking about when they talk about finite limits.19/05 19:02
copumpkinand resolve some of the issues I've had with presentations of equality in the CT material I've read19/05 19:02
\yrlnryOr the countable co-analogue.19/05 19:02
\yrlnryI was reading some nice article recently about a limit on a diagram of the form x -> Fx -> F^2x -> F^3x -> ...19/05 19:03
\yrlnrycan probably dig it up if you care.19/05 19:03
\yrlnryProbably F was some data-structure-constructing functor like X -> 1 + A*X and then you're manufacturing the type [X] as the colimit of the diagram or something like that.19/05 19:06
cayleeRight - are you thinking of the old Plotkin & Smyth paper where they give the generic version of the construction for cpo-enriched categories?19/05 19:06
\yrlnryNo, that wasn't it.19/05 19:07
djahandarie> "#agda" ≫ "#haskell"19/05 19:07
lambdabot  True19/05 19:07
\yrlnryIt It was "Fixed points of Functors" by François Métayer. http://www.pps.jussieu.fr/~metayer/PDF/fix.pdf19/05 19:07
copumpkincaylee: but I'm happy to accept contributions! xplat has already added a lot of good stuff19/05 19:08
copumpkincaylee: or if you have things you want, I'd be happy to learn and implement them :D19/05 19:08
\yrlnryAnd I was amused because later that week Jeremy Gibbons discussed the same thing on his blog with a refernce to that paper, which I was already reading.19/05 19:08
djahandariecopumpkin, you should coerce ddarius into working on it19/05 19:08
\yrlnryI had downloaded all the papers I could find on arXiv that mentioned the Tarski fixed-point theorem.19/05 19:08
\yrlnrySo it was a funny coincidence.19/05 19:08
\yrlnryAnyway, feel free to stick that in the "more than I wanted to know" file.19/05 19:08
copumpkindjahandarie: he doesn't seem very enthusiastic to use agda19/05 19:09
copumpkinI've spoken to him about it a lot in person19/05 19:09
djahandarieAw. :(19/05 19:09
djahandarieWhat gripes does he have with Agda?19/05 19:09
copumpkinI dunno, don't think anything particular19/05 19:09
djahandarielol19/05 19:09
cayleecopumpkin - do I need the dev version of Agda for your repo?19/05 19:11
copumpkincaylee: nah, it works on the latest cabal version I think19/05 19:11
copumpkinin fact, I think I may be on it19/05 19:11
xplatso about the way reflection works19/05 19:11
copumpkincause the latest dev version had a bug that prevented me from building19/05 19:11
xplati guess there's no way to get the quoted goal from the context where your solver is called, and you have to have the user call quoteGoal_in_ themself?19/05 19:12
copumpkinI think so19/05 19:12
xplatlaaame19/05 19:12
copumpkinthat's how they call the solver19/05 19:12
cayleecopumpkin - Okay, cool. I'll start looking at it. I still have a couple of weeks before I officially am back at grad school. :-p19/05 19:12
xplati wonder how much of that you could get around with a syntax declaration19/05 19:13
copumpkincool :) let me know if you have any questions or complaints19/05 19:13
copumpkinxplat: you still need something to give you a representation of the goal, and I'm not sure how you'd represent that in the type19/05 19:13
copumpkinomg a Peaker19/05 19:14
Peakerheh19/05 19:16
xplati'd like to just do something like ‘syntax quoteGoal t in ringsolve t = ringEq’19/05 19:19
xplatbut i somehow don't think ‘syntax’ works that way19/05 19:19
xplatoh, well, at least the editor will help the user figure out where to stick the goal once they quote it19/05 19:21
xplatit seems like this decision procedure would produce decidedly 'interesting' proofs anyway :I19/05 19:22
xplatwhere 'interesting' means 'has scads of cases' and i'm not sure if 'scads' means 'hundreds', 'thousands', 'millions', 'billions', or even worse19/05 19:23
copumpkinhave you seen the presburger solver?19/05 19:24
xplatkind of19/05 19:24
copumpkinor the semiring solver19/05 19:24
copumpkinI mean the agda ones19/05 19:24
xplati've seen the ring solver in the stdlib, but it seems to use its own term representation19/05 19:24
copumpkinyeah, it does19/05 19:25
copumpkinit isn't integrated with the reflection stuff at all yet19/05 19:25
copumpkinit'd be fun if it were19/05 19:25
copumpkinI'd use it all the time then19/05 19:25
xplati've also seen Saizan's prop_logic solver19/05 19:25
cayleecopumpkin: So I'm having trouble loading some of the files because Category.Functor conflicts with the standard library. How do you resolve that?19/05 19:30
copumpkinI hide the standard library :(19/05 19:30
copumpkinit's annoying19/05 19:30
copumpkinbut it seemed weird to tiptoe around the CT in the standard library, that isn't really very complete19/05 19:30
Saizanxplat: not mine, just linked19/05 19:30
copumpkincaylee: I'd love to have a better solution, because it means that I've had to replicate a lot of std lib stuff in the CT library19/05 19:31
cayleecopumpkin: Hah, okay.19/05 19:31
xplatthe solution would be cabal for agda19/05 19:32
copumpkinwe'd still have conflicting imports19/05 19:32
xplatincluding hiding and showing packages19/05 19:32
copumpkinassuming I wanted to get rid of the Support stuff19/05 19:33
copumpkinbut yeah, that'd be a good start19/05 19:33
xplatyeah, for CT purposes it's annoying if stuff like _\o_ is grabbed already19/05 19:34
copumpkinyeah, I'd mostly just want to import Data.Nat and a handful of functions from Function and the intensional equality/equivalence relation stuff19/05 19:34
copumpkin*propositional, I guess19/05 19:34
copumpkinproducts and sums wouldn't hurt :)19/05 19:35
cayleewell, for now I'll hide the standard lib when working on this :-p19/05 19:38
copumpkinthat's what I do19/05 19:38
copumpkinbut it makes it annoying if I go and try to work on another project19/05 19:39
Saizandoes it conflict only with Category.*?19/05 19:41
copumpkinprobably Category.Functor too19/05 19:43
copumpkinCTFP got around it by calling it Category.Functors instead of .Functor19/05 19:43
copumpkinbut meh19/05 19:43
djahandarieUgh ⁂ⁿ19/05 19:43
copumpkinlol19/05 19:43
copumpkinwe get it, you don't like unicode19/05 19:43
copumpkinxplat does :P19/05 19:44
djahandarieI don't have the slightest clue how to enter that thing19/05 19:44
copumpkinC-u C-x =19/05 19:44
copumpkinwill tell you how to enter any symbol19/05 19:44
copumpkinand give you other information on it19/05 19:44
cayleecopumpkin - and should I presume that any use of the word 'evil' is in the technical sense? ;)19/05 19:50
copumpkinhttp://ncatlab.org/nlab/show/evil is where I got it :)19/05 19:51
copumpkinso more or less :P19/05 19:51
cayleeyeah, I figured you meant it in the Baez et al. way19/05 19:52
copumpkinyou might find several fairly naive decisions I've made at various points :)19/05 19:53
mm_freaki'd really like to test agda's standalone performance…  is there any tutorial on how to create standalone programs?19/05 19:53
copumpkinI blame it on only vaguely knowing CT19/05 19:53
djahandarieYou should start putting in higher category theory stuff in so you can rip more from ncatlab19/05 19:53
copumpkindjahandarie: I plan to!19/05 19:53
cayleeWell, and what I'll need eventually is the machinery for enriched categories19/05 19:53
copumpkinbut it starts getting very hairy to model the equalities/setoids at that point, I think19/05 19:53
djahandarieI really don't have an inkling of how that stuff works though so I'll be totally lost if you do19/05 19:54
copumpkinenriched is definitely on the todo list19/05 19:54
djahandarieHow hard would enriched be? It seems like it shouldn't be bad19/05 19:54
copumpkinnow that monoidal works again19/05 19:55
copumpkinit'd probably not be too bad19/05 19:55
copumpkinxplat probably knows more19/05 19:55
cayleeright - having monoidal categories is the big thing19/05 19:55
caylee(well, symmetric monoidal but ya know what I mean)19/05 19:56
djahandarieI suppose you'll need to continue to carefully avoid memory explosions though19/05 19:56
copumpkincaylee: aha, see we don't have that yet :P and we have yet to successfully construct something above monoidal19/05 19:56
cayleeah, k19/05 19:56
copumpkinI have a lot of cartesian19/05 19:57
djahandarieWait, why would you need symmetric monoidal categories for enriched ones?19/05 19:57
copumpkinmaybe symmetric would be more pleasant actually19/05 19:57
copumpkinbeing less concrete19/05 19:57
copumpkinwe'd want braided in between19/05 19:57
copumpkinbut with the pain that the pentagon caused, hexagons sound terrifying19/05 19:57
djahandarieHeh19/05 19:58
djahandarieMemory explosion is a function of the number of sides in the diagram? :p19/05 19:58
copumpkinpossibly!19/05 19:58
cayleewell, I think most of the examples I've seen involve enrichment over symmetric monoidal categories. (I thought you needed it for some reason, but my memory is failing me...can someone else help?)19/05 19:59
djahandarieI don't know a damn thing about anything, but I'm looking at the definition of enriched categories and it seems to only involve monoidal categories.19/05 19:59
cayleeYeah, I can't think of a reason why you _couldn't_.19/05 20:00
cayleeI think it's just that the Plotkin et al. papers on effects assume symmetric monoidal?19/05 20:00
djahandarieI need to read this "Basic Concepts of Enriched Category Theory" paper ddarius told me to read19/05 20:00
djahandarieIt's just scary. :[19/05 20:01
copumpkincaylee: you may also be interested in ##categorytheory on this network, by the way19/05 20:01
copumpkinit's surprisingly not 100% quiet19/05 20:01
copumpkinI may have already tried to sell it to you19/05 20:01
cayleeno, I don't think I knew about it19/05 20:02
xplatthere are still problems with Monoidal using a lot of memory, i just made it a little more bearable :(19/05 20:12
copumpkinyou think we can squeeze braided/symmetric out of a modest amount of memory? :)19/05 20:13
xplatwhen you have dependently-typed record types indexed by dependently-typed record types indexed by ... it's pretty hard to keep things under control19/05 20:14
xplatwithout a way to keep agda from expanding every definition indirectly referenced by a type when typechecking i think it's going to be a losing battle19/05 20:15
copumpkinmaybe it'd pay to post to the mailing list with what you found from your profiling and see if you can get the agda devs talking about it19/05 20:15
copumpkinbefore the next AIM19/05 20:15
xplatbut just throwing in abstract blocks everywhere means explicit equality proofs will proliferate instead19/05 20:16
copumpkinwe really aren't doing unimagineably complex stuff, so it seems like a fairly high-priority thing to fix19/05 20:16
copumpkinif anyone wants to write non-trivial proofs in it19/05 20:16
xplatbraided/symmetric might be doable, just about19/05 20:17
djahandarieHmm, the AIM is right before the ICFP19/05 20:18
xplatbicategories, bifunctors, and their NTs and modifications are probably not possible19/05 20:18
djahandarieAnd there is also this "Dependently Type Programming" thing going on during the break19/05 20:18
xplatat least in this approach19/05 20:18
cayleexplat - is there a different approach to try?19/05 20:18
xplatthat's what i'm trying to figure out19/05 20:19
copumpkincaylee: where you going (back?) to grad school, btw?19/05 20:19
cayleecopumpkin: Portland State, with the Hasp team (formerly Programatica at OGI)19/05 20:20
copumpkinah, cool19/05 20:20
djahandarieYou should go back to grad school copumpkin!19/05 20:20
copumpkinmeh :P maybe someday19/05 20:21
copumpkinmoney is nice :)19/05 20:21
copumpkinand I still get to talk about CT and math at work19/05 20:21
xplatapparently without exponentiation or with restricted exponentiation, you can axiomatize the equational theory of Nat with the high school algebra (HSI) rules19/05 20:52
xplatbut a couple of the key papers on the topic are a little hard to find19/05 20:53
xplatif you don't have variables in exponents you can decide equality by normalizing to a polynomial19/05 20:54
xplatargh, where does the infix declaration for a data constructor go again?19/05 21:40
copumpkinbefore it, I think?19/05 21:43
xplati now have the Globe\' category whose smarts are in \==19/05 22:31
xplatslightly longer, but less boring19/05 22:33
copumpkincool!19/05 22:34
xplati wonder if i should prove it isomorphic to the other one :)19/05 22:34
copumpkinor just replace it!19/05 22:34
xplator prove it isomorphic, THEN replace it19/05 22:35
copumpkin:)19/05 22:36
xplatyou now write a morphism as basically, I s s t t s t , using I, _s, and _t19/05 22:37
xplatand composition does the same thing as adjoining them and eliminating the extra I19/05 22:38
xplatso they're basically a Vec of bools with an extra 'basepoint' index19/05 22:39
xplator you could consider them like the defunctionalized, Vec version of a DList19/05 22:40
copumpkinby the way, you interested in implementing (or attempting to) spivak's categorical databases stuff?19/05 22:40
copumpkin(on top of this)19/05 22:40
xplatcould be that i would be19/05 22:41
copumpkinI was thinking of starting some basics at some point19/05 22:41
copumpkinI pushed some more stuff btw19/05 22:43
copumpkinturned out the power / natural transformation module wasn't updated with the new Hom stuff19/05 22:43
copumpkinand I updated globe a little bit (I welcome corrections/replacements) and added a module for enriched that I'll probably stick in later19/05 22:44
xplatbtw: if you wrote the GlobeHom type as an actual DVec of Bool, you have _\==_ = _\=o_ `on` (vecToMaybe \.)19/05 22:45
copumpkinhmm19/05 22:45
xplatit's a little weird though since it's an 'upward' DVec19/05 22:46
xplati.e. although it's indexed with both a start and an end, the argument of the DVec gets added to the higher side19/05 22:49
xplathowever you look at it, it's a lot less natural than the category of simplices or even the category of cubes19/05 22:51
copumpkinI've only glossed over those ones :)19/05 22:52
copumpkinso much to learn19/05 22:52
copumpkinso little timE!19/05 22:52
xplatmaybe instead of Category.Globe it should be Category.Shape.Globe19/05 22:55
xplatthen there'd be a place to throw in Simplex, Cube, Tree, and Opetope19/05 22:56
copumpkinooh, sure19/05 23:00
copumpkinoh man, xplat's been infected by the hierarchical module bug19/05 23:01
copumpkinthe bug in agda head was fixed btw19/05 23:01
copumpkinif you were worried about updating19/05 23:01
xplatyeah, i probably should update my 'everyday work' agda too if i'm going to start hacking on the compiler19/05 23:02
copumpkinif I could get a 64-bit windows ghc, I'd be able to throw a lot more RAM at it :(19/05 23:03
xplathave you tried building any monoidal-related stuff yet?19/05 23:03
copumpkinyeah, but only in the sense that I've typechecked what you have19/05 23:03
copumpkinit worked!19/05 23:04
copumpkinbut I haven't adapted my cartesian stuff yet19/05 23:04
copumpkinnot sure whether to work on enriched first or cartesian19/05 23:04
xplatcastles in the air or hovels on the ground, eh?19/05 23:05
--- Day changed Fri May 20 2011
dylukesthis might seem like a silly question but, Agda doesn't have integers or such does it?20/05 02:11
dylukesI'm not sure they'd really be necessary. Just wondering I suppose.20/05 02:11
dylukes(not necessary since they can be implemented...)20/05 02:12
copumpkinnothing but Set (and Set1,2,3...) come by default20/05 02:13
copumpkineverything else you build20/05 02:13
copumpkinthe standard library does have integers though20/05 02:13
copumpkinimplemented via peano naturals20/05 02:14
dylukesAre they just for stuff like, having "pretty" values like 1,2,3,4?20/05 02:15
dylukesI guess generally you'd only be concerned with boolean values as results anyhow...20/05 02:15
copumpkinhmm?20/05 02:15
copumpkinoh you mean syntax for integers?20/05 02:15
copumpkinbooleans are precisely what we (or I at least) try to avoid20/05 02:16
dylukesexplain?20/05 02:16
copumpkinif I go up to you and say "yes"20/05 02:16
copumpkinwhat have you learned?20/05 02:16
dylukesum, that the set containing all english words you know includes the word "yes"?20/05 02:16
copumpkinyeah, or in other words, not much20/05 02:17
copumpkinif I say "yes, I am american"20/05 02:17
copumpkinthat's more useful, right?20/05 02:17
dylukesNot really, since thats equivalent to20/05 02:18
dylukes"yes, I am a liar"20/05 02:18
copumpkinwell, assuming I carry my US passport and show it to you while saying that20/05 02:18
dylukesWell now I can suppose you're a good forger and a liar, or you're telling the truth.20/05 02:18
copumpkinin a world where there are no lies or forgeries20/05 02:19
dylukesA world with no lies. Alright then.20/05 02:19
copumpkin"yes I am american [shows US passport]" is strictly more informative than "yes"20/05 02:19
dylukesAlright.20/05 02:19
copumpkinbooleans are "yes" and "no"20/05 02:19
copumpkinthey don't say what they're affirming or negating20/05 02:19
copumpkinthey don't carry any proof of it20/05 02:20
copumpkinthey're pretty much useless from a proof standpoint20/05 02:20
dylukesmm true20/05 02:20
copumpkinas another example20/05 02:21
copumpkinsay I have a function20/05 02:21
copumpkincontains :: (a -> Bool) -> [a] -> Bool20/05 02:21
copumpkinthe function could easily lie20/05 02:22
copumpkinand return True all the time20/05 02:22
copumpkinor False, or something20/05 02:22
copumpkinbut presumably you want it to return True when there exists an element in the list that satisfies the predicate20/05 02:23
dolioPfeh. Integers are for peasants!20/05 02:23
copumpkinand false otherwise20/05 02:23
dylukesright.20/05 02:23
dolioThe integer story in Agda is a little amusing.20/05 02:24
dolioYou have natural numbers.20/05 02:24
dolioBut if you define it right, it can be backed by Haskell Integers.20/05 02:24
dolioThen, the standard library defines integers as a disjoint union of natural numbers.20/05 02:25
dylukes…I done getit20/05 02:25
dolioSo Agda integers have an implementation like Either Integer Integer if you look at how it works out in the mid-end.20/05 02:25
dolioWhere neither of the integers in question is allowed to be negative.20/05 02:25
dylukeswhat?20/05 02:25
dylukesah20/05 02:25
dylukesso, can  you get 1,2,3,4,5,6?20/05 02:26
dolioWhen you put in the right pragmas, 5 is a natural number.20/05 02:27
dylukes(side note, once I'm done with my essay, I'm going to play around with a ternary logic system, just for shits and giggles)20/05 02:27
dylukes(It'd be interesting to try some sort of quantum logic...)20/05 02:27
djahandariecopumpkin, so what would be the more interesting type for contains?20/05 02:27
dylukesalso be*20/05 02:27
copumpkindjahandarie, well, on one hand you might have20/05 02:27
copumpkincontains : (p : a -> Set) -> List a -> Sigma a p20/05 02:28
copumpkinor wait20/05 02:28
copumpkincontains : (p : a -> Set) -> List a -> Maybe (Sigma a p)20/05 02:28
shachafdolio: There's no way to have it correspond directly to Integers?20/05 02:28
shachafI suppose there's an extra 0.20/05 02:28
dolioshachaf: Not that I know of. There's no extra 0, though.20/05 02:29
copumpkinbut you can take it further20/05 02:29
djahandariecopumpkin, wouldn't it still be possible to make that return some useless stuff?20/05 02:29
shachafdolio: Only one of them is allowed to be 0?20/05 02:29
dylukesSigma20/05 02:29
dylukeswhat?20/05 02:29
dolioOne constructor is an embedding of the naturals, and the other is negative-one-minus.20/05 02:29
copumpkincontains : (p : a -> Set) -> (xs : List a) -> Either (Sigma a p) (All (not . p) xs)20/05 02:29
djahandarieAha20/05 02:29
dylukes._.20/05 02:29
dylukesso confused now copumpkin20/05 02:30
shachafdolio: Ah.20/05 02:30
copumpkindylukes: :P20/05 02:30
dolioshachaf: So 'Right 0' would mean -1, actually.20/05 02:30
shachafMakes more sense.20/05 02:30
dolioIf that's the choice you make.20/05 02:30
copumpkindylukes: basically that's saying20/05 02:30
dylukesCould you start with contains : (p : a -> Set) -> List a -> Sigma a p?20/05 02:30
dylukesI'm guessing p is the predicate but...20/05 02:31
dylukes>_<20/05 02:31
dylukesconfused by it.20/05 02:31
copumpkincontains : (a predicate called p) -> (a list called xs) -> either (there exists a value of type a such that p of that value is true) (all values in the list do not satisfy the predicate)20/05 02:31
dylukesInteresting.20/05 02:31
dylukesEmbedding a lot more info in that type :)20/05 02:31
copumpkinthere's actually an Any and an All type on lists20/05 02:31
dylukesIs this in some stdlib?20/05 02:32
copumpkinthe All type is more or less shaped like a souped-up list20/05 02:32
copumpkinthe Any type is more or less shaped like a souped-up natural20/05 02:32
dylukesI should… really… go write my essay20/05 02:32
copumpkinyeah, all in the agda std lib20/05 02:32
dylukesI'm asking myself to be distracted by this20/05 02:32
dylukessorry.20/05 02:32
copumpkinwe'll still be here when you're done :)20/05 02:32
djahandarieRight, you'd basically need to build up a whole list as a proof for the whole list satisfying something, right?20/05 02:32
djahandarieEnglish in that sentence did not work20/05 02:33
copumpkinyep20/05 02:33
copumpkinhttp://www.cse.chalmers.se/~nad/listings/lib/Data.List.All.html#70120/05 02:33
copumpkinhttp://www.cse.chalmers.se/~nad/listings/lib/Data.List.Any.html#105320/05 02:33
djahandarieUniverses feel like they complicate things when they vary like that20/05 02:35
copumpkinyeah, they kind of pollute type signatures20/05 02:35
copumpkinbut ah well20/05 02:35
copumpkinback in the bad ol' days we had List and List120/05 02:35
copumpkinor Vec and Vec120/05 02:35
djahandarielol20/05 02:35
djahandarieThat sounds a lot uglier20/05 02:35
copumpkinone for storing things in Set, the other in Set120/05 02:35
copumpkinif you wanted it to work for Set2, you had to write one for Set220/05 02:35
copumpkinalong with its helper functions20/05 02:35
djahandarieCould you give me an example call to that contains function? I'm interested in what the predicate would look like20/05 02:36
copumpkinremember that Even/Odd stuff I was doing a while back?20/05 02:37
djahandarieYes.20/05 02:37
copumpkinactually, this doesn't quite work as I wrote it20/05 02:38
copumpkinyou kind of want two levels of truthiness20/05 02:38
copumpkinyou want the predicate and then the decision procedure for it20/05 02:40
copumpkinmake sense?20/05 02:44
copumpkinI'll throw something together to demonstrate :)20/05 02:44
copumpkindjahandarie: http://hpaste.org/46870/contains20/05 03:18
* djahandarie reads20/05 03:19
djahandarieThis also clears up Dec for me20/05 03:21
djahandarieThe Any/All makes more sense to me than the Sigma20/05 03:22
copumpkinthe Sigma tells you a little less20/05 03:22
copumpkindoesn't say whether it's the first element in the list to match20/05 03:22
copumpkinand Any/All has a nicer symmetry20/05 03:22
djahandarieYeah, I like the symmetry. More info is cool too20/05 03:22
dylukeswhat *is* Sigma .__.20/05 03:23
copumpkindylukes: dependent pair20/05 03:23
dylukesthe BUILTIN confuses me too, ay.20/05 03:23
copumpkindylukes: depending on how you look at it, a pair whose snd's type can depend on the value of its fst20/05 03:23
dylukeswait no20/05 03:23
dylukesI can't be looking at this20/05 03:23
copumpkindylukes: that's just so I can use the 0, 1, 2 literals20/05 03:23
dylukesessay to write20/05 03:23
copumpkinthe builtin20/05 03:23
dylukescan you ban me until… 11PM?20/05 03:23
dylukesSay, for the next 40 minutes?20/05 03:23
copumpkinI don't have permissions in here :P20/05 03:24
dylukesdoes anyone?20/05 03:24
dylukes.__.20/05 03:24
djahandarieOne person I think20/05 03:24
copumpkinliyang does20/05 03:24
dylukeshngh20/05 03:25
dylukesback to BSing english essay20/05 03:25
dylukeshave to force myself!20/05 03:25
djahandarieI should really fix Agda so I can play with this code20/05 03:25
dylukesIf I say anything else before I'm done, bitch at me to finish my work.20/05 03:25
dylukesPlease.20/05 03:25
copumpkindjahandarie: Dec is basically saying "LEM holds here!!"20/05 03:25
copumpkindylukes: stfu and get back to work20/05 03:25
copumpkin:)20/05 03:25
copumpkindjahandarie: you could make it even cleaner20/05 03:26
copumpkinin fact, I might do that20/05 03:26
copumpkinand make contains return a Dec too20/05 03:26
copumpkinfor not (Any P xs) is equivalent to All (not . P) xs20/05 03:26
djahandarieRight20/05 03:27
djahandarie(\ ()) is that absurd pattern stuff again, right?20/05 03:28
copumpkinyeah20/05 03:28
copumpkinjust in a lambda20/05 03:28
djahandarieI wonder how far you can get with this in Haskell20/05 03:29
copumpkinhere you go20/05 03:31
copumpkinhttp://hpaste.org/paste/46870/contains_annotation#p4687220/05 03:31
djahandarieCould have removed the Either clutter at the top of the file too :p20/05 03:32
copumpkinoh good point20/05 03:33
djahandarieIs there a way to unify the definitions of List, All and Any in some fashion?20/05 03:33
copumpkinhttp://hpaste.org/paste/46870/contains_cleaner#p4687320/05 03:33
copumpkinList and All, I wish20/05 03:34
copumpkinAny is kind of a different shape20/05 03:34
copumpkincloser to Fin or Nat20/05 03:34
copumpkinmaybe someday with sufficiently powerful dependent generics20/05 03:34
djahandarieI've developed a cringe reflex to the word 'generics' for some reason20/05 03:34
copumpkinwith dependent types they get more important, I think20/05 03:35
djahandarieI thought you needed /less/ baggage with the power of dependent types ;)20/05 03:35
copumpkinwell, you don't _need_ to20/05 03:36
copumpkinI could define all and any in terms of plain old functions20/05 03:36
copumpkinbut they'd be less pleasant20/05 03:36
djahandarieCan't you not do that for all inductive types? I remember reading something about this20/05 03:36
copumpkininductive families are fairly easily translateable to plain old inductive types20/05 03:37
copumpkinalways, I think20/05 03:37
copumpkinthey really just carry an extra equality proof or several with them20/05 03:37
copumpkinimplicitly20/05 03:37
djahandarieWait --- I meant "Can't you not do that for all inductive families"20/05 03:37
djahandarieWhat about the simply typed lambda calculus?20/05 03:37
dolioEquality is an inductive family, though.20/05 03:37
djahandarieThat too20/05 03:38
copumpkinwith primitive equality20/05 03:38
dolioYou can't defined an equality that works right without impredicativity, too.20/05 03:38
dolioDefine.20/05 03:38
dolioIt has to be built in otherwise.20/05 03:38
dylukesthe degree to which I have become comfortable with emacs in a day is alarming20/05 03:42
copumpkinSTFU AND WORK20/05 03:42
copumpkin:)20/05 03:42
dolioThat's because emacs is the most intuitive editor on the planet.20/05 03:42
dylukesdolio: Not sure about that, but...20/05 03:44
dylukesI just procrastinated more and installed slime,20/05 03:44
dylukesI definitely will never20/05 03:44
dylukesever20/05 03:44
dylukesedit lisp with anything else.20/05 03:44
dylukes.__.20/05 03:44
dylukesC-c C-q doesn't work though20/05 03:45
dylukessadness.20/05 03:45
dolioI tend to accomplish that by never editing lisp.20/05 03:46
shachafdolio++ has the right attitude!20/05 03:47
dylukesBut I like lisp...20/05 03:47
* dylukes prepares for being firestormed.20/05 03:47
copumpkinxplat: hmm, my old signature for the pentagon still "fits" the new module20/05 03:47
copumpkinwhich means it'll take no less memory :(20/05 03:47
dolioLisp is better than a lot of stuff out there.20/05 03:48
copumpkinso is shit20/05 03:49
dylukesSilly question but, how can I *cancel* the current chord/command?20/05 04:08
copumpkinI was just wondering that20/05 04:09
copumpkinI vaguely remember there being something, but can't remember it20/05 04:09
shachafC-g?20/05 04:10
dylukesC-g cancels like, C-x C-f20/05 04:10
dylukesI mean if I have "C-x "20/05 04:11
dylukesand then I don't actually want to do anything20/05 04:11
dylukeshow can I break the chord :\20/05 04:11
* shachaf hasn't used emacs for years.20/05 04:14
shachafThe tutorial says that C-g cancels e.g. C-h.20/05 04:14
shachafBut I'm sure there are other channels that'd know more than this one.20/05 04:15
dylukesmmk oh well20/05 04:16
dylukesI type hanoi instead of haskell20/05 04:19
dylukeswtf20/05 04:19
dylukeswhy is hanoi even built in20/05 04:19
dylukeswhy is there an email client20/05 04:20
dylukeswtfff20/05 04:20
dylukesMy essay just turned into me talking about whether or not humans are good at thinking non-deterministically.20/05 04:25
dylukesGoddamit I hate you all.20/05 04:26
copumpkin:(20/05 04:28
dylukesMy conclusion is that analyzing my own dreams seems to show that the human mind is actually pretty good at non-linear, non-deterministic thinking...20/05 04:28
dylukeswe just suck at it in real life.20/05 04:28
kfishpass the pipe20/05 04:29
djahandarieI recall that I wanted to do something involving Haskell for my High School senior project but they wouldn't let me do anything complicated.20/05 04:29
dylukesI hate to make you feel bad djahandarie...20/05 04:30
dylukesBut I'm doing that TT_TT20/05 04:30
* copumpkin passes kfish the pipe20/05 04:30
kfishsweeet20/05 04:31
djahandarieI ended up just doing some halfassed thing about something not important. It didn't really matter anyways.20/05 04:31
djahandarieOh, one cool thing about that was that I tought a bunch of middle schoolers HTML, CSS, and some Javascript in a couple sessions.20/05 04:32
dylukesnice20/05 04:33
dylukeskfish:20/05 04:33
dylukesokay so...20/05 04:33
dylukesimagine you're in a box...20/05 04:33
dylukesThis box, exists inside another box.20/05 04:33
dylukesand inside the box, with you, the only other thing is a box.20/05 04:34
dylukesNow...20/05 04:34
dylukesthe inside box… is the outside box.20/05 04:34
dylukesSo, if you were to look inside the inside box, you'd see the box you're in.20/05 04:34
dylukesSo… the area inside the box you're in is "smaller" than the area outside it, since it fits inside it...20/05 04:34
dylukesbut its also "bigger", since it encompasses that area within it...20/05 04:35
dylukesthe only conclusion that resolves the paradox… is that all three boxes have to be the same box.20/05 04:35
djahandariedylukes, you should probably stfu and get back to work20/05 04:35
dylukesbut then, if you're still "inside" a box, you're in a box of infinite size20/05 04:35
dylukesbut zero surface area.20/05 04:35
djahandarieOr just stfu if there is no work left20/05 04:35
* dylukes is good at pretending to be high.20/05 04:35
djahandarieIs there a difference in pretending to be high and pretending to be a stupid person trying to sound smart?20/05 04:36
dylukesNot really.20/05 04:36
dylukesThey boil down to doing the same things.20/05 04:36
dylukesI shudder to think what I'd actually say if I were high.20/05 04:38
dylukesHowever, I don't have any plans to do so...20/05 04:38
dylukesSo, the world is spared.20/05 04:38
djahandarieI keep on getting tempted by Conor and Bob Atkey about some really awesome way to build induction and coinduction off of comonads and monads or folds and unfolds or something like that... but I want the details and I can't get them :p20/05 04:39
djahandaries/tempted/taunted/ ... or something20/05 04:39
liyangcopumpkin: what? I have superpowers here? Didn't know that…20/05 06:26
copumpkinyou appear to :)20/05 06:26
copumpkinyou and jfredett20/05 06:26
-!- mode/#agda [+o liyang] by ChanServ20/05 06:27
@liyangoh right. Didn't know that. @_@20/05 06:27
-!- mode/#agda [-o liyang] by ChanServ20/05 06:27
liyangWonder when that happened.20/05 06:28
liyangApparently 26 months ago.20/05 06:29
copumpkinwow :)20/05 06:30
xplat×-assoc = Associative product product product product20/05 14:24
xplati'm tempted to add -- *smack* ... Thanks, I needed that.20/05 14:25
xplatold-cartoon-style20/05 14:25
xplati wonder how large the type of assoc\^l is20/05 14:28
xplattechnically Category.Object.Products should be Category.Object.FiniteProducts20/05 14:34
copumpkinyeah20/05 14:36
djahandarieWhat would a non-finite product look like?20/05 14:40
djahandarieWhat is it called when you have a category with non-finite products? Wikipedia says a category with finite products is symmetric monoidal20/05 14:41
djahandarieOops, getting distracted by IRC20/05 14:43
copumpkinwell, having finite products is the same as having binary ones and a terminal object20/05 14:43
copumpkinI think non-finite products are products like how pi types are products20/05 14:44
copumpkinproducts indexed by other stuff?20/05 14:46
copumpkin"More generally, for S∈ Set ↪ Cat any discrete category, an S-indexed limit is a product of ∣S∣ factors. If S is a finite set we speak of a finite product. "20/05 14:46
xplathm, i wonder where the dependency on FinSet is coming from20/05 14:49
copumpkin?20/05 14:50
xplatwhen i tried to load a modified version of Cartesian that parsed correctly, FinSet got built20/05 14:50
copumpkinweird20/05 14:51
xplatNaturalTransformation is taking a while to build20/05 14:52
xplatanyway infinite products are, yes, the limit of a diagram with an infinite number of isolated dots20/05 14:57
xplatyou can't build them up out of binary products but they're essentially the same sort of thing20/05 14:58
xplatthey have an infinite number of projections and you can make infinite fans of arrows factor through them20/05 14:59
xplatthey DON'T have to be indexed by an object of the same category like a pi is though20/05 15:00
xplatthose kinds of products come in through fibrations20/05 15:01
copumpkinI see20/05 15:01
xplata normal infinite product is indexed by a set (object of Set) or equivalently by a discrete category, if you want to treat it as indexed20/05 15:03
xplatbut in a way that's just a convenience, to be able to name the projections20/05 15:04
xplatNaturalTransformation is REALLY taking a while to build20/05 15:05
xplatthis is in accord with my experience that anything NT-related in general is slow and bloated20/05 15:06
xplat(and my assumption that it's probably because of the 2-globe structure of the NT type)20/05 15:07
xplatlol wut20/05 15:15
xplatmaybe NT isn't building at all, it seems emacs itself is eating all the CPU20/05 15:15
copumpkinoh emacs eats all the CPU when ghci dies20/05 15:18
copumpkinit's wonderful20/05 15:18
copumpkinI noticed that all the times I killed ghci intentionally20/05 15:18
xplati started wondering 'okay, it could take a while, especially if there's a lot of stuff in memory already but not THIS long' and then i checked top20/05 15:18
copumpkinbut I also think if you get a failed memory allocation, ghci will die20/05 15:18
copumpkinso if you're on the 32-bit one and it asks for moar20/05 15:18
xplat... *boom*.  charming.20/05 15:20
copumpkinI can't believe emacs freezes20/05 15:20
copumpkinin general20/05 15:20
copumpkinduring agda operations20/05 15:20
copumpkinis emacs not multithreaded?20/05 15:20
xplatemacs is old, and it loads buckets of stateful lisp code written by amateurs20/05 15:21
copumpkinstill, after almost two dozen iterations of it, I'd expect it to be more clever :P20/05 15:21
xplatanybody who has tried to make it multithreaded has soon thereafter seen the dark light of cthulhu20/05 15:22
xplatrecall that elisp, classically, has not even had lexical variables ...20/05 15:23
Saizanthis is probably an agda-mode bug though20/05 15:23
xplatwell, agda-mode could be better about yielding manually, nevermind the spin bug20/05 15:24
copumpkinSaizan: oh, sure, but I find it disturbing that a -mode can hang the whole UI20/05 15:24
copumpkinemacs is an OS!20/05 15:24
xplatemacs is mac os 920/05 15:24
copumpkinif a single non-yielding program can hang the whole thing, you should go back to last millennium20/05 15:25
Saizanwin95 was an os, but you got plenty fo deadlocks20/05 15:25
copumpkinwithout passing go20/05 15:25
xplater, 820/05 15:25
xplatthat's why it has that mac in it20/05 15:25
xplatdos was supposedly an os.  it said right there in the name!20/05 15:26
copumpkinyeah, but nobody uses win 95 or dos anymore :)20/05 15:26
copumpkinplus, win 95 supposedly had pre-emptive multitasking20/05 15:26
Saizanoh, i know, let's rewrite emacs in haskell!20/05 15:27
copumpkinit's gotta be better and less dumb20/05 15:27
copumpkinoh I guess that's implied by the haskell bit20/05 15:27
xplati'm ... kind of doing that already.  but it won't help much, if you want to run elisp20/05 15:28
Saizanit can't be hard to write an elisp interpreter20/05 15:28
copumpkinxplat: oh don't worry, I don't20/05 15:29
xplatwith skill and a little luck one might be able to get things to the point where a mode only freezes windows it's using20/05 15:29
Saizan(anyhow, i was referring to yi)20/05 15:29
xplatrather than the entire editor and UI20/05 15:30
Saizanyou can stop the loading of a module with C-g, i wonder if that works when it's spinning20/05 15:30
xplatit does20/05 15:30
xplatit's just annoying because you need ps to tell if it's spinning or doing useful work20/05 15:31
* copumpkin walks to work20/05 15:31
djahandariequackwoof, you got turned into a dogduck on the way there?20/05 15:34
djahandariexplat, you can get Pi from a fibration? That sounds interesting20/05 15:35
xplator into an indefinite existence composed of metavariables ...20/05 15:35
djahandarieI thought fibrations were only for representing a single pair of sorts, but it feels like Pi would need to be aware of all the sorts. Or maybe not20/05 15:36
xplatdjahandarie: fibrations give you the idea of 'indexed' things in general20/05 15:36
xplatfor pi in particular you use a self-fibration.  there's a natural one that exists in toposes20/05 15:40
xplatbuilding Monoidal now.  this will probably pinch a little20/05 15:41
xplatdone20/05 15:42
copumpkinxplat: I got a little further in my cartesian pentagon proof20/05 16:01
copumpkinit seems productive to make lots of dummy holes for equational reasoning proofs and then typecheck it with the holes20/05 16:01
copumpkinthen fill them in as you go along20/05 16:01
copumpkinthat seems easier for it to typecheck than actually reloading the proof with the filled-in holes20/05 16:01
xplatyes20/05 16:08
xplatwhich NT's eta are you using in identity\^l-iso\^l?20/05 16:09
xplatoh, i see, it's BinaryProducts.\eta20/05 16:11
xplatnow that i've turned everything abstract i get to find all the places these equality proofs were relying on definitional equality ...20/05 16:34
pumpkinwhat have you made abstract?20/05 16:35
pumpkinI guess abstract is our last chance to make this all tractable :P20/05 16:37
xplati've made _\asterisk3_, \<_,_\>, the assoc morphisms, assoc iso proof, and some of the laws abstract20/05 16:39
pumpkincool20/05 16:41
xplatjust locally, i haven't touched BinaryProducts20/05 16:41
xplatmight be worth doing that if it works though20/05 16:41
pumpkinyep!20/05 16:42
pumpkinI'm excited20/05 16:42
xplatfor some time now the file has been loading20/05 17:56
xplatit's slow but not unbearable20/05 17:56
xplati've restored the existing proofs that broke from abstraction, i think20/05 17:57
xplatmy agda process is 898m20/05 17:57
xplatcreating the commutative squares for assoc will be some work probably20/05 17:58
xplatthere are currently only four holes, those two, triangle, and pentagon20/05 18:00
xplatthe type of pentagon is (normalized) assocˡ ∘ assocˡ ≡ (id ⁂ assocˡ) ∘ (assocˡ ∘ (assocˡ ⁂ id))20/05 18:03
xplatwell, a little longer than that because you have Category._≡_ C  and Category._∘_ C20/05 18:04
pumpkin:O20/05 18:31
xplatit's a lot more manageable than the previous version :)20/05 18:32
pumpkincool20/05 18:32
pumpkinnow that I think about it though20/05 18:32
pumpkinI kind of want to peer inside assoc in BinaryProducts for the pentagon proof20/05 18:33
pumpkinor maybe I can prove smaller parts of it without introspecting20/05 18:33
pumpkinand build the larger proof out of it20/05 18:33
xplatyes, you do need to peer inside20/05 18:34
xplatbut hopefully you can build the proof by only looking into, say, two at a time20/05 18:34
xplatinstead of all 520/05 18:34
xplatwow, i got inside just in time -- raining cats and dogs now20/05 18:35
pumpkinyeah20/05 18:37
chegibarixplash20/05 18:40
xplatcopumpkin: triangle is beaten, 3 goals to go20/05 19:35
pumpkinfor cartesian?20/05 19:35
xplatyeah20/05 19:36
pumpkinawesome20/05 19:36
pumpkinhow slow is it?20/05 19:36
xplatnext boss is assoc.F=>G.commute20/05 19:36
pumpkinxplat++20/05 19:36
pumpkinyou should get on twitter so I can give you props on there :P20/05 19:36
byorgeyxplat: better use a health potion first20/05 19:36
* pumpkin hands xplat a phoenix down20/05 19:37
xplatthanks, i think i'm going to need it :720/05 19:38
xplatas usual in agda, it's an asteroids boss20/05 19:53
pumpkin?20/05 20:03
xplatbreaks up into several minibosses when you attack it20/05 20:15
pumpkinoh20/05 20:15
pumpkin:)20/05 20:15
pumpkingoing well?20/05 20:15
xplatoften there's a 'core' that hangs back until you finish off the small fry, then splits again or does something else annoying20/05 20:15
xplatgah, why is this failing?!20/05 20:36
xplat      ⟨ (f ∘ π₁) ∘ π₁ , ⟨ g ∘ (π₂ ∘ π₁) , h ∘ π₂ ⟩ ⟩20/05 20:36
xplat    ≈⟨ ⟨⟩-cong₂ (Category.assoc C) {!sym ⁂∘⟨⟩!} ⟩20/05 20:36
xplat      ⟨ f ∘ (π₁ ∘ π₁) , (g ⁂ h) ∘ ⟨ π₂ ∘ π₁ , π₂ ⟩ ⟩20/05 20:36
Eduard_MunteanuWhat are you trying to prove?20/05 20:38
xplat  .assocˡ-commute : ∀ {X₀ Y₀ X₁ Y₁ X₂ Y₂} {f : X₀ ⇒ Y₀} {g : X₁ ⇒ Y₁} {h : X₂ ⇒ Y₂} → assocˡ ∘ ((f ⁂ g) ⁂ h) ≡ (f ⁂ (g ⁂ h)) ∘ assocˡ20/05 20:38
pumpkinxplat: you using the new sym?20/05 20:38
xplatoh.  guess i'm not.20/05 20:39
pumpkinin that case, it may be locked to a different set of args20/05 20:39
xplatnow i am!20/05 20:39
pumpkindid it fix it?20/05 20:39
xplatwell, when this finishes loading.  starting to swap lately.20/05 20:39
pumpkinI periodically restart agda20/05 20:40
pumpkinit seems to retain more shit than it should20/05 20:40
pumpkinaha, http://twitter.com/#!/xplat20/05 20:42
pumpkin;)20/05 20:43
xplatwhat?20/05 20:43
pumpkinyou have a twitter account!20/05 20:43
pumpkinand are mexican!20/05 20:43
pumpkin:P20/05 20:43
pumpkinwho would have thought20/05 20:43
xplatoh, when i'm mexican20/05 20:43
xplatyou should have said20/05 20:43
xplatyes, i do twitter when i am mexican20/05 20:44
pumpkinlol20/05 20:44
xplatthat's actually the first time i've run into a name collision since i started using this name20/05 20:44
xplatthe new sym worked20/05 20:45
pumpkin:O20/05 20:45
pumpkinyay20/05 20:45
pumpkinthat was surprisingly fast20/05 20:45
pumpkinhow's memory usage?20/05 20:45
xplat1306m20/05 20:46
pumpkinoh wow20/05 20:46
pumpkinthat's comparatively tiny20/05 20:46
pumpkinmaybe we should perform "the great abstract revolution" in the library20/05 20:46
xplat861m for a fresh reload20/05 20:48
pumpkinwow20/05 20:48
xplatnow i have ⟨ π₁ ∘ π₁ , ⟨ π₂ ∘ π₁ , π₂ ⟩ ⟩ ∘ ((f ⁂ g) ⁂ h) \== ⟨ (f ∘ π₁) ∘ π₁ , ⟨ g ∘ (π₂ ∘ π₁) , h ∘ π₂ ⟩ ⟩20/05 20:50
xplatand i'm a little stuck for what to do next20/05 20:50
pumpkinif you reassociate the inner < >20/05 20:52
pumpkinyou can make that into a tristar thing20/05 20:52
pumpkinnot sure what next :P20/05 20:53
pumpkinI thought I could see a path through the proof last night20/05 20:53
pumpkinI was kind of converging on it from both directions20/05 20:53
pumpkinbut maybe I was going the wrong way20/05 20:54
xplatthis proof?20/05 20:54
pumpkinI mean the big whole pentagon20/05 20:54
pumpkinso not really that one20/05 20:54
xplatoh20/05 20:54
xplati thought you already had a pentagon commented out?20/05 20:54
pumpkinit wasn't complete20/05 20:54
xplatoh, you're right, it isn't20/05 20:55
pumpkinevery step I added to it made the memory bigger20/05 20:55
pumpkinand I had to give up20/05 20:55
pumpkinbut the version in the repo isn't as far as I got20/05 20:55
pumpkinI started working backwards too20/05 20:55
xplatmaybe i should push what i have20/05 20:56
xplateven though everything is in the wrong place :)20/05 20:56
pumpkindo you have the pentagon expressed in terms of smaller lemma(s/ta) or are you building useful-looking things to put together later?20/05 20:56
xplati'm just filling in all the other things besides the pentagon right now20/05 20:57
pumpkinah okay20/05 20:57
pumpkincause I already had triangle before20/05 20:57
pumpkinbut I guess my proof probably wouldn't have worked with abstract20/05 20:57
xplatit just needed a little help20/05 20:57
xplata couple of extra steps to fold and unfold definitions20/05 20:58
xplat  b989edd..6cf4db5  master -> master20/05 21:03
xplatmy basic strategy here was to create abstract definition 'foo' and then if necessary a 'foo-convert' function to prove it is propositionally equal to its definition20/05 21:06
xplater, law, not function20/05 21:06
xplatof course, where reasonable it has laws of its own that allow working on it without unfolding20/05 21:07
xplatalthough i've only really been reexporting the ones that are already in BinaryProducts20/05 21:07
augurthe semester is over! \o/20/05 21:07
xplattime to go to the beach!20/05 21:08
augurno no no20/05 21:08
augurtime to go to aquamacs!20/05 21:08
xplattraining camp?  hot springs?  nobody does an aquamacs episode.20/05 21:09
xplatwell, i guess it could be the start of a new tradition20/05 21:10
pumpkindo you think that Category.Object.* tree is worth having? I'm pretty ambivalent20/05 21:13
xplati have trouble figuring out when to look in there and when not to ...20/05 21:14
pumpkinthe main reason I made it20/05 21:15
pumpkinwhich admittedly wasn't a very good one20/05 21:15
pumpkinwas to be able to separate the product category from products20/05 21:15
xplatit seems like as best i can figure it's a bin for specific kinds of limits and colimits20/05 21:15
pumpkinwell, my criterion was if something's definition is "an object of a category and some shit", then it belonged in there20/05 21:16
xplatwell, for the most part that is limits and colimits20/05 21:16
xplatand a few things like 'zero object' that are mixtures or whatever20/05 21:17
pumpkinyeah20/05 21:17
pumpkinanyway, I welcome suggestions on any front from someone more mature in CT than I was when I planned it out20/05 21:17
xplatas far as organization goes, AbstractProducts probably doesn't belong in Cartesian, and prop definitely doesn't20/05 21:20
xplat(prop is a helper function to convert propositional equalities to \==-equalities20/05 21:20
xplat)20/05 21:20
pumpkinyeah20/05 21:20
xplatprobably prop should go in equiv, and a similar thing in SetoidReasoning as _\===\<_\>_20/05 21:21
xplater, in Equiv20/05 21:22
pumpkinyeah20/05 21:22
xplatmaybe there should be a non-field prop in IsEquivalence too20/05 21:22
xplatthe definition is just ‘prop \===-refl = refl’ but it's very useful to have a function for the usual pattern-matching reasons20/05 21:25
pumpkinyeah20/05 21:25
pumpkinexcellent :D20/05 21:25
pumpkinI can't wait to play with all this stuff later20/05 21:26
pumpkinbtw, feel free to add an authors file and stick yourself in it, or give yourself non-git credit somewhere20/05 21:27
pumpkin:P20/05 21:27
xplati moved prop to Support and Category, so now everything is getting rebuilt from zero :)20/05 21:45
pumpkinthat's always fun20/05 21:47
pumpkinI usually try to rebuild Everything.agda before pushing anyway20/05 21:47
xplatjust finished Monoidal and started on Category.Object.Product20/05 21:48
pumpkinhow can you tell what it's doing?20/05 21:48
xplatinotifywait -m -r20/05 21:48
pumpkinaha :)20/05 21:48
xplatit will read a file, think a while, then write the .agdai20/05 21:49
pumpkinmakes sense20/05 21:49
pumpkindoesn't it read a bunch of .agdai files each time too?20/05 21:49
xplatseemingly not20/05 21:49
xplatof course i've really only watched it when it's doing a big rebuild where there are only a few valid .agdai to start20/05 21:50
xplatyes, it does read a bunch of them when you just build one file20/05 21:52
pumpkinah20/05 21:53
pumpkinw00t, low-effort (but subtle) 3x speedup for some code I was working on optimizing for work :D20/05 21:57
xplatcool20/05 22:42
xplatforgot the infixr for _\===\<_\>_ , had to rebuild again20/05 22:43
Saizanin agda?20/05 22:43
pumpkinxplat: damn20/05 22:43
xplatalso: the one that took a long time to build wasn't regular NaturalTransformation even before it failed, it was Category.Power.NaturalTransformation, which is REALLY no surprise.20/05 22:47
xplatand it just finished building this time, on to C.Monoidal.Helpers20/05 22:47
xplatregular Monoidal20/05 22:48
xplatCategory.Object.Product20/05 22:53
pumpkinshouldn't be much longer now20/05 22:54
xplatbrb, making salad20/05 22:55
pumpkinomnom20/05 22:55
xplatBinaryProducts, btw20/05 22:55
pumpkincool20/05 23:00
Saizanhttps://lists.chalmers.se/pipermail/agda/2011/003052.html <- i wonder if this is the same issue as nested sigmas20/05 23:48
--- Day changed Sat May 21 2011
xplatpushed [master cfb920f] New convenience functions for demoting equality to equivalence.21/05 00:32
pumpkinooh21/05 00:32
xplatSaizan: most likely it is21/05 00:41
xplatin a way it reminds me of the 'ungrateful' kind of lazy space leak in haskell21/05 00:43
xplatwhere haskell's laziness stops your naive program from using huge amounts of memory, and then you make your naive problem a little more complicated, and laziness no longer solves your space leak for you21/05 00:44
xplat*naive program a little21/05 00:44
xplatso then you blame laziness for the space leak, since it lulled you into complacency21/05 00:45
xplatit looks like the workaround doesn't work for nested records either21/05 00:47
xplatmaybe the assoc\^l-commute boss would be easier if i fought it on paper first21/05 00:53
copumpkinso is everyone excited about rapture tomorrow?21/05 01:44
Saizanas much as i was about the earthquakes in rome a few weeks ago :)21/05 01:49
xplatwhat, that much?21/05 01:51
xplatwell, i guess some people are having picnics the day after, that's sort of exciting21/05 01:51
Saizanthe people that went on holidays with their families must have felt like fools on the way back21/05 01:55
xplatspeaking of exciting, i beat assoc\^l-commute! not just on paper but for reals!  however agda is now 1755m so i could really use one of those healing potions ...21/05 01:57
* copumpkin hands xplat a potion21/05 01:57
copumpkinyou have 2GB of RAM or 4?21/05 01:57
xplat221/05 01:57
copumpkinah21/05 01:58
copumpkinyou can throw it over to me if you want me to take a stab at it21/05 01:58
copumpkinI'm at 421/05 01:58
xplatit's a 12-step proof and i could only eliminate one step easily (at the cost of making the intermediate result lines pretty long)21/05 01:59
Saizanthey should've implemented agda in erlang, you'd be having 6 to use at this point21/05 02:00
xplatheh21/05 02:07
xplatwell, now i'm fighting his brother, assoc\^r-commute21/05 02:07
xplat1214m to start21/05 02:08
xplatVICTORY!21/05 02:50
xplati have formally verified the commutativity of two squares and a triangle, achieving CLVL 24 and the rank of Pedant.21/05 02:50
copumpkin:O21/05 02:51
copumpkinyou can't make a pentagon out of those though!21/05 02:52
xplathowever, agda now hits 1558m on a fresh load, and my spirits are depleted.  i must leave the pentagon to you, my friend.21/05 02:52
copumpkincan you pass your inventory to me?21/05 02:53
copumpkinI need your armor and sword21/05 02:53
xplati have left you my inventory in the vault at the guild hall21/05 02:55
xplatthe combination is ab1927421/05 02:56
copumpkinthank you my kind knight21/05 02:58
copumpkinor are you a paladin?21/05 02:58
copumpkinI can never tell the difference21/05 02:58
dolioYou're an epic level pedant?21/05 02:59
xplatgot it in one :)21/05 02:59
copumpkinyeah, but what class!!21/05 03:00
xplatas a pedant, i'm working on a 500-word essay to explain my precise combination of multiclassing and prestige classes and why it is superior to all nearby combinations21/05 03:02
copumpkinaha21/05 03:03
copumpkinxplat: up to 2.9 GB so far :o21/05 03:13
copumpkinmaybe it's rebuilding multiple things or something21/05 03:13
copumpkinor there are lots of pointers and my 64-bit compile isn't ideal :P21/05 03:14
xplatyeah, i think 64-bit will use more21/05 03:14
xplatabout twice as much in fact -- there's practically nothing but pointers and ints21/05 03:14
xplatstrings are lost in the noise21/05 03:15
copumpkinboo21/05 03:15
xplati kind of wish somebody had come up with 40-bit computers :)21/05 03:16
copumpkin:P21/05 03:16
copumpkinmaybe I'll move your new stuff (temporarily?) to a new module21/05 03:19
copumpkinor maybe I'll just work on pentagon in a new module21/05 03:19
dolioxplat: 500 words isn't that long for that purpose.21/05 03:23
dolioIf you visit various D&D message boards.21/05 03:23
copumpkinxplat: why do you sometimes open Equiv and others refer to its methods qualified?21/05 03:28
xplatdolio: yes, but i decided on a strict 500-word limit so that people wouldn't tl;dr it21/05 03:29
xplatdolio: that's why i'm writing it in German21/05 03:29
xplatcopumpkin: if there's a lot of just sym at top level then using the frozen sym seems to shave off a few bytes21/05 03:30
copumpkinah21/05 03:30
xplator sym and prop likewise21/05 03:30
xplat(although there's no real reason to use frozen prop thanks to the other convenience function)21/05 03:31
copumpkinoh, I thought the squares were to help with pentagon21/05 03:34
copumpkinbut they're the NT stuff21/05 03:34
copumpkincool21/05 03:34
copumpkinI was putting that off21/05 03:34
copumpkinxplat: I think I'm screwed21/05 05:00
copumpkindpiponi: yay!21/05 05:00
xplatcopumpkin: :U21/05 05:01
copumpkinI'm running out of holes in my massive eq reasoning21/05 05:02
copumpkinand reloading the file may never happen21/05 05:02
dolioB^U21/05 05:02
xplatit should be easy if you rebuild it 32-bit?21/05 05:07
copumpkinI feel like it might die anyway21/05 05:07
copumpkinbut I might give it a go21/05 05:07
xplati don't think you get any advantage from a 64-bit process address space until you have at least 5 or 6 gigs21/05 05:08
copumpkin:(21/05 05:09
copumpkinyou saying my computer sucks!21/05 05:09
xplatno, it's great!  for running 32-bit programs :)21/05 05:09
xplatactually you could still have an advantage if you want to mmap huge files or you have a program with excellent locality21/05 05:10
xplatbut even for things that fit in memory both ways you could potentially suffer losses from memory bandwidth depletion by going 64-bit21/05 05:11
copumpkinyeah21/05 05:12
copumpkindo we have dependent composition somewhere?21/05 05:12
xplat(but with bad enough cache behavior that won't matter either)21/05 05:12
xplatsupport has dependent \. and \.\_221/05 05:12
xplat\.\_2 is like .:21/05 05:13
copumpkinI'm actually getting surprisingly close to the pentagon proof21/05 05:15
copumpkinbut I think I took a horribly roundabout way of doing it21/05 05:15
copumpkinI'd tinker with it but it takes too long21/05 05:15
xplati just came up with an abstraction to help push things through assocs21/05 05:19
copumpkinI might break it up into smaller pieces and tackle them independently21/05 05:19
copumpkinwell, too late! :P21/05 05:20
copumpkinthe end is near21/05 05:20
copumpkinpity my holes ran out too21/05 05:20
copumpkinbut what is it?21/05 05:20
copumpkinmaybe it'd make this thing tractable to typecheck21/05 05:20
xplatexch\_2 thru-a thru-b = begin (a \o b) \o c =< assoc > a \o (b \o c) =< \o-resp-\==\^r thru-b > a \o (d \o b) =< sym assoc > (a \o d) \o b =< \o-resp-\==\^l thru-a > (e \o a) \o b =< assoc > e \o (a \o b) \qed21/05 05:24
xplatmaybe you'd need to tell it what a,b,c,d,e are explicitly, or maybe some could be implicit21/05 05:24
copumpkinmind putting an IME'd version of that up somewhere?21/05 05:25
* copumpkin pulls out the liquid nitrogen and hopes he doesn't have to install a different GHC and reinstall agda to get this fucker to typecheck21/05 05:26
djahandarieYou run your laptop in liquid nitrogen? No wonder it doesn't overheat21/05 05:27
xplatexch\_2 is basically just the product of arrows in the arrow category21/05 05:34
xplat(that is, a product of commutative squares)21/05 05:34
xplatlaws like π₂∘⁂ are just commutative squares21/05 05:36
xplatif you look at the square proofs i did there are a lot of steps that just go into just flipping two squares consecutively21/05 05:38
copumpkinyeah21/05 05:38
xplatif you take the product first, you only flip once and it's easy21/05 05:38
xplater, more composition than product21/05 05:39
xplatso if you want a pre-IMed version, look in the arrow category!21/05 05:39
xplat_∘′_ in Category.Arrow is almost exactly what i just wrote, wrapped in the unpacking of arrarrs21/05 05:41
copumpkinI'm just gonna try one other thing then I'll look at what you're saying21/05 05:42
copumpkinyou're welcome to attempt it in parallel :)21/05 05:42
xplati think i'll attempt it tomorrow, or whenever i next attempt to load Cartesian :)21/05 05:43
xplatif you don't end up trying it before then21/05 05:44
copumpkin:D21/05 05:46
copumpkinwho knows21/05 05:46
copumpkinI feel pretty rotten but I wanna defeat this thing21/05 05:46
xplati'm sure you can find a way to beat it21/05 05:48
copumpkinI'm trying to be more careful about expanding stuff this time around21/05 05:51
xplatcopumpkin: http://hpaste.org/46906/some_glue_code21/05 06:16
augurcopumpkin!21/05 06:16
augurcopumpkin: im going to make a natural deduction style proof editor :T21/05 06:17
xplat(ignore the choice of module, it was just somewhere for me to write it quickly in emacs)21/05 06:19
copumpkinaugur: cool :)21/05 06:21
augurcopumpkin: for macs21/05 06:21
copumpkinxplat: looks handy, but I think I may be close now21/05 06:21
augurcopumpkin: right after i finish my linguistic command line program21/05 06:21
xplat(i could probably halve the number of steps in the square proofs with that, but i may be, er, fighting the last battle)21/05 06:21
xplat(okay, not halve, reduce by a third -- two parallel five-step critical paths reduced by 4 steps in an 11-step path)21/05 06:24
copumpkinw00t21/05 06:27
xplat!21/05 06:27
copumpkinnow to remove all the useless holes in the eq reasoning proof and reload :$21/05 06:28
copumpkindrum roll21/05 06:30
copumpkinanyway, I'm sure it works21/05 06:35
copumpkinI don't think anyone can typecheck the whole module though21/05 06:35
xplatwell, it's a great improvement.  before nobody could even typecheck the stub ...21/05 06:36
copumpkinsince I commented out the other proofs to work on this one21/05 06:36
xplatnow there's a whole module done that we can't typecheck21/05 06:36
copumpkin:D21/05 06:36
copumpkinmaybe we can get Eduard_Munteanu to typecheck it for us21/05 06:38
copumpkinI think he has 6GB of RAM21/05 06:38
copumpkinnot sure he has a 64-bit build though21/05 06:38
* Eduard_Munteanu grumbles21/05 06:38
Eduard_Munteanu:P, yeah I do.21/05 06:38
djahandarieI should run Agda on my server with like 30 GB of unused RAM21/05 06:39
copumpkinyes please21/05 06:39
copumpkinand give us shell accounts21/05 06:39
djahandarieIt's not mine though, it's my jobs :p21/05 06:39
djahandarieI'm the only one who uses it though!21/05 06:39
copumpkinpff, details21/05 06:39
copumpkinI have access to some beefy servers too, but they all run windows :(21/05 06:40
djahandariexen2:~ # cat /proc/meminfo21/05 06:40
djahandarieMemTotal:     58866688 kB21/05 06:40
djahandarieMemFree:      54027016 kB21/05 06:40
djahandarieHmm...21/05 06:40
copumpkinand no 64-bit windows ghc builds21/05 06:40
copumpkinnot too shabby21/05 06:41
djahandarieYeah, 56 GB21/05 06:41
djahandarieCPUs are okay21/05 06:41
copumpkinI think that's what it'll take to typecheck this library when we're done21/05 06:41
djahandarieHaha21/05 06:41
Eduard_MunteanuNeat machine.21/05 06:41
djahandariexen2:~ # cat /proc/cpuinfo | grep 'model name' | wc -l21/05 06:42
djahandarie1621/05 06:42
djahandariePlenty of cores, but they aren't that good: model name: Intel(R) Xeon(R) CPU           E7330  @ 2.40GHz21/05 06:42
copumpkindjahandarie: well why don't you start contributing to this library too, since you can do the beefiest proofs!21/05 06:42
copumpkinand that's the limiting factor here :P21/05 06:42
Eduard_MunteanuWhat lib is this anyway?21/05 06:42
copumpkinmy CT lib21/05 06:42
djahandarieI haven't even gotten Agda working on my PC, you expect me to figure out how to get it running on my server?21/05 06:42
copumpkinor my and xplat's CT lib21/05 06:42
Eduard_MunteanuOh? It's so big already?21/05 06:43
Eduard_MunteanuAt least the typechecking stuff.21/05 06:43
copumpkinEduard_Munteanu: it doesn't really take much to blow agda up :) at least not in this domain21/05 06:43
copumpkinbut it's got lots of stuff21/05 06:43
* djahandarie nests some Sigmas21/05 06:43
copumpkinxplat: behold! http://hpaste.org/46907/behold21/05 06:45
* copumpkin cries21/05 06:45
copumpkinI really should break it up21/05 06:45
djahandarieI think you need a nicer way to write proofs21/05 06:45
copumpkinif I broke it up like a real programmer would do21/05 06:46
copumpkinit'd be nicer21/05 06:46
djahandarieCan't you draw it in a pentagon shape or something? :P21/05 06:46
copumpkinalright, I pushed the massive beast21/05 06:48
* xplat beholds!21/05 06:53
copumpkinhmm21/05 07:10
djahandarieLet's see if I can get Agda working21/05 07:12
djahandariedarcs version?21/05 07:12
copumpkinhackage version works fine21/05 07:14
copumpkinit's what21/05 07:14
copumpkinI'm on due to the last bug21/05 07:14
djahandarieWill just use darcs so I don't need to bother switching to it later which I will probably eventually feel like doing21/05 07:15
djahandarieEspecially if I ever want to hack on Agda itself21/05 07:15
copumpkinsure21/05 07:15
copumpkinit honestly doesn't take that long to compile :)21/05 07:15
copumpkinI've recompiled it a couple of dozen times at least21/05 07:15
djahandarieMaybe I'll try out the Epic backend while I'm here21/05 07:16
djahandarieOh ffs, my connection to hackage.haskell.org is lagged21/05 07:16
djahandarieGod damn it21/05 07:16
copumpkinlol21/05 07:16
djahandarieIt'd be nice if downloading and compiling were run concurrently in cabal21/05 07:17
djahandariehaskell-src-exts is lighting my damn computer on fire. 70C core. :(21/05 07:20
djahandarieAt least it's not as bad as my laptop which hits 90C from browsing the internet21/05 07:21
djahandarie...I should really figure out how to fix that before I go to oregon21/05 07:22
copumpkin:)21/05 07:22
copumpkinprobably21/05 07:22
* copumpkin goes to bed21/05 07:23
djahandarieShould probably do the same here. Night21/05 07:24
augurhmm21/05 09:21
auguroh man21/05 11:22
auguri love agda21/05 11:22
auguri mean, my proofs are ugly and big and bulky21/05 11:22
augurbut still21/05 11:23
xplatwith my new 'glue' primitive i'm down from 1558m to 1244m on a fresh (pentagonless) load and i only applied it to one proof21/05 16:02
xplatif i apply it more liberally and break out AbstractProducts and pentagon into their own files this should become quite usable21/05 16:05
xplatapplied to a second proof, loading takes 1149m, and that's even though i had a scope error the first time i tried loading it and didn't restart after21/05 16:18
xplatwtf, pentagon alone is up to 1656m even after i tried optimizing it21/05 18:15
xplatand not done yet either21/05 18:15
xplatprevious iteration got over 2500m21/05 18:16
xplatwell, it loads in 281m without the proof, i guess that's something21/05 18:19
copumpkinxplat: cool21/05 20:52
copumpkinapart from the huge pentagon21/05 20:52
copumpkinif you feel like trying a completely different approach I'm not attached to that monster in any way :)21/05 20:52
xplatcopumpkin: the new version of the pentagon module just loaded in about 900m and shrunk to 706 afterward21/05 22:50
copumpkinoh wow21/05 22:50
copumpkinwhat did you do?21/05 22:50
xplatbroke it up and replaced several common subexpressions with abstracts21/05 22:51
copumpkincool21/05 22:51
xplatso basically pruning duplicated large types from both the tops and bottoms of the trees21/05 22:51
xplathow do i make all this intermediate-step stuff private?21/05 22:52
xplati don't really want it coming out and bloating the .agdai21/05 22:53
xplatsince most of it is not even really referenced anywhere outside code could see it21/05 22:54
copumpkinmake it a private module, I think?21/05 22:59
xplatenh, for now it's okay21/05 22:59
xplatloaded Cartesian in the same agda in 1313m or so21/05 22:59
augurcopumpkin! \o/21/05 22:59
xplatthis is probably sufficient to not kill people's machines21/05 23:00
copumpkinawesome :)21/05 23:00
copumpkinaugur: hi :)21/05 23:00
augurcopumpkin: hows life21/05 23:00
augurhttp://en.wikipedia.org/wiki/VY_Canis_Majoris21/05 23:01
copumpkingot some nasty cough-like thing and feel like poop21/05 23:01
augurBOW BEFORE YOUR GOD21/05 23:01
xplatnah, looks like he didn't show up21/05 23:09
xplatwas supposed to be here by 6PM21/05 23:10
copumpkindamn21/05 23:10
xplatnew Cartesian, alternate Globe, and support modules pushed21/05 23:11
copumpkincool21/05 23:15
starcloudedhello everybody21/05 23:25
* copumpkin decided to try to make another monoidal category :O21/05 23:36
copumpkincause I'm a masochist?21/05 23:38
xplatO.O21/05 23:39
xplatwhich one?21/05 23:39
copumpkinendofunctors :P21/05 23:39
xplatmasochist.  definitely.  :)21/05 23:39
xplathowever, i do need that one for my monadoid project21/05 23:40
copumpkinmaybe I should wait to get myself a heftier computer21/05 23:40
copumpkinI sort of doubt it'll be terribly hard, but it'll probably be painful performance-wise21/05 23:41
copumpkinnone of these proofs are very hard :P21/05 23:41
xplatdid you look at the new pentagon proof?21/05 23:42
copumpkinnot yet, will do that now21/05 23:43
copumpkinlet's see if it actually typechecks on my machine too :)21/05 23:43
xplatthose techniques worked REALLY well for performance ...21/05 23:43
copumpkingreat21/05 23:43
copumpkinso a nice mix of abstract and being clever?21/05 23:43
xplatheh, it wasn't that clever21/05 23:44
xplata lot of it was just stuff like 'don't do two parallel proofs inside a conj\_2, make them lemmas instead'21/05 23:44
copumpkinwait, you didn't change Cartesian.agda?21/05 23:44
copumpkinoh yeah, I was thinking of that while I was doing it21/05 23:45
xplati did change Cartesian21/05 23:45
xplatbut not the proofs in it21/05 23:45
xplatwell, i lie.21/05 23:45
xplati changed the two assoc-commute squares21/05 23:45
copumpkinhttp://snapplr.com/175n21/05 23:45
copumpkindid you forget to commit changes to it?21/05 23:45
xplater21/05 23:46
xplatyes21/05 23:46
xplatyou can check the pentagon without it though21/05 23:46
xplatpushed21/05 23:47
copumpkincool21/05 23:47
copumpkintypechecking now :)21/05 23:50
copumpkinamazing21/05 23:51
copumpkinxplat++21/05 23:51
copumpkin    .π₂∘bigmess : ∀ {A B C D} → π₂ ∘ bigmess {A} {B} {C} {D} ≡ π₂21/05 23:52
copumpkin:P21/05 23:52
xplati tried to come up with better names, but i was blanking on concise descriptors21/05 23:53
copumpkinnow we just need closed categories21/05 23:53
copumpkinand then we can have the real deal CCCs :P21/05 23:53
copumpkinI keep seeing Fins in my goals :o21/05 23:55
copumpkinwhere'd you inject your power stuff, just out of curiosity?21/05 23:55
copumpkinoh in monoidal :)21/05 23:55
xplatyep21/05 23:55
copumpkincool21/05 23:55
copumpkinoh the monoidal helpers are so clean21/05 23:56
xplatyeah.  toward the end of working on it i was starting to despair, but there's only one single place left in that whole file where it's not exactly as i dreamed21/05 23:57
xplatwhich is the type (not the definition) of \alpha-over21/05 23:58
xplatand even that isn't too bad21/05 23:58
copumpkinI like it21/05 23:58
copumpkinwhat would you prefer there?21/05 23:58
xplati'd prefer not to have to use the special reduce2\^r21/05 23:59
--- Day changed Sun May 22 2011
copumpkinah22/05 00:00
xplatand just write (F1 \ox (F2 \ox F3)) somehow22/05 00:00
xplatbut it's not going to happen22/05 00:00
copumpkin:)22/05 00:00
xplati'm pretty happy just to get all those preassocs that were littering the file reduced to one place22/05 00:01
copumpkinyeah22/05 00:03
xplati wonder if equational reasoning should actually have _\d\<_>_ and _\u\<_\>_22/05 00:10
xplatwhere the arrow shows the direction in which the rewrite applies22/05 00:10
copumpkinthat's a handy idea22/05 00:10
xplatthe explicit syms all over get pretty distracting22/05 00:10
copumpkinyeah, I agree22/05 00:10
copumpkinI'd like that22/05 00:10
auguroh thank god im back online22/05 00:14
dolioStarting to get the shakes?22/05 00:14
auguryeah :(22/05 00:15
augurso22/05 00:41
augurare there any ways to reason about inhabitance and have that be part of the type constraints?22/05 00:42
copumpkin?22/05 00:42
augurwell like22/05 00:43
augurif i have a function X -> Y22/05 00:43
augurand another function Y -> X22/05 00:43
augur(well, so basically if i have X <-> Y)22/05 00:43
augurand i can show that X -> Y is the empty function22/05 00:44
xplathaving a function each way corresponds to logical equivalence in curry-howard22/05 00:44
augurthis should let me know that X is empty, and conversely, that Y is empty22/05 00:44
xplatso having those two functions is the same as knowing X is inhabited iff Y is22/05 00:44
augurxplat: indeed!22/05 00:45
xplatamong other things, that means that if you can exhibit a function X -> \bot, you can also exhibit a function Y -> \bot22/05 00:47
augurbut im curious if theres a way to enforce this in agda's type system22/05 00:47
xplatin what way is it not already enforced?22/05 00:47
augurxplat: well, i can prove that f : X -> Y must be the empty function in one place22/05 00:48
augurbut i can use it somewhere else without X being empty22/05 00:48
xplat??22/05 00:48
augurok well22/05 00:48
augurso what im doing is something like this:22/05 00:48
augurf : F x -> G22/05 00:49
augurand im defining F as well22/05 00:49
auguri can prove F x is empty22/05 00:49
augurat least as a consequence of f being the empty function22/05 00:49
augurbut i can define F x to be whatever22/05 00:50
xplata definition like f () won't compile unless agda already knows, from other considerations, that F x is empty22/05 00:51
auguryes well22/05 00:52
augurfg : F x <-> G = F x -> G & G -> F x ;  snd fg is easily proven to be the empty function22/05 00:53
augurso either fst fg is empty as is F x, or fst fg is undefined22/05 00:54
augurmy choice, if F x is also as of yet unspecified22/05 00:54
xplatthere is no undefined in agda, so ...22/05 00:54
augurso i should be able to force fst fg to be defined22/05 00:54
xplatalthough there are postulates :)22/05 00:55
augurxplat: sure there is, but it would just mean that fg is empty22/05 00:55
xplatfst of an empty product isn't undefined22/05 00:55
auguri mean22/05 00:55
augureither i can define fst fg, in which case it must be the empty function, and F x ~ \bot22/05 00:56
auguror i can let F x /~ \bot22/05 00:56
augurin which case i shouldnt be able to define fst fg22/05 00:56
xplatit sounds like what you are looking for is the law of the excluded middle22/05 00:56
augurbut its purely consequence of the fact that im constructing F x -> G & G -> F x, and ive shown already that G -> F x and also G are both empty22/05 00:57
copumpkindpiponi: how's it going!22/05 00:57
xplat[if G is empty then G -> F x is not empty]22/05 00:57
copumpkinbut if you've shown that G -> F x is empty, then you can't hope to construct that &22/05 00:58
augurxplat: the empty function, not an empty type22/05 00:58
xplatG -> F x is not a function, it's a type22/05 00:58
copumpkintwo uses of empty in one instantiation of the word "Empty" :)22/05 00:58
augurfst fg, sorry22/05 00:58
augurgosh xplat you're such a robot :|22/05 00:59
augurcopumpkin: indeed!22/05 00:59
xplatan epic-level pedant22/05 00:59
augurxplat: ;)22/05 00:59
xplati'm actually being pedantic in this case because if you mix up types and functions or the two senses you are using of 'empty' you will seriously get very confused22/05 01:00
auguranyway you get me point, right22/05 01:00
auguri can show over here that some type must be empty22/05 01:00
augurby the requirement that functions are total22/05 01:01
augurbut the functions are also empty functions22/05 01:01
xplatyou should be able to show (G <-> F x) -> ¬ G -> ¬ F x22/05 01:02
xplatand also ¬ G -> F x -> ¬ (G <-> F x)22/05 01:03
augurhm22/05 01:03
augurim not entirely sure i follow22/05 01:04
xplatbut you can't show ¬ G -> Either (¬ F x) (¬ (G <-> F x))22/05 01:04
dolio(G <-> F x) -> (¬ G <-> ¬ F x) even22/05 01:04
augurhm22/05 01:04
augurno i think thats fine22/05 01:05
auguri can provide G -> F x22/05 01:05
augureh22/05 01:05
augurhm22/05 01:05
augurbut i mean22/05 01:05
auguri want this to be enforceable by the type system22/05 01:06
dolioWant what to be enforceable?22/05 01:07
augurdolio: ^22/05 01:07
dolioI read all that.22/05 01:07
augurwell then!22/05 01:07
xplatwhat you can do is just22/05 01:07
copumpkinaugur: what statement would you like to make in types?22/05 01:07
xplatinstead of just writing a function G -> F x that happens to imply by its form that G is empty22/05 01:08
augurcopumpkin: enforce that F x must be empty when i define it22/05 01:08
xplatwrite a function from G to \bot22/05 01:08
augurxplat: well, showing that G is empty is easy enough22/05 01:08
copumpkinSigma (A -> B) (\F -> forall x. \neg (F x))22/05 01:09
copumpkinor bind x where you need it22/05 01:09
xplataugur: you have to define F x before you can define a function F x -> G22/05 01:10
augurxplat: ahh but you see thats the thing22/05 01:10
augurthe idea is22/05 01:10
xplatso that constraint never has the information to come into effect22/05 01:10
augurG -> F x is empty22/05 01:10
copumpkinan empty type or an empty function?22/05 01:10
augurand since im attempting to construct F x -> G22/05 01:10
auguri can only do that if F x is empty22/05 01:10
augur(the function is empty, sorry)22/05 01:10
augurso i have a choice, either be prevented from defining F x -> G because F x is inhabited22/05 01:11
auguror choose F x to be uninhabited22/05 01:11
augurin which case i can show f : F x -> G is the empty function22/05 01:11
copumpkinor the identity function! ;)22/05 01:11
xplatif F x is inhabited and G is not, you will be unable to define a type-correct function from F x to G22/05 01:12
augurcopumpkin: which would be the empty function, in this case!22/05 01:12
augurxplat: precisely22/05 01:12
augurso the only way to define a type correct function is for F x to be uninhabited!22/05 01:12
xplatright22/05 01:12
augurthats what i want to be able to enforce -- i want to be able to know before i define F x that it must be empty22/05 01:13
augurnot by reasoning outside Agda but within agda22/05 01:13
xplatbut Agda can't stop you from trying in either case, because F x might be uninhabited even though it looks like it might be inhabited22/05 01:13
xplatlike, you might define F x to be 'even numbers greater than 2 that are not the sum of two primes'22/05 01:14
augurhmm22/05 01:14
augurok22/05 01:14
xplatso agda can't in general tell which to stop you from doing until you've gone arbitrarily far in your development of the type and function22/05 01:15
copumpkinso why not a sigma?22/05 01:16
copumpkinthat carries a proof that F x is uninhabited?22/05 01:16
copumpkinor just carry a proof of it?22/05 01:16
copumpkinproof : (G : Set) (F : ... -> Set) -> (x : ...) -> (pf1: not G) -> (pf2 : not (F x)) -> (G -> F x & F x -> G)22/05 01:19
copumpkinit's trivial then22/05 01:19
augurcopumpkin: because part of the point is that F x is as of yet not defined, its just a goal22/05 01:24
augurso the point is to be able to write some stuff over here that forces me to write some other stuff over there22/05 01:24
augurie22/05 01:24
copumpkinoh22/05 01:25
auguri dont know what F x is, but i can discover that it must be empty if i want one of these things22/05 01:25
augurso i guess ill have to make it empty22/05 01:25
copumpkinso you have G and x?22/05 01:25
auguryes indeed22/05 01:25
copumpkinand you need to define F and that & expression?22/05 01:25
augurwell, lemme show you the code, ey?22/05 01:25
augurso you can get a sense of what im doing22/05 01:25
copumpkina sigma should work fine here22/05 01:25
augurcopumpkin: https://github.com/psygnisfive/algebraic-syntax/blob/master/CCommand.agda22/05 01:27
augurthe definition of cc-comb, specifically, of the return value _cc'_, is whats at issue22/05 01:27
augurim probably using a horribly ugly style that obfuscates the correct solution, but22/05 01:28
augurer, _cc''_ sorry22/05 01:28
augursome cases of _cc''_ are \bot, because otherwise it would be impossible to define p2 : IsCCommandRel sdt2 _cc′′_ for22/05 01:28
augurit22/05 01:28
copumpkinomnom : (G : Set) (x : ℕ) → (pf : ¬ G) → (s : Σ (ℕ → Set) (λ F → ((G → F x) × (F x → G)))) → ¬ (proj₁ s x)22/05 01:31
copumpkinthat seems like what you want22/05 01:31
augurok, now how do i want that22/05 01:32
augur:P22/05 01:32
copumpkinomnom : (G : Set) (x : ℕ) → (pf : ¬ G) → (s : Σ (ℕ → Set) (λ F → ((G → F x) × (F x → G)))) → ¬ (proj₁ s x)22/05 01:33
copumpkinomnom G x pf (F , G→Fx , Fx→G) = λ wtf → ⊥-elim (pf (Fx→G wtf))22/05 01:33
copumpkin"if you can give me an F such that you can give me G -> F x and F x -> G, then F must be empty22/05 01:34
auguroh i see ok22/05 01:34
copumpkinor rather, F x must be empty22/05 01:34
augurim not sure how i'd use that tho22/05 01:35
copumpkinsorry, haven't looked at your file yet22/05 01:35
copumpkindoing it now22/05 01:35
copumpkinaah22/05 01:35
copumpkinaaagggh22/05 01:35
augur:x22/05 01:35
* copumpkin doesn't know what any of this means :P22/05 01:35
augur:22/05 01:36
augur:P22/05 01:36
augurthe real point, copumpkin, is that cc-comb takes two structures, sdt0 and sdt122/05 01:36
augurand two functions over them22/05 01:36
augur_cc_ and _cc'_22/05 01:36
augurand proofs that each function has some property IsCCommandRel22/05 01:36
augurand it provides a new function _cc''_ over the combination of sdt0 and sdt122/05 01:37
augursuch that _cc''_ is also IsCCommandRel22/05 01:37
auguryou could imagine alternatively something like22/05 01:37
augurive got two sets and some linear orderings over them22/05 01:38
auguri can combine the linear orderings to get a linear ordering over the union of the sets22/05 01:38
augurin this case its not sets and linear orderings, however22/05 01:38
augurthe issue is to discover the definition of the combination22/05 01:39
augurbased on the properties that it must have22/05 01:39
copumpkindoes currying make it any clearer how you'd use it?22/05 01:41
copumpkinomnom : (G : Set) (x : ℕ) → (pf : ¬ G) → (F : ℕ → Set) → (thingy : (G → F x) × (F x → G)) → ¬ F x22/05 01:41
copumpkinomnom G x pf F (G→Fx , Fx→G) = λ wtf → ⊥-elim (pf (Fx→G wtf))22/05 01:41
augurno :P22/05 01:41
copumpkinI guess the point is that if you just have22/05 01:42
copumpkinomnom : (G : Set) (x : ℕ) → (pf : ¬ G) → (F : ℕ → Set) → ((G → F x) × (F x → G))22/05 01:42
copumpkinyou can't write the function22/05 01:43
augur?22/05 01:43
copumpkinthat seemed to be the original question you were asking22/05 01:43
copumpkinfor something like that22/05 01:43
augurmaybe!22/05 01:43
copumpkinbut it can't be done22/05 01:43
copumpkinwithout the knowledge of F22/05 01:43
augurwell, i mean, its undeniable that if f : G -> F is an empty function22/05 01:44
augurand im also trying to construct g : F -> G22/05 01:44
augurand i dont know what F is22/05 01:44
copumpkinsure, but you know nothing about F x22/05 01:44
augurthen i have a choice22/05 01:44
copumpkinyou don't22/05 01:44
copumpkinthe caller gets to pick F22/05 01:44
augurofcourse i do22/05 01:44
augurno no22/05 01:45
copumpkinthat's saying forall F22/05 01:45
augurlook at the source22/05 01:45
augurF is what im defining22/05 01:45
copumpkinI can't even figure out what part of the source corresponds to your abstract question :P22/05 01:45
augurcopumpkin: _cc''_ ~ F22/05 01:46
augurp2 : ... -> x cc' y <-> G22/05 01:46
copumpkinah22/05 01:47
augurx cc'' y rather22/05 01:47
copumpkinso if you're picking the F, I'm not sure what the problem is22/05 01:49
augurcopumpkin: the problem is i'd like to be able to _prove_ that the choice is what it is!22/05 01:49
auguri can conclude that this is so _outside_ of agda22/05 01:49
augurbut i'd like to know that agda itself can tell me that the choice is precisely that22/05 01:50
copumpkinthen you'd write a statement a bit like my omnom above22/05 01:50
augurhm. ok22/05 01:50
copumpkinor further22/05 01:50
copumpkinmnom : (G : Set) (x : ℕ) → (pf : ¬ G) → (F : ℕ → Set) → (thingy : (G → F x) × (F x → G)) → (forall x. F x == G x)22/05 01:51
copumpkinoh crap22/05 01:51
copumpkinomnom : (G : Set) (x : ℕ) → (pf : ¬ G) → (F : ℕ → Set) → (thingy : (G → F x) × (F x → G)) → (forall x. F x == H x)22/05 01:51
* augur mnoms copumpkin22/05 01:51
copumpkinwhere H is the version you defined22/05 01:51
copumpkinthat's basically saying22/05 01:51
copumpkin"if you have any other F of the right signature, and can provide a thingy for it, then your F must behave just like my H"22/05 01:51
copumpkinmake sense?22/05 01:52
copumpkinthis is starting to feel a bit categorical :)22/05 01:52
augurhmm22/05 01:53
copumpkinyou basically want to say that your implementation of _cc''_ is the only one possible, right?22/05 01:54
copumpkingiven the other constraints22/05 01:54
augurinfact i know that for any two c-command relations over the same tree22/05 01:55
augurthey're observationally equivalent22/05 01:55
copumpkinah22/05 01:57
copumpkinanyway, I think you want what I said22/05 01:57
copumpkinbut it's hard to be sure :)22/05 01:58
augur:p22/05 01:58
augurso you know of any techniques for doing this otherwise tho?22/05 01:58
augurdefining things in one place, forcing a definition in another place?22/05 01:58
xplatyou can force F x to be empty22/05 01:59
xplatbut you can't force it to be obviously empty22/05 01:59
copumpkinnot really, although using indexed families more extensively has the effect sometimes of helping you force particular implementations22/05 01:59
copumpkinbased on indices22/05 01:59
copumpkinto the point where with enough index information, agsy can write branches of your functions for you22/05 01:59
xplatthe only way you can force an empty type to be defined in a certain way is if you restrict what you have to work with enough22/05 02:01
augurcopumpkin: ive been looking for good papers on using indices22/05 02:01
copumpkinI'd read lots of stuff by conor and watch his olpss videos22/05 02:01
xplatthat every type you can construct in that situation is either obviously inhabited or obviously empty22/05 02:02
copumpkinoplss22/05 02:02
xplatand only one is the latter22/05 02:02
copumpkinhttp://www.cs.uoregon.edu/Activities/summerschool/summer10/curriculum.html22/05 02:02
xplatoregon programming languages summer school22/05 02:02
augurcopumpkin: conors stuff doesnt seem to actually go deep into the _use_ of indices22/05 02:03
augurit just says hey look indices can be useful22/05 02:03
augurlook at these vectors22/05 02:03
xplatone of the funnest summer schools ever outside of porn22/05 02:03
copumpkinnever done a porn summer school myself22/05 02:03
copumpkinaugur: did you see his afp notes?22/05 02:03
augurcopumpkin: no22/05 02:03
copumpkinhttp://strictlypositive.org/epigram-notes.ps.gz22/05 02:04
copumpkinthey're in epigram but the translation should be fairly obvious22/05 02:04
auguri rather like epigram actually22/05 02:05
xplatme either but i had to say that.  it's in my contract.22/05 02:05
copumpkineven better22/05 02:05
copumpkinlol22/05 02:05
augurxplat: what22/05 02:07
copumpkinxplat is a pornstar22/05 02:07
auguroh ok22/05 02:07
djahandariexplat, have you gone to one of them or just seen the videos?22/05 02:08
xplatoplss?  sadly, just seen the videos22/05 02:09
copumpkinoh, I thought djahandarie was talking about porn22/05 02:09
augurcopumpkin: what i dislike about the mcbride videos22/05 02:20
auguris that i cant see the damn slides22/05 02:20
augurcopumpkin: we should collaborate on a minor little project!22/05 02:28
copumpkinaugur: I already have a bajillion projects of varying sizes that I'm working on :/22/05 02:30
augurlame22/05 02:30
augurwell we should do it anyway22/05 02:30
augurthe project will be to try to develop a framework for doing definition discovery from propositional constraints! :D22/05 02:31
augurmaybe not one in agda, tho it'd be nice22/05 02:31
copumpkin:)22/05 02:41
auguris that a good smile or a bad smile22/05 02:41
copumpkinwell, I still have no time :P22/05 02:42
augur:(22/05 02:42
augurim going to finish reading this mcbride paper22/05 02:42
augurwatch the new doctor22/05 02:42
augurand then think really hard22/05 02:42
copumpkinnew doctor?22/05 02:43
augurdoctor who!22/05 02:43
augurnew episode tonight22/05 02:43
copumpkindoctor who?22/05 02:45
copumpkin:P22/05 02:45
augurcopumpkin: :|22/05 02:45
auguri will murder you22/05 02:45
copumpkinsorry22/05 02:46
augurhey when is hac phi22/05 02:46
augurahh late july22/05 02:46
auguri shall try to get there!22/05 02:46
augurhang out with byorgey :T22/05 02:46
augurand you apparently!22/05 02:47
djahandarieaugur, aren't you already at upenn?22/05 02:48
augurdjahandarie: no, thats byorgey22/05 02:48
augurim at umd22/05 02:48
djahandarieAh22/05 02:48
auguralso apparently its dmwit22/05 02:48
djahandarieOne day something interesting will happen in Connecticut and then I'll have my claim to fame22/05 02:49
augurdjahandarie: lets make something happen in connecticut then!22/05 02:49
djahandarieHaskellConn!22/05 02:50
auguri was thinking djahandarieConn22/05 02:50
djahandarieLearn all about djahandarie?22/05 02:51
augurhow else will you become famous?!22/05 02:51
auguror once you ARE famous, youll need to answer questions form your adoring fans!22/05 02:51
xplati've made a few modifications to equational reading22/05 02:51
augurwhat better way than a conn con?22/05 02:51
augurxplat: link22/05 02:51
xplatcurrently rebuilding up to the pentagon just to make sure nothing broke22/05 02:52
xplat*equational reasoning22/05 02:52
djahandarieHeh, I read that as equational reasoning anyways22/05 02:52
xplatthat's because you used equational reading22/05 02:52
auguractually its because he used a greedy probabilistic parser22/05 02:54
augurbut whatever22/05 02:54
xplataugur: keep that up and you can become an epic-level pedant like me22/05 02:54
augurxplat: when it comes to linguistic issues im way beyond you22/05 02:54
xplata fair point22/05 02:55
auguris the agda code capable of being wrapped in an editor?22/05 03:13
auguri mean, something custom, not emacs22/05 03:13
xplattheoretically you could do it the same way emacs does22/05 03:14
augurhm.22/05 03:14
xplatopen an agda process in ghci, or wrapped in a custom server, and communicate with it22/05 03:15
augurah yes ok22/05 03:15
augurcause i find emacs painful22/05 03:15
auguri'd like to have a better way of laying out the relevant windows22/05 03:15
copumpkinxplat: I was thinking of making a module in category with the hom setoid reasoning stuff in it, and maybe even the equiv stuff22/05 03:16
copumpkinso you can avoid opening that shit for every proof22/05 03:17
j__someone could help with the with the definitions of this function less-Length : (n m : ℕ) → suc m ≤′ n?22/05 03:54
copumpkinit's false22/05 03:56
copumpkinthat says, for all naturals n and m, suc m <=' n22/05 03:56
j__so it cant be done?22/05 03:57
copumpkinno22/05 03:57
copumpkinin fact, you could prove its negation22/05 03:57
augurj__: less-Length 0 022/05 03:58
djahandarieWhat's <=' ?22/05 03:58
j__data _≤′_ (m : ℕ) : ℕ → Set where   ≤′-refl :                         m ≤′ m   ≤′-step : ∀ {n} (m≤′n : m ≤′ n) → m ≤′ suc n22/05 03:58
j__any ideas?22/05 04:02
copumpkinas I said, it can't be done22/05 04:02
j__ok thanks22/05 04:03
copumpkinbut it's called less-Length22/05 04:03
copumpkindid you just screw up the paste?22/05 04:03
copumpkinLength might suggest there's a list or something involved22/05 04:03
j__yes there is a List involved, the thing is that I am trying to write a well-founded induction on a list length using the operator 'is less than'22/05 04:05
copumpkinfair enough22/05 04:05
copumpkinbut that type doesn't say what you want it to say22/05 04:05
copumpkinit just says "pick any two numbers. the first one is less than the second one"22/05 04:06
copumpkinor whatever order22/05 04:06
j__this is the type22/05 04:07
j__indLength-< : (P : List ℕ → Set) →(∀ xs → (∀ ys → (length ys) <′ (length xs) → P ys) → P xs) →∀ xs → P xs22/05 04:07
copumpkinah, that's more like it22/05 04:07
copumpkinhave you seen eric mertens' slides about well-founded recursion?22/05 04:08
j__the thing is that I am trying to do all the quicksort example of ANA BOVE and VENANZIO CAPRETTA in the Modelling general recursion in type theory, without the postulate allQsAcc ∈ (zs ∈ List(N))qsAcc(zs)22/05 04:15
j__but I am stuck in the definition of indLength-<22/05 04:17
Saizanwhy without allQsAcc? it should be provable22/05 04:20
Saizanthough it depends on the definition of qsAcc22/05 04:21
j__yes it does, instead of doing this example with the postulate option I am trying to prove that the quicksort algorithm is total, and for that reason I think I need to create a well founded induction on the list length22/05 04:25
copumpkinyou should check out eric mertens' slides22/05 04:33
copumpkinhttp://code.galois.com/talk/2010/10-06-mertens.pdf22/05 04:33
copumpkinit's all about well-founded recursion to do quicksort in agda :P22/05 04:33
djahandarieWouldn't it be easier to just use treesort instead?22/05 04:35
djahandarieThat way you wouldn't need an external proof22/05 04:36
auguri just got a fortune cookie that said "The weather is wonderful. :)"22/05 04:38
copumpkindjahandarie: yep22/05 04:44
copumpkinbut people seem to love doing quicksort22/05 04:44
dolioThe View from the Left has a treesort, I think.22/05 04:46
dolioAlthough it's still non-trivial.22/05 04:46
xplatcopumpkin: i pushed some new equational reasoning stuff22/05 05:07
xplatcopumpkin: if you can figure out why \<_\>,\<_\> in C.O.BinaryProducts.Abstract is always yellow i'd be grateful22/05 05:08
augurwhyd it get so quiet22/05 07:06
augurstop this22/05 07:06
auguri order you to stop not talking!22/05 07:07
augursomeone should do a SICP type thing but in dependent types22/05 08:55
auguris it possible to have a mixfix operator where the "first" argument is not the linearly first argument?22/05 11:23
augurlike having an infix operator with a parameter in brackets?22/05 11:23
augureg _op[_]_22/05 11:24
Eduard_Munteanuaugur: I think so, application would read like x op[ y ] z22/05 11:24
Eduard_MunteanuBut what do you mean by linearity there?22/05 11:25
augury should be the first arg22/05 11:26
augurso that x and z can depend on it22/05 11:26
augurehh, no, i guess i can just use the infixifier brackets22/05 11:27
Eduard_MunteanuI'm not sure it matters which is the first argument.22/05 11:28
xplatit does matter22/05 13:40
xplataugur: if you want the first argument to depend on the second argument you need to use a syntax declaration22/05 13:41
augurxplat: ok22/05 13:41
xplatsyntax type-signature A x = x ∶ A22/05 13:41
xplatis an example22/05 13:41
xplatin your case you would use do-op y x z = x op[ y ] z22/05 13:42
copumpkinxplat: what do you mean always yellow?22/05 17:37
copumpkinisn't yellow here22/05 17:37
copumpkinooh I like all the new flair22/05 17:38
xplatcopumpkin: when i tried using \<_\>,\<_\> in pentagon it kept turning yellow where a \<\>-cong\_2 would not22/05 18:06
copumpkinweird22/05 18:07
xplatdefining it next to the abstract \<\>-cong\_2 cured the yellow but it's not ideal from a modularity POV22/05 18:08
xplati have a new flairified iteration of the pentagon but it is waiting on a solution to that22/05 18:09
copumpkinah22/05 18:10
copumpkingonna go shower and then maybe to the library, but will look a bit later22/05 18:10
xplathave fun22/05 18:11
copumpkinthanks22/05 18:15
starcloudedhas anyone demonstrates the allQsAcc ∈ (zs ∈ List(N))qsAcc(zs) in the Ana Bove, Modelling general recursion in type theory article, that could help me?22/05 18:49
* djahandarie feels like he's heard this question before22/05 19:18
--- Day changed Mon May 23 2011
augurhm23/05 02:20
augursuppose i know that   r x y iff P(x,y)   where P(x,y) is some type dependent on x and y23/05 02:23
augurpresumably i could just simply define r to be \x y -> P(x,y)23/05 02:26
augurbut23/05 02:26
augurP doesnt hold of everything23/05 02:26
augurso how can i give an inhabitant23/05 02:28
augurhmm23/05 02:28
augureh. to be more specific, i have a type CCR : Tree -> Set ; CCR t = forall (x y : Carrier t) -> ...23/05 02:30
augurand r : CCR t23/05 02:30
augurhow can i define r, if its not supposed to hold of everything in Carrier t?23/05 02:30
Saizanis the ... part fixed?23/05 02:31
augurit probably should be completely definable, right, since r x y will be some proposition stating that something holds23/05 02:31
auguryeah23/05 02:31
augurwhat im currently doing is instead defining what it means to be a CCR, using a biconditional23/05 02:32
Saizanwait, ... is something like blah -> blah -> Set ?23/05 02:33
Saizanactually, it should just be Set since you've used r x y as a proposition23/05 02:34
Saizanso it doesn't matter if it holds for every element or not, you can define Even : Nat -> Set even if Even won't hold for 123/05 02:35
augurIsCCR t r = forall x y -> r x y iff ...23/05 02:35
augurwhich lets me show that something is undefined because the ... -> r x y direction is empty23/05 02:37
augurbut just ... by itself requires that i _give_ undefinabl things23/05 02:37
xplatdata Even : Nat -> Set where { 0-is-even : Even Zero ; +2-stays-even : \all n -> Even n -> Even (suc (suc n)) }23/05 03:05
xplat*Even zero23/05 03:06
copumpkinxplat: ?23/05 03:10
xplatjust illustrating Saizan's comment: 21:42 < Saizan> so it doesn't matter if it holds for every element or not, you can define Even : Nat -> Set even if Even won't hold for 123/05 03:43
copumpkinoh23/05 03:43
augurSaizan, xplat: so the suggestion is that i define CCR t as forall x y -> ... -> Set23/05 03:58
auguror.. ?23/05 03:59
copumpkinaugur: do you understand the inductive family definition of < or <= or other common relations?23/05 04:01
augurmaybe!23/05 04:01
copumpkinhttp://www.cse.chalmers.se/~nad/listings/lib/Data.Nat.html#87523/05 04:02
copumpkinor the one under it23/05 04:02
copumpkinyou could even write something like that for /= on naturals23/05 04:03
copumpkinalthough I haven't seen it before23/05 04:03
augurcopumpkin: hmm.. im not sure i understand23/05 04:04
copumpkinso let's say I wanted to prove that23/05 04:04
copumpkin0 ≤ 523/05 04:05
copumpkinhow would I do that?23/05 04:05
copumpkinthis constructor looks like it'll do the trick, right?23/05 04:05
copumpkin  z≤n : ∀ {n}                 → zero  ≤ n23/05 04:05
copumpkinso23/05 04:05
copumpkinproof : 0 ≤ 523/05 04:06
copumpkinproof = z≤n23/05 04:06
copumpkinthat would be valid23/05 04:06
augurok?23/05 04:06
copumpkinnow say you wanted to prove 1 ≤ 523/05 04:06
augurno i get this23/05 04:06
copumpkinokay23/05 04:07
auguri just dont see how it relates23/05 04:07
copumpkinwell, it's related in the fact that although _≤_ : Nat -> Nat -> Set, 6 <= 3 is still uninhabited23/05 04:07
augurmm well23/05 04:11
auguri know how to define the relation constructively23/05 04:12
augurthats not the issue23/05 04:12
augurthe issue is that i have a propositional definition of what it means to be such a relation23/05 04:12
augurand i want to show that it induces the constructive definition23/05 04:12
augurcopumpkin: o.o23/05 04:36
copumpkinyo23/05 04:37
copumpkinit still sounds vaguely similar to what I was suggesting yesterday23/05 04:37
augurcopumpkin: which was?23/05 04:38
copumpkinyou know23/05 04:38
copumpkinthe "universal" thing I was talking about yesterday23/05 04:38
augur?23/05 04:39
copumpkinprove that if you have something else that satisfies the properties, it must be the same thing as the one you defined23/05 04:39
auguri remember xplat being a pornstar23/05 04:39
copumpkinyeah, that too23/05 04:39
auguryou mean omnom : (G : Set) (x : ℕ) → (pf : ¬ G) → (F : ℕ → Set) → (thingy : (G → F x) × (F x → G)) → (forall x. F x == H x)23/05 04:40
augur?23/05 04:41
copumpkinyeah23/05 04:41
augurhmm but23/05 04:42
copumpkinthink about in general23/05 04:43
copumpkinhow would you prove "there is only one X such that Y X"23/05 04:43
copumpkinor "the X that satisfies Y is unique"23/05 04:43
copumpkinmore than even prove it23/05 04:43
copumpkinhow would you state it?23/05 04:43
augurhmm23/05 04:45
augursee the thing is more that like23/05 04:46
auguri dont have a thingy23/05 04:46
augurits the thingy that im trying to construct23/05 04:46
copumpkinyou still need to construct that in some way23/05 04:46
augurindeed!23/05 04:46
xplata constructive proof that a nonconstructive definition is satisfiable is the same thing as a constructive definition, more or less23/05 04:54
auguri do not know that i understand how to do that23/05 04:57
auguri mean23/05 04:57
augurthe intention is not merely to show that the nonconstructive definition is satisfiable23/05 04:57
augurbut that it /induces/ this constructive definition23/05 04:58
auguri mean, i know the constructive definition yes, but the idea is to understand techniques for discovering that it exists at all23/05 05:09
xplatfrom a constructive point of view such techniques are the same thing as proof techniques23/05 05:15
augurwell sure23/05 05:22
augurbut i suppose what i mean is23/05 05:22
augurwell this really is where it has always come down to hasnt it23/05 05:23
auguri feel like there should be some techniques for seeing through to constructiveness of a particular sort rather easily23/05 05:23
auguri dont know23/05 05:23
auguri have star trek to watch :P23/05 05:23
Eduard_Munteanuaugur: make it so o/23/05 05:27
Eduard_Munteanu:P23/05 05:27
Eduard_MunteanuUnfortunately I've seen it all, except the stuff with capt Archer, but I don't feel like watching that.23/05 05:28
augurim watching TNG23/05 05:37
augurim halfway through season 623/05 05:37
augurtho right now im actually watching nemesis23/05 05:37
augurive only seen DS9 in full23/05 05:37
augurive seen parts of each of the others23/05 05:37
augurnemesis is especially stupid23/05 06:43
augurhmm23/05 08:20
auguri feel like the definitions im capable of giving are .. unfortunate23/05 08:20
auguri mean23/05 08:20
augureven tho some function might have cases that are refutable, the fact that you dont have to refute it makes it uneasy for me23/05 08:21
augurwell23/05 08:22
augurit makes me uneasy23/05 08:22
auguri mean, the fact that f : \bot -> \bot ; f x = x is valid makes me unsure how informative a constructive definition is as an insight23/05 08:25
augurhmm23/05 08:29
augurmaybe im wrong23/05 08:29
augurprobably am yes23/05 08:29
augurhmm23/05 08:29
npouillardaugur: there is two (sensible) definitions of f, yours and "f ()"23/05 09:00
npouillard"f ()" is more general since it can receive any type of the form ⊥ → τ23/05 09:02
auguryeah i also realized that since i was defining a biconditional, i'd have to be able to give an element of an empty type, and so it forces me to match the empty type down to ()23/05 09:16
augurbut i also figure theres probably a methodology employable here23/05 09:16
augurwhere like, any time you have a function from a type, you always match the constructors as much as possible23/05 09:16
augurhmm23/05 09:39
auguri wonder23/05 09:39
augurf : (X -> Y) x (Y -> X) ~= f' : XxY -> YxX23/05 09:40
auguri wonder if its possible to define f' instead of f and thereby force the uninhabitedness into one place23/05 09:41
Saizanyou can't get f out of f' in general23/05 10:03
augurSaizan: indeed23/05 10:03
augurim not infact sure that matters in this case, so long as showing that f' is the empty function allows me to conclude that f is too23/05 10:04
augurwell, that one of f must be, anyway23/05 10:04
Saizanif you want to say "Y must be empty when X is" you can just say (X -> ⊥) -> Y -> ⊥23/05 10:22
augurSaizan: mmm.. im just trying to grasp the sort of process im aiming for23/05 10:27
augurbasically im stating what it means to be a certain kind of relation propositionally with a biconditional23/05 10:28
augurr x y <-> some proposition23/05 10:28
augurand im trying to show that this induces a definition for r23/05 10:28
auguri dont know if this is in general possible even, but23/05 10:29
augurin this particular case, actually, r is supposed to be derived from two smaller r-like relations that have the same property23/05 10:30
augurso you can imagine something like23/05 10:30
augurTotalOrder : forall {X} -> Rel X -> Set23/05 10:31
augurand then saying something about how two total orders combine in a particular way to derive a new total order definable in terms of the original two23/05 10:32
augureg if _<=_ : Rel X and _<='_ : Rel Y are total orders, you could derive some _<=''_ : Rel (X + Y) thats the total order over the concatenation23/05 10:33
augurby mapping   inl x <='' inl y   to x <= y ; mapping   inr x <='' inr y   to x <=' y23/05 10:34
augurmapping inl x <='' inr y to \top, and mapping inr x <='' inl y to \bot23/05 10:34
auguror something of that nature23/05 10:34
augurand this should be deducible from the definition of linear orders and the definition of _+_23/05 10:35
augurjust as an example23/05 10:36
auguri went from total order to linear order, sorry23/05 10:37
augurso it should be possible to say, suppose i have _<=_ : Rel X, p0 : IsTotalOrder _<=_, _<='_ : Rel Y, and p1 : IsTotalOrder _<='_, i should be able to give you ep : \ex (Rel (X + Y)) IsTotalOrder23/05 10:38
auguri mean, doing that is relatively easy23/05 10:40
augurbut i feel it should be possible to understand _how_ IsTotalOrder forces the existence of certain definitions23/05 10:40
augurand understanding how the definitions are informative, like f : \bot -> \bot ; f () is informative, but f x = x is not23/05 10:42
augurSaizan: does any of that make sense23/05 10:43
augurhmmmm23/05 11:29
augurSaizan: i think i found the line of reasoning i needed23/05 11:29
augurits just not expressible in agda afaik23/05 11:30
augurgrr23/05 12:27
auguri have yellow and i have no idea why23/05 12:27
augurdamn wtf23/05 13:37
auguri keep getting internal errors from ConcreteToAbstract.hs:34823/05 13:37
augurohh yes i see23/05 13:40
augurhmm23/05 13:45
augurwhat type system lets you type check functions that have case analysis?23/05 13:45
xplater, most of them?23/05 13:48
xplatanything with ADTs, GADTs, Charity's categorical type system, lots of the ones with subtyping ...23/05 13:49
augurxplat: how do you do the case expressions tho?23/05 13:50
xplati'm really not sure what you're asking23/05 13:50
auguror do you just say ok, f : Nat -> T, zero : Nat, so f zero : T, now all i have to do is show that the rhs of f zero = M has type T23/05 13:50
augur?23/05 13:50
auguri mean, its not like lambda terms (traditionally) allow value arguments23/05 13:51
auguri suppose you could have such a thing23/05 13:51
augurproperly, in the type theory23/05 13:51
augurG, * : One |- x : X  =>  G |- \ * -> x : One -> X23/05 13:52
augurG, suc n : Nat |- x : X   =>   \ suc n -> x : Nat -> X23/05 13:52
augurnot implausible, i suppose23/05 13:52
xplatthe essential rule in most type systems that allows for case analysis is or-elimination23/05 13:52
augur?23/05 13:53
xplatmost practical type systems generalize it to n-ary sum elimination or even fuse it with and-elimination to get sum-of-products elimination23/05 13:53
augurexample?23/05 13:54
xplati'm going to eat now but i'll give you a pointer to a pdf with an or-elim rule when i get back23/05 13:55
augurok23/05 13:55
shapr@agda True23/05 16:04
lambdabotUnknown command, try @list23/05 16:04
shaprCould an interactive Agda exist as a lambdabot plugin in the way that > works?23/05 16:05
shaprWhere's the source for Ulf Norrel's Agda tutorial? I'd like to try this interactively...23/05 16:07
Saizanthe agda executable has an --interactive, so yes23/05 16:20
shaprbah humbug, agda is difficult to setup correctly in ubuntu 10.1023/05 16:24
Saizanit's packaged?23/05 16:28
the_fcohello guys, do any of you know why after installing the agda mode emacs hangs each time I open an agda file? (I don't have any fancy ghci installation at all)23/05 22:04
Saizanthe_fco: use C-g to interrupt it and see if there's any error message in the *ghci* buffer23/05 22:05
the_fcooh thx! I have a problem with terminfo and the ncurses library23/05 22:06
Saizanah, the problem is probably that the ncurses .so is a linker script, ghci doesn't handle those yet23/05 22:08
the_fcooh, I see :( yeap, the libncursesw is a linker script indeed23/05 22:10
the_fcocan I replace it for a link to libncursesw.so.5 ?23/05 22:10
Saizanyeah, that should work23/05 22:12
the_fcoSaizan: it seems I can! it is working now, thx23/05 22:13
Saizannp23/05 22:13
the_fcoand by the way, do you know how do I tell the agda-mode to use the std library?23/05 22:14
Saizanyou can set the include path in the customize dialog23/05 22:14
the_fcothx again!23/05 22:19
augurSaizan: are there type theories that dont assume the existance anything that isnt itself definable by construction?23/05 23:29
augurie, normally we say stuff like   data T : Set where ...23/05 23:29
augurbut T itself is just stated to be a set, we havent constructed it23/05 23:30
augurnot in any real sense, anyway23/05 23:30
augurits just a sort of opaque thing23/05 23:31
auguri feel there probably couldnt be, since for any infinite set (and thus any recursive data type) T cant be constructed23/05 23:38
augurso i feel like you have some form of sneaky coinduction going on23/05 23:38
joe6more people than ever on this irc..23/05 23:51
pumpkin:D23/05 23:52
--- Day changed Tue May 24 2011
the_fcobye, VersuS24/05 00:07
augurjoe6: you keep saying that24/05 00:19
augurpumpkin: heyo24/05 00:19
pumpkinyo24/05 00:21
Eduard_MunteanuI wonder if the restriction to Set in datatypes could be eliminated.24/05 00:32
Eduard_MunteanuOr at least relaxed.24/05 00:33
dolioWhat does that mean?24/05 00:42
Saizanaugur: in principle datatypes are just syntactic sugar built on top of propositional equality24/05 00:45
Eduard_Munteanudolio: well you currently can't declare members of arbitrary sets.24/05 00:48
pumpkinso custom universes would actually be sorts?24/05 00:49
pumpkinseems kind of odd somehow24/05 00:49
Eduard_MunteanuWell, you can with postulates but it trips totality checking.24/05 00:50
pumpkinreally? :O24/05 00:50
pumpkinI can postulate something : 5 ?24/05 00:50
* pumpkin never tried that24/05 00:50
Eduard_MunteanuI mean, if you do postulate Foo : \bn, you can still write partial functions.24/05 00:51
Eduard_Munteanupumpkin: that too I think24/05 00:51
pumpkino.O24/05 00:51
pumpkinthank god you're wrong :P24/05 00:51
doliodata Bar : False where Baz : Bar24/05 00:52
pumpkinthat works?24/05 00:53
dolioNo.24/05 00:53
dolioI don't know what that would even mean.24/05 00:54
Eduard_Munteanupostulate Foo : ℕ24/05 00:55
Eduard_Munteanuincrement : ℕ → ℕ     increment zero = suc zero      increment (suc n) = suc (suc n)24/05 00:56
Eduard_MunteanuNow that's partial.24/05 00:56
dolioDon't use postulates.24/05 00:56
Eduard_MunteanuYeah, I know.24/05 00:56
pumpkinwait, why?24/05 00:56
Eduard_MunteanuIt seems like Agda *could* check that.24/05 00:56
Eduard_MunteanuTo be exact, I mean it's partial and Agda doesn't see that, it compiles fine.24/05 00:57
dolioHow do you know it's partial?24/05 00:58
Saizani'm not that convinced it's partial24/05 00:58
pumpkinI don't even see what's wrong with it24/05 00:58
pumpkinI must be particularly slow24/05 00:58
Saizanpumpkin: increment Foo24/05 00:58
pumpkinoh, he didn't say that though?24/05 00:59
Eduard_MunteanuOf course, you might pick on "what's Foo".24/05 00:59
Eduard_MunteanuI could define Foo I suppose.24/05 00:59
Saizanhis point is that it doesn't handle the Foo case24/05 00:59
pumpkinah24/05 00:59
Saizanbut you can actually prove any element of \bn has to be either zero or suc n for some n24/05 00:59
pumpkinpostulate Foo : Nat24/05 00:59
pumpkinpostulate proof : Foo == 324/05 00:59
pumpkin:P24/05 01:00
Eduard_MunteanuHrm, yes, I'm not actually arguing for postulates, but rather for ways of defining such arbitrary sets.24/05 01:01
Eduard_MunteanuYeah you can't actually define a Foo consistently there.24/05 01:01
pumpkinhave you played with custom universes?24/05 01:01
Eduard_MunteanuNope, is that something new in darcs head?24/05 01:02
pumpkinthey're not quite what you want24/05 01:02
* Eduard_Munteanu pulls24/05 01:02
pumpkinnope24/05 01:02
pumpkinthey've been around since the theory was invented, iirc24/05 01:02
pumpkinit's just a "design pattern"24/05 01:02
pumpkin:P24/05 01:02
augurSaizan: do you know of any non-standard models of arithmetic that treat self-containing successors as codata?24/05 01:03
Eduard_MunteanuOh, the power of pi thingy.24/05 01:03
Eduard_MunteanuYeah, I know that.24/05 01:03
Eduard_MunteanuSo I suppose it isn't partial after all, since such a Foo doesn't exist anyway.24/05 01:04
Saizanaugur: no24/05 01:04
dolioIf you want your type to have more constructors, give it more constructors.24/05 01:04
Eduard_MunteanuMeh, that makes it closed.24/05 01:04
dolioIf your type isn't closed, it isn't inductive.24/05 01:06
dolioSo you don't get to write functions by case analysis anymore.24/05 01:06
Eduard_MunteanuHm, I see.24/05 01:07
Eduard_MunteanuI can't complain though, there are ways to get altered sets in Agda. Still, aren't non-CH provers (say those logic frameworks like Isabelle/HOL) more flexible in this regard though?24/05 01:09
dolioOr you have to decide on what the whole universe is before it can be inductive.24/05 01:09
dolioI've never used Isabelle, but if it's anything like defining a type theory in the logical framework, which I have seen done...24/05 01:11
dolioYou just add arbitrary axioms and compute rules, with no verification that anything you're doing is consistent.24/05 01:11
dolioIt's like adding axioms to first-order logic.24/05 01:12
Eduard_MunteanuYeah, I guess so.24/05 01:12
dolioYou can add all the axioms you want, but you may not end up with something consistent.24/05 01:12
Eduard_MunteanuBut I suppose in Agda you've got to go through hoops to define some other logics, no?24/05 01:12
dolioAgda isn't a logical framework.24/05 01:13
Eduard_MunteanuI mean, we know excluded middle is alright, but we don't know about other stuff.24/05 01:13
Eduard_MunteanuYeah, I know, but I mean it doesn't accomodate different logics easily, AFAICT.24/05 01:15
Saizanin twelf, which is a logical framwork, you still do a fairly deep embedding of any theory you want to work with, HOAS and some logic programming features help though24/05 01:15
dolioTwelf is kind of a different way of using a logical framework.24/05 01:15
dolioNot the same as, say, Luo's UTT.24/05 01:16
Saizanah24/05 01:16
Eduard_MunteanuUTT is a bit like Agda with a subtyping nuance, AFAIR, so it's probably not very lean on assumptions about the underlying logics.24/05 01:17
Eduard_Munteanu(if I gathered that right from Ulf's thesis)24/05 01:17
dolioIn the book I'm talking about, UTT is defined as an object language using the logical framework.24/05 01:18
dolioA bunch of axioms (values and compute rules) are added to the LF to define UTT.24/05 01:18
Eduard_MunteanuHrm, so I guess you actually end up writing a typechecker, no?24/05 01:19
dolioUTT as a type theory is fairly similar to Coq.24/05 01:19
dolioMinus Prop, plus impredicative set.24/05 01:19
Eduard_MunteanuYeah, Ulf's thesis is quite confusing if you compare to this day's Agda, it goes on about the subtyping rules involving Set. It seems he changed his mind later.24/05 01:20
dolioBut in that presentation of the LF, you have rules like beta reduction, I think.24/05 01:21
dolioWhereas twelf doesn't even give you the facility to write (\x -> e) e'24/05 01:21
Saizani see24/05 01:21
dolioAnd twelf doesn't let you write compute rules for the things you add.24/05 01:22
Eduard_MunteanuOk, so bottom line is non-CH provers aren't any better :)24/05 01:22
Saizanyeah, it just let you play prolog with the datatypes24/05 01:22
dolioRight.24/05 01:22
dolioWhether they're better depends on what you want to do.24/05 01:23
Eduard_MunteanuI see. It got me thinking when I looked over a paper describing Isabelle/HOL and it had some nice features like rewriting rules.24/05 01:23
dolioIf you want to define your own object type theory, a logical framework of some sort is better.24/05 01:23
dolioIf you want to write programs, something like Agda is probably better.24/05 01:24
Eduard_MunteanuYeah, in that department, definitely.24/05 01:24
Saizanrewriting rules would be nice and are doable, you've to be careful to not kill confluence though24/05 01:28
Saizanor you could go the "modulo theories" route24/05 01:29
Saizanhttp://portal.acm.org/citation.cfm?id=188750124/05 01:31
Eduard_MunteanuConfluence!24/05 01:32
Eduard_MunteanuI'll tell gio about the experts in here :P24/05 01:32
dolioHeh.24/05 01:32
dolioDude, ACM?24/05 01:33
Saizanblame google.24/05 01:34
Eduard_MunteanuWell, googling "Coq Modulo Theory" gives other sources.24/05 01:34
Eduard_Munteanu(the Google Scholar one seems downloadable)24/05 01:34
Eduard_Munteanuhttp://hal.archives-ouvertes.fr/docs/00/49/74/04/PDF/csl-2010.pdf24/05 01:35
j__anyone could help with the definition of this function filter-≤ : (xs : List ℕ) {x : ℕ} → (length (filter (λ x' → ⌊ x' ≤? x ⌋) xs)) <′ (length  xs)?24/05 02:59
xplataugur: i didn't forget about you, but i did forget where to find the paper i wanted to link you24/05 03:17
copumpkinj__: you probably want to use a with block24/05 03:19
copumpkinj__: oh also, it's false24/05 03:20
j__given xs, and xs is a List the length of a xs after applying a filter is less or equal to the original xs, no?24/05 03:22
copumpkinI'd think so24/05 03:22
copumpkinbut agda thinks it's false24/05 03:22
copumpkintrying to figure out why24/05 03:22
copumpkinoh24/05 03:22
copumpkinthat's why24/05 03:22
copumpkin> filter even [2,4,6]24/05 03:23
lambdabot  [2,4,6]24/05 03:23
copumpkinis that < ?24/05 03:23
j__yes24/05 03:24
copumpkinno24/05 03:25
copumpkinit's <=24/05 03:25
copumpkintrying to do well-founded recursion for quicksort?24/05 03:25
djahandarielol24/05 03:26
j__yes24/05 03:26
copumpkinI guess there's a colombian university that teaches agda? :)24/05 03:26
j__yes24/05 03:26
copumpkinfilter-≤ : (xs : List ℕ) {x : ℕ} → (length (filter (λ x' → ⌊ x' ≤? x ⌋) xs)) <′ (1 + length  xs)24/05 03:28
copumpkinyou could do that :)24/05 03:28
j__thanks24/05 03:34
copumpkinit's pretty straightforward once you do that24/05 03:37
copumpkinlet me know if you want any more hints24/05 03:38
Eduard_MunteanuReally? Neat.24/05 03:39
Eduard_MunteanuOh, now I remember seeing something on the wiki.24/05 03:40
copumpkinit feels a bit cleaner to just write filter-≤ : (xs : List ℕ) {x : ℕ} → length (filter (λ x' → ⌊ x' ≤? x ⌋) xs) ≤′ length  xs24/05 03:41
copumpkinbut the proof is no different24/05 03:41
copumpkinmine isn't, at least24/05 03:41
copumpkinEduard_Munteanu: try it! :P24/05 03:41
j__but thing is that I need the resultant of filter-≤  to be (lengthL (filterL (λ _ → A) xs)) <′ (lengthL  xs)?24/05 03:46
copumpkinwell, it's not true24/05 03:46
copumpkinso either exclude empty lists24/05 03:46
copumpkinactualy that doesn't fix it24/05 03:46
copumpkinit's just not true24/05 03:46
copumpkin> length (filter even [2,4,6]) < len