3

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.

  • 2
    `THE` is merely syntactic sugar for the application of the constant `The` (try `lemma "(THE x. P x) = The P" by (rule refl)`): syntax transformations are described in Section 8.5 of the reference manual. If you look further down the theory `HOL`, then you will find an axiom for the constant `The`: `the_eq_trivial`. In the subsection `THE: definite description operator` in the same theory you will find fundamental (derived) properties of the constant `The`. – user9716869 - supports Ukraine Oct 01 '19 at 22:01
  • 1
    Unfortunately, I have to agree that the purpose of the constant `The` is not described very well in the manuals. However, there is a section on it in the book 'A Proof Assistant for Higher-Order Logic' by Tobias Nipkow et al. Also, see the following [post](https://lists.cam.ac.uk/mailman/htdig/cl-isabelle-users/2012-July/msg00297.html) on the mailing-list. – user9716869 - supports Ukraine Oct 01 '19 at 22:04
  • Somehow I missed that axiom, it does clarify things w/r/t THE (though it's still a little weird as basically THE x. P x where x::'a is something of type 'a but totally undetermined). Could you point me toward a reference for CONST though? I'm not sure what it's doing there. – Physical Mathematics Oct 01 '19 at 22:10
  • 1
    "something of type 'a but totally undetermined": you are right. In this case, it is an arbitrary term of the type `'a`. You can hardly state anything meaningful about it in this case. There is also a, somewhat, related constant `undefined` that represents an arbitrary term of a given type. In my first comment I have already provided a reference for the syntax transformations: Section 8.5 in the reference manual. Subsection 8.5.2 mentions `CONST`, but you will need to read the entire section (if not the entire chapter) to gain a reasonable level of understanding of the implementation details. – user9716869 - supports Ukraine Oct 01 '19 at 22:19
  • Yeah, sorry. I have to read more carefully... – Physical Mathematics Oct 01 '19 at 22:26
  • 3
    Translations and the whole `CONST` thing is really just about setting up notation. There's really no need to worry about these things as a user. The important bit about `The` is its axiomatization and the characterisation derived from that (cf. the lemmas `theI` / `theI'`). I've been a user and developer of Isabelle for 8 years and I'm still not sure how translations work. Of course, if these things really do interest you a lot, Chapter 8 of the Isabelle/Isar reference manual is probably the way to go. – Manuel Eberl Oct 02 '19 at 07:35

0 Answers0