Represent a nonnegative integer by the Church numeral
A closed lambda term represents a partial computable function if, on inputs in its domain, reduces to the Church numeral of the value, and on other inputs it produces no Church numeral. We use untyped lambda calculus and normal-order beta reduction.
First every primitive recursive function has such a representation on all inputs. The zero function is represented by a constant , the projection functions by , and the successor function by
For function composition in recursion theory, substitute the represented inner functions into the represented outer function:
These constituent functions are total, so there is no undefined argument to be discarded.
For primitive recursion, use Church Booleans and Church pairs:
If represent the total functions defining a recursion, put
and
After iterations the Church pair contains the counter and the recursively computed value at , by mathematical induction. Thus this lambda definition of primitive recursion by pair iteration represents the recursion. A structural induction for primitive recursive functions now represents every primitive recursive function.
To pass to arbitrary partial computable functions, use the Kleene normal form theorem in the following form: for every , there are total primitive recursive functions such that
with undefined precisely when no such exists. The predicate checks codes of valid finite halting histories for the chosen program; extracts their common output. This expresses unbounded minimization of a total predicate, so no earlier undefined test can interfere with the search.
Let be the represented total functions. The Church numeral zero test and a fixed-point combinator are
Define the search lambda term
All displayed abbreviations expand to finite closed lambda terms; stands for the fixed finite tuple of input variables. Because , normal-order beta reduction tests . At the first successful test the Church Boolean selects , which reduces to the correct Church numeral. The unused recursive branch is discarded.
If no test succeeds, every finite search step returns to another head search, never exposing a numeral. The term has no head normal form and hence cannot be beta equivalent to a Church numeral. This last point is why the output operation occurs inside the successful branch: simply applying a possibly argument-discarding outer function to a divergent search would not justify undefinedness. Therefore every computable function is representable, including partial computable functions with their correct undefined inputs:
A bounded-size transversal kernel gives a finite intersection witness for cross-intersecting families, even when the two set families are infinite. We first prove the kernel statement: for any set family whose members have size at most , and any integer , there is a finite subset with
such that every set of size at most is a hitting set for if and only if it is a hitting set for .
Use mathematical induction on . If is empty, take . For and nonempty , choose any one member: the only possible is empty and is a hitting set for neither family. For the induction step, choose . For each apply the inductive statement to
with parameter , obtaining . Put . Its size is at most . If is a hitting set for , choose . Every member of avoids , so is a hitting set for and hence for . Members of containing already meet . Thus is a hitting set for all of . The reverse implication follows from inclusion. If , no is a hitting set for either family, so the implication remains valid. This finite branching proof never assumes is finite.
Apply the kernel statement with and define . For each , the cross-intersecting family condition ensures that meets every member of , since these members lie inside . As , it therefore meets every . We obtain
In particular, a positive-integer-valued choice valid whether or not is
Here the constant term of the sum is , including when . If either set family is empty, suffices. If both are nonempty, the cross-intersecting family condition rules out or .
Harris' inequality states that, for a product measure on with independent Bernoulli random variables of parameters , increasing events satisfy
In particular, the uniform probability measure on the Boolean lattice gives . We give a direct mathematical induction proof, so no stronger correlation theorem is assumed.
Prove more generally that for real coordinatewise increasing functions on the finite cube. For both are constant and equality holds. For the inductive step let , and let be the restrictions obtained by setting the last coordinate equal to . Write , , using the product measure on the other coordinates. Monotonicity gives , . By the inductive hypothesis and conditional expectation,
The nonnegative correction term also handles and . Taking indicator functions , proves Harris' inequality.
For later use, an increasing event and a decreasing event have negative correlation of increasing and decreasing events. The complement is an increasing event, so
We prove the Hales-Jewett theorem by mathematical induction on the alphabet size. A combinatorial line has a nonempty active coordinate set, with one common letter in all those coordinates. More generally, a -dimensional combinatorial subspace has disjoint nonempty active coordinate sets, each with an independently variable letter.
First prove the alphabet insensitivity lemma, rather than assume it. Fix distinct letters , colors, and dimension . Partition the coordinates into consecutive blocks of lengths , chosen from left to right. Put and choose
Construct the variable blocks from right to left. When working on block , the later blocks have already become -parameter words, while all earlier coordinates remain unrestricted. For each , take the color vector of the word having in block , indexed by every earlier word and every assignment to the later parameters. There are entries and hence at most different vectors. The pigeonhole principle gives with identical vectors. Fix the first positions of this block to , fix its last positions to , and make the intervening positions a new variable block. Substituting or there gives exactly the two equal color vectors.
This equality holds for every earlier word and every later parameter assignment. Restricting the earlier coordinates in subsequent steps therefore preserves it. Likewise, the insensitivity already proved in a later block survives every restriction of earlier coordinates. At the end, we obtain a -dimensional combinatorial subspace whose induced finite coloring is unchanged whenever any parameter switches between and , with all other parameters fixed. Multiple switches preserve the color by successive single switches. This is the alphabet insensitivity lemma in full.
For alphabet size , one coordinate is already a monochromatic combinatorial line. Suppose the Hales-Jewett theorem has been proved for alphabet size , and let . Apply the proved alphabet insensitivity lemma with letters to get a -dimensional combinatorial subspace in . Restrict its parameter words to . The induction hypothesis gives a monochromatic combinatorial line in these parameters. The union of its active parameter blocks is nonempty, so its image is a combinatorial line in the original coordinates. Its additional point with active letter has the same color as the point with active letter , by insensitivity. Therefore all points have one color, proving
The construction supplies a finite recursive bound; optimal bounds are not needed.
Write for the recursively repetition-free labelled trees. Each rooted tree is finite because the inductive definition forms it from an already constructed finite list of finite child rooted trees. Its label list is obtained by visiting the root first, then each child subtree in its prescribed order, using a depth-first traversal of a tree. This list can have repetitions. In particular, different branches may use the same label; the children are required to be distinct rooted trees, not to have distinct root labels.
For any finite label pool , prove by mathematical induction on that is finite. For it is empty. For each root , the children form a finite repetition-free sequence from , which is finite by mathematical induction. There are therefore finitely many child lists for that root, and the finite union over is finite. More explicitly, if is the number of rooted trees on a pool of labels, then
There is no countable choice in this finite mathematical induction.
Now suppose were an injective enumeration of a countably infinite subset of . Their canonical traversal lists give an explicit enumeration of all labels used. If infinitely many different labels occur, the least-first-occurrence procedure gives a countably infinite subset of , a contradiction. Otherwise all labels belong to one finite set . Every then belongs to : recursively its root lies in and its child rooted trees use only with that root removed. But is finite by the preceding mathematical induction, again a contradiction. Finally the single-vertex rooted tree labelled is injective, so is infinite. Hence recursively repetition-free labelled trees preserve Dedekind-finiteness:
Use untyped lambda calculus and normal-order beta reduction. Write for the Church numeral of . We will construct a closed term such that
when is defined, and with no head normal form otherwise. The latter condition implies that the result is not in beta equivalence with any Church numeral, so both definedness and the output are represented.
First represent all total primitive recursive functions. The zero function is , the successor function is
and the th projection function is . Function composition in recursion theory is represented by . This composition claim is used here for total functions, whose inner terms all reduce to numerals.
For primitive recursion use Church pairs and iteration. Put
Suppose represent the total constituents of and . Define
After iterations the pair reduces to , by mathematical induction on . Its second projection is the required result. This lambda definition of primitive recursion by pair iteration and structural induction on the primitive recursive construction give terms for all primitive recursive functions.
For an arbitrary partial computable function use the Kleene normal form theorem with its program index fixed. There are total primitive recursive functions and such that is zero exactly when codes a valid halting computation history on , and extracts that history's output. Checking finite coded configurations and each transition is primitive recursive. Determinism ensures that every accepted history on an input has the same output. Hence
If the input computation never halts, no history is accepted. Let be the total numeral-representing terms already obtained. The Church numeral zero test is , returning exactly on zero. A Church Boolean applied to two arguments selects the appropriate branch without evaluating the other.
Take the fixed-point combinator . For the input tuple define
Expanding the displayed abbreviations gives a genuine finite combinator. At a numeral code , the total predicate computation terminates. If it returns a positive numeral, the false Church Boolean selects the next search code. If it returns zero, the true Church Boolean selects , which reduces to the output numeral. If the least accepted code is , a finite sequence of these tests reaches it and then produces .
If there is no accepted code, every test is false and head reduction moves through codes forever. At no finite point can a head variable or an outer numeral abstraction be produced: the applied search term must first unfold the fixed point and evaluate the next total test, and the decoder branch is always discarded. Thus it has no head normal form. The standard head-normalization property, or the Church-Rosser theorem together with normalization of normal-order reduction, rules out beta equivalence to a numeral. In particular, we have avoided a lazy-composition pitfall: an outer function that discards an argument need not force a divergent inner computation. The decoder is reached only after the guarded search succeeds. This proves lambda representation of partial computable functions:
Let mean all states reachable after reading , allowing arbitrary epsilon transitions before, between, and after its symbols. We prove by mathematical induction on that
For , both sides equal . Suppose the claim holds for , and append . By the definitions of the extended transition functions and the subset construction,
This completes the induction.
We prove both identities by mathematical induction. They hold at . Assume they hold at . Using ,
Adding this to and using gives
These are precisely the two assertions with replaced by , completing the induction.
Write for the closed graph neighbourhood of . Since , minimizing the external vertex boundary at fixed cardinality is equivalent to minimizing the closed neighbourhood. The vertex-isoperimetric inequality in a grid says that, among all -vertex subsets of , the first vertices in the simplicial order on a grid minimize this quantity.
We prove the theorem by mathematical induction on , using the allowed two-dimensional case. Fix a coordinate and write for the section in which that coordinate equals . Replace each by the equally large initial simplicial segment . By induction, . The section formula for a grid neighbourhood gives
For the compressed family, are nested initial segments, so the size of their union is the maximum of their sizes. That maximum is no larger than the size of the corresponding uncompressed union. Summing over proves that coordinate compression in a product of paths does not enlarge the boundary.
Apply these compressions in every coordinate, choosing among boundary-minimizing outcomes one with least coordinate-sum weight. If the result were not an initial simplicial segment, it would contain a later vertex while omitting an earlier one. After cancelling coordinates in which they agree, this gives an inversion in a two-coordinate face. Replacing the occupied portion of that face by the equal-size initial segment in does not increase its neighbourhood by the assumed two-dimensional theorem, while it strictly lowers the weight. This contradiction is the local-to-global lemma for simplicial grid order, and completes the induction.
For the second assertion, list the vertices of in the Gray code order
The three consecutive edges form a copy of the four-vertex path . Pairing the binary coordinates and applying this identification in each pair realizes
as a spanning subgraph of the hypercube graph . For any fixed vertex set, adding graph edges can only enlarge its external vertex boundary. Hence a -set in has boundary at least that of the same vertices in , which by hypothesis is at least . Therefore
We prove the polynomial nonvanishing below the field size by mathematical induction on . The case is the Lagrange root bound over a field: a nonzero polynomial of degree below cannot have all elements of as roots.
For the induction step, suppose that vanishes on all of and write
The upper limit is valid because the total degree of a polynomial is less than . Fixing the first variables produces a univariate polynomial of degree below which vanishes at every . It is therefore the zero polynomial, so every vanishes on all of . Each also has total degree below , and the induction hypothesis gives for every . Thus .
Taking the contrapositive, every nonzero such has some for which
Let be the orthogonal projection onto the good linear subspace , and let be a prepared unit vector with . For , define
The amplitude amplification theorem states that, if the reflection operators about the initial state and the good subspace can be implemented, the iteration
satisfies
To prove it, the two reflections preserve the linear span of . In this ordered orthonormal basis, direct multiplication gives
Multiplying this rotation matrix by replaces by , proving the formula by mathematical induction.
For known , choose to be a nearest nonnegative integer to . Then , so measurement finds the good subspace with probability at least , using iterations. For , measurement of the initial state already has constant success probability. If success is certain; if these reflections cannot create any good component. If , the initial-state reflection is , implemented using quantum state preparation and its inverse quantum circuit.
Figure 1. . Each iteration adds the angle in the good-bad plane. The probability rises near one and then falls again, so the stopping time matters. Details.
For distinct eigenvalues, the formula holds for . If the lower-left entry of is , multiplication by gives . This proves by mathematical induction that
Summing the absolutely convergent matrix exponential series gives
For the repeated eigenvalue , the continuous limit is . This is also the exponential of a two-dimensional Jordan block.
Read the colours from left to right. If every neighbouring pair had the same colour, mathematical induction would make every point the same colour as , contradicting the different colour of . Therefore at least one adjacent pair has different colours.
The binary Huffman coding algorithm repeatedly merges the two currently least probable symbols into one meta-symbol whose probability is their sum. After recursively constructing a code for the smaller alphabet, append and to the meta-symbol's codeword to obtain codewords for the merged pair. The result is a binary prefix code.
To prove optimality, begin with an optimal prefix-code tree. It may be taken to be full, since an internal vertex with one child can be suppressed and all codewords below it shortened. Two leaves of maximum depth are siblings. By exchanging labels, without changing lengths, assign two least probable symbols to such a sibling pair: moving a smaller probability to a no-shorter codeword cannot increase the expected length. Contracting this pair to one leaf replaces their contribution by plus the constant . If the contracted code were not optimal for the reduced alphabet, replacing it by a better one and then expanding the merged leaf would improve the original code. Mathematical induction on the number of symbols now proves that the Huffman construction minimizes expected word length.
Let be a splitting field of over . Its formal derivative is
The assumption on the characteristic of says that in . Any root of is nonzero, and hence . Thus and have no common root, so is a separable polynomial. Since it has degree and splits over , it has exactly distinct roots. This is the separability of roots of unity.
Fix a primitive root of unity . Define the th cyclotomic polynomial by
It is monic and has degree given by the Euler totient function . Partitioning all th roots of unity according to their exact multiplicative order gives the cyclotomic factorization
We now prove by mathematical induction that . The base case is . If the result holds for every proper divisor of , then
is monic and belongs to . Polynomial division of by the monic integer polynomial produces a quotient and remainder in . The factorization over says that the remainder is zero and the quotient is , proving the claim.
It remains to prove irreducibility of cyclotomic polynomials. Let be a monic irreducible polynomial dividing , let be a root of , and write . We claim that is a root of for every prime number . Otherwise is a root of , so is a root of . Since is the minimal polynomial of over , Gauss lemma for polynomials gives
After reduction of an integer polynomial modulo a prime, the Frobenius endomorphism gives
Choose an irreducible factor of the nonconstant monic polynomial . Then , so . The cyclotomic factorization would then make divide over . This is impossible because its derivative is coprime to it when .
Thus for every prime . Iterating this fact over a prime factorization shows that whenever . These are all primitive th roots, so
Because divides , equality holds and . Hence every cyclotomic polynomial is irreducible over .
Finally, direct multiplication gives
Also
Applying the cyclotomic factorization to the two factors on the right gives
and therefore
Since , cancellation yields
The thirtieth cyclotomic polynomial is irreducible over by the theorem just proved, so is irreducible.
Use the CYK algorithm. For a nonempty input word , let be the set of nonterminals that derive the substring . Initialize
For increasing substring lengths, compute
Accept exactly when the start symbol belongs to . The proof is a mathematical induction on substring length: a one-letter derivation uses a terminal production, while every longer parse tree has a root production whose two subtrees yield two adjacent nonempty substrings. The recurrence considers every possible split point and therefore finds exactly all possible roots. For a fixed grammar the algorithm uses time. Under the strict form in part (a), it rejects immediately.
A class in set theory in the model is a collection
defined by a first-order formula with parameters . A set-theoretic class function is a definable class relation for which every input in its domain has exactly one output. Informally, the Axiom schema of replacement says that the image of any set under any such function class is again a set.
Define the class function by the natural-number recursion theorem,
Then , and Replacement applied to the set gives
as a set.
Call a set small when it injects into some . Every natural number is finite, and every member of is finite, so each injects into . Hence . The set itself injects into , and its hereditary members are natural numbers, so .
We next prove by mathematical induction. The case was just proved. If and , then , so inclusion injects into and makes small. Every set below in its transitive closure is already below and is small by the induction hypothesis. The set itself injects into . Thus every member of is small.
By Cantor theorem, , so the are distinct and injects into . Thus is small. Every other member of belongs to for some , and is small by the preceding paragraph. Therefore . This proves the finite-power-set hereditary-small construction.
The structure is not a model of ZF because it fails the Axiom of union. If were small, it would inject into some . But , since , so restriction would inject
Together with the singleton injection , the Cantor-Schröder-Bernstein theorem would produce a bijection, contradicting Cantor theorem. Hence is not small and therefore does not belong to . Since has no union inside the class, the Union axiom fails.
Lagrange theorem for polynomial congruences says that a nonzero polynomial of degree over the finite field has at most roots. To prove it, use mathematical induction on . A constant nonzero polynomial has no roots. If , polynomial division in the field gives with . Every root other than is a root of , so the induction hypothesis gives at most roots.
Every nonzero residue class modulo has a unique multiplicative inverse. In the product , pair each class with its inverse. The unpaired classes satisfy , hence . By the theorem these are exactly and , and therefore
This is Wilson theorem.
Now write . By Fermat's little theorem, every nonzero class is a root of
The second factor has degree and hence at most roots. Since their union contains all nonzero classes, has at least roots; Lagrange's theorem gives at most . Thus has exactly solutions.
The Fibonacci recurrence gives
The map is strictly decreasing for . Since , applying this decreasing map reverses each inequality and proves by mathematical induction that
Taking even shows , so is a decreasing sequence.
The special binomial theorem
follows by mathematical induction. Multiplication of the formula for by and collection of the coefficient of uses Pascal's identity from part (a).
Termwise integration from to gives
Replacing by gives
Finally,
Writing and using the finite geometric series,
turns this into