[Haskell-cafe] FOL

Frank Seaton Taylor knarf at bka-inc.com
Tue Jun 5 12:42:21 EDT 2007


On Tue, 05 Jun 2007, at 00:41, Tony Morris wrote:

> I would like to know if all 16 possible functions that accept two
> boolean arguments have names in First-Order Logic. I know they have
> Haskell function names (e.g. \p -> \_ -> id p, \_ -> \_ -> const  
> True),
> but I'm hoping there is a more general name that is recognised by  
> anyone
> with a feel for logic, but not necessarily Haskell.
>
> I have listed all sixteen of these functions below using Haskell  
> (named
> a to p) along with the name of those that I am aware of having a  
> name as
> a comment.
>
> Thanks for any tips.
>
> {-
>
> p q | a b c d e f g h i j k l m n o p
> 0 0 | 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
> 0 1 | 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
> 1 0 | 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
> 1 1 | 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
>
> -}

Common Lisp has names for them. See:

   http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/ 
node131.html#SECTION001670000000000000000

and then search for

   (boole boole-and x y) == (logand x y)

and look at the table just before that.

---Frank



More information about the Haskell-Cafe mailing list