0% found this document useful (0 votes)
15 views14 pages

Logic Preparation CSE

The document covers fundamental concepts in propositional logic, including logic operators, Boolean algebra, logic circuits, predicate logic, and deduction. It provides definitions, laws, and examples related to each topic, such as truth tables, simplification methods, and quantifiers. Additionally, it discusses the application of logic in drawing conclusions from premises.

Uploaded by

Gia Hy Mai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views14 pages

Logic Preparation CSE

The document covers fundamental concepts in propositional logic, including logic operators, Boolean algebra, logic circuits, predicate logic, and deduction. It provides definitions, laws, and examples related to each topic, such as truth tables, simplification methods, and quantifiers. Additionally, it discusses the application of logic in drawing conclusions from premises.

Uploaded by

Gia Hy Mai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Propositional Logic

Thomas van Weert


March 1, 2022
Contents
Glossary 5

1 Logic Operators 7
1.1 Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Special Propositions . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 Boolean Algebra 9
2.1 Laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 Logic Circuits 11
3.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 Predicate Logic 12
4.1 Predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3 Laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5 Deduction 13
5.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.3 Verify & Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

6 Set Builder Notation 14


6.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Glossary
Conclusion
A conclusion is a proposition that can be deduced logically from a set of
Premises
Conjuntion
True if and only if all operands are true, also knowns as the AND operator
or ∧.
Conjuntive Normal Form
Is a Conjuntion of Disjuntions: (· · · ∧ · · · ) ∨ · · ·
Contradiction
A Proposition that contradicts itself and it therefore always false
Disjuntion
True if any operands is true, also knowns as the OR operator or ∨.
Disjuntive Normal Form
Is a Disjuntion of Conjuntions: (· · · ∨ · · · ) ∧ · · ·
Entity
Some specific, identifiable thing to which a predicate can be applied
Existential Quantifier
Quantifier used to define that it’s valid for at least one: ∃x(P(x))
Karnaugh-map
Also known as K-Map. Is used to simplify Propositions. By filling in the
columns from the truth table into the K-map you can get the simplified
version of the expression by finding rectangles with edges of size 2n =
{1, 2, 4, · · · }
Law of Syllogism
A set of Premises where p → q and q → r therefor p → r
Logic Operator
The operators are {¬, ∧, ∨, →, ↔, ⊕}. The last three operators are all
based on the first three.
Logic Gate
A component that takes input(s) and transforms it to output(s) according
to a Proposition

5
Logic Circuit
Is a combination of Logic Gate’s that’s able to compute a Proposition
Modus Tollens
A Premise that is false and therefore the Conclusion is also false
Modus Ponens
A Premise that is true and therefore the Conclusion is also true
Predicate
A kind of incomplete proposition, which becomes a Proposition when ap-
plied to an entity or multiple entities. With form P (x) where x is the
entity variable and P (x) the predicate
Premise
A Proposition that is known to be true or that has been accepted to be
true for the sake of an argument
Proposition
A statement consisting of Logic Operator(s)
Quantifier
Used to dictate the domain a Predicate should be valid for. There are two
quantifiers, the Universal Quantification and the Existential Quantifier.
Relay
Is an electrically operated switch. It is used where it is necessary to
control a circuit by an independent low-power signal, or where several
circuits must be controlled by one signal
Set Builder Notation
The Set Builder Notation is used to specify a set of objects by means of a
Predicate
Tautology
A Proposition that is self fullfilling and therefore always true
Transistor
Is a semiconductor device used to amplify or switch electrical signals and
power
Truth-Table
A diagram in rows and columns showing how the truth or falsity of a
Proposition varies with that of its components
Universal Quantification
Quantifier used to define that it’s valid for all: ∀x(P(x))

6
1 Logic Operators
1.1 Basic
Truth table of the basic logical operators
p q ¬p ¬q p∧q p∨q p⊕q p→q p↔q
0 0 1 1 0 0 0 1 1
0 1 1 0 0 1 1 1 0
1 0 0 1 0 1 1 0 0
1 1 0 0 1 1 0 1 1

OR
Writing p∨q using only {¬, ∧}
p q ¬p ¬q ¬p ∧ ¬q ¬(¬p ∧ ¬q) p∨q
0 0 1 1 1 0 0
0 1 1 0 0 1 1
1 0 0 1 0 1 1
1 1 0 0 0 1 1

XOR
Writing p⊕q using only {¬, ∧, ∨}
p q ¬p ¬q ¬p ∧ q p ∧ ¬q (¬p ∧ q) ∨ (p ∧ ¬q) p⊕q
0 0 1 1 0 0 0 0
0 1 1 0 0 1 1 1
1 0 0 1 1 0 1 1
1 1 0 0 0 0 0 0

Conditional
Writing p → q using only {¬, ∧, ∨}
p q ¬p ¬q ¬p ∨ q p → q
0 0 1 1 1 1
0 1 1 0 1 1
1 0 0 1 0 0
1 1 0 0 1 1

Biconditional
Writing p ↔ q using only {¬, ∧, ∨}
p q ¬p ¬q (p ∧ q) ∨ (¬p ∧ ¬q) p↔q
0 0 1 1 1 1
0 1 1 0 0 0
1 0 0 1 0 0
1 1 0 0 1 1

7
1.2 Special Propositions
There are two kinds of special propositions. Tautology which is always true
and Contradiction which is always false. By finding these cases you can simply
replace them by their logical equivalent in other words replacing a Tautology
with T and a Contradiction with F

1.3 Examples
Some examples of Propositions

ˆ p ∧ (q ⊕ r)

ˆ p ∨ (q ↔ r)

ˆ p → (q ∧ r)

ˆ p ∨ (q ∧ (r → p))

