Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Propositional Logic





Propositional Logic: An Overview

Propositional logic examines statements that are either true or false, focusing on how these are combined using operators. It forms a foundational sub-field of mathematical logic alongside first-order logic, higher-order logic, and others. This formal system represents and analyzes statements with definite truth values.
Syntax defines the formal structure with propositions and logical connectives.
Semantics determines truth values using truth tables, identifying tautologies and contradictions.
Equivalences include laws like De Morgan's and distributive laws for simplification.
Inference Rules such as modus ponens enable step-by-step proofs.
Normal Forms provide standard representation methods like CNF and DNF.
Proof Techniques include contradiction and direct proof methods to validate arguments.
This logical system finds applications across mathematics, computer science (circuit design, program verification), artificial intelligence (knowledge representation), philosophy, and many other fields.



Basic laws of Propositional Logic

Understanding Propositional Logic Laws

Fact: Relay circuits obey these laws
In his 1937 master's thesis at MIT, Claude Shannon showed that switches in series behave like ∧\land and switches in parallel like ∨\lor. The laws of Boole's 1854 algebra of logic could then simplify a relay circuit on paper before it was built.
Propositional logic provides a powerful framework for formal reasoning, and at its core are several fundamental laws that help us manipulate logical expressions.
On this page we aggregated a summary of these laws and rules.
They may be grouped into families based on their logical functions:
Basic Operators: Identity, Domination, and Idempotent laws establish how basic operations behave with constants and themselves
Structural Laws: Commutative, Associative, and Distributive laws govern how expressions can be rearranged
Transformation Rules: Double Negation, De Morgan's Laws, and Absorption laws help convert between different logical forms
Semantic Principles: Negation laws represent fundamental truths about contradictions and the law of excluded middle
Implications: Contrapositive and Conditional laws help reason through logical implications
Special Operators: Exclusive OR laws define the behavior of XOR operations
Advanced Principles: Resolution, Monotonicity, and Peirce's Law provide powerful tools for formal proofs
Each law is presented with its formal notation, a plain-language explanation, and its relevant topic area (such as Equivalences, Semantics, Normal Forms, or Proof Techniques). This organization makes it easier to find specific laws when constructing proofs or simplifying expressions.
Whether you're working on simplifying complex logical statements, converting expressions to normal forms, or building formal proofs, these laws provide the essential toolkit for manipulating propositional logic expressions with confidence and precision.
Learn More

Syntax

The syntax of propositional logic establishes the formal rules for constructing well-formed formulas—similar to how grammar determines what constitutes a valid sentence in natural language. Unlike semantics, which concerns itself with truth and meaning, syntax focuses purely on form and structure. It defines the alphabet of symbols, the valid combinations of these symbols, and the rules for building increasingly complex expressions, all without reference to what these expressions might represent in the real world. Syntax answers the fundamental question: "Is this a properly formed logical statement?" regardless of whether that statement is true, false, or meaningful.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
Guidelines for constructing valid logical expressions.Symbols that combine or modify atomic propositions.Formation RulesValid and structured logical expressions.Atomic PropositionsLogical ConnectivesWell-formed FormulasParenthesesThe basic building blocks of logical statements.Tools for maintaining clarity in complex logical expressions.Propositional Logic Syntax
Propositional logic syntax is built from atomic propositions (e.g., 'P', 'Q', 'R') — the indivisible units of meaning. These are combined using logical connectives such as '¬', '∧', '∨', '→', and '↔', which form more complex expressions. A well-formed formula (WFF) is any expression built according to the formation rules, which define how formulas can be recursively constructed from simpler components. Parentheses are essential for maintaining clarity, especially when multiple connectives are involved, ensuring expressions are structurally unambiguous.

In addition to these core concepts, syntax trees are used to visually represent the hierarchical structure of formulas, and structural induction is a key proof method for demonstrating properties of formulas (e.g., that all formulas have finite depth). These tools help validate and analyze the form of logical statements without reference to their truth value — staying fully within the domain of syntax.
Learn More

