Polynomial identity testing Created 2026-09-24 Updated 2026-10-18
Polynomial identity testing asks whether a polynomial represented implicitly, such as by an arithmetic circuit or a remainder computation, is the zero polynomial.
Here zero means that every coefficient vanishes after collecting equal monomials in the polynomial ring. Testing equality of two polynomials amounts to testing for zero. An arithmetic circuit can permit cheap polynomial evaluation even when expanding all monomials is expensive. The random evaluation test for a polynomial identity exploits this: one nonzero value disproves the polynomial identity, while a known total degree limits how often a nonzero polynomial can evade detection.[ref]
For example, for an integer , has distinct monomials, one for each subset of the variables. Its factored expression needs only additions and multiplications for one polynomial evaluation. Evaluating the compact expression avoids creating its expanded list of coefficients. The saving is especially attractive in many variables; it does not make a zero result into a proof of identity.
Positional notation Created 2026-09-29 Updated 2026-10-14
In positional notation, a numeral digit contributes its value multiplied by a weight determined by its position. Fix an integer radix . A finite string of numeral digits , with , represents the nonnegative integer
The rightmost position has weight ; each move left multiplies the weight by . This weight is the place value. For a nonzero integer, the canonical string has . Zero is written with the single numeral digit . Leading zeros are permitted in a fixed-width display but omitted in the canonical form: . A negative integer is written with a separate minus sign and the positional notation for its absolute value; the minus sign is not a numeral digit.[ref]
For example,
The zero is essential inside this string: , not . It records that the tens position contributes nothing while keeping the hundreds and units in their proper positions. The same integer has binary representation
Figure 1.
One integer, two encodings:
. Each numeral digit is multiplied by its place value. Decimal uses the weights ; binary uses . Zero digits preserve positions without contributing to the total. Both rows sum to . Details.
Repeated Euclidean division constructs the representation exactly. Set . At each step write
Keep the remainder and continue with the integer quotient . A positive quotient strictly decreases, so eventually it is zero. Substituting the successive equations back into the first gives : the numeral digits are obtained from right to left. The remainder modulo uniquely fixes , and then the quotient uniquely fixes the remaining string by the same reasoning. This proves existence and uniqueness once leading zeros are excluded. The needed unique quotient and remainder are precisely the conclusion of the Euclidean division theorem.[ref]
This finite expansion concerns nonnegative integers. Extending positional notation to fractional positions uses weights to the right of a point; an arbitrary real number need not have a finite digit string. In particular, the decimal representation represents , while the base-two string represents . The radix is part of the interpretation.
The benefit is compact arithmetic: positions can encode every nonnegative integer below . To see the upper endpoint, fill all positions with ; the finite geometric series gives . Carrying in addition exchanges units of one place value for one unit of the next. Thus a short string stores a large count and also supplies an algorithm for computing with it.
Positive integer Created 2026-09-24 Updated 2026-10-03
A positive integer is an integer greater than zero.
For an odd integer and positive summable coefficients , the Weierstrass M-test makes continuous. Its partial sum over is the unique best uniform approximation by degree-at-most- trigonometric polynomials, for . If is the first omitted frequency, at every omitted cosine equals because all frequency ratios are odd. Thus the tail attains alternating extrema equal to its coefficient sum at points. The trigonometric Chebyshev alternation theorem proves the formula. For , , the largest decay exponent is .
Suppose a group acts by isometries on a metric space , and for points in different orbits one has . Then the orbit space with its quotient topology is Hausdorff. Indeed, choose less than one third of this positive infimum and saturate the open radius- balls about and by the action. These saturated sets are open because every acting isometry is a homeomorphism. Their translates cannot meet: their centres stay at least the given positive distance apart. Their disjoint open images in the quotient separate the two orbit points, since the preimage of each image is its saturated set. This applies to the glide reflection on a closed strip: the distance from one point to the translates of another tends to infinity as the integer translation grows, so two distinct orbits have a positive minimum distance.
Postcondition 2026-10-18
The condition required of a final program state when a program finishes under its precondition. The summation loop verification requires returned value to satisfy and preserves the input . Relating the answer to the original input matters: allowing the program to replace by zero would change the intended contract.
A postcondition alone gives no promise of algorithm termination. It also need not specify a unique output: allows many answers, while the exact triangular number equation determines one integer answer for each permitted . Stronger postconditions express more obligations; proving only a weaker consequence cannot justify the stronger requirement.
Power of a relation 2026-10-31
For a binary relation on a set , define and for nonnegative integers , using composition of relations. A pair belongs to precisely when a sequence has for every . This follows by mathematical induction, splitting off one step in the recurrence. Thus records paths with exactly steps, rather than at most steps. The union is the transitive closure of a relation; including gives its reflexive transitive closure. The powers of a single relation agree under the two common composition-order conventions.
Power put option 2026-10-25
A power put has financial payoff below the strike price and zero at or above it, where is a positive integer. For this is the ordinary put option. For every the payoff is decreasing and is a convex function of the stock price. A European option permits exercise only at expiry; a perpetual power put option permits exercise at any finite time without a fixed expiry.
For , substitute a power series to obtain the displayed recurrence relation. It separates into an even solution with and an odd solution with :
The ratio of successive terms within each parity tends to zero at every fixed complex , giving infinite radius of convergence. The two initial-value vectors are independent, so these solutions span the solution space. A nonzero polynomial solution exists precisely when is a nonnegative integer: its highest power forces this value, and the recurrence terminates the matching parity. These terminating solutions are nonzero scalar multiples of the Hermite polynomials. Multiplication by connects them to Hermite oscillator quantization.
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 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].
Prime counting 2026-10-20
Prime counting evaluates the prime-counting function: it determines how many prime numbers do not exceed a given bound. A number-theoretic sieve can construct the whole table up to a moderate bound, while methods such as the Lehmer prime-counting algorithm group whole classes of integers to evaluate much larger arguments without listing every prime number.
For distinct primes , let consist of the positive integers having no other prime factors, including . The map from a number to its exponent tuple is a bijection from to when . The fundamental theorem of arithmetic proves that the tuple is uniquely defined and that equality of tuples implies equality of numbers. Every nonnegative tuple gives the allowed number , proving surjectivity. Multiplication of numbers corresponds to coordinatewise addition of tuples, with corresponding to the zero tuple.
Prime factor Created 2026-09-24 Updated 2026-10-20
A prime factor of a nonzero integer is a prime number satisfying . For , the distinct prime factors are , while counting repeated factors gives six prime entries. A prime factorization retains their multiplicities: knowing only the distinct prime factors does not distinguish from . A negative integer has the same prime factors as its absolute value.
Prime field Created 2026-10-03 Updated 2026-10-14
The prime field of a field is its smallest subfield: the arithmetic forced upon us by the identity element . Every subfield must contain , its repeated sums, their additive inverses, and the multiplicative inverses of nonzero results. In characteristic zero these operations produce a copy of the rational numbers . In positive characteristic of a field , they produce a copy of , with addition and multiplication given by modular arithmetic.
For example, inside the field with four elements, repeated addition of gives . Thus its prime field is , and the other two elements cannot be reached by repeatedly adding . This is why a finite field need not consist entirely of ordinary integer residues: a larger finite field extends the arithmetic of its prime field with additional elements.
The positive characteristic of a field must be a prime number. If its least vanishing multiple of were with , then would exhibit zero divisors. The absence of zero divisors rules this out. The prime field supplies the scalars when viewing as a vector space; its basis then explains the possible sizes of a finite field.
The prime ideals of with are the zero ideal and the principal ideals generated by nonconstant primitive polynomials that are irreducible in .
To prove the description, invert the nonzero integers to obtain the localization . The extension of an ideal consists of the polynomials with and . Its contraction is : if and , the defining condition puts , so primeness gives . The prime ideal correspondence for localization makes this extension a proper prime ideal of .
If , its extension has a nonzero generator because is a principal ideal domain. Dividing this generator by its rational polynomial content gives an integer-coefficient primitive polynomial generating the same extended ideal. Divisibility descent by Gauss lemma for polynomials then gives in . The proper prime ideal in makes irreducible there. Conversely, any such polynomial generates a prime ideal in whose contraction is and whose intersection with is zero.
The intersection condition is essential: is a maximal ideal of , since its quotient ring is , but it is not principal. A common divisor of and must be a unit, which would generate the whole ring.
For a formal group law over any commutative ring , the invariant differential of a formal group law satisfies . Its coefficient is a unit in a ring, so . If , this means . When , the integer Bézout's identity implies , even if is a zero divisor. Put those coefficients into and the exponents divisible by into .
Prime number Created 2026-09-24 Updated 2026-10-13
A prime number is a positive integer whose only positive divisors are and . The first ten prime numbers are . In contrast, is a composite number because it has a positive divisor strictly between one and itself. The integer one is neither a prime number nor a composite number: the lower bound is part of the definition. Equivalently, the divisor function satisfies for a prime number, whereas and for every composite number .
Prime numbers are the building blocks of positive integers under multiplication. The fundamental theorem of arithmetic says that every integer greater than one is a product of prime numbers, with a unique collection of factors when their order is ignored. For example, and . Their common factors reveal the greatest common divisor , and the combined maximum powers reveal the least common multiple . A complicated divisibility question becomes a comparison of prime exponents.
There is also a useful finite test. If a composite number equals with , then . Therefore some prime factor is at most , and trial division only needs to check prime numbers up to that square root. For , checking suffices; none divides , so it is a prime number. For , the same test finds , giving . To find many prime numbers together, the sieve of Eratosthenes reuses the work by marking multiples.
The division with remainder calculations for make the test explicit:
Since , these are all the prime numbers at most its square root, and every remainder is nonzero. Thus the calculation certifies a prime number, without testing the integers individually. In contrast, gives a prime factor and proves that is a composite number.
The definition has a long history. Book VII of Euclid's Elements distinguishes prime numbers from composite numbers through their possible measures; Book IX, Proposition 20 establishes that no finite list exhausts the prime numbers. The modern argument under Euclid's theorem needs only divisibility, so it proves an infinite conclusion without estimating how frequently prime numbers occur. [ref] [ref].
Prime-proof number 2026-10-20
An integer for which replacing any one decimal numerical digit by a different digit never produces a prime number. The convention must specify whether changes creating a leading zero are permitted. An exact test enumerates the allowed substitutions and applies primality testing to each result.
Positive integers are equivalent when they have the same finite set of prime factors. Equivalently, each divides a positive power of the other. This equivalence relation is induced by the radical of an integer; its equivalence classes correspond to finite prime supports. The empty support gives the singleton , and every nonempty support gives an infinite class by varying exponents.