Syntax and semantics are two complementary parts of formal logic. Syntax determines which symbol sequences are correctly formed according to the grammar of a logical language. It specifies how variables, connectives, quantifiers, and parentheses may be combined. Semantics assigns meanings to these expressions. In propositional logic, an interpretation assigns truth values to propositional variables. In predicate logic, an interpretation also specifies a domain and assigns meanings to predicates, functions, and constants. A formula can be syntactically correct without being true under every interpretation. This distinction is fundamental to understanding logical validity, satisfiability, and formal proof.
Syntax and Semantics of Logic
Syntax describes the formal structure and formation rules of logical expressions, while semantics describes their meanings and the conditions under which they are true.
p ∧ q — a syntactically formed propositional formula
I(p) ∈ {T, F} — propositional interpretation
M ⊨ φ — model M satisfies formula φ
M ⊭ φ — model M does not satisfy formula φ
Explanation
Variables
p, q: propositional variables
I: an interpretation
M: a logical structure or model
φ: a logical formula
⊨: semantic satisfaction
⊭: failure of semantic satisfaction
Example or application
The expression p ∧ q is syntactically well-formed. Its semantic value depends on the interpretation assigned to p and q. If both are true, the formula is true; otherwise, it is false.
Definition
Syntax is the set of formal rules governing the construction of logical expressions, whereas semantics is the study of the meanings and truth conditions of those expressions.
Purpose
To distinguish the formal construction of logical expressions from the interpretation of their meanings and truth.
Importance
This distinction is essential for defining well-formed formulas, evaluating logical statements, studying models, and understanding formal proof systems.
Learning Objectives
Define syntax and semantics.
Explain the difference between grammatical correctness and truth.
Recognize well-formed logical expressions.
Describe an interpretation in propositional logic.
Explain the role of models in predicate logic.
Key Concepts
Syntax
Semantics
Formation rules
Well-formed formula
Interpretation
Model
Satisfaction
Working Principle
Syntax checks whether an expression follows the formal construction rules. Semantics evaluates the expression by assigning meanings to its symbols and determining whether it is satisfied under a particular interpretation.
Process
Check whether the expression follows the formation rules.
Identify its logical components.
Specify an appropriate interpretation.
Assign meanings or truth values to the components.
Evaluate whether the complete expression is satisfied.
Applications
Designing formal logical languages
Building programming language parsers
Model checking
Automated theorem proving
Database semantics
Formal verification
Worked Example
Consider p → q. Syntactically, it is well-formed because two propositions are connected by implication. Under an interpretation where p = T and q = F, the formula is false. Under an interpretation where p = F and q = T, it is true. The expression's syntax remains unchanged while its semantic value changes.
Common Misconceptions
A syntactically correct formula is not necessarily true.
Syntax does not determine the real-world meaning of every symbol.
Semantics requires an interpretation or model.
A formula can be true in one model and false in another.
Practice Questions
Define syntax and semantics in mathematical logic.
What is a well-formed formula?
Can a syntactically correct formula be false? Explain.
What is an interpretation in propositional logic?
How does a model help determine the truth of a predicate formula?
Key Takeaway
Syntax determines how logical expressions are formed, while semantics determines what those expressions mean and when they are true.
Prerequisites
Logical Expressions and Formulas
Truth Values and Logical Interpretation
Mathematical Language and Formal Notation
Reference
A Mathematical Introduction to Logic — Herbert B. Enderton
Mathematical Logic — Joseph R. Shoenfield
Related Topics
Logical Expressions and Formulas
Logical Validity and Logical Truth
Satisfiability and Unsatisfiability
Logical Consequence
Sources and verification
Sources are shown as provided in the project data. Not every source has yet been independently verified. Please report errors or missing citations.
- Source verification pending; check an authoritative textbook, university, standards body, or peer-reviewed source.
Suggest a correction or source · More in Mathematical Logic & Set Theory