src/HOL/Tools/Lifting/lifting_setup.ML
changeset 59936 b8ffc3dc9e24
parent 59630 c9aa1c90796f
child 60225 eb4e322734bf
equal deleted inserted replaced
59935:343905de27b1 59936:b8ffc3dc9e24
   785       | (Const (@{const_name type_definition}, _) $ _ $ _ $ _) => setup_typedef ()
   785       | (Const (@{const_name type_definition}, _) $ _ $ _ $ _) => setup_typedef ()
   786       | _ => error "Unsupported type of a theorem. Only Quotient or type_definition are supported."
   786       | _ => error "Unsupported type of a theorem. Only Quotient or type_definition are supported."
   787   end
   787   end
   788 
   788 
   789 val _ = 
   789 val _ = 
   790   Outer_Syntax.local_theory @{command_spec "setup_lifting"}
   790   Outer_Syntax.local_theory @{command_keyword setup_lifting}
   791     "setup lifting infrastructure" 
   791     "setup lifting infrastructure" 
   792       (Parse.xthm -- Scan.option Parse.xthm 
   792       (Parse.xthm -- Scan.option Parse.xthm 
   793       -- Scan.option (@{keyword "parametric"} |-- Parse.!!! Parse.xthm) >> 
   793       -- Scan.option (@{keyword "parametric"} |-- Parse.!!! Parse.xthm) >> 
   794         (fn ((xthm, opt_reflp_xthm), opt_par_xthm) => 
   794         (fn ((xthm, opt_reflp_xthm), opt_par_xthm) => 
   795           setup_lifting_cmd xthm opt_reflp_xthm opt_par_xthm))
   795           setup_lifting_cmd xthm opt_reflp_xthm opt_par_xthm))
   996 fun lifting_forget_cmd bundle_name lthy = 
   996 fun lifting_forget_cmd bundle_name lthy = 
   997   lifting_forget (pointer_of_bundle_name bundle_name lthy) lthy
   997   lifting_forget (pointer_of_bundle_name bundle_name lthy) lthy
   998 
   998 
   999 
   999 
  1000 val _ =
  1000 val _ =
  1001   Outer_Syntax.local_theory @{command_spec "lifting_forget"} 
  1001   Outer_Syntax.local_theory @{command_keyword lifting_forget} 
  1002     "unsetup Lifting and Transfer for the given lifting bundle"
  1002     "unsetup Lifting and Transfer for the given lifting bundle"
  1003     (Parse.position Parse.xname >> (lifting_forget_cmd))
  1003     (Parse.position Parse.xname >> (lifting_forget_cmd))
  1004 
  1004 
  1005 (* lifting_update *)
  1005 (* lifting_update *)
  1006 
  1006 
  1025 
  1025 
  1026 fun lifting_update_cmd bundle_name lthy = 
  1026 fun lifting_update_cmd bundle_name lthy = 
  1027   update_transfer_rules (pointer_of_bundle_name bundle_name lthy) lthy
  1027   update_transfer_rules (pointer_of_bundle_name bundle_name lthy) lthy
  1028 
  1028 
  1029 val _ =
  1029 val _ =
  1030   Outer_Syntax.local_theory @{command_spec "lifting_update"}
  1030   Outer_Syntax.local_theory @{command_keyword lifting_update}
  1031     "add newly introduced transfer rules to a bundle storing the state of Lifting and Transfer"
  1031     "add newly introduced transfer rules to a bundle storing the state of Lifting and Transfer"
  1032     (Parse.position Parse.xname >> lifting_update_cmd)
  1032     (Parse.position Parse.xname >> lifting_update_cmd)
  1033 
  1033 
  1034 end
  1034 end