Pointwise convergence Created 2026-09-24 Updated 2026-10-14
For a sequence of functions , pointwise convergence to a function means
It is the ordinary limit of a sequence at each fixed input. The threshold may depend on the input. Uniform convergence instead requires one threshold for the entire domain of a function.[ref]
Consider the polynomial functions , for positive integers , on the interval . For the geometric sequence tends to zero, while . Thus
Each is a continuous function, but its pointwise limit is discontinuous at one. Holding an input still hides what happens near that endpoint. The analogous even-power example on appears in the source.[ref]
For and , taking the logarithm of and dividing by the negative real number reverses the inequality:
The floor function followed by adding one handles the strict inequality even when the ratio is an integer. For tolerance , the first successful indices at , , and are respectively , , and . At , fails and succeeds. At and , the error from this pointwise limit is already zero, so works. Nevertheless, grows without bound as from below. A finite list of accurate test inputs cannot establish uniform convergence.
Figure 1.
Pointwise convergence of powers changes character when the domain of a function stops before one
. On the pointwise limit is zero except for its value one at the endpoint: the open circle and filled circle distinguish these values. On the pointwise limit is zero everywhere, and the largest error is . All curves are original evaluations of . Details.
An even sharper warning concerns integration. On , define the continuous functions
Their supports are , with height at and value zero at both ends. Every fixed eventually lies beyond the support, and always, so pointwise convergence gives the zero function. Nevertheless, each integral is the area of a triangle: . Shrinking width compensates increasing height. Hence the limit of a sequence of these integrals differs from the integral of the pointwise limit; interchanging them requires additional conditions, such as uniform convergence preserves integrals on a compact interval.
Power series Created 2026-09-24 Updated 2026-10-14
A power series combines a sequence of coefficients with monomials in the displacement from a fixed centre:
The variable , centre , and coefficients can be real numbers or complex numbers. Its degree- partial sum is a polynomial, so a convergent power series can turn a complicated function into increasingly accurate finite calculations. Convergence, and the error after stopping, are essential parts of that claim.
The geometric series supplies the simplest computed example:
At , stopping after degree ten gives , differing from the exact value by . At , the same degree gives only about instead of . The same formula has very different practical accuracy at different points; the geometric power-series remainder quantifies it.
The structure is useful beyond numerical evaluation. Within its radius of convergence, termwise differentiation of a power series turns a question about a derivative into a question about coefficients. A Taylor series chooses when it represents the function locally. A formal power series instead uses the coefficients algebraically, without asserting numerical convergence; the existing generating function examples use that distinction to encode counting problems.
Given a nonempty finite sequence of integers, return its maximum value. Represent the sequence by an array whose contents remain unchanged during execution. The precondition requires an integer length and exact, terminating integer comparisons and variable assignments. The postcondition for returned value is
Thus the output belongs to the finite set of entries and is at least every entry. The contract permits ties and negative integers; it asks for a value, not the position of a particular occurrence. There is no maximum of an empty set of integers, so empty input is deliberately outside this precondition. A service accepting empty inputs needs a different formal specification, such as a separate absent result.
This Python implementation makes the variable assignments explicit. Its index arithmetic models exact integer arithmetic; fixed-width implementations additionally need enough index range for :
def find_max(a):
    n = len(a)
    best = a[0]
    k = 1
    while k < n:
        if a[k] > best:
            best = a[k]
        k = k + 1
    return best
