A theory of generalized Donaldson–Thomas invariants | Synapse