src/HOL/Real/RealDef.thy
author paulson
Tue Dec 02 11:48:15 2003 +0100 (2003-12-02)
changeset 14270 342451d763f9
parent 14269 502a7c95de73
child 14329 ff3210fe968f
permissions -rw-r--r--
More re-organising of numerical theorems
paulson@5588
     1
(*  Title       : Real/RealDef.thy
paulson@7219
     2
    ID          : $Id$
paulson@5588
     3
    Author      : Jacques D. Fleuriot
paulson@5588
     4
    Copyright   : 1998  University of Cambridge
paulson@5588
     5
    Description : The reals
paulson@14269
     6
*)
paulson@14269
     7
paulson@14269
     8
theory RealDef = PReal:
paulson@5588
     9
paulson@14270
    10
(*MOVE TO THEORY PREAL*)
paulson@14269
    11
instance preal :: order
paulson@14269
    12
proof qed
paulson@14269
    13
 (assumption |
paulson@14269
    14
  rule preal_le_refl preal_le_trans preal_le_anti_sym preal_less_le)+
paulson@10752
    15
paulson@14270
    16
instance preal :: order
paulson@14270
    17
  by (intro_classes,
paulson@14270
    18
      (assumption | 
paulson@14270
    19
       rule preal_le_refl preal_le_trans preal_le_anti_sym preal_less_le)+)
paulson@14270
    20
paulson@14270
    21
lemma preal_le_linear: "x <= y | y <= (x::preal)"
paulson@14270
    22
apply (insert preal_linear [of x y]) 
paulson@14270
    23
apply (auto simp add: order_less_le) 
paulson@14270
    24
done
paulson@14270
    25
paulson@14270
    26
instance preal :: linorder
paulson@14270
    27
  by (intro_classes, rule preal_le_linear)
paulson@14270
    28
paulson@14270
    29
paulson@5588
    30
constdefs
paulson@5588
    31
  realrel   ::  "((preal * preal) * (preal * preal)) set"
paulson@14269
    32
  "realrel == {p. \<exists>x1 y1 x2 y2. p = ((x1,y1),(x2,y2)) & x1+y2 = x2+y1}"
paulson@14269
    33
paulson@14269
    34
typedef (REAL)  real = "UNIV//realrel"
paulson@14269
    35
  by (auto simp add: quotient_def)
paulson@5588
    36
paulson@14269
    37
instance real :: ord ..
paulson@14269
    38
instance real :: zero ..
paulson@14269
    39
instance real :: one ..
paulson@14269
    40
instance real :: plus ..
paulson@14269
    41
instance real :: times ..
paulson@14269
    42
instance real :: minus ..
paulson@14269
    43
instance real :: inverse ..
paulson@14269
    44
paulson@14269
    45
consts
paulson@14269
    46
   (*Overloaded constants denoting the Nat and Real subsets of enclosing
paulson@14269
    47
     types such as hypreal and complex*)
paulson@14269
    48
   Nats  :: "'a set"
paulson@14269
    49
   Reals :: "'a set"
paulson@14269
    50
paulson@14269
    51
   (*overloaded constant for injecting other types into "real"*)
paulson@14269
    52
   real :: "'a => real"
paulson@5588
    53
paulson@5588
    54
paulson@14269
    55
defs (overloaded)
paulson@5588
    56
paulson@14269
    57
  real_zero_def:
paulson@12018
    58
  "0 == Abs_REAL(realrel``{(preal_of_prat(prat_of_pnat 1),
paulson@12018
    59
			    preal_of_prat(prat_of_pnat 1))})"
paulson@12018
    60
paulson@14269
    61
  real_one_def:
paulson@12018
    62
  "1 == Abs_REAL(realrel``
paulson@12018
    63
               {(preal_of_prat(prat_of_pnat 1) + preal_of_prat(prat_of_pnat 1),
paulson@12018
    64
		 preal_of_prat(prat_of_pnat 1))})"
paulson@5588
    65
paulson@14269
    66
  real_minus_def:
paulson@10919
    67
  "- R ==  Abs_REAL(UN (x,y):Rep_REAL(R). realrel``{(y,x)})"
bauerg@10606
    68
paulson@14269
    69
  real_diff_def:
bauerg@10606
    70
  "R - (S::real) == R + - S"
paulson@5588
    71
paulson@14269
    72
  real_inverse_def:
wenzelm@11713
    73
  "inverse (R::real) == (SOME S. (R = 0 & S = 0) | S * R = 1)"
paulson@5588
    74
paulson@14269
    75
  real_divide_def:
bauerg@10606
    76
  "R / (S::real) == R * inverse S"
paulson@14269
    77
paulson@5588
    78
constdefs
paulson@5588
    79
paulson@12018
    80
  (** these don't use the overloaded "real" function: users don't see them **)
paulson@14269
    81
paulson@14269
    82
  real_of_preal :: "preal => real"
paulson@7077
    83
  "real_of_preal m     ==
paulson@12018
    84
           Abs_REAL(realrel``{(m + preal_of_prat(prat_of_pnat 1),
paulson@12018
    85
                               preal_of_prat(prat_of_pnat 1))})"
paulson@5588
    86
paulson@14269
    87
  real_of_posnat :: "nat => real"
paulson@7077
    88
  "real_of_posnat n == real_of_preal(preal_of_prat(prat_of_pnat(pnat_of_nat n)))"
paulson@7077
    89
paulson@5588
    90
paulson@14269
    91
defs (overloaded)
paulson@5588
    92
paulson@14269
    93
  real_of_nat_def:   "real n == real_of_posnat n + (- 1)"
paulson@10919
    94
paulson@14269
    95
  real_add_def:
paulson@10919
    96
  "P+Q == Abs_REAL(UN p1:Rep_REAL(P). UN p2:Rep_REAL(Q).
nipkow@10834
    97
                   (%(x1,y1). (%(x2,y2). realrel``{(x1+x2, y1+y2)}) p2) p1)"
paulson@14269
    98
paulson@14269
    99
  real_mult_def:
paulson@10919
   100
  "P*Q == Abs_REAL(UN p1:Rep_REAL(P). UN p2:Rep_REAL(Q).
nipkow@10834
   101
                   (%(x1,y1). (%(x2,y2). realrel``{(x1*x2+y1*y2,x1*y2+x2*y1)})
paulson@10752
   102
		   p2) p1)"
paulson@5588
   103
paulson@14269
   104
  real_less_def:
paulson@14269
   105
  "P<Q == \<exists>x1 y1 x2 y2. x1 + y2 < x2 + y1 &
