src/HOL/Library/Quotient.thy
changeset 21404 eb85850d3eb7
parent 19086 1b3780be6cc2
child 22390 378f34b1e380
equal deleted inserted replaced
21403:dd58f13a8eb4 21404:eb85850d3eb7
    73  \medskip Abstracted equivalence classes are the canonical
    73  \medskip Abstracted equivalence classes are the canonical
    74  representation of elements of a quotient type.
    74  representation of elements of a quotient type.
    75 *}
    75 *}
    76 
    76 
    77 definition
    77 definition
    78   "class" :: "'a::equiv => 'a quot"    ("\<lfloor>_\<rfloor>")
    78   "class" :: "'a::equiv => 'a quot"  ("\<lfloor>_\<rfloor>") where
    79   "\<lfloor>a\<rfloor> = Abs_quot {x. a \<sim> x}"
    79   "\<lfloor>a\<rfloor> = Abs_quot {x. a \<sim> x}"
    80 
    80 
    81 theorem quot_exhaust: "\<exists>a. A = \<lfloor>a\<rfloor>"
    81 theorem quot_exhaust: "\<exists>a. A = \<lfloor>a\<rfloor>"
    82 proof (cases A)
    82 proof (cases A)
    83   fix R assume R: "A = Abs_quot R"
    83   fix R assume R: "A = Abs_quot R"
   132 
   132 
   133 
   133 
   134 subsection {* Picking representing elements *}
   134 subsection {* Picking representing elements *}
   135 
   135 
   136 definition
   136 definition
   137   pick :: "'a::equiv quot => 'a"
   137   pick :: "'a::equiv quot => 'a" where
   138   "pick A = (SOME a. A = \<lfloor>a\<rfloor>)"
   138   "pick A = (SOME a. A = \<lfloor>a\<rfloor>)"
   139 
   139 
   140 theorem pick_equiv [intro]: "pick \<lfloor>a\<rfloor> \<sim> a"
   140 theorem pick_equiv [intro]: "pick \<lfloor>a\<rfloor> \<sim> a"
   141 proof (unfold pick_def)
   141 proof (unfold pick_def)
   142   show "(SOME x. \<lfloor>a\<rfloor> = \<lfloor>x\<rfloor>) \<sim> a"
   142   show "(SOME x. \<lfloor>a\<rfloor> = \<lfloor>x\<rfloor>) \<sim> a"