Definition of well-formed formulae
Introduction / Definition
A well-formed formula (WFF) is an expression constructed according to the grammar of a formal language. WFF rules prevent ambiguous or malformed expressions. They define which strings can be interpreted as logical statements. WFF syntax is separate from whether the formula is true.
Syntax / Mathematical Form
Atom ::= p|q|r; if φ,ψ are WFF then ¬φ and (φ∧ψ) are WFF
Detailed Explanation
The grammar is recursive: start with atomic formulas and repeatedly apply formation rules. Anything not generated by the grammar is not a WFF.
Example / Worked Example
(P∧Q) and ¬P are WFFs under the grammar; ∧PQ is not.
Output / Result
The first two expressions are well formed; ∧PQ is not.
Important Points / Notes
- WFF is a syntactic concept.
- A WFF may still be false.
- Grammar determines validity of form.
Mini Practice Question
Give one WFF and one non-WFF using P and Q.