paulson@14269
   106
                            (x1,y1):Rep_REAL(P) & (x2,y2):Rep_REAL(Q)"
paulson@14269
   107
  real_le_def:
paulson@14269
   108
  "P \<le> (Q::real) == ~(Q < P)"
paulson@5588
   109
wenzelm@12114
   110
syntax (xsymbols)
paulson@14269
   111
  Reals     :: "'a set"                   ("\<real>")
paulson@14269
   112
  Nats      :: "'a set"                   ("\<nat>")
paulson@14269
   113
paulson@14269
   114
paulson@14269
   115
(*** Proving that realrel is an equivalence relation ***)
paulson@14269
   116
paulson@14270
   117
lemma preal_trans_lemma:
paulson@14270
   118
     "[| (x1::preal) + y2 = x2 + y1; x2 + y3 = x3 + y2 |]
paulson@14269
   119
      ==> x1 + y3 = x3 + y1"
paulson@14269
   120
apply (rule_tac C = y2 in preal_add_right_cancel)
paulson@14269
   121
apply (rotate_tac 1, drule sym)
paulson@14269
   122
apply (simp add: preal_add_ac)
paulson@14269
   123
apply (rule preal_add_left_commute [THEN subst])
paulson@14269
   124
apply (rule_tac x1 = x1 in preal_add_assoc [THEN subst])
paulson@14269
   125
apply (simp add: preal_add_ac)
paulson@14269
   126
done
paulson@14269
   127
paulson@14269
   128
lemma realrel_iff [simp]: "(((x1,y1),(x2,y2)): realrel) = (x1 + y2 = x2 + y1)"
paulson@14269
   129
by (unfold realrel_def, blast)
paulson@14269
   130
paulson@14269
   131
lemma realrel_refl: "(x,x): realrel"
paulson@14269
   132
apply (case_tac "x")
paulson@14269
   133
apply (simp add: realrel_def)
paulson@14269
   134
done
paulson@14269
   135
paulson@14269
   136
lemma equiv_realrel: "equiv UNIV realrel"
paulson@14269
   137
apply (unfold equiv_def refl_def sym_def trans_def realrel_def)
paulson@14269
   138
apply (fast elim!: sym preal_trans_lemma)
paulson@14269
   139
done
paulson@14269
   140
paulson@14269
   141
(* (realrel `` {x} = realrel `` {y}) = ((x,y) : realrel) *)
paulson@14269
   142
lemmas equiv_realrel_iff = 
paulson@14269
   143
       eq_equiv_class_iff [OF equiv_realrel UNIV_I UNIV_I]
paulson@14269
   144
paulson@14269
   145
declare equiv_realrel_iff [simp]
paulson@14269
   146
paulson@14269
   147
lemma realrel_in_real [simp]: "realrel``{(x,y)}: REAL"
paulson@14269
   148
by (unfold REAL_def realrel_def quotient_def, blast)
paulson@14269
   149
paulson@14269
   150
lemma inj_on_Abs_REAL: "inj_on Abs_REAL REAL"
paulson@14269
   151
apply (rule inj_on_inverseI)
paulson@14269
   152
apply (erule Abs_REAL_inverse)
paulson@14269
   153
done
paulson@14269
   154
paulson@14269
   155
declare inj_on_Abs_REAL [THEN inj_on_iff, simp]
paulson@14269
   156
declare Abs_REAL_inverse [simp]
paulson@14269
   157
paulson@14269
   158
paulson@14269
   159
lemmas eq_realrelD = equiv_realrel [THEN [2] eq_equiv_class]
paulson@14269
   160
paulson@14269
   161
lemma inj_Rep_REAL: "inj Rep_REAL"
paulson@14269
   162
apply (rule inj_on_inverseI)
paulson@14269
   163
apply (rule Rep_REAL_inverse)
paulson@14269
   164
done
paulson@14269
   165
paulson@14269
   166
(** real_of_preal: the injection from preal to real **)
paulson@14269
   167
lemma inj_real_of_preal: "inj(real_of_preal)"
paulson@14269
   168
apply (rule inj_onI)
paulson@14269
   169
apply (unfold real_of_preal_def)
paulson@14269
   170
apply (drule inj_on_Abs_REAL [THEN inj_onD])
paulson@14269
   171
apply (rule realrel_in_real)+
paulson@14269
   172
apply (drule eq_equiv_class)
paulson@14269
   173
apply (rule equiv_realrel, blast)
paulson@14269
   174
apply (simp add: realrel_def)
paulson@14269
   175
done
paulson@14269
   176
paulson@14269
   177
lemma eq_Abs_REAL: 
paulson@14269
   178
    "(!!x y. z = Abs_REAL(realrel``{(x,y)}) ==> P) ==> P"
paulson@14269
   179
apply (rule_tac x1 = z in Rep_REAL [unfolded REAL_def, THEN quotientE])
paulson@14269
   180
apply (drule_tac f = Abs_REAL in arg_cong)
paulson@14269
   181
apply (case_tac "x")
paulson@14269
   182
apply (simp add: Rep_REAL_inverse)
paulson@14269
   183
done
paulson@14269
   184
paulson@14269
   185
(**** real_minus: additive inverse on real ****)
paulson@14269
   186
paulson@14269
   187
lemma real_minus_congruent:
paulson@14269
   188
  "congruent realrel (%p. (%(x,y). realrel``{(y,x)}) p)"
paulson@14269
   189
apply (unfold congruent_def, clarify)
paulson@14269
   190
apply (simp add: preal_add_commute)
paulson@14269
   191
done
paulson@14269
   192
paulson@14269
   193
lemma real_minus:
paulson@14269
   194
      "- (Abs_REAL(realrel``{(x,y)})) = Abs_REAL(realrel `` {(y,x)})"
paulson@14269
   195
apply (unfold real_minus_def)
paulson@14269
   196
apply (rule_tac f = Abs_REAL in arg_cong)
paulson@14269
   197
apply (simp add: realrel_in_real [THEN Abs_REAL_inverse] 
paulson@14269
   198
            UN_equiv_class [OF equiv_realrel real_minus_congruent])
paulson@14269
   199
done
paulson@14269
   200
paulson@14269
   201
lemma real_minus_minus: "- (- z) = (z::real)"
paulson@14269
   202
apply (rule_tac z = z in eq_Abs_REAL)
paulson@14269
   203
apply (simp add: real_minus)
paulson@14269
   204
done
paulson@14269
   205
paulson@14269
   206
declare real_minus_minus [simp]
paulson@14269
   207
paulson@14269
   208
lemma inj_real_minus: "inj(%r::real. -r)"
paulson@14269
   209
