src/HOL/Real/PReal.ML
changeset 10232 529c65b5dcde
parent 9969 4753185f1dd2
child 10292 19753287b9df
equal deleted inserted replaced
10231:178a272bceeb 10232:529c65b5dcde
   106 qed "prealE_lemma4a";
   106 qed "prealE_lemma4a";
   107 
   107 
   108 Goal "EX 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);
       
   112 by (auto_tac (claset(),simpset() addsimps [psubset_def]));
   111 by (auto_tac (claset(),simpset() addsimps [psubset_def]));
   113 by (blast_tac (claset() addIs [set_ext] addEs [swap]) 1);
       
   114 qed "not_mem_Rep_preal_Ex";
   112 qed "not_mem_Rep_preal_Ex";
   115 
   113 
   116 (** preal_of_prat: the injection from prat to preal **)
   114 (** preal_of_prat: the injection from prat to preal **)
   117 (** A few lemmas **)
   115 (** A few lemmas **)
   118 
   116 
   176 by (dtac preal_less_trans 1 THEN assume_tac 1);
   174 by (dtac preal_less_trans 1 THEN assume_tac 1);
   177 by (asm_full_simp_tac (simpset() addsimps [preal_less_not_refl]) 1);
   175 by (asm_full_simp_tac (simpset() addsimps [preal_less_not_refl]) 1);
   178 qed "preal_less_not_sym";
   176 qed "preal_less_not_sym";
   179 
   177 
   180 (* [| x < y;  ~P ==> y < x |] ==> P *)
   178 (* [| x < y;  ~P ==> y < x |] ==> P *)
   181 bind_thm ("preal_less_asym", preal_less_not_sym RS swap);
   179 bind_thm ("preal_less_asym", preal_less_not_sym RS contrapos_np);
   182 
   180 
   183 Goalw [preal_less_def] 
   181 Goalw [preal_less_def] 
   184       "(r1::preal) < r2 | r1 = r2 | r2 < r1";
   182       "(r1::preal) < r2 | r1 = r2 | r2 < r1";
   185 by (auto_tac (claset() addSDs [inj_Rep_preal RS injD],
   183 by (auto_tac (claset() addSDs [inj_Rep_preal RS injD],
   186               simpset() addsimps [psubset_def]));
   184               simpset() addsimps [psubset_def]));
   810 (**** Gleason prop. 9-3.5(iv) p. 123 ****)
   808 (**** Gleason prop. 9-3.5(iv) p. 123 ****)
   811 (**** Define the D required and show that it is a positive real ****)
   809 (**** Define the D required and show that it is a positive real ****)
   812 
   810 
   813 (* useful lemmas - proved elsewhere? *)
   811 (* useful lemmas - proved elsewhere? *)
   814 Goalw [psubset_def] "A < B ==> EX x. x ~: A & x : B";
   812 Goalw [psubset_def] "A < B ==> EX x. x ~: A & x : B";
   815 by (etac conjE 1);
       
   816 by (etac swap 1);
       
   817 by (etac equalityI 1);
       
   818 by Auto_tac;
   813 by Auto_tac;
   819 qed "lemma_psubset_mem";
   814 qed "lemma_psubset_mem";
   820 
   815 
   821 Goalw [psubset_def] "~ (A::'a set) < A";
   816 Goalw [psubset_def] "~ (A::'a set) < A";
   822 by (Fast_tac 1);
   817 by (Fast_tac 1);
  1202 by (blast_tac (claset() addDs [psubset_def RS meta_eq_to_obj_eq RS iffD1]) 1);
  1197 by (blast_tac (claset() addDs [psubset_def RS meta_eq_to_obj_eq RS iffD1]) 1);
  1203 by (rotate_tac 4 1);
  1198 by (rotate_tac 4 1);
  1204 by (asm_full_simp_tac (simpset() addsimps [psubset_def]) 1);
  1199 by (asm_full_simp_tac (simpset() addsimps [psubset_def]) 1);
  1205 by (dtac bspec 1 THEN assume_tac 1);
  1200 by (dtac bspec 1 THEN assume_tac 1);
  1206 by (REPEAT(etac conjE 1));
  1201 by (REPEAT(etac conjE 1));
  1207 by (EVERY1[rtac swap, assume_tac, rtac set_ext]);
  1202 by (EVERY1[rtac contrapos_np, assume_tac, rtac set_ext]);
  1208 by (auto_tac (claset() addSDs [lemma_psubset_mem],simpset()));
  1203 by (auto_tac (claset() addSDs [lemma_psubset_mem],simpset()));
  1209 by (cut_inst_tac [("r1.0","Xa"),("r2.0","Ya")] preal_linear 1);
  1204 by (cut_inst_tac [("r1.0","Xa"),("r2.0","Ya")] preal_linear 1);
  1210 by (auto_tac (claset() addDs [psubsetD],simpset() addsimps [preal_less_def]));
  1205 by (auto_tac (claset() addDs [psubsetD],simpset() addsimps [preal_less_def]));
  1211 qed "preal_complete";
  1206 qed "preal_complete";
  1212 
  1207