src/HOL/Predicate_Compile_Examples/Context_Free_Grammar_Example.thy
changeset 58249 180f1b3508ed
parent 53015 a1119cf551e8
child 58310 91ea607a34d8
equal deleted inserted replaced
58248:25af24e1f37b 58249:180f1b3508ed
    22 setup {*
    22 setup {*
    23   Context.theory_map
    23   Context.theory_map
    24     (Quickcheck.add_tester ("prolog", (Code_Prolog.active, Code_Prolog.test_goals)))
    24     (Quickcheck.add_tester ("prolog", (Code_Prolog.active, Code_Prolog.test_goals)))
    25 *}
    25 *}
    26 
    26 
    27 datatype alphabet = a | b
    27 datatype_new alphabet = a | b
    28 
    28 
    29 inductive_set S\<^sub>1 and A\<^sub>1 and B\<^sub>1 where
    29 inductive_set S\<^sub>1 and A\<^sub>1 and B\<^sub>1 where
    30   "[] \<in> S\<^sub>1"
    30   "[] \<in> S\<^sub>1"
    31 | "w \<in> A\<^sub>1 \<Longrightarrow> b # w \<in> S\<^sub>1"
    31 | "w \<in> A\<^sub>1 \<Longrightarrow> b # w \<in> S\<^sub>1"
    32 | "w \<in> B\<^sub>1 \<Longrightarrow> a # w \<in> S\<^sub>1"
    32 | "w \<in> B\<^sub>1 \<Longrightarrow> a # w \<in> S\<^sub>1"