# HG changeset patch # User haftmann # Date 1545207401 0 # Node ID c505f251f352e8d4518384a197772c06a94a4d89 # Parent 1690ba936016b4392d398ad06aad8227cc904d1f tuned proof diff -r 1690ba936016 -r c505f251f352 src/HOL/Hilbert_Choice.thy --- a/src/HOL/Hilbert_Choice.thy Tue Dec 18 15:50:20 2018 +0100 +++ b/src/HOL/Hilbert_Choice.thy Wed Dec 19 08:16:41 2018 +0000 @@ -1018,30 +1018,33 @@ by simp qed -lemma INF_SUP_set: "(\x\A. \(g ` x)) = (\x\{f ` A |f. \Y\A. f Y \ Y}. \(g ` x))" +lemma INF_SUP_set: "(\B\A. \(g ` B)) = (\B\{f ` A |f. \C\A. f C \ C}. \(g ` B))" proof (rule antisym) - have [simp]: "\f xa. \Y\A. f Y \ Y \ xa \ A \ (\x\A. g (f x)) \ g (f xa)" - by (rule INF_lower2, blast+) - have B: "\f xa. \Y\A. f Y \ Y \ xa \ A \ f xa \ xa" - by blast - have A: "\f xa. \Y\A. f Y \ Y \ xa \ A \ (\x\A. g (f x)) \ \(g ` xa)" - by (rule SUP_upper2, rule B, simp_all, simp) - show "(\x\{f ` A |f. \Y\A. f Y \ Y}. \a\x. g a) \ (\x\A. \a\x. g a)" - apply (rule SUP_least, simp, safe, rule INF_greatest, simp) - by (rule A) + have "\ ((g \ f) ` A) \ \ (g ` B)" if "\B. B \ A \ f B \ B" and "B \ A" + for f and B + using that by (auto intro: SUP_upper2 INF_lower2) + then show "(\x\{f ` A |f. \Y\A. f Y \ Y}. \a\x. g a) \ (\x\A. \a\x. g a)" + by (auto intro!: SUP_least INF_greatest) next show "(\x\A. \a\x. g a) \ (\x\{f ` A |f. \Y\A. f Y \ Y}. \a\x. g a)" proof (cases "{} \ A") case True then show ?thesis - by (rule INF_lower2, simp_all) + by (rule INF_lower2) simp_all next case False - have [simp]: "\x xa xb. xb \ A \ x xb \ xb \ (\xa. if xa \ A then if x xa \ xa then g (x xa) else \ else \) \ g (x xb)" + have *: "\f B. B \ A \ f B \ B \ + (\B. if B \ A then if f B \ B then g (f B) else \ else \) \ g (f B)" + by (rule INF_lower2, auto) + have **: "\f B. B \ A \ f B \ B \ + (\B. if B \ A then if f B \ B then g (f B) else \ else \) \ g (SOME x. x \ B)" by (rule INF_lower2, auto) - have [simp]: " \x xa y. y \ A \ x y \ y \ (\xa. if xa \ A then if x xa \ xa then g (x xa) else \ else \) \ g (SOME x. x \ y)" - by (rule INF_lower2, auto) - have [simp]: "\x. (\xa. if xa \ A then if x xa \ xa then g (x xa) else \ else \) \ (\x\{f ` A |f. \Y\A. f Y \ Y}. \x\x. g x)" + have ****: "\f B. B \ A \ + (\B. if B \ A then if f B \ B then g (f B) else \ else \) + \ (if f B \ B then g (f B) else g (SOME x. x \ B))" + by (rule INF_lower2) auto + have ***: "\x. (\B. if B \ A then if x B \ B then g (x B) else \ else \) + \ (\x\{f ` A |f. \Y\A. f Y \ Y}. \x\x. g x)" proof - fix x define F where "F = (\ (y::'b set) . if x y \ y then x y else (SOME x . x \y))" @@ -1051,7 +1054,10 @@ using B by blast show "(\xa. if xa \ A then if x xa \ xa then g (x xa) else \ else \) \ (\x\{f ` A |f. \Y\A. f Y \ Y}. \x\x. g x)" using A apply (rule SUP_upper2) - by (simp add: F_def, rule INF_greatest, auto) + apply (simp add: F_def) + apply (rule INF_greatest) + apply (auto simp add: * **) + done qed {fix x @@ -1071,7 +1077,7 @@ also have "... = (\x. \xa. if xa \ A then if x xa \ xa then g (x xa) else \ else \)" by (simp add: INF_SUP) also have "... \ (\x\{f ` A |f. \Y\A. f Y \ Y}. \a\x. g a)" - by (rule SUP_least, simp) + by (rule SUP_least, simp add: ***) finally show ?thesis by simp qed qed