src/HOL/Nominal/nominal_permeq.ML
changeset 38715 6513ea67d95d
parent 37678 0040bafffdef
child 39557 fe5722fce758
equal deleted inserted replaced
38714:31da698fc4e5 38715:6513ea67d95d
   112               in SOME ((at_inst RS (pt_inst RS perm_eq_app)) RS eq_reflection) end
   112               in SOME ((at_inst RS (pt_inst RS perm_eq_app)) RS eq_reflection) end
   113             else NONE)
   113             else NONE)
   114       | _ => NONE
   114       | _ => NONE
   115   end
   115   end
   116 
   116 
   117 val perm_simproc_app = Simplifier.simproc @{theory} "perm_simproc_app"
   117 val perm_simproc_app = Simplifier.simproc_global @{theory} "perm_simproc_app"
   118   ["Nominal.perm pi x"] perm_simproc_app';
   118   ["Nominal.perm pi x"] perm_simproc_app';
   119 
   119 
   120 (* a simproc that deals with permutation instances in front of functions  *)
   120 (* a simproc that deals with permutation instances in front of functions  *)
   121 fun perm_simproc_fun' sg ss redex = 
   121 fun perm_simproc_fun' sg ss redex = 
   122    let 
   122    let 
   132        (Const("Nominal.perm",_) $ pi $ f)  => 
   132        (Const("Nominal.perm",_) $ pi $ f)  => 
   133           (if (applicable_fun f) then SOME (perm_fun_def) else NONE)
   133           (if (applicable_fun f) then SOME (perm_fun_def) else NONE)
   134       | _ => NONE
   134       | _ => NONE
   135    end
   135    end
   136 
   136 
   137 val perm_simproc_fun = Simplifier.simproc @{theory} "perm_simproc_fun"
   137 val perm_simproc_fun = Simplifier.simproc_global @{theory} "perm_simproc_fun"
   138   ["Nominal.perm pi x"] perm_simproc_fun';
   138   ["Nominal.perm pi x"] perm_simproc_fun';
   139 
   139 
   140 (* function for simplyfying permutations          *)
   140 (* function for simplyfying permutations          *)
   141 (* stac contains the simplifiation tactic that is *)
   141 (* stac contains the simplifiation tactic that is *)
   142 (* applied (see (no_asm) options below            *)
   142 (* applied (see (no_asm) options below            *)
   212              cp1_aux)))
   212              cp1_aux)))
   213       else NONE
   213       else NONE
   214     end
   214     end
   215   | _ => NONE);
   215   | _ => NONE);
   216 
   216 
   217 val perm_compose_simproc = Simplifier.simproc @{theory} "perm_compose"
   217 val perm_compose_simproc = Simplifier.simproc_global @{theory} "perm_compose"
   218   ["Nominal.perm pi1 (Nominal.perm pi2 t)"] perm_compose_simproc';
   218   ["Nominal.perm pi1 (Nominal.perm pi2 t)"] perm_compose_simproc';
   219 
   219 
   220 fun perm_compose_tac ss i = 
   220 fun perm_compose_tac ss i = 
   221   ("analysing permutation compositions on the lhs",
   221   ("analysing permutation compositions on the lhs",
   222    fn st => EVERY
   222    fn st => EVERY