Dual pairs and infinite dimensional Lie algebras