src/FOL/ex/LocaleTest.thy
changeset 27761 b95e9ba0ca1d
parent 27718 3a85bc6bfd73
child 28085 914183e229e9
equal deleted inserted replaced
27760:3aa86edac080 27761:b95e9ba0ca1d
   118 
   118 
   119 ML {* check_thm "i1.a.asm_A" *}
   119 ML {* check_thm "i1.a.asm_A" *}
   120 
   120 
   121 (* without prefix *)
   121 (* without prefix *)
   122 
   122 
   123 interpretation IC ["W::i" "Z::i"] .  (* subsumed by i1: IC *)
   123 interpretation IC ["W::i" "Z::i"] by intro_locales  (* subsumed by i1: IC *)
   124 interpretation IC ["W::'a" "Z::i"] by unfold_locales auto
   124 interpretation IC ["W::'a" "Z::i"] by unfold_locales auto
   125   (* subsumes i1: IA and i1: IC *)
   125   (* subsumes i1: IA and i1: IC *)
   126 
   126 
   127 print_interps IA  (* output: <no prefix>, i1 *)
   127 print_interps IA  (* output: <no prefix>, i1 *)
   128 
   128 
   149 print_interps IB  (* output: i1 *)
   149 print_interps IB  (* output: i1 *)
   150 print_interps IC  (* output: <no prefix, i1 *)
   150 print_interps IC  (* output: <no prefix, i1 *)
   151 print_interps ID  (* output: i2, i3 *)
   151 print_interps ID  (* output: i2, i3 *)
   152 
   152 
   153 
   153 
   154 interpretation i10: ID + ID a' b' d' [X "Y::i" _ u "v::i" _] .
   154 interpretation i10: ID + ID a' b' d' [X "Y::i" _ u "v::i" _] by intro_locales
   155 
   155 
   156 corollary (in ID) th_x: True ..
   156 corollary (in ID) th_x: True ..
   157 
   157 
   158 (* possible accesses: for each registration *)
   158 (* possible accesses: for each registration *)
   159 
   159 
   182 
   182 
   183 theorem True
   183 theorem True
   184 proof -
   184 proof -
   185   fix alpha::i and beta
   185   fix alpha::i and beta
   186   have alpha_A: "IA(alpha)" by unfold_locales
   186   have alpha_A: "IA(alpha)" by unfold_locales
   187   interpret i5: IA [alpha] .  (* subsumed *)
   187   interpret i5: IA [alpha] by intro_locales  (* subsumed *)
   188   print_interps IA  (* output: <no prefix>, i1 *)
   188   print_interps IA  (* output: <no prefix>, i1 *)
   189   interpret i6: IC [alpha beta] by unfold_locales auto
   189   interpret i6: IC [alpha beta] by unfold_locales auto
   190   print_interps IA   (* output: <no prefix>, i1 *)
   190   print_interps IA   (* output: <no prefix>, i1 *)
   191   print_interps IC   (* output: <no prefix>, i1, i6 *)
   191   print_interps IC   (* output: <no prefix>, i1, i6 *)
   192   interpret i11: IF ["default = default"] by (fast intro: IF.intro)
   192   interpret i11: IF ["default = default"] by (fast intro: IF.intro)