src/HOL/Integ/IntArith.thy
author paulson
Tue Nov 18 11:01:52 2003 +0100 (2003-11-18)
changeset 14259 79f7d3451b1e
parent 13849 2584233cf3ef
child 14266 08b34c902618
permissions -rw-r--r--
conversion of ML to Isar scripts
paulson@14259
     1
(*  Title:      HOL/Integ/IntArith.thy
paulson@14259
     2
    ID:         $Id$
paulson@14259
     3
    Authors:    Larry Paulson and Tobias Nipkow
paulson@14259
     4
*)
wenzelm@12023
     5
wenzelm@12023
     6
header {* Integer arithmetic *}
wenzelm@12023
     7
wenzelm@9436
     8
theory IntArith = Bin
paulson@14259
     9
files ("int_arith1.ML"):
wenzelm@9436
    10
wenzelm@12023
    11
use "int_arith1.ML"
wenzelm@12023
    12
setup int_arith_setup
paulson@14259
    13
paulson@14259
    14
lemma zle_diff1_eq [simp]: "(w <= z - (1::int)) = (w<(z::int))"
paulson@14259
    15
by arith
paulson@14259
    16
paulson@14259
    17
lemma zle_add1_eq_le [simp]: "(w < z + 1) = (w<=(z::int))"
paulson@14259
    18
by arith
paulson@14259
    19
paulson@14259
    20
lemma zadd_left_cancel0 [simp]: "(z = z + w) = (w = (0::int))"
paulson@14259
    21
by arith
paulson@14259
    22
paulson@14259
    23
subsection{*Results about @{term nat}*}
paulson@14259
    24
paulson@14259
    25
lemma nonneg_eq_int: "[| 0 <= z;  !!m. z = int m ==> P |] ==> P"
paulson@14259
    26
by (blast dest: nat_0_le sym)
paulson@14259
    27
paulson@14259
    28
lemma nat_eq_iff: "(nat w = m) = (if 0 <= w then w = int m else m=0)"
paulson@14259
    29
by auto
paulson@14259
    30
paulson@14259
    31
lemma nat_eq_iff2: "(m = nat w) = (if 0 <= w then w = int m else m=0)"
paulson@14259
    32
by auto
paulson@14259
    33
paulson@14259
    34
lemma nat_less_iff: "0 <= w ==> (nat w < m) = (w < int m)"
paulson@14259
    35
apply (rule iffI)
paulson@14259
    36
apply (erule nat_0_le [THEN subst])
paulson@14259
    37
apply (simp_all del: zless_int add: zless_int [symmetric]) 
paulson@14259
    38
done
paulson@14259
    39
paulson@14259
    40
lemma int_eq_iff: "(int m = z) = (m = nat z & 0 <= z)"
paulson@14259
    41
by (auto simp add: nat_eq_iff2)
paulson@14259
    42
paulson@14259
    43
paulson@14259
    44
