src/Provers/Arith/fast_lin_arith.ML
changeset 16735 008d089822e3
parent 16458 4c6fd0c01d28
child 17029 7839e85fc246
equal deleted inserted replaced
16734:2c76db916c51 16735:008d089822e3
    28   val notI:             thm (* (P ==> False) ==> ~ P *)
    28   val notI:             thm (* (P ==> False) ==> ~ P *)
    29   val not_lessD:        thm (* ~(m < n) ==> n <= m *)
    29   val not_lessD:        thm (* ~(m < n) ==> n <= m *)
    30   val not_leD:          thm (* ~(m <= n) ==> n < m *)
    30   val not_leD:          thm (* ~(m <= n) ==> n < m *)
    31   val sym:		thm (* x = y ==> y = x *)
    31   val sym:		thm (* x = y ==> y = x *)
    32   val mk_Eq: thm -> thm
    32   val mk_Eq: thm -> thm
       
    33   val atomize: thm -> thm list
    33   val mk_Trueprop: term -> term
    34   val mk_Trueprop: term -> term
    34   val neg_prop: term -> term
    35   val neg_prop: term -> term
    35   val is_False: thm -> bool
    36   val is_False: thm -> bool
    36   val is_nat: typ list * term -> bool
    37   val is_nat: typ list * term -> bool
    37   val mk_nat_thm: theory -> term -> thm
    38   val mk_nat_thm: theory -> term -> thm
   729    2. lin_arith_prover is applied by the simplifier which
   730    2. lin_arith_prover is applied by the simplifier which
   730       dives into terms and will thus try the non-negated concl anyway.
   731       dives into terms and will thus try the non-negated concl anyway.
   731 *)
   732 *)
   732 fun lin_arith_prover sg ss concl =
   733 fun lin_arith_prover sg ss concl =
   733 let
   734 let
   734     val thms = prems_of_ss ss;
   735     val thms = List.concat(map LA_Logic.atomize (prems_of_ss ss));
   735     val Hs = map (#prop o rep_thm) thms
   736     val Hs = map (#prop o rep_thm) thms
   736     val Tconcl = LA_Logic.mk_Trueprop concl
   737     val Tconcl = LA_Logic.mk_Trueprop concl
   737 in case prove sg ([],[]) false Hs Tconcl of (* concl provable? *)
   738 in case prove sg ([],[]) false Hs Tconcl of (* concl provable? *)
   738      SOME js => prover sg thms Tconcl js true
   739      SOME js => prover sg thms Tconcl js true
   739    | NONE => let val nTconcl = LA_Logic.neg_prop Tconcl
   740    | NONE => let val nTconcl = LA_Logic.neg_prop Tconcl