diff -r 682dfb674df3 -r 6f306c8c2c54 src/HOL/Library/Nested_Environment.thy --- a/src/HOL/Library/Nested_Environment.thy Wed Apr 02 15:58:31 2008 +0200 +++ b/src/HOL/Library/Nested_Environment.thy Wed Apr 02 15:58:32 2008 +0200 @@ -527,21 +527,21 @@ lemma [code func, code func del]: fixes e1 e2 :: "('b\eq, 'a\eq, 'c\eq) env" - shows "e1 = e2 \ e1 = e2" .. + shows "eq e1 e2 \ eq e1 e2" .. lemma eq_env_code [code func]: fixes x y :: "'a\eq" and f g :: "'c\{eq, finite} \ ('b\eq, 'a, 'c) env option" - shows "Env x f = Env y g \ - x = y \ (\z\UNIV. case f z + shows "eq (Env x f) (Env y g) \ + eq x y \ (\z\UNIV. case f z of None \ (case g z of None \ True | Some _ \ False) | Some a \ (case g z - of None \ False | Some b \ a = b))" (is ?env) - and "Val a = Val b \ a = b" - and "Val a = Env y g \ False" - and "Env x f = Val b \ False" -proof - + of None \ False | Some b \ eq a b))" (is ?env) + and "eq (Val a) (Val b) \ eq a b" + and "eq (Val a) (Env y g) \ False" + and "eq (Env x f) (Val b) \ False" +proof (unfold eq) have "f = g \ (\z. case f z of None \ (case g z of None \ True | Some _ \ False) @@ -559,7 +559,12 @@ then show "f z = g z" by (auto split: option.splits) qed qed - then show ?env by simp + then show "Env x f = Env y g \ + x = y \ (\z\UNIV. case f z + of None \ (case g z + of None \ True | Some _ \ False) + | Some a \ (case g z + of None \ False | Some b \ a = b))" by simp qed simp_all end