diff -r 0224caba67ca -r 1fa9c19ba2c9 src/Doc/Datatypes/Datatypes.thy --- a/src/Doc/Datatypes/Datatypes.thy Mon May 26 16:32:51 2014 +0200 +++ b/src/Doc/Datatypes/Datatypes.thy Mon May 26 16:32:55 2014 +0200 @@ -421,11 +421,11 @@ unspecified). Because @{const Nil} is nullary, it is also possible to use -@{term "\xs. xs = Nil"} as a discriminator. This is specified by -entering ``@{text "="}'' (equality) instead of the identifier @{const null}. -Although this may look appealing, the mixture of constructors and selectors -in the characteristic theorems can lead Isabelle's automation to switch between -the constructor and the destructor view in surprising ways. +@{term "\xs. xs = Nil"} as a discriminator. This is the default behavior +if we omit the identifier @{const null} and the associated colon. Some users +argue against this, because the mixture of constructors and selectors in the +characteristic theorems can lead Isabelle's automation to switch between the +constructor and the destructor view in surprising ways. The usual mixfix syntax annotations are available for both types and constructors. For example: @@ -530,7 +530,7 @@ mention exactly the same type variables in the same order. @{rail \ - @{syntax_def dt_ctor}: ((name | '=') ':')? name (@{syntax dt_ctor_arg} * ) \ + @{syntax_def dt_ctor}: (name ':')? name (@{syntax dt_ctor_arg} * ) \ @{syntax dt_sel_defaults}? mixfix? \} @@ -539,10 +539,9 @@ \noindent The main constituents of a constructor specification are the name of the constructor and the list of its argument types. An optional discriminator name -can be supplied at the front to override the default name -(@{text t.is_C\<^sub>j}). For nullary constructors @{text C\<^sub>j}, the term -@{text "\x. x = C\<^sub>j"} can be used as a discriminator by entering -``@{text "="}'' (equality) instead of a name. +can be supplied at the front to override the default, which is +@{text "\x. x = C\<^sub>j"} for nullary constructors and +@{text t.is_C\<^sub>j} otherwise. @{rail \ @{syntax_def dt_ctor_arg}: type | '(' name ':' type ')' @@ -2238,7 +2237,7 @@ primcorec random_process :: "'a stream \ (int \ int) \ int \ 'a process" where - "n mod 4 = 0 \ is_Fail (random_process s f n)" | + "n mod 4 = 0 \ random_process s f n = Fail" | "n mod 4 = 1 \ is_Skip (random_process s f n)" | "n mod 4 = 2 \ is_Action (random_process s f n)" | "n mod 4 = 3 \ is_Choice (random_process s f n)" | @@ -2260,7 +2259,7 @@ even_infty :: even_enat and odd_infty :: odd_enat where - "\ is_Even_EZero even_infty" | + "even_infty \ Even_EZero" | "un_Even_ESuc even_infty = odd_infty" | "un_Odd_ESuc odd_infty = even_infty"