src/HOL/Orderings.thy
changeset 59582 0fbed69ff081
parent 59000 6eb0725503fc
child 59936 b8ffc3dc9e24
equal deleted inserted replaced
59580:cbc38731d42f 59582:0fbed69ff081
   606 local
   606 local
   607   fun prp t thm = Thm.prop_of thm = t;  (* FIXME proper aconv!? *)
   607   fun prp t thm = Thm.prop_of thm = t;  (* FIXME proper aconv!? *)
   608 in
   608 in
   609 
   609 
   610 fun antisym_le_simproc ctxt ct =
   610 fun antisym_le_simproc ctxt ct =
   611   (case term_of ct of
   611   (case Thm.term_of ct of
   612     (le as Const (_, T)) $ r $ s =>
   612     (le as Const (_, T)) $ r $ s =>
   613      (let
   613      (let
   614         val prems = Simplifier.prems_of ctxt;
   614         val prems = Simplifier.prems_of ctxt;
   615         val less = Const (@{const_name less}, T);
   615         val less = Const (@{const_name less}, T);
   616         val t = HOLogic.mk_Trueprop(le $ s $ r);
   616         val t = HOLogic.mk_Trueprop(le $ s $ r);
   625          | SOME thm => SOME (mk_meta_eq (thm RS @{thm order_class.antisym_conv})))
   625          | SOME thm => SOME (mk_meta_eq (thm RS @{thm order_class.antisym_conv})))
   626       end handle THM _ => NONE)
   626       end handle THM _ => NONE)
   627   | _ => NONE);
   627   | _ => NONE);
   628 
   628 
   629 fun antisym_less_simproc ctxt ct =
   629 fun antisym_less_simproc ctxt ct =
   630   (case term_of ct of
   630   (case Thm.term_of ct of
   631     NotC $ ((less as Const(_,T)) $ r $ s) =>
   631     NotC $ ((less as Const(_,T)) $ r $ s) =>
   632      (let
   632      (let
   633        val prems = Simplifier.prems_of ctxt;
   633        val prems = Simplifier.prems_of ctxt;
   634        val le = Const (@{const_name less_eq}, T);
   634        val le = Const (@{const_name less_eq}, T);
   635        val t = HOLogic.mk_Trueprop(le $ r $ s);
   635        val t = HOLogic.mk_Trueprop(le $ r $ s);