This article is a little introduction to sentential calculus for IT engineering students. I will try to explain it as correct and simple as possible.
Sentential calculus is the foundation for discrete and computational mathematics. It teaches you what is logical in a mathematical sense. Let’s begin with some terms.
True or False
Every predicate must either equal true or false. Always. There is no null, like it should not exist for booleans.
- 3+1 = 4 –> True
- I study IT –> True
- Unicorns exist –> False
The sentential connectives connect two or more predicates as mentioned above. Let’s say we have the example
- A(x) := “x >2”
- B(x) := “x<10”
If we want to say x is between 2 and 10 you can do it with the AND connector. But more in this table.
|A=>B||if(!A||B), if(a) then b=true|
In this table I tried to match the connectives with a matchin programming pattern. Of course it’s only pseudo code.
A couple of rules regarding equal predicates:
- double negation leads to no negation: a != !false –> a = true
- A^B <=> B^A
- AvB <=> BvA
- (A^B)^C <=> A^(B^C)
The de morgan rules are actually pretty simple:
Every time you negate a sentential connective, you negate every predicate and change the connective sign.
- ¬(A^B) <=> ¬Av¬B
- ¬(AvB) <=> ¬A^¬B
Quantifiers give you the ability to generate a predicate from other (multiple) predicates. Let’s say we have two predicates:
- A(x) := “x is a prime number”
- B := “There is a prime number that is a divisor of 24”
- B:= “there is (at least) one x where A(x)” which is true
- C:= ” every number x fulfills A(x)” which is wrong
Here’s a simpe list of quantifiers using natural numbers:
- ∀xA(x) means: For each x in N -> A(x) == true
- ∃xA(x) means: There is at least one x in N where A(x) == true