src/HOL/Relation.ML
changeset 11655 923e4d0d36d5
parent 11451 8abfb4f7bd02
child 12487 bbd564190c9b
equal deleted inserted replaced
11654:53d18ab990f6 11655:923e4d0d36d5
    16 by (rtac (major RS CollectE) 1);
    16 by (rtac (major RS CollectE) 1);
    17 by (etac exE 1);
    17 by (etac exE 1);
    18 by (eresolve_tac prems 1);
    18 by (eresolve_tac prems 1);
    19 qed "IdE";
    19 qed "IdE";
    20 
    20 
    21 Goalw [Id_def] "(a,b):Id = (a=b)";
    21 Goalw [Id_def] "((a,b):Id) = (a=b)";
    22 by (Blast_tac 1);
    22 by (Blast_tac 1);
    23 qed "pair_in_Id_conv";
    23 qed "pair_in_Id_conv";
    24 AddIffs [pair_in_Id_conv];
    24 AddIffs [pair_in_Id_conv];
    25 
    25 
    26 Goalw [refl_def] "reflexive Id";
    26 Goalw [refl_def] "reflexive Id";
   215 by (Blast_tac 1);
   215 by (Blast_tac 1);
   216 qed "trans_converse";
   216 qed "trans_converse";
   217 
   217 
   218 (** Domain **)
   218 (** Domain **)
   219 
   219 
   220 Goalw [Domain_def] "a: Domain(r) = (EX y. (a,y): r)";
   220 Goalw [Domain_def] "(a: Domain(r)) = (EX y. (a,y): r)";
   221 by (Blast_tac 1);
   221 by (Blast_tac 1);
   222 qed "Domain_iff";
   222 qed "Domain_iff";
   223 
   223 
   224 Goal "(a,b): r ==> a: Domain(r)";
   224 Goal "(a,b): r ==> a: Domain(r)";
   225 by (etac (exI RS (Domain_iff RS iffD2)) 1) ;
   225 by (etac (exI RS (Domain_iff RS iffD2)) 1) ;
   273 qed "Domain_mono";
   273 qed "Domain_mono";
   274 
   274 
   275 
   275 
   276 (** Range **)
   276 (** Range **)
   277 
   277 
   278 Goalw [Domain_def, Range_def] "a: Range(r) = (EX y. (y,a): r)";
   278 Goalw [Domain_def, Range_def] "(a: Range(r)) = (EX y. (y,a): r)";
   279 by (Blast_tac 1);
   279 by (Blast_tac 1);
   280 qed "Range_iff";
   280 qed "Range_iff";
   281 
   281 
   282 Goalw [Range_def] "(a,b): r ==> b : Range(r)";
   282 Goalw [Range_def] "(a,b): r ==> b : Range(r)";
   283 by (etac (converseI RS DomainI) 1);
   283 by (etac (converseI RS DomainI) 1);
   331 
   331 
   332 (*** Image of a set under a relation ***)
   332 (*** Image of a set under a relation ***)
   333 
   333 
   334 overload_1st_set "Relation.Image";
   334 overload_1st_set "Relation.Image";
   335 
   335 
   336 Goalw [Image_def] "b : r``A = (EX x:A. (x,b):r)";
   336 Goalw [Image_def] "(b : r``A) = (EX x:A. (x,b):r)";
   337 by (Blast_tac 1);
   337 by (Blast_tac 1);
   338 qed "Image_iff";
   338 qed "Image_iff";
   339 
   339 
   340 Goalw [Image_def] "r``{a} = {b. (a,b):r}";
   340 Goalw [Image_def] "r``{a} = {b. (a,b):r}";
   341 by (Blast_tac 1);
   341 by (Blast_tac 1);