User:Watchduck/Logic

In different universes
1-element universe:

2-element universe:

3-element universe:

4-element universe - first example with 15 minterm relations:

5-element universe:

Parity relations
Usually the question is, if somewhere are no or some elements. But one may also ask, if somewhere is an even or an odd number of elements.

Parity relations have a Hadamard pattern where the others have a Sierpinski triangle.

In a 1-element universe even means 0, and odd means 1:

2-element universe:

3-element universe:

4-element universe:

5-element universe:

Examples
This is a different way to write the same:

This is what the exclusive or excludes: It's not to be confused with: Just another example:

3-ary relations


There are 256 relations of this kind (corresponding to the 256 operations). The 22 relations in the following table are shown in place of their mirrorings and rotations:

Propositional calculus examples: drivers and medics
A proposition is uniquely determined by the set of all cases, in which it is true. This set could be called the proposition's validity set. Two propositions are equal, when they have the same validity set.

The validity set of a negation is the complement of the initial proposition's validity set. So to know the negation of a proposition, one has to know the set of all possible cases.

The set of all possible cases is the validity set of the tautology. It may be denoted $$~\Omega$$. The empty set is the validity set of the contradiction.

Cases that can be the case and propositions that can be said are essentially different objects. (Similar to outcomes and events in probability theory.) When there are n possible cases, there are 2n possible propositions. Among them are n elementary propositions (minterms). They have a 1-element validity set, and thus they are true in exactly one case. (Cases and corresponding elementary propositions are easily mixed up - like outcomes and elementary events in probability theory.)

A single employee
One may be interested, if an employee is a driver or a medic. There are exactly four possibilities (cases), how he can have these qualities or not:


 * Venn1000.svg He is neither D, nor M.
 * Venn0100.svg He is D, but not M.
 * Venn0010.svg He is not D, but M.
 * Venn0001.svg He is D and M.

Exactly one of these statements will be true about a certain employee. In respect to these qualities there are 24 = 16 statements (propositions), one can say about this employee:


 * Venn0000.svg "He is not."   (i.e.: False)
 * Venn1000.svg "He is neither D, nor M."
 * Venn0100.svg "He is D, but not M."
 * Venn1100.svg "He is not M."


 * Venn0010.svg "He is not D, but M."
 * Venn1010.svg "He is not D."
 * Venn0110.svg "He is either D or M."
 * Venn1110.svg "He is not both D and M."


 * Venn0001.svg "He is D and M."
 * Venn1001.svg "He is either both D and M, or neither."
 * Venn0101.svg "He is D."
 * Venn1101.svg "If he is M, then he is also D."


 * Venn0011.svg "He is M."
 * Venn1011.svg "If he is D, then he is also M."
 * Venn0111.svg "He is D or M."  (E.g.: "He must be D or M, otherwise he would not be part of this project.")
 * Venn1111.svg "He is."  (i.e. True, the tautological case)

A group of employees
One may be interested, which of the following statements are true about a certain group of employees:


 * Venn1000.svg "Someone is neither D, nor M."
 * Venn0100.svg "Someone is D, but not M."
 * Venn0010.svg "Someone is not D, but M."
 * Venn0001.svg "Someone is D and M."

These statements don't contradict each other. At least one will be true about a certain group of employees. (Assumed, that the group consists of at least one employee.) There are 15 possible cases:


 * Venn1000.svg All are neither D, nor M.
 * Venn0100.svg All are D, but not M.
 * Venn1100.svg There are D and not-D, which are all not M.


 * Venn0010.svg All are not D, but M.
 * Venn1010.svg All are not D, among them are M and not-M.
 * Venn0110.svg There are D and M, but no one is both.
 * Venn1110.svg No one is both D and M.


 * Venn0001.svg All are D and M.
 * Venn1001.svg All are both D and M, or neither.
 * Venn0101.svg All are D.
 * Venn1101.svg Those who are D are also M.


 * Venn0011.svg All are M.
 * Venn1011.svg Those who are M are also D.
 * Venn0111.svg All are D or M.
 * Venn1111.svg

So there are 215 = 32768 propositions one can say about a particular group of employees:

Examples

 * Relation1111.svg the tautology


 * Relation1011.svg "All D are M."


 * Relation1110.svg "No one is D and M."


 * Relation1010.svg "No one is D."


 * Relation0111.svg "All are D or M."


 * Relation0001.svg "All are D and M."