A Theory of Formal Synthesis via Inductive Learning