TFL/rules.sml
changeset 7262 a05dc63ca29b
parent 6498 1ebbe18fe236
child 8882 9df44a4f1bf7
equal deleted inserted replaced
7261:a141985d660b 7262:a05dc63ca29b
    44        val ctm2_eq = reflexive ctm2
    44        val ctm2_eq = reflexive ctm2
    45        val ctm1_eq = reflexive ctm1
    45        val ctm1_eq = reflexive ctm1
    46    in equal_elim (transitive ctm2_eq ctm1_eq) thm
    46    in equal_elim (transitive ctm2_eq ctm1_eq) thm
    47    end;
    47    end;
    48 
    48 
       
    49 fun rbeta th = 
       
    50   case Dcterm.strip_comb (cconcl th)
       
    51    of (eeq,[l,r]) => transitive th (beta_conversion r)
       
    52     | _ => raise RULES_ERR{func="rbeta", mesg =""};
    49 
    53 
    50 (*----------------------------------------------------------------------------
    54 (*----------------------------------------------------------------------------
    51  *        typ instantiation
    55  *        typ instantiation
    52  *---------------------------------------------------------------------------*)
    56  *---------------------------------------------------------------------------*)
    53 fun INST_TYPE blist thm = 
    57 fun INST_TYPE blist thm = 
   770           end handle _ => None
   774           end handle _ => None
   771     in
   775     in
   772     (if (is_cong thm) then cong_prover else restrict_prover) mss thm
   776     (if (is_cong thm) then cong_prover else restrict_prover) mss thm
   773     end
   777     end
   774     val ctm = cprop_of th
   778     val ctm = cprop_of th
   775     val th1 = Thm.rewrite_cterm(false,true,false) (add_congs(mss_of [cut_lemma'], congs))
   779     val th1 = Thm.rewrite_cterm(false,true,false) 
       
   780                       (add_congs(mss_of [cut_lemma'], congs))
   776                             prover ctm
   781                             prover ctm
   777     val th2 = equal_elim th1 th
   782     val th2 = equal_elim th1 th
   778  in
   783  in
   779  (th2, filter (not o restricted) (!tc_list))
   784  (th2, filter (not o restricted) (!tc_list))
   780  end;
   785  end;