src/HOL/Relation.thy
changeset 35828 46cfc4b8112e
parent 33218 ecb5cd453ef2
child 36728 ae397b810c8b
equal deleted inserted replaced
35827:f552152d7747 35828:46cfc4b8112e
   119 by (simp add: Id_on_def) 
   119 by (simp add: Id_on_def) 
   120 
   120 
   121 lemma Id_on_eqI: "a = b ==> a : A ==> (a, b) : Id_on A"
   121 lemma Id_on_eqI: "a = b ==> a : A ==> (a, b) : Id_on A"
   122 by (simp add: Id_on_def)
   122 by (simp add: Id_on_def)
   123 
   123 
   124 lemma Id_onI [intro!,noatp]: "a : A ==> (a, a) : Id_on A"
   124 lemma Id_onI [intro!,no_atp]: "a : A ==> (a, a) : Id_on A"
   125 by (rule Id_on_eqI) (rule refl)
   125 by (rule Id_on_eqI) (rule refl)
   126 
   126 
   127 lemma Id_onE [elim!]:
   127 lemma Id_onE [elim!]:
   128   "c : Id_on A ==> (!!x. x : A ==> c = (x, x) ==> P) ==> P"
   128   "c : Id_on A ==> (!!x. x : A ==> c = (x, x) ==> P) ==> P"
   129   -- {* The general elimination rule. *}
   129   -- {* The general elimination rule. *}
   359 by (auto simp: total_on_def)
   359 by (auto simp: total_on_def)
   360 
   360 
   361 
   361 
   362 subsection {* Domain *}
   362 subsection {* Domain *}
   363 
   363 
   364 declare Domain_def [noatp]
   364 declare Domain_def [no_atp]
   365 
   365 
   366 lemma Domain_iff: "(a : Domain r) = (EX y. (a, y) : r)"
   366 lemma Domain_iff: "(a : Domain r) = (EX y. (a, y) : r)"
   367 by (unfold Domain_def) blast
   367 by (unfold Domain_def) blast
   368 
   368 
   369 lemma DomainI [intro]: "(a, b) : r ==> a : Domain r"
   369 lemma DomainI [intro]: "(a, b) : r ==> a : Domain r"
   482 by(auto simp:Field_def)
   482 by(auto simp:Field_def)
   483 
   483 
   484 
   484 
   485 subsection {* Image of a set under a relation *}
   485 subsection {* Image of a set under a relation *}
   486 
   486 
   487 declare Image_def [noatp]
   487 declare Image_def [no_atp]
   488 
   488 
   489 lemma Image_iff: "(b : r``A) = (EX x:A. (x, b) : r)"
   489 lemma Image_iff: "(b : r``A) = (EX x:A. (x, b) : r)"
   490 by (simp add: Image_def)
   490 by (simp add: Image_def)
   491 
   491 
   492 lemma Image_singleton: "r``{a} = {b. (a, b) : r}"
   492 lemma Image_singleton: "r``{a} = {b. (a, b) : r}"
   493 by (simp add: Image_def)
   493 by (simp add: Image_def)
   494 
   494 
   495 lemma Image_singleton_iff [iff]: "(b : r``{a}) = ((a, b) : r)"
   495 lemma Image_singleton_iff [iff]: "(b : r``{a}) = ((a, b) : r)"
   496 by (rule Image_iff [THEN trans]) simp
   496 by (rule Image_iff [THEN trans]) simp
   497 
   497 
   498 lemma ImageI [intro,noatp]: "(a, b) : r ==> a : A ==> b : r``A"
   498 lemma ImageI [intro,no_atp]: "(a, b) : r ==> a : A ==> b : r``A"
   499 by (unfold Image_def) blast
   499 by (unfold Image_def) blast
   500 
   500 
   501 lemma ImageE [elim!]:
   501 lemma ImageE [elim!]:
   502     "b : r `` A ==> (!!x. (x, b) : r ==> x : A ==> P) ==> P"
   502     "b : r `` A ==> (!!x. (x, b) : r ==> x : A ==> P) ==> P"
   503 by (unfold Image_def) (iprover elim!: CollectE bexE)
   503 by (unfold Image_def) (iprover elim!: CollectE bexE)