Propositional Logic · Propositions

Lesson 2

Nikolai Chukhin · Alexander S. Kulikov

Speaking in programmer's language, a proposition is a statement of the Boolean type (named after George Boole), that is, true or false. In programming, propositions are also called conditions and are used, for example, in \(\texttt{if}\)- and \(\texttt{while}\)-loops.

print(type(2 + 5))
print(type(15 % 3 == 0))
print(15 % 3 == 0)
if 239 % 3 == 0:
    print('239 is divisible by 3')

<class 'int'>
<class 'bool'>
True

Problem. Mark all propositions:

5 points
  1. \(2+5\)

  2. \(x\) is a prime number

  3. \(15\) is divisible by \(3\)

  4. this statement begins with the word “this”

  5. today the weather is nice

  6. \(239\) is divisible by \(3\)

  7. there are infinitely many primes \(p\), for which \(p+2\) is also prime