Comments on: Peano induction for binary numbers (bis)http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70
abstracting the pain awayTue, 17 May 2011 07:05:56 +0100hourly1http://wordpress.org/?v=3.0.3By: Conorhttp://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70#comment-15659
ConorMon, 14 Apr 2008 09:28:30 +0000http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70#comment-15659I tried to reply to this a few days ago and something went wrong. Here goes again.
By size, I mean the universe inhabited by the motive of the induction. binPeano quantifies over the motive inside the induction, so elimination over Set(n+1) is required to justify elimination over Set(n). Meanwhile, the Peano family is just an ordinary Set, and it does for all.
I guess I'd also observe that binPeano is a higher-order function full of continuation-passing voodoo, whilst peano and its little friend are first order. Some people love that higher-order stuff, and finality in general, because you can do anything, but I love initiality, because it enables me to see everything.I tried to reply to this a few days ago and something went wrong. Here goes again.

By size, I mean the universe inhabited by the motive of the induction. binPeano quantifies over the motive inside the induction, so elimination over Set(n+1) is required to justify elimination over Set(n). Meanwhile, the Peano family is just an ordinary Set, and it does for all.

I guess I’d also observe that binPeano is a higher-order function full of continuation-passing voodoo, whilst peano and its little friend are first order. Some people love that higher-order stuff, and finality in general, because you can do anything, but I love initiality, because it enables me to see everything.

]]>By: Russell O'Connorhttp://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70#comment-14650
Russell O'ConnorSat, 15 Mar 2008 23:47:45 +0000http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70#comment-14650> worst of all, quite expensive in the size of the inductions involved.
Can you elaborate on this? What is expensive, and how are you measuring the size of inductions?
I find it a little unfair that peano got a helper function, but binPeano has to do all the work itself. More fair would be to say
binPeano (b;1) P p1 ps := ps (binPeano (b;0) P p1 ps)
Of course the body of binPeano (b;0) would have to be given it's own name (binDouble) to make this properly structurally recursive.> worst of all, quite expensive in the size of the inductions involved.

Can you elaborate on this? What is expensive, and how are you measuring the size of inductions?

I find it a little unfair that peano got a helper function, but binPeano has to do all the work itself. More fair would be to say

binPeano (b;1) P p1 ps := ps (binPeano (b;0) P p1 ps)

Of course the body of binPeano (b;0) would have to be given it’s own name (binDouble) to make this properly structurally recursive.

]]>By: Conorhttp://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70#comment-8690
ConorSat, 22 Sep 2007 09:42:17 +0000http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70#comment-8690I don't know why the rss feed only just kicked in. Sorry for the appallingly slow response.
jag, you're absolutely right; I've fixed it.
Russell, Epigram 2's core theory has the restricted kind of inductive families you get in Agda 1, where constructors must target the full range of indices. You're right, with that alone you can't define Peano. However, unlike Agda 1, we also have a propositional equality, and that allows us to simulate full inductive families in a uniform way by adding "Ford equations". So, in this example, we won't say "p1 returns Peano 1", but we will say "p1 returns Peano b for any b you like as long as it's equal to 1". In the source language, we'll sugar away the explicit equation mangling (much as we currently do), so it looks pretty much the way it does now.I don’t know why the rss feed only just kicked in. Sorry for the appallingly slow response.

jag, you’re absolutely right; I’ve fixed it.

Russell, Epigram 2′s core theory has the restricted kind of inductive families you get in Agda 1, where constructors must target the full range of indices. You’re right, with that alone you can’t define Peano. However, unlike Agda 1, we also have a propositional equality, and that allows us to simulate full inductive families in a uniform way by adding “Ford equations”. So, in this example, we won’t say “p1 returns Peano 1″, but we will say “p1 returns Peano b for any b you like as long as it’s equal to 1″. In the source language, we’ll sugar away the explicit equation mangling (much as we currently do), so it looks pretty much the way it does now.

]]>By: Russell O'Connorhttp://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70#comment-8201
Russell O'ConnorTue, 07 Aug 2007 18:36:00 +0000http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=70#comment-8201Epigram 2 won't have inductively defined families, so the family Peano cannot be defined as such. How will this work in Epigram 2?Epigram 2 won’t have inductively defined families, so the family Peano cannot be defined as such. How will this work in Epigram 2?
]]>