Text this: A type reduction theory for systems with replicated components