Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

\/ means both"or" and also "union"

12 views
Skip to first unread message

kint...@gmail.com

unread,
May 6, 2017, 12:29:59 AM5/6/17
to

In prolog ,
, '/\' means binary "and"
, '\/' means binary "or"
. e.g. :

?- X is 1 /\ 1 .
X = 1
?- X is 1 /\ 0 .
X = 0
?- X is 1 \/ 1 .
X = 1
?- X is 1 \/ 0 .
X = 1

But , in clpfd
, '/\' means "union" :
, '\/' is nondefined :
, e.g. :

?- X in 1 \/ 2 .
X in 1..2
?- X in 1 /\ 2 .
ERROR!!
DOMAIN ERROR- : 1/\2 not a valid element for clpfd_domain
?-

Is it not the case that "union" is correspondent to "and" ?

Or am I mixing up the logic , such that it DOES make sense for union to mean "or" ?

It seems completely wrong to me that "or' is correspondent to "union" ,
but as alreadty identified here I am a complete idiot so entiorely willing to admit that I am totally mized uyp and exactly backwards .

Thanks !

~~kintalken~~

kint...@gmail.com

unread,
May 6, 2017, 1:46:41 AM5/6/17
to
wikipedia
-->
"
In mathematics, the intersection A ∩ B of two sets A and B is the set that contains all elements of A that also belong to B (or equivalently, all elements of B that also belong to A), but no other elements.
"
.

(pragmatik(intersection(A,B)))
:-
(
A -> B
|
B -> A
) .

% folowing the symbology(syntaktik) of ``∩`` looks like ``/\``

(A /\ B)
:-
(
(pragmatik(intersection(A,B)))
)

wikipedia
-->
"
The union of two sets A ∪ B is the set of elements which are in A, in B, or in both A and B.
"
.

(pragmatik(union(A,B)))
:-
(
A -> true
|
B -> true
) .

% folowing the symbology(syntaktik) of ``∪`` looks like ``\/``

(A \/ B)
:-
(
(pragmatik(union(A,B)))
)
.

to the author of clpfd :

1) did you have to think about this a lot , or was it obvious ?
2) did you use the SYMBOLOGY(i.e. syntaktik emergence of identity) to decide the answer , or was it the SEMANTIK(i.e. expected operational performance) , or was it the PRAGMATIK(i.e. user interface and expectations) , or the MATERIAL (i.e. conformance with the binary operation /\<=>_. , \/<=>\._) ; that you used , as the consideration that you pursued ?

~~kintalken~~

P.S. clpfd is fucking genius . you have never exp[erienced the respect you deserve .
0 new messages