isabelle - What Kind of Type Definitions are Legal in Local Contexts? -
in isabelle's news file, found
command 'typedef' works within local theory context -- without introducing dependencies on parameters or assumptions, not possible in isabelle/pure/hol. note logical environment may contain multiple interpretations of local typedefs (with different non-emptiness proofs), in global theory context.
(which dates isabelle2009-2). latest news respect typedef , local theory contexts? further, restriction "without introducing dependencies on parameters or assumptions" mean?
if mean cannot use locale parameters in defining set of typedef, not consider typedef localized @ (since allowed instances can moved outside local context, or missing something?).
is (or should it, or ever be) possible along lines (where set used typedef depends on locale parameter v):
datatype ('a, 'b) "term" = var 'b | fun 'a "('a, 'b) term list" locale term_algebra = fixes f :: "'a set" , v :: "'b set" begin definition "domain α = {x : v. α x ~= var x}" typedef ('a, 'b) subst = "{α :: 'b => ('a, 'b) term. finite (domain α)}" end for obtain:
locally fixed type arguments "'a", "'b" in type declaration "subst"
a few more notes on this:
the local theory infrastructure merely organizes existing module concepts (
locale,classetc.) such definitional mechanisms (definition,theorem,inductive,functionetc.) can work uniformly in variety of contexts. not change logical foundations, specification elements cannot depend on term parameters (fixes) or premises (assumes) won't become fundamentally better. merely retrofitted greater framework, extra-logical benefit.the canonical local theory targets
locale, derivativesclass. these work within logic according principles sketched above: lambda-lifting via context offixes,assumes. other targets more ambition can imagined, need implemented brave , heroic guys. example, 1 wrap awe theory interpretation mechanism local theory target, , parametrization of types/consts/axioms --- @ usual cost of going through explicit proof terms implement admissible inferences within lcf prover (or @ cost of giving lcf-ness , via oracle).plain
typedefsketched above (and derivatives localizedcodatatype,datatypeof recent hol-bnf) improved in dependecy type parameters, mean implementation efforts don't justify meagre outcome right now. merely allow write polymorphic type constructions implicit arguments this:context fixes type 'a begin datatype list = nil | cons 'a list endafter export
'a listusual.further complication:
fixes type 'anot exist. isabelle/pure handles type parameters implicitly via hindley-milner.
Comments
Post a Comment