src/Doc/Tutorial/Inductive/Mutual.thy
changeset 67613 ce654b0e6d69
parent 67406 23307fd33906
child 69505 cc2d676d5395
equal deleted inserted replaced
67610:4939494ed791 67613:ce654b0e6d69
    65 zero: "evn 0" |
    65 zero: "evn 0" |
    66 step: "evn n \<Longrightarrow> evn(Suc(Suc n))"
    66 step: "evn n \<Longrightarrow> evn(Suc(Suc n))"
    67 
    67 
    68 text\<open>\noindent Everything works as before, except that
    68 text\<open>\noindent Everything works as before, except that
    69 you write \commdx{inductive} instead of \isacommand{inductive\_set} and
    69 you write \commdx{inductive} instead of \isacommand{inductive\_set} and
    70 @{prop"evn n"} instead of @{prop"n : Even"}.
    70 @{prop"evn n"} instead of @{prop"n \<in> Even"}.
    71 When defining an n-ary relation as a predicate, it is recommended to curry
    71 When defining an n-ary relation as a predicate, it is recommended to curry
    72 the predicate: its type should be \mbox{@{text"\<tau>\<^sub>1 \<Rightarrow> \<dots> \<Rightarrow> \<tau>\<^sub>n \<Rightarrow> bool"}}
    72 the predicate: its type should be \mbox{@{text"\<tau>\<^sub>1 \<Rightarrow> \<dots> \<Rightarrow> \<tau>\<^sub>n \<Rightarrow> bool"}}
    73 rather than
    73 rather than
    74 @{text"\<tau>\<^sub>1 \<times> \<dots> \<times> \<tau>\<^sub>n \<Rightarrow> bool"}. The curried version facilitates inductions.
    74 @{text"\<tau>\<^sub>1 \<times> \<dots> \<times> \<tau>\<^sub>n \<Rightarrow> bool"}. The curried version facilitates inductions.
    75 
    75