# HG changeset patch # User Christian Urban # Date 1307519041 -3600 # Node ID 3503432262dc5f4aa905447880cfef4409fdc851 # Parent 394664816e24e8b6e4f5dd1341b44ef6c55ad4d9 using the option "default" the function package allows one to give an explicit default value diff -r 394664816e24 -r 3503432262dc Nominal/Ex/TypeSchemes.thy --- a/Nominal/Ex/TypeSchemes.thy Tue Jun 07 20:58:00 2011 +0100 +++ b/Nominal/Ex/TypeSchemes.thy Wed Jun 08 08:44:01 2011 +0100 @@ -71,13 +71,28 @@ using assms by blast -nominal_primrec +definition "MYUNDEFINED \ undefined" + +nominal_primrec (default "\x. MYUNDEFINED") subst :: "(name \ ty) list \ ty \ ty" and substs :: "(name \ ty) list \ tys \ tys" where "subst \ (Var X) = lookup \ X" | "subst \ (Fun T1 T2) = Fun (subst \ T1) (subst \ T2)" | "fset (map_fset atom xs) \* \ \ substs \ (All xs T) = All xs (subst \ T)" +thm subst_substs_graph_def +thm subst_substs_sumC_def +oops + +nominal_primrec + subst :: "(name \ ty) list \ ty \ ty" +and substs :: "(name \ ty) list \ tys \ tys" +where + "subst \ (Var X) = lookup \ X" +| "subst \ (Fun T1 T2) = Fun (subst \ T1) (subst \ T2)" +| "fset (map_fset atom xs) \* \ \ substs \ (All xs T) = All xs (subst \ T)" +thm subst_substs_graph_def +thm subst_substs_sumC_def apply(subgoal_tac "\p x r. subst_substs_graph x r \ subst_substs_graph (p \ x) (p \ r)") apply(simp add: eqvt_def) apply(rule allI)