Yes, if you currently own and have registered the PS3 version.

Just so you know, it's a trade-in. By switching to the PS4 version, you'll no longer be able to play the PS3 version unless you buy and register another copy of the PS3 version.