Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Mathematical Logic Formulas

Logical Equivalences
De Morgan's Laws
Inference Rules
Logical Laws
Quantifier Rules

Logical Equivalences






Double Negation Law



Formula:

¬(¬P)=P\neg(\neg P) = P
Negating something twice brings you back to where you started. Saying 'not not P' is just another way of saying 'P'. It's like undoing a negative to get back to the original statement.
Any statement or proposition
Negation operator, meaning 'not'
The negation of the negation of P
If it's not not raining, then it is raining.
Simplifying logical expressions, making proofs clearer





Implication As Disjunction



Formula:

PQ=¬PQP \rightarrow Q = \neg P \lor Q
Saying 'if P then Q' is the same as saying 'either not P or Q'. It's a way to express implications using 'or'.
Statements or propositions
Logical 'implies' operator
Negation operator
Logical 'or' operator
If it's raining, then the ground is wet equals either it's not raining or the ground is wet.
Rewriting logical implications, simplifying expressions in logic circuits





Contrapositive



Formula:

PQ=¬Q¬PP \rightarrow Q = \neg Q \rightarrow \neg P
An implication is equivalent to its contrapositive. So 'if P then Q' means the same as 'if not Q then not P'.
Statements or propositions
Logical 'implies' operator
Negation operator
If the alarm rings, then I wake up equals if I don't wake up, then the alarm didn't ring.
Proof techniques, logical reasoning in arguments





Biconditional Definition



Formula:

PQ=(PQ)(QP)P \leftrightarrow Q = (P \rightarrow Q) \land (Q \rightarrow P)
Saying 'P if and only if Q' means both 'if P then Q' and 'if Q then P' happen together.
Statements or propositions
Logical 'if and only if' operator
Logical 'implies' operator
Logical 'and' operator
I will go if and only if you go equals if I go then you go, and if you go then I go.
Defining equivalence, constructing precise statements

De Morgan's Laws






De Morgan's Law (Conjunction)



Formula:

¬(PQ)=¬P¬Q\neg(P \land Q) = \neg P \lor \neg Q
The negation of 'P and Q' is the same as 'not P or not Q'. Denying an 'and' statement turns it into an 'or' statement with both parts negated.
Statements or propositions
Logical 'and' operator
Logical 'or' operator
Negation operator, meaning 'not'
Not (I'm awake and it's sunny) equals (I'm not awake or it's not sunny).
Transforming logical statements, simplifying conditions in programming





De Morgan's Law (Disjunction)



Formula:

¬(PQ)=¬P¬Q\neg(P \lor Q) = \neg P \land \neg Q
Negating 'P or Q' turns it into 'not P and not Q'. So, denying an 'or' statement gives you an 'and' statement where both parts are negated.
Statements or propositions
Logical 'or' operator
Logical 'and' operator
Negation operator, meaning 'not'
Not (I'll go or you'll stay) equals (I won't go and you won't stay).
Simplifying logic in proofs, refining search queries

Logical Laws






Distributive Law (Conjunction Over Disjunction)



Formula:

P(QR)=(PQ)(PR)P \land (Q \lor R) = (P \land Q) \lor (P \land R)
You can distribute 'and' over 'or' just like multiplication over addition in arithmetic.
Statements or propositions
Logical 'and' operator
Logical 'or' operator
It's hot and (sunny or humid) equals (hot and sunny) or (hot and humid).
Simplifying logical expressions, designing logical circuits





Distributive Law (Disjunction Over Conjunction)



Formula:

P(QR)=(PQ)(PR)P \lor (Q \land R) = (P \lor Q) \land (P \lor R)
Similarly, 'or' can distribute over 'and', like addition over multiplication in arithmetic.
Statements or propositions
Logical 'or' operator
Logical 'and' operator
I will eat or (you cook and we have ingredients) equals (I will eat or you cook) and (I will eat or we have ingredients).
Breaking down complex conditions, optimizing logical formulas





Identity Law (Conjunction)



Formula:

PTrue=PP \land \text{True} = P
Anything 'and' true is just that thing. True doesn't change the outcome when using 'and'.
Any statement or proposition
Logical 'and' operator
Logical constant representing truth
It's raining and true equals it's raining.
Simplifying expressions, removing redundant conditions





Identity Law (Disjunction)



Formula:

PFalse=PP \lor \text{False} = P
Anything 'or' false is just that thing. False doesn't affect the outcome when using 'or'.
Any statement or proposition
Logical 'or' operator
Logical constant representing falsehood
It's raining or false equals it's raining.
Simplifying logical statements, cleaning up expressions





Domination Law (Conjunction)



Formula:

PFalse=FalseP \land \text{False} = \text{False}
Anything 'and' false is always false. Since one part is false, the whole expression is false.
Any statement or proposition
Logical 'and' operator
Logical constant representing falsehood
It's raining and false equals false.
Simplifying expressions, understanding contradictions





Domination Law (Disjunction)