Semantics

In propositional logic, semantics refers to the study of the meaning of logical formulas. While syntax concerns itself with the formal structure and the rules for constructing well-formed formulas (WFFs), semantics addresses how these formulas are interpreted and how their truth-values are determined within a given model. The semantic analysis of logic allows us to rigorously define concepts such as truth, satisfiability, validity, and logical equivalence, which are central to formal reasoning.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
Logical ImplicationAssigning truth values to propositionsModelsOne proposition guaranteeing the truth of anotherInterpretations that make propositions truePropositions always false regardless of truth valuesTruth AssignmentsLogical EquivalenceSatisfiabilityTautologiesPropositions that can be true under some truth assignmentsPropositions always true regardless of truth valuesContradictionsCore Semantic Concepts in Propositional LogicPropositions with identical truth values under all assignments

Truth values: T (true), F (false)

Interpretations / Models: Assignments of truth values to variables

Truth tables: Show truth values under all possible interpretations

Semantic equivalence: e.g., P → Q ≡ ¬P ∨ Q

Tautology / Contradiction / Contingency

Model: An interpretation where a formula is true

Satisfiability: Whether a formula is true in some interpretation
Learn More

Properties of Propositions

Propositions in classical logic have several important properties.
Here are a few key ones:

1.Logical Equivalence:


Two propositions PP and QQ are logically equivalent (denoted P≡QP≡Q) if they have the same truth value in every possible interpretation.
Example
                                                P∨Q≡Q∨PP∨Q≡Q∨P
(Commutativity of disjunction)
Read more about equivalence.

2.Consistency & Inconsistency:


A set of propositions is consistent if it is possible for all of them to be true at the same time.
A set of propositions is inconsistent if they cannot all be true simultaneously (i.e., they lead to a contradiction).
Example
The set {"It is raining", "It is not raining"} is inconsistent.
The set {"It is raining", "The ground is wet"} is consistent.
Pitfall: Checking the members one at a time
Each of P∨QP \lor Q, ¬P\neg P, ¬Q\neg Q is satisfiable on its own, yet the set is not consistent: ¬P\neg P and ¬Q\neg Q force P=Q=FP = Q = F, where P∨QP \lor Q is F. No row makes all three true, so the set is inconsistent.
To test a set for consistency, list every interpretation of its variables and evaluate all members of the set in each one. The set is consistent exactly when at least one row shows T for every member at once. A single such row is enough, and if there is none, the set is inconsistent.

3.Implication (Entailment / Logical Consequence):


A proposition QQ is a logical consequence of PP (denoted P⊨QP⊨Q — the double turnstile, one of the standard logic symbols) if whenever PP is true, QQ must also be true.
Example
                                                P=P= "It is raining."
                                                Q=Q= "It is raining or it is snowing."
Whenever PP is true, QQ is true as well, so QQ logically follows from PP. By contrast, "The ground is wet" does not follow from PP by logic alone: it is a fact about the world, not about the form of the sentences.
Pitfall: Reversing the entailment
From P⊨P∨QP \models P \lor Q, concluding P∨Q⊨PP \lor Q \models P fails at the row P=FP = F, Q=TQ = T, where P∨QP \lor Q is T and PP is F. The entailment holds in one direction only.
To check a claim P⊨QP \models Q, go through the interpretations in which PP is true and confirm that QQ is true in each of them. Rows in which PP is false place no demand on QQ, so they can be skipped. The two propositions play different roles: PP selects the rows, and QQ is tested in them.
Read more about logical implications.

4. Independence:


A proposition is independent of another if neither one logically determines the truth value of the other.
Example
"It is raining" and "The stock market is up" are independent because knowing one does not tell us anything about the other.

5.Validity & Invalidity:


A proposition is valid if it is true in all possible interpretations (i.e., a tautology).
A proposition is invalid if it is not true in all interpretations (i.e., it is either a contingency or a contradiction).

