Working with logic
A true-false statement is any sentence that is either true or false but not both. A negation of a statement has the opposite meaning of a truth value. A negations is written as ~p.
If we call the statement: cucumbers are green, p then:
p: cucumbers are green - this statement is true.
~p: cucumbers are not green - this statement is false.
If we join two statements we can form a compound statement or a conjunction. A conjunction could contain the two statements q and p:
p: cucumbers are green.
q: cucumbers are vegetables.
Conjunctions are noted:
This is read - p and q. Cucumbers are green and vegetables.
A conjunction is true only if both statements that form the conjunction is true.
If we have two statements that are joined by "or" we have a disjunction.
p: Bill is travelling to Mexico
q: Bill is travelling to Canada
p or q gives us that Bill is travelling to Mexico or Bill is travelling to Canada.
Disjunctions are noted:
This is read - p or q.
A disjunction is true if at least one of the statements that form it is true.
We are given four statements
p: cats have 4 legs (true)
q: hens have 2 legs (true)
r: cats lay egg (false)
t: hens lay egg (true)
Are the following compound statements true or false?
p Λ t
p V r
~p V q
r Λ q
~r V ~q