diff -r c8a2755bf220 -r ff784d5a5bfb src/HOL/Unix/Nested_Environment.thy --- a/src/HOL/Unix/Nested_Environment.thy Sat Jan 05 17:00:43 2019 +0100 +++ b/src/HOL/Unix/Nested_Environment.thy Sat Jan 05 17:24:33 2019 +0100 @@ -10,8 +10,8 @@ text \ Consider a partial function @{term [source] "e :: 'a \ 'b option"}; this may - be understood as an \<^emph>\environment\ mapping indexes @{typ 'a} to optional - entry values @{typ 'b} (cf.\ the basic theory \Map\ of Isabelle/HOL). This + be understood as an \<^emph>\environment\ mapping indexes \<^typ>\'a\ to optional + entry values \<^typ>\'b\ (cf.\ the basic theory \Map\ of Isabelle/HOL). This basic idea is easily generalized to that of a \<^emph>\nested environment\, where entries may be either basic values or again proper environments. Then each entry is accessed by a \<^emph>\path\, i.e.\ a list of indexes leading to its @@ -24,9 +24,9 @@ text \ \<^medskip> - In the type @{typ "('a, 'b, 'c) env"} the parameter @{typ 'a} refers to - basic values (occurring in terminal positions), type @{typ 'b} to values - associated with proper (inner) environments, and type @{typ 'c} with the + In the type \<^typ>\('a, 'b, 'c) env\ the parameter \<^typ>\'a\ refers to + basic values (occurring in terminal positions), type \<^typ>\'b\ to values + associated with proper (inner) environments, and type \<^typ>\'c\ with the index type for branching. Note that there is no restriction on any of these types. In particular, arbitrary branching may yield rather large (transfinite) tree structures. @@ -39,7 +39,7 @@ Lookup in nested environments works by following a given path of index elements, leading to an optional result (a terminal value or nested environment). A \<^emph>\defined position\ within a nested environment is one where - @{term lookup} at its path does not yield @{term None}. + \<^term>\lookup\ at its path does not yield \<^term>\None\. \ primrec lookup :: "('a, 'b, 'c) env \ 'c list \ ('a, 'b, 'c) env option" @@ -57,7 +57,7 @@ text \ \<^medskip> - The characteristic cases of @{term lookup} are expressed by the following + The characteristic cases of \<^term>\lookup\ are expressed by the following equalities. \ @@ -92,7 +92,7 @@ text \ \<^medskip> - Displaced @{term lookup} operations, relative to a certain base path prefix, + Displaced \<^term>\lookup\ operations, relative to a certain base path prefix, may be reduced as follows. There are two cases, depending whether the environment actually extends far enough to follow the base path. \ @@ -178,7 +178,7 @@ text \ \<^medskip> - Successful @{term lookup} deeper down an environment structure means we are + Successful \<^term>\lookup\ deeper down an environment structure means we are able to peek further up as well. Note that this is basically just the contrapositive statement of @{thm [source] lookup_append_none} above. \ @@ -194,8 +194,7 @@ qed text \ - The subsequent statement describes in more detail how a successful @{term - lookup} with a non-empty path results in a certain situation at any upper + The subsequent statement describes in more detail how a successful \<^term>\lookup\ with a non-empty path results in a certain situation at any upper position. \ @@ -265,7 +264,7 @@ text \ \<^medskip> - The characteristic cases of @{term update} are expressed by the following + The characteristic cases of \<^term>\update\ are expressed by the following equalities. \ @@ -316,8 +315,8 @@ text \ \<^medskip> - The most basic correspondence of @{term lookup} and @{term update} states - that after @{term update} at a defined position, subsequent @{term lookup} + The most basic correspondence of \<^term>\lookup\ and \<^term>\update\ states + that after \<^term>\update\ at a defined position, subsequent \<^term>\lookup\ operations would yield the new value. \ @@ -364,10 +363,9 @@ text \ \<^medskip> - The properties of displaced @{term update} operations are analogous to those - of @{term lookup} above. There are two cases: below an undefined position - @{term update} is absorbed altogether, and below a defined positions @{term - update} affects subsequent @{term lookup} operations in the obvious way. + The properties of displaced \<^term>\update\ operations are analogous to those + of \<^term>\lookup\ above. There are two cases: below an undefined position + \<^term>\update\ is absorbed altogether, and below a defined positions \<^term>\update\ affects subsequent \<^term>\lookup\ operations in the obvious way. \ theorem update_append_none: @@ -459,9 +457,8 @@ text \ \<^medskip> - Apparently, @{term update} does not affect the result of subsequent @{term - lookup} operations at independent positions, i.e.\ in case that the paths - for @{term update} and @{term lookup} fork at a certain point. + Apparently, \<^term>\update\ does not affect the result of subsequent \<^term>\lookup\ operations at independent positions, i.e.\ in case that the paths + for \<^term>\update\ and \<^term>\lookup\ fork at a certain point. \ theorem lookup_update_other: