Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell: Sets

Name: Anonymous 2015-08-17 18:24

Given a finite Set type (not Data.Set), find a map Set -> Int that is bijective! (Let's try injective first, how would you do that?)

The definition of Set I have in mind is this:
data Set = Empty | Set [Set]
But if you want to use some other equivalent definition go ahead.

Name: Anonymous 2015-08-19 2:35

Quoting 10:(my phone doesn't have them brackets ffs)
The peano arithmetic is an injection from sets to the integers that also has the nice property of translating set-theoretic terms into arithmetic ones. Going the other way you can construct an injection from the integers to finsets. I hadn't though of that, I had found another way myself, I'll post the idea some other time. With that said, how do you go from peano to bijection? I don't think you do.:-)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List