apply (rule inj_onI)
paulson@14269
   210
apply (drule_tac f = uminus in arg_cong)
paulson@14269
   211
apply (simp add: real_minus_minus)
paulson@14269
   212
done
paulson@14269
   213
paulson@14269
   214
lemma real_minus_zero: "- 0 = (0::real)"
paulson@14269
   215
apply (unfold real_zero_def)
paulson@14269
   216
apply (simp add: real_minus)
paulson@14269
   217
done
paulson@14269
   218
paulson@14269
   219
declare real_minus_zero [simp]
paulson@14269
   220
paulson@14269
   221
lemma real_minus_zero_iff: "(-x = 0) = (x = (0::real))"
paulson@14269
   222
apply (rule_tac z = x in eq_Abs_REAL)
paulson@14269
   223
apply (auto simp add: real_zero_def real_minus preal_add_ac)
paulson@14269
   224
done
paulson@14269
   225
paulson@14269
   226
declare real_minus_zero_iff [simp]
paulson@14269
   227
paulson@14269
   228
(*** Congruence property for addition ***)
paulson@14269
   229
paulson@14269
   230
lemma real_add_congruent2_lemma:
paulson@14269
   231
     "[|a + ba = aa + b; ab + bc = ac + bb|]
paulson@14269
   232
      ==> a + ab + (ba + bc) = aa + ac + (b + (bb::preal))"
paulson@14269
   233
apply (simp add: preal_add_assoc) 
paulson@14269
   234
apply (rule preal_add_left_commute [of ab, THEN ssubst])
paulson@14269
   235
apply (simp add: preal_add_assoc [symmetric])
paulson@14269
   236
apply (simp add: preal_add_ac)
paulson@14269
   237
done
paulson@14269
   238
paulson@14269
   239
lemma real_add:
paulson@14269
   240
  "Abs_REAL(realrel``{(x1,y1)}) + Abs_REAL(realrel``{(x2,y2)}) =
paulson@14269
   241
   Abs_REAL(realrel``{(x1+x2, y1+y2)})"
paulson@14269
   242
apply (simp add: real_add_def UN_UN_split_split_eq)
paulson@14269
   243
apply (subst equiv_realrel [THEN UN_equiv_class2])
paulson@14269
   244
apply (auto simp add: congruent2_def)
paulson@14269
   245
apply (blast intro: real_add_congruent2_lemma) 
paulson@14269
   246
done
paulson@14269
   247
paulson@14269
   248
lemma real_add_commute: "(z::real) + w = w + z"
paulson@14269
   249
apply (rule_tac z = z in eq_Abs_REAL)
paulson@14269
   250
apply (rule_tac z = w in eq_Abs_REAL)
paulson@14269
   251
apply (simp add: preal_add_ac real_add)
paulson@14269
   252
done
paulson@14269
   253
paulson@14269
   254
lemma real_add_assoc: "((z1::real) + z2) + z3 = z1 + (z2 + z3)"
paulson@14269
   255
apply (rule_tac z = z1 in eq_Abs_REAL)
paulson@14269
   256
apply (rule_tac z = z2 in eq_Abs_REAL)
paulson@14269
   257
apply (rule_tac z = z3 in eq_Abs_REAL)
paulson@14269
   258
apply (simp add: real_add preal_add_assoc)
paulson@14269
   259
done
paulson@14269
   260
paulson@14269
   261
(*For AC rewriting*)
paulson@14269
   262
lemma real_add_left_commute: "(x::real)+(y+z)=y+(x+z)"
paulson@14269
   263
  apply (rule mk_left_commute [of "op +"])
paulson@14269
   264
  apply (rule real_add_assoc)
paulson@14269
   265
  apply (rule real_add_commute)
paulson@14269
   266
  done
paulson@14269
   267
paulson@14269
   268
paulson@14269
   269
(* real addition is an AC operator *)
paulson@14269
   270
lemmas real_add_ac = real_add_assoc real_add_commute real_add_left_commute
paulson@14269
   271
paulson@14269
   272
lemma real_add_zero_left: "(0::real) + z = z"
paulson@14269
   273
apply (unfold real_of_preal_def real_zero_def)
paulson@14269
   274
apply (rule_tac z = z in eq_Abs_REAL)
paulson@14269
   275
apply (simp add: real_add preal_add_ac)
paulson@14269
   276
done
paulson@14269
   277
declare real_add_zero_left [simp]
paulson@14269
   278
paulson@14269
   279
lemma real_add_zero_right: "z + (0::real) = z"
paulson@14269
   280
by (simp add: real_add_commute)
paulson@14269
   281
declare real_add_zero_right [simp]
paulson@14269
   282
paulson@14269
   283
instance real :: plus_ac0
paulson@14269
   284
  by (intro_classes,
paulson@14269
   285
      (assumption | 
paulson@14269
   286
       rule real_add_commute real_add_assoc real_add_zero_left)+)
paulson@14269
   287
paulson@14269
   288
paulson@14269
   289
lemma real_add_minus: "z + (-z) = (0::real)"
paulson@14269
   290
apply (unfold real_zero_def)
paulson@14269
   291
apply (rule_tac z = z in eq_Abs_REAL)
paulson@14269
   292
apply (simp add: real_minus real_add preal_add_commute)
paulson@14269
   293
done
paulson@14269
   294
declare real_add_minus [simp]
paulson@14269
   295
paulson@14269
   296
lemma real_add_minus_left: "(-z) + z = (0::real)"
paulson@14269
   297
by (simp add: real_add_commute)
paulson@14269
   298
declare real_add_minus_left [simp]
paulson@14269
   299
paulson@14269
   300
paulson@14269
   301
(*** Congruence property for multiplication ***)
paulson@14269
   302
paulson@14269
   303
lemma real_mult_congruent2_lemma: "!!(x1::preal). [| x1 + y2 = x2 + y1 |] ==>
paulson@14269
   304
          x * x1 + y * y1 + (x * y2 + x2 * y) =
paulson@14269
   305
          x * x2 + y * y2 + (x * y1 + x1 * y)"
paulson@14269
   306
apply (simp add: preal_add_left_commute preal_add_assoc [symmetric] preal_add_mult_distrib2 [symmetric])
paulson@14269
   307
apply (rule preal_mult_commute [THEN subst])
paulson@14269
   308
apply (rule_tac y1 = x2 in preal_mult_commute [THEN subst])
paulson@14269
   309
apply (simp add: preal_add_assoc preal_add_mult_distrib2 [symmetric])
paulson@14269
   310
apply (simp add: preal_add_commute)
paulson@14269
   311
