equal
deleted
inserted
replaced
28 eqv :: "('a::eqv) => 'a => bool" (infixl "\<sim>" 50) |
28 eqv :: "('a::eqv) => 'a => bool" (infixl "\<sim>" 50) |
29 |
29 |
30 axclass equiv \<subseteq> eqv |
30 axclass equiv \<subseteq> eqv |
31 equiv_refl [intro]: "x \<sim> x" |
31 equiv_refl [intro]: "x \<sim> x" |
32 equiv_trans [trans]: "x \<sim> y ==> y \<sim> z ==> x \<sim> z" |
32 equiv_trans [trans]: "x \<sim> y ==> y \<sim> z ==> x \<sim> z" |
33 equiv_sym [elim?]: "x \<sim> y ==> y \<sim> x" |
33 equiv_sym [sym]: "x \<sim> y ==> y \<sim> x" |
34 |
34 |
35 lemma not_equiv_sym [elim?]: "\<not> (x \<sim> y) ==> \<not> (y \<sim> (x::'a::equiv))" |
35 lemma equiv_not_sym [sym]: "\<not> (x \<sim> y) ==> \<not> (y \<sim> (x::'a::equiv))" |
36 proof - |
36 proof - |
37 assume "\<not> (x \<sim> y)" thus "\<not> (y \<sim> x)" |
37 assume "\<not> (x \<sim> y)" thus "\<not> (y \<sim> x)" |
38 by (rule contrapos_nn) (rule equiv_sym) |
38 by (rule contrapos_nn) (rule equiv_sym) |
39 qed |
39 qed |
40 |
40 |
97 text {* |
97 text {* |
98 Equality of canonical quotient elements coincides with the original |
98 Equality of canonical quotient elements coincides with the original |
99 relation. |
99 relation. |
100 *} |
100 *} |
101 |
101 |
102 theorem quot_equality: "(\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor>) = (a \<sim> b)" |
102 theorem quot_equality [iff?]: "(\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor>) = (a \<sim> b)" |
103 proof |
103 proof |
104 assume eq: "\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor>" |
104 assume eq: "\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor>" |
105 show "a \<sim> b" |
105 show "a \<sim> b" |
106 proof - |
106 proof - |
107 from eq have "{x. a \<sim> x} = {x. b \<sim> x}" |
107 from eq have "{x. a \<sim> x} = {x. b \<sim> x}" |
130 qed |
130 qed |
131 thus ?thesis by (simp only: class_def) |
131 thus ?thesis by (simp only: class_def) |
132 qed |
132 qed |
133 qed |
133 qed |
134 |
134 |
135 lemma quot_equalI [intro?]: "a \<sim> b ==> \<lfloor>a\<rfloor> = \<lfloor>b\<rfloor>" |
|
136 by (simp only: quot_equality) |
|
137 |
|
138 lemma quot_equalD [dest?]: "\<lfloor>a\<rfloor> = \<lfloor>b\<rfloor> ==> a \<sim> b" |
|
139 by (simp only: quot_equality) |
|
140 |
|
141 lemma quot_not_equalI [intro?]: "\<not> (a \<sim> b) ==> \<lfloor>a\<rfloor> \<noteq> \<lfloor>b\<rfloor>" |
|
142 by (simp add: quot_equality) |
|
143 |
|
144 lemma quot_not_equalD [dest?]: "\<lfloor>a\<rfloor> \<noteq> \<lfloor>b\<rfloor> ==> \<not> (a \<sim> b)" |
|
145 by (simp add: quot_equality) |
|
146 |
|
147 |
135 |
148 subsection {* Picking representing elements *} |
136 subsection {* Picking representing elements *} |
149 |
137 |
150 constdefs |
138 constdefs |
151 pick :: "'a::equiv quot => 'a" |
139 pick :: "'a::equiv quot => 'a" |