In mathematics, a cofinite subset of a set
If the complement is not finite, but is countable, then one says the set is cocountable.
These arise naturally when generalizing structures on finite sets to infinite sets, particularly on infinite products, as in the product topology or direct sum.
This use of the prefix "co" to describe a property possessed by a set's complement is consistent with its use in other terms such as "comeagre set".
that are either finite or cofinite forms a Boolean algebra, which means that it is closed under the operations of union, intersection, and complementation.
In the other direction, a Boolean algebra
has a unique non-principal ultrafilter (that is, a maximal filter not generated by a single element of the algebra) if and only if there exists an infinite set
In this case, the non-principal ultrafilter is the set of all cofinite subsets of
It has precisely the empty set and all cofinite subsets of
As a consequence, in the cofinite topology, the only closed subsets are finite sets, or the whole of
Symbolically, one writes the topology as
Since polynomials in one variable over a field
(considered as affine line) is the cofinite topology.
It is not T0 or T1, since the points of each doublet are topologically indistinguishable.
It is, however, R0 since topologically distinguishable points are separated.
The space is compact as the product of two compact spaces; alternatively, it is compact because each nonempty open set contains all but finitely many points.
For an example of the countable double-pointed cofinite topology, the set
of integers can be given a topology such that every even number
is topologically indistinguishable from the following odd number
The closed sets are the unions of finitely many pairs
The open sets are the complements of the closed sets; namely, each open set consists of all but a finite number of pairs
The analog without requiring that cofinitely many factors are the whole space is the box topology.
The elements of the direct sum of modules
The analog without requiring that cofinitely many summands are zero is the direct product.