# User:Watchduck/Logic

## Relations

 Minterm relations (relations that can be the case) (zoom in) Maxterm relations (zoom in)

 Negative statements combined by AND (zoom in) Affirmative statements combined by OR (zoom in)

 Affirmative statements combined by AND (zoom in) Negative statements combined by OR (zoom in)

### In different universes

1-element universe:

 ${\displaystyle ~\land }$ ${\displaystyle ~\Leftrightarrow }$

2-element universe:

 ${\displaystyle ~\land }$ ${\displaystyle ~\Leftrightarrow }$

3-element universe:

 ${\displaystyle ~\land }$ ${\displaystyle ~\Leftrightarrow }$

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

 ${\displaystyle ~\land }$ ${\displaystyle ~\Leftrightarrow }$

5-element universe:

 (zoom in) ${\displaystyle ~\land }$ (zoom in) ${\displaystyle ~\Leftrightarrow }$ (zoom in)

## 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:

 ${\displaystyle ~\land }$ ${\displaystyle ~\Leftrightarrow }$

2-element universe:

 ${\displaystyle ~\land }$ ${\displaystyle ~\Leftrightarrow }$

3-element universe:

 ${\displaystyle ~\land }$ ${\displaystyle ~\Leftrightarrow }$

4-element universe:

 ${\displaystyle ~\land }$ ${\displaystyle ~\Leftrightarrow }$

5-element universe:

 (zoom in) ${\displaystyle ~\land }$ (zoom in) ${\displaystyle ~\Leftrightarrow }$ (zoom in)

### Examples

 In is an odd number of elements. ${\displaystyle \oplus ~}$ In is an odd number of elements. ${\displaystyle \Leftrightarrow ~}$ Either in or in is an odd number of elements.

This is a different way to write the same:

This is what the exclusive or excludes:

In and in is an odd number of elements.

It's not to be confused with:

: In is an odd number of elements.

Just another example:

What's that?

## 3-ary relations

Venn and Euler diagrams
 ${\displaystyle A\subseteq B}$ ${\displaystyle \land ~}$ ${\displaystyle B\subseteq C}$ ${\displaystyle \Leftrightarrow }$ ${\displaystyle A\subseteq B\subseteq C}$ ${\displaystyle \land ~}$ ${\displaystyle \Leftrightarrow ~}$

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 ${\displaystyle ~\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 possiblities (cases), how he can have these qualities or not:

• He is neither D, nor M.
• He is D, but not M.
• He is not D, but M.
• 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:

• "He is neither D, nor M."
• "He is D, but not M."
• "He is not D, but M."
• "He is either D or M."
• "He is D and M."
• "He is D."
• "He is M."
• "He is D or M."   (E.g.: "He must be D or M, otherwise he would not be part of this project.")

### A group of employees

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

• "Someone is neither D, nor M."
• "Someone is D, but not M."
• "Someone is not D, but M."
• "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:

• All are neither D, nor M.
• All are D, but not M.
• There are D and not-D, which are all no M.
• All are not D, but M.
• All are not D, among them are M and not-M.
• There are D and M, but no one is both.
• All are D and M.

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

#### Examples

• the tautology
 with the validity set: { }

• "All D are M."
 with the validity set: { }

• "No one is D and M."
 with the validity set: { }

• "No one is D."
 with the validity set: { }

• "All are D or M."
 with the validity set: { }

• "All are D and M."
 with the validity set: { }