Many thanks for your detailed answer!
> A more detailed description of your program
> might be helpful to identify such a solution.
What I'm trying to do is to specify lambda Prolog itself, and
I've a lot of freedom, in the sense of deep/shallow embedding.
I'm attaching two versions of the interpreter.
The former uses the substitution provided by the specification
language, and there I'm afraid I need the A -> term quantification.
The latter implements substitution via copy, and contains an explicit
step of normalization. Still, I'm using the unification variables of
the specification language to model the ones of the object language,
and this requires some features that are not part of LP (and Abella).
Given I'm using Elpi, I could suspend copy on flexible terms and
add some CHR rules to make things work as expected. I did not think
about it enough to say that this part of the program is irrelevant and
Of course I could give up this path and specify unification as well,
but this seems much more work. After all, I want to prove that
something bad does not happen *during* runtime, so I have to write
a runtime, where existential variables do have a syntax. But the idea
of not having to specify HO unification was very tantalizing.
Best,
--
Enrico Tassi