diff -r 46f59511b7bb -r d97fdabd9e2b src/HOL/Data_Structures/Selection.thy --- a/src/HOL/Data_Structures/Selection.thy Fri Sep 20 19:07:10 2024 +0200 +++ b/src/HOL/Data_Structures/Selection.thy Fri Sep 20 19:51:08 2024 +0200 @@ -397,7 +397,7 @@ begin lemma size_median_of_medians_aux: - fixes R :: "'a :: linorder \ 'a \ bool" (infix "\" 50) + fixes R :: "'a :: linorder \ 'a \ bool" (infix \\\ 50) assumes R: "R \ {(<), (>)}" shows "size {#y \# mset xs. y \ M#} \ nat \0.7 * length xs + 3\" proof - @@ -406,8 +406,8 @@ text \We then split that multiset into those groups whose medians is less than @{term M} and the rest.\ - define Y_small ("Y\<^sub>\") where "Y\<^sub>\ = filter_mset (\ys. median ys \ M) (mset (chop 5 xs))" - define Y_big ("Y\<^sub>\") where "Y\<^sub>\ = filter_mset (\ys. \(median ys \ M)) (mset (chop 5 xs))" + define Y_small (\Y\<^sub>\\) where "Y\<^sub>\ = filter_mset (\ys. median ys \ M) (mset (chop 5 xs))" + define Y_big (\Y\<^sub>\\) where "Y\<^sub>\ = filter_mset (\ys. \(median ys \ M)) (mset (chop 5 xs))" have "m = size (mset (chop 5 xs))" by (simp add: m_def) also have "mset (chop 5 xs) = Y\<^sub>\ + Y\<^sub>\" unfolding Y_small_def Y_big_def by (rule multiset_partition)