Use structural induction on the formation of a propositional formula. A propositional variable has no parentheses. Applying negation to a logical formula adds no parentheses, so preserves equality of the two counts. If and each have equally many opening and closing parentheses, the formation of adds one of each to their combined counts. Thus every propositional formula satisfies
This is a necessary condition for being a logical formula; it is not sufficient, since the logical connectives and the placement of symbols must also follow the formation rules.
Not a logical formula of this language. Logical disjunction is not one of its permitted logical connectives. Even though the displayed expression has an ordinary interpretation in a larger propositional language, membership in the specified formal language is a syntactic question. A logically equivalent logical formula using only negation and logical implication would have to be written with those symbols instead.
First note that a substring which is itself a logical formula must coincide with a subtree of the formula syntax tree of the surrounding logical formula. Indeed, a logical formula can begin only at a logical variable, a negation symbol or an opening parenthesis. Every such position in a valid logical formula is the start of one of its parsed subtrees. If is the logical formula at that subtree and is another logical formula starting at the same position, one is an initial segment of the other; prefix-freeness of fully parenthesized formulas from the preceding part forces .
Now consider a final subformula. For a logical variable, it can only be the whole logical formula. For a binary logical implication , every proper subtree is contained in or and finishes before the final closing parenthesis of the whole expression. It therefore cannot be a final substring of the whole. The only remaining possible outer formation is negation. Thus
The second alternative is a necessary possibility, not a claim that every negated logical formula has every one of its subformulas as a suffix.
A useful consequence of the formation rules is that logical formulas form a prefix-free set of strings. To see this, describe a deterministic parser that reads one logical formula from its starting position. On a logical variable it consumes that one symbol. On a negation symbol it recursively reads one following logical formula. On an opening parenthesis it recursively reads a left logical formula, requires a logical implication symbol, recursively reads a right logical formula, and requires the closing parenthesis. Induction on formation proves that, if a valid logical formula begins at the current position, this procedure consumes exactly that logical formula and stops at its end.
Suppose now that both and are logical formulas and . The same parser, started at their common first symbol, must stop both at the end of and at the end of . Its deterministic stopping position cannot differ, so is empty. Hence
This argument applies to symbol strings; it does not use truth values or logical equivalence.
The whole logical formula is a subformula of itself, and any subformula of remains a contiguous substring after placing a negation symbol in front of .
Conversely, a subformula occurrence starting at the first symbol of is an initial subformula, so equals the whole logical formula by prefix-freeness of fully parenthesized formulas. An occurrence starting later lies wholly inside the following string , and is therefore a subformula of . Consequently
Here records distinct logical formulas; multiple occurrences of the same logical formula do not create different elements of this set.
Fix any Boolean valuation . Logical equivalence of and means for this Boolean valuation and every other one. Follow the unique path from the replaced node to the root of the formula syntax tree. At a negation node, equal input truth values have equal negations. At a logical implication node, the unaffected child has the same truth value before and after subformula replacement, while the affected child has the same truth value by induction; the resulting logical implications therefore agree as well.
Induction along that finite path yields . Since was arbitrary,
This is the replacement theorem for logical equivalence: the semantics of each logical connective depends only on the truth values of its immediate inputs.
Translate logical formulas recursively, leaving propositional variables unchanged and translating negation by applying negation to the translation. For the other two logical connectives set
The first logical implication is false exactly when both original inputs are false; the second displayed logical formula is true exactly when both inputs are true. Hence each clause preserves truth values. Structural induction gives for every Boolean valuation and every logical formula in the larger language.
By the assumed functional completeness of negation, logical conjunction and logical disjunction, any finite Boolean function has such a logical formula . Its translation uses only negation and logical implication and represents the same function. Thus is adequate.
Gödel's completeness theorem for first-order sentences says that, in a standard sound first-order Hilbert calculus,
Equivalently every first-order consistent set of first-order sentences has a first-order model: apply this existence statement to for the consequence formulation.
For the first-order model existence formal proof use a Henkin construction. Enlarge the language by fresh constant symbols and adjoin Henkin witness axioms
Freshness of preserves first-order consistency. In detail, if a contradiction followed after adjoining one witness axiom, the deduction theorem for first-order logic would yield its negation, from which one obtains both and over the old theory. Since the new constant symbol does not occur in that theory or in , replace it by a fresh logical variable and generalize to derive , a contradiction. Finitely many witness additions preserve first-order consistency successively, and unions preserve first-order consistency because formal proofs are finite. Iterate the enlargement so that logical formulas involving newly introduced constant symbols also receive witnesses. Include at least one constant symbol to guarantee closed terms.
Extend the resulting first-order consistent witnessed first-order theory to a maximal consistent set of first-order sentences . In the equality-free case make the domain the set of closed terms. Interpret constant symbols and function symbols by their formal first-order term constructions; interpret an atomic formula by
The truth lemma for a Henkin term model follows by induction on logical formulas with closed terms substituted for their free variables. The logical connective steps use maximal consistency of a first-order theory. In the existential step, membership of supplies a witness constant and hence a first-order term satisfying ; conversely a satisfying closed term gives the existential sentence by an inference of the calculus. The term model consequently satisfies and the original theory. Equality is absent here, so distinct closed terms may remain distinct domain elements without further identifications.
Capture-safe equality replacement gives the corrected scheme:
where replaces selected free occurrences of by , without capture. One may equivalently use full capture-avoiding substitution, after renaming conflicting binders. Replacing bound occurrences as though they were free is not permitted.
Here is a syntactic proof. Write for . First derive symmetry under : A6 and A4 give , and A7 applied to the first position in that atomic equality gives . Modus ponens and the deduction theorem give . Atomic replacement in the forward direction is A7 itself; in the reverse direction apply A7 with exchanged and use this symmetry. Thus under , an atomic formula and its designated replacement imply each other.
Induct on the formation of , proving both directions simultaneously. For negation, the reverse implication for the immediate subformula gives the forward implication of its negations by contraposition, and vice versa. For , the two induction equivalences combine propositionally to . This uses only the propositional tautologies allowed in this part.
For , first take distinct from . From assumptions and , A4 gives , the induction hypothesis gives , and generalization gives : is free in neither open assumption. Discharge the two assumptions to obtain . The reverse direction is identical. If the binder is , no free occurrence of that variable lies beneath it and the replacement there is empty. If it is , capture avoidance likewise forbids a changed free below that binder unless the binder is first renamed to a fresh variable. Bound-variable renaming is derived from A4 followed by admissible generalization and A5, with the same freshness restriction. This completes the structural induction and proves the scheme for arbitrary formulas.
A first-order structure consists of a nonempty domain , an interpretation of each constant symbol, a total function for each -ary function symbol, and a relation for each -ary predicate symbol. Logical equality is interpreted as actual identity.
An assignment in a first-order structure is a map from the variables into . It extends recursively to terms: , , and . Atomic truth is determined by membership of the resulting tuple in , or equality of the two term values. Negation reverses the truth value, and an implication is false exactly when its antecedent is true and its consequent false.
For a universal quantifier,
These clauses define a valuation on every formula by structural recursion. Only free-variable values affect a formula's truth; consequently a sentence has the same truth value under every assignment. This is a semantic assignment of domain elements, not a programming assignment operation.
Adequacy here means functional completeness: every Boolean truth function of finitely many positive-arity propositional inputs can be expressed by a formula using the available connectives. It is an expressive-power claim, distinct from the completeness theorem relating derivability and semantic entailment.
Negation and implication define conjunction and disjunction by
Given any truth table, for each input row where its output is true form the minterm containing each input positively or negatively according to that row. The disjunction of these minterms is true on exactly the required rows: a disjunctive normal form. Replacing its conjunctions and disjunctions by the displayed definitions gives a formula using only .
The constantly true and constantly false functions are represented by and , using a dummy input if needed. Thus the empty or full truth table also causes no difficulty. If one insists on genuinely nullary formulas with no variables at all, a separate truth constant is needed; ordinary propositional adequacy allows the constant truth functions to be expressed with irrelevant input variables.
There are sixteen binary Boolean functions, one for each four-bit truth table. Exactly eight give an adequate basis together with negation.
The eight affine functions are . Each is affine over the field with two elements, and composition with other affine functions or negation remains affine. Since conjunction is not affine, none of these eight bases is adequate.
Each remaining truth table has either one true row or three true rows. In the latter case negate its output to obtain a function with one true row. Negate selected inputs to move that row to : the resulting function is conjunction. Conjunction together with negation expresses every disjunctive normal form, proving adequacy of all remaining eight. They are AND, NAND, OR, NOR, the two directed implications, and the two asymmetric conjunctions , . The count treats the binary connective by its truth function rather than by arbitrary choices of its printed symbol.
The first-order terms are the least collection containing every variable and constant and closed under formation of whenever has arity and the are terms. A closed term has no variables.
The first-order formulas are the least collection containing the atomic formulas and of the appropriate arities, and closed under negation, logical implication, and universal quantification: from formulas one may form , , and , with the chosen fully parenthesized grammar. Only finite expressions obtained by these rules are formulas. No additional strings belong to either collection.
Terms denote elements under an assignment in a first-order structure; formulas receive truth values in a first-order structure. The two syntactic categories have different formation rules even when they use some of the same punctuation.
The alphabet of a first-order language separates logical symbols from nonlogical symbols. In the standard presentation here the logical symbols are the variables , equality , negation , logical implication , the universal quantification , and the punctuation symbols parentheses and comma. The nonlogical symbols are constant symbols, function symbols of each specified finite arity, and predicate symbols of each specified finite arity, such as and .
Constants can equivalently be treated as zero-ary function symbols. Their arities belong to the language specification. Other logical connectives, and as an abbreviation for , need not be primitive alphabet symbols. This distinction matters in counting literal symbol occurrences.
A collection of logical connectives is adequate, or has functional completeness, if every Boolean function of finitely many propositional variables can be expressed by a formula using those connectives and variables, with the usual convention for nullary truth constants stated if those are included.
An adequate example is . An inadequate example is : formulas using logical implication alone preserve truth when every input is true, so cannot express negation. These examples concern truth functions, rather than mere syntactic formation of formulas.
The requested derivation does not follow from the printed axiom set. Use a two-valued matrix interpretation with ordinary material logical implication and designated value , but interpret the unary symbol by the constant function .
Every instance of the first axiom is valid. In the replacement axiom, both and have value , so its whole logical implication is valid as well. Modus ponens rule preserves the designated value. The deduction rule is sound for semantic consequence under this interpretation because logical implication is the ordinary truth-functional logical implication. Induction on derivations, allowing arbitrary sets of assumptions, therefore makes every theorem valid in this matrix.
But the old contraposition axiom has value
which is false when and . Consequently
This is a truth-matrix countermodel for a Hilbert axiom set. A nonstandard interpretation of a primitive symbol is legitimate for proving syntactic nonderivability: only preservation by the displayed axioms and rules is required. The source would need a stronger negation axiom or an extra negation principle to support its requested conclusion.
Let and . Temporarily assume , , and . Modus ponens rule first gives from and , then from and , and finally .
Apply the deduction theorem for propositional logic successively to discharge , then , then . The result is
the required axiom scheme. This derivation uses only assumptions, modus ponens rule, and the added deduction rule; no negation axiom is involved.
Suppose a structure satisfies every sentence of . By the soundness theorem for first-order logic, every sentence derivable from is true in this structure. In particular it cannot derive both a sentence and its negation, because they cannot both be true under the usual semantics.
Therefore . This direction uses soundness alone, without constructing a model from a proof-theoretic assumption.
Order the consistent sets of sentences extending by inclusion. This collection is nonempty. The union of a chain is consistent: any derivation of a contradiction uses finitely many assumptions, which all lie in one member of the chain. Zorn's lemma therefore supplies a maximal member, which is a maximal consistent extension of .
For a countable language one can instead enumerate all sentences and successively add either a sentence or its negation while preserving consistency. At least one choice is consistent, since inconsistency of both extensions, together with the deduction theorem for propositional logic and classical reasoning, would make the previous stage inconsistent. The union of the stages is consistent by finite use of assumptions and decides every sentence, so it is maximal consistent.
The chain proof covers arbitrary set-sized languages; no restriction on the language cardinality was printed here. The later prohibition on choice applies to the cardinal-arithmetic question, not this logic construction.
Forcing constructs new first-order models while controlling which ground-model properties survive. Fix a ground model and a partially ordered set , writing when is the stronger condition. A generic filter is upward closed, directed towards stronger conditions, and meets every ground-model dense subset of a forcing order. If is externally a countable transitive model, enumerate its dense subsets and successively choose stronger conditions in them. The resulting filter is -generic. External countability is crucial: this is not a claim that the ground model regards its own universe as countable.
A forcing name is built recursively from pairs of earlier names and conditions. For a generic filter , its evaluation of a forcing name is
The canonical forcing name evaluates to , so . Recursive evaluation also proves transitivity. Name ranks bound the ranks of their evaluations, so an ordinal in the extension is below some ground ordinal and is already a ground ordinal. Thus forcing preserves ordinals.
The central link between syntax and generic interpretation is the forcing theorem. The relation is definable in the ground model, and the forcing truth lemma says
For an atomic membership assertion, densely many refinements must witness equality with a member-name whose associated condition is compatible with the refinement. Equality is obtained by recursive mutual inclusion of names. For negation, means no stronger condition forces ; for an existential quantification, witnesses must be obtainable densely below . Induction on name rank establishes the atomic clauses, and induction on formulas establishes definability and the truth lemma. The generic filter meets the relevant dense sets at the existential step. An arbitrary semantic assertion about one chosen generic filter is insufficient: the definable relation must work uniformly for all generic interpretations.
This explains preservation of ZFC. Extensionality and foundation follow from transitivity; canonical names supply infinity. Pair and union names give pairing and union. For separation, restrict a name's members to conditions forcing the defining formula. For replacement, the definable forcing relation lets ground axiom schema of collection bound a set of names for all possible witnesses to the unique outputs; evaluating their collected name gives the range. For power set, let name the given set and let be the set of its member-names. Every subset of has an equivalent name drawn from , by the truth lemma, so a ground set of candidate names collects all its subsets. Finally choose a ground well-order of the relevant names; its evaluated image surjects onto the desired set, and choosing the first name for each value well-orders that set. This is why ordinary forcing over a choice model preserves choice.
For a concrete example, Cohen forcing consists of finite partial functions , ordered by extension. The generic union is total because deciding each coordinate is dense. For every ground real , the set of conditions disagreeing with somewhere is dense, so . This construction changes the universe by adding a genuinely new real without changing its ordinals.
The size and compatibility of conditions determine what else changes. With the countable chain condition for forcing, an ordinal-valued name has only countably many possible values at each coordinate: take a maximal antichain deciding that value. Therefore the possible range of a name for a map with infinite ground domain of cardinality lies in a ground set of size at most . This prevents cardinal collapse and changes of uncountable regular cofinalities. Forcing by finite partial functions is ccc: the delta-system lemma thins any uncountable family of finite domains to a delta-system, and a further thinning makes their values agree on its finite root. Two remaining conditions are compatible. Distinct coordinates add distinct reals.
For example, start with GCH and take . This forcing has size and adds distinct reals. A nice name for a real uses countably many antichains, and each antichain is countable. The ground arithmetic bounds the number of such names by . Hence
giving a relative-consistency example of the failure of CH. The ground choice of GCH is available through the constructible universe; no claim that every starting model has this arithmetic is needed.
By contrast, countably closed forcing adds no new countable sequences of ground ordinals. Given a name, recursively strengthen a condition to decide each coordinate, then take a lower bound of the descending sequence. That condition decides the entire sequence. Closure and chain conditions thus control different features; neither should be silently substituted for the other.
Further applications include changing cofinalities, adding branches through trees, and constructing prescribed continuum patterns. If the aim is to violate choice, an ordinary generic extension of a choice model will not do: one restricts to a suitable symmetric collection of names, checking the axioms again. These examples also mark a limitation: forcing proves relative consistency, not absolute consistency of the background theory. The countable-transitive-model picture gives a concrete semantic construction; the definable forcing relation and Boolean-valued formulation supply the corresponding formal consistency arguments without asserting that a transitive ground model can be proved to exist.