In the mathematical field of algebraic geometry, purity is a theme covering a number of results and conjectures, which collectively address the question of proving that "when something happens, it happens in a particular codimension". 
Purity of the branch locus.
For example, ramification is a phenomenon of codimension 1 (in the geometry of complex manifolds, reflecting as for Riemann surfaces that ramify at single points that it happens in real codimension two). A classical result, Zariski–Nagata purity of Masayoshi Nagata and Oscar Zariski, called also purity of the branch locus, proves that on a non-singular algebraic variety a "branch locus", namely the set of points at which a morphism ramifies, must be made up purely of codimension 1 subvarieties (a Weil divisor). There have been numerous extensions of this result into theorems of commutative algebra and scheme theory, establishing purity of the branch locus in the sense of description of the restrictions on the possible "open subsets of failure" to be an étale morphism. 
Cohomological purity.
There is also a homological notion of purity that is related, namely a collection of results stating that cohomology groups from a particular theory are trivial with the possible exception of one index "i". Such results were established in étale cohomology by Michael Artin (included in SGA 4), and were foundational in setting up the theory to contain expected analogues of results from singular cohomology. A general statement of Alexander Grothendieck known as the absolute cohomological purity conjecture was proved by Ofer Gabber. It concerns a closed immersion of schemes (regular, noetherian) that is purely of codimension "d", and the relative local cohomology in the étale theory. With coefficients mod "n" where "n" is invertible, the cohomology should occur only with index 2"d" (and take on a predicted value).
Notes.
 ;templatestyles src="Reflist/styles.css" / ;