done
paulson@14269
   312
paulson@14269
   313
lemma real_mult_congruent2:
paulson@14269
   314
    "congruent2 realrel (%p1 p2.
paulson@14269
   315
          (%(x1,y1). (%(x2,y2). realrel``{(x1*x2 + y1*y2, x1*y2+x2*y1)}) p2) p1)"
paulson@14269
   316
apply (rule equiv_realrel [THEN congruent2_commuteI], clarify)
paulson@14269
   317
apply (unfold split_def)
paulson@14269
   318
apply (simp add: preal_mult_commute preal_add_commute)
paulson@14269
   319
apply (auto simp add: real_mult_congruent2_lemma)
paulson@14269
   320
done
paulson@14269
   321
paulson@14269
   322
lemma real_mult:
paulson@14269
   323
   "Abs_REAL((realrel``{(x1,y1)})) * Abs_REAL((realrel``{(x2,y2)})) =
paulson@14269
   324
    Abs_REAL(realrel `` {(x1*x2+y1*y2,x1*y2+x2*y1)})"
paulson@14269
   325
apply (unfold real_mult_def)
paulson@14269
   326
apply (simp add: equiv_realrel [THEN UN_equiv_class2] real_mult_congruent2)
paulson@14269
   327
done
paulson@14269
   328
paulson@14269
   329
lemma real_mult_commute: "(z::real) * w = w * z"
paulson@14269
   330
apply (rule_tac z = z in eq_Abs_REAL)
paulson@14269
   331
apply (rule_tac z = w in eq_Abs_REAL)
paulson@14269
   332
apply (simp add: real_mult preal_add_ac preal_mult_ac)
paulson@14269
   333
done
paulson@14269
   334
paulson@14269
   335
lemma real_mult_assoc: "((z1::real) * z2) * z3 = z1 * (z2 * z3)"
paulson@14269
   336
apply (rule_tac z = z1 in eq_Abs_REAL)
paulson@14269
   337
apply (rule_tac z = z2 in eq_Abs_REAL)
paulson@14269
   338
apply (rule_tac z = z3 in eq_Abs_REAL)
paulson@14269
   339
apply (simp add: preal_add_mult_distrib2 real_mult preal_add_ac preal_mult_ac)
paulson@14269
   340
done
paulson@14269
   341
paulson@14269
   342
paulson@14269
   343
(*For AC rewriting*)
paulson@14269
   344
lemma real_mult_left_commute: "(x::real)*(y*z)=y*(x*z)"
paulson@14269
   345
  apply (rule mk_left_commute [of "op *"])
paulson@14269
   346
  apply (rule real_mult_assoc)
paulson@14269
   347
  apply (rule real_mult_commute)
paulson@14269
   348
  done
paulson@14269
   349
paulson@14269
   350
(* real multiplication is an AC operator *)
paulson@14269
   351
lemmas real_mult_ac = real_mult_assoc real_mult_commute real_mult_left_commute
paulson@14269
   352
paulson@14269
   353
lemma real_mult_1: "(1::real) * z = z"
paulson@14269
   354
apply (unfold real_one_def pnat_one_def)
paulson@14269
   355
apply (rule_tac z = z in eq_Abs_REAL)
paulson@14269
   356
apply (simp add: real_mult preal_add_mult_distrib2 preal_mult_1_right preal_mult_ac preal_add_ac)
paulson@14269
   357
done
paulson@14269
   358
paulson@14269
   359
declare real_mult_1 [simp]
paulson@14269
   360
paulson@14269
   361
lemma real_mult_1_right: "z * (1::real) = z"
paulson@14269
   362
by (simp add: real_mult_commute)
paulson@14269
   363
paulson@14269
   364
declare real_mult_1_right [simp]
paulson@14269
   365
paulson@14269
   366
lemma real_mult_0: "0 * z = (0::real)"
paulson@14269
   367
apply (unfold real_zero_def pnat_one_def)
paulson@14269
   368
apply (rule_tac z = z in eq_Abs_REAL)
paulson@14269
   369
apply (simp add: real_mult preal_add_mult_distrib2 preal_mult_1_right preal_mult_ac preal_add_ac)
paulson@14269
   370
done
paulson@14269
   371
paulson@14269
   372
lemma real_mult_0_right: "z * 0 = (0::real)"
paulson@14269
   373
by (simp add: real_mult_commute real_mult_0)
paulson@14269
   374
paulson@14269
   375
declare real_mult_0_right [simp] real_mult_0 [simp]
paulson@14269
   376
paulson@14269
   377
lemma real_mult_minus_eq1: "(-x) * (y::real) = -(x * y)"
paulson@14269
   378
apply (rule_tac z = x in eq_Abs_REAL)
paulson@14269
   379
apply (rule_tac z = y in eq_Abs_REAL)
paulson@14269
   380
apply (auto simp add: real_minus real_mult preal_mult_ac preal_add_ac)
paulson@14269
   381
done
paulson@14269
   382
declare real_mult_minus_eq1 [simp]
paulson@14269
   383
paulson@14269
   384
lemmas real_minus_mult_eq1 = real_mult_minus_eq1 [symmetric, standard]
paulson@14269
   385
paulson@14269
   386
lemma real_mult_minus_eq2: "x * (- y :: real) = -(x * y)"
paulson@14269
   387
by (simp add: real_mult_commute [of x])
paulson@14269
   388
declare real_mult_minus_eq2 [simp]
paulson@14269
   389
paulson@14269
   390
lemmas real_minus_mult_eq2 = real_mult_minus_eq2 [symmetric, standard]
paulson@14269
   391
paulson@14269
   392
lemma real_mult_minus_1: "(- (1::real)) * z = -z"
paulson@14269
   393
by simp
paulson@14269
   394
declare real_mult_minus_1 [simp]
paulson@14269
   395
paulson@14269
   396
lemma real_mult_minus_1_right: "z * (- (1::real)) = -z"
paulson@14269
   397
by (subst real_mult_commute, simp)
paulson@14269
   398
declare real_mult_minus_1_right [simp]
paulson@14269
   399
paulson@14269
   400
lemma real_minus_mult_cancel: "(-x) * (-y) = x * (y::real)"
paulson@14269
   401
by simp
paulson@14269
   402
paulson@14269
   403
declare real_minus_mult_cancel [simp]
paulson@14269
   404
paulson@14269
   405
lemma real_minus_mult_commute: "(-x) * y = x * (- y :: real)"
paulson@14269
   406
by simp
paulson@14269
   407
paulson@14269
   408
(** Lemmas **)
paulson@14269
   409
paulson@14269
   410
