I have tried and errored a reasonable amount of times

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Sep 4 03:54:04 CEST 2014


Marko Rauhamaa wrote:

> Steven D'Aprano <steve at pearwood.info>:
> 
>> Who uses + for disjunction (∨ OR) and concatenation for conjunction (∧
>> AND)? That's crazy notation.
> 
> That's the classic Boolean algebraic notation. 

Says who? (Apart from you, obviously :-) Since when? I've never seen it in
*any* discussion of Boolean algebra.

Since I answer my own question below (spoiler: George Boole), my questions
are rhetorical.

Mathworld says:

    A Boolean algebra is a mathematical structure that is 
    similar to a Boolean ring, but that is defined using 
    the meet and join operators instead of the usual 
    addition and multiplication operators.

and lists the operators as:

    ^ (logical AND, or "wedge") and v (logical OR, or "vee")

http://mathworld.wolfram.com/BooleanAlgebra.html


Wikipedia lists the operators as 

    And (conjunction), denoted x∧y (sometimes x AND y or Kxy)

    Or (disjunction), denoted x∨y (sometimes x OR y or Axy)

https://en.wikipedia.org/wiki/Boolean_algebra#Operations


So it seems that mathematicians have all but entirely abandoned the old
notation, although they are certainly aware that x∧y is analogous to xy
with both x, y elements of {0, 1}, and similarly for x∨y, although the
analogy is terrible for ∨. 1+1 = 2, not 1. If you perform the addition
modulo 2, then 1+1 = 0, which would make + analogous to XOR, not OR.

I had to go all the way back to George Boole's seminal work "An
Investigation Of The Laws Of Thought" in 1854 to find somebody using that
notation, and he had an excuse, namely he was inventing the subject.

http://gutenberg.org/ebooks/15114

Since Boole isn't with us any more, having died in 1864, my question still
stands: who would be so foolish to use this notation in the 21st century?

Answer: engineers.

http://www.allaboutcircuits.com/vol_4/chpt_7/2.html


-- 
Steven




More information about the Python-list mailing list