What is the meaning of CONST in Isabelle/Pure? In HOL.thy, we have the following code blocks:
translations "∃!x. P" ⇌ "CONST Ex1 (λx. P)"
translations "THE x. P" ⇌ "CONST The (λx. P)"
translations
"_Let (_binds b bs) e" ⇌ "_Let b (_Let bs e)"
"let x = a in e" ⇌ "CONST Let a (λx. e)"
I was trying to understand what "THE" meant, and found this in HOL.thy. "THE" is explained somewhat here, but I don't really get what's going fundamentally, since supposing P :: 'a ==> a' ==> bool
definition test :: "'a ==> 'a" where
"test y = (THE x. (P x y))"
How can "test y" be type "'a" if there doesn't exists x s.t. P x y? Somehow this has to be hiding in CONST and The (which I also don't really understand as it's just given axiomatically as something of type "('a ==> bool) ==> 'a" without any properties).
Perhaps most importantly, where is there a reference for all of this?? It's not in the Isabelle/Isar reference manual, the Isabelle HOL tutorial, the Isabelle/Isar Implementation pdf, in comments of the theory files, or anywhere I've been able to find.