src/HOL/Hoare/Arith2.ML
author berghofe
Fri, 19 Jul 1996 15:56:01 +0200
changeset 1875 54c0462f8fb2
parent 1714 1a5e0101399d
child 2031 03a843f0f447
permissions -rw-r--r--
Classical tactics now use default claset.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1335
diff changeset
     1
(*  Title:      HOL/Hoare/Arith2.ML
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
     2
    ID:         $Id$
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1335
diff changeset
     3
    Author:     Norbert Galm
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
     4
    Copyright   1995 TUM
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
     5
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
     6
More arithmetic lemmas.
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
     7
*)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
     8
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
     9
open Arith2;
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    10
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    11
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    12
(*** HOL lemmas ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    13
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    14
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    15
val [prem1,prem2]=goal HOL.thy "[|~P ==> ~Q; Q|] ==> P";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    16
by (cut_facts_tac [prem1 COMP impI,prem2] 1);
1875
54c0462f8fb2 Classical tactics now use default claset.
berghofe
parents: 1714
diff changeset
    17
by (Fast_tac 1);
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    18
val not_imp_swap=result();
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    19
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    20
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    21
(*** analogue of diff_induct, for simultaneous induction over 3 vars ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    22
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    23
val prems = goal Nat.thy
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    24
    "[| !!x. P x 0 0;  \
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    25
\       !!y. P 0 (Suc y) 0;  \
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    26
\       !!z. P 0 0 (Suc z);  \
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    27
\       !!x y. [| P x y 0 |] ==> P (Suc x) (Suc y) 0;  \
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    28
\       !!x z. [| P x 0 z |] ==> P (Suc x) 0 (Suc z);  \
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    29
\       !!y z. [| P 0 y z |] ==> P 0 (Suc y) (Suc z);  \
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    30
\       !!x y z. [| P x y z |] ==> P (Suc x) (Suc y) (Suc z)  \
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    31
\    |] ==> P m n k";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    32
by (res_inst_tac [("x","m")] spec 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    33
br diff_induct 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    34
br allI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    35
br allI 2;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    36
by (res_inst_tac [("m","xa"),("n","x")] diff_induct 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    37
by (res_inst_tac [("m","x"),("n","Suc y")] diff_induct 4);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    38
br allI 7;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    39
by (nat_ind_tac "xa" 7);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    40
by (ALLGOALS (resolve_tac prems));
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    41
ba 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    42
ba 1;
1875
54c0462f8fb2 Classical tactics now use default claset.
berghofe
parents: 1714
diff changeset
    43
by (Fast_tac 1);
54c0462f8fb2 Classical tactics now use default claset.
berghofe
parents: 1714
diff changeset
    44
by (Fast_tac 1);
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    45
qed "diff_induct3";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    46
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    47
(*** interaction of + and - ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    48
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    49
val prems=goal Arith.thy "~m<n+k ==> (m - n) - k = m - ((n + k)::nat)";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    50
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    51
br mp 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    52
ba 2;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    53
by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    54
by (ALLGOALS Asm_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    55
qed "diff_not_assoc";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    56
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    57
val prems=goal Arith.thy "[|~m<n; ~n<k|] ==> (m - n) + k = m - ((n - k)::nat)";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    58
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    59
bd conjI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    60
ba 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    61
by (res_inst_tac [("P","~m<n & ~n<k")] mp 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    62
ba 2;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    63
by (res_inst_tac [("m","m"),("n","n"),("k","k")] diff_induct3 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    64
by (ALLGOALS Asm_simp_tac);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    65
br impI 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    66
by (dres_inst_tac [("P","~x<y")] conjE 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    67
ba 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    68
br (Suc_diff_n RS sym) 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    69
br le_less_trans 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    70
be (not_less_eq RS subst) 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    71
br (hd ([diff_less_Suc RS lessD] RL [Suc_le_mono RS subst])) 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    72
qed "diff_add_not_assoc";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    73
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    74
val prems=goal Arith.thy "~n<k ==> (m + n) - k = m + ((n - k)::nat)";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    75
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    76
br mp 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    77
ba 2;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    78
by (res_inst_tac [("m","n"),("n","k")] diff_induct 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    79
by (ALLGOALS Asm_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    80
qed "add_diff_assoc";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    81
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    82
(*** more ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    83
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    84
val prems = goal Arith.thy "m~=(n::nat) = (m<n | n<m)";
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    85
br iffI 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    86
by (cut_inst_tac [("m","m"),("n","n")] less_linear 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    87
by (Asm_full_simp_tac 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    88
be disjE 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    89
be (less_not_refl2 RS not_sym) 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
    90
be less_not_refl2 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    91
qed "not_eq_eq_less_or_gr";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    92
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    93
val [prem] = goal Arith.thy "m<n ==> n-m~=0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    94
by (rtac (prem RS rev_mp) 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    95
by (res_inst_tac [("m","m"),("n","n")] diff_induct 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    96
by (ALLGOALS Asm_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    97
qed "less_imp_diff_not_0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    98
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
    99
(*******************************************************************)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   100
1714
1a5e0101399d Deleted diff_mult_distrib_r as diff_mult_distrib is not proved in Arith.
paulson
parents: 1476
diff changeset
   101
(** Some of these are now proved, with different names, in HOL/Arith.ML **)
1a5e0101399d Deleted diff_mult_distrib_r as diff_mult_distrib is not proved in Arith.
paulson
parents: 1476
diff changeset
   102
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   103
val prems = goal Arith.thy "(i::nat)<j ==> k+i<k+j";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   104
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   105
by (nat_ind_tac "k" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   106
by (ALLGOALS Asm_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   107
qed "add_less_mono_l";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   108
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   109
val prems = goal Arith.thy "~(i::nat)<j ==> ~k+i<k+j";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   110
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   111
by (nat_ind_tac "k" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   112
by (ALLGOALS Asm_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   113
qed "add_not_less_mono_l";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   114
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   115
val prems = goal Arith.thy "[|0<k; m<(n::nat)|] ==> m*k<n*k";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   116
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   117
by (res_inst_tac [("n","k")] natE 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   118
by (ALLGOALS Asm_full_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   119
by (nat_ind_tac "x" 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   120
be add_less_mono 2;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   121
by (ALLGOALS Asm_full_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   122
qed "mult_less_mono_r";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   123
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   124
val prems = goal Arith.thy "~m<(n::nat) ==> ~m*k<n*k";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   125
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   126
by (nat_ind_tac "k" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   127
by (ALLGOALS Simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   128
by (fold_goals_tac [le_def]);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   129
be add_le_mono 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   130
ba 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   131
qed "mult_not_less_mono_r";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   132
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   133
val prems = goal Arith.thy "m=(n::nat) ==> m*k=n*k";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   134
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   135
by (nat_ind_tac "k" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   136
by (ALLGOALS Asm_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   137
qed "mult_eq_mono_r";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   138
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   139
val prems = goal Arith.thy "[|0<k; m~=(n::nat)|] ==> m*k~=n*k";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   140
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   141
by (res_inst_tac [("P","m<n"),("Q","n<m")] disjE 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   142
br (less_not_refl2 RS not_sym) 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   143
be mult_less_mono_r 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   144
br less_not_refl2 3;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   145
be mult_less_mono_r 3;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   146
by (ALLGOALS (asm_full_simp_tac ((simpset_of "Arith") addsimps [not_eq_eq_less_or_gr])));
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   147
qed "mult_not_eq_mono_r";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   148
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   149
(******************************************************************)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   150
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   151
(*** mod ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   152
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   153
goal Arith.thy "(%m. m mod n) = wfrec (trancl pred_nat) \
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   154
             \                      (%f j. if j<n then j else f (j-n))";
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   155
by (simp_tac (HOL_ss addsimps [mod_def]) 1);
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   156
val mod_def = result() RS eq_reflection;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   157
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   158
(* Alternativ-Beweis zu mod_nn_is_0: Spezialfall zu mod_prod_nn_is_0 *)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   159
(*
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   160
val prems = goal thy "0<n ==> n mod n = 0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   161
by (cut_inst_tac [("m","Suc(0)")] (mod_prod_nn_is_0 COMP impI) 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   162
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   163
by (Asm_full_simp_tac 1);
1875
54c0462f8fb2 Classical tactics now use default claset.
berghofe
parents: 1714
diff changeset
   164
by (Fast_tac 1);
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   165
*)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   166
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   167
val prems=goal thy "0<n ==> n mod n = 0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   168
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   169
br (mod_def RS wf_less_trans) 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   170
by (asm_full_simp_tac ((simpset_of "Arith") addsimps [diff_self_eq_0,cut_def,less_eq]) 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   171
be mod_less 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   172
qed "mod_nn_is_0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   173
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   174
val prems=goal thy "0<n ==> m mod n = (m+n) mod n";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   175
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   176
by (res_inst_tac [("s","n+m"),("t","m+n")] subst 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   177
br add_commute 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   178
by (res_inst_tac [("s","n+m-n"),("P","%x.x mod n = (n + m) mod n")] subst 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   179
br diff_add_inverse 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   180
br sym 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   181
be mod_geq 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   182
by (res_inst_tac [("s","n<=n+m"),("t","~n+m<n")] subst 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   183
by (simp_tac ((simpset_of "Arith") addsimps [le_def]) 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   184
br le_add1 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   185
qed "mod_eq_add";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   186
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   187
val prems=goal thy "0<n ==> m*n mod n = 0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   188
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   189
by (nat_ind_tac "m" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   190
by (Simp_tac 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   191
be mod_less 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   192
by (dres_inst_tac [("n","n"),("m","m1*n")] mod_eq_add 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   193
by (asm_full_simp_tac ((simpset_of "Arith") addsimps [add_commute]) 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   194
qed "mod_prod_nn_is_0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   195
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   196
val prems=goal thy "[|0<x; m mod x = 0; n mod x = 0|] ==> (m+n) mod x = 0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   197
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   198
by (res_inst_tac [("s","m div x * x + m mod x"),("t","m")] subst 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   199
be mod_div_equality 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   200
by (res_inst_tac [("s","n div x * x + n mod x"),("t","n")] subst 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   201
be mod_div_equality 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   202
by (Asm_simp_tac 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   203
by (res_inst_tac [("s","(m div x + n div x) * x"),("t","m div x * x + n div x * x")] subst 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   204
br add_mult_distrib 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   205
be mod_prod_nn_is_0 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   206
qed "mod0_sum";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   207
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   208
val prems=goal thy "[|0<x; m mod x = 0; n mod x = 0; n<=m|] ==> (m-n) mod x = 0";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   209
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   210
by (res_inst_tac [("s","m div x * x + m mod x"),("t","m")] subst 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   211
be mod_div_equality 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   212
by (res_inst_tac [("s","n div x * x + n mod x"),("t","n")] subst 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   213
be mod_div_equality 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   214
by (Asm_simp_tac 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   215
by (res_inst_tac [("s","(m div x - n div x) * x"),("t","m div x * x - n div x * x")] subst 1);
1714
1a5e0101399d Deleted diff_mult_distrib_r as diff_mult_distrib is not proved in Arith.
paulson
parents: 1476
diff changeset
   216
br diff_mult_distrib 1;
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   217
be mod_prod_nn_is_0 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   218
qed "mod0_diff";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   219
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   220
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   221
(*** div ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   222
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   223
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   224
val prems = goal thy "0<n ==> m*n div n = m";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   225
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   226
br (mult_not_eq_mono_r RS not_imp_swap) 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   227
ba 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   228
ba 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   229
by (res_inst_tac [("P","%x.m*n div n * n = x")] (mod_div_equality RS subst) 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   230
ba 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   231
by (dres_inst_tac [("m","m")] mod_prod_nn_is_0 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   232
by (Asm_simp_tac 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   233
qed "div_prod_nn_is_m";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   234
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   235
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   236
(*** divides ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   237
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   238
val prems=goalw thy [divides_def] "0<n ==> n divides n";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   239
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   240
by (forward_tac [mod_nn_is_0] 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   241
by (Asm_simp_tac 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   242
qed "divides_nn";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   243
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   244
val prems=goalw thy [divides_def] "x divides n ==> x<=n";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   245
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   246
br ((mod_less COMP rev_contrapos) RS (le_def RS meta_eq_to_obj_eq RS iffD2)) 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   247
by (Asm_simp_tac 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   248
br (less_not_refl2 RS not_sym) 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   249
by (Asm_simp_tac 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   250
qed "divides_le";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   251
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   252
val prems=goalw thy [divides_def] "[|x divides m; x divides n|] ==> x divides (m+n)";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   253
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   254
by (REPEAT ((dtac conjE 1) THEN (atac 2)));
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   255
br conjI 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   256
by (dres_inst_tac [("m","0"),("n","m")] less_imp_add_less 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   257
ba 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   258
be conjI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   259
br mod0_sum 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   260
by (ALLGOALS atac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   261
qed "divides_sum";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   262
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   263
val prems=goalw thy [divides_def] "[|x divides m; x divides n; n<m|] ==> x divides (m-n)";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   264
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   265
by (REPEAT ((dtac conjE 1) THEN (atac 2)));
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   266
br conjI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   267
be less_imp_diff_positive 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   268
be conjI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   269
br mod0_diff 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   270
by (ALLGOALS (asm_simp_tac ((simpset_of "Arith") addsimps [le_def])));
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   271
be less_not_sym 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   272
qed "divides_diff";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   273
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   274
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   275
(*** cd ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   276
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   277
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   278
val prems=goalw thy [cd_def] "0<n ==> cd n n n";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   279
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   280
bd divides_nn 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   281
by (Asm_simp_tac 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   282
qed "cd_nnn";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   283
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   284
val prems=goalw thy [cd_def] "cd x m n ==> x<=m & x<=n";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   285
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   286
bd conjE 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   287
ba 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   288
bd divides_le 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   289
bd divides_le 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   290
by (Asm_simp_tac 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   291
qed "cd_le";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   292
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   293
val prems=goalw thy [cd_def] "cd x m n = cd x n m";
1875
54c0462f8fb2 Classical tactics now use default claset.
berghofe
parents: 1714
diff changeset
   294
by (Fast_tac 1);
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   295
qed "cd_swap";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   296
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   297
val prems=goalw thy [cd_def] "n<m ==> cd x m n = cd x (m-n) n";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   298
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   299
br iffI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   300
bd conjE 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   301
ba 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   302
br conjI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   303
br divides_diff 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   304
bd conjE 5;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   305
ba 6;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   306
br conjI 5;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   307
bd less_not_sym 5;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   308
bd add_diff_inverse 5;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   309
by (dres_inst_tac [("m","n"),("n","m-n")] divides_sum 5);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   310
by (ALLGOALS Asm_full_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   311
qed "cd_diff_l";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   312
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   313
val prems=goalw thy [cd_def] "m<n ==> cd x m n = cd x m (n-m)";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   314
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   315
br iffI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   316
bd conjE 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   317
ba 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   318
br conjI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   319
br divides_diff 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   320
bd conjE 5;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   321
ba 6;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   322
br conjI 5;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   323
bd less_not_sym 6;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   324
bd add_diff_inverse 6;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   325
by (dres_inst_tac [("n","n-m")] divides_sum 6);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   326
by (ALLGOALS Asm_full_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   327
qed "cd_diff_r";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   328
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   329
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   330
(*** gcd ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   331
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   332
val prems = goalw thy [gcd_def] "0<n ==> n = gcd n n";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   333
by (cut_facts_tac prems 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   334
bd cd_nnn 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   335
br (select_equality RS sym) 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   336
be conjI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   337
br allI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   338
br impI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   339
bd cd_le 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   340
bd conjE 2;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   341
ba 3;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   342
br le_anti_sym 2;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   343
by (dres_inst_tac [("x","x")] cd_le 2);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   344
by (dres_inst_tac [("x","n")] spec 3);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   345
by (ALLGOALS Asm_full_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   346
qed "gcd_nnn";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   347
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   348
val prems = goalw thy [gcd_def] "gcd m n = gcd n m";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   349
by (simp_tac ((simpset_of "Arith") addsimps [cd_swap]) 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   350
qed "gcd_swap";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   351
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   352
val prems=goalw thy [gcd_def] "n<m ==> gcd m n = gcd (m-n) n";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   353
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   354
by (subgoal_tac "n<m ==> !x.cd x m n = cd x (m-n) n" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   355
by (Asm_simp_tac 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   356
br allI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   357
be cd_diff_l 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   358
qed "gcd_diff_l";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   359
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   360
val prems=goalw thy [gcd_def] "m<n ==> gcd m n = gcd m (n-m)";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   361
by (cut_facts_tac prems 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   362
by (subgoal_tac "m<n ==> !x.cd x m n = cd x m (n-m)" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   363
by (Asm_simp_tac 1);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   364
br allI 1;
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   365
be cd_diff_r 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   366
qed "gcd_diff_r";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   367
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   368
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   369
(*** pow ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   370
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   371
val [pow_0,pow_Suc] = nat_recs pow_def;
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   372
store_thm("pow_0",pow_0);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   373
store_thm("pow_Suc",pow_Suc);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   374
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   375
goalw thy [pow_def] "m pow (n+k) = m pow n * m pow k";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   376
by (nat_ind_tac "k" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   377
by (ALLGOALS (asm_simp_tac ((simpset_of "Arith") addsimps [mult_left_commute])));
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   378
qed "pow_add_reduce";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   379
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   380
goalw thy [pow_def] "m pow n pow k = m pow (n*k)";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   381
by (nat_ind_tac "k" 1);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   382
by (ALLGOALS Asm_simp_tac);
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   383
by (fold_goals_tac [pow_def]);
1476
608483c2122a expanded tabs; incorporated Konrad's changes
clasohm
parents: 1465
diff changeset
   384
br (pow_add_reduce RS sym) 1;
1335
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   385
qed "pow_pow_reduce";
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   386
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   387
(*** fac ***)
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   388
5e1c0540f285 New directory.
nipkow
parents:
diff changeset
   389
Addsimps(nat_recs fac_def);