Nominal/FSet.thy
changeset 2238 8ddf1330f2ed
parent 2234 8035515bbbc6
child 2247 084b2b7df98a
child 2249 1476c26d4310
--- a/Nominal/FSet.thy	Sun Jun 13 20:54:50 2010 +0200
+++ b/Nominal/FSet.thy	Mon Jun 14 04:38:25 2010 +0200
@@ -6,7 +6,7 @@
 *)
 
 theory FSet
-imports Quotient_List
+imports Quotient_List Quotient_Product
 begin
 
 text {* Definiton of List relation and the quotient type *}
@@ -1626,6 +1626,33 @@
 *}
 
 ML {*
+let
+val parser = Args.context -- Scan.lift Args.name_source
+fun typ_pat (ctxt, str) =
+str |> Syntax.parse_typ ctxt
+|> ML_Syntax.print_typ
+|> ML_Syntax.atomic
+in
+ML_Antiquote.inline "typ_pat" (parser >> typ_pat)
+end
+*}
+
+ML {*
+  mk_mapfun @{context} [@{typ_pat "?'a"}] @{typ_pat "(?'a list) * nat"}
+  |> Syntax.check_term @{context}
+  |> fastype_of
+  |> Syntax.string_of_typ @{context}
+  |> warning
+*}
+
+ML {*
+  mk_mapfun @{context} [@{typ_pat "?'a"}] @{typ_pat "(?'a list) * nat"}
+  |> Syntax.check_term @{context}
+  |> Syntax.string_of_term @{context}
+  |> warning
+*}
+
+ML {*
   absrep_fun AbsF @{context} (@{typ "('a list) list \<Rightarrow> 'a list"}, @{typ "('a fset) fset \<Rightarrow> 'a fset"})
   |> Syntax.string_of_term @{context}
   |> writeln