# HG changeset patch # User bulwahn # Date 1320084761 -3600 # Node ID e72018e0dd752032b27b1bbd2093c7ec33865a83 # Parent bf8b9ac6000ccf874f7f3f01f3c082a0a2bdb003# Parent 08d84bdd5b3704cedfa92585ea57e5f3a8b7756e merged diff -r 08d84bdd5b37 -r e72018e0dd75 src/HOL/Tools/Quotient/quotient_typ.ML --- a/src/HOL/Tools/Quotient/quotient_typ.ML Mon Oct 31 17:51:01 2011 +0100 +++ b/src/HOL/Tools/Quotient/quotient_typ.ML Mon Oct 31 19:12:41 2011 +0100 @@ -79,10 +79,9 @@ (* proves the quot_type theorem for the new type *) fun typedef_quot_type_thm (rel, abs, rep, equiv_thm, typedef_info) lthy = let - val quot_type_const = Const (@{const_name "quot_type"}, dummyT) - val goal = - HOLogic.mk_Trueprop (quot_type_const $ rel $ abs $ rep) - |> Syntax.check_term lthy + val quot_type_const = Const (@{const_name "quot_type"}, + fastype_of rel --> fastype_of abs --> fastype_of rep --> @{typ bool}) + val goal = HOLogic.mk_Trueprop (quot_type_const $ rel $ abs $ rep) in Goal.prove lthy [] [] goal (K (typedef_quot_type_tac equiv_thm typedef_info)) @@ -109,10 +108,11 @@ val Rep_const = Const (Rep_name, Abs_ty --> Rep_ty) (* more useful abs and rep definitions *) - val abs_const = Const (@{const_name quot_type.abs}, dummyT) - val rep_const = Const (@{const_name quot_type.rep}, dummyT) - val abs_trm = Syntax.check_term lthy1 (abs_const $ rel $ Abs_const) - val rep_trm = Syntax.check_term lthy1 (rep_const $ Rep_const) + val abs_const = Const (@{const_name quot_type.abs}, + (rty --> rty --> @{typ bool}) --> (Rep_ty --> Abs_ty) --> rty --> Abs_ty) + val rep_const = Const (@{const_name quot_type.rep}, (Abs_ty --> Rep_ty) --> Abs_ty --> rty) + val abs_trm = abs_const $ rel $ Abs_const + val rep_trm = rep_const $ Rep_const val abs_name = Binding.prefix_name "abs_" qty_name val rep_name = Binding.prefix_name "rep_" qty_name