Boolean algebras for lambda calculus