| author | wenzelm | 
| Wed, 03 Oct 2001 20:54:16 +0200 | |
| changeset 11655 | 923e4d0d36d5 | 
| parent 11454 | 7514e5e21cb8 | 
| child 13297 | e4ae0732e2be | 
| 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  | 
||
| 11655 | 12  | 
lemma pred_nat_trancl_eq_le: "((m, n) : pred_nat^*) = (m <= n)"  | 
13  | 
apply (simp add: less_eq reflcl_trancl [symmetric]  | 
|
| 
11454
 
7514e5e21cb8
Hilbert restructuring: Wellfounded_Relations no longer needs Hilbert_Choice
 
paulson 
parents: 
11324 
diff
changeset
 | 
14  | 
del: reflcl_trancl)  | 
| 
 
7514e5e21cb8
Hilbert restructuring: Wellfounded_Relations no longer needs Hilbert_Choice
 
paulson 
parents: 
11324 
diff
changeset
 | 
15  | 
by arith  | 
| 
 
7514e5e21cb8
Hilbert restructuring: Wellfounded_Relations no longer needs Hilbert_Choice
 
paulson 
parents: 
11324 
diff
changeset
 | 
16  | 
|
| 10214 | 17  | 
(*elimination of `-' on nat*)  | 
18  | 
lemma nat_diff_split:  | 
|
| 10599 | 19  | 
"P(a - b::nat) = ((a<b --> P 0) & (ALL d. a = b + d --> P d))"  | 
| 11324 | 20  | 
by (cases "a<b" rule: case_split) (auto simp add: diff_is_0_eq [THEN iffD2])  | 
21  | 
||
22  | 
(*elimination of `-' on nat in assumptions*)  | 
|
23  | 
lemma nat_diff_split_asm:  | 
|
24  | 
"P(a - b::nat) = (~ (a < b & ~ P 0 | (EX d. a = b + d & ~ P d)))"  | 
|
25  | 
by (simp split: nat_diff_split)  | 
|
| 10214 | 26  | 
|
| 11164 | 27  | 
ML {*
 | 
28  | 
val nat_diff_split = thm "nat_diff_split";  | 
|
| 11324 | 29  | 
val nat_diff_split_asm = thm "nat_diff_split_asm";  | 
| 11164 | 30  | 
|
31  | 
(* TODO: use this for force_tac in Provers/clasip.ML *)  | 
|
| 
11181
 
d04f57b91166
renamed addaltern to addafter, addSaltern to addSafter
 
oheimb 
parents: 
11164 
diff
changeset
 | 
32  | 
fun add_arith cs = cs addafter ("arith_tac", arith_tac);
 | 
| 11164 | 33  | 
*}  | 
| 10214 | 34  | 
|
35  | 
lemmas [arith_split] = nat_diff_split split_min split_max  | 
|
36  | 
||
| 11164 | 37  | 
|
| 10214 | 38  | 
end  |