author | Cezary Kaliszyk <kaliszyk@in.tum.de> |
Thu, 07 Jan 2010 15:50:22 +0100 | |
changeset 821 | c2ebb7fcf9d0 |
parent 820 | 162e38c14f24 |
child 822 | 5527430f9b6f |
permissions | -rw-r--r-- |
779
3b21b24a5fb6
corrected map declarations for Sum and Prod; moved absrep_fun examples in separate file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
theory AbsRepTest |
3b21b24a5fb6
corrected map declarations for Sum and Prod; moved absrep_fun examples in separate file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
2 |
imports "../QuotMain" "../QuotList" "../QuotOption" "../QuotSum" "../QuotProd" List |
3b21b24a5fb6
corrected map declarations for Sum and Prod; moved absrep_fun examples in separate file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
3b21b24a5fb6
corrected map declarations for Sum and Prod; moved absrep_fun examples in separate file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
|
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
5 |
ML {* open Quotient_Term *} |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
6 |
|
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
7 |
ML {* |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
8 |
fun test_funs flag ctxt (rty, qty) = |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
9 |
(absrep_fun_chk flag ctxt (rty, qty) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
10 |
|> Syntax.string_of_term ctxt |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
11 |
|> writeln; |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
12 |
equiv_relation_chk ctxt (rty, qty) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
13 |
|> Syntax.string_of_term ctxt |
807
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
14 |
|> writeln; |
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
15 |
new_equiv_relation_chk ctxt (rty, qty) |
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
16 |
|> Syntax.string_of_term ctxt |
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
17 |
|> writeln) |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
18 |
*} |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
19 |
|
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
20 |
definition |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
21 |
erel1 (infixl "\<approx>1" 50) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
22 |
where |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
23 |
"erel1 \<equiv> \<lambda>xs ys. \<forall>e. e \<in> set xs \<longleftrightarrow> e \<in> set ys" |
787
5cf83fa5b36c
made the quotient_type definition more like typedef; now type variables need to be explicitly given
Christian Urban <urbanc@in.tum.de>
parents:
786
diff
changeset
|
24 |
|
5cf83fa5b36c
made the quotient_type definition more like typedef; now type variables need to be explicitly given
Christian Urban <urbanc@in.tum.de>
parents:
786
diff
changeset
|
25 |
quotient_type |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
26 |
'a fset = "'a list" / erel1 |
779
3b21b24a5fb6
corrected map declarations for Sum and Prod; moved absrep_fun examples in separate file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
27 |
apply(rule equivpI) |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
28 |
unfolding erel1_def reflp_def symp_def transp_def |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
29 |
by auto |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
30 |
|
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
31 |
definition |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
32 |
erel2 (infixl "\<approx>2" 50) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
33 |
where |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
34 |
"erel2 \<equiv> \<lambda>(xs::('a * 'a) list) ys. \<forall>e. e \<in> set xs \<longleftrightarrow> e \<in> set ys" |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
35 |
|
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
36 |
quotient_type |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
37 |
'a foo = "('a * 'a) list" / erel2 |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
38 |
apply(rule equivpI) |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
39 |
unfolding erel2_def reflp_def symp_def transp_def |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
40 |
by auto |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
41 |
|
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
42 |
definition |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
43 |
erel3 (infixl "\<approx>3" 50) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
44 |
where |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
45 |
"erel3 \<equiv> \<lambda>(xs::('a * int) list) ys. \<forall>e. e \<in> set xs \<longleftrightarrow> e \<in> set ys" |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
46 |
|
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
47 |
quotient_type |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
48 |
'a bar = "('a * int) list" / "erel3" |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
49 |
apply(rule equivpI) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
50 |
unfolding erel3_def reflp_def symp_def transp_def |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
51 |
by auto |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
52 |
|
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
53 |
fun |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
54 |
intrel :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat) \<Rightarrow> bool" (infixl "\<approx>4" 50) |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
55 |
where |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
56 |
"intrel (x, y) (u, v) = (x + v = u + y)" |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
57 |
|
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
58 |
quotient_type myint = "nat \<times> nat" / intrel |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
59 |
by (auto simp add: equivp_def expand_fun_eq) |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
60 |
|
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
61 |
ML {* |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
62 |
test_funs absF @{context} |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
63 |
(@{typ "nat \<times> nat"}, |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
64 |
@{typ "myint"}) |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
65 |
*} |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
66 |
|
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
67 |
ML {* |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
68 |
test_funs absF @{context} |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
69 |
(@{typ "('a * 'a) list"}, |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
70 |
@{typ "'a foo"}) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
71 |
*} |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
72 |
|
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
73 |
ML {* |
803
6f6ee78c7357
a slight change to abs/rep generation
Christian Urban <urbanc@in.tum.de>
parents:
796
diff
changeset
|
74 |
test_funs repF @{context} |
6f6ee78c7357
a slight change to abs/rep generation
Christian Urban <urbanc@in.tum.de>
parents:
796
diff
changeset
|
75 |
(@{typ "(('a * 'a) list * 'b)"}, |
6f6ee78c7357
a slight change to abs/rep generation
Christian Urban <urbanc@in.tum.de>
parents:
796
diff
changeset
|
76 |
@{typ "('a foo * 'b)"}) |
6f6ee78c7357
a slight change to abs/rep generation
Christian Urban <urbanc@in.tum.de>
parents:
796
diff
changeset
|
77 |
*} |
6f6ee78c7357
a slight change to abs/rep generation
Christian Urban <urbanc@in.tum.de>
parents:
796
diff
changeset
|
78 |
|
6f6ee78c7357
a slight change to abs/rep generation
Christian Urban <urbanc@in.tum.de>
parents:
796
diff
changeset
|
79 |
ML {* |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
80 |
test_funs absF @{context} |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
81 |
(@{typ "(('a list) * int) list"}, |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
82 |
@{typ "('a fset) bar"}) |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
83 |
*} |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
84 |
|
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
85 |
ML {* |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
86 |
test_funs absF @{context} |
807
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
87 |
(@{typ "('a list)"}, |
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
88 |
@{typ "('a fset)"}) |
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
89 |
*} |
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
90 |
|
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
91 |
ML {* |
a5495a323b49
added a new version of equiv_relation (is not yet used anywhere except in AbsRepTest)
Christian Urban <urbanc@in.tum.de>
parents:
803
diff
changeset
|
92 |
test_funs absF @{context} |
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
93 |
(@{typ "('a list) list"}, |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
94 |
@{typ "('a fset) fset"}) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
95 |
*} |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
96 |
|
808
90bde96f5dd1
proper handling of error messages (code copy - maybe this can be avoided)
Christian Urban <urbanc@in.tum.de>
parents:
807
diff
changeset
|
97 |
|
811 | 98 |
ML {* |
99 |
test_funs absF @{context} |
|
100 |
(@{typ "((nat * nat) list) list"}, |
|
101 |
@{typ "((myint) fset) fset"}) |
|
102 |
*} |
|
808
90bde96f5dd1
proper handling of error messages (code copy - maybe this can be avoided)
Christian Urban <urbanc@in.tum.de>
parents:
807
diff
changeset
|
103 |
|
795
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
104 |
ML {* |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
105 |
test_funs absF @{context} |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
106 |
(@{typ "(('a * 'a) list) list"}, |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
107 |
@{typ "(('a * 'a) fset) fset"}) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
108 |
*} |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
109 |
|
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
110 |
ML {* |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
111 |
test_funs absF @{context} |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
112 |
(@{typ "(nat * nat) list"}, |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
113 |
@{typ "myint fset"}) |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
114 |
*} |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
115 |
|
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
116 |
ML {* |
a28f805df355
renamed mk_resp_arg to equiv_relation and exported it in the signature; added tests in AbsRepFun.thy
Christian Urban <urbanc@in.tum.de>
parents:
790
diff
changeset
|
117 |
test_funs absF @{context} |
796
64f9c76f70c7
corrected wrong [quot_respect] attribute; tuned
Christian Urban <urbanc@in.tum.de>
parents:
795
diff
changeset
|
118 |
(@{typ "('a list) list \<Rightarrow> 'a list"}, |
64f9c76f70c7
corrected wrong [quot_respect] attribute; tuned
Christian Urban <urbanc@in.tum.de>
parents:
795
diff
changeset
|
119 |
@{typ "('a fset) fset \<Rightarrow> 'a fset"}) |
790
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
120 |
*} |
3a48ffcf0f9a
generalised absrep function; needs consolidation
Christian Urban <urbanc@in.tum.de>
parents:
787
diff
changeset
|
121 |
|
809
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
122 |
lemma |
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
123 |
assumes sr: "symp r" |
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
124 |
and ss: "symp s" |
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
125 |
shows "(r OO s) x y = (s OO r) y x" |
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
126 |
using sr ss |
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
127 |
unfolding symp_def |
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
128 |
apply (metis pred_comp.intros pred_compE ss symp_def) |
810
f73e2f5f17b2
Struggling with composition
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
809
diff
changeset
|
129 |
done |
809
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
130 |
|
812 | 131 |
lemma abs_o_rep: |
132 |
assumes a: "Quotient r absf repf" |
|
133 |
shows "absf o repf = id" |
|
134 |
apply(rule ext) |
|
135 |
apply(simp add: Quotient_abs_rep[OF a]) |
|
136 |
done |
|
137 |
||
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
138 |
lemma set_in_eq: "(\<forall>e. ((e \<in> A) = (e \<in> B))) \<equiv> A = B" |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
139 |
apply (rule eq_reflection) |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
140 |
apply auto |
816 | 141 |
done |
142 |
||
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
143 |
lemma map_rep_ok: "b \<approx>1 ba \<Longrightarrow> map rep_fset b \<approx>1 map rep_fset ba" |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
144 |
unfolding erel1_def |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
145 |
apply(simp only: set_map set_in_eq) |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
146 |
done |
816 | 147 |
|
821 | 148 |
lemma map_rep_ok_gen: "b \<approx>1 ba \<Longrightarrow> map rep2 b \<approx>1 map rep2 ba" |
149 |
unfolding erel1_def |
|
150 |
apply(simp only: set_map set_in_eq) |
|
151 |
done |
|
152 |
||
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
153 |
lemma map_abs_ok: "b \<approx>1 ba \<Longrightarrow> map abs_fset b \<approx>1 map abs_fset ba" |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
154 |
unfolding erel1_def |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
155 |
apply(simp only: set_map set_in_eq) |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
156 |
done |
816 | 157 |
|
821 | 158 |
lemma map_abs_ok_gen: "b \<approx>1 ba \<Longrightarrow> map abs2 b \<approx>1 map abs2 ba" |
159 |
unfolding erel1_def |
|
160 |
apply(simp only: set_map set_in_eq) |
|
161 |
done |
|
162 |
||
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
163 |
lemma quotient_compose_list_pre: |
816 | 164 |
"(list_rel op \<approx>1 OO op \<approx>1 OO list_rel op \<approx>1) r s = |
165 |
((list_rel op \<approx>1 OO op \<approx>1 OO list_rel op \<approx>1) r r \<and> |
|
166 |
(list_rel op \<approx>1 OO op \<approx>1 OO list_rel op \<approx>1) s s \<and> abs_fset (map abs_fset r) = abs_fset (map abs_fset s))" |
|
167 |
apply rule |
|
168 |
apply rule |
|
169 |
apply rule |
|
170 |
apply (rule list_rel_refl) |
|
171 |
apply (metis equivp_def fset_equivp) |
|
172 |
apply rule |
|
173 |
apply (rule equivp_reflp[OF fset_equivp]) |
|
174 |
apply (rule list_rel_refl) |
|
175 |
apply (metis equivp_def fset_equivp) |
|
176 |
apply(rule) |
|
177 |
apply rule |
|
178 |
apply (rule list_rel_refl) |
|
179 |
apply (metis equivp_def fset_equivp) |
|
180 |
apply rule |
|
181 |
apply (rule equivp_reflp[OF fset_equivp]) |
|
182 |
apply (rule list_rel_refl) |
|
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
183 |
apply (metis equivp_def fset_equivp) |
816 | 184 |
apply (subgoal_tac "map abs_fset r \<approx>1 map abs_fset s") |
185 |
apply (metis Quotient_rel[OF Quotient_fset]) |
|
819
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
186 |
apply (auto)[1] |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
187 |
apply (subgoal_tac "map abs_fset r = map abs_fset b") |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
188 |
prefer 2 |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
189 |
apply (metis Quotient_rel[OF list_quotient[OF Quotient_fset]]) |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
190 |
apply (subgoal_tac "map abs_fset s = map abs_fset ba") |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
191 |
prefer 2 |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
192 |
apply (metis Quotient_rel[OF list_quotient[OF Quotient_fset]]) |
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
193 |
apply (simp add: map_abs_ok) |
816 | 194 |
apply rule |
195 |
apply (rule rep_abs_rsp[of "list_rel op \<approx>1" "map abs_fset"]) |
|
196 |
apply (tactic {* Quotient_Tacs.quotient_tac @{context} 1 *}) |
|
197 |
apply (rule list_rel_refl) |
|
198 |
apply (metis equivp_def fset_equivp) |
|
199 |
apply rule |
|
200 |
prefer 2 |
|
201 |
apply (rule rep_abs_rsp_left[of "list_rel op \<approx>1" "map abs_fset"]) |
|
202 |
apply (tactic {* Quotient_Tacs.quotient_tac @{context} 1 *}) |
|
203 |
apply (rule list_rel_refl) |
|
204 |
apply (metis equivp_def fset_equivp) |
|
819
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
205 |
apply (erule conjE)+ |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
206 |
apply (subgoal_tac "map abs_fset r \<approx>1 map abs_fset s") |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
207 |
prefer 2 |
f5c9ddc18246
Reduced the proof to two simple but not obvious to prove facts.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
818
diff
changeset
|
208 |
apply (metis Quotient_def Quotient_fset equivp_reflp fset_equivp) |
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
209 |
apply (rule map_rep_ok) |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
210 |
apply (assumption) |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
211 |
done |
816 | 212 |
|
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
213 |
lemma quotient_compose_list: |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
214 |
shows "Quotient ((list_rel op \<approx>1) OO (op \<approx>1) OO (list_rel op \<approx>1)) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
215 |
(abs_fset \<circ> (map abs_fset)) ((map rep_fset) \<circ> rep_fset)" |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
216 |
unfolding Quotient_def comp_def |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
217 |
apply (rule)+ |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
218 |
apply (simp add: abs_o_rep[OF Quotient_fset] id_simps Quotient_abs_rep[OF Quotient_fset]) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
219 |
apply (rule) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
220 |
apply (rule) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
221 |
apply (rule) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
222 |
apply (rule list_rel_refl) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
223 |
apply (metis equivp_def fset_equivp) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
224 |
apply (rule) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
225 |
apply (rule equivp_reflp[OF fset_equivp]) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
226 |
apply (rule list_rel_refl) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
227 |
apply (metis equivp_def fset_equivp) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
228 |
apply rule |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
229 |
apply rule |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
230 |
apply(rule quotient_compose_list_pre) |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
231 |
done |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
232 |
|
821 | 233 |
lemma quotient_compose_list_gen_pre: |
234 |
assumes a: "equivp r2" |
|
235 |
and b: "Quotient r2 abs2 rep2" |
|
236 |
shows "(list_rel r2 OO op \<approx>1 OO list_rel r2) r s = |
|
237 |
((list_rel r2 OO op \<approx>1 OO list_rel r2) r r \<and> |
|
238 |
(list_rel r2 OO op \<approx>1 OO list_rel r2) s s \<and> |
|
239 |
abs_fset (map abs2 r) = abs_fset (map abs2 s))" |
|
240 |
apply rule |
|
241 |
apply rule |
|
242 |
apply rule |
|
243 |
apply (rule list_rel_refl) |
|
244 |
apply (metis equivp_def a) |
|
245 |
apply rule |
|
246 |
apply (rule equivp_reflp[OF fset_equivp]) |
|
247 |
apply (rule list_rel_refl) |
|
248 |
apply (metis equivp_def a) |
|
249 |
apply(rule) |
|
250 |
apply rule |
|
251 |
apply (rule list_rel_refl) |
|
252 |
apply (metis equivp_def a) |
|
253 |
apply rule |
|
254 |
apply (rule equivp_reflp[OF fset_equivp]) |
|
255 |
apply (rule list_rel_refl) |
|
256 |
apply (metis equivp_def a) |
|
257 |
apply (subgoal_tac "map abs2 r \<approx>1 map abs2 s") |
|
258 |
apply (metis Quotient_rel[OF Quotient_fset]) |
|
259 |
apply (auto)[1] |
|
260 |
apply (subgoal_tac "map abs2 r = map abs2 b") |
|
261 |
prefer 2 |
|
262 |
apply (metis Quotient_rel[OF list_quotient[OF b]]) |
|
263 |
apply (subgoal_tac "map abs2 s = map abs2 ba") |
|
264 |
prefer 2 |
|
265 |
apply (metis Quotient_rel[OF list_quotient[OF b]]) |
|
266 |
apply (simp add: map_abs_ok_gen) |
|
267 |
apply rule |
|
268 |
apply (rule rep_abs_rsp[of "list_rel r2" "map abs2"]) |
|
269 |
apply (rule list_quotient) |
|
270 |
apply (rule b) |
|
271 |
apply (rule list_rel_refl) |
|
272 |
apply (metis equivp_def a) |
|
273 |
apply rule |
|
274 |
prefer 2 |
|
275 |
apply (rule rep_abs_rsp_left[of "list_rel r2" "map abs2"]) |
|
276 |
apply (rule list_quotient) |
|
277 |
apply (rule b) |
|
278 |
apply (rule list_rel_refl) |
|
279 |
apply (metis equivp_def a) |
|
280 |
apply (erule conjE)+ |
|
281 |
apply (subgoal_tac "map abs2 r \<approx>1 map abs2 s") |
|
282 |
apply (rule map_rep_ok_gen) |
|
283 |
apply (assumption) |
|
284 |
apply (metis Quotient_def Quotient_fset equivp_reflp fset_equivp a b) |
|
285 |
done |
|
286 |
||
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
287 |
lemma quotient_compose_list_gen: |
821 | 288 |
assumes a: "Quotient r2 abs2 rep2" |
289 |
and b: "equivp r2" (* reflp should be enough... *) |
|
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
290 |
shows "Quotient ((list_rel r2) OO (op \<approx>1) OO (list_rel r2)) |
811 | 291 |
(abs_fset \<circ> (map abs2)) ((map rep2) \<circ> rep_fset)" |
812 | 292 |
unfolding Quotient_def comp_def |
293 |
apply (rule)+ |
|
821 | 294 |
apply (simp add: abs_o_rep[OF a] id_simps Quotient_abs_rep[OF Quotient_fset]) |
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
295 |
apply (rule) |
812 | 296 |
apply (rule) |
297 |
apply (rule) |
|
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
298 |
apply (rule list_rel_refl) |
821 | 299 |
apply (metis b equivp_def) |
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
300 |
apply (rule) |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
301 |
apply (rule equivp_reflp[OF fset_equivp]) |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
302 |
apply (rule list_rel_refl) |
821 | 303 |
apply (metis b equivp_def) |
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
304 |
apply rule |
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
305 |
apply rule |
821 | 306 |
apply(rule quotient_compose_list_gen_pre[OF b a]) |
820
162e38c14f24
The working proof of the special case.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
819
diff
changeset
|
307 |
done |
809
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
308 |
|
821 | 309 |
(* This is the general statement but the types of abs2 and rep2 |
310 |
are wrong as can be seen in following exanples *) |
|
311 |
||
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
312 |
lemma quotient_compose_general: |
821 | 313 |
assumes a2: "Quotient r1 abs1 rep1" |
810
f73e2f5f17b2
Struggling with composition
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
809
diff
changeset
|
314 |
and "Quotient r2 abs2 rep2" |
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
315 |
shows "Quotient ((list_rel r2) OO r1 OO (list_rel r2)) |
821 | 316 |
(abs1 \<circ> (map abs2)) ((map rep2) \<circ> rep1)" |
810
f73e2f5f17b2
Struggling with composition
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
809
diff
changeset
|
317 |
sorry |
f73e2f5f17b2
Struggling with composition
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
809
diff
changeset
|
318 |
|
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
319 |
thm quotient_compose_ok [OF Quotient_fset] |
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
320 |
thm quotient_compose_general[OF Quotient_fset] |
810
f73e2f5f17b2
Struggling with composition
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
809
diff
changeset
|
321 |
|
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
322 |
thm quotient_compose_ok [OF Quotient_fset Quotient_fset] |
817
11a23fe266c4
cleaning in AbsRepTest.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
816
diff
changeset
|
323 |
(* Doesn't work: *) |
818
9ab49dc166d6
More cleaning and commenting AbsRepTest. Now tests work; just slow.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
817
diff
changeset
|
324 |
(* thm quotient_compose_general[OF Quotient_fset Quotient_fset] *) |
779
3b21b24a5fb6
corrected map declarations for Sum and Prod; moved absrep_fun examples in separate file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
325 |
|
809
e9e0d1810217
Trying to state composition quotient.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
808
diff
changeset
|
326 |
end |