@@ -77,7 +77,7 @@ fun lens_proof tname x thy =
77
77
Goal.prove_global thy [] []
78
78
(hd (Type_Infer_Context.infer_types
79
79
(Proof_Context.init_global thy)
80
- [mk_vwb_lens (const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ x))]))
80
+ [mk_vwb_lens (const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ x))]))
81
81
(fn {context = context, prems = _}
82
82
=> EVERY [ Locale.intro_locales_tac {strict = true , eager = true } context []
83
83
, PARALLEL_ALLGOALS (asm_simp_tac
@@ -91,7 +91,7 @@ fun lens_sym_proof tname thy =
91
91
(hd (Type_Infer_Context.infer_types
92
92
(Proof_Context.init_global thy)
93
93
[ Const (Trueprop, dummyT)
94
- $ (const sym_lensN $ const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ all_lensN))]))
94
+ $ (const sym_lensN $ const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ all_lensN))]))
95
95
(fn {context = context, prems = _}
96
96
=> EVERY [ Classical.rule_tac context [@{thm sym_lens.intro}] [] 1
97
97
, PARALLEL_ALLGOALS (asm_simp_tac
@@ -144,8 +144,8 @@ fun lens_bij_proof tname thy =
144
144
(Proof_Context.init_global thy)
145
145
[ Const (Trueprop, dummyT)
146
146
$ (const (bij_lensN) $
147
- (const (lens_plusN) $ const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ base_lensN)
148
- $ const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ child_lensN)))]))
147
+ (const (lens_plusN) $ const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ base_lensN)
148
+ $ const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ child_lensN)))]))
149
149
(fn {context = context, prems = _}
150
150
=> EVERY [ Locale.intro_locales_tac {strict = true , eager = true } context []
151
151
, auto_tac (fold add_simp (get_thms thy lens_defsN @ [@{thm prod.case_eq_if}])
@@ -164,8 +164,8 @@ fun indep_proof tname thy (x, y) =
164
164
(hd (Type_Infer_Context.infer_types
165
165
(Proof_Context.init_global thy)
166
166
[ mk_indep
167
- (const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ x))
168
- (const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ y))
167
+ (const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ x))
168
+ (const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ y))
169
169
]))
170
170
(prove_indep tname thy)
171
171
end
@@ -179,7 +179,7 @@ fun equiv_one_proof tname thy fs =
179
179
$ ( Const (lens_equivN, dummyT)
180
180
$ Const (id_lensN, dummyT)
181
181
$ foldr1 (fn (x, y) => Const (lens_plusN, dummyT) $ x $ y)
182
- (map (fn n => Const (theory_name thy ^ " ." ^ tname ^ " ." ^ n, dummyT)) (fs @ [child_lensN]))
182
+ (map (fn n => Const (theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ n, dummyT)) (fs @ [child_lensN]))
183
183
)]))
184
184
(prove_equiv tname thy)
185
185
end
@@ -194,7 +194,7 @@ fun equiv_more_proof tname pname thy fs =
194
194
$ ( Const (lens_equivN, dummyT)
195
195
$ Const (pname ^ " ." ^ child_lensN, dummyT)
196
196
$ foldr1 (fn (x, y) => Const (lens_plusN, dummyT) $ x $ y)
197
- (map (fn n => Const (theory_name thy ^ " ." ^ tname ^ " ." ^ n, dummyT)) (fs @ [child_lensN]))
197
+ (map (fn n => Const (theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ n, dummyT)) (fs @ [child_lensN]))
198
198
)]))
199
199
(prove_equiv tname thy)
200
200
end
@@ -206,10 +206,10 @@ fun equiv_base_proof tname parent thy fs =
206
206
(Proof_Context.init_global thy)
207
207
[ Const (Trueprop, dummyT)
208
208
$ ( Const (lens_equivN, dummyT)
209
- $ Const (theory_name thy ^ " ." ^ tname ^ " ." ^ base_lensN, dummyT)
209
+ $ Const (theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ base_lensN, dummyT)
210
210
$ foldr1 (fn (x, y) => Const (lens_plusN, dummyT) $ x $ y)
211
211
((case parent of NONE => [] | SOME (_, pname) => [Const (pname ^ " ." ^ base_lensN, dummyT)]) @
212
- map (fn n => Const (theory_name thy ^ " ." ^ tname ^ " ." ^ n, dummyT)) fs)
212
+ map (fn n => Const (theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ n, dummyT)) fs)
213
213
)]))
214
214
(prove_equiv tname thy)
215
215
end
@@ -223,7 +223,7 @@ fun lenses_bij_proof tname parent thy fs =
223
223
$ (const (bij_lensN) $
224
224
(foldr1 (fn (x, y) => Const (lens_plusN, dummyT) $ x $ y)
225
225
((case parent of NONE => [] | SOME (_, pname) => [Const (pname ^ " ." ^ base_lensN, dummyT)]) @
226
- map (fn n => Const (theory_name thy ^ " ." ^ tname ^ " ." ^ n, dummyT)) (fs @ [child_lensN]))))
226
+ map (fn n => Const (theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ n, dummyT)) (fs @ [child_lensN]))))
227
227
]))
228
228
(fn {context = context, prems = _}
229
229
=> EVERY [ Locale.intro_locales_tac {strict = true , eager = true } context []
@@ -240,8 +240,8 @@ fun equiv_partition_proof tname thy =
240
240
[ Const (Trueprop, dummyT)
241
241
$ ( Const (lens_equivN, dummyT)
242
242
$ ( Const (lens_plusN, dummyT)
243
- $ Const (theory_name thy ^ " ." ^ tname ^ " ." ^ base_lensN, dummyT)
244
- $ Const (theory_name thy ^ " ." ^ tname ^ " ." ^ child_lensN, dummyT))
243
+ $ Const (theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ base_lensN, dummyT)
244
+ $ Const (theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ child_lensN, dummyT))
245
245
$ Const (id_lensN, dummyT)
246
246
)]))
247
247
(prove_equiv tname thy)
@@ -256,7 +256,7 @@ fun sublens_proof tname pname thy y x =
256
256
(Proof_Context.init_global thy)
257
257
[ Const (Trueprop, dummyT)
258
258
$ ( Const (sublensN, dummyT)
259
- $ Const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
259
+ $ Const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
260
260
$ Const (pname ^ " ." ^ y, dummyT)
261
261
)]))
262
262
(prove_sublens tname thy)
@@ -270,10 +270,10 @@ fun quotient_proof tname thy x =
270
270
[ Const (Trueprop, dummyT)
271
271
$ ( Const (HOLeq, dummyT)
272
272
$ (Const (lens_quotientN, dummyT)
273
- $ Const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
274
- $ Const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ base_lensN, dummyT)
273
+ $ Const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
274
+ $ Const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ base_lensN, dummyT)
275
275
)
276
- $ Const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
276
+ $ Const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
277
277
)]))
278
278
(prove_quotient tname thy)
279
279
end
@@ -286,10 +286,10 @@ fun composition_proof tname thy x =
286
286
[ Const (Trueprop, dummyT)
287
287
$ ( Const (HOLeq, dummyT)
288
288
$ (Const (lens_compN, dummyT)
289
- $ Const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
290
- $ Const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ base_lensN, dummyT)
289
+ $ Const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
290
+ $ Const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ base_lensN, dummyT)
291
291
)
292
- $ Const (Context.theory_name thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
292
+ $ Const (Context.theory_name {long = false } thy ^ " ." ^ tname ^ " ." ^ x, dummyT)
293
293
)]))
294
294
(prove_quotient tname thy)
295
295
end
@@ -331,7 +331,7 @@ fun add_alphabet (params, binding) raw_parent ty_fields thy =
331
331
|> (fn thy =>
332
332
let
333
333
(* Get the splitting theorems of all parents in reverse order *)
334
- val psplits = List.concat (map (#splits o Record.the_info thy) ((map snd (get_parents thy (Context.theory_name thy ^ " ." ^ tname)))))
334
+ val psplits = List.concat (map (#splits o Record.the_info thy) ((map snd (get_parents thy (Context.theory_name {long = false } thy ^ " ." ^ tname)))))
335
335
(* Remove the splitting theorems *)
336
336
val thy1 = Context.theory_map (fold (Named_Theorems.del_thm " Lens_Instances.alpha_splits" ) psplits) thy
337
337
(* Add them again, so they have lower priority than the child splitting theorems *)
@@ -351,7 +351,7 @@ fun add_alphabet (params, binding) raw_parent ty_fields thy =
351
351
(* Add a bij lens proof for the summation of all constituent lenses and the more lens *)
352
352
|> (fn thy => if raw_parent = NONE then snd (add_thm ((Binding.make (bij_lensesN, Position.none), lenses_bij_proof tname parent thy lnames), attrs) thy) else thy)
353
353
(* Add sublens proofs *)
354
- |> (fn thy => snd (add_thmss [((Binding.make (sublensesN, Position.none), map (sublens_proof tname pname thy plchild) plnames @ map (sublens_proof tname (Context.theory_name thy ^ " ." ^ tname) thy base_lensN) lnames), attrs)] thy))
354
+ |> (fn thy => snd (add_thmss [((Binding.make (sublensesN, Position.none), map (sublens_proof tname pname thy plchild) plnames @ map (sublens_proof tname (Context.theory_name {long = false } thy ^ " ." ^ tname) thy base_lensN) lnames), attrs)] thy))
355
355
(* Add quotient proofs *)
356
356
|> (fn thy => snd (add_thmss [((Binding.make (quotientsN, Position.none), map (quotient_proof tname thy) lnames), attrs)] thy))
357
357
(* Add composition proofs *)
0 commit comments