src/HOL/Divides.thy
changeset 58847 c44aff8ac894
parent 58834 773b378d9313
child 58889 5b7a9633cfa8
equal deleted inserted replaced
58846:98c03412079b 58847:c44aff8ac894
  2045   val times = @{term "times :: int \<Rightarrow> int \<Rightarrow> int"}
  2045   val times = @{term "times :: int \<Rightarrow> int \<Rightarrow> int"}
  2046   val zero = @{term "0 :: int"}
  2046   val zero = @{term "0 :: int"}
  2047   val less = @{term "op < :: int \<Rightarrow> int \<Rightarrow> bool"}
  2047   val less = @{term "op < :: int \<Rightarrow> int \<Rightarrow> bool"}
  2048   val le = @{term "op \<le> :: int \<Rightarrow> int \<Rightarrow> bool"}
  2048   val le = @{term "op \<le> :: int \<Rightarrow> int \<Rightarrow> bool"}
  2049   val simps = @{thms arith_simps} @ @{thms rel_simps} @ [@{thm numeral_1_eq_1 [symmetric]}]
  2049   val simps = @{thms arith_simps} @ @{thms rel_simps} @ [@{thm numeral_1_eq_1 [symmetric]}]
  2050   fun prove ctxt goal = (writeln "prove"; Goal.prove ctxt [] [] (HOLogic.mk_Trueprop goal)
  2050   fun prove ctxt goal = Goal.prove ctxt [] [] (HOLogic.mk_Trueprop goal)
  2051     (K (ALLGOALS (full_simp_tac (put_simpset HOL_basic_ss ctxt addsimps simps)))));
  2051     (K (ALLGOALS (full_simp_tac (put_simpset HOL_basic_ss ctxt addsimps simps))));
  2052   fun binary_proc proc ctxt ct =
  2052   fun binary_proc proc ctxt ct =
  2053     (case Thm.term_of ct of
  2053     (case Thm.term_of ct of
  2054       _ $ t $ u =>
  2054       _ $ t $ u =>
  2055       (case try (pairself (`(snd o HOLogic.dest_number))) (t, u) of
  2055       (case try (pairself (`(snd o HOLogic.dest_number))) (t, u) of
  2056         SOME args => proc ctxt args
  2056         SOME args => proc ctxt args