Pitfall: Reading invalid as always false
Calling P→QP \to Q always false because it is invalid ignores the row P=FP = F, Q=FQ = F, where it is T. Invalid only means false in at least one row (here P=TP = T, Q=FQ = F); P→QP \to Q is a contingency and is satisfiable.
Validity is an important concept in logic because valid statements are universally true, meaning they hold regardless of the truth values of their components.

6.Satisfiability & Unsatisfiability:


A proposition is satisfiable if there is at least one interpretation where it is true (i.e., a tautology or a contingency).
A proposition is unsatisfiable if it is false in all possible interpretations (i.e., a contradiction).

Proof System


    Hilbert Proof System in Propositional Logic


    A. Axioms (3 Schemas)


    A1: A → (B → A)

    Self-evidence axiom: Any proposition implies that any other proposition implies the first one. This captures the idea that if something is true, it remains true regardless of what other assumptions you make.

    A2: (A → (B → C)) → ((A → B) → (A → C))

    Distribution axiom: If A implies that B implies C, and A also implies B, then A must imply C directly. This enables chain reasoning and logical distribution.

    A3: (¬B → ¬A) → (A → B)

    Contrapositive axiom: If the negation of B implies the negation of A, then A implies B. It gives one direction of the equivalence between a statement and its contrapositive; the other direction, from "A implies B" to "not B implies not A", is provable from the axioms.

    Pitfall: Taking the inverse for the contrapositive
    Writing ¬A→¬B\neg A \to \neg B as the contrapositive of A→BA \to B fails at the row A=FA = F, B=TB = T: there A→BA \to B is T but ¬A→¬B\neg A \to \neg B is F. The contrapositive is ¬B→¬A\neg B \to \neg A, which matches A→BA \to B in every row.
    In A3 the two letters change places as they gain their negations: BB, the consequent of the conclusion A→BA \to B, stands negated before the arrow in the hypothesis, and AA stands negated after it. With AA = "it rains" and BB = "the ground is wet", the hypothesis reads "if the ground is not wet, then it does not rain", and the conclusion reads "if it rains, the ground is wet".

    B. Premises


    Definition

    Premises are the starting assumptions in a proof. They serve as the foundation from which conclusions are derived.

    Types:

    1. Logical premises: The axiom schemas above, universally valid
    2. Domain premises: Specific assumptions given for a particular proof
    3. Temporary premises: Assumptions made for conditional or indirect proofs

    Role in proofs:

    Premises establish the initial truth conditions. All subsequent steps must follow logically from these starting points using valid inference rules.

    C. Inference Rules


    Modus Ponens (MP)

    Rule: From A and A → B, derive B
    Purpose: The only inference rule needed in pure Hilbert systems. It allows you to detach the consequent of an implication when you have both the implication and its antecedent.

    Substitution (Implicit)

    Rule: Replace variables in axiom schemas with any well-formed formulas
    Purpose: Generates specific instances of the general axiom patterns for use in particular proofs.

    Proof Construction

    Pitfall: Affirming the consequent
    Deriving AA from A→BA \to B and BB is not modus ponens: at the row A=FA = F, B=TB = T both premises are T while AA is F. Modus ponens needs the antecedent AA, and then gives BB.
    A proof is a finite sequence of formulas where each formula is either:
  • A premise (axiom or assumption)
  • Derived from previous formulas by Modus Ponens

  • The system is complete (proves all tautologies) and sound (proves only tautologies).

    Even a formula as plain as A→AA \to A is not an axiom here, so it has to be derived. Every line of the derivation must be an instance of A1, A2 or A3, or follow from two earlier lines by modus ponens; nothing else may be written down, however obvious it looks.

    Fact: Five lines to prove A→AA \to A
    The usual derivation of A→AA \to A in this system takes five lines: one instance of A2, with A→AA \to A in place of BB and AA in place of CC, two instances of A1, and modus ponens twice. With three axioms and one rule, even the most obvious tautology is built step by step.

    A proof in this system may be long, but checking it is mechanical. Each line is compared with the three axiom patterns, or with two earlier lines and the shape of modus ponens. No idea of what the formulas mean is needed for the check, which is why such proofs can be verified by a computer.

    Three axiom patterns and one rule are enough to prove every tautology, and nothing but tautologies.

