let expt n s = if n = 0 then Pos else if n = 1 then s else if n = (-1) then inv s else if n = 2 then inter Nonneg (mult s s) else T