how to downgrade from iOS 6.1.3 to iOS 5.1.1 in iPhone 4?
It's not possible. Each time you restore an iOS device's OS, Apple must sign as valid the version you are trying to install, and once a version has been considered as deprecated, which usually is a couple of weeks after a new iOS version has been released, Apple stops providing a valid certification for it.