264
|
1 |
signature QUOTIENT_INFO =
|
|
2 |
sig
|
549
|
3 |
exception NotFound
|
|
4 |
|
264
|
5 |
type maps_info = {mapfun: string, relfun: string}
|
760
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
6 |
val maps_lookup: theory -> string -> maps_info (* raises NotFound *)
|
264
|
7 |
val maps_update_thy: string -> maps_info -> theory -> theory
|
|
8 |
val maps_update: string -> maps_info -> Proof.context -> Proof.context
|
699
|
9 |
val print_mapsinfo: Proof.context -> unit
|
264
|
10 |
|
|
11 |
type quotient_info = {qtyp: typ, rtyp: typ, rel: term, equiv_thm: thm}
|
311
|
12 |
val quotdata_lookup_thy: theory -> string -> quotient_info option
|
|
13 |
val quotdata_lookup: Proof.context -> string -> quotient_info option
|
|
14 |
val quotdata_update_thy: string -> (typ * typ * term * thm) -> theory -> theory
|
|
15 |
val quotdata_update: string -> (typ * typ * term * thm) -> Proof.context -> Proof.context
|
460
3f8c7183ddac
added facilities to get all stored quotient data (equiv thms etc)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
16 |
val quotdata_dest: theory -> quotient_info list
|
699
|
17 |
val print_quotinfo: Proof.context -> unit
|
268
4d58c02289ca
simplified the quotient_def code; type of the defined constant must now be given; for-part eliminated
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
18 |
|
496
|
19 |
type qconsts_info = {qconst: term, rconst: term, def: thm}
|
318
|
20 |
val qconsts_transfer: morphism -> qconsts_info -> qconsts_info
|
760
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
21 |
val qconsts_lookup: theory -> term -> qconsts_info (* raises NotFound *)
|
663
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
22 |
val qconsts_update_thy: string -> qconsts_info -> theory -> theory
|
497
b663bc007d00
Added qoutient_consts dest for getting all the constant definitions in the cleaning step.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
23 |
val qconsts_update_gen: string -> qconsts_info -> Context.generic -> Context.generic
|
b663bc007d00
Added qoutient_consts dest for getting all the constant definitions in the cleaning step.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
24 |
val qconsts_dest: theory -> qconsts_info list
|
310
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
25 |
val print_qconstinfo: Proof.context -> unit
|
450
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
26 |
|
582
|
27 |
val equiv_rules_get: Proof.context -> thm list
|
|
28 |
val equiv_rules_add: attribute
|
450
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
29 |
val rsp_rules_get: Proof.context -> thm list
|
636
|
30 |
val prs_rules_get: Proof.context -> thm list
|
614
|
31 |
val id_simps_get: Proof.context -> thm list
|
503
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
32 |
val quotient_rules_get: Proof.context -> thm list
|
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
33 |
val quotient_rules_add: attribute
|
264
|
34 |
end;
|
|
35 |
|
|
36 |
structure Quotient_Info: QUOTIENT_INFO =
|
|
37 |
struct
|
|
38 |
|
549
|
39 |
exception NotFound
|
268
4d58c02289ca
simplified the quotient_def code; type of the defined constant must now be given; for-part eliminated
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
40 |
|
264
|
41 |
(* data containers *)
|
|
42 |
(*******************)
|
|
43 |
|
759
|
44 |
(* info about map- and rel-functions for a type *)
|
264
|
45 |
type maps_info = {mapfun: string, relfun: string}
|
|
46 |
|
306
|
47 |
structure MapsData = Theory_Data
|
264
|
48 |
(type T = maps_info Symtab.table
|
|
49 |
val empty = Symtab.empty
|
|
50 |
val extend = I
|
306
|
51 |
val merge = Symtab.merge (K true))
|
264
|
52 |
|
760
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
53 |
fun maps_lookup thy s =
|
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
54 |
case (Symtab.lookup (MapsData.get thy) s) of
|
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
55 |
SOME map_fun => map_fun
|
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
56 |
| NONE => raise NotFound
|
264
|
57 |
|
|
58 |
fun maps_update_thy k minfo = MapsData.map (Symtab.update (k, minfo))
|
|
59 |
fun maps_update k minfo = ProofContext.theory (maps_update_thy k minfo)
|
|
60 |
|
|
61 |
fun maps_attribute_aux s minfo = Thm.declaration_attribute
|
|
62 |
(fn thm => Context.mapping (maps_update_thy s minfo) (maps_update s minfo))
|
|
63 |
|
|
64 |
(* attribute to be used in declare statements *)
|
|
65 |
fun maps_attribute (ctxt, (tystr, (mapstr, relstr))) =
|
|
66 |
let
|
|
67 |
val thy = ProofContext.theory_of ctxt
|
|
68 |
val tyname = Sign.intern_type thy tystr
|
|
69 |
val mapname = Sign.intern_const thy mapstr
|
|
70 |
val relname = Sign.intern_const thy relstr
|
613
|
71 |
|
675
|
72 |
fun sanity_check s = (Const (s, dummyT) |> Syntax.check_term ctxt)
|
|
73 |
val _ = map sanity_check [mapname, relname]
|
264
|
74 |
in
|
|
75 |
maps_attribute_aux tyname {mapfun = mapname, relfun = relname}
|
|
76 |
end
|
|
77 |
|
|
78 |
val maps_attr_parser =
|
|
79 |
Args.context -- Scan.lift
|
|
80 |
((Args.name --| OuterParse.$$$ "=") --
|
|
81 |
(OuterParse.$$$ "(" |-- Args.name --| OuterParse.$$$ "," --
|
|
82 |
Args.name --| OuterParse.$$$ ")"))
|
|
83 |
|
|
84 |
val _ = Context.>> (Context.map_theory
|
|
85 |
(Attrib.setup @{binding "map"} (maps_attr_parser >> maps_attribute)
|
|
86 |
"declaration of map information"))
|
|
87 |
|
699
|
88 |
fun print_mapsinfo ctxt =
|
|
89 |
let
|
|
90 |
fun prt_map (ty_name, {mapfun, relfun}) =
|
|
91 |
Pretty.block (Library.separate (Pretty.brk 2)
|
|
92 |
[Pretty.str "type:",
|
|
93 |
Pretty.str ty_name,
|
|
94 |
Pretty.str "map fun:",
|
|
95 |
Pretty.str mapfun,
|
|
96 |
Pretty.str "relation map:",
|
|
97 |
Pretty.str relfun])
|
|
98 |
in
|
|
99 |
MapsData.get (ProofContext.theory_of ctxt)
|
|
100 |
|> Symtab.dest
|
|
101 |
|> map (prt_map)
|
|
102 |
|> Pretty.big_list "maps:"
|
|
103 |
|> Pretty.writeln
|
|
104 |
end
|
|
105 |
|
|
106 |
|
264
|
107 |
|
329
|
108 |
(* info about quotient types *)
|
264
|
109 |
type quotient_info = {qtyp: typ, rtyp: typ, rel: term, equiv_thm: thm}
|
|
110 |
|
306
|
111 |
structure QuotData = Theory_Data
|
311
|
112 |
(type T = quotient_info Symtab.table
|
|
113 |
val empty = Symtab.empty
|
264
|
114 |
val extend = I
|
311
|
115 |
val merge = Symtab.merge (K true))
|
264
|
116 |
|
320
7d3d86beacd6
started regularize of rtrm/qtrm version; looks quite promising
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
117 |
fun quotdata_lookup_thy thy str =
|
7d3d86beacd6
started regularize of rtrm/qtrm version; looks quite promising
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
118 |
Symtab.lookup (QuotData.get thy) (Sign.intern_type thy str)
|
7d3d86beacd6
started regularize of rtrm/qtrm version; looks quite promising
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
119 |
|
311
|
120 |
val quotdata_lookup = quotdata_lookup_thy o ProofContext.theory_of
|
264
|
121 |
|
314
|
122 |
fun quotdata_update_thy qty_name (qty, rty, rel, equiv_thm) =
|
311
|
123 |
QuotData.map (Symtab.update (qty_name, {qtyp = qty, rtyp = rty, rel = rel, equiv_thm = equiv_thm}))
|
264
|
124 |
|
311
|
125 |
fun quotdata_update qty_name (qty, rty, rel, equiv_thm) =
|
|
126 |
ProofContext.theory (quotdata_update_thy qty_name (qty, rty, rel, equiv_thm))
|
264
|
127 |
|
460
3f8c7183ddac
added facilities to get all stored quotient data (equiv thms etc)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
128 |
fun quotdata_dest thy =
|
3f8c7183ddac
added facilities to get all stored quotient data (equiv thms etc)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
129 |
map snd (Symtab.dest (QuotData.get thy))
|
3f8c7183ddac
added facilities to get all stored quotient data (equiv thms etc)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
130 |
|
310
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
131 |
fun print_quotinfo ctxt =
|
264
|
132 |
let
|
|
133 |
fun prt_quot {qtyp, rtyp, rel, equiv_thm} =
|
|
134 |
Pretty.block (Library.separate (Pretty.brk 2)
|
324
|
135 |
[Pretty.str "quotient type:",
|
264
|
136 |
Syntax.pretty_typ ctxt qtyp,
|
324
|
137 |
Pretty.str "raw type:",
|
264
|
138 |
Syntax.pretty_typ ctxt rtyp,
|
324
|
139 |
Pretty.str "relation:",
|
264
|
140 |
Syntax.pretty_term ctxt rel,
|
324
|
141 |
Pretty.str "equiv. thm:",
|
264
|
142 |
Syntax.pretty_term ctxt (prop_of equiv_thm)])
|
|
143 |
in
|
|
144 |
QuotData.get (ProofContext.theory_of ctxt)
|
311
|
145 |
|> Symtab.dest
|
|
146 |
|> map (prt_quot o snd)
|
264
|
147 |
|> Pretty.big_list "quotients:"
|
|
148 |
|> Pretty.writeln
|
|
149 |
end
|
|
150 |
|
|
151 |
val _ =
|
|
152 |
OuterSyntax.improper_command "print_quotients" "print out all quotients"
|
310
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
153 |
OuterKeyword.diag (Scan.succeed (Toplevel.keep (print_quotinfo o Toplevel.context_of)))
|
264
|
154 |
|
268
4d58c02289ca
simplified the quotient_def code; type of the defined constant must now be given; for-part eliminated
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
155 |
|
450
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
156 |
(* info about quotient constants *)
|
496
|
157 |
type qconsts_info = {qconst: term, rconst: term, def: thm}
|
310
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
158 |
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
159 |
structure QConstsData = Theory_Data
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
160 |
(type T = qconsts_info Symtab.table
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
161 |
val empty = Symtab.empty
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
162 |
val extend = I
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
163 |
val merge = Symtab.merge (K true))
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
164 |
|
496
|
165 |
fun qconsts_transfer phi {qconst, rconst, def} =
|
318
|
166 |
{qconst = Morphism.term phi qconst,
|
496
|
167 |
rconst = Morphism.term phi rconst,
|
|
168 |
def = Morphism.thm phi def}
|
318
|
169 |
|
663
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
170 |
fun qconsts_update_thy id qcinfo = QConstsData.map (Symtab.update (id, qcinfo))
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
171 |
fun qconsts_update_gen id qcinfo = Context.mapping (qconsts_update_thy id qcinfo) I
|
310
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
172 |
|
497
b663bc007d00
Added qoutient_consts dest for getting all the constant definitions in the cleaning step.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
173 |
fun qconsts_dest thy =
|
663
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
174 |
map snd (Symtab.dest (QConstsData.get thy))
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
175 |
|
751
|
176 |
(* FIXME / TODO : better implementation of the lookup datastructure *)
|
|
177 |
(* for example symtabs to alist; or tables with string type key *)
|
663
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
178 |
fun qconsts_lookup thy t =
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
179 |
let
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
180 |
val smt = Symtab.dest (QConstsData.get thy);
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
181 |
val (name, qty) = dest_Const t
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
182 |
fun matches (_, x) =
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
183 |
let
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
184 |
val (name', qty') = dest_Const (#qconst x);
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
185 |
in
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
186 |
name = name' andalso Sign.typ_instance thy (qty, qty')
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
187 |
end
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
188 |
in
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
189 |
case (find_first matches smt) of
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
190 |
SOME (_, x) => x
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
191 |
| _ => raise NotFound
|
0dd10a900cae
Different syntax for definitions that allows overloading and retrieving of definitions by matching whole constants.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
192 |
end
|
497
b663bc007d00
Added qoutient_consts dest for getting all the constant definitions in the cleaning step.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
|
193 |
|
310
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
194 |
fun print_qconstinfo ctxt =
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
195 |
let
|
496
|
196 |
fun prt_qconst {qconst, rconst, def} =
|
318
|
197 |
Pretty.block (separate (Pretty.brk 1)
|
310
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
198 |
[Syntax.pretty_term ctxt qconst,
|
318
|
199 |
Pretty.str ":=",
|
760
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
200 |
Syntax.pretty_term ctxt rconst,
|
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
201 |
Pretty.str "as",
|
c1989de100b4
various tunings; map_lookup now raises an exception; addition to FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
202 |
Syntax.pretty_term ctxt (prop_of def)])
|
310
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
203 |
in
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
204 |
QConstsData.get (ProofContext.theory_of ctxt)
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
205 |
|> Symtab.dest
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
206 |
|> map (prt_qconst o snd)
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
207 |
|> Pretty.big_list "quotient constants:"
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
208 |
|> Pretty.writeln
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
209 |
end
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
210 |
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
211 |
val _ =
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
212 |
OuterSyntax.improper_command "print_quotconsts" "print out all quotient constants"
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
213 |
OuterKeyword.diag (Scan.succeed (Toplevel.keep (print_qconstinfo o Toplevel.context_of)))
|
fec6301a1989
added a container for quotient constants (does not work yet though)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
214 |
|
614
|
215 |
(* FIXME/TODO: check the various lemmas conform *)
|
|
216 |
(* with the required shape *)
|
|
217 |
|
582
|
218 |
(* equivalence relation theorems *)
|
|
219 |
structure EquivRules = Named_Thms
|
636
|
220 |
(val name = "quot_equiv"
|
582
|
221 |
val description = "Equivalence relation theorems.")
|
|
222 |
|
|
223 |
val equiv_rules_get = EquivRules.get
|
|
224 |
val equiv_rules_add = EquivRules.add
|
|
225 |
|
|
226 |
(* respectfulness theorems *)
|
450
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
227 |
structure RspRules = Named_Thms
|
636
|
228 |
(val name = "quot_respect"
|
450
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
229 |
val description = "Respectfulness theorems.")
|
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
230 |
|
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
231 |
val rsp_rules_get = RspRules.get
|
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
232 |
|
636
|
233 |
(* preservation theorems *)
|
|
234 |
structure PrsRules = Named_Thms
|
|
235 |
(val name = "quot_preserve"
|
|
236 |
val description = "Respectfulness theorems.")
|
|
237 |
|
|
238 |
val prs_rules_get = PrsRules.get
|
|
239 |
|
759
|
240 |
(* id simplification theorems *)
|
614
|
241 |
structure IdSimps = Named_Thms
|
|
242 |
(val name = "id_simps"
|
|
243 |
val description = "Identity simp rules for maps.")
|
|
244 |
|
|
245 |
val id_simps_get = IdSimps.get
|
|
246 |
|
582
|
247 |
(* quotient theorems *)
|
503
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
248 |
structure QuotientRules = Named_Thms
|
636
|
249 |
(val name = "quot_thm"
|
503
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
250 |
val description = "Quotient theorems.")
|
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
251 |
|
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
252 |
val quotient_rules_get = QuotientRules.get
|
582
|
253 |
val quotient_rules_add = QuotientRules.add
|
503
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
254 |
|
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
255 |
(* setup of the theorem lists *)
|
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
256 |
val _ = Context.>> (Context.map_theory
|
582
|
257 |
(EquivRules.setup #>
|
|
258 |
RspRules.setup #>
|
643
|
259 |
PrsRules.setup #>
|
614
|
260 |
IdSimps.setup #>
|
503
d2c9a72e52e0
first version of internalised quotient theorems; added FIXME-TODO
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
261 |
QuotientRules.setup))
|
450
2dc708ddb93a
introduced a global list of respectfulness lemmas; the attribute is [quot_rsp]
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
262 |
|
264
|
263 |
end; (* structure *)
|
|
264 |
|