Lesson 10 logic
Lesson 10 logic 
Logic In order to understand logic, there are certain key words. These key words consist of: not, and, or, if-then, and if-and-only-if. Suppose I have a statement P= I love tea. The only way this statement can be false, is if P is false. In other words, since P is I love tea, then I must love tea in order for this statement to be true. When we use the symbol ¬, this represents not. In order to deny the truth of the above statement for P, we just put ¬ in front of the P: ¬P=It is not the case that I love tea. The only way ¬P can be true is when P is false. Truth table :
By using the truth table, we can see that not P is simply the opposite of P. It swaps true for false, and false for true. When we use the symbol ∧, it represents and. Let’s take a look at the statement: I love tea and I’m happy, let P=I love tea, and Q=Im happy. This statement is only true when P and Q are true. For example, I need to love tea and be happy in order for this statement to be true. Truth Table: File:P and Q real.pdf
Looking at the truth table, we see that if P is true, but Q is false, then the statement is false. When P and Q are both false, the statement is still false.
When we look at the statement (¬P)∧(¬Q), it is saying that it is not P and it is not Q. This is the same thing as saying its not P or Q.
We can relate this concept back to venn diagrams. The symbol ∧ can also be the same as the symbol ∩. The symbol ∩ means intersection. In a venn diagram, X ∩ Y are elements that overlap X and Y. When we use the statement P ∧ Q, we are saying both P and Q need to be true in order for the whole statement to be true.
¬(A∧B) and ¬(A ∩ B) both represent “not (A intersects B).. In a venn diagram, this means that this is everything outside of the overlap of A and B.
We can also relate this concept to probability. If two events E1 and E2 are independent, meaning that the occurrence of one has no effect on the occurrence of the other, then the probabiloity that E1 and E2 will happen is the product of the probability that E1 happens with the probability that E2 happens. Symbolically, if P(Ei) is the probability that event Ei happens, then: P(E1 ∧ E2)=P(E1)*P(E2). When we ask “what is the probability that a die will roll a five and a six, we multiply 1/6*1/6 which equal 1/36 chance of rolling a five and a six. Similarly, for the statement Both P ∧ Q, the statement can hold true only when both P and Q are true.
When we use the symbol V, this represents or. Let’s look at the statement: I love tea or I am happy. P=I love tea. Q=I am happy. We can see that the only way this statement can hold true either P or Q is true. For example, if I love tea, but I am not happy, this statement is still true. When I hate tea, but I am happy, the statement is still held true. The only way this statement can be false is when both P and Q are false. It is one or the other, or even both. Truth Table: File:P or q real.pdf
Looking at the truth table, we can see that the statement not (p or Q) has completely the opposite results from (P or Q). The only way the statement (not P) or (not Q) can be false is when both are not P and not Q. In other words, the statement is false when P and Q both hold true. We see that not (P or Q) have the same results as (not P) or (not Q).
When we look at the statement ¬(P V Q), the results for this statement is different from (¬P)V(¬)Q. It is saying different things. (¬P)V(¬)Q means its not P or its not Q. In other words, its either not one or not the other. Whereas, the statement ¬(P V Q), it is saying its not P or Q. We can also say its not P and its not Q.
Here is a link to an example of this concept: Section 2.2 #2 this example goes back to using "not" and relating with statements with "or" and "and"
We can relate this concept to probability. The probability (P) that E2 or E2 will happen is the sum of the probability that E1 happens with the probability that E2 happens. Symbolically, this means that if P(Ei) is the probability that event Ei happens, then: P(E1 V E2)=P(E1)+P(E2). This means that the probability the event 1 will happen or event 2 will happen. We are finding either one or the other that can happen, and we add them all up. Similarly, in the statement PVQ, we know the statement will hold true when either P or Q are true.
When we use the symbol =>, the symbol represents if-then statements. Let’s look at the statement: If I am under 21, then I can’t drink. P=I am under 21, Q=I can’t drink. Both P and Q need to relate. If this, then that. The statement will be false, only when P is true but Q is false. For example, If I am under 21, then I can’t drink, this statement is false because I cannot drink if I am under 21. On the other hand, If I am not under 21, then I can’t drink, this can hold true. It can hold true because even if I am not under 21, I don’t have to drink for different reasons. Maybe one person just cannot drink because they need to drive, or they get sick when they drink. Truth Table:
Looking at the truth table, we see that when both statements are false, it still holds true. For example, If I am not under 21 then I can drink, this statement holds true because since I am not under 21, I can drink. We can simply say that when P=>Q, this means P implies Q.
Here are links for a helpful example: If-Then Truth Tables, Section 2.2 #3
Lastly, if you see if-and-only-if, it is denoted by the symbol<=>. this is the same thing as (p=>Q) ∧ (Q=>P). In other words they are both relational. If anlly only hold true (If P then its Q), and (if Q then its P). Smoo1244 00:17, 7 November 2010 (UTC)