diff -r 4ec8e654112f -r 2865a6618cba src/HOL/Unix/Nested_Environment.thy --- a/src/HOL/Unix/Nested_Environment.thy Thu Jun 26 17:25:29 2025 +0200 +++ b/src/HOL/Unix/Nested_Environment.thy Thu Jun 26 17:25:29 2025 +0200 @@ -516,46 +516,4 @@ qed qed - -subsection \Code generation\ - -lemma equal_env_code [code]: - fixes x y :: "'a::equal" - and f g :: "'c::{equal, finite} \ ('b::equal, 'a, 'c) env option" - shows - "HOL.equal (Env x f) (Env y g) \ - HOL.equal 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 \ HOL.equal a b))" (is ?env) - and "HOL.equal (Val a) (Val b) \ HOL.equal a b" - and "HOL.equal (Val a) (Env y g) \ False" - and "HOL.equal (Env x f) (Val b) \ False" -proof (unfold equal) - have "f = g \ - (\z. 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 "?lhs = ?rhs") - proof - assume ?lhs - then show ?rhs by (auto split: option.splits) - next - assume ?rhs (is "\z. ?prop z") - show ?lhs - proof - fix z - from \?rhs\ have "?prop z" .. - then show "f z = g z" by (auto split: option.splits) - qed - qed - 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 - -lemma [code nbe]: "HOL.equal (x :: (_, _, _) env) x \ True" - by (fact equal_refl) - end