src/HOL/Statespace/StateSpaceEx.thy
changeset 29247 95d3a82857e5
parent 29235 2d62b637fa80
child 29248 f1f1bccf2fc5
equal deleted inserted replaced
29238:eddc08920f4a 29247:95d3a82857e5
    27 \isacommand{statespace} like this:*}
    27 \isacommand{statespace} like this:*}
    28 
    28 
    29 statespace vars =
    29 statespace vars =
    30   n::nat
    30   n::nat
    31   b::bool
    31   b::bool
       
    32 
       
    33 print_locale vars_namespace
       
    34 print_locale vars_valuetypes
       
    35 print_locale vars
    32 
    36 
    33 text {* \noindent This resembles a \isacommand{record} definition, 
    37 text {* \noindent This resembles a \isacommand{record} definition, 
    34 but introduces sophisticated locale
    38 but introduces sophisticated locale
    35 infrastructure instead of HOL type schemes.  The resulting context
    39 infrastructure instead of HOL type schemes.  The resulting context
    36 postulates two distinct names @{term "n"} and @{term "b"} and
    40 postulates two distinct names @{term "n"} and @{term "b"} and
   194 lemma (in dup)
   198 lemma (in dup)
   195  shows "s<A := i>\<cdot>x = s\<cdot>x"
   199  shows "s<A := i>\<cdot>x = s\<cdot>x"
   196   by simp
   200   by simp
   197 
   201 
   198 
   202 
       
   203 text {* Hmm, I hoped this would work now...*}
       
   204 
       
   205 locale fooX = foo +
       
   206  assumes "s<a:=i>\<cdot>b = k"
       
   207 
       
   208 (* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
   199 text {* There are known problems with syntax-declarations. They currently
   209 text {* There are known problems with syntax-declarations. They currently
   200 only work, when the context is already built. Hopefully this will be 
   210 only work, when the context is already built. Hopefully this will be 
   201 implemented correctly in future Isabelle versions. *}
   211 implemented correctly in future Isabelle versions. *}
   202 
   212 
       
   213 (*
   203 lemma 
   214 lemma 
   204   assumes "foo f a b c p1 i1 p2 i2 p3 i3 p4 i4"
   215   assumes "foo f a b c p1 i1 p2 i2 p3 i3 p4 i4"
   205   shows True
   216   shows True
   206 proof
   217 proof
   207   class_interpret foo [f a b c p1 i1 p2 i2 p3 i3 p4 i4] by fact
   218   interpret foo [f a b c p1 i1 p2 i2 p3 i3 p4 i4] by fact
   208   term "s<a := i>\<cdot>a = i"
   219   term "s<a := i>\<cdot>a = i"
   209 qed
   220 qed
   210 
   221 *)
   211 (*
   222 (*
   212 lemma 
   223 lemma 
   213   includes foo
   224   includes foo
   214   shows "s<a := i>\<cdot>a = i"
   225   shows "s<a := i>\<cdot>a = i"
   215 *)
   226 *)