Propositional Logic · Propositions
Lesson 3
Propositions \(P\) and \(Q\) can be combined with each other using logical connectives, creating new propositions. The three simplest connectives are as follows:
- negation: \(\neg P\), \(\overline{P}\); true if and only if \(P\) is false;
- conjunction, logical AND: \(P \land Q\); true if and only if both \(P\) and \(Q\) are true;
- disjunction, logical OR: \(P \lor Q\); false if and only if both \(P\) and \(Q\) are false;
print(3 < 5)
print(7 < 5)
print(not(3 < 5))
print(3 < 5 and 7 < 5)
print(3 < 5 or 7 < 5)True
False
False
False
True