src/HOL/Tools/lin_arith.ML
changeset 32091 30e2ffbba718
parent 31510 e0f2bb4b0021
child 32369 04af689ce721
equal deleted inserted replaced
32090:39acf19e9f3a 32091:30e2ffbba718
   284 (* to the proof state                                                        *)
   284 (* to the proof state                                                        *)
   285 (*---------------------------------------------------------------------------*)
   285 (*---------------------------------------------------------------------------*)
   286 
   286 
   287 (* checks if splitting with 'thm' is implemented                             *)
   287 (* checks if splitting with 'thm' is implemented                             *)
   288 
   288 
   289 fun is_split_thm (thm : thm) : bool =
   289 fun is_split_thm thm =
   290   case concl_of thm of _ $ (_ $ (_ $ lhs) $ _) => (
   290   case concl_of thm of _ $ (_ $ (_ $ lhs) $ _) => (
   291     (* Trueprop $ ((op =) $ (?P $ lhs) $ rhs) *)
   291     (* Trueprop $ ((op =) $ (?P $ lhs) $ rhs) *)
   292     case head_of lhs of
   292     case head_of lhs of
   293       Const (a, _) => member (op =) [@{const_name Orderings.max},
   293       Const (a, _) => member (op =) [@{const_name Orderings.max},
   294                                     @{const_name Orderings.min},
   294                                     @{const_name Orderings.min},
   296                                     @{const_name HOL.minus},
   296                                     @{const_name HOL.minus},
   297                                     "Int.nat",
   297                                     "Int.nat",
   298                                     "Divides.div_class.mod",
   298                                     "Divides.div_class.mod",
   299                                     "Divides.div_class.div"] a
   299                                     "Divides.div_class.div"] a
   300     | _            => (warning ("Lin. Arith.: wrong format for split rule " ^
   300     | _            => (warning ("Lin. Arith.: wrong format for split rule " ^
   301                                  Display.string_of_thm thm);
   301                                  Display.string_of_thm_without_context thm);
   302                        false))
   302                        false))
   303   | _ => (warning ("Lin. Arith.: wrong format for split rule " ^
   303   | _ => (warning ("Lin. Arith.: wrong format for split rule " ^
   304                    Display.string_of_thm thm);
   304                    Display.string_of_thm_without_context thm);
   305           false);
   305           false);
   306 
   306 
   307 (* substitute new for occurrences of old in a term, incrementing bound       *)
   307 (* substitute new for occurrences of old in a term, incrementing bound       *)
   308 (* variables as needed when substituting inside an abstraction               *)
   308 (* variables as needed when substituting inside an abstraction               *)
   309 
   309