Is it possible to do sha512 within a smart contract? Or, not?
Smart Pool has an implementation of sha3_512, https://github.com/SmartPool/contracts/blob/develop/contracts/Ethash.sol
If that could be turned into a stand-alone library, with a bit of documentation, then Ethereum would have on-state sha512.
sha512() I'm assuming you mean SHA-2 with a digest length of 512 bits. If that's the case I think the recommendation would be to use SHA-3.
sha256() is natively supported in Solidity - see the documentation.
sha3() is also natively supported, and aliased to
(For completeness, here's a Solidity implementation of SHA-1.)