src/HOL/Real/PReal.ML
changeset 9043 ca761fe227d8
parent 8919 d00b01ed8539
child 9108 9fff97d29837
equal deleted inserted replaced
9042:4d4521cbbcca 9043:ca761fe227d8
    42 
    42 
    43 Goal "{} < Rep_preal x";
    43 Goal "{} < Rep_preal x";
    44 by (rtac (Rep_preal RS preal_psubset_empty) 1);
    44 by (rtac (Rep_preal RS preal_psubset_empty) 1);
    45 qed "Rep_preal_psubset_empty";
    45 qed "Rep_preal_psubset_empty";
    46 
    46 
    47 Goal "? x. x: Rep_preal X";
    47 Goal "EX x. x: Rep_preal X";
    48 by (cut_inst_tac [("x","X")]  Rep_preal_psubset_empty 1);
    48 by (cut_inst_tac [("x","X")]  Rep_preal_psubset_empty 1);
    49 by (auto_tac (claset() addIs [(equals0I RS sym)],
    49 by (auto_tac (claset() addIs [(equals0I RS sym)],
    50               simpset() addsimps [psubset_def]));
    50               simpset() addsimps [psubset_def]));
    51 qed "mem_Rep_preal_Ex";
    51 qed "mem_Rep_preal_Ex";
    52 
    52 
    53 Goalw [preal_def] 
    53 Goalw [preal_def] 
    54       "[| {} < A; A < UNIV; \
    54       "[| {} < A; A < UNIV; \
    55 \              (!y: A. ((!z. z < y --> z: A) & \
    55 \              (ALL y: A. ((ALL z. z < y --> z: A) & \
    56 \                        (? u: A. y < u))) |] ==> A : preal";
    56 \                        (EX u: A. y < u))) |] ==> A : preal";
    57 by (Fast_tac 1);
    57 by (Fast_tac 1);
    58 qed "prealI1";
    58 qed "prealI1";
    59     
    59     
    60 Goalw [preal_def] 
    60 Goalw [preal_def] 
    61       "[| {} < A; A < UNIV; \
    61       "[| {} < A; A < UNIV; \
    62 \              !y: A. (!z. z < y --> z: A); \
    62 \              ALL y: A. (ALL z. z < y --> z: A); \
    63 \              !y: A. (? u: A. y < u) |] ==> A : preal";
    63 \              ALL y: A. (EX u: A. y < u) |] ==> A : preal";
    64 by (Best_tac 1);
    64 by (Best_tac 1);
    65 qed "prealI2";
    65 qed "prealI2";
    66 
    66 
    67 Goalw [preal_def] 
    67 Goalw [preal_def] 
    68       "A : preal ==> {} < A & A < UNIV & \
    68       "A : preal ==> {} < A & A < UNIV & \
    69 \                         (!y: A. ((!z. z < y --> z: A) & \
    69 \                         (ALL y: A. ((ALL z. z < y --> z: A) & \
    70 \                                  (? u: A. y < u)))";
    70 \                                  (EX u: A. y < u)))";
    71 by (Fast_tac 1);
    71 by (Fast_tac 1);
    72 qed "prealE_lemma";
    72 qed "prealE_lemma";
    73 
    73 
    74 
    74 
    75 AddSIs [prealI1,prealI2];
    75 AddSIs [prealI1,prealI2];
    83 
    83 
    84 Goalw [preal_def] "A : preal ==> A < UNIV";
    84 Goalw [preal_def] "A : preal ==> A < UNIV";
    85 by (Fast_tac 1);
    85 by (Fast_tac 1);
    86 qed "prealE_lemma2";
    86 qed "prealE_lemma2";
    87 
    87 
    88 Goalw [preal_def] "A : preal ==> !y: A. (!z. z < y --> z: A)";
    88 Goalw [preal_def] "A : preal ==> ALL y: A. (ALL z. z < y --> z: A)";
    89 by (Fast_tac 1);
    89 by (Fast_tac 1);
    90 qed "prealE_lemma3";
    90 qed "prealE_lemma3";
    91 
    91 
    92 Goal "[| A : preal; y: A |] ==> (!z. z < y --> z: A)";
    92 Goal "[| A : preal; y: A |] ==> (ALL z. z < y --> z: A)";
    93 by (fast_tac (claset() addSDs [prealE_lemma3]) 1);
    93 by (fast_tac (claset() addSDs [prealE_lemma3]) 1);
    94 qed "prealE_lemma3a";
    94 qed "prealE_lemma3a";
    95 
    95 
    96 Goal "[| A : preal; y: A; z < y |] ==> z: A";
    96 Goal "[| A : preal; y: A; z < y |] ==> z: A";
    97 by (fast_tac (claset() addSDs [prealE_lemma3a]) 1);
    97 by (fast_tac (claset() addSDs [prealE_lemma3a]) 1);
    98 qed "prealE_lemma3b";
    98 qed "prealE_lemma3b";
    99 
    99 
   100 Goalw [preal_def] "A : preal ==> !y: A. (? u: A. y < u)";
   100 Goalw [preal_def] "A : preal ==> ALL y: A. (EX u: A. y < u)";
   101 by (Fast_tac 1);
   101 by (Fast_tac 1);
   102 qed "prealE_lemma4";
   102 qed "prealE_lemma4";
   103 
   103 
   104 Goal "[| A : preal; y: A |] ==> ? u: A. y < u";
   104 Goal "[| A : preal; y: A |] ==> EX u: A. y < u";
   105 by (fast_tac (claset() addSDs [prealE_lemma4]) 1);
   105 by (fast_tac (claset() addSDs [prealE_lemma4]) 1);
   106 qed "prealE_lemma4a";
   106 qed "prealE_lemma4a";
   107 
   107 
   108 Goal "? x. x~: Rep_preal X";
   108 Goal "EX x. x~: Rep_preal X";
   109 by (cut_inst_tac [("x","X")] Rep_preal 1);
   109 by (cut_inst_tac [("x","X")] Rep_preal 1);
   110 by (dtac prealE_lemma2 1);
   110 by (dtac prealE_lemma2 1);
   111 by (rtac ccontr 1);
   111 by (rtac ccontr 1);
   112 by (auto_tac (claset(),simpset() addsimps [psubset_def]));
   112 by (auto_tac (claset(),simpset() addsimps [psubset_def]));
   113 by (blast_tac (claset() addIs [set_ext] addEs [swap]) 1);
   113 by (blast_tac (claset() addIs [set_ext] addEs [swap]) 1);
   146 (* prove introduction and elimination rules for preal_less *)
   146 (* prove introduction and elimination rules for preal_less *)
   147 
   147 
   148 (* A positive fraction not in a positive real is an upper bound *)
   148 (* A positive fraction not in a positive real is an upper bound *)
   149 (* Gleason p. 122 - Remark (1)                                  *)
   149 (* Gleason p. 122 - Remark (1)                                  *)
   150 
   150 
   151 Goal "x ~: Rep_preal(R) ==> !y: Rep_preal(R). y < x";
   151 Goal "x ~: Rep_preal(R) ==> ALL y: Rep_preal(R). y < x";
   152 by (cut_inst_tac [("x1","R")] (Rep_preal RS prealE_lemma) 1);
   152 by (cut_inst_tac [("x1","R")] (Rep_preal RS prealE_lemma) 1);
   153 by (auto_tac (claset() addIs [not_less_not_eq_prat_less],simpset()));
   153 by (auto_tac (claset() addIs [not_less_not_eq_prat_less],simpset()));
   154 qed "not_in_preal_ub";
   154 qed "not_in_preal_ub";
   155 
   155 
   156 (* preal_less is a strong order i.e nonreflexive and transitive *)
   156 (* preal_less is a strong order i.e nonreflexive and transitive *)
   205 
   205 
   206 (** addition of two positive reals gives a positive real **)
   206 (** addition of two positive reals gives a positive real **)
   207 (** lemmas for proving positive reals addition set in preal **)
   207 (** lemmas for proving positive reals addition set in preal **)
   208 
   208 
   209 (** Part 1 of Dedekind sections def **)
   209 (** Part 1 of Dedekind sections def **)
   210 Goal "{} < {w. ? x: Rep_preal R. ? y:Rep_preal S. w = x + y}";
   210 Goal "{} < {w. EX x: Rep_preal R. EX y:Rep_preal S. w = x + y}";
   211 by (cut_facts_tac [mem_Rep_preal_Ex,mem_Rep_preal_Ex] 1);
   211 by (cut_facts_tac [mem_Rep_preal_Ex,mem_Rep_preal_Ex] 1);
   212 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
   212 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
   213 qed "preal_add_set_not_empty";
   213 qed "preal_add_set_not_empty";
   214 
   214 
   215 (** Part 2 of Dedekind sections def **)
   215 (** Part 2 of Dedekind sections def **)
   216 Goal "? q. q  ~: {w. ? x: Rep_preal R. ? y:Rep_preal S. w = x + y}";
   216 Goal "EX q. q  ~: {w. EX x: Rep_preal R. EX y:Rep_preal S. w = x + y}";
   217 by (cut_inst_tac [("X","R")] not_mem_Rep_preal_Ex 1);
   217 by (cut_inst_tac [("X","R")] not_mem_Rep_preal_Ex 1);
   218 by (cut_inst_tac [("X","S")] not_mem_Rep_preal_Ex 1);
   218 by (cut_inst_tac [("X","S")] not_mem_Rep_preal_Ex 1);
   219 by (REPEAT(etac exE 1));
   219 by (REPEAT(etac exE 1));
   220 by (REPEAT(dtac not_in_preal_ub 1));
   220 by (REPEAT(dtac not_in_preal_ub 1));
   221 by (res_inst_tac [("x","x+xa")] exI 1);
   221 by (res_inst_tac [("x","x+xa")] exI 1);
   222 by (Auto_tac THEN (REPEAT(etac ballE 1)) THEN Auto_tac);
   222 by (Auto_tac THEN (REPEAT(etac ballE 1)) THEN Auto_tac);
   223 by (dtac prat_add_less_mono 1);
   223 by (dtac prat_add_less_mono 1);
   224 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl]));
   224 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl]));
   225 qed "preal_not_mem_add_set_Ex";
   225 qed "preal_not_mem_add_set_Ex";
   226 
   226 
   227 Goal "{w. ? x: Rep_preal R. ? y:Rep_preal S. w = x + y} < UNIV";
   227 Goal "{w. EX x: Rep_preal R. EX y:Rep_preal S. w = x + y} < UNIV";
   228 by (auto_tac (claset() addSIs [psubsetI],simpset()));
   228 by (auto_tac (claset() addSIs [psubsetI],simpset()));
   229 by (cut_inst_tac [("R","R"),("S","S")] preal_not_mem_add_set_Ex 1);
   229 by (cut_inst_tac [("R","R"),("S","S")] preal_not_mem_add_set_Ex 1);
   230 by (etac exE 1);
   230 by (etac exE 1);
   231 by (eres_inst_tac [("c","q")] equalityCE 1);
   231 by (eres_inst_tac [("c","q")] equalityCE 1);
   232 by Auto_tac;
   232 by Auto_tac;
   233 qed "preal_add_set_not_prat_set";
   233 qed "preal_add_set_not_prat_set";
   234 
   234 
   235 (** Part 3 of Dedekind sections def **)
   235 (** Part 3 of Dedekind sections def **)
   236 Goal "!y: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x + y}. \
   236 Goal "ALL y: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x + y}. \
   237 \         !z. z < y --> z : {w. ? x:Rep_preal R. ? y:Rep_preal S. w = x + y}";
   237 \         ALL z. z < y --> z : {w. EX x:Rep_preal R. EX y:Rep_preal S. w = x + y}";
   238 by Auto_tac;
   238 by Auto_tac;
   239 by (ftac prat_mult_qinv_less_1 1);
   239 by (ftac prat_mult_qinv_less_1 1);
   240 by (forw_inst_tac [("x","x"),("q2.0","prat_of_pnat (Abs_pnat 1)")] 
   240 by (forw_inst_tac [("x","x"),("q2.0","prat_of_pnat (Abs_pnat 1)")] 
   241     prat_mult_less2_mono1 1);
   241     prat_mult_less2_mono1 1);
   242 by (forw_inst_tac [("x","ya"),("q2.0","prat_of_pnat (Abs_pnat 1)")] 
   242 by (forw_inst_tac [("x","ya"),("q2.0","prat_of_pnat (Abs_pnat 1)")] 
   248 by (REPEAT(rtac bexI 1));
   248 by (REPEAT(rtac bexI 1));
   249 by (auto_tac (claset(),simpset() addsimps [prat_add_mult_distrib2 
   249 by (auto_tac (claset(),simpset() addsimps [prat_add_mult_distrib2 
   250      RS sym,prat_add_assoc RS sym,prat_mult_assoc]));
   250      RS sym,prat_add_assoc RS sym,prat_mult_assoc]));
   251 qed "preal_add_set_lemma3";
   251 qed "preal_add_set_lemma3";
   252 
   252 
   253 Goal "!y: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x + y}. \
   253 Goal "ALL y: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x + y}. \
   254 \         ? u: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x + y}. y < u";
   254 \         EX u: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x + y}. y < u";
   255 by Auto_tac;
   255 by Auto_tac;
   256 by (dtac (Rep_preal RS prealE_lemma4a) 1);
   256 by (dtac (Rep_preal RS prealE_lemma4a) 1);
   257 by (auto_tac (claset() addIs [prat_add_less2_mono1],simpset()));
   257 by (auto_tac (claset() addIs [prat_add_less2_mono1],simpset()));
   258 qed "preal_add_set_lemma4";
   258 qed "preal_add_set_lemma4";
   259 
   259 
   260 Goal "{w. ? x: Rep_preal R. ? y: Rep_preal S. w = x + y} : preal";
   260 Goal "{w. EX x: Rep_preal R. EX y: Rep_preal S. w = x + y} : preal";
   261 by (rtac prealI2 1);
   261 by (rtac prealI2 1);
   262 by (rtac preal_add_set_not_empty 1);
   262 by (rtac preal_add_set_not_empty 1);
   263 by (rtac preal_add_set_not_prat_set 1);
   263 by (rtac preal_add_set_not_prat_set 1);
   264 by (rtac preal_add_set_lemma3 1);
   264 by (rtac preal_add_set_lemma3 1);
   265 by (rtac preal_add_set_lemma4 1);
   265 by (rtac preal_add_set_lemma4 1);
   295 
   295 
   296 (** multiplication of two positive reals gives a positive real **)
   296 (** multiplication of two positive reals gives a positive real **)
   297 (** lemmas for proving positive reals multiplication set in preal **)
   297 (** lemmas for proving positive reals multiplication set in preal **)
   298 
   298 
   299 (** Part 1 of Dedekind sections def **)
   299 (** Part 1 of Dedekind sections def **)
   300 Goal "{} < {w. ? x: Rep_preal R. ? y:Rep_preal S. w = x * y}";
   300 Goal "{} < {w. EX x: Rep_preal R. EX y:Rep_preal S. w = x * y}";
   301 by (cut_facts_tac [mem_Rep_preal_Ex,mem_Rep_preal_Ex] 1);
   301 by (cut_facts_tac [mem_Rep_preal_Ex,mem_Rep_preal_Ex] 1);
   302 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
   302 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
   303 qed "preal_mult_set_not_empty";
   303 qed "preal_mult_set_not_empty";
   304 
   304 
   305 (** Part 2 of Dedekind sections def **)
   305 (** Part 2 of Dedekind sections def **)
   306 Goal "? q. q  ~: {w. ? x: Rep_preal R. ? y:Rep_preal S. w = x * y}";
   306 Goal "EX q. q  ~: {w. EX x: Rep_preal R. EX y:Rep_preal S. w = x * y}";
   307 by (cut_inst_tac [("X","R")] not_mem_Rep_preal_Ex 1);
   307 by (cut_inst_tac [("X","R")] not_mem_Rep_preal_Ex 1);
   308 by (cut_inst_tac [("X","S")] not_mem_Rep_preal_Ex 1);
   308 by (cut_inst_tac [("X","S")] not_mem_Rep_preal_Ex 1);
   309 by (REPEAT(etac exE 1));
   309 by (REPEAT(etac exE 1));
   310 by (REPEAT(dtac not_in_preal_ub 1));
   310 by (REPEAT(dtac not_in_preal_ub 1));
   311 by (res_inst_tac [("x","x*xa")] exI 1);
   311 by (res_inst_tac [("x","x*xa")] exI 1);
   312 by (Auto_tac  THEN (REPEAT(etac ballE 1)) THEN Auto_tac );
   312 by (Auto_tac  THEN (REPEAT(etac ballE 1)) THEN Auto_tac );
   313 by (dtac prat_mult_less_mono 1);
   313 by (dtac prat_mult_less_mono 1);
   314 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl]));
   314 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl]));
   315 qed "preal_not_mem_mult_set_Ex";
   315 qed "preal_not_mem_mult_set_Ex";
   316 
   316 
   317 Goal "{w. ? x: Rep_preal R. ? y:Rep_preal S. w = x * y} < UNIV";
   317 Goal "{w. EX x: Rep_preal R. EX y:Rep_preal S. w = x * y} < UNIV";
   318 by (auto_tac (claset() addSIs [psubsetI],simpset()));
   318 by (auto_tac (claset() addSIs [psubsetI],simpset()));
   319 by (cut_inst_tac [("R","R"),("S","S")] preal_not_mem_mult_set_Ex 1);
   319 by (cut_inst_tac [("R","R"),("S","S")] preal_not_mem_mult_set_Ex 1);
   320 by (etac exE 1);
   320 by (etac exE 1);
   321 by (eres_inst_tac [("c","q")] equalityCE 1);
   321 by (eres_inst_tac [("c","q")] equalityCE 1);
   322 by Auto_tac;
   322 by Auto_tac;
   323 qed "preal_mult_set_not_prat_set";
   323 qed "preal_mult_set_not_prat_set";
   324 
   324 
   325 (** Part 3 of Dedekind sections def **)
   325 (** Part 3 of Dedekind sections def **)
   326 Goal "!y: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x * y}. \
   326 Goal "ALL y: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x * y}. \
   327 \         !z. z < y --> z : {w. ? x:Rep_preal R. ? y:Rep_preal S. w = x * y}";
   327 \         ALL z. z < y --> z : {w. EX x:Rep_preal R. EX y:Rep_preal S. w = x * y}";
   328 by Auto_tac;
   328 by Auto_tac;
   329 by (forw_inst_tac [("x","qinv(ya)"),("q1.0","z")] 
   329 by (forw_inst_tac [("x","qinv(ya)"),("q1.0","z")] 
   330     prat_mult_left_less2_mono1 1);
   330     prat_mult_left_less2_mono1 1);
   331 by (asm_full_simp_tac (simpset() addsimps prat_mult_ac) 1);
   331 by (asm_full_simp_tac (simpset() addsimps prat_mult_ac) 1);
   332 by (dtac (Rep_preal RS prealE_lemma3a) 1);
   332 by (dtac (Rep_preal RS prealE_lemma3a) 1);
   333 by (etac allE 1);
   333 by (etac allE 1);
   334 by (REPEAT(rtac bexI 1));
   334 by (REPEAT(rtac bexI 1));
   335 by (auto_tac (claset(),simpset() addsimps [prat_mult_assoc]));
   335 by (auto_tac (claset(),simpset() addsimps [prat_mult_assoc]));
   336 qed "preal_mult_set_lemma3";
   336 qed "preal_mult_set_lemma3";
   337 
   337 
   338 Goal "!y: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x * y}. \
   338 Goal "ALL y: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x * y}. \
   339 \         ? u: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x * y}. y < u";
   339 \         EX u: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x * y}. y < u";
   340 by Auto_tac;
   340 by Auto_tac;
   341 by (dtac (Rep_preal RS prealE_lemma4a) 1);
   341 by (dtac (Rep_preal RS prealE_lemma4a) 1);
   342 by (auto_tac (claset() addIs [prat_mult_less2_mono1],simpset()));
   342 by (auto_tac (claset() addIs [prat_mult_less2_mono1],simpset()));
   343 qed "preal_mult_set_lemma4";
   343 qed "preal_mult_set_lemma4";
   344 
   344 
   345 Goal "{w. ? x: Rep_preal R. ? y: Rep_preal S. w = x * y} : preal";
   345 Goal "{w. EX x: Rep_preal R. EX y: Rep_preal S. w = x * y} : preal";
   346 by (rtac prealI2 1);
   346 by (rtac prealI2 1);
   347 by (rtac preal_mult_set_not_empty 1);
   347 by (rtac preal_mult_set_not_empty 1);
   348 by (rtac preal_mult_set_not_prat_set 1);
   348 by (rtac preal_mult_set_not_prat_set 1);
   349 by (rtac preal_mult_set_lemma3 1);
   349 by (rtac preal_mult_set_lemma3 1);
   350 by (rtac preal_mult_set_lemma4 1);
   350 by (rtac preal_mult_set_lemma4 1);
   408 (** lemmas for the proof **)
   408 (** lemmas for the proof **)
   409 
   409 
   410  (** lemmas **)
   410  (** lemmas **)
   411 Goalw [preal_add_def] 
   411 Goalw [preal_add_def] 
   412       "z: Rep_preal(R+S) ==> \
   412       "z: Rep_preal(R+S) ==> \
   413 \           ? x: Rep_preal(R). ? y: Rep_preal(S). z = x + y";
   413 \           EX x: Rep_preal(R). EX y: Rep_preal(S). z = x + y";
   414 by (dtac (preal_mem_add_set RS Abs_preal_inverse RS subst) 1);
   414 by (dtac (preal_mem_add_set RS Abs_preal_inverse RS subst) 1);
   415 by (Fast_tac 1);
   415 by (Fast_tac 1);
   416 qed "mem_Rep_preal_addD";
   416 qed "mem_Rep_preal_addD";
   417 
   417 
   418 Goalw [preal_add_def] 
   418 Goalw [preal_add_def] 
   419       "? x: Rep_preal(R). ? y: Rep_preal(S). z = x + y \
   419       "EX x: Rep_preal(R). EX y: Rep_preal(S). z = x + y \
   420 \      ==> z: Rep_preal(R+S)";
   420 \      ==> z: Rep_preal(R+S)";
   421 by (rtac (preal_mem_add_set RS Abs_preal_inverse RS ssubst) 1);
   421 by (rtac (preal_mem_add_set RS Abs_preal_inverse RS ssubst) 1);
   422 by (Fast_tac 1);
   422 by (Fast_tac 1);
   423 qed "mem_Rep_preal_addI";
   423 qed "mem_Rep_preal_addI";
   424 
   424 
   425 Goal " z: Rep_preal(R+S) = (? x: Rep_preal(R). \
   425 Goal " z: Rep_preal(R+S) = (EX x: Rep_preal(R). \
   426 \                                 ? y: Rep_preal(S). z = x + y)";
   426 \                                 EX y: Rep_preal(S). z = x + y)";
   427 by (fast_tac (claset() addSIs [mem_Rep_preal_addD,mem_Rep_preal_addI]) 1);
   427 by (fast_tac (claset() addSIs [mem_Rep_preal_addD,mem_Rep_preal_addI]) 1);
   428 qed "mem_Rep_preal_add_iff";
   428 qed "mem_Rep_preal_add_iff";
   429 
   429 
   430 Goalw [preal_mult_def] 
   430 Goalw [preal_mult_def] 
   431       "z: Rep_preal(R*S) ==> \
   431       "z: Rep_preal(R*S) ==> \
   432 \           ? x: Rep_preal(R). ? y: Rep_preal(S). z = x * y";
   432 \           EX x: Rep_preal(R). EX y: Rep_preal(S). z = x * y";
   433 by (dtac (preal_mem_mult_set RS Abs_preal_inverse RS subst) 1);
   433 by (dtac (preal_mem_mult_set RS Abs_preal_inverse RS subst) 1);
   434 by (Fast_tac 1);
   434 by (Fast_tac 1);
   435 qed "mem_Rep_preal_multD";
   435 qed "mem_Rep_preal_multD";
   436 
   436 
   437 Goalw [preal_mult_def] 
   437 Goalw [preal_mult_def] 
   438       "? x: Rep_preal(R). ? y: Rep_preal(S). z = x * y \
   438       "EX x: Rep_preal(R). EX y: Rep_preal(S). z = x * y \
   439 \      ==> z: Rep_preal(R*S)";
   439 \      ==> z: Rep_preal(R*S)";
   440 by (rtac (preal_mem_mult_set RS Abs_preal_inverse RS ssubst) 1);
   440 by (rtac (preal_mem_mult_set RS Abs_preal_inverse RS ssubst) 1);
   441 by (Fast_tac 1);
   441 by (Fast_tac 1);
   442 qed "mem_Rep_preal_multI";
   442 qed "mem_Rep_preal_multI";
   443 
   443 
   444 Goal " z: Rep_preal(R*S) = (? x: Rep_preal(R). \
   444 Goal " z: Rep_preal(R*S) = (EX x: Rep_preal(R). \
   445 \                                 ? y: Rep_preal(S). z = x * y)";
   445 \                                 EX y: Rep_preal(S). z = x * y)";
   446 by (fast_tac (claset() addSIs [mem_Rep_preal_multD,mem_Rep_preal_multI]) 1);
   446 by (fast_tac (claset() addSIs [mem_Rep_preal_multD,mem_Rep_preal_multI]) 1);
   447 qed "mem_Rep_preal_mult_iff";
   447 qed "mem_Rep_preal_mult_iff";
   448 
   448 
   449 (** More lemmas for preal_add_mult_distrib2 **)
   449 (** More lemmas for preal_add_mult_distrib2 **)
   450 goal PRat.thy "!!(a1::prat). a1 < a2 ==> a1 * b + a2 * c < a2 * (b + c)";
   450 goal PRat.thy "!!(a1::prat). a1 < a2 ==> a1 * b + a2 * c < a2 * (b + c)";
   505 qed "preal_add_mult_distrib";
   505 qed "preal_add_mult_distrib";
   506 
   506 
   507 (*** Prove existence of inverse ***)
   507 (*** Prove existence of inverse ***)
   508 (*** Inverse is a positive real ***)
   508 (*** Inverse is a positive real ***)
   509 
   509 
   510 Goal "? y. qinv(y) ~:  Rep_preal X";
   510 Goal "EX y. qinv(y) ~:  Rep_preal X";
   511 by (cut_inst_tac [("X","X")] not_mem_Rep_preal_Ex 1);
   511 by (cut_inst_tac [("X","X")] not_mem_Rep_preal_Ex 1);
   512 by (etac exE 1 THEN cut_inst_tac [("x","x")] prat_as_inverse_ex 1);
   512 by (etac exE 1 THEN cut_inst_tac [("x","x")] prat_as_inverse_ex 1);
   513 by Auto_tac;
   513 by Auto_tac;
   514 qed "qinv_not_mem_Rep_preal_Ex";
   514 qed "qinv_not_mem_Rep_preal_Ex";
   515 
   515 
   516 Goal "? q. q: {x. ? y. x < y & qinv y ~:  Rep_preal A}";
   516 Goal "EX q. q: {x. EX y. x < y & qinv y ~:  Rep_preal A}";
   517 by (cut_inst_tac [("X","A")] qinv_not_mem_Rep_preal_Ex 1);
   517 by (cut_inst_tac [("X","A")] qinv_not_mem_Rep_preal_Ex 1);
   518 by Auto_tac;
   518 by Auto_tac;
   519 by (cut_inst_tac [("y","y")] qless_Ex 1);
   519 by (cut_inst_tac [("y","y")] qless_Ex 1);
   520 by (Fast_tac 1);
   520 by (Fast_tac 1);
   521 qed "lemma_preal_mem_inv_set_ex";
   521 qed "lemma_preal_mem_inv_set_ex";
   522 
   522 
   523 (** Part 1 of Dedekind sections def **)
   523 (** Part 1 of Dedekind sections def **)
   524 Goal "{} < {x. ? y. x < y & qinv y ~:  Rep_preal A}";
   524 Goal "{} < {x. EX y. x < y & qinv y ~:  Rep_preal A}";
   525 by (cut_facts_tac [lemma_preal_mem_inv_set_ex] 1);
   525 by (cut_facts_tac [lemma_preal_mem_inv_set_ex] 1);
   526 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
   526 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
   527 qed "preal_inv_set_not_empty";
   527 qed "preal_inv_set_not_empty";
   528 
   528 
   529 (** Part 2 of Dedekind sections def **)
   529 (** Part 2 of Dedekind sections def **)
   530 Goal "? y. qinv(y) :  Rep_preal X";
   530 Goal "EX y. qinv(y) :  Rep_preal X";
   531 by (cut_inst_tac [("X","X")] mem_Rep_preal_Ex 1);
   531 by (cut_inst_tac [("X","X")] mem_Rep_preal_Ex 1);
   532 by (etac exE 1 THEN cut_inst_tac [("x","x")] prat_as_inverse_ex 1);
   532 by (etac exE 1 THEN cut_inst_tac [("x","x")] prat_as_inverse_ex 1);
   533 by Auto_tac;
   533 by Auto_tac;
   534 qed "qinv_mem_Rep_preal_Ex";
   534 qed "qinv_mem_Rep_preal_Ex";
   535 
   535 
   536 Goal "? x. x ~: {x. ? y. x < y & qinv y ~:  Rep_preal A}";
   536 Goal "EX x. x ~: {x. EX y. x < y & qinv y ~:  Rep_preal A}";
   537 by (rtac ccontr 1);
   537 by (rtac ccontr 1);
   538 by (cut_inst_tac [("X","A")] qinv_mem_Rep_preal_Ex 1);
   538 by (cut_inst_tac [("X","A")] qinv_mem_Rep_preal_Ex 1);
   539 by Auto_tac;
   539 by Auto_tac;
   540 by (EVERY1[etac allE, etac exE, etac conjE]);
   540 by (EVERY1[etac allE, etac exE, etac conjE]);
   541 by (dtac qinv_prat_less 1 THEN dtac not_in_preal_ub 1);
   541 by (dtac qinv_prat_less 1 THEN dtac not_in_preal_ub 1);
   542 by (eres_inst_tac [("x","qinv y")] ballE 1);
   542 by (eres_inst_tac [("x","qinv y")] ballE 1);
   543 by (dtac prat_less_trans 1);
   543 by (dtac prat_less_trans 1);
   544 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl]));
   544 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl]));
   545 qed "preal_not_mem_inv_set_Ex";
   545 qed "preal_not_mem_inv_set_Ex";
   546 
   546 
   547 Goal "{x. ? y. x < y & qinv y ~:  Rep_preal A} < UNIV";
   547 Goal "{x. EX y. x < y & qinv y ~:  Rep_preal A} < UNIV";
   548 by (auto_tac (claset() addSIs [psubsetI],simpset()));
   548 by (auto_tac (claset() addSIs [psubsetI],simpset()));
   549 by (cut_inst_tac [("A","A")]  preal_not_mem_inv_set_Ex 1);
   549 by (cut_inst_tac [("A","A")]  preal_not_mem_inv_set_Ex 1);
   550 by (etac exE 1);
   550 by (etac exE 1);
   551 by (eres_inst_tac [("c","x")] equalityCE 1);
   551 by (eres_inst_tac [("c","x")] equalityCE 1);
   552 by Auto_tac;
   552 by Auto_tac;
   553 qed "preal_inv_set_not_prat_set";
   553 qed "preal_inv_set_not_prat_set";
   554 
   554 
   555 (** Part 3 of Dedekind sections def **)
   555 (** Part 3 of Dedekind sections def **)
   556 Goal "! y: {x. ? y. x < y & qinv y ~: Rep_preal A}. \
   556 Goal "ALL y: {x. EX y. x < y & qinv y ~: Rep_preal A}. \
   557  \      !z. z < y --> z : {x. ? y. x < y & qinv y ~: Rep_preal A}";
   557  \      ALL z. z < y --> z : {x. EX y. x < y & qinv y ~: Rep_preal A}";
   558 by Auto_tac;
   558 by Auto_tac;
   559 by (res_inst_tac [("x","ya")] exI 1);
   559 by (res_inst_tac [("x","ya")] exI 1);
   560 by (auto_tac (claset() addIs [prat_less_trans],simpset()));
   560 by (auto_tac (claset() addIs [prat_less_trans],simpset()));
   561 qed "preal_inv_set_lemma3";
   561 qed "preal_inv_set_lemma3";
   562 
   562 
   563 Goal "! y: {x. ? y. x < y & qinv y ~: Rep_preal A}. \
   563 Goal "ALL y: {x. EX y. x < y & qinv y ~: Rep_preal A}. \
   564 \       Bex {x. ? y. x < y & qinv y ~: Rep_preal A} (op < y)";
   564 \       Bex {x. EX y. x < y & qinv y ~: Rep_preal A} (op < y)";
   565 by (blast_tac (claset() addDs [prat_dense]) 1);
   565 by (blast_tac (claset() addDs [prat_dense]) 1);
   566 qed "preal_inv_set_lemma4";
   566 qed "preal_inv_set_lemma4";
   567 
   567 
   568 Goal "{x. ? y. x < y & qinv(y) ~: Rep_preal(A)} : preal";
   568 Goal "{x. EX y. x < y & qinv(y) ~: Rep_preal(A)} : preal";
   569 by (rtac prealI2 1);
   569 by (rtac prealI2 1);
   570 by (rtac preal_inv_set_not_empty 1);
   570 by (rtac preal_inv_set_not_empty 1);
   571 by (rtac preal_inv_set_not_prat_set 1);
   571 by (rtac preal_inv_set_not_prat_set 1);
   572 by (rtac preal_inv_set_lemma3 1);
   572 by (rtac preal_inv_set_lemma3 1);
   573 by (rtac preal_inv_set_lemma4 1);
   573 by (rtac preal_inv_set_lemma4 1);
   583 by (dtac prat_mult_less_mono 1 THEN Blast_tac 1);
   583 by (dtac prat_mult_less_mono 1 THEN Blast_tac 1);
   584 by (auto_tac (claset(),simpset()));
   584 by (auto_tac (claset(),simpset()));
   585 qed "preal_mem_mult_invD";
   585 qed "preal_mem_mult_invD";
   586 
   586 
   587 (*** Gleason's Lemma 9-3.4 p 122 ***)
   587 (*** Gleason's Lemma 9-3.4 p 122 ***)
   588 Goal "! xa : Rep_preal(A). xa + x : Rep_preal(A) ==> \
   588 Goal "ALL xa : Rep_preal(A). xa + x : Rep_preal(A) ==> \
   589 \            ? xb : Rep_preal(A). xb + (prat_of_pnat p)*x : Rep_preal(A)";
   589 \            EX xb : Rep_preal(A). xb + (prat_of_pnat p)*x : Rep_preal(A)";
   590 by (cut_facts_tac [mem_Rep_preal_Ex] 1);
   590 by (cut_facts_tac [mem_Rep_preal_Ex] 1);
   591 by (res_inst_tac [("n","p")] pnat_induct 1);
   591 by (res_inst_tac [("n","p")] pnat_induct 1);
   592 by (auto_tac (claset(),simpset() addsimps [pnat_one_def,
   592 by (auto_tac (claset(),simpset() addsimps [pnat_one_def,
   593     pSuc_is_plus_one,prat_add_mult_distrib,
   593     pSuc_is_plus_one,prat_add_mult_distrib,
   594    prat_of_pnat_add,prat_add_assoc RS sym]));
   594    prat_of_pnat_add,prat_add_assoc RS sym]));
   601 by (rtac prat_self_less_add_right 2);
   601 by (rtac prat_self_less_add_right 2);
   602 by (auto_tac (claset() addIs [lemma_Abs_prat_le3],
   602 by (auto_tac (claset() addIs [lemma_Abs_prat_le3],
   603     simpset() addsimps [prat_mult,pre_lemma_gleason9_34b,pnat_mult_assoc]));
   603     simpset() addsimps [prat_mult,pre_lemma_gleason9_34b,pnat_mult_assoc]));
   604 qed "lemma1b_gleason9_34";
   604 qed "lemma1b_gleason9_34";
   605 
   605 
   606 Goal "! xa : Rep_preal(A). xa + x : Rep_preal(A) ==> False";
   606 Goal "ALL xa : Rep_preal(A). xa + x : Rep_preal(A) ==> False";
   607 by (cut_inst_tac [("X","A")] not_mem_Rep_preal_Ex 1);
   607 by (cut_inst_tac [("X","A")] not_mem_Rep_preal_Ex 1);
   608 by (etac exE 1);
   608 by (etac exE 1);
   609 by (dtac not_in_preal_ub 1);
   609 by (dtac not_in_preal_ub 1);
   610 by (res_inst_tac [("z","x")] eq_Abs_prat 1);
   610 by (res_inst_tac [("z","x")] eq_Abs_prat 1);
   611 by (res_inst_tac [("z","xa")] eq_Abs_prat 1);
   611 by (res_inst_tac [("z","xa")] eq_Abs_prat 1);
   616 by (dres_inst_tac [("x","xba + prat_of_pnat (y * xb) * x")]  bspec 1);
   616 by (dres_inst_tac [("x","xba + prat_of_pnat (y * xb) * x")]  bspec 1);
   617 by (auto_tac (claset() addIs [prat_less_asym],
   617 by (auto_tac (claset() addIs [prat_less_asym],
   618     simpset() addsimps [prat_of_pnat_def]));
   618     simpset() addsimps [prat_of_pnat_def]));
   619 qed "lemma_gleason9_34a";
   619 qed "lemma_gleason9_34a";
   620 
   620 
   621 Goal "? r: Rep_preal(R). r + x ~: Rep_preal(R)";
   621 Goal "EX r: Rep_preal(R). r + x ~: Rep_preal(R)";
   622 by (rtac ccontr 1);
   622 by (rtac ccontr 1);
   623 by (blast_tac (claset() addIs [lemma_gleason9_34a]) 1);
   623 by (blast_tac (claset() addIs [lemma_gleason9_34a]) 1);
   624 qed "lemma_gleason9_34";
   624 qed "lemma_gleason9_34";
   625 
   625 
   626 (*** Gleason's Lemma 9-3.6  ***)
   626 (*** Gleason's Lemma 9-3.6  ***)
   637 by (full_simp_tac (simpset() addsimps prat_mult_ac) 1);
   637 by (full_simp_tac (simpset() addsimps prat_mult_ac) 1);
   638 qed "lemma2_gleason9_36";
   638 qed "lemma2_gleason9_36";
   639 (******)
   639 (******)
   640 
   640 
   641 (*** FIXME: long! ***)
   641 (*** FIXME: long! ***)
   642 Goal "prat_of_pnat 1p < x ==> ? r: Rep_preal(A). r*x ~: Rep_preal(A)";
   642 Goal "prat_of_pnat 1p < x ==> EX r: Rep_preal(A). r*x ~: Rep_preal(A)";
   643 by (res_inst_tac [("X1","A")] (mem_Rep_preal_Ex RS exE) 1);
   643 by (res_inst_tac [("X1","A")] (mem_Rep_preal_Ex RS exE) 1);
   644 by (res_inst_tac [("Q","xa*x : Rep_preal(A)")] (excluded_middle RS disjE) 1);
   644 by (res_inst_tac [("Q","xa*x : Rep_preal(A)")] (excluded_middle RS disjE) 1);
   645 by (Fast_tac 1);
   645 by (Fast_tac 1);
   646 by (dres_inst_tac [("x","xa")] prat_self_less_mult_right 1);
   646 by (dres_inst_tac [("x","xa")] prat_self_less_mult_right 1);
   647 by (etac prat_lessE 1);
   647 by (etac prat_lessE 1);
   661 by (dres_inst_tac [("y","r*x")] (Rep_preal RS prealE_lemma3b) 1);
   661 by (dres_inst_tac [("y","r*x")] (Rep_preal RS prealE_lemma3b) 1);
   662 by Auto_tac;
   662 by Auto_tac;
   663 qed "lemma_gleason9_36";
   663 qed "lemma_gleason9_36";
   664 
   664 
   665 Goal "prat_of_pnat (Abs_pnat 1) < x ==> \
   665 Goal "prat_of_pnat (Abs_pnat 1) < x ==> \
   666 \     ? r: Rep_preal(A). r*x ~: Rep_preal(A)";
   666 \     EX r: Rep_preal(A). r*x ~: Rep_preal(A)";
   667 by (rtac lemma_gleason9_36 1);
   667 by (rtac lemma_gleason9_36 1);
   668 by (asm_simp_tac (simpset() addsimps [pnat_one_def]) 1);
   668 by (asm_simp_tac (simpset() addsimps [pnat_one_def]) 1);
   669 qed "lemma_gleason9_36a";
   669 qed "lemma_gleason9_36a";
   670 
   670 
   671 (*** Part 2 of existence of inverse ***)
   671 (*** Part 2 of existence of inverse ***)
   811 (**** Set up all lemmas for proving A < B ==> ?D. A + D = B ****)
   811 (**** Set up all lemmas for proving A < B ==> ?D. A + D = B ****)
   812 (**** Gleason prop. 9-3.5(iv) p. 123 ****)
   812 (**** Gleason prop. 9-3.5(iv) p. 123 ****)
   813 (**** Define the D required and show that it is a positive real ****)
   813 (**** Define the D required and show that it is a positive real ****)
   814 
   814 
   815 (* useful lemmas - proved elsewhere? *)
   815 (* useful lemmas - proved elsewhere? *)
   816 Goalw [psubset_def] "A < B ==> ? x. x ~: A & x : B";
   816 Goalw [psubset_def] "A < B ==> EX x. x ~: A & x : B";
   817 by (etac conjE 1);
   817 by (etac conjE 1);
   818 by (etac swap 1);
   818 by (etac swap 1);
   819 by (etac equalityI 1);
   819 by (etac equalityI 1);
   820 by Auto_tac;
   820 by Auto_tac;
   821 qed "lemma_psubset_mem";
   821 qed "lemma_psubset_mem";
   841 qed "psubsetD";
   841 qed "psubsetD";
   842 
   842 
   843 (** Part 1 of Dedekind sections def **)
   843 (** Part 1 of Dedekind sections def **)
   844 Goalw [preal_less_def]
   844 Goalw [preal_less_def]
   845      "A < B ==> \
   845      "A < B ==> \
   846 \     ? q. q : {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}";
   846 \     EX q. q : {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}";
   847 by (EVERY1[dtac lemma_psubset_mem, etac exE, etac conjE]);
   847 by (EVERY1[dtac lemma_psubset_mem, etac exE, etac conjE]);
   848 by (dres_inst_tac [("x1","B")] (Rep_preal RS prealE_lemma4a) 1);
   848 by (dres_inst_tac [("x1","B")] (Rep_preal RS prealE_lemma4a) 1);
   849 by (auto_tac (claset(),simpset() addsimps [prat_less_def]));
   849 by (auto_tac (claset(),simpset() addsimps [prat_less_def]));
   850 qed "lemma_ex_mem_less_left_add1";
   850 qed "lemma_ex_mem_less_left_add1";
   851 
   851 
   852 Goal
   852 Goal
   853      "A < B ==> \
   853      "A < B ==> \
   854 \       {} < {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}";
   854 \       {} < {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}";
   855 by (dtac lemma_ex_mem_less_left_add1 1);
   855 by (dtac lemma_ex_mem_less_left_add1 1);
   856 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
   856 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
   857 qed "preal_less_set_not_empty";
   857 qed "preal_less_set_not_empty";
   858 
   858 
   859 (** Part 2 of Dedekind sections def **)
   859 (** Part 2 of Dedekind sections def **)
   860 Goal "? q. q ~: {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}";
   860 Goal "EX q. q ~: {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}";
   861 by (cut_inst_tac [("X","B")] not_mem_Rep_preal_Ex 1);
   861 by (cut_inst_tac [("X","B")] not_mem_Rep_preal_Ex 1);
   862 by (etac exE 1);
   862 by (etac exE 1);
   863 by (res_inst_tac [("x","x")] exI 1);
   863 by (res_inst_tac [("x","x")] exI 1);
   864 by Auto_tac;
   864 by Auto_tac;
   865 by (cut_inst_tac [("x","x"),("y","n")] prat_self_less_add_right 1);
   865 by (cut_inst_tac [("x","x"),("y","n")] prat_self_less_add_right 1);
   866 by (auto_tac (claset() addDs [Rep_preal RS prealE_lemma3b],simpset()));
   866 by (auto_tac (claset() addDs [Rep_preal RS prealE_lemma3b],simpset()));
   867 qed "lemma_ex_not_mem_less_left_add1";
   867 qed "lemma_ex_not_mem_less_left_add1";
   868 
   868 
   869 Goal "{d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)} < UNIV";
   869 Goal "{d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)} < UNIV";
   870 by (auto_tac (claset() addSIs [psubsetI],simpset()));
   870 by (auto_tac (claset() addSIs [psubsetI],simpset()));
   871 by (cut_inst_tac [("A","A"),("B","B")] lemma_ex_not_mem_less_left_add1 1);
   871 by (cut_inst_tac [("A","A"),("B","B")] lemma_ex_not_mem_less_left_add1 1);
   872 by (etac exE 1);
   872 by (etac exE 1);
   873 by (eres_inst_tac [("c","q")] equalityCE 1);
   873 by (eres_inst_tac [("c","q")] equalityCE 1);
   874 by Auto_tac;
   874 by Auto_tac;
   875 qed "preal_less_set_not_prat_set";
   875 qed "preal_less_set_not_prat_set";
   876 
   876 
   877 (** Part 3 of Dedekind sections def **)
   877 (** Part 3 of Dedekind sections def **)
   878 Goal "A < B ==> ! y: {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}. \
   878 Goal "A < B ==> ALL y: {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}. \
   879  \      !z. z < y --> z : {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}";
   879  \      ALL z. z < y --> z : {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}";
   880 by Auto_tac;
   880 by Auto_tac;
   881 by (dres_inst_tac [("x","n")] prat_add_less2_mono2 1);
   881 by (dres_inst_tac [("x","n")] prat_add_less2_mono2 1);
   882 by (dtac (Rep_preal RS prealE_lemma3b) 1);
   882 by (dtac (Rep_preal RS prealE_lemma3b) 1);
   883 by Auto_tac;
   883 by Auto_tac;
   884 qed "preal_less_set_lemma3";
   884 qed "preal_less_set_lemma3";
   885 
   885 
   886 Goal "A < B ==> ! y: {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}. \
   886 Goal "A < B ==> ALL y: {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}. \
   887 \       Bex {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)} (op < y)";
   887 \       Bex {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)} (op < y)";
   888 by Auto_tac;
   888 by Auto_tac;
   889 by (dtac (Rep_preal RS prealE_lemma4a) 1);
   889 by (dtac (Rep_preal RS prealE_lemma4a) 1);
   890 by (auto_tac (claset(),simpset() addsimps [prat_less_def,prat_add_assoc]));
   890 by (auto_tac (claset(),simpset() addsimps [prat_less_def,prat_add_assoc]));
   891 qed "preal_less_set_lemma4";
   891 qed "preal_less_set_lemma4";
   892 
   892 
   893 Goal 
   893 Goal 
   894      "!! (A::preal). A < B ==> \
   894      "!! (A::preal). A < B ==> \
   895 \     {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}: preal";
   895 \     {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}: preal";
   896 by (rtac prealI2 1);
   896 by (rtac prealI2 1);
   897 by (rtac preal_less_set_not_empty 1);
   897 by (rtac preal_less_set_not_empty 1);
   898 by (rtac preal_less_set_not_prat_set 2);
   898 by (rtac preal_less_set_not_prat_set 2);
   899 by (rtac preal_less_set_lemma3 2);
   899 by (rtac preal_less_set_lemma3 2);
   900 by (rtac preal_less_set_lemma4 3);
   900 by (rtac preal_less_set_lemma4 3);
   902 qed "preal_mem_less_set";
   902 qed "preal_mem_less_set";
   903 
   903 
   904 (** proving that A + D <= B **)
   904 (** proving that A + D <= B **)
   905 Goalw [preal_le_def] 
   905 Goalw [preal_le_def] 
   906        "!! (A::preal). A < B ==> \
   906        "!! (A::preal). A < B ==> \
   907 \         A + Abs_preal({d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}) <= B";
   907 \         A + Abs_preal({d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}) <= B";
   908 by (rtac subsetI 1);
   908 by (rtac subsetI 1);
   909 by (dtac mem_Rep_preal_addD 1);
   909 by (dtac mem_Rep_preal_addD 1);
   910 by (auto_tac (claset(),simpset() addsimps [
   910 by (auto_tac (claset(),simpset() addsimps [
   911     preal_mem_less_set RS Abs_preal_inverse]));
   911     preal_mem_less_set RS Abs_preal_inverse]));
   912 by (dtac not_in_preal_ub 1);
   912 by (dtac not_in_preal_ub 1);
   916 by Auto_tac;
   916 by Auto_tac;
   917 qed "preal_less_add_left_subsetI";
   917 qed "preal_less_add_left_subsetI";
   918 
   918 
   919 (** proving that B <= A + D  --- trickier **)
   919 (** proving that B <= A + D  --- trickier **)
   920 (** lemma **)
   920 (** lemma **)
   921 Goal "x : Rep_preal(B) ==> ? e. x + e : Rep_preal(B)";
   921 Goal "x : Rep_preal(B) ==> EX e. x + e : Rep_preal(B)";
   922 by (dtac (Rep_preal RS prealE_lemma4a) 1);
   922 by (dtac (Rep_preal RS prealE_lemma4a) 1);
   923 by (auto_tac (claset(),simpset() addsimps [prat_less_def]));
   923 by (auto_tac (claset(),simpset() addsimps [prat_less_def]));
   924 qed "lemma_sum_mem_Rep_preal_ex";
   924 qed "lemma_sum_mem_Rep_preal_ex";
   925 
   925 
   926 Goalw [preal_le_def] 
   926 Goalw [preal_le_def] 
   927        "!! (A::preal). A < B ==> \
   927        "!! (A::preal). A < B ==> \
   928 \         B <= A + Abs_preal({d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)})";
   928 \         B <= A + Abs_preal({d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)})";
   929 by (rtac subsetI 1);
   929 by (rtac subsetI 1);
   930 by (res_inst_tac [("Q","x: Rep_preal(A)")] (excluded_middle RS disjE) 1);
   930 by (res_inst_tac [("Q","x: Rep_preal(A)")] (excluded_middle RS disjE) 1);
   931 by (rtac mem_Rep_preal_addI 1);
   931 by (rtac mem_Rep_preal_addI 1);
   932 by (dtac lemma_sum_mem_Rep_preal_ex 1);
   932 by (dtac lemma_sum_mem_Rep_preal_ex 1);
   933 by (etac exE 1);
   933 by (etac exE 1);
   943 by (asm_full_simp_tac (simpset() addsimps prat_add_ac) 1);
   943 by (asm_full_simp_tac (simpset() addsimps prat_add_ac) 1);
   944 qed "preal_less_add_left_subsetI2";
   944 qed "preal_less_add_left_subsetI2";
   945 
   945 
   946 (*** required proof ***)
   946 (*** required proof ***)
   947 Goal "!! (A::preal). A < B ==> \
   947 Goal "!! (A::preal). A < B ==> \
   948 \         A + Abs_preal({d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}) = B";
   948 \         A + Abs_preal({d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}) = B";
   949 by (blast_tac (claset() addIs [preal_le_anti_sym,
   949 by (blast_tac (claset() addIs [preal_le_anti_sym,
   950                 preal_less_add_left_subsetI,preal_less_add_left_subsetI2]) 1);
   950                 preal_less_add_left_subsetI,preal_less_add_left_subsetI2]) 1);
   951 qed "preal_less_add_left";
   951 qed "preal_less_add_left";
   952 
   952 
   953 Goal "!! (A::preal). A < B ==> ? D. A + D = B";
   953 Goal "!! (A::preal). A < B ==> EX D. A + D = B";
   954 by (fast_tac (claset() addDs [preal_less_add_left]) 1);
   954 by (fast_tac (claset() addDs [preal_less_add_left]) 1);
   955 qed "preal_less_add_left_Ex";        
   955 qed "preal_less_add_left_Ex";        
   956 
   956 
   957 Goal "!!(A::preal). A < B ==> A + C < B + C";
   957 Goal "!!(A::preal). A < B ==> A + C < B + C";
   958 by (auto_tac (claset() addSDs [preal_less_add_left_Ex],
   958 by (auto_tac (claset() addSDs [preal_less_add_left_Ex],
  1068 Addsimps [preal_add_left_cancel_iff,preal_add_right_cancel_iff];
  1068 Addsimps [preal_add_left_cancel_iff,preal_add_right_cancel_iff];
  1069 
  1069 
  1070 (*** Completeness of preal ***)
  1070 (*** Completeness of preal ***)
  1071 
  1071 
  1072 (*** prove that supremum is a cut ***)
  1072 (*** prove that supremum is a cut ***)
  1073 Goal "? (X::preal). X: P ==> \
  1073 Goal "EX (X::preal). X: P ==> \
  1074 \         ? q.  q: {w. ? X. X : P & w : Rep_preal X}";
  1074 \         EX q.  q: {w. EX X. X : P & w : Rep_preal X}";
  1075 by Safe_tac;
  1075 by Safe_tac;
  1076 by (cut_inst_tac [("X","X")] mem_Rep_preal_Ex 1);
  1076 by (cut_inst_tac [("X","X")] mem_Rep_preal_Ex 1);
  1077 by Auto_tac;
  1077 by Auto_tac;
  1078 qed "preal_sup_mem_Ex";
  1078 qed "preal_sup_mem_Ex";
  1079 
  1079 
  1080 (** Part 1 of Dedekind def **)
  1080 (** Part 1 of Dedekind def **)
  1081 Goal "? (X::preal). X: P ==> \
  1081 Goal "EX (X::preal). X: P ==> \
  1082 \         {} < {w. ? X : P. w : Rep_preal X}";
  1082 \         {} < {w. EX X : P. w : Rep_preal X}";
  1083 by (dtac preal_sup_mem_Ex 1);
  1083 by (dtac preal_sup_mem_Ex 1);
  1084 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
  1084 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset()));
  1085 qed "preal_sup_set_not_empty";
  1085 qed "preal_sup_set_not_empty";
  1086 
  1086 
  1087 (** Part 2 of Dedekind sections def **) 
  1087 (** Part 2 of Dedekind sections def **) 
  1088 Goalw [preal_less_def] "? Y. (! X: P. X < Y)  \             
  1088 Goalw [preal_less_def] "EX Y. (ALL X: P. X < Y)  \             
  1089 \         ==> ? q. q ~: {w. ? X. X: P & w: Rep_preal(X)}"; (**)
  1089 \         ==> EX q. q ~: {w. EX X. X: P & w: Rep_preal(X)}"; (**)
  1090 by (auto_tac (claset(),simpset() addsimps [psubset_def]));
  1090 by (auto_tac (claset(),simpset() addsimps [psubset_def]));
  1091 by (cut_inst_tac [("X","Y")] not_mem_Rep_preal_Ex 1);
  1091 by (cut_inst_tac [("X","Y")] not_mem_Rep_preal_Ex 1);
  1092 by (etac exE 1);
  1092 by (etac exE 1);
  1093 by (res_inst_tac [("x","x")] exI 1);
  1093 by (res_inst_tac [("x","x")] exI 1);
  1094 by (auto_tac (claset() addSDs [bspec],simpset()));
  1094 by (auto_tac (claset() addSDs [bspec],simpset()));
  1095 qed "preal_sup_not_mem_Ex";
  1095 qed "preal_sup_not_mem_Ex";
  1096 
  1096 
  1097 Goalw [preal_le_def] "? Y. (! X: P. X <= Y)  \
  1097 Goalw [preal_le_def] "EX Y. (ALL X: P. X <= Y)  \
  1098 \         ==> ? q. q ~: {w. ? X. X: P & w: Rep_preal(X)}";
  1098 \         ==> EX q. q ~: {w. EX X. X: P & w: Rep_preal(X)}";
  1099 by (Step_tac 1);
  1099 by (Step_tac 1);
  1100 by (cut_inst_tac [("X","Y")] not_mem_Rep_preal_Ex 1);
  1100 by (cut_inst_tac [("X","Y")] not_mem_Rep_preal_Ex 1);
  1101 by (etac exE 1);
  1101 by (etac exE 1);
  1102 by (res_inst_tac [("x","x")] exI 1);
  1102 by (res_inst_tac [("x","x")] exI 1);
  1103 by (auto_tac (claset() addSDs [bspec],simpset()));
  1103 by (auto_tac (claset() addSDs [bspec],simpset()));
  1104 qed "preal_sup_not_mem_Ex1";
  1104 qed "preal_sup_not_mem_Ex1";
  1105 
  1105 
  1106 Goal "? Y. (! X: P. X < Y)  \                                    
  1106 Goal "EX Y. (ALL X: P. X < Y)  \                                    
  1107 \         ==> {w. ? X: P. w: Rep_preal(X)} < UNIV";       (**)
  1107 \         ==> {w. EX X: P. w: Rep_preal(X)} < UNIV";       (**)
  1108 by (dtac preal_sup_not_mem_Ex 1);
  1108 by (dtac preal_sup_not_mem_Ex 1);
  1109 by (auto_tac (claset() addSIs [psubsetI],simpset()));
  1109 by (auto_tac (claset() addSIs [psubsetI],simpset()));
  1110 by (eres_inst_tac [("c","q")] equalityCE 1);
  1110 by (eres_inst_tac [("c","q")] equalityCE 1);
  1111 by Auto_tac;
  1111 by Auto_tac;
  1112 qed "preal_sup_set_not_prat_set";
  1112 qed "preal_sup_set_not_prat_set";
  1113 
  1113 
  1114 Goal "? Y. (! X: P. X <= Y)  \
  1114 Goal "EX Y. (ALL X: P. X <= Y)  \
  1115 \         ==> {w. ? X: P. w: Rep_preal(X)} < UNIV";
  1115 \         ==> {w. EX X: P. w: Rep_preal(X)} < UNIV";
  1116 by (dtac preal_sup_not_mem_Ex1 1);
  1116 by (dtac preal_sup_not_mem_Ex1 1);
  1117 by (auto_tac (claset() addSIs [psubsetI],simpset()));
  1117 by (auto_tac (claset() addSIs [psubsetI],simpset()));
  1118 by (eres_inst_tac [("c","q")] equalityCE 1);
  1118 by (eres_inst_tac [("c","q")] equalityCE 1);
  1119 by Auto_tac;
  1119 by Auto_tac;
  1120 qed "preal_sup_set_not_prat_set1";
  1120 qed "preal_sup_set_not_prat_set1";
  1121 
  1121 
  1122 (** Part 3 of Dedekind sections def **)
  1122 (** Part 3 of Dedekind sections def **)
  1123 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X < Y) |] \              
  1123 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X < Y) |] \              
  1124 \         ==> ! y: {w. ? X: P. w: Rep_preal X}. \
  1124 \         ==> ALL y: {w. EX X: P. w: Rep_preal X}. \
  1125 \             !z. z < y --> z: {w. ? X: P. w: Rep_preal X}";         (**)
  1125 \             ALL z. z < y --> z: {w. EX X: P. w: Rep_preal X}";         (**)
  1126 by (auto_tac(claset() addEs [Rep_preal RS prealE_lemma3b],simpset()));
  1126 by (auto_tac(claset() addEs [Rep_preal RS prealE_lemma3b],simpset()));
  1127 qed "preal_sup_set_lemma3";
  1127 qed "preal_sup_set_lemma3";
  1128 
  1128 
  1129 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X <= Y) |] \
  1129 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X <= Y) |] \
  1130 \         ==> ! y: {w. ? X: P. w: Rep_preal X}. \
  1130 \         ==> ALL y: {w. EX X: P. w: Rep_preal X}. \
  1131 \             !z. z < y --> z: {w. ? X: P. w: Rep_preal X}";
  1131 \             ALL z. z < y --> z: {w. EX X: P. w: Rep_preal X}";
  1132 by (auto_tac(claset() addEs [Rep_preal RS prealE_lemma3b],simpset()));
  1132 by (auto_tac(claset() addEs [Rep_preal RS prealE_lemma3b],simpset()));
  1133 qed "preal_sup_set_lemma3_1";
  1133 qed "preal_sup_set_lemma3_1";
  1134 
  1134 
  1135 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X < Y) |] \              
  1135 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X < Y) |] \              
  1136 \         ==>  !y: {w. ? X: P. w: Rep_preal X}. \                        
  1136 \         ==>  ALL y: {w. EX X: P. w: Rep_preal X}. \                        
  1137 \             Bex {w. ? X: P. w: Rep_preal X} (op < y)";                (**)
  1137 \             Bex {w. EX X: P. w: Rep_preal X} (op < y)";                (**)
  1138 by (blast_tac (claset() addDs [(Rep_preal RS prealE_lemma4a)]) 1);
  1138 by (blast_tac (claset() addDs [(Rep_preal RS prealE_lemma4a)]) 1);
  1139 qed "preal_sup_set_lemma4";
  1139 qed "preal_sup_set_lemma4";
  1140 
  1140 
  1141 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X <= Y) |] \
  1141 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X <= Y) |] \
  1142 \         ==>  !y: {w. ? X: P. w: Rep_preal X}. \
  1142 \         ==>  ALL y: {w. EX X: P. w: Rep_preal X}. \
  1143 \             Bex {w. ? X: P. w: Rep_preal X} (op < y)";
  1143 \             Bex {w. EX X: P. w: Rep_preal X} (op < y)";
  1144 by (blast_tac (claset() addDs [(Rep_preal RS prealE_lemma4a)]) 1);
  1144 by (blast_tac (claset() addDs [(Rep_preal RS prealE_lemma4a)]) 1);
  1145 qed "preal_sup_set_lemma4_1";
  1145 qed "preal_sup_set_lemma4_1";
  1146 
  1146 
  1147 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X < Y) |] \            
  1147 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X < Y) |] \            
  1148 \         ==> {w. ? X: P. w: Rep_preal(X)}: preal";                      (**)
  1148 \         ==> {w. EX X: P. w: Rep_preal(X)}: preal";                      (**)
  1149 by (rtac prealI2 1);
  1149 by (rtac prealI2 1);
  1150 by (rtac preal_sup_set_not_empty 1);
  1150 by (rtac preal_sup_set_not_empty 1);
  1151 by (rtac preal_sup_set_not_prat_set 2);
  1151 by (rtac preal_sup_set_not_prat_set 2);
  1152 by (rtac preal_sup_set_lemma3 3);
  1152 by (rtac preal_sup_set_lemma3 3);
  1153 by (rtac preal_sup_set_lemma4 5);
  1153 by (rtac preal_sup_set_lemma4 5);
  1154 by Auto_tac;
  1154 by Auto_tac;
  1155 qed "preal_sup";
  1155 qed "preal_sup";
  1156 
  1156 
  1157 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X <= Y) |] \
  1157 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X <= Y) |] \
  1158 \         ==> {w. ? X: P. w: Rep_preal(X)}: preal";
  1158 \         ==> {w. EX X: P. w: Rep_preal(X)}: preal";
  1159 by (rtac prealI2 1);
  1159 by (rtac prealI2 1);
  1160 by (rtac preal_sup_set_not_empty 1);
  1160 by (rtac preal_sup_set_not_empty 1);
  1161 by (rtac preal_sup_set_not_prat_set1 2);
  1161 by (rtac preal_sup_set_not_prat_set1 2);
  1162 by (rtac preal_sup_set_lemma3_1 3);
  1162 by (rtac preal_sup_set_lemma3_1 3);
  1163 by (rtac preal_sup_set_lemma4_1 5);
  1163 by (rtac preal_sup_set_lemma4_1 5);
  1164 by Auto_tac;
  1164 by Auto_tac;
  1165 qed "preal_sup1";
  1165 qed "preal_sup1";
  1166 
  1166 
  1167 Goalw [psup_def] "? Y. (! X:P. X < Y) ==> ! x: P. x <= psup P";      (**) 
  1167 Goalw [psup_def] "EX Y. (ALL X:P. X < Y) ==> ALL x: P. x <= psup P";      (**) 
  1168 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1168 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1169 by (rtac (preal_sup RS Abs_preal_inverse RS ssubst) 1);
  1169 by (rtac (preal_sup RS Abs_preal_inverse RS ssubst) 1);
  1170 by Auto_tac;
  1170 by Auto_tac;
  1171 qed "preal_psup_leI";
  1171 qed "preal_psup_leI";
  1172 
  1172 
  1173 Goalw [psup_def] "? Y. (! X:P. X <= Y) ==> ! x: P. x <= psup P";
  1173 Goalw [psup_def] "EX Y. (ALL X:P. X <= Y) ==> ALL x: P. x <= psup P";
  1174 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1174 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1175 by (rtac (preal_sup1 RS Abs_preal_inverse RS ssubst) 1);
  1175 by (rtac (preal_sup1 RS Abs_preal_inverse RS ssubst) 1);
  1176 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1176 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1177 qed "preal_psup_leI2";
  1177 qed "preal_psup_leI2";
  1178 
  1178 
  1179 Goal "[| ? Y. (! X:P. X < Y); x : P |] ==> x <= psup P";              (**)
  1179 Goal "[| EX Y. (ALL X:P. X < Y); x : P |] ==> x <= psup P";              (**)
  1180 by (blast_tac (claset() addSDs [preal_psup_leI]) 1);
  1180 by (blast_tac (claset() addSDs [preal_psup_leI]) 1);
  1181 qed "preal_psup_leI2b";
  1181 qed "preal_psup_leI2b";
  1182 
  1182 
  1183 Goal "[| ? Y. (! X:P. X <= Y); x : P |] ==> x <= psup P";
  1183 Goal "[| EX Y. (ALL X:P. X <= Y); x : P |] ==> x <= psup P";
  1184 by (blast_tac (claset() addSDs [preal_psup_leI2]) 1);
  1184 by (blast_tac (claset() addSDs [preal_psup_leI2]) 1);
  1185 qed "preal_psup_leI2a";
  1185 qed "preal_psup_leI2a";
  1186 
  1186 
  1187 Goalw [psup_def] "[| ? X. X : P; ! X:P. X < Y |] ==> psup P <= Y";   (**)
  1187 Goalw [psup_def] "[| EX X. X : P; ALL X:P. X < Y |] ==> psup P <= Y";   (**)
  1188 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1188 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1189 by (dtac (([exI,exI] MRS preal_sup) RS Abs_preal_inverse RS subst) 1);
  1189 by (dtac (([exI,exI] MRS preal_sup) RS Abs_preal_inverse RS subst) 1);
  1190 by (rotate_tac 1 2);
  1190 by (rotate_tac 1 2);
  1191 by (assume_tac 2);
  1191 by (assume_tac 2);
  1192 by (auto_tac (claset() addSDs [bspec],simpset() addsimps [preal_less_def,psubset_def]));
  1192 by (auto_tac (claset() addSDs [bspec],simpset() addsimps [preal_less_def,psubset_def]));
  1193 qed "psup_le_ub";
  1193 qed "psup_le_ub";
  1194 
  1194 
  1195 Goalw [psup_def] "[| ? X. X : P; ! X:P. X <= Y |] ==> psup P <= Y";
  1195 Goalw [psup_def] "[| EX X. X : P; ALL X:P. X <= Y |] ==> psup P <= Y";
  1196 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1196 by (auto_tac (claset(),simpset() addsimps [preal_le_def]));
  1197 by (dtac (([exI,exI] MRS preal_sup1) RS Abs_preal_inverse RS subst) 1);
  1197 by (dtac (([exI,exI] MRS preal_sup1) RS Abs_preal_inverse RS subst) 1);
  1198 by (rotate_tac 1 2);
  1198 by (rotate_tac 1 2);
  1199 by (assume_tac 2);
  1199 by (assume_tac 2);
  1200 by (auto_tac (claset() addSDs [bspec],
  1200 by (auto_tac (claset() addSDs [bspec],
  1201     simpset() addsimps [preal_less_def,psubset_def,preal_le_def]));
  1201     simpset() addsimps [preal_less_def,psubset_def,preal_le_def]));
  1202 qed "psup_le_ub1";
  1202 qed "psup_le_ub1";
  1203 
  1203 
  1204 (** supremum property **)
  1204 (** supremum property **)
  1205 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X < Y) |] \                  
  1205 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X < Y) |] \                  
  1206 \         ==> (!Y. (? X: P. Y < X) = (Y < psup P))";              
  1206 \         ==> (ALL Y. (EX X: P. Y < X) = (Y < psup P))";              
  1207 by (forward_tac [preal_sup RS Abs_preal_inverse] 1);
  1207 by (forward_tac [preal_sup RS Abs_preal_inverse] 1);
  1208 by (Fast_tac 1);
  1208 by (Fast_tac 1);
  1209 by (auto_tac (claset() addSIs [psubsetI],simpset() addsimps [psup_def,preal_less_def]));
  1209 by (auto_tac (claset() addSIs [psubsetI],simpset() addsimps [psup_def,preal_less_def]));
  1210 by (blast_tac (claset() addDs [psubset_def RS meta_eq_to_obj_eq RS iffD1]) 1);
  1210 by (blast_tac (claset() addDs [psubset_def RS meta_eq_to_obj_eq RS iffD1]) 1);
  1211 by (rotate_tac 4 1);
  1211 by (rotate_tac 4 1);