src/FOLP/hypsubst.ML
changeset 69593 3dda49e08b9d
parent 60754 02924903a6fd
child 74301 ffe269e74bdd
equal deleted inserted replaced
69592:a80d8ec6c998 69593:3dda49e08b9d
    56 
    56 
    57 (*Locates a substitutable variable on the left (resp. right) of an equality
    57 (*Locates a substitutable variable on the left (resp. right) of an equality
    58    assumption.  Returns the number of intervening assumptions, paried with
    58    assumption.  Returns the number of intervening assumptions, paried with
    59    the rule asm_rl (resp. sym). *)
    59    the rule asm_rl (resp. sym). *)
    60 fun eq_var bnd =
    60 fun eq_var bnd =
    61   let fun eq_var_aux k (Const(@{const_name Pure.all},_) $ Abs(_,_,t)) = eq_var_aux k t
    61   let fun eq_var_aux k (Const(\<^const_name>\<open>Pure.all\<close>,_) $ Abs(_,_,t)) = eq_var_aux k t
    62         | eq_var_aux k (Const(@{const_name Pure.imp},_) $ A $ B) =
    62         | eq_var_aux k (Const(\<^const_name>\<open>Pure.imp\<close>,_) $ A $ B) =
    63               ((k, inspect_pair bnd (dest_eq A))
    63               ((k, inspect_pair bnd (dest_eq A))
    64                       (*Exception Match comes from inspect_pair or dest_eq*)
    64                       (*Exception Match comes from inspect_pair or dest_eq*)
    65                handle Match => eq_var_aux (k+1) B)
    65                handle Match => eq_var_aux (k+1) B)
    66         | eq_var_aux k _ = raise EQ_VAR
    66         | eq_var_aux k _ = raise EQ_VAR
    67   in  eq_var_aux 0  end;
    67   in  eq_var_aux 0  end;