Factorization Lemma for Real-Valued Functions