DEV Community

Cover image for Elementary Logic And Proof Techniques
Niladri Das
Niladri Das

Posted on

Elementary Logic And Proof Techniques

1. Statements and Truth Values

Definitions and Detailed Explanations

Statement:

A statement in logic is a declarative sentence that can definitively be classified as true or false. This is distinct from questions, commands, or expressions of uncertainty. Statements are the fundamental building blocks in logic and mathematical proofs.

Examples:

"7 is a prime number." (True)
"The moon is made of green cheese." (False)
"New York is the capital of the USA." (False)
"Water boils at 100 degrees Celsius at sea level." (True)

Truth Values:

True: A statement is considered true if its assertion corresponds with fact or reality. In formal logic, truth values are often denoted as 'T' or '1'.

Examples:

"Dogs are mammals." This is true because dogs belong to the class of mammals.
"2+2=4." This statement is universally true in standard arithmetic.

False: A statement is false if its assertion contradicts fact or reality. False statements are denoted as 'F' or '0'.

Examples:

"Cats are reptiles." This is false because cats are mammals, not reptiles.
"5 is an even number." This is false because 5 cannot be evenly divided by 2.

Usage of Statements and Truth Values in Logic

Understanding the nature of statements and their truth values is crucial for the analysis and construction of logical arguments. Here’s how these concepts play out in logical reasoning:

Identifying Statements in Arguments: When analyzing an argument, the first step is to identify all the statements being made and to evaluate their truth values. For example, in the argument "If it rains, the ground gets wet. It is raining. Therefore, the ground is wet," each sentence is a statement, and their truth values help determine the validity of the conclusion.

Practice Example:

Premise: "All birds can fly."
Premise: "Penguins are birds."
Conclusion: "Penguins can fly."

Here, although the premises are statements, the first premise is false since not all birds can fly (penguins are an example). This affects the truth value of the conclusion, making the argument invalid.

Constructing Logical Deductions: Once you understand the truth values of various statements, you can use logical connectives (like AND, OR, NOT) to construct new statements. The truth value of these new statements depends on the truth values of the original statements and the nature of the connective used.

Example with Logical Connectives:

Statement A: "It is raining." (True)
Statement B: "It is cold outside." (False)
Conjunction (A AND B): "It is raining and it is cold outside." (False, since both A and B need to be true for the conjunction to be true)
Disjunction (A OR B): "It is raining or it is cold outside." (True, since only one of A or B needs to be true for the disjunction to be true)

2. Logical Connectives

Logical connectives are operators used in logic to connect statements together to form more complex statements. Each connective has a specific rule about how the truth value of the compound statement is determined based on the truth values of the component statements. Below, we detail three fundamental logical connectives: negation, conjunction, and disjunction, with ample examples.

Negation

Symbol: ¬

Meaning: The negation of a statement p, denoted ¬p, is true if p is false, and false if p is true. It essentially reverses the truth value of the original statement.

Examples:

Statement: "It is raining." (Assume True)
Negation: "It is not raining." (False)
Statement: "The cat is asleep." (Assume False)
Negation: "The cat is not asleep." (True)

Negation is particularly useful in constructing proofs by contradiction, where one assumes ¬p (the negation of what is to be proven) and shows that this leads to a logical impossibility, thereby establishing p as true.

Conjunction

Symbol:

Meaning: The conjunction of statements p and q, denoted p ∧ q, is true only if both p and q are true. This connective represents the logical "and."

Examples:

Statement p: "It is raining." (True)
Statement q: "It is cold outside." (True)
Conjunction: "It is raining and it is cold outside." (True)
If either p or q were false, then p ∧ q would be false:

Statement p: "It is raining." (False)
Statement q: "It is cold outside." (True)
Conjunction: "It is raining and it is cold outside." (False)

Conjunctions are key in mathematical proofs and logical reasoning where multiple conditions or premises must be satisfied simultaneously.

Disjunction

Symbol:

Meaning: The disjunction of statements p and q, denoted p ∨ q, is true if at least one of p or q is true. This connective represents the logical "or."

Examples:

Statement p: "It is raining." (True)
Statement q: "It is cold outside." (False)
Disjunction: "It is raining or it is cold outside." (True)
Even if both are true, the disjunction remains true:
Statement p: "It is raining." (True)
Statement q: "It is cold outside." (True)
Disjunction: "It is raining or it is cold outside." (True)

Disjunctions are used in cases where multiple scenarios or possibilities lead to a similar outcome or conclusion, and only one needs to be true to satisfy a condition.

