RE: Simplifying casts and beta-reduction