Learning Formal Mathematics From Intrinsic Motivation