How to disable the -contraction when print terms?
For example,
translations "{x. P}" ⇌ "CONST MyCollect (λx. P)"
this translation works in every case except the {x. P x}
.
For {x. P x}
, it is printed as MyCollect P
because the is -contracted to .
In the reference manual, it is mentioned that such -contracted can be prevented by print-translations in ML, but there is no further information about this.
(deleted)
(deleted)
Finally, i found the solution when i read the source Set.thy
. The eta contraction is disabled by print_translations
print_translation ‹
[Syntax_Trans.preserve_binder_abs2_tr' \<^const_syntax>‹Ball› \<^syntax_const>‹_Ball›,
Syntax_Trans.preserve_binder_abs2_tr' \<^const_syntax>‹Bex› \<^syntax_const>‹_Bex›]
› ― ‹to avoid eta-contraction of body›
Last updated: Dec 21 2024 at 16:20 UTC