| author | wenzelm | 
| Sat, 11 Jun 2005 22:15:51 +0200 | |
| changeset 16366 | 6ff17d08c3d5 | 
| parent 15923 | 01d5d0c1c078 | 
| child 17318 | bc1c75855f3d | 
| 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: 
14370diff
changeset | 22 | val hyprealT = Type("Rational.hypreal", []);
 | 
| 
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
 paulson parents: 
14370diff
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 = | 
| 15923 | 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, | 
| 14387 
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
 paulson parents: 
14370diff
changeset | 37 | simpset = simpset}), | 
| 
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
 paulson parents: 
14370diff
changeset | 38 |   arith_inj_const ("HyperDef.hypreal_of_real", HOLogic.realT --> hyprealT),
 | 
| 14352 | 39 | Simplifier.change_simpset_of (op addsimprocs) [fast_hypreal_arith_simproc]]; | 
| 10751 | 40 | |
| 41 | end; | |
| 42 | ||
| 14352 | 43 | |
| 44 |