simplify-state.py

This is required by topics_rmallet.R's read_simplified_state function().
My code, from the github.com/agoldst/tmhls/ repository .