W-types: good news and bad news

March 7th, 2010 by Conor

I thought I’d just collect together some disparate observations about W-types, and their use in encoding other recursive datatypes. My motivation, bluntly, is to point out the inevitable unsuitability of W-types as the basis for recursive datatypes in an implementation of decidable type theories. I don’t want to downplay the conceptual importance of W-types as a uniform basis for recursive structures in an extensional setting. I’m just saying that computers aren’t clever enough to cope all that well with W-type encodings: if we want to make our understanding go, we need to refine it. This is a long post, so if you want the bad news first, skip to the end.

What are W-types?

Martin-Löf identified a general notion of well-ordering — data with a well-founded notion of ‘structurally smaller’. The power of dependent types enabled him to express this parametrically, once for all, rather than by fiddling about with syntactic criteria for acceptable recursive definitions. Here goes (informal notation)

W (S : Set) (P : S → Set) : Set
(s : S) ⊲ (f : P s → W S P) : W S P
Read the rest of this entry »

Quotients

February 8th, 2010 by Conor

EE-PigWeek 4-9 Jan 2010

January 13th, 2010 by Conor

Bidirectional Basics

January 3rd, 2010 by Conor

Epic

December 18th, 2009 by Edwin Brady

2+2=4

December 16th, 2009 by Conor

Autumn Leaves

December 6th, 2009 by Conor

PigWeek: Friday

July 25th, 2009 by Conor

Pigweek: Thursday

July 24th, 2009 by James C

PigWeek: Wednesday

July 22nd, 2009 by Edwin Brady

PigWeek: Tuesday

July 21st, 2009 by pwm

PigWeek: Monday

July 21st, 2009 by Conor

Wrote a parser; implemented λ-calculus again

July 11th, 2009 by Conor

New repo; new Epitome

July 10th, 2009 by Conor

Idiom Brackets, take 1

July 7th, 2009 by Conor

The Strathclyde Haskell Enhancement

July 5th, 2009 by Conor

Higgledy-Piggledy rides again

July 4th, 2009 by Conor

And is this Haskell?

June 30th, 2009 by Conor

Is this Haskell?

June 30th, 2009 by Conor

Time flies like an applicative functor

June 26th, 2009 by Conor