Invariance¶
Core Idea¶
(1) Invariance is the property of a named feature — a quantity, a relation, a structural identity — remaining unchanged under a named family of transformations: a claim of invariance commits jointly to what is preserved and to which operations preserve it, so the claim is never "X is invariant" in isolation but always "X is invariant under T." (2) The distinctive focus is on the preserved feature as a first-class object of reasoning, distinguished from constancy (nothing is acting, so nothing is preserved in the structural sense), from equivariance (the output transforms predictably with the input, not independently of it), from symmetry (see symmetry #8; symmetry is the transformation group, invariance is what the group preserves — the two are reciprocal), and from isomorphism (which preserves all structure, not a specified invariant feature). (3) Every invariance claim therefore specifies (i) the preserved property or structure, (ii) the transformation or group of transformations under which it is preserved, (iii) the sense in which "unchanged" is meant (strict identity, up to isomorphism, up to equivalence), and (iv) the scope outside which the invariance is not claimed, with the transformation set typically closing as a group so that "applying any member" is well-defined. (4) The deeper abstraction is that invariance is the structural bridge from transformation groups to conserved information: once a property is invariant under a group, it descends to the quotient (the orbit space), so reasoning about the property can proceed at the coarser level of equivalence classes rather than at the finer level of raw configurations, and this descent is the mechanism by which symmetries generate conservation laws (Noether's theorem[1] gives the continuous-group version — each continuous symmetry of the action corresponds to a conserved quantity), topological invariants (genus, Euler characteristic[2], homotopy class[3]) classify spaces up to deformation, loop invariants[4][5] certify programs correct by identifying what is preserved across each iteration, and modern equivariant deep learning architectures[6][7] bake invariance into model structure so that learning occurs on the quotient rather than on the full data space — the same conceptual move across domains that otherwise share nothing.
How would you explain it like I'm…
Stays the Same
What Doesn't Change When You Change Something
Invariance (Preserved Under Transformation)
Structural Signature¶
The operation presumes (a) a namable feature whose preservation is at stake, (b) a transformation or group of transformations whose action on the system is well-defined, and © a claim of preservation that can be verified by applying the transformation and checking the feature. An invariance structure has six defining components:
- A named preserved feature — the preservation target: a specific quantity, relation, structural identity, or property is identified as the invariant — not the system as a whole, but an extractable feature of it (the length of a segment, the genus of a surface, the value of a loop variable, the optimal-solution cost, the output of a function).
- A named transformation (or group) — the action commitment: a specific set of operations is identified (rotations, translations, basis changes, coordinate changes, relabelings, time shifts, gauge transformations, reparameterizations, loop iterations, data augmentations) with enough structure that "applying any member" is meaningful. Most productive cases have the transformations closing as a group, though semigroup and action-only cases exist.
- The preservation claim — the invariance commitment: applying any transformation in the named set to a valid input leaves the feature's value or structural identity unchanged in the relevant sense (strict equality, equivalence up to a specified relation, isomorphism). The sense of "unchanged" must be specified alongside the claim.
- Bounded scope — the domain commitment: a defined boundary delimits where the invariance is claimed. Outside the boundary (in a different regime, frame, or domain), the invariance may degrade or fail. The boundary carries as much weight as the invariance itself — an invariance without a stated scope is a rhetorical gesture.
- Non-trivial transformation — the nontriviality commitment: the transformation actually changes some feature of the representation (otherwise invariance is empty — everything is invariant under the identity). The invariance is informative precisely because the transformation is "doing something," and the feature survives.
- Inferential license — the transfer commitment: once invariance is established, properties of the feature can be computed on any convenient orbit representative and transferred to all orbit members, conservation laws can be derived via Noether's theorem[1] for continuous cases, and downstream reasoning (bounds, uniqueness, cross-domain transfer) uses the invariance as a first-class premise.
Structural distinctions include: the transformation group's size and topology (finite discrete vs continuous Lie); the invariance's exactness (exact vs approximate/broken); the scope (global vs local/gauge, frame-independent vs coordinate-independent); and the relationship to equivariance (invariance ignores the input's transformation, equivariance tracks it). The distinguishing structural commitment is the joint naming of feature-and-transformation — structures that share one without the other (conserved quantities without a transformation, transformations without a preserved feature) depart along specific axes and have different names (constancy, mere action, respectively).
What It Is Not¶
- Not constancy — a quantity that no process touches is not invariant in the structural sense; invariance requires that a transformation genuinely act and the feature survive. "The speed of light is invariant" is a claim about how c transforms under Lorentz boosts, not a statement that nothing ever changes c.
- Not symmetry — see
symmetry#8. Symmetry is the transformation group; invariance is what the group preserves. This is the primary tight-pair relationship in this cluster: every symmetry has invariants (Noether's theorem[1] makes this explicit for continuous groups — each one-parameter family of symmetries of the action yields a conserved current); every invariant belongs to some symmetry (the stabilizer of the invariant, the largest group that preserves it, possibly trivial). They are reciprocal first-class abstractions, not synonyms. Treating them interchangeably loses the ability to talk about either the group's independent algebraic structure or the invariant's independent physical or mathematical content. - Not equivariance — a feature is equivariant if its transformation is a known function of the input's transformation: f(T·x) = T'·f(x), where T' is some (typically related) transformation on the output side. Invariance is the special case T' = identity. Equivariant architectures[6][7] preserve information the input carries through its own transformation, whereas invariant architectures collapse that information. Routinely conflated, structurally distinct.
- Not isomorphism — isomorphism preserves all structure (a bijective structure-preserving map); invariance preserves a specified feature under a specified transformation. An isomorphism yields many invariants automatically (everything first-order-definable from the isomorphism type) but most invariance claims are narrower than isomorphism.
- Not approximation — exact invariance is preserved identically under the transformation; approximate invariance deviates by a bounded, characterized amount. They are different structural claims with different inferential licenses: exact invariance licenses strict conservation, approximate invariance licenses bounded-error conservation, and conflating them produces systematic errors that track the approximation's magnitude.
- Not duality in the structural sense — see
duality#17. A duality is an involutive pairing between two classes of object; an invariance is a one-sided preservation claim under a group action. They interact (an involutive duality is a Z/2 symmetry with self-dual fixed points as its invariants; Noether dualities in physics pair symmetries with conservation laws), but they are distinct structural moves: duality correlates two descriptions, invariance asserts preservation of one feature under a group. - Common misclassification — calling a property "invariant" without specifying the transformation, or claiming invariance at the wrong scope (e.g., coordinate independence mistaken for frame independence, or training-distribution invariance mistaken for distributional-shift robustness). The missing specification is usually the load-bearing part of the claim.
Broad Use¶
Invariance is a foundational mode of reasoning across mathematics, physics, and computer science. In mathematics, geometric invariants classify spaces and structures: Euler's 1752 formula V − E + F = 2[2] established the first topological invariant (the Euler characteristic); Poincaré's 1895 Analysis Situs[3] launched algebraic topology by defining homology and homotopy invariants that distinguish spaces up to continuous deformation; Klein's 1872 Erlangen program[8] reorganized geometry by asking which properties are invariant under each candidate transformation group (Euclidean, affine, projective, conformal), making invariance the defining criterion of each geometry rather than an afterthought. The cross-ratio is projectively invariant, lengths are Euclidean-invariant, angles are conformal-invariant — each geometry's "real content" is its invariants.
In physics, Noether's 1918 theorem[1] established the deepest link between symmetry and conservation: every continuous symmetry of the action yields a conserved current, so time-translation invariance ⇒ energy conservation, space-translation invariance ⇒ momentum conservation, rotational invariance ⇒ angular-momentum conservation, gauge invariance ⇒ charge conservation. Weyl's 1929 formulation of gauge invariance[9] (later extended by Yang and Mills in 1954 to non-abelian gauge groups[10]) generalized this from global to local invariance: demanding that a global symmetry hold independently at each spacetime point forces the introduction of a gauge field, which in turn mediates a force. The Standard Model is organized by this move — U(1) gauge invariance generates electromagnetism, SU(2) × U(1) generates the electroweak interaction, SU(3) generates the strong force. General relativity is built on diffeomorphism invariance (the laws of physics are invariant under smooth coordinate changes), and Lorentz invariance is the defining commitment of special relativity.
In computer science, invariants are the foundation of program correctness. Floyd's 1967 "Assigning Meanings to Programs"[4] and Hoare's 1969 axiomatic semantics[5] established loop invariants — properties true before the loop, preserved by each iteration, and entailing the post-condition when the loop terminates — as the primary technique for proving iterative programs correct. Type invariants, class invariants, and representation invariants in object-oriented and functional programming discharge similar work at coarser scales: invariants that must hold before and after every method call, that every constructor establishes and every mutator preserves. Compiler correctness and concurrent-algorithm correctness rely on specifying and preserving invariants across transformations of program state. In machine learning, permutation-invariant architectures (Deep Sets) handle unordered inputs; translation-invariant convolutional architectures[11] have been the workhorse of computer vision since the late 1980s; and group-equivariant networks[6] and geometric deep learning[7] have generalized invariance-by-design from translations to arbitrary group actions.
In statistics and decision theory, invariance axioms organize entire frameworks: Arrow's Independence of Irrelevant Alternatives[12] (the social-choice ranking of two alternatives is invariant under the addition or removal of a third) is one of the load-bearing axioms of social-choice theory; scale-invariance of utility under positive affine transformations is baked into expected-utility theory; permutation invariance is assumed in i.i.d. sampling. In linguistics, truth-conditional content is often claimed to be preserved under paraphrase — a semantic invariant — though the exactness of this claim is contested. In cryptography, hash invariance under benign reformattings (whitespace normalization, case folding) is both a design target and a security risk if the transformation group is wider than intended.
Clarity¶
Invariance clarifies by cutting a system into two parts — what changes under a transformation and what does not — and labeling the cut. The labeling is itself the clarifying move: committing to an invariance commits to a specific transformation group, which in turn forces precision about which variations are equivalent (and therefore ignorable) and which are distinctive (and therefore informative). The clarifying force depends on the commitment being precise: "this is invariant" is rhetoric; "this is invariant under the cyclic group C_4 acting by 90-degree rotation" is a claim that can be verified, falsified, or quantitatively relaxed. A crystallographer can check whether a proposed space-group invariance is consistent with a diffraction pattern, a programmer can check whether a proposed loop invariant is preserved by each iteration (mechanized in tools like Dafny, Why3, and Frama-C), a physicist can measure whether a supposed conservation law fails by a specific amount (the fingerprint of an approximate rather than exact symmetry), and a statistician can test whether a supposed distributional invariance holds in the data. The additional clarifying move, once the invariance is established, is the quotient construction: the orbit space (the set of equivalence classes under the group action) is often simpler than the original system, and reasoning can proceed at the quotient level with the invariance guaranteeing that the answer lifts to any orbit representative.
Manages Complexity¶
Invariance manages complexity by folding combinatorially many configurations into a single representative (one per equivalence class or orbit) and certifying that reasoning at the quotient level descends from or lifts to the original system. A system with invariance under a group G of order |G| has (roughly) its configuration count reduced by a factor of |G| when reasoning is invariance-respecting; continuous invariances reduce dimensionality (one invariant = one conserved quantity = one equation cutting the state space). This quotienting underlies enormous practical dividends: in constraint solving and optimization, symmetry-respecting invariance allows canonical-form pruning (exploring only one representative per orbit); in physics, conservation laws cut the dynamics into invariant surfaces (energy surface, angular-momentum sphere) on which motion evolves; in programming, loop invariants localize correctness reasoning to a bounded statement about a single iteration rather than an unbounded statement about all iterations; in machine learning, invariant and equivariant architectures require less data because they do not need to learn the invariance from examples — it is built into the hypothesis class. Invariance also licenses transfer: any result proven for one orbit element holds for all; any bound established in a frame holds in all frames related by the invariance group. The cost is informational: a feature that is invariant under G cannot distinguish configurations in the same orbit, so if those distinctions matter the invariance must be broken (symmetry-breaking terms, distinguishing labels, gauge-fixing conditions). The art of using invariance for complexity management is placing the cut at the right level — invariant over genuinely-irrelevant variation, non-invariant over the distinctions the problem needs to preserve.
Abstract Reasoning¶
Invariance trains a reasoner to ask a specific sequence of questions: what is being claimed to remain the same, under what transformation group, in what sense, and within what scope. Asking the full quartet forces precision that the folk-use of "invariant" often elides. Is the claim exact or approximate, and if approximate, what bounds the deviation? (This distinguishes strict conservation laws from near-conservation, and strict type invariants from invariants-that-usually-hold.) Should this be invariance or equivariance — does the output need to ignore the input's transformation (invariance) or transform lawfully with it (equivariance)? (This distinguishes bag-of-words architectures from sequence-aware architectures, image-classifier rotation-invariance from segmentation-mask rotation-equivariance.) What conservation law or inference license is this invariance the fingerprint of? (Noether's theorem[1] gives the continuous-group case explicitly; discrete-symmetry analogs give parity, time-reversal, and charge-conjugation laws.) Where does the invariance stop, and what lies outside? (A non-relativistic conservation law fails at relativistic energies; a translation-invariant CNN trained on natural images may fail under distribution shift.) The discipline is to specify the invariance fully — property, group, sense, scope — before drawing inferences from it, and to recheck the specification when moving across regimes. The deeper abstraction is that invariance is the main bridge between a system's actual behavior and a system's admissible descriptions: every scientific law is an invariance claim about what transformations of the representation preserve the law's truth, and every engineered guarantee is an invariance claim about what state transitions preserve the guarantee.
Knowledge Transfer¶
Mathematics (topology, geometry, algebra) → property: genus / Euler characteristic / cross-ratio → transformation: continuous deformation / projective map / automorphism → sense: equality of topological invariant → scope: specified category (continuous, smooth, projective) → inference: classification up to deformation / up to projective equivalence Physics (classical mechanics, field theory) → property: energy / momentum / angular momentum / charge → transformation: time / space / rotation / gauge → sense: exact equality of conserved current → scope: regime of validity (non-relativistic, classical, quantum) → inference: Noether-theorem derivation, conservation law Computer science (program verification) → property: loop variable's loop invariant / class invariant / type invariant → transformation: loop iteration / method call / update → sense: predicate holds before and after → scope: reachable states of the program → inference: program correctness via Hoare logic[5] Machine learning (equivariant and invariant architectures) → property: output / latent representation → transformation: translation / rotation / permutation / group action → sense: equal output (invariance) or lawfully-transformed output (equivariance) → scope: input domain of the trained model → inference: reduced sample complexity, generalization under the transformation Statistics and decision theory → property: ranking / utility / inference → transformation: irrelevant alternative / affine utility change / relabeling → sense: preserved ranking / preserved inference → scope: axiom's stated domain → inference: social-choice aggregation, utility-theoretic equivalence Cryptography → property: hash value / ciphertext / signature → transformation: benign reformatting / key re-application → sense: strict equality → scope: specified input-normalization regime → inference: integrity check, collision resistance Geometry and graphics → property: length / angle / cross-ratio / curvature → transformation: rigid motion / similarity / projective / conformal → sense: preserved geometric quantity → scope: specified geometry → inference: geometric construction, classical theorem transfer Linguistics and semantics → property: truth-conditional content / speech-act force → transformation: paraphrase / translation / register shift → sense: preserved meaning → scope: shared conceptual frame of speakers → inference: entailment preservation, semantic equivalence Economics (market design) → property: equilibrium allocation / welfare → transformation: renumeraire / relabeling of agents → sense: preserved allocation modulo renaming → scope: specified market structure → inference: welfare theorems, implementation Everyday reasoning → property: identity / fairness / consistency → transformation: relabel roles / swap participants → sense: preserved judgment → scope: informal, often implicit → inference: "same thing, different wrapper" — or, structural equivalence under role swap
The shared structure across these contexts is the four-part specification (preserved feature / transformation group / sense-of-sameness / scope) plus the inferential-license move (invariance ⇒ transfer, conservation, or quotient-level reasoning). The distinctions lie in the transformation group's structure (finite discrete, continuous Lie, categorical, pragmatic), in the feature's domain (geometric, physical, computational, semantic), and in the tolerance for approximate invariance (exact in pure mathematics, approximate in nature and engineering, aspirational in social science). A topologist classifying a surface, a physicist identifying a conservation law, a programmer discharging a loop-invariant proof obligation, and a machine-learning engineer designing a rotation-invariant image classifier are performing the same structural work: name the feature, name the transformations, verify the preservation, state the scope, and use the invariance to license downstream inference.
Example¶
Formal / abstract — The Euler characteristic as a topological invariant¶
The Euler characteristic χ of a convex polyhedron is the integer V − E + F, where V, E, F are the numbers of vertices, edges, and faces. For every convex polyhedron in ℝ³ (and, more generally, for every simply-connected polyhedral surface), Euler's 1752 formula[2] gives χ = 2 — the cube (8 − 12 + 6 = 2), the tetrahedron (4 − 6 + 4 = 2), the icosahedron (12 − 30 + 20 = 2), and every other such shape agree on this value. The invariance is more general: χ is invariant under every homeomorphism (continuous deformation with continuous inverse), meaning any two surfaces that can be continuously deformed into one another — a coffee cup into a donut, a cube into a sphere — share the same χ. The torus has χ = 0; the genus-2 surface (double-torus) has χ = −2; genus g has χ = 2 − 2g. This example exhibits every feature of the six-component structural signature: the preserved feature is the integer χ (component 1); the transformation group is the group of homeomorphisms of the surface (component 2); the preservation claim is strict integer equality under any homeomorphism (component 3); the scope is compact orientable surfaces without boundary (outside this scope — non-orientable, non-compact, boundary — adjusted formulas apply) (component 4); homeomorphisms genuinely act on surfaces (they are not trivial — they can fold, twist, and smoothly deform) (component 5); the inferential license is that χ classifies surfaces up to homeomorphism: two compact orientable surfaces without boundary are homeomorphic iff they have the same χ, reducing an infinite classification problem to a single integer (component 6).
The invariance has rich downstream consequences. Combinatorial surfaces with different triangulations yield the same χ — the invariant does not depend on the choice of mesh, so computations on any convenient triangulation transfer to the underlying surface. Refinements of the triangulation do not change χ, and neither do smooth deformations, which is why graphics and mesh-processing algorithms exploit χ as a topological signature that is cheap to compute and robust to mesh representation. Poincaré's 1895 Analysis Situs[3] generalized this to higher-dimensional manifolds via homology: χ is the alternating sum of Betti numbers, and Betti numbers are themselves invariants under continuous deformation. The Gauss-Bonnet theorem ties the topological invariant χ to a differential-geometric integral (∫∫ K dA = 2π·χ over a compact surface, relating Gaussian curvature to topology), converting a local geometric computation into a global topological statement — an archetypal use of invariance as a bridge between different levels of description.
Mapped back to the six-component structural signature: the integer χ (component 1); homeomorphism group of the surface (component 2); strict integer equality (component 3); compact orientable surfaces without boundary (component 4); homeomorphisms non-trivially deform the surface (component 5); χ classifies up to homeomorphism, reducing infinite classification to a single integer (component 6).
Applied / industry — Loop invariants in financial-reconciliation software¶
(Illustrative example; specific production-software correctness claims are indicative rather than drawn from any particular vendor's verification suite.)
A daily bank reconciliation process matches millions of transaction records from two sources — the bank's ledger and an internal accounting system — and flags mismatches. The core algorithm iterates through transactions, updating a running balance and a set of pending matches. For any such iteration to be trustworthy, a programmer (or a formal-methods tool like Dafny, Why3, or Frama-C) must state and preserve a loop invariant: a predicate that holds before the loop begins, is preserved by each iteration, and implies the post-condition when the loop terminates. For reconciliation, a canonical invariant is: "at every iteration, the sum of matched-pair amounts plus the pending-balance equals the sum of processed transactions from both sources." This invariance — preservation of total accounting balance across the iteration — is the structural guarantee that the algorithm does not lose or spuriously create money.
The invariance is formally verified or code-reviewed at three structural points: (1) initialization: before the first iteration, the matched-pair sum is 0, the pending balance is 0, and the processed-transaction count is 0; the invariant holds vacuously. (2) preservation: assuming the invariant holds before an iteration, each possible branch (match, add-to-pending, flag-mismatch) preserves the invariant by construction — the transformation "one loop iteration" maps invariant-satisfying states to invariant-satisfying states. (3) termination & post-condition: when the loop terminates (all transactions processed), the invariant together with the termination condition implies the post-condition (matched + pending = total processed, with mismatches correctly flagged). Floyd's 1967 "Assigning Meanings to Programs"[4] and Hoare's 1969 axiomatic semantics[5] formalize this three-point structure as the standard pattern of loop-invariant reasoning; industrial verification tools mechanize the preservation check, flagging paths where the invariant can be violated.
The example exhibits the industrial version of the same structural machinery. The preserved feature is the equality "matched + pending = processed" (component 1); the transformation is "one loop iteration" — a specific kind of state update (component 2); the preservation claim is strict predicate-level equality at every iteration (component 3); the scope is the set of program states reachable during reconciliation (outside this scope — exceptional termination, concurrent mutation — separate invariants are needed) (component 4); each iteration genuinely acts on state (balances change, pending sets grow or shrink) (component 5); the inferential license is that termination with the invariant intact implies the desired post-condition, yielding a full correctness proof (component 6).
Failure modes are diagnostic. If the invariant is too weak (e.g., only asserts "the accumulator is non-negative"), it won't entail the post-condition even when preserved. If it is too strong (e.g., asserts something that holds in the final state but not during intermediate iterations), preservation fails and the verification tool will reject it. The canonical invariant-design discipline — state an invariant that (a) holds initially, (b) is preserved by each iteration, and © implies the post-condition at termination — is exactly the structural commitment the invariance abstraction demands: feature + transformation + preservation + scope + non-triviality + inferential license. Machine-learning architectures that bake translation invariance into their structure[11], or that more generally bake group equivariance into their layers[6][7], do the analogous work at a much larger scale: the preserved feature is the output or a latent representation, the transformation is a group action on the input, preservation is enforced by layer-level constraints, the scope is the input domain, and the inferential license is generalization with reduced sample complexity under the invariance.
(Illustrative example; specific production-software correctness claims are indicative rather than drawn from any particular vendor's verification suite.)
Structural Tensions and Failure Modes¶
-
T1: Generality vs Informativeness.
- Structural tension: The broader the transformation group, the more universal the invariance — but also the fewer and more trivial the surviving invariants. Every quantity is invariant under the trivial group (which does nothing); almost no quantity is invariant under the group of all bijections.
- Common failure mode: Over-broad invariance claims that collapse into tautologies ("invariant under everything that matters"), or conversely, picking a transformation group so narrow that the invariant fails to transfer across closely-related cases. The cure is to state the smallest transformation group under which the claim is informative for the downstream use.
-
T2: Exactness vs Robustness.
- Structural tension: Exact invariance is fragile — small perturbations break it, and the reasoning that depends on exactness (strict conservation, rigorous quotient construction) fails outside exactness. Weakening to approximate invariance gains robustness but loses the hard inferences.
- Common failure mode: Treating approximate invariance as exact — assuming a weakly broken symmetry still yields strict conservation, or using a near-invariant loop invariant to conclude correctness without accounting for the near-break. The inverse failure: dismissing useful approximate invariants as worthless because they are not exact.
-
T3: Invariance vs Expressiveness.
- Structural tension: Building invariance into a representation or model constrains what it can distinguish — which is the point, but can also preclude distinctions the system genuinely needs. Every invariance collapses some distinctions.
- Common failure mode: Enforcing invariance the problem does not have (permutation-invariance on ordered data, rotation-invariance on chiral molecules), destroying information the system needed. The inverse: refusing to bake in a genuine invariance, forcing the model to learn it from examples at higher data cost.
-
T4: Explicit Design vs Emergent Learning.
- Structural tension: Invariance can be hand-engineered into a representation (type systems, convolutional layers, group-equivariant architectures) or allowed to emerge from data (data augmentation, large-scale pretraining). Hand-engineered invariance is crisp but brittle to mis-specification; emergent invariance is flexible but unreliable under distribution shift.
- Common failure mode: Trusting emergent invariance under regime change — assuming a learner has "internalized" an invariance when it has only memorized training-set statistics, then deploying the model on data where the invariance no longer holds.
-
T5: Invariance vs Equivariance.
- Structural tension: Many systems need their output to transform lawfully with the input (equivariance), not to ignore the input's transformation (invariance). Invariance collapses the transformation's effect; equivariance preserves it through the pipeline.
- Common failure mode: Choosing invariant designs where equivariant ones are required (an image-classifier's rotation-invariance is fine; a segmentation model's output rotation-equivariance is usually required — invariant pooling collapses structure the mask needs to preserve).
-
T6: Scope Boundary vs Regime Change.
- Structural tension: Every invariance has a scope, and outside that scope — a new regime, a new frame, a new ontology — the invariance may change or break. Non-relativistic conservation laws hold at low energies; general-relativistic invariances replace them at high curvature.
- Common failure mode: Applying an invariance across a regime boundary (non-relativistic relations at relativistic energies; training-distribution invariance at deployment-distribution), then being surprised by systematic errors that track the regime shift.
Structural–Framed Character¶
Invariance sits at the structural end of the structural–framed spectrum: it is a pure relational pattern, the same in any domain where it appears, and nothing about its meaning depends on a particular field's vocabulary or assumptions. It names the fact that some feature — a quantity, a relation, an identity — stays unchanged when a specified family of transformations acts on a system, so the claim always pairs what is preserved with which operations preserve it.
Every diagnostic points the same way. No home vocabulary needs to travel with it: the same idea describes a shape unchanged under rotation, a physical law unchanged across reference frames, or a measured statistic unchanged under relabeling, and each is read with its own field's terms rather than an imported set. It carries no evaluative charge — something being invariant is neither praiseworthy nor blameworthy. Its roots are formal, and it can be defined entirely through the language of transformations and preserved features, with no appeal to any human institution or practice. To spot invariance is to detect a preservation already holding in the system, not to lay a viewpoint over it. On every diagnostic, it reads structural.
Substrate Independence¶
Invariance is about as substrate-independent as a prime can be — composite 5 / 5 on the substrate-independence scale. Its signature — a preserved feature, a transformation group, a sense in which preservation holds, and a scope — is fully formal and substrate-agnostic, and it is among the most abstract primes in the catalog. It instantiates across topological invariants in mathematics, Noether conservation laws in physics, loop invariants in computer science, equivariant architectures in machine learning, permutation invariance in statistics, hash invariance in cryptography, and semantic invariance in linguistics. Both its formal and applied examples span five or more substrates, making it a canonical 5.
- Composite substrate independence — 5 / 5
- Domain breadth — 5 / 5
- Structural abstraction — 5 / 5
- Transfer evidence — 5 / 5
Relationships to Other Abstractions¶
Current abstraction Invariance Prime
Foundational — no parent edges in the catalog.
Children (31) — more specific cases that build on this
-
Perceptual Constancy Domain-specific is a kind of Invariance
Perceptual constancy is invariance specialized to a stable distal percept under transformations of the proximal sensory input.It names the preserved distal property and viewing transformations and adds learned perceptual inversion and illusion boundaries. Invariance supplies the genus: Properties unchanged under transformation. Perceptual Constancy preserves that general structure while adding its differentia: The phenomenon by which a perceiver holds an object's properties — size, shape, color, identity — stable despite large variation in the proximal stimulus, by inferring the distal property and implicitly factoring out the viewing condition. The parent can occur without those added commitments, whereas removing the parent structure leaves no basis for classifying the child as this subtype. That asymmetry establishes subsumption rather than mere association.
-
Revenue Equivalence Theorem Domain-specific is a kind of Invariance
Revenue Equivalence is invariance specialized to expected seller revenue under auction-format transformations satisfying fixed scope conditions.The property preserved is expected revenue; the transformation family is the set of auction formats sharing allocation and lowest-type rent; the theorem's risk-neutral independent-private-values conditions delimit the invariant regime.
-
Archetype Prime is a kind of Invariance
An Archetype is a kind of invariance: a structural core of a character, role, or pattern preserved across cultures, media, and historical periods.An archetype is a structural template — character traits, narrative functions, symbolic configurations — that recurs across cultures, periods, and media with a stable core recognizable beneath surface variation. The named feature (the structural core) is preserved under the named family of transformations (cultural, temporal, medial reskinning). That is the defining shape of Invariance. Archetype specializes invariance by fixing the preserved feature as a humanly recognizable template and the transformations as cross-cultural reinstantiation.
- Associativity Prime is a kind of Invariance
Associativity is a specialization of invariance whose preserved feature is the result of an operation under regrouping of operands.Associativity is a specialization of invariance. Specifically, it names the case in which the family of transformations is the regrouping of operands by parentheses and the preserved feature is the value produced by the binary operation. Like every invariance claim, it commits jointly to a preserved feature and the operations preserving it; associativity is the subclass where the operations are parenthesizations and the algebraic consequence -- unambiguous expressions written without explicit grouping -- underwrites group theory, monoids, semigroups, and the rest of abstract algebra.
- Commutativity Prime is a kind of Invariance
Commutativity is a kind of invariance: the result of a binary operation is preserved under the swap-of-operands transformation.Commutativity says that a o b equals b o a for all elements, so the result of the operation is unchanged under the transformation that swaps the operand order. That is the precise structure of Invariance: a named feature (the operation's value) preserved under a named family of transformations (operand permutation). Commutativity specializes invariance by fixing the operation as a binary combiner and the transformation as the order-swap on its two arguments.
- Conservation Laws Prime is a kind of Invariance
Conservation laws are the temporal specializations of invariance in which a specified quantity remains unchanged through a system's allowed evolution.Invariance names persistence under a specified transformation. A conservation law fixes that transformation to the system's evolution through time and fixes the invariant to an additive or otherwise measurable quantity. The system may redistribute or transform the quantity internally, but its closed-boundary total remains unchanged. Conservation Laws therefore specializes Invariance while adding quantity, boundary, flux-balance, and time-evolution commitments.
- Equivalence Principle Prime is a kind of Invariance
The equivalence principle is a specialization of invariance in which physics is preserved under the local choice of a free-fall frame.The equivalence principle is a specialization of invariance in which the preserved feature is the local form of physical law and the family of transformations is the choice of free-fall reference frame within a small region of spacetime. It inherits the general invariance commitment that a named feature remains unchanged under a named family of transformations, and specializes by fixing the preserved feature to special-relativistic physics and the transformations to the local-inertial frames that render gravity undetectable as a force, recast as spacetime curvature.
- Equivariance Prime is a kind of Invariance
Equivariance is a kind of invariance: under a coordinated transformation of input and output, the map's structural relation to the group is preserved.Equivariance is the property f(g.x) equals g.f(x), so applying the group action before or after the map gives the same result. The preserved feature is the commutative-square relation between the map and the group action, and it is preserved under the named group of transformations. That is precisely the structure of Invariance, with the preserved feature being relational rather than pointwise. Equivariance specializes invariance to maps whose output transforms in lockstep with the input rather than ignoring the action.
- Gauge Invariance / Gauge Symmetry Prime is a kind of Invariance
Gauge invariance is a specialization of invariance whose preserved feature is observable physics and whose transformation group is local gauge transformations.Gauge invariance is a specialization of invariance. Specifically, it names the case in which the family of transformations is a local symmetry group acting on unobservable internal degrees of freedom (phase, color, spacetime reparameterization) and the preserved feature is the set of physical observables. Like every invariance claim, it commits jointly to what is preserved and under which operations; gauge invariance is the subclass where the operations form a Lie group acting locally and physical states correspond to entire gauge-equivalence classes rather than individual configurations.
- Half-Life Prime is a kind of Invariance
Half-Life is a kind of invariance: the time to halve a quantity is preserved across all starting amounts for first-order processes.Half-life is the time required for a first-order decay process to reduce a quantity to half its initial value, with the defining property that this time is constant regardless of the starting amount. The named feature (the halving time) is preserved under the named family of transformations (rescaling of the initial amount). That is precisely a claim of Invariance. Half-life specializes invariance by fixing the preserved feature as the characteristic halving duration and the transformation as initial-amount rescaling.
- Idempotence Prime is a kind of Invariance
Idempotence is a specialization of invariance in which the preserved feature is the operation's output and the transformation family is repeated application of the operation.Idempotence is a specialization of invariance in which the preserved feature is the result of applying an operation and the transformation family is further applications of the same operation: f(f(x)) equals f(x), so repetition leaves the output unchanged after the first application. It inherits the general invariance commitment that a named feature remains unchanged under a named family of transformations, and specializes by fixing both: the feature is the operation's value and the transformation is self-repetition. This grounds safe retry, replay, and duplicate-tolerance in distributed systems.
- Periodicity Prime is a kind of Invariance
Periodicity is Invariance specialized to preservation under displacement by a repeat interval.Every instance of the live Periodicity family identifies a value, waveform, state pattern, or statistical structure preserved exactly or within an explicit tolerance when its carrier is displaced by a characteristic interval. That is Invariance with the transformation fixed to discrete translation. Periodicity adds a nonzero period or period set, waveform, phase, frequency, and the distinction between exact, approximate, modulated, and conditional repetition.
- Renormalization Prime is a kind of Invariance
Renormalization is a kind of invariance: universal long-distance behavior is preserved across the flow's rescalings at a fixed point.Renormalization-group flow drives the effective theory through a space of couplings, and its fixed points are precisely the loci where the theory is unchanged under further rescaling. The universal critical exponents and long-distance behaviors observed across disparate microscopic systems are features preserved under the rescaling transformation. That makes renormalization a specialization of invariance: a named family of transformations (the RG flow) leaves a named feature (the fixed-point physics) unchanged.
- Scale Invariance Prime is a kind of Invariance
Scale invariance is a specialization of invariance whose preserved feature survives the rescaling-by-lambda transformation group.Scale invariance is a specialization of invariance. Specifically, it names the case in which the family of transformations is the rescaling group x to lambda-x and the preserved feature is the system's statistical or geometric structure, signaled mathematically by the power-law form f(lambda-x) = lambda-alpha f(x). Like every invariance claim, it commits jointly to what is preserved and under which operations; scale invariance is the subclass where the operations are dilations and the absence of a characteristic scale is what makes the invariance hold.
- Stationarity Prime is a kind of Invariance
Stationarity is a specialization of invariance whose preserved feature is a process's statistical distribution under time (or spatial) translation.Stationarity is a specialization of invariance. Specifically, it names the case in which the family of transformations is time-translation (or spatial shifts) and the preserved feature is the statistical structure of the stochastic process -- mean, variance, autocorrelation, higher moments. Like every invariance claim, it commits jointly to what is preserved and under which operations; stationarity is the subclass where individual realizations fluctuate but the generating distribution remains shift-invariant within the asserted window.
- Universality in Critical Phenomena Prime is a kind of Invariance
Universality in critical phenomena is a kind of invariance in which long-distance behavior is preserved under changes of microscopic detail.Universality in critical phenomena is a specialization of invariance: critical exponents and scaling functions are preserved under variation of microscopic composition, interaction details, and dimensionality (within a class). It inherits invariance's joint specification — what is preserved (the critical exponents) under what transformations (renormalization-group flow toward a fixed point) — particularized to the phase-transition case where the relevant transformation group is the family of microscopic perturbations that the fixed point absorbs as irrelevant.
- Conjugate Variables Prime presupposes Invariance
Conjugate variables presupposes invariance because the canonical transformation between the two descriptions preserves the underlying physical content.Conjugate variables couple two descriptions of a system through a canonical transformation that preserves essential physics or information content while exchanging which features are local. This presupposes invariance: a named feature remaining unchanged under a named family of transformations, with the joint commitment to what is preserved and which operations preserve it. The conjugate transformation preserves the action functional, the commutator structure, or the total signal energy; what is preserved (the invariant) is what makes the two descriptions equivalent for physical purposes despite their different sharpness in different variables.
- Continuity Prime presupposes Invariance
Continuity presupposes invariance because the epsilon-delta condition is the preservation of nearness under the mapping.Continuity presupposes invariance because the no-sudden-jumps condition is exactly the claim that a specific feature -- nearness between input points -- is preserved under the application of the mapping. The preimage-of-open-is-open formulation makes this explicit: the topological structure of openness is the named feature, and continuous maps are the family of transformations that preserve it. Without invariance's joint commitment to what-is-preserved and under-which-operations, the continuity condition has no structural content; continuity is topological invariance under the map. Invariance supplies the prerequisite condition: Properties unchanged under transformation. Continuity operates against that background: Smooth change without jumps. If the parent condition is removed, the child relation becomes undefined or loses the mechanism asserted by this edge; the parent can obtain independently, so the relation is presupposition rather than subsumption.
- Data Integrity Prime presupposes Invariance
Data integrity presupposes invariance because preserving accuracy across the data lifecycle is the preservation of intended content under storage, transmission, and processing operations.Data integrity presupposes invariance because the integrity guarantee names a feature -- the data's intended content and internal rules -- that must remain unchanged under the family of transformations data undergoes (writes, reads, transmission, archival, processing). Checksums, signatures, and constraints are the mechanisms that verify invariance under each operation. Without invariance's joint commitment to preserved feature and preserving operations, there is no formal sense in which data is or is not corrupt; integrity is engineered invariance with detection and recovery. Invariance supplies the prerequisite condition: Properties unchanged under transformation. Data Integrity operates against that background: Accuracy and consistency preserved. If the parent condition is removed, the child relation becomes undefined or loses the mechanism asserted by this edge; the parent can obtain independently, so the relation is presupposition rather than subsumption.
- Dimensional Analysis Prime presupposes Invariance
Dimensional analysis presupposes invariance because dimensional homogeneity requires that physical laws hold unchanged under unit-system changes.Dimensional analysis presupposes invariance because dimensional homogeneity -- the requirement that both sides of a physical equation share the same dimensional signature -- is exactly the claim that the equation's truth is preserved under the named family of unit-system transformations. The Buckingham pi theorem then exploits this invariance: the dimensionless groups are the invariants of the unit-change group, and the count (n minus k) is the dimension of the invariant subspace. Without invariance's joint specification of preserved feature and preserving operations, dimensional reasoning has no formal warrant.
- Frame Problem Prime is part of Invariance
Facts held unchanged under the current action form a constitutive invariant region of every frame-problem solution.The frame is precisely the set of represented facts licensed to persist under a transformation while only direct effects and relevant ramifications are recomputed. Invariance supplies an internal constituent: Properties unchanged under transformation. Frame Problem requires that role within this mechanism: After a change, the challenge of bounding which facts now need re-derivation and which persist by default, without re-checking everything. Remove the parent-role and the child loses a required internal operation, even though the parent can exist outside the child. The child is therefore built from the parent rather than being a taxonomic kind of it.
- Isomorphism Prime presupposes Invariance
Isomorphism presupposes invariance because a structure-preserving bijection is the family of transformations under which the structure is preserved.Isomorphism presupposes invariance because the structure-preservation requirement on the bijection -- group operation, graph adjacency, vector-space linearity, topology -- is exactly the joint commitment to a named preserved feature under a named family of transformations. The isomorphism is the transformation, and the preserved structure is what makes it an isomorphism of that kind rather than a mere bijection. Without invariance's framing of preserved-feature-under-operations, there is no criterion separating structure-preserving maps from arbitrary set-bijections. Invariance supplies the prerequisite condition: Properties unchanged under transformation. Isomorphism operates against that background: Structure-preserving mapping. If the parent condition is removed, the child relation becomes undefined or loses the mechanism asserted by this edge; the parent can obtain independently, so the relation is presupposition rather than subsumption.
- Template Instantiation Prime is part of Invariance
Preservation of the frame and slot semantics across payload substitutions is an internal constituent of template reuse.If the frame changes with every payload, there is no shared template, design-once economy, or cross-instance comparability. parent_in_child
- Turnover Prime presupposes Invariance
Turnover presupposes invariance because the structural identity of the whole must persist as the named feature preserved under member replacement.Turnover presupposes invariance because its defining commitment — the aggregate form, function, or identity persists while constituents cycle through — is precisely an invariance claim: structure is preserved under the transformation of member replacement. It inherits invariance's joint specification of what is preserved (the whole's structure) and which transformations preserve it (constituent swap-out and replenishment). Without invariance's preserved-feature apparatus, there would be no persistent whole against which the cycling parts could be measured.
- Ostinato Domain-specific is a decomposition of Invariance
Ostinato holds one layer's recognizable figure fixed while transformations and development proceed in the co-present layers around it.The fixed figure is the preserved property; each pass and the motion above are allowable transformations; literal or minimal-variation identity is the preservation rule; and changing the figure beyond tolerance is the test that ends the ostinato and routes to theme-and-variation.
- Pedal Point Domain-specific is a decomposition of Invariance
One pitch remains unchanged under the surrounding harmonic transformations, and that preservation is the membership test for the device.The pedal voice and held pitch are the preserved feature; the changing upper- voice progression is the transformation family; duration defines scope; and moving the held pitch with the harmony destroys the pedal-point identity.
- Strophic Form Domain-specific is a decomposition of Invariance
Across the verse-to-verse transformation, the complete musical frame is the property held fixed while only the payload changes.Strict strophic identity is decided on this invariant: alter the music for a particular verse and the instance moves toward modified-strophic or through- composed form. The musical variables specify the domain implementation.
- Symplectic Structure Domain-specific is a decomposition of Invariance
Removing differential-geometric vocabulary leaves a structure preserved exactly under its admissible Hamiltonian flows and canonical transformations.The defining operational test is whether evolution or a coordinate change pulls the two-form back to itself. Strip away manifolds, forms, momenta, brackets, and mechanics; the preserved feature, the transformation, and the exact unchanged-under-transformation relation remain: the structural core of Invariance.
- Tensor Domain-specific is a decomposition of Invariance
Removing multilinear notation leaves a named object preserved under a named nontrivial change of representation, with scope and preserved features explicit.A tensor's components change under basis transformations while the underlying multilinear map, contractions, and physical quantities survive. Tensor adds covariant/contravariant slots, metrics, contraction, and index calculus to the prime's generic preserved-feature-under-transformation relation.
- Linguistic Universals Prime is a decomposition of Invariance
Linguistic universals is the specific shape invariance takes when structural properties are preserved across the world's languages.Linguistic universals is the structurally-particularized form invariance takes in the cross-linguistic case: the preserved feature is the named structural property (e.g., "every language distinguishes nouns from verbs"), the transformation group is variation across the ~7,000 languages, and the empirical evidence is the typological sample. It satisfies invariance's joint commitment — what is preserved under which operations — particularized to the case where the operations are inter-linguistic comparison and the invariants are the universals themselves.
- Production Signature Prime is a decomposition of Invariance
Source attribution depends on signature features surviving changes of content, occasion, and output instance while non-signature features vary.The producer configuration supplies the preserved property; content changes and repeated productions supply transformations; normalization supplies the test; and signature collapse occurs when the trace no longer survives those transformations or ceases to discriminate producers.
Neighborhood in Abstraction Space¶
Invariance sits among the more crowded primes in the catalog (8th percentile for distinctiveness): several abstractions describe nearly the same structure, so a description that fits it will tend to fit its neighbors too — transporting it usually means disambiguating within this family rather than landing on it exactly.
Family — Foundational Mathematical Structures (18 primes)
Nearest neighbors
- Symmetry — 0.87
- Dimension — 0.75
- Scale — 0.74
- Transformation — 0.73
- Frame of Reference — 0.73
Computed from structural-signature embeddings · 2026-07-26
Not to Be Confused With¶
Invariance must be distinguished from Symmetry (similarity 0.789 via scale_invariance), its reciprocal and tightest neighbor. The relationship between invariance and symmetry is subtle and often conflated, but they are distinct first-class abstractions that jointly exhaust the structure. Symmetry is the transformation group: the set of operations that leaves the system unchanged. Invariance is the property that the transformation preserves. If you ask "what transformations leave this object unchanged?" you are asking about symmetry; if you ask "what property is preserved under this transformation?" you are asking about invariance. A square has rotational symmetry (the group of 90-degree rotations leaves it geometrically unchanged); under that symmetry group, several invariants are preserved: the side lengths are invariant, the angles are invariant, the area is invariant. The symmetry is the group; the invariants are the preserved features. Noether's theorem makes this reciprocal relationship explicit for continuous symmetries: every one-parameter family of continuous symmetries of the action (time translation, space translation, rotation, gauge transformation) corresponds to a conserved current (energy, momentum, angular momentum, charge). Given a symmetry, you can derive the invariant; given a strong invariance in a system, you can infer a symmetry. They are two sides of the same coin — the symmetry is the action, the invariance is what that action protects. In practice, when practitioners say "a system has symmetry," they often mean "the system's behavior or properties are invariant under certain transformations" — conflating the group with the preserved features. The distinction matters when designing equivariant systems: a rotation-invariant architecture (invariance focus) achieves the same outcome as a rotation-symmetric design (symmetry focus), but the language clarifies what is being engineered: the group or the feature. In mathematics and physics, the convention is that symmetry names the transformation group and invariance names the feature; conflating them sacrifices precision about which one is being modified, tested, or exploited in downstream reasoning. The tight-pair relationship is fully reciprocal: symmetry is defined by the invariants it preserves, invariance is identified by the symmetry group that preserves it.
Invariance is also distinct from Conservation, though conservation is the most common instantiation of invariance in physical and dynamical-system contexts. Conservation is a dynamical principle: a quantity (energy, momentum, charge, mass) does not change as a system evolves in time. Invariance is a structural property: a feature does not change under a specified transformation. Conservation is invariance under the specific transformation of time evolution in a closed system — it is a special case of invariance, not a synonym. In a more general sense, conservation is concerned with the evolution of a system over time and which quantities remain constant; invariance is concerned with which properties remain constant under any specified transformation (rotation, translation, time, gauge change, relabeling). A conserved quantity is one specific instance of an invariant: it is invariant under the group of time translations in a closed system. But invariance applies far more broadly: a quantity can be invariant under rotations without being conserved in time (the speed of light is invariant under Lorentz boosts; it is not a "conserved" quantity in the typical sense, though Lorentz invariance does imply conservation of energy and momentum via Noether's theorem). A topological invariant like the Euler characteristic is invariant under continuous deformations (homeomorphisms) but is not typically called "conserved." In computer science, a loop invariant is invariant under loop iterations; it is not a conservation law in the dynamical sense. The distinction also clarifies the scope: conservation laws apply dynamically (during evolution), while invariance applies structurally (under a transformation, which need not be temporal). A conservation principle is one arrow of reasoning (time evolution → invariance); invariance is the broader structural property that underlies that principle. When conservation laws fail (e.g., in open systems with energy input/output, in non-inertial frames where pseudo-forces emerge), practitioners often speak of "broken symmetries," which means the invariance under that transformation has broken — the distinction between the invariance and the conservation law clarifies what has actually changed.
Invariance is distinct from Equivalence, though they interact and are sometimes confused. Equivalence is a relation between two or more entities stating that they are equally valid, can substitute for each other in certain respects, or are interchangeable under some specified criterion. Invariance is a property of a feature that does not change under a transformation. Equivalence classes are formed by grouping together elements that are equivalent under some relation; invariants often partition the space into equivalence classes where elements in the same class have the same invariant value. Two matrices are equivalent (under similarity transformations) if they have the same trace, the same determinant, and the same eigenvalues — these eigenvalues are invariants of the similarity group. Two graphs are isomorphic if there exists a bijection between their vertices that preserves adjacency; isomorphism is a form of equivalence; invariants of isomorphic graphs (vertex count, edge count, chromatic number) are the same. In machine learning, rotation-equivalent networks accept inputs that differ only by a rotation and map them to equivalent outputs — this is equivariance, not invariance (the output transforms with the input); rotation-invariant networks map rotationally equivalent inputs to the same output. The relationship is that invariants characterize equivalence classes: elements in the same equivalence class share the same values of the invariant. Invariance is about what does not change under a transformation; equivalence is about when two systems can be treated as "the same" for some purpose. They reinforce each other in reasoning (if two systems are equivalent under a transformation and an invariant characterizes them, both systems have the same invariant value), but they target different aspects of the structure: invariance targets preservation, equivalence targets interchangeability. Confusing them leads to subtle errors: assuming that two equivalent systems can be freely substituted when actually they differ in some non-invariant feature the application needs to preserve, or conversely, assuming that sharing an invariant means two systems are equivalent when they differ in other non-invariant aspects that matter.
Solution Archetypes¶
Solution archetypes in the catalog that build on this prime — directly (this prime is a source ingredient) or as a related prime.
Built directly on this prime (12)
- Behavior-Preserving Refactoring: Improve the inside without changing what the outside can validly observe or rely on.▸ Mechanisms (15)
- Architecture Decision Record — Records why a complexity-adding placement choice was accepted — the criterion applied, the host-dependency it commits to, and the conditions that would reopen it — so the decision is revisited on evidence, not relitigated from memory.
- Automated Refactoring Tool — Applies named code transformations — rename, extract, inline, move — mechanically and across every reference at once, preserving observable behavior by construction rather than by testing.
- Backward Compatibility Test — Checks that a new version still honors every promise existing consumers already rely on, so an internal change can ship without breaking anyone downstream.
- Behavioral Diff Gate — Runs the same inputs through the old and new code and blocks the change automatically if any output differs beyond an approved tolerance — an unapproved behavioral diff is a failed build.
- Characterization Test Harness — Pins down what legacy code currently does — bugs and all — by capturing its outputs on a batch of inputs as the golden baseline, so any later change that alters that behavior shows up immediately.
- Compatibility Test Suite — A maintained battery that runs the matrix of supported version, client, and configuration combinations on every change, standing guard that none of them regresses.
- Dependency Inversion — Refactors a rigid dependency by making both sides depend on a stable abstraction, so a volatile detail can be swapped or restructured without disturbing the code that used it.
- Deployment Rollback — Returns a running service to its last validated release when a change turns out bad, converting a failed refactor from an outage into a quick, bounded reversal.
- Golden Case Benchmark — A curated library of canonical input-to-output cases, captured from the current system, that serves as the fixed reference for judging whether a refactor changed observable behavior.
- Interface Contract Test — Turns the promises a delegated host interface makes — permissions, isolation, error and capacity behavior, and what happens when the host is unavailable — into automated pass/fail checks, so delegation is verified rather than assumed.
- Refactoring Cadence — A recurring, time-boxed slot for structural cleanup, so complexity is paid down continuously and behavior-neutral improvement never has to wait for permission.
- Refactoring or Cleanup Sprint — Sets aside a dedicated, time-boxed block of work to pay down a specific chunk of structural debt to an agreed standard — and to stop when that standard is met, not when the code is perfect.
- Regression Test Suite — Re-runs a corpus of previously-passing cases against each new version so that any unintended loss of working behaviour breaks the build, using the system's own recorded past output as the reference.
- Shadow Run or Parallel Run — Runs the new implementation alongside the old on live traffic — old system serving, new system shadowing — and compares their outputs and real-world side effects before trusting the new one to take over.
- Small-Step Refactoring Workflow — Breaks a large restructuring into a chain of tiny, individually behavior-preserving edits, each verified green before the next, so the system is never more than one small step away from working.
- Data Integrity Preservation: Preserve the accuracy, consistency, and traceability of data or records across their lifecycle.▸ Mechanisms (11)
- Access Control Enforcement — Restricts who or what may read, write, approve, delete, or restore protected data, so records change only through authorized paths and never through hidden side doors.
- Audit Log — Keeps an append-only, attributable record of every action on protected data — who, when, and what changed — so integrity events can be investigated and reconstructed after the fact.
- Backup and Restore Verification — Proves that protected data can actually be restored and that the restored records still satisfy their integrity invariants — not merely that a backup file exists.
- Checksum or Hash Validation — Detects unintended alteration, transmission error, or corruption by comparing a freshly computed hash against a trusted reference value.
- Data Lineage Capture — Records how each value moved through sources, transformations, joins, and derivations, so a suspect output can be traced back to the upstream step that produced it.
- Data Validation Schema — Encodes the structure, types, allowed values, and cross-field rules a record must satisfy, rejecting malformed data at the boundary before it is trusted.
- Integrity Anomaly Monitoring — Watches trusted data for impossible values, unexpected drift, duplication spikes, missing records, or staleness, and raises a visible exception when something looks wrong.
- Reconciliation Workflow — Compares two records or states that should agree, classifies each discrepancy, and drives it to a repair, quarantine, or accepted-divergence decision that is recorded.
- Referential Integrity Constraint — Prevents a record from pointing to a nonexistent or invalid related record, so links between data never dangle.
- Source-of-Truth Registry — Documents, per field or claim, which system or role is authoritative — the reference that integrity checks and reconciliation consult to know which value should win.
- Transactional Write Control — Groups related updates so they all commit or none do, keeping partial, duplicate, or inconsistent intermediate states out of trusted records.
- Deterministic Transition Contract: Make the transition from current state to next state fully specified so identical starting conditions, rules, inputs, ordering, and environment produce one reproducible successor.▸ Mechanisms (9)
- canonical_execution_order_runbook
- concurrency_serialization_gate
- dependency_version_lockfile
- deterministic_replay_harness
- differential_transition_comparison
- golden_master_transition_test
- seeded_randomness_protocol
- state_machine_transition_table
- transition_audit_log
- Equivalence-Preserving Rewrite Optimization: Rewrite something into a cheaper, clearer, faster, safer, or more usable form only after proving or testing that the declared behavior stays equivalent.▸ Mechanisms (12)
- Algebraic Simplification Rulebook
- Benchmark Harness
- Compiler Optimization Pass
- Golden-Output Regression Test
- Metamorphic Test Suite
- Normal-Form Reduction
- Peephole Optimization
- Property-Based Equivalence Test
- Query Plan Rewriter
- Rewrite System with Confluence Tests
- Rewrite Trace Log
- Semantics-Preserving Refactoring
- Invariant Guarding: Identify conditions that must always remain true and guard operations so those invariants are preserved.▸ Mechanisms (8)
- Contract Check
- Database Constraint
- Integrity Monitor
- Invariant Test Suite
- Policy Guardrail
- Rollback Transaction
- Safety Interlock
- Two-Person Rule
- Invariant-Mode Decomposition Design: Find the directions a transformation preserves as directions, measure how strongly it stretches or damps each one, and use those modes to prioritize explanation, control, compression, and monitoring.▸ Mechanisms (12)
- Eigendecomposition Workflow
- Modal Sensitivity Sweep
- Modal Stability Analysis
- Mode-Shape Testing
- Network Spectral Centrality Analysis
- Power-Iteration Probe
- Principal Component Analysis
- Reduced-Order Model
- Residual Reconstruction Test
- Singular Value Decomposition
- Spectral Decomposition Report
- Spectral Gap Monitor
- Representation-Invariant Reasoning: Identify equivalent descriptions, isolate what remains invariant, choose convenient representatives without mistaking them for reality, and verify that conclusions survive legitimate changes of gauge, coordinates, basis, encoding, or frame.▸ Mechanisms (10)
- Canonical Representative Selection
- Coordinate or Basis Transformation
- Cross-Representation Regression Suite
- Gauge-Fixing Condition
- Invariance Property Test
- Invariant Observable Report
- Patchwise Atlas and Transition Map
- Quotient-Space Construction
- Redundant-Variable Elimination
- Reference-Frame Sweep
- Scale-Invariance Testing: Test whether behavior, ratios, or rules remain valid when the system is rescaled.▸ Mechanisms (8)
- Breakpoint Review Table
- Dimensional Scaling Test
- Log-Log Scaling Check
- Normalized Metric Check
- Per-Unit Invariance Check
- Pilot-to-Scale Validation
- Simulation Rescaling Sweep
- Stratified Scale Sampling
- Sliding-Kernel Local Transformation Design: Use one explicit local kernel across an input field so each output is a comparable weighted neighborhood mixture, then govern scale, boundaries, gain, and artifacts.▸ Mechanisms (10)
- Boundary Padding Protocol
- Convolutional Feature Extractor
- Edge-Detection Kernel
- Finite Impulse Response Filter
- Gaussian Smoothing Kernel
- Kernel Response Sensitivity Sweep
- Moving-Average or Boxcar Filter
- Multiscale Kernel Bank
- Stencil Computation Template
- Synthetic Kernel Test Pattern
- Structure-Preserving Embedding Design: Embed a source system into a richer host so the source remains distinguishable, structurally faithful, and usable inside the host rather than merely translated or compressed.▸ Mechanisms (12)
- Adapter or Wrapper Layer — Wraps a source in a thin translating layer so it presents the host's expected interface — letting it operate inside the host, live, without rewriting either side.
- Coordinate Chart Mapping — Covers a source too curved or complex for one global frame with a family of local coordinate charts, each faithful on its own patch and stitched to its neighbors where they overlap.
- Embedding Collision Probe — Hunts for distinct source items that landed on the same or near-identical host location, exposing the identity collapses that make an embedding quietly merge things that should stay separate.
- Graph Embedding — Maps the nodes of a relational graph to points in a host space so that connected or structurally similar nodes land near each other, turning topology into geometry.
- Invariant Preservation Test Suite — A reusable battery of tests that checks whether the relations and operations declared worth preserving actually survive the embedding — turning a preservation contract into pass/fail evidence.
- Nearest-Neighbor Audit — Samples an embedding's neighborhoods and checks, with human judgement, whether each item's nearest host neighbors are genuinely related in the source — catching false neighbors and missing ones.
- Ontology Alignment Map — Links concepts in one vocabulary to their counterparts in another through anchored correspondences — equivalent, broader, narrower — each carrying a human-readable rationale.
- Round-Trip Validation Test — Sends a curated set of source items through the embedding and back, then checks whether what returns equals what left — and where it differs, names the structure that was lost.
- Schema Mapping Table — A field-by-field table that lays every source element beside its host target and transform, and turns each element with no faithful home into a visible row.
- Serialization with Reconstruction Schema — Encodes the source into a transportable form bundled with the schema needed to rebuild it faithfully — and versions that schema so yesterday's encodings still reconstruct tomorrow.
- Structure-Preserving Map Specification — Writes the embedding down as an explicit injection rule plus a preservation contract, so what must still be true after mapping is fixed before anything is moved.
- Vector Embedding Model — Places source items as points in a continuous host space and picks the metric that makes geometric distance stand in for a chosen relation, so structure becomes something the host can compute.
- Symmetry-Commuting Transformation Design: Design a mapping so meaningful transformations of the input are mirrored by corresponding transformations of the output rather than erased, amplified, or changed inconsistently.▸ Mechanisms (8)
- Commutative Diagram Review
- Coordinate-Frame Consistency Check
- Data-Augmentation Equivariance Probe
- Equivariance Tolerance Matrix
- Permutation Equivariance Audit
- Schema and Label Relabeling Harness
- Symmetry Exception Register
- Transformation-Pair Test Suite
- Topology-Preserving Transformation: Change a system's shape, scale, organization, or representation while preserving the connectivity relationships that matter.▸ Mechanisms (8)
- Compatibility Bridge or Shim — A deliberately temporary layer that makes old local callers keep working against a newly promoted host capability during a migration — carrying them across so the duplicate facility can be retired, then expiring itself.
- Graph Difference Review
- Handoff Continuity Walkthrough
- Interface Contract Test — Turns the promises a delegated host interface makes — permissions, isolation, error and capacity behavior, and what happens when the host is unavailable — into automated pass/fail checks, so delegation is verified rather than assumed.
- Organizational Path Preservation Review
- Reachability Test — Checks that every required endpoint pair can actually reach each other over a usable path, turning 'looks connected' into a pass/fail verdict against a stated spanning criterion.
- Relational Data Migration Check
- Topology Regression Suite
Also a related prime in 94 archetypes
- Abstraction–Substrate Traceability Guardrail: Keep abstractions useful without letting them harden into substitute reality by requiring each action-guiding abstraction to carry its representational claim, validity boundary, substrate trace, and re-grounding trigger.
- Additive Measure-Space Design: Make size assignable and composable by declaring what subsets are measurable and how disjoint sizes add.
- Aggregation Function Design and Weighting: Turn many inputs into one usable output by explicitly choosing the aggregation rule, weights, normalization, and information-loss guardrails.
- Assumption Stress Testing: Test whether a plan still works when its core assumptions are broken, reversed, strained, delayed, or made uncertain.
- Baseline Covariate Balance Verification: Check whether randomization actually produced comparable groups by comparing pre-treatment covariates before causal conclusions are drawn.
- Bidirectional Conceptual Translation: Translate concepts between frameworks by mapping meaning, use, assumptions, and consequences while making gaps and losses explicit.
- Blocking Design: Group similar experimental units before assignment and compare treatments within blocks so nuisance variation does not obscure the effect being studied.
- Carrier-Independent Work Identity Governance: Keep a work recognizable as the same work across copies, formats, editions, performances, implementations, and migrations by explicitly governing what may vary and what creates a new work.
- Change-Scoped Revalidation: After a change, re-derive only the facts inside a justified affected closure, retain the rest by a defeasible persistence presumption, and test that the boundary did not leak.
- Closure-Preserving Operation: Design operations so their outputs remain inside the intended domain, preserving invariants and preventing escape into invalid states.
Notes¶
This prime is the first element of the symmetry ↔ invariance Noether tight-pair (the "preserved property" side of the pair). See symmetry #8 for the reciprocal first-class abstraction (the "transformation group" side): every invariant belongs to some symmetry, every symmetry has invariants, and Noether's theorem[1] makes the correspondence explicit for continuous symmetries. The tight-pair is fully reciprocated across both primes' What It Is Not sections.
Secondary tight-pair relationship: invariance ↔ duality (#17). An involutive duality generates a Z/2 symmetry whose fixed points are the self-dual elements — and those fixed points are the invariants of the Z/2 action. More broadly, many Noether-style pairings in physics link symmetries and conservation laws in a dual arrangement. This is a weaker structural connection than the symmetry↔invariance pair but is documented in both primes' What It Is Not sections.
Tertiary cross-references: invariance ↔ equivariance (closely related, distinguishable concept documented in What It Is Not; equivariance is not currently a separate v2 prime but may be promoted in a future pass); invariance ↔ conservation (in physics, conservation is the specific invariance-under-time-translation case; the general concept of conservation as a dynamical claim is invariance's specific instantiation on a one-parameter family of transformations).
Origin-domain: v1 had mathematics primary with physics as alternate. V2 preserves mathematics as primary and adds computer_science as a second alternate, since loop-invariant reasoning[4][5] is as load-bearing in programming as Noether's theorem is in physics, and the two lines of development are independently foundational.
References¶
[1] Noether, Emmy. "Invariante Variationsprobleme." Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen, Mathematisch-Physikalische Klasse (1918): 235–257. Established that every continuous symmetry of a Lagrangian corresponds to a conserved quantity. English translation: Tavel, M. A. "Invariant Variation Problems." Transport Theory and Statistical Physics 1, no. 3 (1971): 186–207. Definitive historical-mathematical treatment: Kosmann-Schwarzbach, The Noether Theorems (Springer, 2011). (Cross-linked to FACT-175 in symmetry.md and duality.md). ↩
[2] Euler, Leonhard. Elementa doctrinae solidorum. Novi Commentarii Academiae Scientiarum Petropolitanae, vol. 4, 1752 (the polyhedron formula \(V - E + F = 2\)). The Königsberg-bridge problem appears in Euler's 1736 Solutio problematis ad geometriam situs pertinentis, Commentarii Academiae Scientiarum Petropolitanae, vol. 8. ↩
[3] Poincaré, Henri. "Analysis Situs." Journal de l'École Polytechnique, 2nd ser., 1 (1895): 1–121. Launched algebraic topology by defining homology and homotopy invariants. Extended in five "Compléments à l'Analysis Situs" (1899–1904); the Poincaré conjecture appears in the fifth complement (1904). Historical survey: Dieudonné, A History of Algebraic and Differential Topology, 1900–1960 (Birkhäuser, 1989). ↩
[4] Floyd, R. W. (1967). "Assigning meanings to programs." In J. T. Schwartz (Ed.), Mathematical Aspects of Computer Science (Proceedings of Symposia in Applied Mathematics, vol. 19), 19–32. Providence, RI: American Mathematical Society. Introduces the variant-function discipline that converts program-termination claims into well-founded-descent proofs. ↩
[5] Hoare, C. A. R. (1969). An axiomatic basis for computer programming. Communications of the ACM, 12(10), 576–580. Foundational paper introducing Hoare logic with pre/post-condition triples as the formal framework for proving partial correctness and termination invariants of algorithms. ↩
[6] Cohen, T. S., & Welling, M. (2016). Group equivariant convolutional networks. In Proceedings of the 33rd International Conference on Machine Learning (ICML), PMLR 48, 2990–2999. Derives group-equivariant convolutional networks directly from the commuting (equivariance) condition, generalizing translation-equivariant CNNs to rotations and reflections. ↩
[7] Bronstein, Michael M., Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. "Geometric Deep Learning: Going Beyond Euclidean Data." IEEE Signal Processing Magazine 34, no. 4 (2017): 18–42. Consolidated 2021 synthesis: Bronstein, Bruna, Cohen, and Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges, arXiv:2104.13478. ↩
[8] Klein, Felix. "Vergleichende Betrachtungen über neuere geometrische Forschungen." Erlangen inaugural address, 1872 (Erlangen: Deichert, 1872). English translation: "A Comparative Review of Recent Researches in Geometry." Bulletin of the New York Mathematical Society 2 (1893): 215–249. Reformulated geometry as the study of properties invariant under a specified transformation group (Erlangen program). Historical reception: Hawkins, Emergence of the Theory of Lie Groups (Springer, 2000), ch. 3. (Cross-linked to FACT-174 in symmetry.md). ↩
[9] Weyl, Hermann. "Elektron und Gravitation. I." Zeitschrift für Physik 56 (1929): 330–352. Modern formulation of local gauge invariance (the term "Eichinvarianz" itself traces to Weyl, "Gravitation und Elektrizität," Sitzungsberichte der Preussischen Akademie der Wissenschaften (1918): 465–480). Historical review: Jackson and Okun, "Historical Roots of Gauge Invariance." Reviews of Modern Physics 73, no. 3 (2001): 663–680. ↩
[10] Yang-Mills. Conservation of Isotopic Spin and Isotopic Gauge Invariance, 1954. Seminal paper extending Weyl's local U(1) gauge principle to non-Abelian gauge groups (SU(2) in their original application); established the modern framework of Yang-Mills theory as the foundation for weak and strong interactions. ↩
[11] LeCun, Y., B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. "Backpropagation Applied to Handwritten Zip Code Recognition." Neural Computation 1, no. 4 (1989): 541–551. Consolidated treatment: LeCun, Bottou, Bengio, and Haffner. "Gradient-Based Learning Applied to Document Recognition." Proceedings of the IEEE 86, no. 11 (1998): 2278–2324. ↩
[12] Arrow, K. J. (1951). Social Choice and Individual Values. Wiley. Foundational social-choice text containing the impossibility theorem: no aggregation rule over heterogeneous individual preferences can simultaneously satisfy unrestricted domain, Pareto efficiency, independence of irrelevant alternatives, and non-dictatorship—so any commensuration metric inevitably privileges some values over others. ↩
[13] (definition not found) ↩