diff -r 8bb064045b4e -r e51c9a67a68d thys/Lexer.thy --- a/thys/Lexer.thy Thu Feb 25 22:46:58 2021 +0000 +++ b/thys/Lexer.thy Sun Oct 10 00:56:47 2021 +0100 @@ -15,7 +15,7 @@ fun injval :: "rexp \ char \ val \ val" where - "injval (CHAR d) c Void = Char d" + "injval (CH d) c Void = Char d" | "injval (ALT r1 r2) c (Left v1) = Left(injval r1 c v1)" | "injval (ALT r1 r2) c (Right v2) = Right(injval r2 c v2)" | "injval (SEQ r1 r2) c (Seq v1 v2) = Seq (injval r1 c v1) v2" @@ -99,22 +99,22 @@ then have "False" by cases then show "(c # s) \ ONE \ (injval ONE c v)" by simp next - case (CHAR d) + case (CH d) consider (eq) "c = d" | (ineq) "c \ d" by blast - then show "(c # s) \ (CHAR d) \ (injval (CHAR d) c v)" + then show "(c # s) \ (CH d) \ (injval (CH d) c v)" proof (cases) case eq - have "s \ der c (CHAR d) \ v" by fact + have "s \ der c (CH d) \ v" by fact then have "s \ ONE \ v" using eq by simp then have eqs: "s = [] \ v = Void" by cases simp - show "(c # s) \ CHAR d \ injval (CHAR d) c v" using eq eqs + show "(c # s) \ CH d \ injval (CH d) c v" using eq eqs by (auto intro: Posix.intros) next case ineq - have "s \ der c (CHAR d) \ v" by fact + have "s \ der c (CH d) \ v" by fact then have "s \ ZERO \ v" using ineq by simp then have "False" by cases - then show "(c # s) \ CHAR d \ injval (CHAR d) c v" by simp + then show "(c # s) \ CH d \ injval (CH d) c v" by simp qed next case (ALT r1 r2)