src/HOL/MicroJava/J/Example.thy
changeset 45827 66c68453455c
parent 45605 a89b4bc311a5
child 58249 180f1b3508ed
equal deleted inserted replaced
45826:67110d6c66de 45827:66c68453455c
    37 *}
    37 *}
    38 
    38 
    39 datatype cnam' = Base' | Ext'
    39 datatype cnam' = Base' | Ext'
    40 datatype vnam' = vee' | x' | e'
    40 datatype vnam' = vee' | x' | e'
    41 
    41 
    42 consts
    42 text {*
    43   cnam' :: "cnam' => cname"
    43   @{text cnam'} and @{text vnam'} are intended to be isomorphic 
    44   vnam' :: "vnam' => vnam"
    44   to @{text cnam} and @{text vnam}
    45 
    45 *}
    46 -- "@{text cnam'} and @{text vnam'} are intended to be isomorphic 
    46 
    47     to @{text cnam} and @{text vnam}"
    47 axiomatization cnam' :: "cnam' => cname"
    48 axioms 
    48 where
    49   inj_cnam':  "(cnam' x = cnam' y) = (x = y)"
    49   inj_cnam':  "(cnam' x = cnam' y) = (x = y)" and
    50   inj_vnam':  "(vnam' x = vnam' y) = (x = y)"
       
    51 
       
    52   surj_cnam': "\<exists>m. n = cnam' m"
    50   surj_cnam': "\<exists>m. n = cnam' m"
       
    51 
       
    52 axiomatization vnam' :: "vnam' => vnam"
       
    53 where
       
    54   inj_vnam':  "(vnam' x = vnam' y) = (x = y)" and
    53   surj_vnam': "\<exists>m. n = vnam' m"
    55   surj_vnam': "\<exists>m. n = vnam' m"
    54 
    56 
    55 declare inj_cnam' [simp] inj_vnam' [simp]
    57 declare inj_cnam' [simp] inj_vnam' [simp]
    56 
    58 
    57 abbreviation Base :: cname
    59 abbreviation Base :: cname
    63 abbreviation x :: vname
    65 abbreviation x :: vname
    64   where "x == VName (vnam' x')"
    66   where "x == VName (vnam' x')"
    65 abbreviation e :: vname
    67 abbreviation e :: vname
    66   where "e == VName (vnam' e')"
    68   where "e == VName (vnam' e')"
    67 
    69 
    68 axioms
    70 axiomatization where
    69   Base_not_Object: "Base \<noteq> Object"
    71   Base_not_Object: "Base \<noteq> Object" and
    70   Ext_not_Object:  "Ext  \<noteq> Object"
    72   Ext_not_Object:  "Ext  \<noteq> Object" and
    71   Base_not_Xcpt:   "Base \<noteq> Xcpt z"
    73   Base_not_Xcpt:   "Base \<noteq> Xcpt z" and
    72   Ext_not_Xcpt:    "Ext  \<noteq> Xcpt z"
    74   Ext_not_Xcpt:    "Ext  \<noteq> Xcpt z" and
    73   e_not_This:      "e \<noteq> This"  
    75   e_not_This:      "e \<noteq> This"  
    74 
    76 
    75 declare Base_not_Object [simp] Ext_not_Object [simp]
    77 declare Base_not_Object [simp] Ext_not_Object [simp]
    76 declare Base_not_Xcpt [simp] Ext_not_Xcpt [simp]
    78 declare Base_not_Xcpt [simp] Ext_not_Xcpt [simp]
    77 declare e_not_This [simp]
    79 declare e_not_This [simp]