Although many lenses that have the ability to control one also have the ability to control the other, tilt and shift are two different movements.
The "miniature" look is achieved using tilt movements. The optical axis of the lens is tilted away from a perpendicular angle with respect to the imaging plane.
Correcting perspective in terms of converging lines is accomplished optically using the shift movement. The 90° angle of the lens' optical axis with respect to the imaging plane is maintained. The center of the lens' optical axis is moved away from the center of the film or sensor while remaining perpendicular to the plane occupied by the film/sensor.
Assuming the building is perpendicular to the ground, this has the same effect as pointing the lens' optical axis horizontally and then cropping away all but the top part of the image. Shift lenses have larger image circles than the formats they are designed to be used with, so the field of view can be shifted fairly far to one side or another of the image circle cast by the lens and we don't have to give up resolution by cropping a significant portion of the image.
It is possible to tilt the camera up at the building and correct for the converging lines using software. Of course, any time we start remapping pixels we give up a small but measurable amount of resolution.
Is this as simple as projecting a rectangular image onto a trapezoid? Just squashing the bottom edge of the rectangle? Or is it more involved than this? Is the projected shape more complex that a trapezoid perhaps?
It depends upon the characteristics of the lens you are using and whether or not the camera provides lens distortion correction. If your lens has any significant geometric distortion, you'll need to correct for that before doing your trapezoidal projection to correct for the perspective "distortion" caused by your shooting position. Be careful, though. If your camera already does geometric distortion correction automatically you don't need to apply it again.