Stone duality for generalized Boolean algebras