lemma real_add_assoc_cong: "(z::real) + v = z' + v' ==> z + (v + w) = z' + (v' + w)"
paulson@14269
   411
by (simp add: real_add_assoc [symmetric])
paulson@14269
   412
paulson@14269
   413
lemma real_add_mult_distrib: "((z1::real) + z2) * w = (z1 * w) + (z2 * w)"
paulson@14269
   414
apply (rule_tac z = z1 in eq_Abs_REAL)
paulson@14269
   415
apply (rule_tac z = z2 in eq_Abs_REAL)
paulson@14269
   416
apply (rule_tac z = w in eq_Abs_REAL)
paulson@14269
   417
apply (simp add: preal_add_mult_distrib2 real_add real_mult preal_add_ac preal_mult_ac)
paulson@14269
   418
done
paulson@14269
   419
paulson@14269
   420
lemma real_add_mult_distrib2: "(w::real) * (z1 + z2) = (w * z1) + (w * z2)"
paulson@14269
   421
by (simp add: real_mult_commute [of w] real_add_mult_distrib)
paulson@14269
   422
paulson@14269
   423
lemma real_diff_mult_distrib: "((z1::real) - z2) * w = (z1 * w) - (z2 * w)"
paulson@14269
   424
apply (unfold real_diff_def)
paulson@14269
   425
apply (simp add: real_add_mult_distrib)
paulson@14269
   426
done
paulson@14269
   427
paulson@14269
   428
lemma real_diff_mult_distrib2: "(w::real) * (z1 - z2) = (w * z1) - (w * z2)"
paulson@14269
   429
by (simp add: real_mult_commute [of w] real_diff_mult_distrib)
paulson@14269
   430
paulson@14269
   431
(*** one and zero are distinct ***)
paulson@14269
   432
lemma real_zero_not_eq_one: "0 ~= (1::real)"
paulson@14269
   433
apply (unfold real_zero_def real_one_def)
paulson@14269
   434
apply (auto simp add: preal_self_less_add_left [THEN preal_not_refl2])
paulson@14269
   435
done
paulson@14269
   436
paulson@14269
   437
(*** existence of inverse ***)
paulson@14269
   438
(** lemma -- alternative definition of 0 **)
paulson@14269
   439
lemma real_zero_iff: "0 = Abs_REAL (realrel `` {(x, x)})"
paulson@14269
   440
apply (unfold real_zero_def)
paulson@14269
   441
apply (auto simp add: preal_add_commute)
paulson@14269
   442
done
paulson@14269
   443
paulson@14269
   444
lemma real_mult_inv_right_ex:
paulson@14269
   445
          "!!(x::real). x ~= 0 ==> \<exists>y. x*y = (1::real)"
paulson@14269
   446
apply (unfold real_zero_def real_one_def)
paulson@14269
   447
apply (rule_tac z = x in eq_Abs_REAL)
paulson@14269
   448
apply (cut_tac x = xa and y = y in linorder_less_linear)
paulson@14269
   449
apply (auto dest!: preal_less_add_left_Ex simp add: real_zero_iff [symmetric])
paulson@14269
   450
apply (rule_tac x = "Abs_REAL (realrel `` { (preal_of_prat (prat_of_pnat 1), pinv (D) + preal_of_prat (prat_of_pnat 1))}) " in exI)
paulson@14269
   451
apply (rule_tac [2] x = "Abs_REAL (realrel `` { (pinv (D) + preal_of_prat (prat_of_pnat 1), preal_of_prat (prat_of_pnat 1))}) " in exI)
paulson@14269
   452
apply (auto simp add: real_mult pnat_one_def preal_mult_1_right preal_add_mult_distrib2 preal_add_mult_distrib preal_mult_1 preal_mult_inv_right preal_add_ac preal_mult_ac)
paulson@14269
   453
done
paulson@14269
   454
paulson@14269
   455
lemma real_mult_inv_left_ex: "x ~= 0 ==> \<exists>y. y*x = (1::real)"
paulson@14269
   456
apply (drule real_mult_inv_right_ex)
paulson@14269
   457
apply (auto simp add: real_mult_commute)
paulson@14269
   458
done
paulson@14269
   459
paulson@14269
   460
lemma real_mult_inv_left: "x ~= 0 ==> inverse(x)*x = (1::real)"
paulson@14269
   461
apply (unfold real_inverse_def)
paulson@14269
   462
apply (frule real_mult_inv_left_ex, safe)
paulson@14269
   463
apply (rule someI2, auto)
paulson@14269
   464
done
paulson@14269
   465
declare real_mult_inv_left [simp]
paulson@14269
   466
paulson@14269
   467
lemma real_mult_inv_right: "x ~= 0 ==> x*inverse(x) = (1::real)"
paulson@14269
   468
apply (subst real_mult_commute)
paulson@14269
   469
apply (auto simp add: real_mult_inv_left)
paulson@14269
   470
done
paulson@14269
   471
declare real_mult_inv_right [simp]
paulson@14269
   472
paulson@14269
   473
paulson@14269
   474
(*---------------------------------------------------------
paulson@14269
   475
     Theorems for ordering
paulson@14269
   476
 --------------------------------------------------------*)
paulson@14269
   477
(* prove introduction and elimination rules for real_less *)
paulson@14269
   478
paulson@14269
   479
(* real_less is a strong order i.e. nonreflexive and transitive *)
paulson@14269
   480
paulson@14269
   481
(*** lemmas ***)
paulson@14269
   482
lemma preal_lemma_eq_rev_sum: "!!(x::preal). [| x = y; x1 = y1 |] ==> x + y1 = x1 + y"
paulson@14269
   483
by (simp add: preal_add_commute)
paulson@14269
   484
paulson@14269
   485
lemma preal_add_left_commute_cancel: "!!(b::preal). x + (b + y) = x1 + (b + y1) ==> x + y = x1 + y1"
paulson@14269
   486
by (simp add: preal_add_ac)
paulson@14269
   487
paulson@14269
   488
lemma preal_lemma_for_not_refl: "!!(x::preal). [| x + y2a = x2a + y;
paulson@14269
   489
                       x + y2b = x2b + y |]
paulson@14269
   490
                    ==> x2a + y2b = x2b + y2a"
paulson@14269
   491
apply (drule preal_lemma_eq_rev_sum, assumption)
paulson@14269
   492
apply (erule_tac V = "x + y2b = x2b + y" in thin_rl)
paulson@14269
   493
apply (simp add: preal_add_ac)
paulson@14269
   494
apply (drule preal_add_left_commute_cancel)
paulson@14269
   495