(*Users don't want to see (int 0), int(Suc 0) or w + - z*)
paulson@14259
    45
declare Zero_int_def [symmetric, simp]
paulson@14259
    46
declare One_int_def [symmetric, simp]
paulson@14259
    47
paulson@14259
    48
text{*cooper.ML refers to this theorem*}
paulson@14259
    49
lemmas zdiff_def_symmetric = zdiff_def [symmetric, simp]
paulson@14259
    50
paulson@14259
    51
lemma nat_0: "nat 0 = 0"
paulson@14259
    52
by (simp add: nat_eq_iff)
paulson@14259
    53
paulson@14259
    54
lemma nat_1: "nat 1 = Suc 0"
paulson@14259
    55
by (subst nat_eq_iff, simp)
paulson@14259
    56
paulson@14259
    57
lemma nat_2: "nat 2 = Suc (Suc 0)"
paulson@14259
    58
by (subst nat_eq_iff, simp)
paulson@14259
    59
paulson@14259
    60
lemma nat_less_eq_zless: "0 <= w ==> (nat w < nat z) = (w<z)"
paulson@14259
    61
apply (case_tac "neg z")
paulson@14259
    62
apply (auto simp add: nat_less_iff)
paulson@14259
    63
apply (auto intro: zless_trans simp add: neg_eq_less_0 zle_def)
paulson@14259
    64
done
paulson@14259
    65
paulson@14259
    66
lemma nat_le_eq_zle: "0 < w | 0 <= z ==> (nat w <= nat z) = (w<=z)"
paulson@14259
    67
by (auto simp add: linorder_not_less [symmetric] zless_nat_conj)
paulson@14259
    68
paulson@14259
    69
subsection{*@{term abs}: Absolute Value, as an Integer*}
paulson@14259
    70
paulson@14259
    71
(* Simpler: use zabs_def as rewrite rule
paulson@14259
    72
   but arith_tac is not parameterized by such simp rules
paulson@14259
    73
*)
paulson@14259
    74
paulson@14259
    75
lemma zabs_split: "P(abs(i::int)) = ((0 <= i --> P i) & (i < 0 --> P(-i)))"
paulson@14259
    76
by (simp add: zabs_def)
paulson@14259
    77
paulson@14259
    78
lemma zero_le_zabs [iff]: "0 <= abs (z::int)"
paulson@14259
    79
by (simp add: zabs_def)
paulson@14259
    80
paulson@14259
    81
paulson@14259
    82
text{*This simplifies expressions of the form @{term "int n = z"} where
paulson@14259
    83
      z is an integer literal.*}
paulson@14259
    84
declare int_eq_iff [of _ "number_of v", standard, simp]
paulson@13837
    85
wenzelm@12023
    86
declare zabs_split [arith_split]
wenzelm@12023
    87
paulson@13837
    88
lemma zabs_eq_iff:
paulson@13837
    89
    "(abs (z::int) = w) = (z = w \<and> 0 <= z \<or> z = -w \<and> z < 0)"
paulson@13837
    90
  by (auto simp add: zabs_def)
paulson@13837
    91
paulson@13849
    92
lemma int_nat_eq [simp]: "int (nat z) = (if 0 \<le> z then z else 0)"
paulson@13849
    93
  by simp
paulson@13849
    94
nipkow@13575
    95
lemma split_nat[arith_split]:
paulson@14259
    96
  "P(nat(i::int)) = ((\<forall>n. i = int n \<longrightarrow> P n) & (i < 0 \<longrightarrow> P 0))"
nipkow@13575
    97
  (is "?P = (?L & ?R)")
nipkow@13575
    98
proof (cases "i < 0")
nipkow@13575
    99
  case True thus ?thesis by simp
nipkow@13575
   100
next
nipkow@13575
   101
  case False
nipkow@13575
   102
  have "?P = ?L"
nipkow@13575
   103
  proof
nipkow@13575
   104
    assume ?P thus ?L using False by clarsimp
nipkow@13575
   105
  next
nipkow@13575
   106
    assume ?L thus ?P using False by simp
nipkow@13575
   107
  qed
nipkow@13575
   108
  with False show ?thesis by simp
nipkow@13575
   109
qed
nipkow@13575
   110
nipkow@13685
   111
subsubsection "Induction principles for int"
nipkow@13685
   112
nipkow@13685
   113
                     (* `set:int': dummy construction *)
nipkow@13685
   114
theorem int_ge_induct[case_names base step,induct set:int]:
nipkow@13685
   115
  assumes ge: "k \<le> (i::int)" and
nipkow@13685
   116
        base: "P(k)" and
nipkow@13685
   117
        step: "\<And>i. \<lbrakk>k \<le> i; P i\<rbrakk> \<Longrightarrow> P(i+1)"
nipkow@13685
   118
  shows "P i"
nipkow@13685
   119
proof -
nipkow@13685
   120
  { fix n have "\<And>i::int. n = nat(i-k) \<Longrightarrow> k <= i \<Longrightarrow> P i"
nipkow@13685
   121
    proof (induct n)
nipkow@13685
   122
      case 0
nipkow@13685
   123
      hence "i = k" by arith
nipkow@13685
   124
      thus "P i" using base by simp
nipkow@13685
   125
    next
nipkow@13685
   126
      case (Suc n)
nipkow@13685
   127
      hence "n = nat((i - 1) - k)" by arith
nipkow@13685
   128
      moreover
nipkow@13685
   129
      have ki1: "k \<le> i - 1" using Suc.prems by arith
nipkow@13685
   130
      ultimately
nipkow@13685
   131
      have "P(i - 1)" by(rule Suc.hyps)
nipkow@13685
   132
      from step[OF ki1 this] show ?case by simp
nipkow@13685
   133
    qed
nipkow@13685
   134
  }
nipkow@13685
   135
  from this ge show ?thesis by fast
nipkow@13685
   136
qed
nipkow@13685
   137
nipkow@13685
   138
                     (* `set:int': dummy construction *)
nipkow@13685
   139
theorem int_gr_induct[case_names base step,induct set:int]:
nipkow@13685
   140
  assumes gr: "k < (i::int)" and
nipkow@13685
   141
        base: "P(k+1)" and
nipkow@13685
   142
        step: "\<And>i. \<lbrakk>k < i; P i\<rbrakk> \<Longrightarrow> P(i+1)"
nipkow@13685
   143
  shows "P i"
nipkow@13685
   144
apply(rule int_ge_induct[of "k + 1"])
nipkow@13685
   145
  using gr apply arith
nipkow@13685
   146
 apply(rule base)
paulson@14259
   147
apply (rule step, simp+)
nipkow@13685
   148
done
nipkow@13685
   149
nipkow@13685
   150
theorem int_le_induct[consumes 1,case_names base step]:
nipkow@13685
   151
  assumes le: "i \<le> (k::int)" and
nipkow@13685
   152
        base: "P(k)" and
nipkow@13685
   153
        step: "\<And>i. \<lbrakk>i \<le> k; P i\<rbrakk> \<Longrightarrow> P(i - 1)"
nipkow@13685
   154
  shows "P i"
nipkow@13685
   155
proof -
nipkow@13685
   156
  { fix n have "\<And>i::int. n = nat(k-i) \<Longrightarrow> i <= k \<Longrightarrow> P i"
nipkow@13685
   157
    proof (induct n)
nipkow@13685
   158
      case 0
nipkow@13685
   159
      hence "i = k" by arith
nipkow@13685
   160
      thus "P i" using base by simp
nipkow@13685
   161
    next
nipkow@13685
   162
      case (Suc n)
nipkow@13685
   163
      hence "n = nat(k - (i+1))" by arith
nipkow@13685
   164
      moreover
nipkow@13685
   165
      have ki1: "i + 1 \<le> k" using Suc.prems by arith
nipkow@13685
   166
      ultimately
nipkow@13685
   167
      have "P(i+1)" by(rule Suc.hyps)
nipkow@13685
   168
      from step[OF ki1 this] show ?case by simp
nipkow@13685
   169
    qed
nipkow@13685
   170
  }
nipkow@13685
   171
  from this le show ?thesis by fast
nipkow@13685
   172
qed
nipkow@13685
   173
nipkow@13685
   174
theorem int_less_induct[consumes 1,case_names base step]:
nipkow@13685
   175
  assumes less: "(i::int) < k" and
nipkow@13685
   176
        base: "P(k - 1)" and
nipkow@13685
   177
        step: "\<And>i. \<lbrakk>i < k; P i\<rbrakk> \<Longrightarrow> P(i - 1)"
nipkow@13685
   178
  shows "P i"
nipkow@13685
   179
apply(rule int_le_induct[of _ "k - 1"])
nipkow@13685
   180
  using less apply arith
nipkow@13685
   181
 apply(rule base)
paulson@14259
   182
apply (rule step, simp+)
paulson@14259
   183
done
paulson@14259
   184
paulson@14259
   185
subsection{*Simple Equations*}
paulson@14259
   186
paulson@14259
   187
lemma int_diff_minus_eq [simp]: "x - - y = x + (y::int)"
paulson@14259
   188
by simp
paulson@14259
   189
paulson@14259
   190
lemma abs_abs [simp]: "abs(abs(x::int)) = abs(x)"
paulson@14259
   191
by arith
paulson@14259
   192
paulson@14259
   193
lemma abs_minus [simp]: "abs(-(x::int)) = abs(x)"
paulson@14259
   194
by arith
paulson@14259
   195
paulson@14259
   196
lemma triangle_ineq: "abs(x+y) <= abs(x) + abs(y::int)"
paulson@14259
   197
by arith
paulson@14259
   198
paulson@14259
   199
paulson@14259
   200
subsection{*Intermediate value theorems*}
paulson@14259
   201
paulson@14259
   202
lemma int_val_lemma:
paulson@14259
   203
     "(\<forall>i<n::nat. abs(f(i+1) - f i) \<le> 1) -->  
paulson@14259
   204
      f 0 \<le> k --> k \<le> f n --> (\<exists>i \<le> n. f i = (k::int))"
paulson@14259
   205
apply (induct_tac "n")
paulson@14259
   206
 apply (simp (no_asm_simp))
paulson@14259
   207
apply (intro strip)
paulson@14259
   208
apply (erule impE, simp)
paulson@14259
   209
apply (erule_tac x = n in allE, simp)
paulson@14259
   210
apply (case_tac "k = f (n+1) ")
paulson@14259
   211
 apply force
paulson@14259
   212
apply (erule impE)
paulson@14259
   213
 apply (simp add: zabs_def split add: split_if_asm)
paulson@14259
   214
apply (blast intro: le_SucI)
paulson@14259
   215
done
paulson@14259
   216
paulson@14259
   217
lemmas nat0_intermed_int_val = int_val_lemma [rule_format (no_asm)]
paulson@14259
   218
paulson@14259
   219
lemma nat_intermed_int_val:
paulson@14259
   220
     "[| \<forall>i. m \<le> i & i < n --> abs(f(i + 1::nat) - f i) \<le> 1; m < n;  
paulson@14259
   221
         f m \<le> k; k \<le> f n |] ==> ? i. m \<le> i & i \<le> n & f i = (k::int)"
paulson@14259
   222
apply (cut_tac n = "n-m" and f = "%i. f (i+m) " and k = k 
paulson@14259
   223
       in int_val_lemma)
paulson@14259
   224
apply simp
paulson@14259
   225
apply (erule impE)
paulson@14259
   226
 apply (intro strip)
paulson@14259
   227
 apply (erule_tac x = "i+m" in allE, arith)
paulson@14259
   228
apply (erule exE)
paulson@14259
   229
apply (rule_tac x = "i+m" in exI, arith)
paulson@14259
   230
done
paulson@14259
   231
paulson@14259
   232
paulson@14259
   233
subsection{*Some convenient biconditionals for products of signs*}
paulson@14259
   234
paulson@14259
   235
lemma zmult_pos: "[| (0::int) < i; 0 < j |] ==> 0 < i*j"
paulson@14259
   236
by (drule zmult_zless_mono1, auto)
paulson@14259
   237
paulson@14259
   238
lemma zmult_neg: "[| i < (0::int); j < 0 |] ==> 0 < i*j"
paulson@14259
   239
by (drule zmult_zless_mono1_neg, auto)
paulson@14259
   240
paulson@14259
   241
lemma zmult_pos_neg: "[| (0::int) < i; j < 0 |] ==> i*j < 0"
paulson@14259
   242
by (drule zmult_zless_mono1_neg, auto)
paulson@14259
   243
paulson@14259
   244
lemma int_0_less_mult_iff: "((0::int) < x*y) = (0 < x & 0 < y | x < 0 & y < 0)"
paulson@14259
   245
apply (auto simp add: order_le_less linorder_not_less zmult_pos zmult_neg)
paulson@14259
   246
apply (rule_tac [!] ccontr)
paulson@14259
   247
apply (auto simp add: order_le_less linorder_not_less)
paulson@14259
   248
apply (erule_tac [!] rev_mp)
paulson@14259
   249
apply (drule_tac [!] zmult_pos_neg)
paulson@14259
   250
apply (auto dest: order_less_not_sym simp add: zmult_commute)
paulson@14259
   251
done
paulson@14259
   252
paulson@14259
   253
lemma int_0_le_mult_iff: "((0::int) \<le> x*y) = (0 \<le> x & 0 \<le> y | x \<le> 0 & y \<le> 0)"
paulson@14259
   254
by (auto simp add: order_le_less linorder_not_less int_0_less_mult_iff)
paulson@14259
   255
paulson@14259
   256
lemma zmult_less_0_iff: "(x*y < (0::int)) = (0 < x & y < 0 | x < 0 & 0 < y)"
paulson@14259
   257
by (auto simp add: int_0_le_mult_iff linorder_not_le [symmetric])
paulson@14259
   258
paulson@14259
   259
lemma zmult_le_0_iff: "(x*y \<le> (0::int)) = (0 \<le> x & y \<le> 0 | x \<le> 0 & 0 \<le> y)"
paulson@14259
   260
by (auto dest: order_less_not_sym simp add: int_0_less_mult_iff linorder_not_less [symmetric])
paulson@14259
   261
paulson@14259
   262
lemma abs_mult: "abs (x * y) = abs x * abs (y::int)"
paulson@14259
   263
by (simp del: number_of_reorient split
paulson@14259
   264
          add: zabs_split split add: zabs_split add: zmult_less_0_iff zle_def)
paulson@14259
   265
paulson@14259
   266
lemma abs_eq_0 [iff]: "(abs x = 0) = (x = (0::int))"
paulson@14259
   267
by (simp split add: zabs_split)
paulson@14259
   268
paulson@14259
   269
lemma zero_less_abs_iff [iff]: "(0 < abs x) = (x ~= (0::int))"
paulson@14259
   270
by (simp split add: zabs_split, arith)
paulson@14259
   271
paulson@14259
   272
(* THIS LOOKS WRONG: [intro]*)
paulson@14259
   273
lemma square_nonzero [simp]: "0 \<le> x * (x::int)"
paulson@14259
   274
apply (subgoal_tac " (- x) * x \<le> 0")
paulson@14259
   275
 apply simp
paulson@14259
   276
apply (simp only: zmult_le_0_iff, auto)
paulson@14259
   277
done
paulson@14259
   278
paulson@14259
   279
paulson@14259
   280
subsection{*Products and 1, by T. M. Rasmussen*}
paulson@14259
   281
paulson@14259
   282
lemma zmult_eq_self_iff: "(m = m*(n::int)) = (n = 1 | m = 0)"
paulson@14259
   283
apply auto
paulson@14259
   284
apply (subgoal_tac "m*1 = m*n")
paulson@14259
   285
apply (drule zmult_cancel1 [THEN iffD1], auto)
nipkow@13685
   286
done
nipkow@13685
   287
paulson@14259
   288
lemma zless_1_zmult: "[| 1 < m; 1 < n |] ==> 1 < m*(n::int)"
paulson@14259
   289
apply (rule_tac y = "1*n" in order_less_trans)
paulson@14259
   290
apply (rule_tac [2] zmult_zless_mono1)
paulson@14259
   291
apply (simp_all (no_asm_simp))
paulson@14259
   292
done
paulson@14259
   293
paulson@14259
   294
lemma pos_zmult_eq_1_iff: "0 < (m::int) ==> (m * n = 1) = (m = 1 & n = 1)"
paulson@14259
   295
apply auto
paulson@14259
   296
apply (case_tac "m=1")
paulson@14259
   297
apply (case_tac [2] "n=1")
paulson@14259
   298
apply (case_tac [4] "m=1")
paulson@14259
   299
apply (case_tac [5] "n=1", auto)
paulson@14259
   300
apply (tactic"distinct_subgoals_tac")
paulson@14259
   301
apply (subgoal_tac "1<m*n", simp)
paulson@14259
   302
apply (rule zless_1_zmult, arith)
paulson@14259
   303
apply (subgoal_tac "0<n", arith)
paulson@14259
   304
apply (subgoal_tac "0<m*n")
paulson@14259
   305
apply (drule int_0_less_mult_iff [THEN iffD1], auto)
paulson@14259
   306
done
paulson@14259
   307
paulson@14259
   308
lemma zmult_eq_1_iff: "(m*n = (1::int)) = ((m = 1 & n = 1) | (m = -1 & n = -1))"
paulson@14259
   309
apply (case_tac "0<m")
paulson@14259
   310
apply (simp (no_asm_simp) add: pos_zmult_eq_1_iff)
paulson@14259
   311
apply (case_tac "m=0")
paulson@14259
   312
apply (simp (no_asm_simp) del: number_of_reorient)
paulson@14259
   313
apply (subgoal_tac "0 < -m")
paulson@14259
   314
apply (drule_tac n = "-n" in pos_zmult_eq_1_iff, auto)
paulson@14259
   315
done
paulson@14259
   316
paulson@14259
   317
paulson@14259
   318
subsection{*More about nat*}
paulson@14259
   319
paulson@14259
   320
lemma nat_add_distrib:
paulson@14259
   321
     "[| (0::int) \<le> z;  0 \<le> z' |] ==> nat (z+z') = nat z + nat z'"
paulson@14259
   322
apply (rule inj_int [THEN injD])
paulson@14259
   323
apply (simp (no_asm_simp) add: zadd_int [symmetric])
paulson@14259
   324
done
paulson@14259
   325
paulson@14259
   326
lemma nat_diff_distrib:
paulson@14259
   327
     "[| (0::int) \<le> z';  z' \<le> z |] ==> nat (z-z') = nat z - nat z'"
paulson@14259
   328
apply (rule inj_int [THEN injD])
paulson@14259
   329
apply (simp (no_asm_simp) add: zdiff_int [symmetric] nat_le_eq_zle)
paulson@14259
   330
done
paulson@14259
   331
paulson@14259
   332
lemma nat_mult_distrib: "(0::int) \<le> z ==> nat (z*z') = nat z * nat z'"
paulson@14259
   333
apply (case_tac "0 \<le> z'")
paulson@14259
   334
apply (rule inj_int [THEN injD])
paulson@14259
   335
apply (simp (no_asm_simp) add: zmult_int [symmetric] int_0_le_mult_iff)
paulson@14259
   336
apply (simp add: zmult_le_0_iff)
paulson@14259
   337
done
paulson@14259
   338
paulson@14259
   339
lemma nat_mult_distrib_neg: "z \<le> (0::int) ==> nat(z*z') = nat(-z) * nat(-z')"
paulson@14259
   340
apply (rule trans)
paulson@14259
   341
apply (rule_tac [2] nat_mult_distrib, auto)
paulson@14259
   342
done
paulson@14259
   343
paulson@14259
   344
lemma nat_abs_mult_distrib: "nat (abs (w * z)) = nat (abs w) * nat (abs z)"
paulson@14259
   345
apply (case_tac "z=0 | w=0")
paulson@14259
   346
apply (auto simp add: zabs_def nat_mult_distrib [symmetric] 
paulson@14259
   347
                      nat_mult_distrib_neg [symmetric] zmult_less_0_iff)
paulson@14259
   348
done
paulson@14259
   349
paulson@14259
   350
ML
paulson@14259
   351
{*
paulson@14259
   352
val zle_diff1_eq = thm "zle_diff1_eq";
paulson@14259
   353
val zle_add1_eq_le = thm "zle_add1_eq_le";
paulson@14259
   354
val nonneg_eq_int = thm "nonneg_eq_int";
paulson@14259
   355
val nat_eq_iff = thm "nat_eq_iff";
paulson@14259
   356
val nat_eq_iff2 = thm "nat_eq_iff2";
paulson@14259
   357
val nat_less_iff = thm "nat_less_iff";
paulson@14259
   358
val int_eq_iff = thm "int_eq_iff";
paulson@14259
   359
val nat_0 = thm "nat_0";
paulson@14259
   360
val nat_1 = thm "nat_1";
paulson@14259
   361
val nat_2 = thm "nat_2";
paulson@14259
   362
val nat_less_eq_zless = thm "nat_less_eq_zless";
paulson@14259
   363
val nat_le_eq_zle = thm "nat_le_eq_zle";
paulson@14259
   364
val zabs_split = thm "zabs_split";
paulson@14259
   365
val zero_le_zabs = thm "zero_le_zabs";
paulson@14259
   366
paulson@14259
   367
val int_diff_minus_eq = thm "int_diff_minus_eq";
paulson@14259
   368
val abs_abs = thm "abs_abs";
paulson@14259
   369
val abs_minus = thm "abs_minus";
paulson@14259
   370
val triangle_ineq = thm "triangle_ineq";
paulson@14259
   371
val nat_intermed_int_val = thm "nat_intermed_int_val";
paulson@14259
   372
val zmult_pos = thm "zmult_pos";
paulson@14259
   373
val zmult_neg = thm "zmult_neg";
paulson@14259
   374
val zmult_pos_neg = thm "zmult_pos_neg";
paulson@14259
   375
val int_0_less_mult_iff = thm "int_0_less_mult_iff";
paulson@14259
   376
val int_0_le_mult_iff = thm "int_0_le_mult_iff";
paulson@14259
   377
val zmult_less_0_iff = thm "zmult_less_0_iff";
paulson@14259
   378
val zmult_le_0_iff = thm "zmult_le_0_iff";
paulson@14259
   379
val abs_mult = thm "abs_mult";
paulson@14259
   380
val abs_eq_0 = thm "abs_eq_0";
paulson@14259
   381
val zero_less_abs_iff = thm "zero_less_abs_iff";
paulson@14259
   382
val square_nonzero = thm "square_nonzero";
paulson@14259
   383
val zmult_eq_self_iff = thm "zmult_eq_self_iff";
paulson@14259
   384
val zless_1_zmult = thm "zless_1_zmult";
paulson@14259
   385
val pos_zmult_eq_1_iff = thm "pos_zmult_eq_1_iff";
paulson@14259
   386
val zmult_eq_1_iff = thm "zmult_eq_1_iff";
paulson@14259
   387
val nat_add_distrib = thm "nat_add_distrib";
paulson@14259
   388
val nat_diff_distrib = thm "nat_diff_distrib";
paulson@14259
   389
val nat_mult_distrib = thm "nat_mult_distrib";
paulson@14259
   390
val nat_mult_distrib_neg = thm "nat_mult_distrib_neg";
paulson@14259
   391
val nat_abs_mult_distrib = thm "nat_abs_mult_distrib";
paulson@14259
   392
*}
paulson@14259
   393
wenzelm@7707
   394
end