| author | huffman | 
| Tue, 13 Jan 2009 14:08:24 -0800 | |
| changeset 29479 | be8a15ffc511 | 
| parent 28952 | 15a4b2cf8c34 | 
| child 31066 | 972c870da225 | 
| permissions | -rw-r--r-- | 
| 5545 | 1 | (* Title: HOL/ex/BinEx.thy | 
| 2 | Author: Lawrence C Paulson, Cambridge University Computer Laboratory | |
| 3 | Copyright 1998 University of Cambridge | |
| 4 | *) | |
| 5 | ||
| 11024 | 6 | header {* Binary arithmetic examples *}
 | 
| 7 | ||
| 28952 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 8 | theory BinEx | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 9 | imports Complex_Main | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 10 | begin | 
| 11024 | 11 | |
| 14113 | 12 | subsection {* Regression Testing for Cancellation Simprocs *}
 | 
| 13 | ||
| 14 | lemma "l + 2 + 2 + 2 + (l + 2) + (oo + 2) = (uu::int)" | |
| 15 | apply simp oops | |
| 16 | ||
| 17 | lemma "2*u = (u::int)" | |
| 18 | apply simp oops | |
| 19 | ||
| 20 | lemma "(i + j + 12 + (k::int)) - 15 = y" | |
| 21 | apply simp oops | |
| 22 | ||
| 23 | lemma "(i + j + 12 + (k::int)) - 5 = y" | |
| 24 | apply simp oops | |
| 25 | ||
| 26 | lemma "y - b < (b::int)" | |
| 27 | apply simp oops | |
| 28 | ||
| 29 | lemma "y - (3*b + c) < (b::int) - 2*c" | |
| 30 | apply simp oops | |
| 31 | ||
| 32 | lemma "(2*x - (u*v) + y) - v*3*u = (w::int)" | |
| 33 | apply simp oops | |
| 34 | ||
| 35 | lemma "(2*x*u*v + (u*v)*4 + y) - v*u*4 = (w::int)" | |
| 36 | apply simp oops | |
| 37 | ||
| 38 | lemma "(2*x*u*v + (u*v)*4 + y) - v*u = (w::int)" | |
| 39 | apply simp oops | |
| 40 | ||
| 41 | lemma "u*v - (x*u*v + (u*v)*4 + y) = (w::int)" | |
| 42 | apply simp oops | |
| 43 | ||
| 44 | lemma "(i + j + 12 + (k::int)) = u + 15 + y" | |
| 45 | apply simp oops | |
| 46 | ||
| 47 | lemma "(i + j*2 + 12 + (k::int)) = j + 5 + y" | |
| 48 | apply simp oops | |
| 49 | ||
| 50 | lemma "2*y + 3*z + 6*w + 2*y + 3*z + 2*u = 2*y' + 3*z' + 6*w' + 2*y' + 3*z' + u + (vv::int)" | |
| 51 | apply simp oops | |
| 52 | ||
| 53 | lemma "a + -(b+c) + b = (d::int)" | |
| 54 | apply simp oops | |
| 55 | ||
| 56 | lemma "a + -(b+c) - b = (d::int)" | |
| 57 | apply simp oops | |
| 58 | ||
| 59 | (*negative numerals*) | |
| 60 | lemma "(i + j + -2 + (k::int)) - (u + 5 + y) = zz" | |
| 61 | apply simp oops | |
| 62 | ||
| 63 | lemma "(i + j + -3 + (k::int)) < u + 5 + y" | |
| 64 | apply simp oops | |
| 65 | ||
| 66 | lemma "(i + j + 3 + (k::int)) < u + -6 + y" | |
| 67 | apply simp oops | |
| 68 | ||
| 69 | lemma "(i + j + -12 + (k::int)) - 15 = y" | |
| 70 | apply simp oops | |
| 71 | ||
| 72 | lemma "(i + j + 12 + (k::int)) - -15 = y" | |
| 73 | apply simp oops | |
| 74 | ||
| 75 | lemma "(i + j + -12 + (k::int)) - -15 = y" | |
| 76 | apply simp oops | |
| 77 | ||
| 14124 | 78 | lemma "- (2*i) + 3 + (2*i + 4) = (0::int)" | 
| 79 | apply simp oops | |
| 80 | ||
| 81 | ||
| 14113 | 82 | |
| 83 | subsection {* Arithmetic Method Tests *}
 | |
