src/HOL/IMP/Natural.thy
changeset 27362 a6dc1769fdda
parent 23746 a455e69c31cc
child 34055 fdf294ee08b2
equal deleted inserted replaced
27361:24ec32bee347 27362:a6dc1769fdda
    16   in state @{text s}, terminates in state @{text s'}}. Formally,
    16   in state @{text s}, terminates in state @{text s'}}. Formally,
    17   @{text "\<langle>c,s\<rangle> \<longrightarrow>\<^sub>c s'"} is just another form of saying \emph{the tuple
    17   @{text "\<langle>c,s\<rangle> \<longrightarrow>\<^sub>c s'"} is just another form of saying \emph{the tuple
    18   @{text "(c,s,s')"} is part of the relation @{text evalc}}:
    18   @{text "(c,s,s')"} is part of the relation @{text evalc}}:
    19 *}
    19 *}
    20 
    20 
    21 constdefs
    21 definition
    22   update :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a \<Rightarrow> 'b)" ("_/[_ ::= /_]" [900,0,0] 900)
    22   update :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a \<Rightarrow> 'b)" ("_/[_ ::= /_]" [900,0,0] 900) where
    23   "update == fun_upd"
    23   "update = fun_upd"
    24 
    24 
    25 syntax (xsymbols)
    25 notation (xsymbols)
    26   update :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a \<Rightarrow> 'b)" ("_/[_ \<mapsto> /_]" [900,0,0] 900)
    26   update  ("_/[_ \<mapsto> /_]" [900,0,0] 900)
    27 
    27 
    28 text {*
    28 text {*
    29   The big-step execution relation @{text evalc} is defined inductively:
    29   The big-step execution relation @{text evalc} is defined inductively:
    30 *}
    30 *}
    31 inductive
    31 inductive
   102   We call two statements @{text c} and @{text c'} equivalent wrt.~the
   102   We call two statements @{text c} and @{text c'} equivalent wrt.~the
   103   big-step semantics when \emph{@{text c} started in @{text s} terminates
   103   big-step semantics when \emph{@{text c} started in @{text s} terminates
   104   in @{text s'} iff @{text c'} started in the same @{text s} also terminates
   104   in @{text s'} iff @{text c'} started in the same @{text s} also terminates
   105   in the same @{text s'}}. Formally:
   105   in the same @{text s'}}. Formally:
   106 *}
   106 *}
   107 constdefs
   107 definition
   108   equiv_c :: "com \<Rightarrow> com \<Rightarrow> bool" ("_ \<sim> _")
   108   equiv_c :: "com \<Rightarrow> com \<Rightarrow> bool" ("_ \<sim> _") where
   109   "c \<sim> c' \<equiv> \<forall>s s'. \<langle>c, s\<rangle> \<longrightarrow>\<^sub>c s' = \<langle>c', s\<rangle> \<longrightarrow>\<^sub>c s'"
   109   "c \<sim> c' = (\<forall>s s'. \<langle>c, s\<rangle> \<longrightarrow>\<^sub>c s' = \<langle>c', s\<rangle> \<longrightarrow>\<^sub>c s')"
   110 
   110 
   111 text {*
   111 text {*
   112   Proof rules telling Isabelle to unfold the definition
   112   Proof rules telling Isabelle to unfold the definition
   113   if there is something to be proved about equivalent
   113   if there is something to be proved about equivalent
   114   statements: *}
   114   statements: *}