balance (n, (Path R pv Red po):(Path L gv gc (Node uv Red ul ur)):path) =
    balance (Node gv Red (Node pv Black po n) (Node uv Black ul ur), path)
balance (n, (Path R pv Red po):(Path L gv gc (Node uv Red ul ur)):path) =
    balance (Node gv Red (Node pv Black po n) (Node uv Black ul ur), path)
balance (n, (Path R pv Red po):(Path L gv gc (Node uv Red ul ur)):path) =
    balance (Node gv Red (Node pv Black po n) (Node uv Black ul ur), path)