| 84 | ||
| 85 | ||
| 86 | lemma "!!a::int. [| a <= b; c <= d; x+y<z |] ==> a+c <= b+d" | |
| 87 | by arith | |
| 88 | ||
| 89 | lemma "!!a::int. [| a < b; c < d |] ==> a-d+ 2 <= b+(-c)" | |
| 90 | by arith | |
| 91 | ||
| 92 | lemma "!!a::int. [| a < b; c < d |] ==> a+c+ 1 < b+d" | |
| 93 | by arith | |
| 94 | ||
| 95 | lemma "!!a::int. [| a <= b; b+b <= c |] ==> a+a <= c" | |
| 96 | by arith | |
| 97 | ||
| 98 | lemma "!!a::int. [| a+b <= i+j; a<=b; i<=j |] ==> a+a <= j+j" | |
| 99 | by arith | |
| 100 | ||
| 101 | lemma "!!a::int. [| a+b < i+j; a<b; i<j |] ==> a+a - - -1 < j+j - 3" | |
| 102 | by arith | |
| 103 | ||
| 104 | lemma "!!a::int. a+b+c <= i+j+k & a<=b & b<=c & i<=j & j<=k --> a+a+a <= k+k+k" | |
| 105 | by arith | |
| 106 | ||
| 107 | lemma "!!a::int. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] | |
| 108 | ==> a <= l" | |
| 109 | by arith | |
| 110 | ||
| 111 | lemma "!!a::int. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] | |
| 112 | ==> a+a+a+a <= l+l+l+l" | |
| 113 | by arith | |
| 114 | ||
| 115 | lemma "!!a::int. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] | |
| 116 | ==> a+a+a+a+a <= l+l+l+l+i" | |
| 117 | by arith | |
| 118 | ||
| 119 | lemma "!!a::int. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] | |
| 120 | ==> a+a+a+a+a+a <= l+l+l+l+i+l" | |
| 121 | by arith | |
| 122 | ||
| 123 | lemma "!!a::int. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] | |
| 124 | ==> 6*a <= 5*l+i" | |
| 125 | by arith | |
| 126 | ||
| 127 | ||
| 128 | ||
| 11024 | 129 | subsection {* The Integers *}
 | 
| 130 | ||
| 131 | text {* Addition *}
 | |
| 132 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 133 | lemma "(13::int) + 19 = 32" | 
| 11024 | 134 | by simp | 
| 135 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 136 | lemma "(1234::int) + 5678 = 6912" | 
| 11024 | 137 | by simp | 
| 138 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 139 | lemma "(1359::int) + -2468 = -1109" | 
| 11024 | 140 | by simp | 
| 141 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 142 | lemma "(93746::int) + -46375 = 47371" | 
| 11024 | 143 | by simp | 
| 144 | ||
| 145 | ||
| 146 | text {* \medskip Negation *}
 | |
| 147 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 148 | lemma "- (65745::int) = -65745" | 
| 11024 | 149 | by simp | 
| 150 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 151 | lemma "- (-54321::int) = 54321" | 
| 11024 | 152 | by simp | 
| 153 | ||
| 154 | ||
| 155 | text {* \medskip Multiplication *}
 | |
| 156 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 157 | lemma "(13::int) * 19 = 247" | 
| 11024 | 158 | by simp | 
| 159 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 160 | lemma "(-84::int) * 51 = -4284" | 
| 11024 | 161 | by simp | 
| 162 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 163 | lemma "(255::int) * 255 = 65025" | 
| 11024 | 164 | by simp | 
| 165 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 166 | lemma "(1359::int) * -2468 = -3354012" | 
| 11024 | 167 | by simp | 
| 168 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 169 | lemma "(89::int) * 10 \<noteq> 889" | 
| 11024 | 170 | by simp | 
| 171 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 172 | lemma "(13::int) < 18 - 4" | 
| 11024 | 173 | by simp | 
| 174 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 175 | lemma "(-345::int) < -242 + -100" | 
| 11024 | 176 | by simp | 
| 177 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 178 | lemma "(13557456::int) < 18678654" | 
| 11024 | 179 | by simp | 
| 180 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 181 | lemma "(999999::int) \<le> (1000001 + 1) - 2" | 
| 11024 | 182 | by simp | 
| 183 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 184 | lemma "(1234567::int) \<le> 1234567" | 
| 11024 | 185 | by simp | 
| 186 | ||
| 15965 
f422f8283491
Use of IntInf.int instead of int in most numeric simprocs; avoids
 paulson parents: 
