fact: Definition Qplus (x y : Q) := match x, y with | Qpos x', Qpos y' => Qpos (Qpositive_plus x' y') | Qpos x', Qneg y' => match Qpositive_le_dec x' y' with | left h => match Qpositive_eq_dec x' y' with | left h => Zero | right h => Qneg (Qpositive_sub y' x') end | right h => Qpos (Qpositive_sub x' y') end | Qneg x', Qneg y' => Qneg (Qpositive_plus x' y') | Qneg x', Qpos y' => match Qpositive_le_dec x' y' with | left h => match Qpositive_eq_dec x' y' with | left h => Zero | right h => Qpos (Qpositive_sub y' x') end | right h => Qneg (Qpositive_sub x' y') end | Qneg x', Zero => Qneg x' | Qpos x', Zero => Qpos x' | Zero, x => x end.