Set a hydraulic or “bottle” jack on concrete block, with the block resting on a wide piece of scrap wood such as a 2-by-12. Align the jack, block and scrap wood underneath a beam within about two feet of the rotten post.
Pump the jack slowly so the beam lifts an inch or two to give you clearance to remove the rotted existing post. Cut a 4-by-4 post, or create a doubled 2-by-4 nailed together, to serve as a temporary support so you can work safely. Place the temporary support post under the beam on another scrap of wide lumber.
Loosen the carriage bolts holding the top of rotted post to the beam or joist with a socket wrench. Pull the post out of the ground along with its concrete support if there is one. If necessary, saw the rotted part of the post off with a reciprocating saw to ease removal.
Place a preformed concrete pier on the ground or create a concrete support within a round form deep enough to meet local frost-line requirements set by your permits department. Top the pier with a post base anchored with a center bolt in the pier.
Cut a new post to the same dimensions -- either a 4-by-4 or a 6-by-6 -- as the original post. Place it on the post anchor and nail it into place with galvanized nails. Drill holes for the carriage bolts and tighten the bolts with a socket wrench through the post and the beam or joist at its top.