| author | berghofe | 
| Mon, 11 Jun 2001 19:21:13 +0200 | |
| changeset 11371 | 1d5d181b7e28 | 
| parent 11324 | 82406bd816a5 | 
| child 11454 | 7514e5e21cb8 | 
| permissions | -rw-r--r-- | 
| 10214 | 1  | 
(* Title: HOL/NatArith.thy  | 
2  | 
ID: $Id$  | 
|
3  | 
||
4  | 
Setup arithmetic proof procedures.  | 
|
5  | 
*)  | 
|
6  | 
||
7  | 
theory NatArith = Nat  | 
|
8  | 
files "arith_data.ML":  | 
|
9  | 
||
10  | 
setup arith_setup  | 
|
11  | 
||
12  | 
(*elimination of `-' on nat*)  | 
|
13  | 
lemma nat_diff_split:  | 
|
| 10599 | 14  | 
"P(a - b::nat) = ((a<b --> P 0) & (ALL d. a = b + d --> P d))"  | 
| 11324 | 15  | 
by (cases "a<b" rule: case_split) (auto simp add: diff_is_0_eq [THEN iffD2])  | 
16  | 
||
17  | 
(*elimination of `-' on nat in assumptions*)  | 
|
18  | 
lemma nat_diff_split_asm:  | 
|
19  | 
"P(a - b::nat) = (~ (a < b & ~ P 0 | (EX d. a = b + d & ~ P d)))"  | 
|
20  | 
by (simp split: nat_diff_split)  | 
|
| 10214 | 21  | 
|
| 11164 | 22  | 
ML {*
 | 
23  | 
val nat_diff_split = thm "nat_diff_split";  | 
|
| 11324 | 24  | 
val nat_diff_split_asm = thm "nat_diff_split_asm";  | 
| 11164 | 25  | 
|
26  | 
(* TODO: use this for force_tac in Provers/clasip.ML *)  | 
|
| 
11181
 
d04f57b91166
renamed addaltern to addafter, addSaltern to addSafter
 
oheimb 
parents: 
11164 
diff
changeset
 | 
27  | 
fun add_arith cs = cs addafter ("arith_tac", arith_tac);
 | 
| 11164 | 28  | 
*}  | 
| 10214 | 29  | 
|
30  | 
lemmas [arith_split] = nat_diff_split split_min split_max  | 
|
31  | 
||
| 11164 | 32  | 
|
| 10214 | 33  | 
end  |