8
2 Boolean Algebra
2.1 Laws
Set of rules used to rearrange and transform statements
Double negation ¬(¬p) ≡ p
Excluded middle contradiction p ∨ ¬p ≡ T
p ∧ ¬p ≡ F
Identity laws T∧p≡p
F∨p≡p
T∨p≡T
F∧p≡F
Commutative laws p∧q ≡q∧p
p∨q ≡q∨p
Associative laws (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
Distributive laws p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
DeMorgan’s laws ¬(p ∧ q) ≡ ¬p ∨ ¬q
¬(p ∨ q) ≡ ¬p ∧ ¬q
Conditional laws p → q ≡ (¬p) ∨ q
(made up) ¬(p → q) ≡ p ∧ (¬q)
p ↔ q ≡ ¬(p ⊕ q)
p ∨ (p ∧ q) ≡ p
p ∧ (p ∨ q) ≡ p

2.2 Simplification
The most used method for simplifying boolean algebra expressions, which are
simple Propositions, is to use Karnaugh-maps.

f (a, b, c, d) = ¬(b ∨ d) ∨ (¬b ∧ c) ∨ (a ∧ d) ∨ (c ∧ d)

9
Steps
ˆ Make a Truth-Table

ˆ Make a Karnaugh-map with the right dimensions

ˆ FillKarnaugh-map with values of the truth-table

ˆ Draw rectangles with edge-sizes of 2n : S = {1, 2, 4, ...}

ˆ Get Propositions of drawn rectangles: F = {¬p, . . . }

ˆ Write the Propositions together like f (p, · · · ) = F0 ∨ F1 . . . resulting in


the simplified Proposition of the initial statement.

2.3 Forms
Propositions can come in two forms. Either the Conjuntive Normal Form or
the Disjuntive Normal Form. Both are based around a different base operator.
Conjuntive Normal Form is based on Conjuntion(OR of AND’s) and Disjuntive
Normal Form is based on Disjuntion(AND of OR’s).

10
3 Logic Circuits
3.1 About
Logic Circuits consist of Logic Gates. Which are used to compute Propositions
automatically. This way a lot of time and human factors can be saved, especially
with more complex Propositions. There are multiple ways to build them. The
most used one being Transistors and one that could be used, but isn’t being
Relay. Basically any type of switch that takes input signals to produce an
on/off signal will do.

3.2 Types
There are two types of Logic Circuits. There is combinatorial, which has no
feedback loop. This means that the input has a direct correlations with the
output. The second type is state, which has it’s own output as one of the input.
It’s therefore state dependent.

3.3 Example
An example of Logic Gates and a Logic Circuit.

11
4 Predicate Logic
4.1 Predicates
A Predicate is a kind of incomplete proposition, which becomes a Proposition
when applied to a single Entity or multiple. The basic form is P (x) and L(x, y)
where x defines the Entity and P (x) an incomplete Proposition with an entity.
We also call a Predicate without Quantifiers an open statement. Where the
variables are called free variables. A predicate can have multiple variables.

4.2 Quantifiers
These are used to dictate the domain a Predicate should be valid for. There
are two quantifiers, they are used like ∀x(P (x)) and ∃x(P (x)). Or in the case
of multiple variables we can do ∀x(∃y(L(x, y))) which means ”for all x there is
at least one y for which L(x,y) hold”. When ambiguous like the example(when
mixing Universal Quantification and Existential Quantifier) the parentheses are
needed, otherwise they can be left out.

4.3 Laws
Important equivalence laws of predicate logic
De Morgan’s Laws ¬(∀xP (x)) ≡ ∃x(¬P (x))
for Predicate Logic ¬(∃xP (x)) ≡ ∀x(¬P (x))
Homogeneous ∀x∀yQ(x, y) ≡ ∀y∀xQ(x, y)
Quantifier Law ∃x∃yQ(x, y) ≡ ∃y∃xQ(x, y)
Heterogeneous ∀x(∃yQ(x, y)) 6≡ ∀y(∃xQ(x, y))
Quantifier Law ∃x(∀yQ(x, y)) 6≡ ∃y(∀xQ(x, y))

12
5 Deduction
5.1 About
Logic can be applied to draw Conclusions from a set of Premises. The idea is
that if you believe the Premises are true, then logic forces you to accept that
the conclusion is true. An argument is a claim that a certain conclusion follows
from said Premises. The power of deduction also lies in it’s simplicity to come
to a conclusion without having to use a Truth-Table.

5.2 Notation
The notation consists of 2 parts, the part above the line is a list of Premises, and
the part below the line is the Conclusion. The ∴ symbol is read as ’therefore’.
p
q
∴ r
There is also a rule of deduction called Law of Syllogism, used when we have a
set of implications as Premises
p→q
q→r
∴ p→r

5.3 Verify & Types


To verify if the argument is valid we can check if (p ∧ q) → r is a Tautology. If
that is the case then the argument is valid. We have two types of arguments,
Modus Ponens and Modus Tollens. The first applies to a Premise that is true,
therefore the Conclusion is true. The other applies to a Premise that is false,
therefore the Conclusion is also false.

13
6 Set Builder Notation
6.1 About
The Set Builder Notation is used to specify a set of objects by means of a
Predicate. The common notation includes 3 parts, a variable x, a vertical bar
separator, and a Predicate P (x). Which gives us S = {x|P (x)} where S denotes
the set of objects.

6.2 Notation
Symbol Description
{} indicates a set
x∈S x is an element or member of S
x∈
/S x is not an element of S
S⊆T S is a subset of T
S=T S is equal to T , equivalent to (S ⊆ T ) ∧ (T ⊆ S)
S⊂T S is a proper subset of T , equivalent to (S ⊆ T ) ∧ (T 6= S)
∅ empty set

14

You might also like