src/HOL/Numeral_Simprocs.thy
author wenzelm
Sun, 20 Nov 2011 21:07:10 +0100
changeset 45607 16b4f5774621
parent 45463 9a588a835c1e
child 47108 2a1953f0d20d
permissions -rw-r--r--
eliminated obsolete "standard";
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33366
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     1
(* Author: Various *)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     2
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     3
header {* Combination and Cancellation Simprocs for Numeral Expressions *}
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     4
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     5
theory Numeral_Simprocs
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     6
imports Divides
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     7
uses
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     8
  "~~/src/Provers/Arith/assoc_fold.ML"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
     9
  "~~/src/Provers/Arith/cancel_numerals.ML"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    10
  "~~/src/Provers/Arith/combine_numerals.ML"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    11
  "~~/src/Provers/Arith/cancel_numeral_factor.ML"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    12
  "~~/src/Provers/Arith/extract_common_term.ML"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    13
  ("Tools/numeral_simprocs.ML")
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    14
  ("Tools/nat_numeral_simprocs.ML")
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    15
begin
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    16
45607
16b4f5774621 eliminated obsolete "standard";
wenzelm
parents: 45463
diff changeset
    17
declare split_div [of _ _ "number_of k", arith_split] for k
16b4f5774621 eliminated obsolete "standard";
wenzelm
parents: 45463
diff changeset
    18
