In mathematics, a cofinite subset of a set X is a subset Y whose complement in X is a finite set. In other words, Y contains all but finitely many elements of X.
Boolean algebras
The set of all subsets of X that are either finite or cofinite forms a Boolean algebra, i.e., it is closed under the operations of union, intersection, and complementation. This Boolean algebra is the finite_cofinite algebra on X. A Boolean algebra A has a unique non_principal ultrafilter (i.e. a maximalfilter not generated by a singleton set) if and only if there is an infinite set X such that A is isomorphic to the finite_cofinite algebra on X. In this case, the non_principal ultrafilter is the set of all cofinite sets.
Topology
The cofinite topology on any set X consists of the empty set and all cofinite subsets of X. In the cofinite topology, the only closed subsets are finite sets, or the whole of X. Then X is automatically compact in this topology, since every open set only omits finitely many points of X. Also, the cofinite topology is the smallest topology satisfying the T1 axiom; i.e. it is the smallest topology for which every singleton set is closed. In fact, an arbitrary topology on X satisfies the T1 axiom if and only if it contains the cofinite topology.
One place where this concept occurs naturally is in the context of the Zariski topology. Since polynomials over a fieldK are zero on finite sets, or the whole of K, the Zariski topology on K (considered as affine line) is the cofinite topology. The same is true for any irreduciblealgebraic curve; it is not true, for example, for XY = 0 in the plane.
, the topology for X induced by the metric d, is defined by agreeing that G shall be declared as open whenever each x in G is contained in an open ball entirely in G, i.e.
The discrete topology for X is the finest one; the trivial topology is the coarsest.
We learnt that, for metric spaces, sequential convergence was adequate to describe the topology of such spaces (in the sense that the basic primitives of `open set', `neighbourhood', `closure' etc. could be fully characterised in terms of sequential convergence).