Sampling without replacement Created 2026-10-14 Updated 2026-10-14
Sampling without replacement selects distinct labelled units: after a unit is selected it is unavailable for the remaining draws. Distinct labels can carry equal numerical values, so repeated values do not necessarily imply a repeated unit. The rule alone does not specify selection probabilities; a procedure favoring particular units is still sampling without replacement but need not be simple random sampling.
In uniform sequential sampling without replacement, the next label is chosen uniformly among those remaining. For a population of labels, any ordered sequence of distinct labels has probability . Each size- subset has possible orders, so its probability is . This gives the fixed-size simple random sampling design. Equivalently, take the first labels of a uniformly random permutation. Restricting a uniformly random permutation to a specified label set preserves uniformity; biased modulo mappings should not replace uniform selection.
The draw positions have identical marginal probability distributions, but exhibit statistical dependence. If the first label is , the conditional probability that the second label is is zero, whereas its marginal probability is . Thus these draws are not independent and identically distributed when and . For a marked subset of labels, counting size- subsets with binomial coefficients gives the hypergeometric distribution. The resulting negative covariance explains the finite population correction for both counts and sample means.
Second-order comprehension is a scheme asserting the existence of a second-order relation variable whose members are exactly the tuples satisfying a permitted formula:
Here is not free in , and the displayed individual and relation parameters are universally closed in each instance. Under full semantics for second-order logic, the selected external subset of is always available. Under Henkin semantics, the selected subset must lie in for every allowed assignment of parameters. Different systems permit different formula classes: for example, arithmetical comprehension theory restricts comprehension to formulas without bound set variables, while still permitting set parameters. Consequently, the exact formula and parameter policy must accompany any claim that a restricted range satisfies second-order comprehension.
Represent a finite simple graph by a domain of vertices and a symmetric, irreflexive binary relation for graph adjacency. Introduce three unary second-order relation variables , one for each fixed named colour. Define the following abbreviations for first-order formulas in this expanded first-order signature:
Then the existential second-order logic sentence
asserts that every vertex receives exactly one of the three colours and adjacent vertices receive different colours. The first clause gives coverage and pairwise disjointness of the three subsets; the second makes each subset an independent set. Empty colour classes are allowed, so expresses existence of a proper vertex coloring using at most three colours.
For the complete graph on the fixed vertices , one witness is , , . Each vertex satisfies exactly one predicate, and each of the three edges joins different predicates. Every valid witness assigns different colours to all three vertices; there are witness triples with these fixed vertex labels and fixed named colours. We are counting assignments, without identifying them under colour permutations or graph isomorphisms. For the complete graph , the pigeonhole principle forces two of its four vertices to share a colour, and those vertices are adjacent. Thus it has no witness triple. This calculation illustrates a complexity certificate without requiring the reader to reconstruct a machine computation.
Figure 1.
Six relation witnesses for the labeled complete graph K3, and why K4 has none
. Details.
Reproduce the diagram by running python ../second-order-coloring-witness.py from the repository's _media directory. The script checks all witness triples for these two complete graphs before drawing them.
Second-order logic Created 2026-10-06 Updated 2026-10-14
Second-order logic extends first-order logic by allowing existential quantification and universal quantification over second-order relation variables, as well as over individual objects. In the relational presentation used here, an individual variable ranges over a domain , while a second-order relation variable of arity denotes a subset of . Unary second-order relation variables denote subsets of ; binary ones denote binary relations. Presentations with function variables can instead describe their graphs by second-order relation variables, with first-order formulas requiring a unique output for every input.
For a graph with vertices and fixed graph adjacency , the first-order sentence says that every vertex has a neighbour. It selects individual vertices while retains its given interpretation. By contrast,
selects an entire subset and says that it is a nonempty independent set. Here is a unary second-order relation variable, rather than a symbol in the input first-order signature. This particular property also has a simple first-order sentence on simple graphs; the example illustrates the change in what can be selected, rather than proving a separation in expressive power.
The usefulness of second-order logic is that one can describe a whole proposed solution, such as a graph coloring, and then impose local constraints on it. Syntax alone does not specify which proposed relations are available: full semantics for second-order logic permits all external subsets of , whereas Henkin semantics supplies designated ranges. The second-order encoding of three-colorability makes this distinction concrete.
A second-order relation variable of arity can be assigned a subset of the -fold Cartesian product ; its application is true exactly when the tuple belongs to that subset. Arity is the number of arguments, so a unary second-order relation variable is a predicate on individual objects. For a finite set of cardinality , there are possible tuples and possible relations under full semantics for second-order logic. A relation is encoded by membership bits once the objects have been numbered; the number of possible witnesses can be exponential even when each witness has a short encoding.
Separation proof in the constructible universe Created 2026-10-06 Updated 2026-10-07
To separate a subset of a constructible set by a formula interpreted in the constructible universe, apply the reflection theorem for definable hierarchies to the formula and its subformulas. At a sufficiently large reflecting level containing the parameters, the desired subset is definable and belongs to the next constructible hierarchy level. The reflection proof uses least witness stages and ambient Axiom schema of replacement, so does not presuppose Axiom schema of separation within the constructible universe.
Set Created 2026-09-24 Updated 2026-10-14
A set is a collection of distinct objects regarded as its set elements. Membership, written , is the basic question: is one of the objects in ? For example, : repeated entries and their written order do not change a set. A multiset retains multiplicities, while a tuple retains positions as well. Choosing the right object therefore determines which distinctions the mathematics remembers.
A set can collect possible outcomes of a probability space, vertices of a graph, or allowed inputs of a function. The empty set contains none; a subset selects members of a previously given set; the power set collects every such selection. These constructions are useful because they can be stated once and reused regardless of what the members represent. In an axiomatic account, rules such as the axiom schema of separation specify which collections exist as sets.
Set difference Created 2026-10-05 Updated 2026-10-14
The set difference keeps the set elements of that do not belong to :
Thus set difference combines logical conjunction (AND) with logical negation (NOT): pass the first condition and fail the second. The definition applies to any two sets; need not be a subset of .
For and , the two orders give different answers:
The common member is removed in both directions. A database filter illustrates the usefulness: if is the set of records matching the first condition and the set matching the second, selects records matching the first but not the second. The Venn diagram in set union shades both directions separately.
The name relative complement emphasizes that the ambient set is : is the complement of within . If a larger universal set contains and , then . Changing that larger universal set does not change the set difference, because membership still requires belonging to . In ZF the set difference exists by the axiom schema of separation. It also gives relative complements within a fixed tuple domain in finite relation closure for set-theoretic coding.
Set partition Created 2026-09-24 Updated 2026-10-13
A set partition of a finite set is a set of nonempty subsets, called blocks of a set partition, with
Thus every set element of belongs to exactly one block of a set partition. This is the finite counting version of a partition of a set. The blocks of a set partition are unlabelled: their subscripts help describe them, but give them no roles or order. Stanley uses this definition in his classification of counting problems.[ref]
All possibilities for three elements. The set has exactly five set partitions:
For two blocks of a set partition, one must have size two and the other size one; the three choices of the lone element give the middle row. One block of a set partition forces the whole set, and three blocks of a set partition force three singleton sets. This proves the enumeration complete, with counts by number of blocks of a set partition. Their sum is the Bell number .
Figure 1.
Exact enumeration of the five set partitions of : outlines show blocks of a set partition, whose positions and colours carry no labels
. Details.
What information is kept? Exchanging the two blocks of a set partition in leaves the same set partition; writing the tuple instead makes an ordered list, different from . Exchanging elements within a block of a set partition also changes nothing. In contrast, is a different set partition, because the actual memberships differ. Both have the same integer partition of sizes. An integer partition, or its Ferrers diagram, forgets which distinct objects were grouped together.
For four named people, and therefore describe different ways of making two unnamed teams, although both have sizes . If every team must have exactly two people, only three set partitions qualify; if any nonempty team sizes are permitted, the Stirling number of the second kind counts them. Naming the teams changes the counting problem again.
A set partition is useful whenever membership matters but category names do not. Define when and belong to the same block of a set partition. This is an equivalence relation, and its equivalence classes recover the set partition. Conversely, an equivalence relation supplies its set partition of equivalence classes. The beautiful simplification is that one grouping can be described by whole subsets or by a rule comparing two elements. Additional distinctions are organized by refinement of a set partition.
The empty set has one set partition, the empty collection , with zero blocks of a set partition. This differs from , which is forbidden because its proposed block of a set partition is empty.
Set theory Created 2026-09-24 Updated 2026-10-13
Set theory studies sets, their set elements, and the constructions and sizes possible for them. It supplies a shared vocabulary for mathematics: a function connects two sets, a binary relation specifies which pairs of objects are related, and a probability space starts with a set of possible outcomes. Giving these objects a common language lets a construction from one subject be used in another without repeating its underlying bookkeeping.
A particularly beautiful question is how to compare sizes without first assigning a number. Two sets have the same cardinality when a bijection pairs every member of one with exactly one member of the other. For finite sets, this agrees with ordinary counting. For infinite sets, it produces surprises: bijects the natural numbers with the nonnegative even integers, and the Cantor pairing function bijects the Cartesian product with . A proper subset can have the same cardinality as its containing set.
This does not make all infinite sets equally large. Cantor's diagonal argument shows that all infinite binary sequences cannot be listed by the natural numbers. Cantor's theorem gives the wider principle: the power set of any set has strictly greater cardinality. The contrast between an explicit enumeration and an impossibility argument makes the meaning of infinity much sharper than a picture of something merely continuing forever.
Set formation itself requires care. Russell's paradox shows why not every condition defines a set of all objects satisfying it. Zermelo–Fraenkel set theory instead uses axioms specifying permitted constructions, including set comprehension within a previously given set. The restrictions are useful: they let us form the collections ordinary arguments need while blocking the unrestricted construction that produces the paradox.
Sierpiński set Created 2026-10-06 Updated 2026-10-07
An uncountable subset of the real numbers whose intersection with every null set for Lebesgue measure is countable. Testing only Borel sets suffices because every Lebesgue-null set has a Borel null superset. No measurability of is assumed.
Sigma-algebra Created 2026-09-24 Updated 2026-10-14
A sigma-algebra on a set is a collection of subsets such that , implies , and for all implies . Thus it contains the empty set and is closed under countable intersections as well. This is precisely the closure needed to apply countable additivity without leaving the domain of a measure.
For ,
is a sigma-algebra. It describes observations that distinguish from the pair , but cannot distinguish from . The power set provides a finer sigma-algebra with all eight subsets. Both are valid; choosing a sigma-algebra records which questions the model can answer.
On the real numbers, the Borel sigma-algebra contains all open sets and everything generated from them by these operations. The Lebesgue measurable sets form a larger sigma-algebra, including all subsets of Borel null sets. Closure under countable unions accommodates constructions involving an entire sequence of observations or approximations.