| author | urbanc | 
| Tue, 04 Jul 2006 17:26:02 +0200 | |
| changeset 19993 | e0a5783d708f | 
| parent 18708 | 4b3dadb4fe33 | 
| child 20254 | 58b71535ed00 | 
| permissions | -rw-r--r-- | 
| 14309 | 1  | 
(* Title: HOL/Hyperreal/hypreal_arith.ML  | 
| 10751 | 2  | 
ID: $Id$  | 
3  | 
Author: Tobias Nipkow, TU Muenchen  | 
|
4  | 
Copyright 1999 TU Muenchen  | 
|
5  | 
||
| 14352 | 6  | 
Simprocs for common factor cancellation & Rational coefficient handling  | 
7  | 
||
8  | 
Instantiation of the generic linear arithmetic package for type hypreal.  | 
|
| 10751 | 9  | 
*)  | 
10  | 
||
| 14352 | 11  | 
(****Instantiation of the generic linear arithmetic package****)  | 
12  | 
||
| 14309 | 13  | 
|
| 10751 | 14  | 
local  | 
15  | 
||
| 
17318
 
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
 
huffman 
parents: 
15923 
diff
changeset
 | 
16  | 
val real_inj_thms = [thm "star_of_le" RS iffD2,  | 
| 
 
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
 
huffman 
parents: 
15923 
diff
changeset
 | 
17  | 
thm "star_of_less" RS iffD2,  | 
| 
 
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
 
huffman 
parents: 
15923 
diff
changeset
 | 
18  | 
thm "star_of_eq" RS iffD2];  | 
| 14369 | 19  | 
|
| 10751 | 20  | 
in  | 
21  | 
||
| 17431 | 22  | 
val hyprealT = Type("StarDef.star", [HOLogic.realT]);
 | 
| 
14387
 
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
 
paulson 
parents: 
14370 
diff
changeset
 | 
23  | 
|
| 14352 | 24  | 
val fast_hypreal_arith_simproc =  | 
25  | 
Simplifier.simproc (Theory.sign_of (the_context ()))  | 
|
26  | 
"fast_hypreal_arith"  | 
|
27  | 
["(m::hypreal) < n", "(m::hypreal) <= n", "(m::hypreal) = n"]  | 
|
28  | 
Fast_Arith.lin_arith_prover;  | 
|
29  | 
||
| 10751 | 30  | 
val hypreal_arith_setup =  | 
| 18708 | 31  | 
  Fast_Arith.map_data (fn {add_mono_thms, mult_mono_thms, inj_thms, lessD, neqE, simpset} =>
 | 
| 14369 | 32  | 
   {add_mono_thms = add_mono_thms,
 | 
| 15184 | 33  | 
mult_mono_thms = mult_mono_thms,  | 
| 14369 | 34  | 
inj_thms = inj_thms @ real_inj_thms,  | 
| 14352 | 35  | 
lessD = lessD, (*Can't change LA_Data_Ref.lessD: the hypreals are dense!*)  | 
| 15923 | 36  | 
neqE = neqE,  | 
| 18708 | 37  | 
simpset = simpset}) #>  | 
38  | 
  arith_inj_const ("StarDef.star_of", HOLogic.realT --> hyprealT) #>
 | 
|
39  | 
(fn thy => (change_simpset_of thy (fn ss => ss addsimprocs [fast_hypreal_arith_simproc]); thy));  | 
|
| 10751 | 40  | 
|
41  | 
end;  | 
|
42  | 
||
| 14352 | 43  | 
|
44  |