I am trying to use type declarations in a locale:
locale preorder =
typedecl conf
type_synonym vm = "conf ⇒ conf ⇒ bool"
for the first line I get
Outer syntax error⌂: context element expected,
but end-of-input⌂ was found
What's wrong with this definition?
For the syntax of locale declarations see Chapter 5 of https://isabelle.in.tum.de/doc/isar-ref.pdf.
The railroad diagram shows you how a syntactically correct locale declaration must look like.
(deleted wrong claim)
You probably want to write
locale preorder
begin
typedecl conf
type_synonym vm = "conf ⇒ conf ⇒ bool"
I was not aware you could even do typedecl
and type_synonym
inside a locale, but apparently you can. Today I learnt.
You only need the =
if you want to base your local on another locale, or add fixes/assumes.
Last updated: Dec 21 2024 at 16:20 UTC