src/HOL/Real/RealBin.ML
author nipkow
Thu, 23 Sep 1999 09:05:44 +0200
changeset 7583 d1b40e0464b1
parent 7292 dff3470c5c62
child 7588 26384af93359
permissions -rw-r--r--
Restructured lin.arith.package and fixed a proof in RComplete.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7292
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     1
(*  Title:      HOL/RealBin.ML
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     2
    ID:         $Id$
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     4
    Copyright   1999  University of Cambridge
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     5
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     6
Binary arithmetic for the reals (integer literals only)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     7
*)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     8
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
     9
(** real_of_int (coercion from int to real) **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    10
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    11
Goal "real_of_int (number_of w) = number_of w";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    12
by (simp_tac (simpset() addsimps [real_number_of_def]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    13
qed "real_number_of";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    14
Addsimps [real_number_of];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    15
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    16
Goalw [real_number_of_def] "0r = #0";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    17
by (simp_tac (simpset() addsimps [real_of_int_zero RS sym]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    18
qed "zero_eq_numeral_0";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    19
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    20
Goalw [real_number_of_def] "1r = #1";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    21
by (simp_tac (simpset() addsimps [real_of_int_one RS sym]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    22
qed "one_eq_numeral_1";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    23
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    24
(** Addition **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    25
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    26
Goal "(number_of v :: real) + number_of v' = number_of (bin_add v v')";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    27
by (simp_tac
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    28
    (simpset_of Int.thy addsimps [real_number_of_def, 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    29
				  real_of_int_add, number_of_add]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    30
qed "add_real_number_of";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    31
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    32
Addsimps [add_real_number_of];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    33
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    34
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    35
(** Subtraction **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    36
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    37
Goalw [real_number_of_def] "- (number_of w :: real) = number_of (bin_minus w)";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    38
by (simp_tac
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    39
    (simpset_of Int.thy addsimps [number_of_minus, real_of_int_minus]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    40
qed "minus_real_number_of";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    41
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    42
Goalw [real_number_of_def]
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    43
   "(number_of v :: real) - number_of w = number_of (bin_add v (bin_minus w))";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    44
by (simp_tac
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    45
    (simpset_of Int.thy addsimps [diff_number_of_eq, real_of_int_diff]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    46
qed "diff_real_number_of";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    47
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    48
Addsimps [minus_real_number_of, diff_real_number_of];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    49
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    50
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    51
(** Multiplication **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    52
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    53
Goal "(number_of v :: real) * number_of v' = number_of (bin_mult v v')";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    54
by (simp_tac
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    55
    (simpset_of Int.thy addsimps [real_number_of_def, 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    56
				  real_of_int_mult, number_of_mult]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    57
qed "mult_real_number_of";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    58
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    59
Addsimps [mult_real_number_of];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    60
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    61
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    62
(*** Comparisons ***)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    63
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    64
(** Equals (=) **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    65
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    66
Goal "((number_of v :: real) = number_of v') = \
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    67
\     iszero (number_of (bin_add v (bin_minus v')))";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    68
by (simp_tac
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    69
    (simpset_of Int.thy addsimps [real_number_of_def, 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    70
				  real_of_int_eq_iff, eq_number_of_eq]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    71
qed "eq_real_number_of";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    72
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    73
Addsimps [eq_real_number_of];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    74
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    75
(** Less-than (<) **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    76
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    77
(*"neg" is used in rewrite rules for binary comparisons*)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    78
Goal "((number_of v :: real) < number_of v') = \
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    79
\     neg (number_of (bin_add v (bin_minus v')))";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    80
by (simp_tac
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    81
    (simpset_of Int.thy addsimps [real_number_of_def, real_of_int_less_iff, 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    82
				  less_number_of_eq_neg]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    83
qed "less_real_number_of";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    84
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    85
Addsimps [less_real_number_of];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    86
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    87
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    88
(** Less-than-or-equals (<=) **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    89
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    90
Goal "(number_of x <= (number_of y::real)) = \
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    91
\     (~ number_of y < (number_of x::real))";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    92
by (rtac (linorder_not_less RS sym) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    93
qed "le_real_number_of_eq_not_less"; 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    94
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    95
Addsimps [le_real_number_of_eq_not_less];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    96
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    97
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    98
(** rabs (absolute value) **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
    99
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   100
Goalw [rabs_def]
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   101
     "rabs (number_of v :: real) = \
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   102
\       (if neg (number_of v) then number_of (bin_minus v) \
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   103
\        else number_of v)";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   104
by (simp_tac
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   105
    (simpset_of Int.thy addsimps
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   106
      bin_arith_simps@
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   107
      [minus_real_number_of, zero_eq_numeral_0, le_real_number_of_eq_not_less,
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   108
       less_real_number_of, real_of_int_le_iff]) 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   109
qed "rabs_nat_number_of";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   110
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   111
Addsimps [rabs_nat_number_of];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   112
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   113
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   114
(*** New versions of existing theorems involving 0r, 1r ***)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   115
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   116
Goal "- #1 = (#-1::real)";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   117
by (Simp_tac 1);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   118
qed "minus_numeral_one";
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   119
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   120
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   121
(*Maps 0r to #0 and 1r to #1 and -1r to #-1*)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   122
val real_numeral_ss = 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   123
    HOL_ss addsimps [zero_eq_numeral_0, one_eq_numeral_1, 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   124
		     minus_numeral_one];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   125
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   126
fun rename_numerals thy th = simplify real_numeral_ss (change_theory thy th);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   127
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   128
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   129
fun inst x t = read_instantiate_sg (sign_of RealBin.thy) [(x,t)];
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   130
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   131
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   132
(*Now insert some identities previously stated for 0r and 1r*)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   133
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   134
(** RealDef & Real **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   135
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   136
Addsimps (map (rename_numerals thy) 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   137
	  [real_minus_zero, real_minus_zero_iff,
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   138
	   real_add_zero_left, real_add_zero_right, 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   139
	   real_diff_0, real_diff_0_right,
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   140
	   real_mult_0_right, real_mult_0, real_mult_1_right, real_mult_1,
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   141
	   real_mult_minus_1_right, real_mult_minus_1, real_rinv_1,
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   142
	   real_minus_zero_less_iff]);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   143
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   144
(** RealPow **)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   145
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   146
Addsimps (map (rename_numerals thy) 
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   147
	  [realpow_zero, realpow_two_le, realpow_zero_le,
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   148
	   realpow_eq_one, rabs_minus_realpow_one, rabs_realpow_minus_one,
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   149
	   realpow_minus_one, realpow_minus_one2, realpow_minus_one_odd]);
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   150
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   151
(*Perhaps add some theorems that aren't in the default simpset, as
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   152
  done in Integ/NatBin.ML*)
dff3470c5c62 real literals using binary arithmetic
paulson
parents:
diff changeset
   153
7583
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   154
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   155
(*  Author:     Tobias Nipkow, TU Muenchen
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   156
    Copyright   1999 TU Muenchen
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   157
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   158
Instantiate linear arithmetic decision procedure for the reals.
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   159
FIXME: multiplication with constants (eg #2 * x) does not work yet.
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   160
Solution: there should be a simproc for combining coefficients.
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   161
*)
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   162
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   163
let
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   164
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   165
(* reduce contradictory <= to False *)
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   166
val simps = [order_less_irrefl,zero_eq_numeral_0,one_eq_numeral_1,
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   167
  add_real_number_of,minus_real_number_of,diff_real_number_of,
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   168
  mult_real_number_of,eq_real_number_of,less_real_number_of,
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   169
  le_real_number_of_eq_not_less];
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   170
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   171
val simprocs = [Real_Cancel.sum_conv, Real_Cancel.rel_conv];
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   172
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   173
val add_mono_thms =
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   174
  map (fn s => prove_goal thy s
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   175
                 (fn prems => [cut_facts_tac prems 1,
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   176
                      asm_simp_tac (simpset() addsimps
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   177
     [real_add_le_mono,real_add_less_mono,
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   178
      real_add_less_le_mono,real_add_le_less_mono]) 1]))
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   179
    ["(i <= j) & (k <= l) ==> i + k <= j + (l::real)",
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   180
     "(i  = j) & (k <= l) ==> i + k <= j + (l::real)",
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   181
     "(i <= j) & (k  = l) ==> i + k <= j + (l::real)",
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   182
     "(i  = j) & (k  = l) ==> i + k  = j + (l::real)",
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   183
     "(i < j) & (k = l)   ==> i + k < j + (l::real)",
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   184
     "(i = j) & (k < l)   ==> i + k < j + (l::real)",
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   185
     "(i < j) & (k <= l)  ==> i + k < j + (l::real)",
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   186
     "(i <= j) & (k < l)  ==> i + k < j + (l::real)",
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   187
     "(i < j) & (k < l)   ==> i + k < j + (l::real)"];
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   188
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   189
in
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   190
LA_Data_Ref.add_mono_thms := !LA_Data_Ref.add_mono_thms @ add_mono_thms;
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   191
LA_Data_Ref.ss_ref := !LA_Data_Ref.ss_ref addsimps simps
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   192
                      addsimprocs simprocs;
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   193
LA_Data_Ref.discrete := !LA_Data_Ref.discrete @ [("RealDef.real",false)]
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   194
end;
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   195
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   196
let
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   197
val real_arith_simproc_pats =
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   198
  map (fn s => Thm.read_cterm (Theory.sign_of thy) (s, HOLogic.boolT))
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   199
      ["(m::real) < n","(m::real) <= n", "(m::real) = n"];
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   200
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   201
val fast_real_arith_simproc = mk_simproc
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   202
  "fast_real_arith" real_arith_simproc_pats Fast_Arith.lin_arith_prover;
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   203
in
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   204
Addsimprocs [fast_real_arith_simproc]
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   205
end;
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   206
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   207
Goalw [rabs_def]
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   208
  "P(rabs x) = ((#0 <= x --> P x) & (x < #0 --> P(-x)))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   209
by(auto_tac (claset(), simpset() addsimps [zero_eq_numeral_0]));
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   210
qed "rabs_split";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   211
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   212
arith_tac_split_thms := !arith_tac_split_thms @ [rabs_split];
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   213
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   214
(** Tests **)
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   215
Goal "(x + y = x) = (y = (#0::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   216
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   217
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   218
Goal "(x + y = y) = (x = (#0::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   219
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   220
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   221
Goal "(x + y = (#0::real)) = (x = -y)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   222
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   223
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   224
Goal "(x + y = (#0::real)) = (y = -x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   225
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   226
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   227
Goal "((x + y) < (x + z)) = (y < (z::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   228
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   229
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   230
Goal "((x + z) < (y + z)) = (x < (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   231
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   232
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   233
Goal "(~ x < y) = (y <= (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   234
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   235
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   236
Goal "~(x < y & y < (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   237
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   238
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   239
Goal "(x::real) < y ==> ~ y < x";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   240
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   241
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   242
Goal "((x::real) ~= y) = (x < y | y < x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   243
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   244
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   245
Goal "(~ x <= y) = (y < (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   246
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   247
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   248
Goal "x <= y | y <= (x::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   249
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   250
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   251
Goal "x <= y | y < (x::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   252
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   253
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   254
Goal "x < y | y <= (x::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   255
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   256
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   257
Goal "x <= (x::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   258
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   259
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   260
Goal "((x::real) <= y) = (x < y | x = y)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   261
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   262
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   263
Goal "((x::real) <= y & y <= x) = (x = y)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   264
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   265
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   266
Goal "~(x < y & y <= (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   267
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   268
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   269
Goal "~(x <= y & y < (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   270
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   271
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   272
Goal "(-x < (#0::real)) = (#0 < x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   273
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   274
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   275
Goal "((#0::real) < -x) = (x < #0)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   276
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   277
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   278
Goal "(-x <= (#0::real)) = (#0 <= x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   279
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   280
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   281
Goal "((#0::real) <= -x) = (x <= #0)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   282
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   283
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   284
Goal "(x::real) = y | x < y | y < x";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   285
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   286
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   287
Goal "(x::real) = #0 | #0 < x | #0 < -x";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   288
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   289
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   290
Goal "(#0::real) <= x | #0 <= -x";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   291
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   292
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   293
Goal "((x::real) + y <= x + z) = (y <= z)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   294
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   295
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   296
Goal "((x::real) + z <= y + z) = (x <= y)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   297
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   298
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   299
Goal "(w::real) < x & y < z ==> w + y < x + z";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   300
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   301
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   302
Goal "(w::real) <= x & y <= z ==> w + y <= x + z";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   303
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   304
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   305
Goal "(#0::real) <= x & #0 <= y ==> #0 <= x + y";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   306
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   307
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   308
Goal "(#0::real) < x & #0 < y ==> #0 < x + y";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   309
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   310
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   311
Goal "(-x < y) = (#0 < x + (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   312
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   313
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   314
Goal "(x < -y) = (x + y < (#0::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   315
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   316
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   317
Goal "(y < x + -z) = (y + z < (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   318
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   319
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   320
Goal "(x + -y < z) = (x < z + (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   321
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   322
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   323
Goal "x <= y ==> x < y + (#1::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   324
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   325
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   326
Goal "(x - y) + y = (x::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   327
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   328
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   329
Goal "y + (x - y) = (x::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   330
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   331
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   332
Goal "x - x = (#0::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   333
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   334
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   335
Goal "(x - y = #0) = (x = (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   336
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   337
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   338
Goal "((#0::real) <= x + x) = (#0 <= x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   339
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   340
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   341
Goal "(-x <= x) = ((#0::real) <= x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   342
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   343
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   344
Goal "(x <= -x) = (x <= (#0::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   345
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   346
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   347
Goal "(-x = (#0::real)) = (x = #0)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   348
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   349
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   350
Goal "-(x - y) = y - (x::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   351
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   352
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   353
Goal "((#0::real) < x - y) = (y < x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   354
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   355
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   356
Goal "((#0::real) <= x - y) = (y <= x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   357
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   358
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   359
Goal "(x + y) - x = (y::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   360
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   361
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   362
Goal "(-x = y) = (x = (-y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   363
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   364
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   365
Goal "x < (y::real) ==> ~(x = y)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   366
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   367
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   368
Goal "(x <= x + y) = ((#0::real) <= y)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   369
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   370
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   371
Goal "(y <= x + y) = ((#0::real) <= x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   372
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   373
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   374
Goal "(x < x + y) = ((#0::real) < y)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   375
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   376
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   377
Goal "(y < x + y) = ((#0::real) < x)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   378
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   379
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   380
Goal "(x - y) - x = (-y::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   381
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   382
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   383
Goal "(x + y < z) = (x < z - (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   384
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   385
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   386
Goal "(x - y < z) = (x < z + (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   387
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   388
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   389
Goal "(x < y - z) = (x + z < (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   390
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   391
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   392
Goal "(x <= y - z) = (x + z <= (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   393
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   394
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   395
Goal "(x - y <= z) = (x <= z + (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   396
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   397
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   398
Goal "(-x < -y) = (y < (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   399
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   400
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   401
Goal "(-x <= -y) = (y <= (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   402
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   403
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   404
Goal "(a + b) - (c + d) = (a - c) + (b - (d::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   405
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   406
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   407
Goal "(#0::real) - x = -x";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   408
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   409
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   410
Goal "x - (#0::real) = x";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   411
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   412
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   413
Goal "w <= x & y < z ==> w + y < x + (z::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   414
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   415
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   416
Goal "w < x & y <= z ==> w + y < x + (z::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   417
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   418
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   419
Goal "(#0::real) <= x & #0 < y ==> #0 < x + (y::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   420
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   421
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   422
Goal "(#0::real) < x & #0 <= y ==> #0 < x + y";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   423
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   424
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   425
Goal "-x - y = -(x + (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   426
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   427
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   428
Goal "x - (-y) = x + (y::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   429
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   430
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   431
Goal "-x - -y = y - (x::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   432
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   433
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   434
Goal "(a - b) + (b - c) = a - (c::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   435
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   436
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   437
Goal "(x = y - z) = (x + z = (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   438
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   439
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   440
Goal "(x - y = z) = (x = z + (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   441
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   442
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   443
Goal "x - (x - y) = (y::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   444
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   445
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   446
Goal "x - (x + y) = -(y::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   447
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   448
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   449
Goal "x = y ==> x <= (y::real)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   450
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   451
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   452
Goal "(#0::real) < x ==> ~(x = #0)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   453
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   454
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   455
Goal "(x + y) * (x - y) = (x * x) - (y * y)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   456
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   457
Goal "(-x = -y) = (x = (y::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   458
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   459
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   460
Goal "(-x < -y) = (y < (x::real))";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   461
by(arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   462
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   463
Goal "!!a::real. [| a <= b; c <= d; x+y<z |] ==> a+c <= b+d";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   464
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   465
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   466
Goal "!!a::real. [| a < b; c < d |] ==> a-d <= b+(-c)";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   467
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   468
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   469
Goal "!!a::real. [| a <= b; b+b <= c |] ==> a+a <= c";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   470
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   471
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   472
Goal "!!a::real. [| a+b <= i+j; a<=b; i<=j |] \
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   473
\     ==> a+a <= j+j";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   474
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   475
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   476
Goal "!!a::real. [| a+b < i+j; a<b; i<j |] \
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   477
\     ==> a+a < j+j";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   478
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   479
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   480
Goal "!!a::real. a+b+c <= i+j+k & a<=b & b<=c & i<=j & j<=k --> a+a+a <= k+k+k";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   481
by (arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   482
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   483
Goal "!!a::real. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] \
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   484
\     ==> a <= l";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   485
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   486
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   487
Goal "!!a::real. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] \
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   488
\     ==> a+a+a+a <= l+l+l+l";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   489
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   490
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   491
(* Too slow. Needs "combine_coefficients" simproc
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   492
Goal "!!a::real. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] \
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   493
\     ==> a+a+a+a+a <= l+l+l+l+i";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   494
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   495
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   496
Goal "!!a::real. [| a+b+c+d <= i+j+k+l; a<=b; b<=c; c<=d; i<=j; j<=k; k<=l |] \
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   497
\     ==> a+a+a+a+a+a <= l+l+l+l+i+l";
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   498
by (fast_arith_tac 1);
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   499
*)
d1b40e0464b1 Restructured lin.arith.package and fixed a proof in RComplete.
nipkow
parents: 7292
diff changeset
   500