doc-src/TutorialI/Inductive/Even.thy
changeset 23733 3f8ad7418e55
parent 16417 9bc16273c2d4
child 23842 9d87177f1f89
equal deleted inserted replaced
23732:f9f89b7cfdc7 23733:3f8ad7418e55
     1 (* ID:         $Id$ *)
     1 (* ID:         $Id$ *)
     2 theory Even imports Main begin
     2 theory Even imports Main begin
     3 
     3 
     4 
     4 
     5 consts even :: "nat set"
     5 inductive_set even :: "nat set"
     6 inductive even
     6 where
     7 intros
     7   zero[intro!]: "0 \<in> even"
     8 zero[intro!]: "0 \<in> even"
     8 | step[intro!]: "n \<in> even \<Longrightarrow> (Suc (Suc n)) \<in> even"
     9 step[intro!]: "n \<in> even \<Longrightarrow> (Suc (Suc n)) \<in> even"
       
    10 
     9 
    11 text{*An inductive definition consists of introduction rules. 
    10 text{*An inductive definition consists of introduction rules. 
    12 
    11 
    13 @{thm[display] even.step[no_vars]}
    12 @{thm[display] even.step[no_vars]}
    14 \rulename{even.step}
    13 \rulename{even.step}