equal
deleted
inserted
replaced
250 and Rep :: "'b \<Rightarrow> 'a" |
250 and Rep :: "'b \<Rightarrow> 'a" |
251 assumes "type_definition Rep Abs (UNIV::'a set)" |
251 assumes "type_definition Rep Abs (UNIV::'a set)" |
252 shows "equivp (op=::'a\<Rightarrow>'a\<Rightarrow>bool)" |
252 shows "equivp (op=::'a\<Rightarrow>'a\<Rightarrow>bool)" |
253 by (rule identity_equivp) |
253 by (rule identity_equivp) |
254 |
254 |
|
255 lemma typedef_to_Quotient: |
|
256 assumes "type_definition Rep Abs {x. P x}" |
|
257 and T_def: "T \<equiv> (\<lambda>x y. x = Rep y)" |
|
258 shows "Quotient (invariant P) Abs Rep T" |
|
259 proof - |
|
260 interpret type_definition Rep Abs "{x. P x}" by fact |
|
261 from Rep Abs_inject Rep_inverse Abs_inverse T_def show ?thesis |
|
262 by (auto intro!: QuotientI simp: invariant_def fun_eq_iff) |
|
263 qed |
|
264 |
255 lemma invariant_type_to_Quotient: |
265 lemma invariant_type_to_Quotient: |
256 assumes "type_definition Rep Abs {x. P x}" |
266 assumes "type_definition Rep Abs {x. P x}" |
257 and T_def: "T \<equiv> (\<lambda>x y. (invariant P) x x \<and> Abs x = y)" |
267 and T_def: "T \<equiv> (\<lambda>x y. (invariant P) x x \<and> Abs x = y)" |
258 shows "Quotient (invariant P) Abs Rep T" |
268 shows "Quotient (invariant P) Abs Rep T" |
259 proof - |
269 proof - |