What is Logic?

In mathematics, logic is the foundation for all reasoning. The rules of logic specify the statements in mathematics that hold true and let us make decisions.

Logic gives a precise meaning to all the postulates and theories in mathematics. Logic also helps us understand things like digital logic, programming, and the authenticity of equations used to prove theorems. Logics can be categorized into different terms, like truth table logics and propositional logics.

What is a Proposition?

Mathematical propositions are the fundamental building blocks of logic used in mathematics. A proposition, or theorem, is a statement that is either true or false. For example, "2 multiplied by 2 is 4" is a proposition and a true statement. Meanwhile, "1 is a prime number" is a false statement.

The universe of discourse is known for a specific branch in the study of math where it contains a set of everything of interest for that particular subject. Set theory in mathematics is a classic example of the usage of logic.

Combined propositions are called compound propositions. When they are used in mathematical equations, they are called the logical operators. A truth table is a combination and compilation of all possible outcomes of a given statement written down in a table.

Logical Operators or Connectors

The study of the basics of logical operators is known as Boolean algebra. Here, algebraic expressions use the truth table reference to assign the values 0, which indicates false, and 1, indicating true. Boolean algebra is commonly applied in digital electronic circuits, set theory, and computer programming. Some operations like conjunction, disjunction, and negation are used.

A conjunction is AND operation that checks if both the statements are true or not. If both are true, then this operation’s result will be true. If even one of the statements is false, it returns its result as false. It is denoted as U operator in set theory. If two statements are denoted as p and q, then the conjunction between them will be denoted as p q.

A disjunction is OR operator, which checks if one of the statements is true or false and returns its result. It is denoted as p v q.

A negation is NOT operator, which negates the statement where its result is the opposite condition of the given statement. If the statement is true, when the negation operator is used, then the result becomes false. It is denoted as p’=p or (q’)’=q. A compliment operator is used to invert the logic of the statement.

The following are the truth tables for AND, OR, and NOT in terms of binary numbers:

AND

OR

NOT

In the above truth tables, false is a contradictory statement and true is an acceptable statement. There are other logical operators in Boolean algebra that function with the help of these fundamental logics, like NOR, NAND, XNOR, and XNAND.

Implications

Let p and q be two different statements or propositional variables. An important logical connectivity is an implication which is denoted as an arrow mark → . p → q means if p is true then q is true, but it doesn’t tell what would happen if p is false.  This just tells when p is true, q will also be true.

But for another condition, when p doesn’t imply q, the implication p → q is false, p must be true, and q may be false. If p is false, p → q does not give any sensible result. If p is true and q is false, then the result is false. Now, we can convert this into a truth table format:

Bi-Conditional

Let p and q be two different statements or propositional variables. The bi-conditional logical connectivity tells that when two variables are denoted like p q, it is p if and only if q, which means either p and q together should be true or neither p nor q are true; that is, both are false. This is more like equality between two variables, and this logical connector is the conditional statement. The truth table for the bi-conditional operator p ↔ q is as follows:

Note: All these operators — conjunction, disjunction, negation, bi-conditional, and implication — are right-associative, and parenthesis are generally used to remove the uncertainty known as disambiguation.

Tautologies

A statement that is always true is called a tautology. If the tautology is proved and accepted, then this statement can be used anywhere for any kind of interpretation. For example, the color of the balloon is either green or blue. This is true regardless of the color of the balloon. A formula that is neither a tautology nor a contradiction is said to be logically contingent. They play a fundamental role in propositional logic.

First-Order Logic

In mathematics, there is a necessity to reason out multiple objects and their properties based on various conditions. This first-order logic is a symbolized reason where each statement is broken down into a subject and predicate. The predicates are the properties of that particular subject. These logics are used in calculus, which is often known as logical calculus. These logics were first used in computer programming. For example, consider a subject that is denoted as x. Let the first statement A predicts that “it is an apple”, B predicts that “it is a fruit”, C predicts that “it is sweet”, and D predicts that “it is healthy”. As per first-order logic demotion:

$\forall$is the representation meaning “for all” $\forall x:Ax⇒Bx$, which means for all x, if x is an apple, then it is a fruit. Similarly, it applies for the others,$Bx⇒Cx$, $Ax⇒Cx$, $Ax⇒Dx$.

