src/HOL/Tools/int_factor_simprocs.ML
changeset 30685 dd5fe091ff04
parent 30649 57753e0ec1d4
child 30931 86ca651da03e
equal deleted inserted replaced
30684:c98a64746c69 30685:dd5fe091ff04
   230   let val T = fastype_of t;
   230   let val T = fastype_of t;
   231       val zero = Const(@{const_name HOL.zero}, T);
   231       val zero = Const(@{const_name HOL.zero}, T);
   232       val less = Const(@{const_name HOL.less}, [T,T] ---> HOLogic.boolT);
   232       val less = Const(@{const_name HOL.less}, [T,T] ---> HOLogic.boolT);
   233       val pos = less $ zero $ t and neg = less $ t $ zero
   233       val pos = less $ zero $ t and neg = less $ t $ zero
   234       fun prove p =
   234       fun prove p =
   235         Option.map Eq_True_elim (LinArith.lin_arith_simproc ss p)
   235         Option.map Eq_True_elim (Lin_Arith.lin_arith_simproc ss p)
   236         handle THM _ => NONE
   236         handle THM _ => NONE
   237     in case prove pos of
   237     in case prove pos of
   238          SOME th => SOME(th RS pos_th)
   238          SOME th => SOME(th RS pos_th)
   239        | NONE => (case prove neg of
   239        | NONE => (case prove neg of
   240                     SOME th => SOME(th RS neg_th)
   240                     SOME th => SOME(th RS neg_th)