| author | paulson |
| Tue, 19 Oct 2004 18:18:45 +0200 | |
| changeset 15251 | bb6f072c8d10 |
| parent 15186 | 1fb9a1fe8d0c |
| child 15923 | 01d5d0c1c078 |
| 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 |
||
| 14369 | 16 |
val real_inj_thms = [hypreal_of_real_le_iff RS iffD2, |
17 |
hypreal_of_real_less_iff RS iffD2, |
|
18 |
hypreal_of_real_eq_iff RS iffD2]; |
|
19 |
||
| 10751 | 20 |
in |
21 |
||
|
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14370
diff
changeset
|
22 |
val hyprealT = Type("Rational.hypreal", []);
|
|
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 = |
31 |
[Fast_Arith.map_data (fn {add_mono_thms, mult_mono_thms, inj_thms, lessD, 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!*) |
|
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14370
diff
changeset
|
36 |
simpset = simpset}), |
|
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14370
diff
changeset
|
37 |
arith_inj_const ("HyperDef.hypreal_of_real", HOLogic.realT --> hyprealT),
|
| 14352 | 38 |
Simplifier.change_simpset_of (op addsimprocs) [fast_hypreal_arith_simproc]]; |
| 10751 | 39 |
|
40 |
end; |
|
41 |
||
| 14352 | 42 |
|
43 |