src/Pure/drule.ML
changeset 56245 84fc7dfa3cd4
parent 52467 24c6ddb48cb8
child 56436 30ccec1e82fb
equal deleted inserted replaced
56244:3298b7a2795a 56245:84fc7dfa3cd4
   124   handle TERM _ => [];
   124   handle TERM _ => [];
   125 
   125 
   126 (* A1==>...An==>B  goes to B, where B is not an implication *)
   126 (* A1==>...An==>B  goes to B, where B is not an implication *)
   127 fun strip_imp_concl ct =
   127 fun strip_imp_concl ct =
   128   (case Thm.term_of ct of
   128   (case Thm.term_of ct of
   129     Const ("==>", _) $ _ $ _ => strip_imp_concl (Thm.dest_arg ct)
   129     Const ("Pure.imp", _) $ _ $ _ => strip_imp_concl (Thm.dest_arg ct)
   130   | _ => ct);
   130   | _ => ct);
   131 
   131 
   132 (*The premises of a theorem, as a cterm list*)
   132 (*The premises of a theorem, as a cterm list*)
   133 val cprems_of = strip_imp_prems o cprop_of;
   133 val cprems_of = strip_imp_prems o cprop_of;
   134 
   134 
   704 
   704 
   705 val norm_hhf_prop = Logic.dest_equals (Thm.prop_of norm_hhf_eq);
   705 val norm_hhf_prop = Logic.dest_equals (Thm.prop_of norm_hhf_eq);
   706 val norm_hhf_eqs = [norm_hhf_eq, sort_constraint_eq];
   706 val norm_hhf_eqs = [norm_hhf_eq, sort_constraint_eq];
   707 
   707 
   708 fun is_norm_hhf (Const ("Pure.sort_constraint", _)) = false
   708 fun is_norm_hhf (Const ("Pure.sort_constraint", _)) = false
   709   | is_norm_hhf (Const ("==>", _) $ _ $ (Const ("all", _) $ _)) = false
   709   | is_norm_hhf (Const ("Pure.imp", _) $ _ $ (Const ("Pure.all", _) $ _)) = false
   710   | is_norm_hhf (Abs _ $ _) = false
   710   | is_norm_hhf (Abs _ $ _) = false
   711   | is_norm_hhf (t $ u) = is_norm_hhf t andalso is_norm_hhf u
   711   | is_norm_hhf (t $ u) = is_norm_hhf t andalso is_norm_hhf u
   712   | is_norm_hhf (Abs (_, _, t)) = is_norm_hhf t
   712   | is_norm_hhf (Abs (_, _, t)) = is_norm_hhf t
   713   | is_norm_hhf _ = true;
   713   | is_norm_hhf _ = true;
   714 
   714