agriesma@308
|
1 |
(* tools for arithmetic
|
wneuper@378
|
2 |
author: Walther Neuper 010308
|
agriesma@308
|
3 |
|
wneuper@378
|
4 |
remove_thy"Atools";
|
wneuper@379
|
5 |
use_thy"IsacKnowledge/Atools";
|
wneuper@641
|
6 |
use_thy"IsacKnowledge/Isac";
|
agriesma@308
|
7 |
|
wneuper@378
|
8 |
use_thy_only"IsacKnowledge/Atools";
|
wneuper@379
|
9 |
use_thy"IsacKnowledge/Isac";
|
agriesma@308
|
10 |
*)
|
agriesma@308
|
11 |
|
agriesma@308
|
12 |
|
wneuper@378
|
13 |
Atools = ComplexI + Descript +
|
agriesma@308
|
14 |
|
agriesma@308
|
15 |
(*-------------------- consts------------------------------------------------*)
|
agriesma@308
|
16 |
consts
|
agriesma@308
|
17 |
|
agriesma@308
|
18 |
Arbfix, Undef :: real
|
agriesma@308
|
19 |
dummy :: real
|
agriesma@308
|
20 |
|
wneuper@662
|
21 |
some'_occur'_in :: "[real list, 'a] => bool" ("some'_of _ occur'_in _")
|
wneuper@662
|
22 |
occurs'_in :: "[real , 'a] => bool" ("_ occurs'_in _")
|
agriesma@308
|
23 |
|
agriesma@308
|
24 |
"pow" :: [real, real] => real (infixr "^^^" 80)
|
agriesma@308
|
25 |
(* ~~~ power doesn't allow Free("2",real) ^ Free("2",nat)
|
agriesma@308
|
26 |
~~~~ ~~~~ ~~~~ ~~~*)
|
wneuper@529
|
27 |
(*WN0603 at FE-interface encoded strings to '^',
|
wneuper@529
|
28 |
see 'fun encode', fun 'decode'*)
|
wneuper@529
|
29 |
|
agriesma@308
|
30 |
"abs" :: real => real ("(|| _ ||)")
|
agriesma@308
|
31 |
(* ~~~ FIXXXME Isabelle2002 has abs already !!!*)
|
agriesma@308
|
32 |
"absset":: real set => real ("(||| _ |||)")
|
agriesma@308
|
33 |
(*is numeral constant ?*)
|
agriesma@308
|
34 |
"is'_const" :: real => bool ("_ is'_const" 10)
|
wneuper@378
|
35 |
(*is_const rename to is_num FIXXXME.WN.16.5.03 *)
|
agriesma@308
|
36 |
"is'_atom" :: real => bool ("_ is'_atom" 10)
|
agriesma@308
|
37 |
"is'_even" :: real => bool ("_ is'_even" 10)
|
wneuper@378
|
38 |
|
agriesma@308
|
39 |
(* identity on term level*)
|
agriesma@308
|
40 |
"ident" :: ['a, 'a] => bool ("(_ =!=/ _)" [51, 51] 50)
|
agriesma@308
|
41 |
|
wneuper@379
|
42 |
"argument'_in" :: real => real ("argument'_in _" 10)
|
wneuper@641
|
43 |
"sameFunId" :: [real, bool] => bool (**"same'_funid _ _" 10
|
wneuper@641
|
44 |
WN0609 changed the id, because ".. _ _" inhibits currying**)
|
agriesma@308
|
45 |
|
wneuper@641
|
46 |
(*-------------------- rules -------------------------------------*)
|
agriesma@308
|
47 |
rules (*for evaluating the assumptions of conditional rules*)
|
agriesma@308
|
48 |
|
wneuper@667
|
49 |
last_thmI "lastI (x#xs) = (if xs =!= [] then x else lastI xs)"
|
agriesma@308
|
50 |
real_unari_minus "- a = (-1) * a"
|
agriesma@308
|
51 |
|
agriesma@308
|
52 |
rle_refl "(n::real) <= n"
|
agriesma@308
|
53 |
(*reflI "(t = t) = True"*)
|
agriesma@308
|
54 |
radd_left_cancel_le "((k::real) + m <= k + n) = (m <= n)"
|
agriesma@308
|
55 |
not_true "(~ True) = False"
|
agriesma@308
|
56 |
not_false "(~ False) = True"
|
agriesma@308
|
57 |
and_true "(a & True) = a"
|
agriesma@308
|
58 |
and_false "(a & False) = False"
|
agriesma@308
|
59 |
or_true "(a | True) = True"
|
agriesma@308
|
60 |
or_false "(a | False) = a"
|
agriesma@308
|
61 |
and_commute "(a & b) = (b & a)"
|
agriesma@308
|
62 |
or_commute "(a | b) = (b | a)"
|
agriesma@308
|
63 |
|
wneuper@378
|
64 |
(*.should be in Rational.thy, but:
|
wneuper@378
|
65 |
needed for asms in e.g. d2_pqformula1 in PolyEq.ML, RootEq.ML.*)
|
wneuper@378
|
66 |
rat_leq1 "[| b ~= 0; d ~= 0 |] ==> \
|
wneuper@378
|
67 |
\((a / b) <= (c / d)) = ((a*d) <= (b*c))"(*Isa?*)
|
wneuper@378
|
68 |
rat_leq2 "d ~= 0 ==> \
|
wneuper@378
|
69 |
\( a <= (c / d)) = ((a*d) <= c )"(*Isa?*)
|
wneuper@378
|
70 |
rat_leq3 "b ~= 0 ==> \
|
wneuper@378
|
71 |
\((a / b) <= c ) = ( a <= (b*c))"(*Isa?*)
|
wneuper@378
|
72 |
|
agriesma@308
|
73 |
end
|