src/HOL/Library/Nested_Environment.thy
changeset 36176 3fe7e97ccca8
parent 34941 156925dd67af
child 38857 97775f3e8722
equal deleted inserted replaced
36175:5cec4ca719d1 36176:3fe7e97ccca8
    52         [] => Some (Env b es)
    52         [] => Some (Env b es)
    53       | y # ys => lookup_option (es y) ys)"
    53       | y # ys => lookup_option (es y) ys)"
    54   | "lookup_option None xs = None"
    54   | "lookup_option None xs = None"
    55   | "lookup_option (Some e) xs = lookup e xs"
    55   | "lookup_option (Some e) xs = lookup e xs"
    56 
    56 
    57 hide const lookup_option
    57 hide_const lookup_option
    58 
    58 
    59 text {*
    59 text {*
    60   \medskip The characteristic cases of @{term lookup} are expressed by
    60   \medskip The characteristic cases of @{term lookup} are expressed by
    61   the following equalities.
    61   the following equalities.
    62 *}
    62 *}
   260   | "update_option xs opt None =
   260   | "update_option xs opt None =
   261       (if xs = [] then opt else None)"
   261       (if xs = [] then opt else None)"
   262   | "update_option xs opt (Some e) =
   262   | "update_option xs opt (Some e) =
   263       (if xs = [] then opt else Some (update xs opt e))"
   263       (if xs = [] then opt else Some (update xs opt e))"
   264 
   264 
   265 hide const update_option
   265 hide_const update_option
   266 
   266 
   267 text {*
   267 text {*
   268   \medskip The characteristic cases of @{term update} are expressed by
   268   \medskip The characteristic cases of @{term update} are expressed by
   269   the following equalities.
   269   the following equalities.
   270 *}
   270 *}