15013diff
changeset | 187 | text{*No integer overflow!*}
 | 
| 
f422f8283491
Use of IntInf.int instead of int in most numeric simprocs; avoids
 paulson parents: 
15013diff
changeset | 188 | lemma "1234567 * (1234567::int) < 1234567*1234567*1234567" | 
| 
f422f8283491
Use of IntInf.int instead of int in most numeric simprocs; avoids
 paulson parents: 
15013diff
changeset | 189 | by simp | 
| 
f422f8283491
Use of IntInf.int instead of int in most numeric simprocs; avoids
 paulson parents: 
15013diff
changeset | 190 | |
| 11024 | 191 | |
| 192 | text {* \medskip Quotient and Remainder *}
 | |
| 193 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 194 | lemma "(10::int) div 3 = 3" | 
| 11024 | 195 | by simp | 
| 196 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 197 | lemma "(10::int) mod 3 = 1" | 
| 11024 | 198 | by simp | 
| 199 | ||
| 200 | text {* A negative divisor *}
 | |
| 201 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 202 | lemma "(10::int) div -3 = -4" | 
| 11024 | 203 | by simp | 
| 204 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 205 | lemma "(10::int) mod -3 = -2" | 
| 11024 | 206 | by simp | 
| 5545 | 207 | |
| 11024 | 208 | text {*
 | 
| 209 |   A negative dividend\footnote{The definition agrees with mathematical
 | |
| 15965 
f422f8283491
Use of IntInf.int instead of int in most numeric simprocs; avoids
 paulson parents: 
15013diff
changeset | 210 | convention and with ML, but not with the hardware of most computers} | 
| 11024 | 211 | *} | 
| 212 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 213 | lemma "(-10::int) div 3 = -4" | 
| 11024 | 214 | by simp | 
| 215 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 216 | lemma "(-10::int) mod 3 = 2" | 
| 11024 | 217 | by simp | 
| 218 | ||
| 219 | text {* A negative dividend \emph{and} divisor *}
 | |
| 220 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 221 | lemma "(-10::int) div -3 = 3" | 
| 11024 | 222 | by simp | 
| 223 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 224 | lemma "(-10::int) mod -3 = -1" | 
| 11024 | 225 | by simp | 
| 226 | ||
| 227 | text {* A few bigger examples *}
 | |
| 228 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 229 | lemma "(8452::int) mod 3 = 1" | 
| 11024 | 230 | by simp | 
| 231 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 232 | lemma "(59485::int) div 434 = 137" | 
| 11024 | 233 | by simp | 
| 234 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 235 | lemma "(1000006::int) mod 10 = 6" | 
| 11024 | 236 | by simp | 
| 237 | ||
| 238 | ||
| 239 | text {* \medskip Division by shifting *}
 | |
| 240 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 241 | lemma "10000000 div 2 = (5000000::int)" | 
| 11024 | 242 | by simp | 
| 243 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 244 | lemma "10000001 mod 2 = (1::int)" | 
| 11024 | 245 | by simp | 
| 246 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 247 | lemma "10000055 div 32 = (312501::int)" | 
| 11024 | 248 | by simp | 
| 249 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 250 | lemma "10000055 mod 32 = (23::int)" | 
| 11024 | 251 | by simp | 
| 252 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 253 | lemma "100094 div 144 = (695::int)" | 
| 11024 | 254 | by simp | 
| 255 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 256 | lemma "100094 mod 144 = (14::int)" | 
| 11024 | 257 | by simp | 
| 258 | ||
| 259 | ||
| 12613 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 260 | text {* \medskip Powers *}
 | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 261 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 262 | lemma "2 ^ 10 = (1024::int)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 263 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 264 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 265 | lemma "-3 ^ 7 = (-2187::int)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 266 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 267 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 268 | lemma "13 ^ 7 = (62748517::int)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 269 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 270 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 271 | lemma "3 ^ 15 = (14348907::int)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 272 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 273 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 274 | lemma "-5 ^ 11 = (-48828125::int)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 275 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 276 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 277 | |
| 11024 | 278 | subsection {* The Natural Numbers *}
 | 
| 279 | ||
| 280 | text {* Successor *}
 | |