Common Pitfalls

Five slips account for many wrong answers on the topics of this page. Each is marked where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.

Checking the members one at a time

A set is tested for consistency by looking at each proposition separately: every member can be made true by some row, so the set is called consistent. Consistency asks for one row that makes all members true together.

Wrong working: for {P∨Q,¬P,¬Q}\{P \lor Q, \neg P, \neg Q\}, P∨QP \lor Q is T at P=TP = T, ¬P\neg P is T at P=FP = F, and ¬Q\neg Q is T at Q=FQ = F. Each member is satisfiable, so the set is called consistent.

Right working: ¬P\neg P and ¬Q\neg Q are both T only in the row P=FP = F, Q=FQ = F. In that row P∨QP \lor Q is F. No row makes all three members T, so the set is inconsistent.

Why it happens: each member is checked against its own best row, and the rows are never compared. The definition speaks of all members being true at the same time, and that phrase is easy to skip.

How to check: write one truth table with a column for every member and look for a single row with T in all of them. If the conjunction of the members is a contradiction, as (P∨Q)∧¬P∧¬Q(P \lor Q) \land \neg P \land \neg Q is, the set is inconsistent.

Reversing the entailment

Having shown P⊨QP \models Q, the learner treats it as also giving Q⊨PQ \models P. Entailment, like the conditional, has a direction; it holds both ways only when PP and QQ are equivalent.

Wrong working: in every row where PP is T, P∨QP \lor Q is T, so P⊨P∨QP \models P \lor Q. Therefore P∨Q⊨PP \lor Q \models P as well.

Right working: test P∨Q⊨PP \lor Q \models P on the rows where P∨QP \lor Q is T, which are (T,T)(T, T), (T,F)(T, F) and (F,T)(F, T) for (P,Q)(P, Q). In the row P=FP = F, Q=TQ = T, P∨QP \lor Q is T and PP is F, so P∨Q⊭PP \lor Q \nvDash P.

Why it happens: "follows from" is heard as "goes together with", and entailment is mixed up with equivalence, P≡QP \equiv Q, which does work in both directions.

How to check: reverse the claim and run the same row test; one row where the new premise is T and the new conclusion is F settles it. P⊨QP \models Q and Q⊨PQ \models P hold together exactly when P≡QP \equiv Q.

Reading invalid as always false

"Invalid" is read as "false", so an invalid formula is treated as a contradiction. Invalid only means not true in every interpretation; most invalid formulas are contingencies, true in some rows and false in others.

Wrong working: P→QP \to Q is not a tautology, since it is F at P=TP = T, Q=FQ = F. So it is invalid, therefore always false and unsatisfiable.

Right working: for (P,Q)(P, Q) equal to (T,T)(T, T), (T,F)(T, F), (F,T)(F, T), (F,F)(F, F), the formula P→QP \to Q takes the values T, F, T, T. One F makes it invalid; three T values make it satisfiable. It is a contingency.

Why it happens: in everyday speech "invalid" sounds like "wrong", and the pairs valid/invalid and satisfiable/unsatisfiable are mixed up. They split the formulas at different places: invalid covers contingencies and contradictions, unsatisfiable covers contradictions only.

How to check: find one row where the formula is T. If such a row exists, the formula is satisfiable and cannot be a contradiction, whether or not it is valid.

Taking the inverse for the contrapositive

Asked for the contrapositive of A→BA \to B, the learner negates both parts but keeps their order, writing ¬A→¬B\neg A \to \neg B. That formula is the inverse, and it is not equivalent to A→BA \to B.

Wrong working: A→BA \to B is "if it rains, the ground is wet". Its contrapositive is taken to be "if it does not rain, the ground is not wet", that is ¬A→¬B\neg A \to \neg B.

