User:Watchduck/Logic

From Wikiversity
Jump to navigation Jump to search

Operations[edit]





Relations[edit]

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[edit]


1-element universe:

Negative statements combined by AND Affirmative statements combined by AND Minterm relations


2-element universe:

Negative statements combined by AND Affirmative statements combined by AND Minterm relations


3-element universe:

Negative statements combined by AND Affirmative statements combined by AND Minterm relations


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

Negative statements combined by AND Affirmative statements combined by AND Minterm relations


5-element universe:

Negative statements combined by AND
(zoom in)
Affirmative statements combined by AND
(zoom in)
Minterm relations
(zoom in)





Parity relations[edit]

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 Multigrade operator XNOR.svg where the others have a Sierpinski triangle Multigrade operator AND.svg.


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

Negative statements combined by AND Affirmative statements combined by AND Minterm relations


2-element universe:

Even combined by AND Odd combined by AND Minterm relations


3-element universe:

Even combined by AND Odd combined by AND Minterm relations


4-element universe:

Even combined by AND Odd combined by AND Minterm relations


5-element universe:

Even combined by AND
(zoom in)
Odd combined by AND
(zoom in)
Minterm relations
(zoom in)



Examples[edit]



In A is an odd number of elements.
In B is an odd number of elements.
Either in A or in B is an odd number of elements.



This is a different way to write the same:




This is what the exclusive or excludes:

In A and in B is an odd number of elements.


It's not to be confused with:

Parity relation Venn ---1.svg: In intersection of A and B is an odd number of elements.


Just another example:

What's that?




3-ary relations[edit]

Venn and Euler diagrams
Relation 1011 1011 (cubic matrix).png

Relation 1011 1011.svg Relation 1011 1011 (bw cube).svg
1011 1011

Relation 1100 1111 (cubic matrix).png

Relation 1100 1111.svg Relation 1100 1111 (bw cube).svg
1100 1111

Relation 1000 1011 (cubic matrix).png

Relation 1000 1011.svg Relation 1000 1011 (bw cube).svg
1000 1011


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:


no and 1 one
Relation 0000 0000 (cubic matrix).png

Relation 0000 0000.svg Relation 0000 0000 (bw cube).svg
0000 0000
Relation 0000 0000 (Euler diagram).svg

Relation 0000 0001 (cubic matrix).png

Relation 0000 0001.svg Relation 0000 0001 (bw cube).svg
0000 0001
Relation 0000 0001 (Euler diagram).svg

7 and 8 ones
Relation 0111 1111 (cubic matrix).png

Relation 0111 1111.svg Relation 0111 1111 (bw cube).svg
0111 1111
Relation 0111 1111 (Euler diagram).svg

Relation 1111 1111 (cubic matrix).png

Relation 1111 1111.svg Relation 1111 1111 (bw cube).svg
1111 1111
Relation 1111 1111 (Euler diagram).svg

2 ones
Relation 1000 0001 (cubic matrix).png

Relation 1000 0001.svg Relation 1000 0001 (bw cube).svg
1000 0001
Relation 1000 0001 (Euler diagram).svg

Relation 0000 0101 (cubic matrix).png

Relation 0000 0101.svg Relation 0000 0101 (bw cube).svg
0000 0101
Relation 0000 0101 (Euler diagram).svg

Relation 0010 0001 (cubic matrix).png

Relation 0010 0001.svg Relation 0010 0001 (bw cube).svg
0010 0001
Relation 0010 0001 (Euler diagram).svg

6 ones
Relation 0111 1011 (cubic matrix).png

Relation 0111 1011.svg Relation 0111 1011 (bw cube).svg
0111 1011
Relation 0111 1011 (Euler diagram).svg

Relation 0101 1111 (cubic matrix).png

Relation 0101 1111.svg Relation 0101 1111 (bw cube).svg
0101 1111
Relation 0101 1111 (Euler diagram).svg

Relation 0111 1110 (cubic matrix).png

Relation 0111 1110.svg Relation 0111 1110 (bw cube).svg
0111 1110
Relation 0111 1110 (Euler diagram).svg

3 ones
Relation 0001 0110 (cubic matrix).png

Relation 0001 0110.svg Relation 0001 0110 (bw cube).svg
0001 0110
Relation 0001 0110 (Euler diagram).svg

