it is possible, but if you downgrade to 3.1.2, you just downgrade the firmware but not the baseband that came with the 3.1.3. if that is 5.12.01 you can try the fuzzyband app in cydia.
But not really know if it works or not...depends on the bootloader version you iphone got