simplified flattening lemma, via some new lemmas elsewhere
Merge pull request #97 from mikeshulman/flattening

simplified flattening lemma, via some new lemmas elsewhere