# HG changeset patch # User desharna # Date 1742064010 -3600 # Node ID 9357ef19fc565ee2b64614aef5c2ebc20548628d # Parent 295a36401d88155514a4f1eef4be34cdb5dd14fb# Parent 7587b93032badc9d67dba9a86e60bbbeac96c3a3 merged diff -r 295a36401d88 -r 9357ef19fc56 NEWS --- a/NEWS Sat Mar 15 14:39:45 2025 +0100 +++ b/NEWS Sat Mar 15 19:40:10 2025 +0100 @@ -16,10 +16,12 @@ monotone_on_inf_fun monotone_on_sup_fun -* Theory "HOL.Relations": +* Theory "HOL.Relation": - Changed definition of predicate refl_on to not constrain the domain and range of the relation. To get the old semantics, explicitely use the formula "r \ A \ A \ refl_on A r". INCOMPATIBILITY. + - Removed predicate single_valuedp. Use predicate right_unique instead. + INCOMPATIBILITY. - Strengthened lemmas. Minor INCOMPATIBILITY. refl_on_empty[simp] - Strengthened (and renamed) lemmas. Minor INCOMPATIBILITY. @@ -53,7 +55,7 @@ quotient_disj_strong * Theory "HOL.Transfer": - - Moved right_unique from HOL.Transfer to HOL.Relations. + - Moved right_unique from HOL.Transfer to HOL.Relation. Minor INCOMPATIBILITY. - Added lemmas. single_valuedp_eq_right_unique diff -r 295a36401d88 -r 9357ef19fc56 src/HOL/Relation.thy --- a/src/HOL/Relation.thy Sat Mar 15 14:39:45 2025 +0100 +++ b/src/HOL/Relation.thy Sat Mar 15 19:40:10 2025 +0100 @@ -829,31 +829,21 @@ definition single_valued :: "('a \ 'b) set \ bool" where "single_valued r \ (\x y. (x, y) \ r \ (\z. (x, z) \ r \ y = z))" -definition single_valuedp :: "('a \ 'b \ bool) \ bool" - where "single_valuedp r \ (\x y. r x y \ (\z. r x z \ y = z))" - definition right_unique :: "('a \ 'b \ bool) \ bool" where "right_unique R \ (\x y z. R x y \ R x z \ y = z)" -lemma single_valuedp_eq_right_unique: "single_valuedp = right_unique" - by (rule ext) (simp add: single_valuedp_def right_unique_def) +lemma right_unique_single_valued_eq [pred_set_conv]: + "right_unique (\x y. (x, y) \ r) \ single_valued r" + by (simp add: single_valued_def right_unique_def) -lemma single_valuedp_single_valued_eq [pred_set_conv]: - "single_valuedp (\x y. (x, y) \ r) \ single_valued r" - by (simp add: single_valued_def single_valuedp_def) - -lemma single_valuedp_iff_Uniq: - "single_valuedp r \ (\x. \\<^sub>\\<^sub>1y. r x y)" - unfolding Uniq_def single_valuedp_def by auto +lemma right_unique_iff_Uniq: + "right_unique r \ (\x. \\<^sub>\\<^sub>1y. r x y)" + unfolding Uniq_def right_unique_def by auto lemma single_valuedI: "(\x y. (x, y) \ r \ (\z. (x, z) \ r \ y = z)) \ single_valued r" unfolding single_valued_def by blast -lemma single_valuedpI: - "(\x y. r x y \ (\z. r x z \ y = z)) \ single_valuedp r" - by (fact single_valuedI [to_pred]) - lemma right_uniqueI: "(\x y z. R x y \ R x z \ y = z) \ right_unique R" unfolding right_unique_def by fast @@ -861,10 +851,6 @@ "single_valued r \ (x, y) \ r \ (x, z) \ r \ y = z" by (simp add: single_valued_def) -lemma single_valuedpD: - "single_valuedp r \ r x y \ r x z \ y = z" - by (fact single_valuedD [to_pred]) - lemma right_uniqueD: "right_unique R \ R x y \ R x z \ y = z" unfolding right_unique_def by fast @@ -872,16 +858,14 @@ "single_valued {}" by (simp add: single_valued_def) -lemma single_valuedp_bot [simp]: - "single_valuedp \" - by (fact single_valued_empty [to_pred]) +lemma right_unique_bot[simp]: "right_unique \" + by (fact single_valued_empty[to_pred]) lemma single_valued_subset: "r \ s \ single_valued s \ single_valued r" unfolding single_valued_def by blast -lemma single_valuedp_less_eq: - "r \ s \ single_valuedp s \ single_valuedp r" +lemma right_unique_less_eq: "r \ s \ right_unique s \ right_unique r" by (fact single_valued_subset [to_pred])