Right working: negate both parts and swap them, giving ¬B→¬A\neg B \to \neg A, "if the ground is not wet, it does not rain". Axiom A3, (¬B→¬A)→(A→B)(\neg B \to \neg A) \to (A \to B), has this form. In the row A=FA = F, B=TB = T, the formula A→BA \to B is T while ¬A→¬B\neg A \to \neg B is T→FT \to F, which is F.

Why it happens: negating each part looks like the whole change, and the swap is easy to forget. The inverse ¬A→¬B\neg A \to \neg B is the contrapositive of the converse B→AB \to A, so it is equivalent to the converse, not to the original.

How to check: compare the two formulas in the row where the original antecedent is F and the original consequent is T. A→BA \to B is T there, and a correct contrapositive must be T there too.

Affirming the consequent

Modus ponens is applied backwards: from the implication A→BA \to B and its consequent BB, the antecedent AA is derived. The rule only allows the step from AA and A→BA \to B to BB.

Wrong working: line 1 is A→BA \to B (premise), line 2 is BB (premise), and line 3 is AA, by modus ponens from lines 1 and 2.

Right working: modus ponens needs the antecedent as a line of the proof. With A→BA \to B and AA on earlier lines, it gives BB. From A→BA \to B and BB nothing about AA follows: in the row A=FA = F, B=TB = T both premises are T and AA is F.

Why it happens: the extra line BB is matched with the implication as if either of its two parts would do. Everyday arguments such as "the ground is wet, so it rained" make the backward step feel natural.

How to check: before citing modus ponens, confirm that one of the cited lines is exactly the part before the arrow of the other. If the cited line is the part after the arrow, the step is not modus ponens.

Propositional Logic FAQ

What is a proposition in logic?

+
A proposition is a declarative statement that is either true or false — it has exactly one definite truth value, even if we do not know which. 'It is raining' and '7 is prime' are propositions; questions, commands, and exclamations are not, since they cannot be assigned a truth value. Propositional logic studies how such statements combine through connectives like AND, OR, and NOT.Read more →

What is logical consequence in propositional logic?

+
A proposition Q is a logical consequence of P, written P ⊨ Q, when every interpretation that makes P true also makes Q true — the truth of P guarantees the truth of Q. Unlike the connective P → Q, which is a formula that may be true or false, entailment is a claim about all interpretations at once. With several premises, Γ ⊨ Q means every model of the premises satisfies Q.Read more →

What is a Hilbert proof system?

+
A Hilbert system derives theorems from a minimal fixed base: three axiom schemas — A → (B → A), (A → (B → C)) → ((A → B) → (A → C)), and (¬B → ¬A) → (A → B) — plus one inference rule, modus ponens. A proof is a finite sequence of formulas, each an axiom instance, a premise, or a modus ponens result. The system proves exactly the tautologies.Read more →

What is the difference between soundness and completeness?

+
Soundness says a proof system proves only true things: every formula it derives is valid. Completeness says it proves all of them: every valid formula has a derivation. Together they guarantee that the syntactic notion 'provable' (⊢) and the semantic notion 'valid' (⊨) pick out exactly the same formulas. The two turnstiles are catalogued in tautology notation.Read more →

Does invalid mean always false in logic?

+
No. Invalid only means the formula is false in at least one row of its truth table, while a contradiction is false in every row. Most invalid formulas are contingencies: P→QP \to Q is invalid because it is F at P=TP = T, Q=FQ = F, yet it is T in the other three rows, so it is satisfiable. Invalid covers contingencies and contradictions; unsatisfiable covers contradictions only.Read more →

How do you prove A → A in a Hilbert system?

+
In five lines, since A→AA \to A is not an axiom. Take the A2 instance (A→((A→A)→A))→((A→(A→A))→(A→A))(A \to ((A \to A) \to A)) \to ((A \to (A \to A)) \to (A \to A)) and the A1 instance A→((A→A)→A)A \to ((A \to A) \to A); modus ponens gives (A→(A→A))→(A→A)(A \to (A \to A)) \to (A \to A). The A1 instance A→(A→A)A \to (A \to A) and modus ponens once more give A→AA \to A.Read more →