src/ZF/Tools/induct_tacs.ML
changeset 41310 65631ca437c9
parent 39557 fe5722fce758
child 42361 23f352990944
equal deleted inserted replaced
41309:2e9bf718a7a1 41310:65631ca437c9
   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(@{const_name "op ="}, _) $ (_ $ c) $ _) = c
   121     fun const_of (Const(@{const_name IFOL.eq}, _) $ (_ $ 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