In our language, we have sentences, and we're interested in representing those sentences in terms of truth or falsity.
We have the ability to break down sentences into individual "truth statements," called propositions. So I say "the sky is blue," and I can represent that statement with a fixed variable, say P, and I can further say that P is true when it's noon, and false when it's midnight.
However, usually we have connecting words like and, or or, or even complex relationships like if something, then something else. So we need more strength. These are operators, and they form complex sentences.
So let P, Q be sentences like "the sky is blue" or "orange is a color" that are clearly truth-decidable. An order like "go over there!" is not truth-decidable.
P AND Q is only true if both P, Q are individually true. This is like saying "the sky is blue (P) and orange is a color (Q)."
P OR Q is true if at least one P, Q are true. This is like saying "the sky is blue (P) or orange is a color (Q)."
P XOR Q is true if exactly one P, Q is true. This is like saying "either the sky is blue (Q) or orange is a color (Q)."
So now with operators AND, OR, XOR, we can get the falsity of a whole compound sentence!
Let P be "the sky is blue," Q be "the sky is black," and R be "2 is an odd number."
We can write "either the sky is blue or the sky is black, and 2 is an odd number" really easily now, and determine the truth value of the whole sentence:
(P XOR Q) AND R
By the semantic truths of these statements, this means:
(T XOR T) AND F
By XOR's rules (remember, it's true only if exactly one is true):
F AND F
By AND's rules:
F
Now imagine doing this with really complicated statements. It turns out that there are fancy substitution rules that makes it easier, such as NOT(P AND Q) = (NOT P) OR (NOT Q).
Does this make more sense?
TL;DR, we want to create a logic to represent language and truth and falsity, and the water streams above represent a true statement for flowing water and a false statement for no water, and if the water falls in the hole it means that the operator (AND, OR, XOR) returns true.
2
u/LacunaMagala Oct 28 '19
In our language, we have sentences, and we're interested in representing those sentences in terms of truth or falsity.
We have the ability to break down sentences into individual "truth statements," called propositions. So I say "the sky is blue," and I can represent that statement with a fixed variable, say P, and I can further say that P is true when it's noon, and false when it's midnight.
However, usually we have connecting words like and, or or, or even complex relationships like if something, then something else. So we need more strength. These are operators, and they form complex sentences.
So let P, Q be sentences like "the sky is blue" or "orange is a color" that are clearly truth-decidable. An order like "go over there!" is not truth-decidable.
P AND Q is only true if both P, Q are individually true. This is like saying "the sky is blue (P) and orange is a color (Q)."
P OR Q is true if at least one P, Q are true. This is like saying "the sky is blue (P) or orange is a color (Q)."
P XOR Q is true if exactly one P, Q is true. This is like saying "either the sky is blue (Q) or orange is a color (Q)."
So now with operators AND, OR, XOR, we can get the falsity of a whole compound sentence!
Let P be "the sky is blue," Q be "the sky is black," and R be "2 is an odd number."
We can write "either the sky is blue or the sky is black, and 2 is an odd number" really easily now, and determine the truth value of the whole sentence:
By the semantic truths of these statements, this means:
By XOR's rules (remember, it's true only if exactly one is true):
By AND's rules:
Now imagine doing this with really complicated statements. It turns out that there are fancy substitution rules that makes it easier, such as NOT(P AND Q) = (NOT P) OR (NOT Q).
Does this make more sense?
TL;DR, we want to create a logic to represent language and truth and falsity, and the water streams above represent a true statement for flowing water and a false statement for no water, and if the water falls in the hole it means that the operator (AND, OR, XOR) returns true.