Implement fromRational for the Ivory Expr type.