In grammar, a preparatory subject or anticipatory subject [1] [2] is a subject which represents a verb clause later in the sentence. It as a preparatory subject is "commonly used in speech and writing, especially when the subject is longer than the complement and is better placed at the end of the sentence". [3]
is equivalent to
"It" in the first sentence is a preparatory subject, referring to the clause "to play the piano". [4]