By combining these connectives, one can build complex logical expressions and effectively analyze the logical structure of arguments and mathematical proofs.

3. Basic Proof Concepts

Direct Proof

Description: Direct proof is a straightforward method of proving a statement by assuming the truth of the premises and logically deducing the conclusion. It follows a linear and step-by-step approach, making it one of the most commonly used proof techniques in mathematics.

Steps:

  • Apply Logical Rules and Axioms: Use logical connectives, rules, and mathematical axioms to systematically derive the conclusion from the premises.

Example:

Premise: "If it is raining, then the ground is wet."
Assumption for Direct Proof: It is raining.
Conclusion: The ground is wet.

This method is direct and avoids indirect implications or assumptions beyond the stated premises. It is particularly effective for proving implications and statements that follow from clear logical or mathematical laws.

Logic Symbols and Their Meanings

Universal Quantifier ( ):

Meaning: The universal quantifier is used to indicate that a statement holds true for all elements within a certain set.

Example: ∀x ∈ ℝ, x² ≥ 0. This reads as "For all x in the set of real numbers , the square of x is greater than or equal to zero." This statement is true for every real number x.

Existential Quantifier ( ):

Meaning: The existential quantifier indicates that there is at least one element in a specified set for which the statement is true.

Example: ∃x ∈ ℝ, x² = 2. This reads as "There exists an x in the set of real numbers such that equals 2." This is true as there are real numbers (specifically, √2 and √2) that satisfy this condition.

Utilizing Quantifiers in Proofs

Quantifiers are crucial in the formulation of mathematical theorems and their proofs:

Using (Universal Quantifier): When proving statements involving , you must show that the statement holds for every possible case within the set. For instance, proving ∀x ∈ ℤ, x + 0 = x involves demonstrating that adding zero to any integer x will result in x itself, a fundamental property of additive identity in mathematics.

Using (Existential Quantifier): Proofs involving typically require demonstrating the existence of at least one element that satisfies the conditions of the theorem. This might involve constructing an example or showing that under certain conditions, such an element must logically exist.

In summary, direct proofs and logical quantifiers form essential components of mathematical reasoning, enabling clear and structured problem-solving and theorem proving.

4. Introduction to Different Types of Proofs

Contrapositive Proof

Description: A contrapositive proof involves proving the contrapositive of a given implication instead of the implication itself. If the original statement is of the form p → q (if p then q), its contrapositive is ¬q → ¬p (if not q then not `p), which is logically equivalent to the original statement.

Example:

Original Statement: "If it is not cold, then it is not winter."
Contrapositive: "If it is winter, then it is cold."
Proof Approach: Show that during winter, it must be cold. Thus, the contrapositive holds, confirming the original statement through its logical equivalence.

Additional Examples:

Original Statement: "If a number is even, then it is divisible by 2."
Contrapositive: "If a number is not divisible by 2, then it is not even."
Proof: Show that any number not divisible by 2 has a remainder when divided by 2, thus it cannot be even.

Proof by Contradiction

Description: Proof by contradiction (also known as reductio ad absurdum) is a method where you assume the opposite of what you need to prove and show that this assumption leads to a contradiction or an impossibility. This contradiction implies that the assumption is false, thereby establishing the truth of the original statement.

Example:

Statement to Prove: "There is no smallest negative number."
Assumption: Assume there is the smallest negative number, say n.
Contradiction: Consider n/2, which is also a negative number but smaller than n. This contradicts the assumption that n is the smallest negative number.
Conclusion: Since the assumption leads to a contradiction, the original statement is true.

Additional Examples:

Statement to Prove: "The square root of 2 is irrational."
Assumption: Assume the square root of 2 is rational, meaning it can be expressed as a fraction a/b where a and b are integers with no common factors.
Contradiction: By squaring both sides and manipulating the equation, one ends up with 2b² = a², implying is even, thus a is even. Represent a as 2k and substitute back to find b must also be even, contradicting the assumption that a and b have no common factors.
Conclusion: The square root of 2 cannot be expressed as a fraction of two integers, hence it is irrational.

Both contrapositive and proof by contradiction are powerful methods in mathematics, particularly useful when direct proof is cumbersome or complex. They allow mathematicians to explore logical relationships from different perspectives, often leading to insightful conclusions about the properties and nature of mathematical objects.

Student, Author, Investor, ML Developer, Network Engineer — Niladri Das

Top comments (0)