src/ZF/Tools/induct_tacs.ML
changeset 38522 de7984a7172b
parent 37780 7e91b3f98c46
child 39557 fe5722fce758
equal deleted inserted replaced
38514:bd9c4e8281ec 38522:de7984a7172b
   116 (**** declare non-datatype as datatype ****)
   116 (**** declare non-datatype as datatype ****)
   117 
   117 
   118 fun rep_datatype_i elim induct case_eqns recursor_eqns thy =
   118 fun rep_datatype_i elim induct case_eqns recursor_eqns thy =
   119   let
   119   let
   120     (*analyze the LHS of a case equation to get a constructor*)
   120     (*analyze the LHS of a case equation to get a constructor*)
   121     fun const_of (Const("op =", _) $ (_ $ c) $ _) = c
   121     fun const_of (Const(@{const_name "op ="}, _) $ (_ $ c) $ _) = c
   122       | const_of eqn = error ("Ill-formed case equation: " ^
   122       | const_of eqn = error ("Ill-formed case equation: " ^
   123                               Syntax.string_of_term_global thy eqn);
   123                               Syntax.string_of_term_global thy eqn);
   124 
   124 
   125     val constructors =
   125     val constructors =
   126         map (head_of o const_of o FOLogic.dest_Trueprop o
   126         map (head_of o const_of o FOLogic.dest_Trueprop o