Add basic arithmetic ops and type predicates

@huonw r?