apply (simp add: preal_add_ac)
paulson@14269
   496
done
paulson@14269
   497
paulson@14269
   498
lemma real_less_not_refl: "~ (R::real) < R"
paulson@14269
   499
apply (rule_tac z = R in eq_Abs_REAL)
paulson@14269
   500
apply (auto simp add: real_less_def)
paulson@14269
   501
apply (drule preal_lemma_for_not_refl, assumption, auto)
paulson@14269
   502
done
paulson@14269
   503
paulson@14269
   504
(*** y < y ==> P ***)
paulson@14269
   505
lemmas real_less_irrefl = real_less_not_refl [THEN notE, standard]
paulson@14269
   506
declare real_less_irrefl [elim!]
paulson@14269
   507
paulson@14269
   508
lemma real_not_refl2: "!!(x::real). x < y ==> x ~= y"
paulson@14269
   509
by (auto simp add: real_less_not_refl)
paulson@14269
   510
paulson@14269
   511
(* lemma re-arranging and eliminating terms *)
paulson@14269
   512
lemma preal_lemma_trans: "!! (a::preal). [| a + b = c + d;
paulson@14269
   513
             x2b + d + (c + y2e) < a + y2b + (x2e + b) |]
paulson@14269
   514
          ==> x2b + y2e < x2e + y2b"
paulson@14269
   515
apply (simp add: preal_add_ac)
paulson@14269
   516
apply (rule_tac C = "c+d" in preal_add_left_less_cancel)
paulson@14269
   517
apply (simp add: preal_add_assoc [symmetric])
paulson@14269
   518
done
paulson@14269
   519
paulson@14269
   520
(** A MESS!  heavy re-writing involved*)
paulson@14269
   521
lemma real_less_trans: "!!(R1::real). [| R1 < R2; R2 < R3 |] ==> R1 < R3"
paulson@14269
   522
apply (rule_tac z = R1 in eq_Abs_REAL)
paulson@14269
   523
apply (rule_tac z = R2 in eq_Abs_REAL)
paulson@14269
   524
apply (rule_tac z = R3 in eq_Abs_REAL)
paulson@14269
   525
apply (auto simp add: real_less_def)
paulson@14269
   526
apply (rule exI)+
paulson@14269
   527
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   528
 prefer 2 apply blast 
paulson@14269
   529
 prefer 2 apply blast 
paulson@14269
   530
apply (drule preal_lemma_for_not_refl, assumption)
paulson@14269
   531
apply (blast dest: preal_add_less_mono intro: preal_lemma_trans)
paulson@14269
   532
done
paulson@14269
   533
paulson@14269
   534
lemma real_less_not_sym: "!! (R1::real). R1 < R2 ==> ~ (R2 < R1)"
paulson@14269
   535
apply (rule notI)
paulson@14269
   536
apply (drule real_less_trans, assumption)
paulson@14269
   537
apply (simp add: real_less_not_refl)
paulson@14269
   538
done
paulson@14269
   539
paulson@14269
   540
(* [| x < y;  ~P ==> y < x |] ==> P *)
paulson@14269
   541
lemmas real_less_asym = real_less_not_sym [THEN contrapos_np, standard]
paulson@14269
   542
paulson@14269
   543
lemma real_of_preal_add:
paulson@14269
   544
     "real_of_preal ((z1::preal) + z2) =
paulson@14269
   545
      real_of_preal z1 + real_of_preal z2"
paulson@14269
   546
apply (unfold real_of_preal_def)
paulson@14269
   547
apply (simp add: real_add preal_add_mult_distrib preal_mult_1 add: preal_add_ac)
paulson@14269
   548
done
paulson@14269
   549
paulson@14269
   550
lemma real_of_preal_mult:
paulson@14269
   551
     "real_of_preal ((z1::preal) * z2) =
paulson@14269
   552
      real_of_preal z1* real_of_preal z2"
paulson@14269
   553
apply (unfold real_of_preal_def)
paulson@14269
   554
apply (simp (no_asm_use) add: real_mult preal_add_mult_distrib2 preal_mult_1 preal_mult_1_right pnat_one_def preal_add_ac preal_mult_ac)
paulson@14269
   555
done
paulson@14269
   556
paulson@14269
   557
lemma real_of_preal_ExI:
paulson@14269
   558
      "!!(x::preal). y < x ==>
paulson@14269
   559
       \<exists>m. Abs_REAL (realrel `` {(x,y)}) = real_of_preal m"
paulson@14269
   560
apply (unfold real_of_preal_def)
paulson@14269
   561
apply (auto dest!: preal_less_add_left_Ex simp add: preal_add_ac)
paulson@14269
   562
done
paulson@14269
   563
paulson@14269
   564
lemma real_of_preal_ExD:
paulson@14269
   565
      "!!(x::preal). \<exists>m. Abs_REAL (realrel `` {(x,y)}) =
paulson@14269
   566
                     real_of_preal m ==> y < x"
paulson@14269
   567
apply (unfold real_of_preal_def)
paulson@14269
   568
apply (auto simp add: preal_add_commute preal_add_assoc)
paulson@14269
   569
apply (simp add: preal_add_assoc [symmetric] preal_self_less_add_left)
paulson@14269
   570
done
paulson@14269
   571
paulson@14269
   572
lemma real_of_preal_iff: "(\<exists>m. Abs_REAL (realrel `` {(x,y)}) = real_of_preal m) = (y < x)"
paulson@14269
   573
by (blast intro!: real_of_preal_ExI real_of_preal_ExD)
paulson@14269
   574
paulson@14269
   575
(*** Gleason prop 9-4.4 p 127 ***)
paulson@14269
   576
lemma real_of_preal_trichotomy:
paulson@14269
   577
      "\<exists>m. (x::real) = real_of_preal m | x = 0 | x = -(real_of_preal m)"
paulson@14269
   578
apply (unfold real_of_preal_def real_zero_def)
paulson@14269
   579
apply (rule_tac z = x in eq_Abs_REAL)
paulson@14269
   580
apply (auto simp add: real_minus preal_add_ac)
paulson@14269
   581
apply (cut_tac x = x and y = y in linorder_less_linear)
paulson@14269
   582
apply (auto dest!: preal_less_add_left_Ex simp add: preal_add_assoc [symmetric])
paulson@14269
   583
apply (auto simp add: preal_add_commute)
paulson@14269
   584
done
paulson@14269
   585
paulson@14269
   586
lemma real_of_preal_trichotomyE: "!!P. [| !!m. x = real_of_preal m ==> P;
paulson@14269
   587
              x = 0 ==> P;
