Basics of Propositional Logic | Operators on propositions | Negation | Conjunction | Disjunction | Conditional Statements
Proposition: A declarative statement that can be either True or False but not both.
Operators on propositions:
1. Negation(¬): ¬p is the opposite of the truth value of p.
2. Conjunction(∧): p∧q will be true iff both p and q are true. You can think this as 'AND'.
3. Disjunction(∨): p∨q will be false iff both p and q are false. You can think this as 'OR'.
Incusive 'OR' statement: Students who have taken Calculus or Algebra can take this class.
Exclusive 'OR' statement: Students who have taken Calculus or Algebra, but not both can take this class.
1. if p then q (p→q) : Here p is premise or hypothesis and q is conclusion or consequence. The conditional statement p→q is false when p is true and q is false.
p: Rohan learns programming.
q: Rohan will find a good job.
We can express p→q in different ways :
p→q : If Rohan learns programming, then he will find a good job.
p→q : Rohan will find a good job unless he does not learn programming.
p→q: Rohan will fine a good job when he leans programming
2. p if and only if q (p↔q) : The biconditional statement p↔q is true when p and q have the same truth values, and false otherwise.
p: You can take flight.
q: You buy a ticket.
p↔q : You can take flight if and only if you buy a ticket.