[Haskell-cafe] What puts False before True?

Paul Hudak paul.hudak at yale.edu
Thu May 31 23:35:38 EDT 2007


PR Stanley wrote:
>> I think so, too. In Boolean algebra (which predates computers, much less
>> C), FALSE has traditionally been associated with 0, and TRUE with 1. And
>> since 1 > 0, TRUE > FALSE.
> The question, however, still remains: why False = 0 and True 1? I 
> appreciate that it's so in boolean algebra but why? Why not True = 0 
> and False = 1?

Because if you take (&&) to be (*), and (||) to be (+), you get a 
homomorphism between the two resulting algebras (assuming 1+1 = 1).  
That is, if we define:

h(False) = 0
h(True) = 1

then:

h(a&&b) = h(a) * h(b)
h(a||b) = h(a) + h(b)

    -Paul

P.S. Another reason to justify False < True is that show False < show 
True.   :-)



More information about the Haskell-Cafe mailing list