Add sum types and prove theorems