This is a superior mirage, so named because the second image is above the miraged object.
The mirage is the result of dense cold air near to the lake surface topped by less dense warmer air.
Light rays passing between the colder air and the upper warm air are refracted to follow curved paths. The rays tend to be concave towards the sea level line i.e. initially u[upward rays tend to curve downwards again. The ray curvature is greatest where the rays cross the strongest vertical temperature gradient.
At left the ray 'a' from the ship's mast passes through only cold air and is hardly deviated - the lower image of the ship appears it would be with no mirage taking place.
Ray 'b' from the same point on the ship grazes the boundary between the cold and warm air layers and is refracted downwards - refracted rays always curve towards the colder and denser air. To the eye ray 'b' appears to be coming from a point above the real position of the ship.
Now look at one of the rays from the ship's hull - ray 'c'. Its increased angle to the sea causes it to penetrate deeper into the cold/warm boundary and it is refracted more strongly. To the eye it appears to come from a point higher than that of ray 'b'. The miraged image of the ship is inverted and above the ship itself.
When the temperature inversion layer is deep there is even another image above the inverted one, this time the right way up. The Lake Superior mirage, above, had a relatively shallow inversion layer and only part of the ship is miraged upside down above the 'real' ship. The boundary of the inversion layer can be seen elsewhere above the horizon as it momentarily mirages the sea itself.