Skip to content

Well-Formed Formula

In mathematical logic, propositional logic, and predicate logic, a well-formed formula, abbreviated WFF or wff, often simply formula, is a finite sequence of symbols from a given alphabet, constructed following the defined grammar of a formal language.

Version
v1 · 2026-09-28 · History
Domain-specific #
7800
Origin domain
Mathematics, Logic, And Statistics

Core Idea

A well-formed formula (WFF) is a finite symbolic expression admitted by the formation rules of a specified formal language. It is a syntactic object: being well formed means that the expression has the grammatical structure required by the language, not that it is true, valid, satisfiable, meaningful under an interpretation, or provable in a deductive system. The language fixes an alphabet and a grammar. In propositional logic, propositional variables supply the atomic formulas, while recursive clauses form new formulas with negation and binary connectives.

How would you explain it like I'm…

Proper Symbol Sentences

In a language, words have to go together in the right order to make a proper sentence. A well-formed formula is a string of math or logic symbols put together following the rules, like a proper sentence. It can follow the rules and still be untrue.

A Grammatically Correct Formula

Math and logic use special symbol languages, and each one has grammar rules for how symbols can be put together. A well-formed formula is a string of symbols that follows those grammar rules, like a sentence that is grammatically correct. You start with simple pieces and build bigger formulas by joining them in allowed ways. Being well-formed doesn't mean the formula is true; a formula can be built perfectly and still say something false. And a string that follows one language's rules might break another language's rules.

Syntactically Correct Expression

A well-formed formula (WFF) is a finite string of symbols that the formation rules of a particular formal language allow. It is purely about syntax, the grammar of the language: being well formed doesn't make a formula true, valid, provable or even interpreted. The rules are recursive. In propositional logic, variables like p and q are basic formulas, and you can build bigger formulas by applying 'not' or connecting two formulas with 'and', 'or' and so on. In first-order logic, you first build terms and atomic formulas from the language's symbols, then use connectives and quantifiers. A string counts as a WFF only if it can be built this way; a string may be well formed in one language but not in another.

 

A well-formed formula is a finite symbolic expression admitted by the formation rules of a specified formal language; it is a syntactic object, so well-formedness is distinct from truth, validity, satisfiability, meaningfulness under an interpretation, or provability. A language fixes an alphabet and grammar. In propositional logic, propositional variables are atomic formulas and recursive clauses build compounds with negation and binary connectives. In first-order logic, a signature fixes constant, function and predicate symbols with their arities; terms are formed recursively, atomic formulas apply predicates to terms, and connectives and quantifiers build compound formulas. The WFFs are the smallest class closed under these constructors, so an expression qualifies only if it has a derivation from the base cases by the formation clauses. Well-formedness is relative to language, signature and notational convention; parentheses and precedence conventions can change surface form without changing the parsed formula. A string with misplaced operators or wrong arities is not a WFF, while a false formula can still be perfectly well formed.

Scope of Application

A well-formed formula applies wherever an explicitly specified formal language admits finite symbol sequences through declared atomic cases and recursive formula-formation rules. Its habitats are literal only relative to the language's alphabet, signature, arities, binding, and notation; semantic truth, satisfiability, and proof status begin after this syntactic admission test.

  • Propositional logic — propositional variables supply atomic formulas, while negation and binary connective clauses recursively generate compound WFFs.
  • First-order predicate logic — terms are generated first, predicates and equality form atomic formulas, and connectives plus quantifiers generate formulas under a declared signature and arities.
  • Modal and other formal logics — additional operators and formation clauses define their own formula classes without changing the grammar-relative admission principle.
  • Formal-language and grammar specification — Backus–Naur or comparable grammars state the constructors from which a parser can derive exactly the admitted expressions.

Clarity

Well-formed formula separates grammatical admissibility from every semantic and deductive property that may later be asked of an expression. A formula can be well formed yet false under an interpretation, unsatisfiable, invalid, or unprovable; it can also be well formed before any interpretation is supplied. Conversely, a string that suggests an intelligible proposition does not qualify if it cannot be generated by the formal language’s formation rules.

Manages Complexity

Formal expressions proliferate combinatorially even over a small alphabet. Well-formedness reduces that unbounded string space to the least class generated by a finite grammar: declared atomic cases plus recursively permitted constructors. A parser or logician therefore tracks the signature, symbol arities, formation clauses, and parse tree rather than comparing each candidate string with an enumerated list of acceptable formulas.

Abstract Reasoning

Well-formedness licenses recursive parsing and induction. To classify a string, a logician reasons from declared alphabet, signature, arities, binding convention, and formation rules → parse tree or precise point of failure. Leaves must be licensed atomic formulas or terms; each internal node must apply an allowed connective, quantifier, function, or predicate with the required number and kind of constituents.

Knowledge Transfer

Within formal logic, the well-formed-formula concept transfers literally across propositional, predicate, modal, and other formal languages when each language supplies an alphabet, arities, base expressions, and recursive formation rules. The cargo that carries intact is finite symbolic expression, syntactic derivation, parse structure, and the smallest class closed under the declared constructors. Diagnostics transfer by parsing from the grammar, checking symbol roles and arities, and separating formation from interpretation, satisfiability, validity, or proof.

Relationships to Other Abstractions

Local relationship map for Well-Formed FormulaParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Well-Formed FormulaDOMAINPrime abstraction: Formal System — presupposesFormal SystemPRIME

Current abstraction Well-Formed Formula Domain-specific

Parents (1) — outgoing typed relations

  • Well-Formed Formula presupposes Formal System Prime

    Well-Formed Formula presupposes Formal System: the parent's defining role is necessary to the child's frozen mechanism or criterion.

Hierarchy paths (2) — routes to 2 parentless roots

Neighborhood in Abstraction Space

Well-Formed Formula sits in a crowded region of the domain-specific corpus (31st percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Type Systems & Functional Constructs (20 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14