Automated Reasoning in Higher-Order Logic: Set Comprehension and Extensionality in Church's Type Theory (Studies in Logic, Logic and Cognitive Systems)