set - range restriction/domain restriction in Isabelle -
i trying input schema isabelle when add range restriction or domain restriction theorem prover doesn't want parse. have following schema in latex:
\begin{schema}{videoshop} members: \power person \\ rented: person \rel title \\ stocklevel: title \pfun \nat \where \dom rented \subseteq members \\ \ran rented \subseteq \dom stocklevel \\ \forall t: \ran rented @ \# (rented \rres \{t\}) \leq stocklevel~t \end{schema}
when inputting isabelle following:
locale videoshop = fixes members :: "person set" , rented :: "(person * title) set" , stocklevel :: "(title * nat) set" assumes "domain rented \<subseteq> members" , "range rented \<subseteq> domain stocklevel" , "(\<forall> t. (t \<in> range rented) \<and> (card (rented \<rhd> {t}) \<le> stocklevel t))" begin .....
it parses except last expression \<forall> t.....
i don't understand how add range restriction isabelle.
there multiple problems input.
the
⊳
symbol using in expression(rented ⊳ {t})
is not associated operator, can't parsed. i'm not quite sure it's supposed mean. high-level idea of specification i'm guessing along lines of "all persons rented specific title". can expressed set comprehension:
{p. (p, t) ∈ rented}
you translated bounded universal quantifier quantifier containing conjunction. not want, because says "for
t
,t
in range ofrented
and else". isabelle has notation bounded quantifiers.∀t ∈ range rented. ...
you trying use
stocklevel
function, isn't. latex input gather it's supposed partial function. isabelle calls thesemap
s. appropriate type is:title ⇀ nat
note "harpoon" symbol instead of function arrow. domain function maps called
dom
. second locale assumption can expressed as:range rented ⊆ dom stocklevel
given that, can use
stocklevel
functiontitle
nat option
.
Comments
Post a Comment