theory NonDeterministicAutomata imports Main begin types ('state,'symbol)transitionFunction = "'state \ 'symbol option \ 'state set" consts runND :: "('state,'symbol)transitionFunction \ 'state set \ 'symbol list \ 'state set" primrec "runND t S [] = S" "runND t S (x#xl) = (\s\runND t S xl. (t s (Some x) \ t s None))" lemma [simp]:"runND P S (xs@ys) = runND P (runND P S ys) xs" apply(induct_tac xs, auto) done constdefs run :: "('state, 'symbol)transitionFunction \ 'state => 'symbol list \ 'state set" RUN_DEF:"run t s l == runND t {s} (rev l)" end