Relation 1000 0101 (cubic matrix).png

Relation 1000 0101.svg Relation 1000 0101 (bw cube).svg
1000 0101
Relation 1000 0101 (Euler diagram).svg

Relation 0001 0011 (cubic matrix).png

Relation 0001 0011.svg Relation 0001 0011 (bw cube).svg
0001 0011
Relation 0001 0011 (Euler diagram).svg

5 ones
Relation 0011 0111 (cubic matrix).png

Relation 0011 0111.svg Relation 0011 0111 (bw cube).svg
0011 0111
Relation 0011 0111 (Euler diagram).svg

Relation 0101 1110 (cubic matrix).png

Relation 0101 1110.svg Relation 0101 1110 (bw cube).svg
0101 1110
Relation 0101 1110 (Euler diagram).svg

Relation 1001 0111 (cubic matrix).png

Relation 1001 0111.svg Relation 1001 0111 (bw cube).svg
1001 0111
Relation 1001 0111 (Euler diagram).svg

4 ones
Relation 0001 0111 (cubic matrix).png

Relation 0001 0111.svg Relation 0001 0111 (bw cube).svg
0001 0111
Relation 0001 0111 (Euler diagram).svg

Relation 0010 0111 (cubic matrix).png

Relation 0010 0111.svg Relation 0010 0111 (bw cube).svg
0010 0111
Relation 0010 0111 (Euler diagram).svg

Relation 0011 0011 (cubic matrix).png

Relation 0011 0011.svg Relation 0011 0011 (bw cube).svg
0011 0011
Relation 0011 0011 (Euler diagram).svg

Relation 0011 0110 (cubic matrix).png

Relation 0011 0110.svg Relation 0011 0110 (bw cube).svg
0011 0110
Relation 0011 0110 (Euler diagram).svg

Relation 0101 1010 (cubic matrix).png

Relation 0101 1010.svg Relation 0101 1010 (bw cube).svg
0101 1010
Relation 0101 1010 (Euler diagram).svg

Relation 0110 1001 (cubic matrix).png

Relation 0110 1001.svg Relation 0110 1001 (bw cube).svg
0110 1001
Relation 0110 1001 (Euler diagram).svg

Propositional calculus examples: drivers and medics[edit]

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 .
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[edit]

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:

  • 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
  • Venn1000.svg "He is neither D, nor M."
  • Venn0100.svg "He is D, but not M."
  • Venn1100.svg
  • Venn0010.svg "He is not D, but M."
  • Venn1010.svg
  • Venn0110.svg "He is either D or M."
  • Venn1110.svg
  • Venn0001.svg "He is D and M."
  • Venn1001.svg
  • Venn0101.svg "He is D."
  • Venn1101.svg
  • Venn0011.svg "He is M."
  • Venn1011.svg
  • 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

A group of employees[edit]

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 no 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
  • Venn0001.svg All are D and M.
  • Venn1001.svg
  • Venn0101.svg
  • Venn1101.svg
  • Venn0011.svg
  • Venn1011.svg
  • Venn0111.svg
  • Venn1111.svg


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

Examples[edit]

  • Relation1111.svg the tautology
with the validity set:   { Venn1000.svg Venn0100.svg Venn1100.svg Venn0010.svg Venn1010.svg Venn0110.svg Venn1110.svg Venn0001.svg Venn1001.svg Venn0101.svg Venn1101.svg Venn0011.svg Venn1011.svg Venn0111.svg Venn1111.svg }


  • Relation1011.svg "All D are M."
with the validity set:   { Venn1000.svg Venn0010.svg Venn1010.svg Venn0001.svg Venn1001.svg Venn0011.svg Venn1011.svg }


  • Relation1110.svg "No one is D and M."
with the validity set:   { Venn1000.svg Venn0100.svg Venn1100.svg Venn0010.svg Venn1010.svg Venn0110.svg Venn1110.svg }


  • Relation1010.svg "No one is D."
with the validity set:   { Venn1000.svg Venn0010.svg Venn1010.svg }


  • Relation0111.svg "All are D or M."
with the validity set:   { Venn0100.svg Venn0010.svg Venn0110.svg Venn0001.svg Venn0101.svg Venn0011.svg Venn0111.svg }


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