Anyon condensation and a generic tensor-network construction for symmetry-protected topological phases | Synapse