this topic always comes up - I've yet to hear about someone suceeding without damage to the frame.
I managed it without damaging the frame.
What works is caustic soda, elbow grease and a little patience. I tried ammonia and it didn't do a thing. The story appears in this
thread.
If you can twist the seat post, you've got a tiny space into which you can trickle caustic soda, so try that first.
You really need a serious vice anchored very firmly indeed to something utterly immovable. Remove the saddle, turn the bike upside down and clamp the seat post in the vice (you can get a much better grip on it if it's a "microadjust" type, rather than just a cyclinder of alloy). Then haul on the bike frame to try to twist it relative to the now utterly stationary seatpost.
No good? Or it twists a bit but won't come free?
Then get some caustic soda. You can get it in B&Q for cleaning drains. Read the instructions and follow them to the letter - it's nasty stuff. You need to get it to where it can seep between the frame and seatpost, and let it sit there and fizz for a while. If your seatpost is fluted, you can just use an eyedropper or a syringe to put some down the flutes. If not, turn the bike upside down and squirt some through the bottle cage boss holes (if there are any), or else remove the bottom bracket and squirt some down into the seat tube that way.
Wait a couple of hours and try twisting in the vice again.
Repeat the above two steps as often as necessary to achieve satisfaction. You need to keep reapplying fresh solution because as it corrodes away the gunge that's causing the sticking, it's converted to something else that's no longer corrosive. (No doubt a chemist will be along in a minute to give us the equation for the reaction).
Try to keep the soda off the paint. It did my bike's paint no harm, but it probably won't do it any good either.
You'll maybe want a new seat post afterwards. Hopefully not a new bike, though. When you fit the new seatpost, GREASE IT!