Formalization of Functional Reactive Programming