Elementary Logic

It’s the study of processes used in mathematical induction.

There are 2 types of reasoning:

**Inductive**→ conclusions based on observations.**Deductive**→ conclusions based on facts and rules.

# Propositional Logic

the study of logical relationships between propositions.

A proposition is a statement that can be either true or false, but not both. For example, "It is raining" and "2 + 2 = 4" are propositions.

## Logical Operators

Propositional logic uses logical operators to combine or modify propositions. The main logical operators are:

**Negation (¬):**Denotes the logical opposite of a proposition.

If p is a proposition, then ¬p is true when p is false, and false when p is true.

*Apply the logical NOT method.***Conjunction (∧)**:propositions joined by the logical connective ‘and’.

A proposition p^q is true when both p and q are true.

*Apply the logical “AND” method.*:)*Truth table:*p

q

p^q

T

T

T

T

F

F

F

T

F

F

F

F

**Disjunction (∨)**:Categorized into 2:

i) Inclusive(

**∨):**If both p and q are false pvq is false.

*Apply Logical OR.**Truth table:*p

q

pvq

T

T

T

T

F

T

F

T

T

F

F

F

ii)Exclusive(⊻):

If both p and q have the same truth value p⊻q is false.

*Apply Logical XOR.**Truth table:*p

q

p⊻q

T

T

F

T

F

T

F

T

T

F

F

F

**Implication/Conditional (→)**:propositions joined by the logical connective ‘if…then’.

A proposition p→q is true when both p and q are true and when p is false.

p: It is raining

q:It is wet.

*Truth table:*p

q

p→q

T

T

T

T

F

F

F

T

T

F

F

T

**Biconditional (**↔**)**:propositions joined by the logical connective ‘if and only if’.

A proposition p↔q is true when both p and q have the same truth value

*Truth table:*p

q

p↔q

T

T

T

T

F

F

F

T

F

F

F

T

## Tautology and contradiction

## Tautology

A tautology is a statement that is always true, regardless of the truth values of its individual components.

Example:

p: It’s raining outside; then pv~p is Its raining outside or its not raining outside = True

truth table:

p

~p

p v ~p

T

F

T

F

T

T

## Contradiction

A contradiction is a statement that is always false, regardless of the truth values of its components.

Example:

A: It is raining. so A ^ ~A(It’s raining and it’s not raining) = F since it can’t rain and not rain at the same time.

Truth table

A

~A

A ^ ~A

T

F

F

F

T

F

# Logical Equivalence and Implication

## Logical Equivalence

Two statements are said to be logically equivalent if they always have the same truth value, regardless of the truth values of their components.

Symbolically, two statements P and Q are logically equivalent if and only if P ↔ Q is a tautology.

example: prove p is logically equivalent to p^T

p

T

p^T

T

T

T

F

T

F

### Relationship between converse, inverse and contrapositive of conditional statements

The relationship between the converse, inverse, and contrapositive of a conditional statement is as follows:

P: Jack plays his guitar

q:Sarah will sing.

**Converse**: The converse of a conditional statement switches the hypothesis and conclusion. If the original statement is "If P, then Q," the converse would be "If Q, then P." However, the converse may or may not be true. Just because the original statement is true does not guarantee the truth of its converse. P →Q**Inverse**: The inverse of a conditional statement negates both the hypothesis and the conclusion. If the original statement is "If P, then Q," the inverse would be "If not P, then not Q." Similar to the converse, the inverse may or may not be true. The truth of the original statement does not imply the truth of its inverse.**Contrapositive**: The contrapositive of a conditional statement combines both the switching of hypothesis and conclusion (like the converse) and the negation of both (like the inverse). If the original statement is "If P, then Q," the contrapositive would be "If not Q, then not P." Unlike the converse and inverse, the contrapositive is always true if the original statement is true. If the original statement is false, the contrapositive is also false.

# Elementary Logic

It’s the study of processes used in mathematical induction.

There are 2 types of reasoning:

**Inductive**→ conclusions based on observations.**Deductive**→ conclusions based on facts and rules.

# Propositional Logic

the study of logical relationships between propositions.

A proposition is a statement that can be either true or false, but not both. For example, "It is raining" and "2 + 2 = 4" are propositions.

## Logical Operators

Propositional logic uses logical operators to combine or modify propositions. The main logical operators are:

**Negation (¬):**Denotes the logical opposite of a proposition.

If p is a proposition, then ¬p is true when p is false, and false when p is true.

*Apply the logical NOT method.***Conjunction (∧)**:propositions joined by the logical connective ‘and’.

A proposition p^q is true when both p and q are true.

*Apply the logical “AND” method.*:)*Truth table:*p

q

p^q

T

T

T

T

F

F

F

T

F

F

F

F

**Disjunction (∨)**:Categorized into 2:

i) Inclusive(

**∨):**If both p and q are false pvq is false.

*Apply Logical OR.**Truth table:*p

q

pvq

T

T

T

T

F

T

F

T

T

F

F

F

ii)Exclusive(⊻):

If both p and q have the same truth value p⊻q is false.

*Apply Logical XOR.**Truth table:*p

q

p⊻q

T

T

F

T

F

T

F

T

T

F

F

F

**Implication/Conditional (→)**:propositions joined by the logical connective ‘if…then’.

A proposition p→q is true when both p and q are true and when p is false.

p: It is raining

q:It is wet.

*Truth table:*p

q

p→q

T

T

T

T

F

F

F

T

T

F

F

T

**Biconditional (**↔**)**:propositions joined by the logical connective ‘if and only if’.

A proposition p↔q is true when both p and q have the same truth value

*Truth table:*p

q

p↔q

T

T

T

T

F

F

F

T

F

F

F

T

## Tautology and contradiction

## Tautology

A tautology is a statement that is always true, regardless of the truth values of its individual components.

Example:

p: It’s raining outside; then pv~p is Its raining outside or its not raining outside = True

truth table:

p

~p

p v ~p

T

F

T

F

T

T

## Contradiction

A contradiction is a statement that is always false, regardless of the truth values of its components.

Example:

A: It is raining. so A ^ ~A(It’s raining and it’s not raining) = F since it can’t rain and not rain at the same time.

Truth table

A

~A

A ^ ~A

T

F

F

F

T

F

# Logical Equivalence and Implication

## Logical Equivalence

Two statements are said to be logically equivalent if they always have the same truth value, regardless of the truth values of their components.

Symbolically, two statements P and Q are logically equivalent if and only if P ↔ Q is a tautology.

example: prove p is logically equivalent to p^T

p

T

p^T

T

T

T

F

T

F

### Relationship between converse, inverse and contrapositive of conditional statements

The relationship between the converse, inverse, and contrapositive of a conditional statement is as follows:

P: Jack plays his guitar

q:Sarah will sing.

**Converse**: The converse of a conditional statement switches the hypothesis and conclusion. If the original statement is "If P, then Q," the converse would be "If Q, then P." However, the converse may or may not be true. Just because the original statement is true does not guarantee the truth of its converse. P →Q**Inverse**: The inverse of a conditional statement negates both the hypothesis and the conclusion. If the original statement is "If P, then Q," the inverse would be "If not P, then not Q." Similar to the converse, the inverse may or may not be true. The truth of the original statement does not imply the truth of its inverse.**Contrapositive**: The contrapositive of a conditional statement combines both the switching of hypothesis and conclusion (like the converse) and the negation of both (like the inverse). If the original statement is "If P, then Q," the contrapositive would be "If not Q, then not P." Unlike the converse and inverse, the contrapositive is always true if the original statement is true. If the original statement is false, the contrapositive is also false.