paulson@14269
   588
              !!m. x = -(real_of_preal m) ==> P |] ==> P"
paulson@14269
   589
apply (cut_tac x = x in real_of_preal_trichotomy, auto)
paulson@14269
   590
done
paulson@14269
   591
paulson@14269
   592
lemma real_of_preal_lessD:
paulson@14269
   593
      "real_of_preal m1 < real_of_preal m2 ==> m1 < m2"
paulson@14269
   594
apply (unfold real_of_preal_def)
paulson@14269
   595
apply (auto simp add: real_less_def preal_add_ac)
paulson@14269
   596
apply (auto simp add: preal_add_assoc [symmetric])
paulson@14269
   597
apply (auto simp add: preal_add_ac)
paulson@14269
   598
done
paulson@14269
   599
paulson@14269
   600
lemma real_of_preal_lessI: "m1 < m2 ==> real_of_preal m1 < real_of_preal m2"
paulson@14269
   601
apply (drule preal_less_add_left_Ex)
paulson@14269
   602
apply (auto simp add: real_of_preal_add real_of_preal_def real_less_def)
paulson@14269
   603
apply (rule exI)+
paulson@14269
   604
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   605
 apply (rule_tac [2] refl)+
paulson@14269
   606
apply (simp add: preal_self_less_add_left del: preal_add_less_iff2)
paulson@14269
   607
done
paulson@14269
   608
paulson@14269
   609
lemma real_of_preal_less_iff1: "(real_of_preal m1 < real_of_preal m2) = (m1 < m2)"
paulson@14269
   610
by (blast intro: real_of_preal_lessI real_of_preal_lessD)
paulson@14269
   611
paulson@14269
   612
declare real_of_preal_less_iff1 [simp]
paulson@14269
   613
paulson@14269
   614
lemma real_of_preal_minus_less_self: "- real_of_preal m < real_of_preal m"
paulson@14269
   615
apply (auto simp add: real_of_preal_def real_less_def real_minus)
paulson@14269
   616
apply (rule exI)+
paulson@14269
   617
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   618
 apply (rule_tac [2] refl)+
paulson@14269
   619
apply (simp (no_asm_use) add: preal_add_ac)
paulson@14269
   620
apply (simp (no_asm_use) add: preal_self_less_add_right preal_add_assoc [symmetric])
paulson@14269
   621
done
paulson@14269
   622
paulson@14269
   623
lemma real_of_preal_minus_less_zero: "- real_of_preal m < 0"
paulson@14269
   624
apply (unfold real_zero_def)
paulson@14269
   625
apply (auto simp add: real_of_preal_def real_less_def real_minus)
paulson@14269
   626
apply (rule exI)+
paulson@14269
   627
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   628
 apply (rule_tac [2] refl)+
paulson@14269
   629
apply (simp (no_asm_use) add: preal_self_less_add_right preal_add_ac)
paulson@14269
   630
done
paulson@14269
   631
paulson@14269
   632
lemma real_of_preal_not_minus_gt_zero: "~ 0 < - real_of_preal m"
paulson@14269
   633
apply (cut_tac real_of_preal_minus_less_zero)
paulson@14269
   634
apply (fast dest: real_less_trans elim: real_less_irrefl)
paulson@14269
   635
done
paulson@14269
   636
paulson@14269
   637
lemma real_of_preal_zero_less: "0 < real_of_preal m"
paulson@14269
   638
apply (unfold real_zero_def)
paulson@14269
   639
apply (auto simp add: real_of_preal_def real_less_def real_minus)
paulson@14269
   640
apply (rule exI)+
paulson@14269
   641
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   642
 apply (rule_tac [2] refl)+
paulson@14269
   643
apply (simp (no_asm_use) add: preal_self_less_add_right preal_add_ac)
paulson@14269
   644
done
paulson@14269
   645
paulson@14269
   646
lemma real_of_preal_not_less_zero: "~ real_of_preal m < 0"
paulson@14269
   647
apply (cut_tac real_of_preal_zero_less)
paulson@14269
   648
apply (blast dest: real_less_trans elim: real_less_irrefl)
paulson@14269
   649
done
paulson@14269
   650
paulson@14269
   651
lemma real_minus_minus_zero_less: "0 < - (- real_of_preal m)"
paulson@14269
   652
by (simp add: real_of_preal_zero_less)
paulson@14269
   653
paulson@14269
   654
(* another lemma *)
paulson@14269
   655
lemma real_of_preal_sum_zero_less:
paulson@14269
   656
      "0 < real_of_preal m + real_of_preal m1"
paulson@14269
   657
apply (unfold real_zero_def)
paulson@14269
   658
apply (auto simp add: real_of_preal_def real_less_def real_add)
paulson@14269
   659
apply (rule exI)+
paulson@14269
   660
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   661
 apply (rule_tac [2] refl)+
paulson@14269
   662
apply (simp (no_asm_use) add: preal_add_ac)
paulson@14269
   663
apply (simp (no_asm_use) add: preal_self_less_add_right preal_add_assoc [symmetric])
paulson@14269
   664
done
paulson@14269
   665
paulson@14269
   666
lemma real_of_preal_minus_less_all: "- real_of_preal m < real_of_preal m1"
paulson@14269
   667
apply (auto simp add: real_of_preal_def real_less_def real_minus)
paulson@14269
   668
apply (rule exI)+
paulson@14269
   669
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   670
 apply (rule_tac [2] refl)+
paulson@14269
   671
apply (simp (no_asm_use) add: preal_add_ac)
paulson@14269
   672
apply (simp (no_asm_use) add: preal_self_less_add_right preal_add_assoc [symmetric])
paulson@14269
   673
done
paulson@14269
   674
paulson@14269
   675
lemma real_of_preal_not_minus_gt_all: "~ real_of_preal m < - real_of_preal m1"
paulson@14269
   676
apply (cut_tac real_of_preal_minus_less_all)
paulson@14269
   677
apply (blast dest: real_less_trans elim: real_less_irrefl)
paulson@14269
   678
done
paulson@14269
   679
paulson@14269
   680
lemma real_of_preal_minus_less_rev1: "- real_of_preal m1 < - real_of_preal m2
paulson@14269
   681
      ==> real_of_preal m2 < real_of_preal m1"
paulson@14269
   682
apply (auto simp add: real_of_preal_def real_less_def real_minus)
paulson@14269
   683
apply (rule exI)+
paulson@14269
   684
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   685
 apply (rule_tac [2] refl)+
paulson@14269
   686
apply (auto simp add: preal_add_ac)
paulson@14269
   687
apply (simp add: preal_add_assoc [symmetric])
paulson@14269
   688