Formula:

PTrue=TrueP \lor \text{True} = \text{True}
Anything 'or' true is always true. Since one part is true, the whole expression is true.
Any statement or proposition
Logical 'or' operator
Logical constant representing truth
It's raining or true equals true.
Simplifying logical statements, understanding tautologies





Idempotent Law (Conjunction)



Formula:

PP=PP \land P = P
Doing 'and' with the same thing doesn't change anything. It's like repeating yourself.
Any statement or proposition
Logical 'and' operator
I'm hungry and I'm hungry equals I'm hungry.
Simplifying redundant expressions, optimizing logic circuits





Idempotent Law (Disjunction)



Formula:

PP=PP \lor P = P
Doing 'or' with the same thing doesn't change anything. It's like offering the same choice twice.
Any statement or proposition
Logical 'or' operator
I'll study or I'll study equals I'll study.
Removing redundancies, simplifying choices





Law Of Excluded Middle



Formula:

P¬P=TrueP \lor \neg P = \text{True}
A statement is either true or not true. There's no middle ground.
Any statement or proposition
Logical 'or' operator
Negation operator
Logical constant representing truth
It is either raining or not raining.
Fundamental principle in classical logic, binary reasoning





Law Of Non-Contradiction



Formula:

P¬P=FalseP \land \neg P = \text{False}
A statement can't be both true and not true at the same time.
Any statement or proposition
Logical 'and' operator
Negation operator
Logical constant representing falsehood
I can't be both asleep and not asleep simultaneously.
Ensuring consistency in arguments, detecting contradictions

Quantifier Rules






Negation Of Quantifiers (Universal)



Formula:

¬(xP(x))=x¬P(x)\neg (\forall x\, P(x)) = \exists x\, \neg P(x)
Saying 'not all x are P' means 'there exists at least one x that's not P'.
Universal quantifier meaning 'for all'
Existential quantifier meaning 'there exists'
Elements in a domain
A property or condition involving x
Negation operator
Not everyone is tall means there is someone who is not tall.
Transforming statements in proofs, logic in mathematical arguments





Negation Of Quantifiers (Existential)



Formula:

¬(xP(x))=x¬P(x)\neg (\exists x\, P(x)) = \forall x\, \neg P(x)
Saying 'there is no x such that P(x)' means 'for all x, not P(x)'.
Existential quantifier meaning 'there exists'
Universal quantifier meaning 'for all'
Elements in a domain
A property or condition involving x
Negation operator
There is no solution means all options fail.
Negating statements in proofs, logical reasoning

Inference Rules






Universal Instantiation



Formula:

xP(x)P(c)\forall x\, P(x) \rightarrow P(c)
If something is true for everything, it's true for any specific thing.
Universal quantifier meaning 'for all'
Elements in a domain
A property or condition involving x
The property applied to a specific element c
A specific element in the domain
Logical 'implies' operator
All birds can fly implies that this specific bird can fly.
Applying general truths to specific cases





Existential Generalization



Formula:

P(c)xP(x)P(c) \rightarrow \exists x\, P(x)
If something is true for a specific case, then there exists at least one case where it's true.
Existential quantifier meaning 'there exists'
Elements in a domain
A property or condition involving x
The property applied to a specific element c
A specific element in the domain
Logical 'implies' operator
This apple is red implies there exists a red apple.
Building general statements from specific examples





Modus Ponens



Formula:

From (PQ)(P \rightarrow Q) and PP, infer QQ
If 'P implies Q' and 'P is true', then 'Q must be true'. It's a basic rule of logical deduction.
Statements or propositions
Logical 'implies' operator
If it's raining, then the ground is wet. It's raining, so the ground is wet.
Basic logical deduction, reasoning in proofs





Modus Tollens



Formula:

From (PQ)(P \rightarrow Q) and ¬Q\neg Q, infer ¬P\neg P
If 'P implies Q' and 'Q is false', then 'P must be false' too.
Statements or propositions
Logical 'implies' operator
Negation operator
If I study, I'll pass the test. I didn't pass, so I didn't study.
Deductive reasoning, problem-solving in logic





Hypothetical Syllogism



Formula:

From (PQ)(P \rightarrow Q) and (QR)(Q \rightarrow R), infer (PR)(P \rightarrow R)
If 'P leads to Q' and 'Q leads to R', then 'P leads to R'. It's a chain of logical implications.
Statements or propositions
Logical 'implies' operator
If I wake up early, I'll go jogging. If I go jogging, I'll feel good. So, if I wake up early, I'll feel good.
Building logical arguments, planning sequences of events





Disjunctive Syllogism



Formula:

From (PQ)(P \lor Q) and ¬P\neg P, infer QQ
If 'P or Q' is true and 'P is false', then 'Q must be true'.
Statements or propositions
Logical 'or' operator
Negation operator
Either I will have tea or coffee. I won't have tea, so I'll have coffee.
Making decisions, eliminating possibilities