diff -r c9ffd9cf58db -r 23f819af2d9f src/HOL/Analysis/Polytope.thy --- a/src/HOL/Analysis/Polytope.thy Tue Jan 03 11:30:37 2023 +0000 +++ b/src/HOL/Analysis/Polytope.thy Tue Jan 03 17:02:41 2023 +0000 @@ -474,10 +474,7 @@ using order.trans by fastforce next case False - then show ?thesis - apply simp - apply (erule ex_forward) - by blast + then show ?thesis by fastforce qed lemma faces_of_translation: @@ -661,23 +658,16 @@ lemma exposed_face_of: "T exposed_face_of S \ - T face_of S \ - (T = {} \ T = S \ + T face_of S \ (T = {} \ T = S \ (\a b. a \ 0 \ S \ {x. a \ x \ b} \ T = S \ {x. a \ x = b}))" -proof (cases "T = {}") - case False - show ?thesis - proof (cases "T = S") - case True then show ?thesis - by (simp add: face_of_refl_eq) - next - case False - with \T \ {}\ show ?thesis - apply (auto simp: exposed_face_of_def) - apply (metis inner_zero_left) - done - qed -qed auto + (is "?lhs = ?rhs") +proof + show "?lhs \ ?rhs" + by (smt (verit) Collect_cong exposed_face_of_def hyperplane_eq_empty inf.absorb_iff1 + inf_bot_right inner_zero_left) + show "?rhs \ ?lhs" + using exposed_face_of_def face_of_imp_convex by fastforce +qed lemma exposed_face_of_Int_supporting_hyperplane_le: "\convex S; \x. x \ S \ a \ x \ b\ \ (S \ {x. a \ x = b}) exposed_face_of S" @@ -780,10 +770,7 @@ proof - have "\x y. \z = u \ (x + y); x \ S; y \ T\ \ u \ x = u \ a0 \ u \ y = u \ b0" - using z p \a0 \ S\ \b0 \ T\ - apply (simp add: inner_right_distrib) - apply (metis add_le_cancel_right antisym lez [unfolded inner_right_distrib] add.commute) - done + by (smt (verit, best) z p \a0 \ S\ \b0 \ T\ inner_right_distrib lez) then show ?thesis using feq by blast qed @@ -815,18 +802,18 @@ then show ?thesis proof assume "affine hull S \ {x. - a \ x \ - b} = {}" - then show ?thesis - apply (rule_tac x="0" in exI) - apply (rule_tac x="1" in exI) - using hull_subset by fastforce + then show ?thesis + apply (rule_tac x="0" in exI) + apply (rule_tac x="1" in exI) + using hull_subset by fastforce + next + assume "affine hull S \ {x. - a \ x \ - b}" + then show ?thesis + apply (rule_tac x="0" in exI) + apply (rule_tac x="0" in exI) + using Ssub hull_subset by fastforce + qed next - assume "affine hull S \ {x. - a \ x \ - b}" - then show ?thesis - apply (rule_tac x="0" in exI) - apply (rule_tac x="0" in exI) - using Ssub hull_subset by fastforce - qed - next case False then obtain a' b' where "a' \ 0" and le: "affine hull S \ {x. a' \ x \ b'} = affine hull S \ {x. - a \ x \ - b}" @@ -1472,9 +1459,8 @@ have "\ affine_dependent c" using \c \ S\ affine_dependent_subset assms by blast with affs have "card (S - c) = 1" - apply (simp add: aff_dim_affine_independent [symmetric] aff_dim_convex_hull) - by (metis aff_dim_affine_independent aff_independent_finite One_nat_def \c \ S\ add.commute - add_diff_cancel_right' assms card_Diff_subset card_mono of_nat_1 of_nat_diff of_nat_eq_iff) + by (smt (verit) \c \ S\ aff_dim_affine_independent aff_independent_finite assms card_Diff_subset + card_mono of_nat_diff of_nat_eq_1_iff) then obtain u where u: "u \ S - c" by (metis DiffI \c \ S\ aff_independent_finite assms cancel_comm_monoid_add_class.diff_cancel card_Diff_subset subsetI subset_antisym zero_neq_one) @@ -3361,11 +3347,9 @@ ultimately show "convex hull (J - {?z}) \ \ \ Pow (rel_frontier C)" by auto let ?F = "convex hull insert ?z (convex hull (J - {?z}))" have "F \ ?F" - apply (clarsimp simp: \F = convex hull J\) - by (metis True subsetD hull_mono hull_subset subset_insert_iff) + by (simp add: \F = convex hull J\ hull_mono hull_subset subset_insert_iff) moreover have "?F \ F" - apply (clarsimp simp: \F = convex hull J\) - by (metis (no_types, lifting) True convex_hull_eq_empty convex_hull_insert_segments hull_hull insert_Diff) + by (metis True \F = convex hull J\ hull_insert insert_Diff set_eq_subset) ultimately show "F \ {?F}" by auto qed