apply (auto simp add: preal_add_ac)
paulson@14269
   689
done
paulson@14269
   690
paulson@14269
   691
lemma real_of_preal_minus_less_rev2: "real_of_preal m1 < real_of_preal m2
paulson@14269
   692
      ==> - real_of_preal m2 < - real_of_preal m1"
paulson@14269
   693
apply (auto simp add: real_of_preal_def real_less_def real_minus)
paulson@14269
   694
apply (rule exI)+
paulson@14269
   695
apply (rule conjI, rule_tac [2] conjI)
paulson@14269
   696
 apply (rule_tac [2] refl)+
paulson@14269
   697
apply (auto simp add: preal_add_ac)
paulson@14269
   698
apply (simp add: preal_add_assoc [symmetric])
paulson@14269
   699
apply (auto simp add: preal_add_ac)
paulson@14269
   700
done
paulson@14269
   701
paulson@14269
   702
lemma real_of_preal_minus_less_rev_iff: "(- real_of_preal m1 < - real_of_preal m2) =
paulson@14269
   703
      (real_of_preal m2 < real_of_preal m1)"
paulson@14269
   704
apply (blast intro!: real_of_preal_minus_less_rev1 real_of_preal_minus_less_rev2)
paulson@14269
   705
done
paulson@14269
   706
paulson@14269
   707
declare real_of_preal_minus_less_rev_iff [simp]
paulson@14269
   708
paulson@14270
   709
paulson@14270
   710
subsection{*Linearity of the Ordering*}
paulson@14270
   711
paulson@14269
   712
lemma real_linear: "(x::real) < y | x = y | y < x"
paulson@14269
   713
apply (rule_tac x = x in real_of_preal_trichotomyE)
paulson@14269
   714
apply (rule_tac [!] x = y in real_of_preal_trichotomyE)
paulson@14270
   715
apply (auto dest!: preal_le_anti_sym 
paulson@14270
   716
            simp add: preal_less_le_iff real_of_preal_minus_less_zero 
paulson@14270
   717
                      real_of_preal_zero_less real_of_preal_minus_less_all)
paulson@14269
   718
done
paulson@14269
   719
paulson@14269
   720
lemma real_neq_iff: "!!w::real. (w ~= z) = (w<z | z<w)"
paulson@14269
   721
by (cut_tac real_linear, blast)
paulson@14269
   722
paulson@14269
   723
paulson@14269
   724
lemma real_linear_less2: "!!(R1::real). [| R1 < R2 ==> P;  R1 = R2 ==> P;
paulson@14269
   725
                       R2 < R1 ==> P |] ==> P"
paulson@14269
   726
apply (cut_tac x = R1 and y = R2 in real_linear, auto)
paulson@14269
   727
done
paulson@14269
   728
paulson@14269
   729
lemma real_minus_zero_less_iff: "(0 < -R) = (R < (0::real))"
paulson@14269
   730
apply (rule_tac x = R in real_of_preal_trichotomyE)
paulson@14269
   731
apply (auto simp add: real_of_preal_not_minus_gt_zero real_of_preal_not_less_zero real_of_preal_zero_less real_of_preal_minus_less_zero)
paulson@14269
   732
done
paulson@14269
   733
declare real_minus_zero_less_iff [simp]
paulson@14269
   734
paulson@14269
   735
lemma real_minus_zero_less_iff2: "(-R < 0) = ((0::real) < R)"
paulson@14269
   736
apply (rule_tac x = R in real_of_preal_trichotomyE)
paulson@14269
   737
apply (auto simp add: real_of_preal_not_minus_gt_zero real_of_preal_not_less_zero real_of_preal_zero_less real_of_preal_minus_less_zero)
paulson@14269
   738
done
paulson@14269
   739
declare real_minus_zero_less_iff2 [simp]
paulson@14269
   740
paulson@14269
   741
ML
paulson@14269
   742
{*
paulson@14269
   743
val real_le_def = thm "real_le_def";
paulson@14269
   744
val real_diff_def = thm "real_diff_def";
paulson@14269
   745
val real_divide_def = thm "real_divide_def";
paulson@14269
   746
val real_of_nat_def = thm "real_of_nat_def";
paulson@14269
   747
paulson@14269
   748
val preal_trans_lemma = thm"preal_trans_lemma";
paulson@14269
   749
val realrel_iff = thm"realrel_iff";
paulson@14269
   750
val realrel_refl = thm"realrel_refl";
paulson@14269
   751
val equiv_realrel = thm"equiv_realrel";
paulson@14269
   752
val equiv_realrel_iff = thm"equiv_realrel_iff";
paulson@14269
   753
val realrel_in_real = thm"realrel_in_real";
paulson@14269
   754
val inj_on_Abs_REAL = thm"inj_on_Abs_REAL";
paulson@14269
   755
val eq_realrelD = thm"eq_realrelD";
paulson@14269
   756
val inj_Rep_REAL = thm"inj_Rep_REAL";
paulson@14269
   757
val inj_real_of_preal = thm"inj_real_of_preal";
paulson@14269
   758
val eq_Abs_REAL = thm"eq_Abs_REAL";
paulson@14269
   759
val real_minus_congruent = thm"real_minus_congruent";
paulson@14269
   760
val real_minus = thm"real_minus";
paulson@14269
   761
val real_minus_minus = thm"real_minus_minus";
paulson@14269
   762
val inj_real_minus = thm"inj_real_minus";
paulson@14269
   763
val real_minus_zero = thm"real_minus_zero";
paulson@14269
   764
val real_minus_zero_iff = thm"real_minus_zero_iff";
paulson@14269
   765
val real_add_congruent2_lemma = thm"real_add_congruent2_lemma";
paulson@14269
   766
val real_add = thm"real_add";
paulson@14269
   767
val real_add_commute = thm"real_add_commute";
paulson@14269
   768
val real_add_assoc = thm"real_add_assoc";
paulson@14269
   769
val real_add_left_commute = thm"real_add_left_commute";
paulson@14269
   770
val real_add_zero_left = thm"real_add_zero_left";
paulson@14269
   771
val real_add_zero_right = thm"real_add_zero_right";
paulson@14269
   772
val real_add_minus = thm"real_add_minus";
paulson@14269
   773
val real_add_minus_left = thm"real_add_minus_left";
paulson@14269
   774
paulson@14269
   775
val real_add_ac = thms"real_add_ac";
paulson@14269
   776
val real_mult_ac = thms"real_mult_ac";
paulson@14269
   777
*}
paulson@14269
   778
paulson@10752
   779
paulson@5588
   780
end