declare split_mod [of _ _ "number_of k", arith_split] for k
33366
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    19
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    20
text {* For @{text combine_numerals} *}
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    21
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    22
lemma left_add_mult_distrib: "i*u + (j*u + k) = (i+j)*u + (k::nat)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    23
by (simp add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    24
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    25
text {* For @{text cancel_numerals} *}
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    26
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    27
lemma nat_diff_add_eq1:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    28
     "j <= (i::nat) ==> ((i*u + m) - (j*u + n)) = (((i-j)*u + m) - n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    29
by (simp split add: nat_diff_split add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    30
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    31
lemma nat_diff_add_eq2:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    32
     "i <= (j::nat) ==> ((i*u + m) - (j*u + n)) = (m - ((j-i)*u + n))"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    33
by (simp split add: nat_diff_split add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    34
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    35
lemma nat_eq_add_iff1:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    36
     "j <= (i::nat) ==> (i*u + m = j*u + n) = ((i-j)*u + m = n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    37
by (auto split add: nat_diff_split simp add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    38
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    39
lemma nat_eq_add_iff2:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    40
     "i <= (j::nat) ==> (i*u + m = j*u + n) = (m = (j-i)*u + n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    41
by (auto split add: nat_diff_split simp add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    42
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    43
lemma nat_less_add_iff1:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    44
     "j <= (i::nat) ==> (i*u + m < j*u + n) = ((i-j)*u + m < n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    45
by (auto split add: nat_diff_split simp add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    46
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    47
lemma nat_less_add_iff2:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    48
     "i <= (j::nat) ==> (i*u + m < j*u + n) = (m < (j-i)*u + n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    49
by (auto split add: nat_diff_split simp add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    50
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    51
lemma nat_le_add_iff1:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    52
     "j <= (i::nat) ==> (i*u + m <= j*u + n) = ((i-j)*u + m <= n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    53
by (auto split add: nat_diff_split simp add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    54
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    55
lemma nat_le_add_iff2:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    56
     "i <= (j::nat) ==> (i*u + m <= j*u + n) = (m <= (j-i)*u + n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    57
by (auto split add: nat_diff_split simp add: add_mult_distrib)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    58
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    59
text {* For @{text cancel_numeral_factors} *}
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    60
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    61
lemma nat_mult_le_cancel1: "(0::nat) < k ==> (k*m <= k*n) = (m<=n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    62
by auto
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    63
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    64
lemma nat_mult_less_cancel1: "(0::nat) < k ==> (k*m < k*n) = (m<n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    65
by auto
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    66
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    67
lemma nat_mult_eq_cancel1: "(0::nat) < k ==> (k*m = k*n) = (m=n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    68
by auto
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    69
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    70
lemma nat_mult_div_cancel1: "(0::nat) < k ==> (k*m) div (k*n) = (m div n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    71
by auto
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    72
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    73
lemma nat_mult_dvd_cancel_disj[simp]:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    74
  "(k*m) dvd (k*n) = (k=0 | m dvd (n::nat))"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    75
by(auto simp: dvd_eq_mod_eq_0 mod_mult_distrib2[symmetric])
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    76
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    77
lemma nat_mult_dvd_cancel1: "0 < k \<Longrightarrow> (k*m) dvd (k*n::nat) = (m dvd n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    78
by(auto)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    79
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    80
text {* For @{text cancel_factor} *}
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    81
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    82
lemma nat_mult_le_cancel_disj: "(k*m <= k*n) = ((0::nat) < k --> m<=n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    83
by auto
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    84
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    85
lemma nat_mult_less_cancel_disj: "(k*m < k*n) = ((0::nat) < k & m<n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    86
by auto
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    87
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    88
lemma nat_mult_eq_cancel_disj: "(k*m = k*n) = (k = (0::nat) | m=n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    89
by auto
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    90
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    91
lemma nat_mult_div_cancel_disj[simp]:
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    92
     "(k*m) div (k*n) = (if k = (0::nat) then 0 else m div n)"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    93
by (simp add: nat_mult_div_cancel1)
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    94
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    95
use "Tools/numeral_simprocs.ML"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
    96
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
    97
simproc_setup semiring_assoc_fold
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
    98
  ("(a::'a::comm_semiring_1_cancel) * b") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
    99
  {* fn phi => Numeral_Simprocs.assoc_fold *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   100
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   101
simproc_setup int_combine_numerals
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   102
  ("(i::'a::number_ring) + j" | "(i::'a::number_ring) - j") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   103
  {* fn phi => Numeral_Simprocs.combine_numerals *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   104
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   105
simproc_setup field_combine_numerals
45435
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   106
  ("(i::'a::{field_inverse_zero,ring_char_0,number_ring}) + j"
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   107
  |"(i::'a::{field_inverse_zero,ring_char_0,number_ring}) - j") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   108
  {* fn phi => Numeral_Simprocs.field_combine_numerals *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   109
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   110
simproc_setup inteq_cancel_numerals
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   111
  ("(l::'a::number_ring) + m = n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   112
  |"(l::'a::number_ring) = m + n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   113
  |"(l::'a::number_ring) - m = n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   114
  |"(l::'a::number_ring) = m - n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   115
  |"(l::'a::number_ring) * m = n"
45308
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   116
  |"(l::'a::number_ring) = m * n"
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   117
  |"- (l::'a::number_ring) = m"
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   118
  |"(l::'a::number_ring) = - m") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   119
  {* fn phi => Numeral_Simprocs.eq_cancel_numerals *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   120
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   121
simproc_setup intless_cancel_numerals
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   122
  ("(l::'a::{linordered_idom,number_ring}) + m < n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   123
  |"(l::'a::{linordered_idom,number_ring}) < m + n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   124
  |"(l::'a::{linordered_idom,number_ring}) - m < n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   125
  |"(l::'a::{linordered_idom,number_ring}) < m - n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   126
  |"(l::'a::{linordered_idom,number_ring}) * m < n"
45308
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   127
  |"(l::'a::{linordered_idom,number_ring}) < m * n"
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   128
  |"- (l::'a::{linordered_idom,number_ring}) < m"
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   129
  |"(l::'a::{linordered_idom,number_ring}) < - m") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   130
  {* fn phi => Numeral_Simprocs.less_cancel_numerals *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   131
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   132
simproc_setup intle_cancel_numerals
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   133
  ("(l::'a::{linordered_idom,number_ring}) + m \<le> n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   134
  |"(l::'a::{linordered_idom,number_ring}) \<le> m + n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   135
  |"(l::'a::{linordered_idom,number_ring}) - m \<le> n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   136
  |"(l::'a::{linordered_idom,number_ring}) \<le> m - n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   137
  |"(l::'a::{linordered_idom,number_ring}) * m \<le> n"
45308
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   138
  |"(l::'a::{linordered_idom,number_ring}) \<le> m * n"
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   139
  |"- (l::'a::{linordered_idom,number_ring}) \<le> m"
2e84e5f0463b extend cancellation simproc patterns to cover terms like '- (2 * pi) < pi'
huffman
parents: 45296
diff changeset
   140
  |"(l::'a::{linordered_idom,number_ring}) \<le> - m") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   141
  {* fn phi => Numeral_Simprocs.le_cancel_numerals *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   142
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   143
simproc_setup ring_eq_cancel_numeral_factor
45435
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   144
  ("(l::'a::{idom,ring_char_0,number_ring}) * m = n"
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   145
  |"(l::'a::{idom,ring_char_0,number_ring}) = m * n") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   146
  {* fn phi => Numeral_Simprocs.eq_cancel_numeral_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   147
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   148
simproc_setup ring_less_cancel_numeral_factor
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   149
  ("(l::'a::{linordered_idom,number_ring}) * m < n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   150
  |"(l::'a::{linordered_idom,number_ring}) < m * n") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   151
  {* fn phi => Numeral_Simprocs.less_cancel_numeral_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   152
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   153
simproc_setup ring_le_cancel_numeral_factor
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   154
  ("(l::'a::{linordered_idom,number_ring}) * m <= n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   155
  |"(l::'a::{linordered_idom,number_ring}) <= m * n") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   156
  {* fn phi => Numeral_Simprocs.le_cancel_numeral_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   157
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   158
simproc_setup int_div_cancel_numeral_factors
45435
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   159
  ("((l::'a::{semiring_div,ring_char_0,number_ring}) * m) div n"
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   160
  |"(l::'a::{semiring_div,ring_char_0,number_ring}) div (m * n)") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   161
  {* fn phi => Numeral_Simprocs.div_cancel_numeral_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   162
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   163
simproc_setup divide_cancel_numeral_factor
45435
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   164
  ("((l::'a::{field_inverse_zero,ring_char_0,number_ring}) * m) / n"
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   165
  |"(l::'a::{field_inverse_zero,ring_char_0,number_ring}) / (m * n)"
d660c4b9daa6 add ring_char_0 class constraints to several simprocs (internal proofs of #n ~= 0 fail for type
huffman
parents: 45308
diff changeset
   166
  |"((number_of v)::'a::{field_inverse_zero,ring_char_0,number_ring}) / (number_of w)") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   167
  {* fn phi => Numeral_Simprocs.divide_cancel_numeral_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   168
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   169
simproc_setup ring_eq_cancel_factor
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   170
  ("(l::'a::idom) * m = n" | "(l::'a::idom) = m * n") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   171
  {* fn phi => Numeral_Simprocs.eq_cancel_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   172
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   173
simproc_setup linordered_ring_le_cancel_factor
45296
7a97b2bda137 more accurate class constraints on cancellation simproc patterns
huffman
parents: 45284
diff changeset
   174
  ("(l::'a::linordered_idom) * m <= n"
7a97b2bda137 more accurate class constraints on cancellation simproc patterns
huffman
parents: 45284
diff changeset
   175
  |"(l::'a::linordered_idom) <= m * n") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   176
  {* fn phi => Numeral_Simprocs.le_cancel_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   177
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   178
simproc_setup linordered_ring_less_cancel_factor
45296
7a97b2bda137 more accurate class constraints on cancellation simproc patterns
huffman
parents: 45284
diff changeset
   179
  ("(l::'a::linordered_idom) * m < n"
7a97b2bda137 more accurate class constraints on cancellation simproc patterns
huffman
parents: 45284
diff changeset
   180
  |"(l::'a::linordered_idom) < m * n") =
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   181
  {* fn phi => Numeral_Simprocs.less_cancel_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   182
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   183
simproc_setup int_div_cancel_factor
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   184
  ("((l::'a::semiring_div) * m) div n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   185
  |"(l::'a::semiring_div) div (m * n)") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   186
  {* fn phi => Numeral_Simprocs.div_cancel_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   187
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   188
simproc_setup int_mod_cancel_factor
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   189
  ("((l::'a::semiring_div) * m) mod n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   190
  |"(l::'a::semiring_div) mod (m * n)") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   191
  {* fn phi => Numeral_Simprocs.mod_cancel_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   192
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   193
simproc_setup dvd_cancel_factor
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   194
  ("((l::'a::idom) * m) dvd n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   195
  |"(l::'a::idom) dvd (m * n)") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   196
  {* fn phi => Numeral_Simprocs.dvd_cancel_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   197
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   198
simproc_setup divide_cancel_factor
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   199
  ("((l::'a::field_inverse_zero) * m) / n"
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   200
  |"(l::'a::field_inverse_zero) / (m * n)") =
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   201
  {* fn phi => Numeral_Simprocs.divide_cancel_factor *}
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   202
33366
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   203
use "Tools/nat_numeral_simprocs.ML"
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   204
45462
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   205
simproc_setup nat_combine_numerals
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   206
  ("(i::nat) + j" | "Suc (i + j)") =
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   207
  {* fn phi => Nat_Numeral_Simprocs.combine_numerals *}
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   208
45436
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   209
simproc_setup nateq_cancel_numerals
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   210
  ("(l::nat) + m = n" | "(l::nat) = m + n" |
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   211
   "(l::nat) * m = n" | "(l::nat) = m * n" |
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   212
   "Suc m = n" | "m = Suc n") =
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   213
  {* fn phi => Nat_Numeral_Simprocs.eq_cancel_numerals *}
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   214
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   215
simproc_setup natless_cancel_numerals
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   216
  ("(l::nat) + m < n" | "(l::nat) < m + n" |
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   217
   "(l::nat) * m < n" | "(l::nat) < m * n" |
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   218
   "Suc m < n" | "m < Suc n") =
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   219
  {* fn phi => Nat_Numeral_Simprocs.less_cancel_numerals *}
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   220
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   221
simproc_setup natle_cancel_numerals
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   222
  ("(l::nat) + m \<le> n" | "(l::nat) \<le> m + n" |
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   223
   "(l::nat) * m \<le> n" | "(l::nat) \<le> m * n" |
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   224
   "Suc m \<le> n" | "m \<le> Suc n") =
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   225
  {* fn phi => Nat_Numeral_Simprocs.le_cancel_numerals *}
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   226
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   227
simproc_setup natdiff_cancel_numerals
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   228
  ("((l::nat) + m) - n" | "(l::nat) - (m + n)" |
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   229
   "(l::nat) * m - n" | "(l::nat) - m * n" |
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   230
   "Suc m - n" | "m - Suc n") =
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   231
  {* fn phi => Nat_Numeral_Simprocs.diff_cancel_numerals *}
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   232
45463
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   233
simproc_setup nat_eq_cancel_numeral_factor
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   234
  ("(l::nat) * m = n" | "(l::nat) = m * n") =
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   235
  {* fn phi => Nat_Numeral_Simprocs.eq_cancel_numeral_factor *}
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   236
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   237
simproc_setup nat_less_cancel_numeral_factor
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   238
  ("(l::nat) * m < n" | "(l::nat) < m * n") =
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   239
  {* fn phi => Nat_Numeral_Simprocs.less_cancel_numeral_factor *}
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   240
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   241
simproc_setup nat_le_cancel_numeral_factor
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   242
  ("(l::nat) * m <= n" | "(l::nat) <= m * n") =
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   243
  {* fn phi => Nat_Numeral_Simprocs.le_cancel_numeral_factor *}
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   244
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   245
simproc_setup nat_div_cancel_numeral_factor
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   246
  ("((l::nat) * m) div n" | "(l::nat) div (m * n)") =
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   247
  {* fn phi => Nat_Numeral_Simprocs.div_cancel_numeral_factor *}
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   248
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   249
simproc_setup nat_dvd_cancel_numeral_factor
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   250
  ("((l::nat) * m) dvd n" | "(l::nat) dvd (m * n)") =
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   251
  {* fn phi => Nat_Numeral_Simprocs.dvd_cancel_numeral_factor *}
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   252
45462
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   253
simproc_setup nat_eq_cancel_factor
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   254
  ("(l::nat) * m = n" | "(l::nat) = m * n") =
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   255
  {* fn phi => Nat_Numeral_Simprocs.eq_cancel_factor *}
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   256
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   257
simproc_setup nat_less_cancel_factor
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   258
  ("(l::nat) * m < n" | "(l::nat) < m * n") =
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   259
  {* fn phi => Nat_Numeral_Simprocs.less_cancel_factor *}
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   260
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   261
simproc_setup nat_le_cancel_factor
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   262
  ("(l::nat) * m <= n" | "(l::nat) <= m * n") =
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   263
  {* fn phi => Nat_Numeral_Simprocs.le_cancel_factor *}
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   264
45463
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   265
simproc_setup nat_div_cancel_factor
45462
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   266
  ("((l::nat) * m) div n" | "(l::nat) div (m * n)") =
45463
9a588a835c1e use simproc_setup for the remaining nat_numeral simprocs
huffman
parents: 45462
diff changeset
   267
  {* fn phi => Nat_Numeral_Simprocs.div_cancel_factor *}
45462
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   268
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   269
simproc_setup nat_dvd_cancel_factor
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   270
  ("((l::nat) * m) dvd n" | "(l::nat) dvd (m * n)") =
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   271
  {* fn phi => Nat_Numeral_Simprocs.dvd_cancel_factor *}
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   272
33366
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   273
declaration {* 
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   274
  K (Lin_Arith.add_simps (@{thms neg_simps} @ [@{thm Suc_nat_number_of}, @{thm int_nat_number_of}])
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   275
  #> Lin_Arith.add_simps (@{thms ring_distribs} @ [@{thm Let_number_of}, @{thm Let_0}, @{thm Let_1},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   276
     @{thm nat_0}, @{thm nat_1},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   277
     @{thm add_nat_number_of}, @{thm diff_nat_number_of}, @{thm mult_nat_number_of},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   278
     @{thm eq_nat_number_of}, @{thm less_nat_number_of}, @{thm le_number_of_eq_not_less},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   279
     @{thm le_Suc_number_of}, @{thm le_number_of_Suc},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   280
     @{thm less_Suc_number_of}, @{thm less_number_of_Suc},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   281
     @{thm Suc_eq_number_of}, @{thm eq_number_of_Suc},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   282
     @{thm mult_Suc}, @{thm mult_Suc_right},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   283
     @{thm add_Suc}, @{thm add_Suc_right},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   284
     @{thm eq_number_of_0}, @{thm eq_0_number_of}, @{thm less_0_number_of},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   285
     @{thm of_int_number_of_eq}, @{thm of_nat_number_of_eq}, @{thm nat_number_of},
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   286
     @{thm if_True}, @{thm if_False}])
45284
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   287
  #> Lin_Arith.add_simprocs
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   288
      [@{simproc semiring_assoc_fold},
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   289
       @{simproc int_combine_numerals},
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   290
       @{simproc inteq_cancel_numerals},
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   291
       @{simproc intless_cancel_numerals},
ae78a4ffa81d use simproc_setup for cancellation simprocs, to get proper name bindings
huffman
parents: 37886
diff changeset
   292
       @{simproc intle_cancel_numerals}]
45436
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   293
  #> Lin_Arith.add_simprocs
45462
aba629d6cee5 use simproc_setup for more nat_numeral simprocs; add simproc tests
huffman
parents: 45436
diff changeset
   294
      [@{simproc nat_combine_numerals},
45436
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   295
       @{simproc nateq_cancel_numerals},
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   296
       @{simproc natless_cancel_numerals},
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   297
       @{simproc natle_cancel_numerals},
62bc9474d04b use simproc_setup for some nat_numeral simprocs; add simproc tests
huffman
parents: 45435
diff changeset
   298
       @{simproc natdiff_cancel_numerals}])
33366
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   299
*}
b0096ac3b731 dedicated theory for loading numeral simprocs
haftmann
parents:
diff changeset
   300
37886
2f9d3fc1a8ac tuned whitespace
haftmann
parents: 33366
diff changeset
   301
end