| 281 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 282 | lemma "Suc 99999 = 100000" | 
| 11024 | 283 | by (simp add: Suc_nat_number_of) | 
| 20807 | 284 |     -- {* not a default rewrite since sometimes we want to have @{text "Suc nnn"} *}
 | 
| 11024 | 285 | |
| 286 | ||
| 287 | text {* \medskip Addition *}
 | |
| 288 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 289 | lemma "(13::nat) + 19 = 32" | 
| 11024 | 290 | by simp | 
| 291 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 292 | lemma "(1234::nat) + 5678 = 6912" | 
| 11024 | 293 | by simp | 
| 294 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 295 | lemma "(973646::nat) + 6475 = 980121" | 
| 11024 | 296 | by simp | 
| 297 | ||
| 298 | ||
| 299 | text {* \medskip Subtraction *}
 | |
| 300 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 301 | lemma "(32::nat) - 14 = 18" | 
| 11024 | 302 | by simp | 
| 303 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 304 | lemma "(14::nat) - 15 = 0" | 
| 11024 | 305 | by simp | 
| 5545 | 306 | |
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 307 | lemma "(14::nat) - 1576644 = 0" | 
| 11024 | 308 | by simp | 
| 309 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 310 | lemma "(48273776::nat) - 3873737 = 44400039" | 
| 11024 | 311 | by simp | 
| 312 | ||
| 313 | ||
| 314 | text {* \medskip Multiplication *}
 | |
| 315 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 316 | lemma "(12::nat) * 11 = 132" | 
| 11024 | 317 | by simp | 
| 318 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 319 | lemma "(647::nat) * 3643 = 2357021" | 
| 11024 | 320 | by simp | 
| 321 | ||
| 322 | ||
| 323 | text {* \medskip Quotient and Remainder *}
 | |
| 324 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 325 | lemma "(10::nat) div 3 = 3" | 
| 11024 | 326 | by simp | 
| 327 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 328 | lemma "(10::nat) mod 3 = 1" | 
| 11024 | 329 | by simp | 
| 330 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 331 | lemma "(10000::nat) div 9 = 1111" | 
| 11024 | 332 | by simp | 
| 333 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 334 | lemma "(10000::nat) mod 9 = 1" | 
| 11024 | 335 | by simp | 
| 336 | ||
| 11704 
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
 wenzelm parents: 
11701diff
changeset | 337 | lemma "(10000::nat) div 16 = 625" | 
| 11024 | 338 | by simp | 
| 339 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 340 | lemma "(10000::nat) mod 16 = 0" | 
| 11024 | 341 | by simp | 
| 342 | ||
| 5545 | 343 | |
| 12613 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 344 | text {* \medskip Powers *}
 | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 345 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 346 | lemma "2 ^ 12 = (4096::nat)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 347 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 348 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 349 | lemma "3 ^ 10 = (59049::nat)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 350 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 351 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 352 | lemma "12 ^ 7 = (35831808::nat)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 353 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 354 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 355 | lemma "3 ^ 14 = (4782969::nat)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 356 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 357 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 358 | lemma "5 ^ 11 = (48828125::nat)" | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 359 | by simp | 
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 360 | |
| 
279facb4253a
Literal arithmetic: raising numbers to powers (nat, int, real, hypreal)
 paulson parents: 
11868diff
changeset | 361 | |
| 11024 | 362 | text {* \medskip Testing the cancellation of complementary terms *}
 | 
| 363 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 364 | lemma "y + (x + -x) = (0::int) + y" | 
| 11024 | 365 | by simp | 
| 366 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 367 | lemma "y + (-x + (- y + x)) = (0::int)" | 
| 11024 | 368 | by simp | 
| 369 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 370 | lemma "-x + (y + (- y + x)) = (0::int)" | 
| 11024 | 371 | by simp | 
| 372 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 373 | lemma "x + (x + (- x + (- x + (- y + - z)))) = (0::int) - y - z" | 
| 11024 | 374 | by simp | 
| 375 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 376 | lemma "x + x - x - x - y - z = (0::int) - y - z" | 
| 11024 | 377 | by simp | 
| 378 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 379 | lemma "x + y + z - (x + z) = y - (0::int)" | 
| 11024 | 380 | by simp | 
| 381 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 382 | lemma "x + (y + (y + (y + (-x + -x)))) = (0::int) + y - x + y + y" | 
| 11024 | 383 | by simp | 
| 384 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 385 | lemma "x + (y + (y + (y + (-y + -x)))) = y + (0::int) + y" | 
| 11024 | 386 | by simp | 
| 387 | ||
| 11868 
56db9f3a6b3e
Numerals now work for the integers: the binary numerals for 0 and 1 rewrite
 paulson parents: 
