[Haskell-cafe] Re: Set Operations In Haskell's Type System

John Creighton johns243a at gmail.com
Sun May 9 16:00:39 EDT 2010



On May 9, 4:46 am, wren ng thornton <w... at freegeek.org> wrote:
> John Creighton wrote:
> > On May 6, 4:30 am, Bartek Ćwikłowski <paczesi... at gmail.com> wrote:
> >> 2010/5/6 John Creighton <johns2... at gmail.com>:
>
> >>> "a" isa "d" if their exists a "b" and "c" such that the following
> >>> conditions hold:
> >>> "a" isa subset of "b",
> >>> "b" isa "c"
> >>> "c" is a subset of "d"
> >> This definition doesn't make sense - it's recursive, but there's no
> >> base case, unless this is some kind of co-recursion.
>
> >> Are you sure that "subset" isn't what you really want? With subset you
> >> can already ask questions such as "is tabby cat an animal?". If so, my
> >> code (from hpaste) already has this (iirc isDescendentOf ).
>
> > When I succeed in implementing it I'll show you the result. Anyway,
> > some perspective (perhaps), I once asked, "what is the difference
> > between a subset and an element of a set:
>
> >http://www.n-n-a.com/science/about33342-0-asc-0.html
>
> And it's truly an interesting question. Too bad it didn't get a better
> discussion going (from what I read of it). Though the link Peter_Smith
> posted looks interesting.
>
> > note 1) Okay I'm aware some will argue my definitions here and if it
> > helps I could choose new words, the only question really is, is the
> > relationship isa which I described a useful abstraction.
>
> I think the key issue comes down to what you want to do with it. I'm not
> entirely sure what the intended reading is for "isa subset of", but I'll
> assume you mean the same as "is a subset of"[1]. One apparent side
> effect of the definition above is that it collapses the hierarchy.
>
> That is, with traditional predicates for testing element and subset
> membership, we really do construct a hierarchy. If A `elem` B and B
> `elem` C, it does not follow that A `elem` C (and similar examples). But
> with your definition it seems like there isn't that sort of
> stratification going on. If the requirements are A `subset` B, B `elem`
> C, and C `subset` D--- well we can set C=D, and now: A `elem` D = A
> `subset` B && B `elem` D.
>
> Depending on the ontology you're trying to construct, that may be
> perfectly fine, but it's certainly a nonstandard definition for elements
> and subsets. I don't know if this mathematical object has been worked on
> before, but it's not a hierarchy of sets.
>
> [1] My other, equivalent, guess would be you mean "A isa (powerset B)"
> but avoided that notation because it looks strange.
>
> --
> Live well,
> ~wren
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-C... at haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe
>
> --
> You received this message because you are subscribed to the Google Groups "Haskell-cafe" group.
> To post to this group, send email to haskell-cafe at googlegroups.com.
> To unsubscribe from this group, send email to haskell-cafe+unsubscribe at googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/haskell-cafe?hl=en.

Keep in mind that my recent definition of "is a"

> >>> "a" isa "d" if their exists a "b" and "c" such that the following
> >>> conditions hold:
> >>> "a" isa subset of "b",
> >>> "b" isa "c"
> >>> "c" is a subset of "d"

is distinct from the question I asked a long time ago of the
difference between a set and an element. The question I asked a long
time ago is largely philosophical but can have axiomatic consequences
in set theory. Ignoring the philosophical meanings behind a set, both
the operations of subset and "element of", define a partial order. The
subset relationship seems to define things that are more similar then
the "element of" relationship.



More information about the Haskell-Cafe mailing list