Peter Verswyvelen wrote:
> Jerzy wrote:
>> The relational syntax of Prolog is more "universal" than the functional
>> notation, since you have logic variables and logical-non-determinism, and
> 
> Isn't this just because mathematically, a function *is* a relation, but
> not vice versa? A relation being just a subset of a Cartesian product of
> sets, while a function being a special kind of relation for which each
> element in the domain has exactly one image? So relations are inherently
> much more universal than functions, but they are not that practical to
> work with (for a computer and/or human?).

You can as well regard a relation as a special sort of function, i.e. define
relation ~ as a function  A x B -> Bool  by  (a,b) |-> a ~ b.

Cheers
Ben

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to