I have the theorem x < y ⟷ x ≤ y ∧ ¬ (x = y)
. The term of that theorem (Thm.prop_of) gets automatically changed to x < y ⟷ x ≤ y ∧ x ≠ y
. This term is used as a key in a Termtab
. Later, I manually build a term that is of the first form, but because of the contracted abbreviation it is not found in the table. Is there any way to prevent that contraction?
Is it possible that the pretty-printing is just fooling me?
How do you get hold of these terms in the first place?
Ah, the problem is that the type does not match apparently.
It is somewhat unusual to have a term where abbreviations have not yet been unfolded.
yeah that seems more likely
It was confusing because I printed several terms with a TERM exception and one term had the abbreviation contracted while the other term didn't.
btw you can also print terms with Pretty.writeln/Syntax.pretty_term.
or, even more easily, convert them to a cterm and do @{print}
of course that might sometimes obscure some things, so in those cases you can just @{print} the term directly to see what it looks like in ML
but that is /very/ verbose, so I'd only do that for very small terms
Last updated: Dec 21 2024 at 12:33 UTC