[eeps] : : Proposal for /\ and \/ operators
Raimo Niskanen
raimo+eeps@REDACTED
Fri Feb 27 12:08:02 CET 2009
On Fri, Feb 27, 2009 at 02:09:20PM +1300, Richard O'Keefe wrote:
>
> On 26 Feb 2009, at 11:12 pm, Raimo Niskanen wrote:
>
> >
> >Yes I am quite familiar with /\ being AND and \/ being OR.
> >That is in the basic math courses at University.
> >
> >But I can not make the connection /\ being AND being MIN,
> >\/ being OR being MAX. To me /\ is simply a top i.e MAX,
> >\/ is a bottom i.e MIN.
>
> No, in Boolean algebra you must think of false as being
> LESS than true. The reason that
> x /\ y
> acts like "and" is that it gives you the LESSER of x and y;
> AND is MIN.
> OR is MAX.
You learn something new every day. I managed up to now to not worry
about true and false having a sort order, in fact I assumed
they had no order in boolean algebra, that order was undefined.
>
> 0 /\ 0 = 0 false & false = false
> 0 /\ 1 = 0 false & true = false
> 1 /\ 0 = 0 true & false = false
> 1 /\ 1 = 0 true & true = true
>
> In C, operators that return truth values return 0 for false,
> 1 for true. In Pascal, ord(false) = 0, ord(true) = 1. In
> Ada, the same as Pascal, modulo syntax.
I assumed these were arbitrary choices, or that one language
made an arbitrary choice and then others followed. C had
for a long while 0 as false and anything else as true, so
-1 was as true as 17, but -1 < 0, so (-1 && 0) != (-1 < 0).
In fact I have learned the hard way from C _never_ to
use comparision operators on boolean values.
>
> So your recollection of /\ and \/ should *HELP* you get
> min and max straight because and IS min and or IS max.
> /\ in logic isn't and never was a max.
>
You saw my false assumtions above, all my previous
knowledge counterhelped.
It is unlucky that 1 < 2 and 4 > 3 gives a visual key
but for 1 /\ 2 the same visual key does not apply,
instead you have to use math knowledge not that common
even for an MSEE.
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the eeps
mailing list