11704diff
changeset | 388 | lemma "x + y - x + z - x - y - z + x < (1::int)" | 
| 11024 | 389 | by simp | 
| 390 | ||
| 28952 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 391 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 392 | subsection{*Real Arithmetic*}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 393 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 394 | subsubsection {*Addition *}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 395 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 396 | lemma "(1359::real) + -2468 = -1109" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 397 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 398 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 399 | lemma "(93746::real) + -46375 = 47371" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 400 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 401 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 402 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 403 | subsubsection {*Negation *}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 404 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 405 | lemma "- (65745::real) = -65745" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 406 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 407 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 408 | lemma "- (-54321::real) = 54321" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 409 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 410 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 411 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 412 | subsubsection {*Multiplication *}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 413 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 414 | lemma "(-84::real) * 51 = -4284" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 415 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 416 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 417 | lemma "(255::real) * 255 = 65025" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 418 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 419 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 420 | lemma "(1359::real) * -2468 = -3354012" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 421 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 422 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 423 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 424 | subsubsection {*Inequalities *}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 425 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 426 | lemma "(89::real) * 10 \<noteq> 889" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 427 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 428 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 429 | lemma "(13::real) < 18 - 4" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 430 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 431 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 432 | lemma "(-345::real) < -242 + -100" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 433 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 434 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 435 | lemma "(13557456::real) < 18678654" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 436 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 437 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 438 | lemma "(999999::real) \<le> (1000001 + 1) - 2" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 439 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 440 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 441 | lemma "(1234567::real) \<le> 1234567" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 442 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 443 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 444 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 445 | subsubsection {*Powers *}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 446 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 447 | lemma "2 ^ 15 = (32768::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 448 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 449 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 450 | lemma "-3 ^ 7 = (-2187::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 451 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 452 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 453 | lemma "13 ^ 7 = (62748517::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 454 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 455 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 456 | lemma "3 ^ 15 = (14348907::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 457 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 458 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 459 | lemma "-5 ^ 11 = (-48828125::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 460 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 461 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 462 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 463 | subsubsection {*Tests *}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 464 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 465 | lemma "(x + y = x) = (y = (0::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 466 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 467 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 468 | lemma "(x + y = y) = (x = (0::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 469 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 470 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 471 | lemma "(x + y = (0::real)) = (x = -y)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 472 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 473 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 474 | lemma "(x + y = (0::real)) = (y = -x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 475 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 476 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 477 | lemma "((x + y) < (x + z)) = (y < (z::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 478 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 479 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 480 | lemma "((x + z) < (y + z)) = (x < (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 481 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 482 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 483 | lemma "(\<not> x < y) = (y \<le> (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 484 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 485 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 486 | lemma "\<not> (x < y \<and> y < (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 487 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 488 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 489 | lemma "(x::real) < y ==> \<not> y < x" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 490 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 491 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 492 | lemma "((x::real) \<noteq> y) = (x < y \<or> y < x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 493 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 494 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 495 | lemma "(\<not> x \<le> y) = (y < (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 496 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 497 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 498 | lemma "x \<le> y \<or> y \<le> (x::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 499 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 500 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 501 | lemma "x \<le> y \<or> y < (x::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 502 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 503 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 504 | lemma "x < y \<or> y \<le> (x::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 505 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 506 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 507 | lemma "x \<le> (x::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 508 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 509 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 510 | lemma "((x::real) \<le> y) = (x < y \<or> x = y)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 511 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 512 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 513 | lemma "((x::real) \<le> y \<and> y \<le> x) = (x = y)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 514 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 515 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 516 | lemma "\<not>(x < y \<and> y \<le> (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 517 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 518 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 519 | lemma "\<not>(x \<le> y \<and> y < (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 520 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 521 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 522 | lemma "(-x < (0::real)) = (0 < x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 523 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 524 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 525 | lemma "((0::real) < -x) = (x < 0)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 526 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 527 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 528 | lemma "(-x \<le> (0::real)) = (0 \<le> x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 529 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 530 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 531 | lemma "((0::real) \<le> -x) = (x \<le> 0)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 532 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 533 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 534 | lemma "(x::real) = y \<or> x < y \<or> y < x" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 535 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 536 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 537 | lemma "(x::real) = 0 \<or> 0 < x \<or> 0 < -x" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 538 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 539 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 540 | lemma "(0::real) \<le> x \<or> 0 \<le> -x" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 541 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 542 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 543 | lemma "((x::real) + y \<le> x + z) = (y \<le> z)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 544 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 545 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 546 | lemma "((x::real) + z \<le> y + z) = (x \<le> y)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 547 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 548 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 549 | lemma "(w::real) < x \<and> y < z ==> w + y < x + z" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 550 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 551 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 552 | lemma "(w::real) \<le> x \<and> y \<le> z ==> w + y \<le> x + z" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 553 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 554 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 555 | lemma "(0::real) \<le> x \<and> 0 \<le> y ==> 0 \<le> x + y" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 556 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 557 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 558 | lemma "(0::real) < x \<and> 0 < y ==> 0 < x + y" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 559 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 560 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 561 | lemma "(-x < y) = (0 < x + (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 562 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 563 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 564 | lemma "(x < -y) = (x + y < (0::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 565 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 566 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 567 | lemma "(y < x + -z) = (y + z < (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 568 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 569 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 570 | lemma "(x + -y < z) = (x < z + (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 571 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 572 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 573 | lemma "x \<le> y ==> x < y + (1::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 574 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 575 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 576 | lemma "(x - y) + y = (x::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 577 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 578 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 579 | lemma "y + (x - y) = (x::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 580 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 581 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 582 | lemma "x - x = (0::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 583 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 584 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 585 | lemma "(x - y = 0) = (x = (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 586 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 587 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 588 | lemma "((0::real) \<le> x + x) = (0 \<le> x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 589 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 590 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 591 | lemma "(-x \<le> x) = ((0::real) \<le> x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 592 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 593 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 594 | lemma "(x \<le> -x) = (x \<le> (0::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 595 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 596 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 597 | lemma "(-x = (0::real)) = (x = 0)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 598 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 599 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 600 | lemma "-(x - y) = y - (x::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 601 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 602 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 603 | lemma "((0::real) < x - y) = (y < x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 604 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 605 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 606 | lemma "((0::real) \<le> x - y) = (y \<le> x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 607 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 608 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 609 | lemma "(x + y) - x = (y::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 610 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 611 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 612 | lemma "(-x = y) = (x = (-y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 613 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 614 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 615 | lemma "x < (y::real) ==> \<not>(x = y)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 616 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 617 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 618 | lemma "(x \<le> x + y) = ((0::real) \<le> y)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 619 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 620 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 621 | lemma "(y \<le> x + y) = ((0::real) \<le> x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 622 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 623 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 624 | lemma "(x < x + y) = ((0::real) < y)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 625 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 626 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 627 | lemma "(y < x + y) = ((0::real) < x)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 628 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 629 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 630 | lemma "(x - y) - x = (-y::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 631 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 632 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 633 | lemma "(x + y < z) = (x < z - (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 634 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 635 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 636 | lemma "(x - y < z) = (x < z + (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 637 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 638 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 639 | lemma "(x < y - z) = (x + z < (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 640 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 641 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 642 | lemma "(x \<le> y - z) = (x + z \<le> (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 643 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 644 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 645 | lemma "(x - y \<le> z) = (x \<le> z + (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 646 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 647 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 648 | lemma "(-x < -y) = (y < (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 649 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 650 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 651 | lemma "(-x \<le> -y) = (y \<le> (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 652 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 653 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 654 | lemma "(a + b) - (c + d) = (a - c) + (b - (d::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 655 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 656 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 657 | lemma "(0::real) - x = -x" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 658 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 659 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 660 | lemma "x - (0::real) = x" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 661 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 662 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 663 | lemma "w \<le> x \<and> y < z ==> w + y < x + (z::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 664 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 665 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 666 | lemma "w < x \<and> y \<le> z ==> w + y < x + (z::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 667 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 668 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 669 | lemma "(0::real) \<le> x \<and> 0 < y ==> 0 < x + (y::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 670 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 671 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 672 | lemma "(0::real) < x \<and> 0 \<le> y ==> 0 < x + y" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 673 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 674 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 675 | lemma "-x - y = -(x + (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 676 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 677 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 678 | lemma "x - (-y) = x + (y::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 679 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 680 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 681 | lemma "-x - -y = y - (x::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 682 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 683 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 684 | lemma "(a - b) + (b - c) = a - (c::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 685 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 686 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 687 | lemma "(x = y - z) = (x + z = (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 688 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 689 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 690 | lemma "(x - y = z) = (x = z + (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 691 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 692 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 693 | lemma "x - (x - y) = (y::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 694 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 695 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 696 | lemma "x - (x + y) = -(y::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 697 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 698 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 699 | lemma "x = y ==> x \<le> (y::real)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 700 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 701 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 702 | lemma "(0::real) < x ==> \<not>(x = 0)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 703 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 704 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 705 | lemma "(x + y) * (x - y) = (x * x) - (y * y)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 706 | oops | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 707 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 708 | lemma "(-x = -y) = (x = (y::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 709 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 710 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 711 | lemma "(-x < -y) = (y < (x::real))" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 712 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 713 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 714 | lemma "!!a::real. a \<le> b ==> c \<le> d ==> x + y < z ==> a + c \<le> b + d" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 715 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 716 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 717 | lemma "!!a::real. a < b ==> c < d ==> a - d \<le> b + (-c)" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 718 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 719 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 720 | lemma "!!a::real. a \<le> b ==> b + b \<le> c ==> a + a \<le> c" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 721 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 722 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 723 | lemma "!!a::real. a + b \<le> i + j ==> a \<le> b ==> i \<le> j ==> a + a \<le> j + j" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 724 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 725 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 726 | lemma "!!a::real. a + b < i + j ==> a < b ==> i < j ==> a + a < j + j" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 727 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 728 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 729 | lemma "!!a::real. a + b + c \<le> i + j + k \<and> a \<le> b \<and> b \<le> c \<and> i \<le> j \<and> j \<le> k --> a + a + a \<le> k + k + k" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 730 | by arith | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 731 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 732 | lemma "!!a::real. a + b + c + d \<le> i + j + k + l ==> a \<le> b ==> b \<le> c | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 733 | ==> c \<le> d ==> i \<le> j ==> j \<le> k ==> k \<le> l ==> a \<le> l" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 734 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 735 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 736 | lemma "!!a::real. a + b + c + d \<le> i + j + k + l ==> a \<le> b ==> b \<le> c | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 737 | ==> c \<le> d ==> i \<le> j ==> j \<le> k ==> k \<le> l ==> a + a + a + a \<le> l + l + l + l" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 738 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 739 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 740 | lemma "!!a::real. a + b + c + d \<le> i + j + k + l ==> a \<le> b ==> b \<le> c | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 741 | ==> c \<le> d ==> i \<le> j ==> j \<le> k ==> k \<le> l ==> a + a + a + a + a \<le> l + l + l + l + i" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 742 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 743 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 744 | lemma "!!a::real. a + b + c + d \<le> i + j + k + l ==> a \<le> b ==> b \<le> c | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 745 | ==> c \<le> d ==> i \<le> j ==> j \<le> k ==> k \<le> l ==> a + a + a + a + a + a \<le> l + l + l + l + i + l" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 746 | by (tactic "fast_arith_tac @{context} 1")
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 747 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 748 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 749 | subsection{*Complex Arithmetic*}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 750 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 751 | lemma "(1359 + 93746*ii) - (2468 + 46375*ii) = -1109 + 47371*ii" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 752 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 753 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 754 | lemma "- (65745 + -47371*ii) = -65745 + 47371*ii" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 755 | by simp | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 756 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 757 | text{*Multiplication requires distributive laws.  Perhaps versions instantiated
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 758 | to literal constants should be added to the simpset.*} | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 759 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 760 | lemma "(1 + ii) * (1 - ii) = 2" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 761 | by (simp add: ring_distribs) | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 762 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 763 | lemma "(1 + 2*ii) * (1 + 3*ii) = -5 + 5*ii" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 764 | by (simp add: ring_distribs) | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 765 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 766 | lemma "(-84 + 255*ii) + (51 * 255*ii) = -84 + 13260 * ii" | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 767 | by (simp add: ring_distribs) | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 768 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 769 | text{*No inequalities or linear arithmetic: the complex numbers are unordered!*}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 770 | |
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 771 | text{*No powers (not supported yet)*}
 | 
| 
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
 haftmann parents: 
20807diff
changeset | 772 | |
| 5545 | 773 | end |