Learning to Reason with Neural Networks: Generalization, Unseen Data and Boolean Measures