equal
deleted
inserted
replaced
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 |