Some Important Logical Laws that are Used in Set Theory and Boolean Algebra

• Commutative law: A mathematical law in logic where changing the sequence of operation does not have any effect on the output.
• Associative law: A mathematical law in logic where the placement of the parenthesis doesn’t matter and the order in which logic operation is performed is irrelevant but the output is the same.
• Distributive law: A mathematical law in logic where if two variables are added and the result is multiplied with another variable, then the result is the same value as the addition of the product of the last variable with each of the first two individual variables.
• De Morgan’s law: A mathematical law in which the complement of the product of all the variables is equal to the sum of the complements of each of them. Compliment means the inversion of the condition.

Practice Problems

1. Consider the following statements:

p:       Taj mahal is in Uttar Pradesh.

q:       Delhi is the capital of Uttar Pradesh.

r:        Agra is a very cold city next to the Himalayas.

The statement p is true, q is false. Represent each of the statements by a logical propositional formula. What is their true value if r is true? What if r is false?

Step 1: Write the propositional formula.

The statement $p$ is true, so the propositional formula for the statement can be written as $p$.

The statement $q$ is true, so the propositional formula for the statement can be written as $~q$.

The truth-value of $p$ and $q$ does not depend on the truth-value of $r$. So, if $r$ is true, the truth value of $p$ remains true and the truth value of $q$ remains false.

Similarly, the truth value of $p$ remains true and the truth value of $q$ remains false if $r$ is false.

Step 2: Determine the truth values of the following statements. Consider x and y to be real numbers.

The product $xy=0$ if and only if $x=0$.

The sum of squares ${x}^{2}+{y}^{2}=0$ if and only if $x=0$and $y=0$.

$xy\ne 0$ if and only if x and y are both positive.

Step 1: Draw the truth table for the first statement.

If two statements $p$ and $q$ are connected by the connective ‘if and only if’ then the resulting compound statement “$p$ if and only if $q$” is called a biconditional of $p$ and $q$ and is written in symbolic form as$p↔q$.

Consider the statement $xy=0$ as $p$ and $x=0$ as $q$.

Use the fact that the biconditional statement is true whenever the two statements have the same truth value, otherwise, it is false to draw the truth table.

 $\rho$ $q$ 1 1 1 1 0 0 0 1 0 0 0 1

Step 2: Draw the truth table for the second statement.

Consider the statement ${x}^{2}+{y}^{2}=0$ as $p$, $x=0$ as $q$ and $y=0$ as $r$.

If two statements $p$ and $q$ are connected by the connective ‘and’, then in symbolic form it is written as$p\wedge q$.

Use the fact that the "and" statement is true whenever the two statements are true, otherwise, it is false to draw the truth table for $q\wedge r$.

Use the fact that the biconditional statement is true whenever the two statements have the same truth value, otherwise, it is false to draw the truth table.

 $p$ $q$ $r$ $q\wedge r$ $p↔\left(q\wedge r\right)$ 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1

Step 3: Draw the truth table for the third statement.

Consider the statement $xy\ne 0$ as $p$, ‘$x$ is positive’ as $q$ and ‘$y$ is positive’ as $r$.

Use the fact that the "and" statement is true whenever the two statements are true, otherwise, it is false to draw the truth table for $q\wedge r$.

Use the fact that the biconditional statement is true whenever the two statements have the same truth value, otherwise, it is false to draw the truth table.

 $p$ $q$ $r$ $q\wedge r$ $p↔\left(q\wedge r\right)$ 1 1 1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1

3) Consider a number n is even if and only if $n=2q$for some integer q. What is the logical conclusion for an odd number?

The successor of an even number is always an odd number. So, take the equation $n=2q$ and add 1 to both sides to obtain the expression for odd number.

$n+1=2q+1$

Hence, if $q$ is an integer, $m=2q+1$is an odd number, where $m=n+1$.

Context and Applications

This topic is significant in the professional exams for both undergraduate and graduate courses, especially for:

• Bachelors of Science in Mathematics
• Masters of Science in Mathematics

Want more help with your math homework?

We've got you covered with step-by-step solutions to millions of textbook problems, subject matter experts on standby 24/7 when you're stumped, and more.

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
Math

Mathematical Logic

• Copyright, Community Guidelines, DSA & other Legal Resources: Learneo Legal Center
• bartleby, a Learneo, Inc. business