src/HOL/Real/PNat.ML
changeset 5148 74919e8f221c
parent 5143 b94cd208f073
child 5184 9b8547a9496a
equal deleted inserted replaced
5147:825877190618 5148:74919e8f221c
   239 (***) (***) (***) (***) (***) (***) (***) (***) (***)
   239 (***) (***) (***) (***) (***) (***) (***) (***) (***)
   240 
   240 
   241   (*** pnat_less ***)
   241   (*** pnat_less ***)
   242 
   242 
   243 Goalw [pnat_less_def] 
   243 Goalw [pnat_less_def] 
   244       "!!x. [| x < (y::pnat); y < z |] ==> x < z";
   244       "[| x < (y::pnat); y < z |] ==> x < z";
   245 by ((etac less_trans 1) THEN assume_tac 1);
   245 by ((etac less_trans 1) THEN assume_tac 1);
   246 qed "pnat_less_trans";
   246 qed "pnat_less_trans";
   247 
   247 
   248 Goalw [pnat_less_def] "x < (y::pnat) ==> ~ y < x";
   248 Goalw [pnat_less_def] "x < (y::pnat) ==> ~ y < x";
   249 by (etac less_not_sym 1);
   249 by (etac less_not_sym 1);
   257 qed "pnat_less_not_refl";
   257 qed "pnat_less_not_refl";
   258 
   258 
   259 bind_thm ("pnat_less_irrefl",pnat_less_not_refl RS notE);
   259 bind_thm ("pnat_less_irrefl",pnat_less_not_refl RS notE);
   260 
   260 
   261 Goalw [pnat_less_def] 
   261 Goalw [pnat_less_def] 
   262      "!!x. x < (y::pnat) ==> x ~= y";
   262      "x < (y::pnat) ==> x ~= y";
   263 by Auto_tac;
   263 by Auto_tac;
   264 qed "pnat_less_not_refl2";
   264 qed "pnat_less_not_refl2";
   265 
   265 
   266 Goal "~ Rep_pnat y < 0";
   266 Goal "~ Rep_pnat y < 0";
   267 by Auto_tac;
   267 by Auto_tac;
   277 
   277 
   278 (*** Rep_pnat < 1 ==> P ***)
   278 (*** Rep_pnat < 1 ==> P ***)
   279 bind_thm ("Rep_pnat_less_oneE",Rep_pnat_not_less_one RS notE);
   279 bind_thm ("Rep_pnat_less_oneE",Rep_pnat_not_less_one RS notE);
   280 
   280 
   281 Goalw [pnat_less_def] 
   281 Goalw [pnat_less_def] 
   282      "!!x. x < (y::pnat) ==> Rep_pnat y ~= 1";
   282      "x < (y::pnat) ==> Rep_pnat y ~= 1";
   283 by (auto_tac (claset(),simpset() 
   283 by (auto_tac (claset(),simpset() 
   284     addsimps [Rep_pnat_not_less_one] delsimps [less_one]));
   284     addsimps [Rep_pnat_not_less_one] delsimps [less_one]));
   285 qed "Rep_pnat_gt_implies_not0";
   285 qed "Rep_pnat_gt_implies_not0";
   286 
   286 
   287 Goalw [pnat_less_def] 
   287 Goalw [pnat_less_def] 
   524 by (auto_tac (claset() addIs [add_less_mono],
   524 by (auto_tac (claset() addIs [add_less_mono],
   525        simpset() addsimps [sum_Rep_pnat_sum RS sym]));
   525        simpset() addsimps [sum_Rep_pnat_sum RS sym]));
   526 qed "pnat_add_less_mono";
   526 qed "pnat_add_less_mono";
   527 
   527 
   528 Goalw [pnat_less_def]
   528 Goalw [pnat_less_def]
   529      "!!f. [| !!i j::pnat. i<j ==> f(i) < f(j);       \
   529 "!!f. [| !!i j::pnat. i<j ==> f(i) < f(j);       \
   530 \        i <= j                                 \
   530 \        i <= j                                 \
   531 \     |] ==> f(i) <= (f(j)::pnat)";
   531 \     |] ==> f(i) <= (f(j)::pnat)";
   532 by (auto_tac (claset() addSDs [inj_Rep_pnat RS injD],
   532 by (auto_tac (claset() addSDs [inj_Rep_pnat RS injD],
   533              simpset() addsimps [pnat_le_iff_Rep_pnat_le,
   533              simpset() addsimps [pnat_le_iff_Rep_pnat_le,
   534                                      le_eq_less_or_eq]));
   534                                      le_eq_less_or_eq]));