equal
deleted
inserted
replaced
322 |
322 |
323 in [(\<^syntax_const>\<open>_Setcompr\<close>, setcompr_tr)] end |
323 in [(\<^syntax_const>\<open>_Setcompr\<close>, setcompr_tr)] end |
324 \<close> |
324 \<close> |
325 |
325 |
326 typed_print_translation \<open> |
326 typed_print_translation \<open> |
327 [(\<^const_syntax>\<open>Ball\<close>, fn _ => Syntax_Trans.preserve_binder_abs2_tr' \<^syntax_const>\<open>_Ball\<close>), |
327 [(\<^const_syntax>\<open>Ball\<close>, Syntax_Trans.preserve_binder_abs2_tr' \<^syntax_const>\<open>_Ball\<close>), |
328 (\<^const_syntax>\<open>Bex\<close>, fn _ => Syntax_Trans.preserve_binder_abs2_tr' \<^syntax_const>\<open>_Bex\<close>)] |
328 (\<^const_syntax>\<open>Bex\<close>, Syntax_Trans.preserve_binder_abs2_tr' \<^syntax_const>\<open>_Bex\<close>)] |
329 \<close> \<comment> \<open>to avoid eta-contraction of body\<close> |
329 \<close> \<comment> \<open>to avoid eta-contraction of body\<close> |
330 |
330 |
331 print_translation \<open> |
331 print_translation \<open> |
332 let |
332 let |
333 val ex_tr' = snd (Syntax_Trans.mk_binder_tr' (\<^const_syntax>\<open>Ex\<close>, "DUMMY")); |
333 val ex_tr' = snd (Syntax_Trans.mk_binder_tr' (\<^const_syntax>\<open>Ex\<close>, "DUMMY")); |
346 in Syntax.const \<^syntax_const>\<open>_Setcompr\<close> $ e $ idts $ Q end; |
346 in Syntax.const \<^syntax_const>\<open>_Setcompr\<close> $ e $ idts $ Q end; |
347 in |
347 in |
348 if check (P, 0) then tr' P |
348 if check (P, 0) then tr' P |
349 else |
349 else |
350 let |
350 let |
351 val (x as _ $ Free(xN, _), t) = Syntax_Trans.atomic_abs_tr' abs; |
351 val (x as _ $ Free(xN, _), t) = Syntax_Trans.atomic_abs_tr' ctxt abs; |
352 val M = Syntax.const \<^syntax_const>\<open>_Coll\<close> $ x $ t; |
352 val M = Syntax.const \<^syntax_const>\<open>_Coll\<close> $ x $ t; |
353 in |
353 in |
354 case t of |
354 case t of |
355 Const (\<^const_syntax>\<open>HOL.conj\<close>, _) $ |
355 Const (\<^const_syntax>\<open>HOL.conj\<close>, _) $ |
356 (Const (\<^const_syntax>\<open>Set.member\<close>, _) $ |
356 (Const (\<^const_syntax>\<open>Set.member\<close>, _) $ |