let add s t =
match s, t with
| Zero, _ -> t
| _, Zero -> s
| F, _ -> F
| _, F -> F
| T, _ -> T
| _, T -> T
| Pos, (Pos | Nonneg) -> Pos
| Pos, (Neg | Nonpos) -> T
| Neg, (Neg | Nonpos) -> Neg
| Neg, (Pos | Nonneg) -> T
| Nonneg, Nonneg -> Nonneg
| Nonneg, Pos -> Pos
| Nonneg, (Neg | Nonpos) -> T
| Nonpos, Nonpos -> Nonpos
| Nonpos, Neg -> Neg
| Nonpos, (Pos | Nonneg) -> T