For the original input , initialization gives and . Reading keeps ; reading changes it to ; reading and keeps . At successive condition checks, the pairs are . The returned maximum is .
Figure 1.
Maximum values of successive prefixes in the original integer array
. Each row shows the processed prefix of immediately before checking . Blue cells have been processed; grey cells have not. The loop invariant records the maximum of the blue entries, while the loop variant counts remaining entries. These are exact constructed execution states. Details.
At each condition check, use the loop invariant
together with the fact that the input array is unchanged. The prefix is the first entries of the sequence, so its finite set of values is nonempty. The maximum need not be unique as an occurrence: the invariant concerns its value.
Initialization establishes : and , the maximum of a one-element set. For preservation, suppose and hold. Then is a valid array entry. Either the comparison replaces with the larger value , or it keeps a value at least . Before increasing , the resulting value is
The variable assignment restores the complete loop invariant. Between the two variable assignments, the old prefix formula may temporarily be false; the loop invariant is required at condition checks, not at every instruction.
At exit, , while gives . Hence , and gives exactly the required postcondition. This establishes partial correctness. The preservation argument is mathematical induction on the number of completed iterations, covering every permitted integer sequence, rather than just the pictured input.
For algorithm termination, the loop variant is a nonnegative integer whenever holds. If , then . Every body terminates under the precondition and changes to . Starting at , it reaches zero after exactly iterations. For , the initial value is already zero and the body is never entered. Together with partial correctness, this proves total correctness.
Starting at zero instead of fails on the original negative input : it returns zero, which is neither an entry nor the maximum . Keeping forever preserves the correct initial prefix claim but loops forever when ; a loop invariant alone does not ensure algorithm termination. Using >= instead of > still returns the same maximum value when entries tie, although a version returning a position would need an explicit tie rule.
Prefix reversal Created 2026-10-24 Updated 2026-10-31
Reverse the first entries of a sequence and leave its suffix unchanged. On a permutation, this is a bijection on positions and is its own inverse: performing the same reversal twice restores the state. The nontrivial moves have . With unit-cost moves, the resulting state graph supports a breadth-first search for a minimum-move solution.
Prefix sum Created 2026-09-24 Updated 2026-10-14
A prefix sum stores the accumulated sum through a specified position in a finite sequence or array. For inputs , include the empty sum and set
For the original input , the prefix array including is . A negative entry makes the accumulated sum decrease; a prefix sum does not have to be monotone. Conversely, the original entry is recovered by subtraction: .
The useful cancellation is that any contiguous block has sum
Both prefixes include the entries before ; subtracting cancels those entries. In the example, the sum from positions two through four is , recovered as . The arithmetic mean of that block is , obtained by dividing its sum by its length. Prefix sums therefore make many repeated questions about an unchanged array cheap: reuse accumulated totals instead of resumming every block.
Figure 1.
Two prefix sums recover a contiguous block by subtraction
. The original six-entry array has negative as well as positive values. Highlighted entries two through four sum to two. Their accumulated endpoint values are and , so . The initial also handles a block beginning at the first entry without a separate arithmetic rule. Details.
The sequential recurrence builds all prefixes in time complexity and storage; each block query needs two reads and one subtraction, hence time complexity. These counts assume constant-cost arithmetic and access to array entries. If one input changes, all later stored prefixes change, so this simple representation is most useful when queries outnumber updates. For integer inputs, sufficient numeric capacity must be retained; with floating-point arithmetic, subtracting large nearby prefixes can lose relative accuracy for a small block total. The exact mathematical identity does not eliminate representation error.
The apparently sequential recurrence also motivates a prefix scan: associativity permits a tree of partial calculations that yields all accumulated results in parallel. Guy E. Blelloch's 1990 technical report systematically develops this operation and its applications; its authored chapter version explains the two tree sweeps used to obtain all prefixes. [ref]. [ref].
Prüfer sequence 2026-10-14
For , a Prüfer sequence is the encoding of a labelled tree on by a sequence
Repeated labels are allowed, and their order matters. To encode the tree, repeatedly remove its smallest-labelled leaf of a graph together with its incident edge, recording the label of its unique neighbour. Stop when two vertices remain; do not record their final edge. Removing a leaf of a graph leaves a tree, so the procedure makes exactly deletions. The choice of the smallest label makes the encoding deterministic. [ref]
For a concrete example, take six vertices and the set of edges
Initially label the vertices of vertex degree one. Remove and record its neighbour . Now has become a leaf of a graph, so remove and record . Next remove and record again; then remove and record . The final edge joins and . Thus the Prüfer sequence is
The deletion order is : removing a leaf of a graph can make its neighbour a leaf of a graph, so the eligible labels change as the tree shrinks.
Figure 1.
Encoding a six-vertex tree as the Prüfer sequence , then reconstructing its five edges
. Details.
To decode, keep a set of remaining labels, initially , and the remaining sequence, initially . While the sequence is nonempty, let be the smallest label in absent from the entire remaining sequence. Add an edge between and its first entry, then remove from and delete that first entry. Finally join the two labels left in . For the example:
Remaining sequence before the stepSmallest absent remaining labelEdge added
Empty; Final pair
The decoder always has a choice: if the remaining sequence has length , then has labels, so at least two of them are absent. Its first entry is still in , and differs from the chosen absent label. Every removed vertex attaches to a vertex that survives longer; following these attachments eventually reaches the final pair. Consequently the decoded graph is connected, and its edges make it a tree. In this construction, each occurrence of contributes an incident edge, and gets one more edge at its final attachment. Thus a remaining label is absent from the remaining sequence exactly when it labels a leaf of a graph. Encoding and decoding choose the same smallest label at each step and undo each other. This bijection proves Cayley's formula and explains why every freely chosen sequence is valid. [ref]
For there is exactly one empty sequence, and decoding adds the sole edge. For there is one tree, with vertex degree zero, but no length- Prüfer sequence. This is the exception both to the encoding convention and to the Prüfer degree formula.
Heinz Prüfer's 1918 paper "Neuer Beweis eines Satzes über Permutationen" appeared in Archiv der Mathematik und Physik, third series, volume 27, pages 142–144. It gives an encoding proof of the labelled tree count. The historical title means "New proof of a theorem on permutations"; the modern Prüfer sequence permits repeated labels, so it is not a permutation. [ref]
Rado order Created 2026-10-06 Updated 2026-10-14
The Rado order has domain and iff either and , or . It is a well-quasi-ordering: either one row recurs infinitely in a sequence, or the first coordinates are unbounded and yield a cross-row comparison. Its infinite rows form an infinite antichain under Hoare domination preorder, showing that arbitrary-subset lifting need not preserve well-quasi-ordering.
NFU has a unary predicate for sets, atoms have no members, extensionality applies to sets, and comprehension applies to every stratified formula. A stratification assigns integer types to variables so that equality uses equal types and requires . A unary set predicate adds no type difference.
Start with the actual set structure . This structure satisfies extensionality and every pure-membership separation instance: the subset defined in a set of rank below still has rank below . We do not assert that satisfies replacement or all of ZFC. Expand it by Skolem functions. In it use the sequence of rank objects , . For two such objects in sequence order, we have
with quantifiers in . The second statement holds because every subset of belongs to , and the later rank is at least .
Introduce constants , , and require them to be order indiscernibles in the Skolem language, satisfying these two assertions whenever . Also require for every ; this fixed rank object is first-order definable in . Every finite part of these requirements together with is satisfiable: color finite increasing tuples of the original rank sequence by the truth values of the finitely many formulas mentioned, and use Ramsey's theorem to get a homogeneous subsequence. The rank assertions hold for every increasing tuple there. The compactness theorem gives a model of the full theory. In its Skolem hull generated by the , the integer shift extends to an automorphism with , by the term-transport proof of the Ehrenfeucht-Mostowski theorem. Thus still satisfies extensionality and all pure-membership separation instances, and
This is a set-sized first-order model; no satisfaction predicate for a proper-class universe is being assumed.
Externally let . The automorphism bijects onto . Interpret a typed structure with sort equal to . At sort , declare a set exactly when ; otherwise it is an atom. Define adjacent-sort membership by
The guard is necessary: a typed atom might have some ordinary -members in , and those must not become its typed members. Set-extensionality follows from extensionality in , because the ordinary members of a typed set all lie in . For any typed formula on sort , its quantifiers can be restricted to the corresponding , its set predicates replaced by subset assertions, and its memberships replaced by the guarded relation. This is an ordinary pure-membership formula of with finitely many parameters. Separation gives its extension , and the displayed closure assertion gives . It is therefore a typed set witnessing comprehension. The automorphism shifts these sorted domains and preserves the set flags and guarded memberships.
Collapse the types onto . Define
Objects not satisfying have no -members. If two sets have the same -members, their images under are subsets of with the same ordinary members, so are equal by extensionality of ; injectivity of gives equality of the original objects.
To verify every stratified comprehension instance, assign a variable its stratification type and translate its value to . Equality is preserved. An atomic translates to the guarded adjacent-sort membership because ; the unary predicate translates to . Induction on formulas, using the domain bijections for quantifiers, preserves truth. If the free variable has type , typed comprehension produces its extension , with . Put . Then holds, and for every ,
This is exactly the required NFU set. No formula containing the external automorphism has been used in a separation or comprehension scheme; only transports values after the pure formula is formed.
The construction also permits the usual infinity requirement. The ordinary and its successor graph are definable in , hence fixed by , and lie below , so belong to all the required domains. Under , the members of are still its ordinary -members. The new Kuratowski pair satisfies
Since , membership of this pair in under is equivalent to . Thus is an internal injection of into itself omitting zero, giving a Dedekind-infinite set.
We have built a model of NFU, with infinity if it is included in the formulation, in ordinary ZFC metatheory:
In particular . This proof does not assume as an additional internal axiom: its starting structure is the set , not a model of ZFC.
Ratio comparison test 2026-10-14
For positive sequences , suppose eventually. Then is eventually nonincreasing, so beyond a fixed index. The comparison test for series proves convergence of whenever converges. Reversing the ratio inequality gives an eventual lower bound and hence divergence when the positive comparison series diverges. The initial finite set of terms does not affect either conclusion.
Ray in a graph 2026-10-06
A graph ray is an infinite sequence of distinct graph vertices with an edge between consecutive graph vertices. Every infinite connected locally finite graph contains a graph ray from each graph vertex, by the König infinity lemma applied to its finite self-avoiding graph paths. An open graph ray witnesses an infinite percolation cluster.
Real analysis Created 2026-09-24 Updated 2026-10-14
Real analysis studies limits, continuity, differentiation, integration, and convergence of sequences and functions taking values in the real numbers. Its central question is how finite approximations determine an exact answer: what does an arbitrarily small error mean, and which operations respect that error? A derivative is a limit of quotients, while a Riemann integral is obtained from increasingly fine Riemann sums. Both need conditions that make the answer independent of the approximations chosen.
Two organizing ideas are completeness of the real numbers, which ensures that suitable approximations have a destination, and uniform convergence, which controls approximation error over an entire domain. Pointwise convergence supplies separate guarantees at separate inputs; uniform convergence supplies one guarantee for all inputs. This distinction explains why replacing an approximating function by its limit can preserve continuity or integrals under appropriate hypotheses, yet fail without them.
For historical context, Cauchy's 1821 Cours d'analyse explicitly discusses convergence of series. Its Note VII treats double series and compares summing by rows and by columns under stated convergence assumptions: controlling an infinite process was already a concrete problem. This is historical context for questions about limits, rather than an attribution of the modern definitions below. [ref].
Recamán's sequence 2026-10-25
The integer sequence proposed by Bernardo Recamán Santos starts at zero. At step , subtract if the result is positive and has not appeared before; otherwise add . The commonly written nonnegative version gives the same sequence because zero is already present. The initial values are . The addition branch can repeat a value: . Avoiding a repeated subtraction is therefore not a global injectivity condition.[ref]
Since , induction gives . A prefix scan needs only constant extra storage but can take quadratic membership work. A bitset-style bounded membership table makes each lookup constant time, while its allocation cost depends on the chosen value universe. This separates the number of generated terms from the range of possible stored values.
For a real sequence with no zero terms, the displayed equivalence follows directly by comparing with . Escape to positive infinity implies reciprocal convergence to zero, but the converse does not retain the sign: is a counterexample. If , eventually , and . This proves reciprocal convergence at a nonzero finite limit of a sequence.
A nonnegative integer is a triangular number exactly when is a perfect square. Its square root is then an odd integer, and the row index is
Completing the square in proves necessity; reversing the calculation proves sufficiency. For example, , giving . In contrast, lies strictly between and , so twenty is not a triangular number. The criterion turns an apparently open-ended search through a sequence into one exact perfect square check.
Let with both coordinates nonzero, , , and . The displayed function equals one at every and zero on both coordinate axes. Each coordinate line off the corresponding axis meets only finitely many supports, so its restriction is a finite maximum of continuous functions. On the axes it is zero. Hence is separately continuous and disproves convergence of this sequence in any topology making every separately continuous function continuous. Isotropic radial bumps need not have this property when one coordinate approaches zero much faster than the other.
Recurrence relation 2026-10-14
A recurrence relation specifies members of a sequence in terms of previous members, together with enough initial values to determine the sequence. A three-term recurrence for orthogonal polynomials relates consecutive orders. For example, the physicists' Hermite polynomials satisfy , starting from and .
If is an infinite Dedekind-finite set, then is another such set. Single-vertex rooted trees inject into it. A countable sequence of distinct rooted trees gives finite lists of labels by the depth-first traversal of a tree in the prescribed child order. By countable union of explicitly ordered finite lists without choice, an infinite union of labels contradicts Dedekind-finiteness. A finite union is equally impossible, since every rooted tree then lies in the finite set , by mathematical induction on using the recursive child rule. Thus no countably infinite subset of rooted trees exists.
Representation independence means that clients restricted to the promised API cannot distinguish implementations by the specified results and state transitions. State what observations count: equal returned labels and failure statuses do not imply equal running times, allocations or physical layouts. If the API also promises a resource bound, a replacement must meet that bound too.
Replace the compact array in the bounded queue with encapsulation by a circular buffer with storage , front index and count . Its representation invariant is , , and . Its abstraction function reads the occupied slots using modular arithmetic:
On successful enqueue(x), write and increment . On successful dequeue(), return , replace by and decrement . Full and empty failures do not alter storage. peek and size have the same abstract meanings as before. Keeping a count distinguishes a full circular buffer from an empty one even when both would have the same next insertion index.
Figure 1.
The same bounded queue trace uses shifting array storage or a wrapping circular buffer
. Details.
For , start empty, enqueue , dequeue twice, enqueue , try to enqueue , then peek and size. Both implementations return from the removals, report full for , and finish with front , size three and abstract sequence . The compact array stores from index zero; the circular buffer stores with . Their abstraction functions explain why different stored entries describe the same ordered content.
Under constant-cost slot access and index arithmetic, with no resizing and labels that fit in one slot, the compact array does slot moves on a successful removal: worst-case time complexity as capacity varies. The circular buffer does no slot moves and uses worst-case time complexity for all four operations. Both allocate slots initially; that construction cost is separate. These are operation-count claims in Big O notation, not measured timings. The short correctness outline checks that each implementation's abstraction function produces the specified new sequence and return value after every successful or rejected call. Repeating that check gives equal traces for clients using only this API.
For any sequence of events, its limsup of events satisfies
Set . These are decreasing events with intersection . Continuity of probability from above gives
This is also the bounded-indicator form of the reversed Fatou lemma. The inequality can be strict: independent fair-coin head events each have probability , while their limsup of events has probability by the Second Borel-Cantelli lemma.
Right tree rotation 2026-10-25
For old root with left child and untouched subtrees , change the shape from to . Both have inorder sequence . In a destructive traversal that only rotates at the current root, this transformation extends the right spine by one node and decreases the left-size potential by one.