src/HOL/TLA/Stfun.thy
changeset 12607 16b63730cfbb
parent 12338 de0f4a63baa5
child 17309 c43ed29bd197
equal deleted inserted replaced
12606:cf1715a5f5ec 12607:16b63730cfbb
    32      Moreover, we do not define a type of state variables separate from that
    32      Moreover, we do not define a type of state variables separate from that
    33      of arbitrary state functions, again in order to simplify the definition
    33      of arbitrary state functions, again in order to simplify the definition
    34      of flexible quantification later on. Nevertheless, we need to distinguish
    34      of flexible quantification later on. Nevertheless, we need to distinguish
    35      state variables, mainly to define the enabledness of actions. The user
    35      state variables, mainly to define the enabledness of actions. The user
    36      identifies (tuples of) "base" state variables in a specification via the
    36      identifies (tuples of) "base" state variables in a specification via the
    37      "meta predicate" stvars.
    37      "meta predicate" basevars, which is defined here.
    38      NOTE: There should not be duplicates in the tuple!
       
    39   *)
    38   *)
    40   stvars    :: "'a stfun => bool"
    39   stvars    :: "'a stfun => bool"
    41 
    40 
    42 syntax
    41 syntax
    43   "PRED"    :: lift => 'a                          ("PRED _")
    42   "PRED"    :: lift => 'a                          ("PRED _")
    45 
    44 
    46 translations
    45 translations
    47   "PRED P"   =>  "(P::state => _)"
    46   "PRED P"   =>  "(P::state => _)"
    48   "_stvars"  ==  "stvars"
    47   "_stvars"  ==  "stvars"
    49 
    48 
    50 rules
    49 defs
    51   (* Base variables may be assigned arbitrary (type-correct) values. 
    50   (* Base variables may be assigned arbitrary (type-correct) values. 
    52      Note that vs may be a tuple of variables. The rule would be unsound 
    51      Note that vs may be a tuple of variables. The correct identification
    53      if vs contained duplicates.
    52      of base variables is up to the user who must take care not to
       
    53      introduce an inconsistency. For example, "basevars (x,x)" would
       
    54      definitely be inconsistent.
    54   *)
    55   *)
    55   basevars  "basevars vs ==> EX u. vs u = c"
    56   basevars_def	"stvars vs == range vs = UNIV"
    56   base_pair "basevars (x,y) ==> basevars x & basevars y"
       
    57   (* Since the unit type has just one value, any state function can be
       
    58      regarded as "base". The following axiom can sometimes be useful
       
    59      because it gives a trivial solution for "basevars" premises.
       
    60   *)
       
    61   unit_base "basevars (v::unit stfun)"
       
    62 
    57 
    63 end
    58 end