# HG changeset patch # User desharna # Date 1742031585 -3600 # Node ID c17902fcf5e7996aa46e3ca855a8c02d751baabe # Parent c61367ada9bbeac928b18bd1a1b8272e07c4e222 moved predicate right_unique to theory Relation diff -r c61367ada9bb -r c17902fcf5e7 NEWS --- a/NEWS Sat Mar 15 09:17:46 2025 +0100 +++ b/NEWS Sat Mar 15 10:39:45 2025 +0100 @@ -53,6 +53,8 @@ quotient_disj_strong * Theory "HOL.Transfer": + - Moved right_unique from HOL.Transfer to HOL.Relations. + Minor INCOMPATIBILITY. - Added lemmas. single_valuedp_eq_right_unique diff -r c61367ada9bb -r c17902fcf5e7 src/HOL/Relation.thy --- a/src/HOL/Relation.thy Sat Mar 15 09:17:46 2025 +0100 +++ b/src/HOL/Relation.thy Sat Mar 15 10:39:45 2025 +0100 @@ -832,6 +832,12 @@ 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 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) @@ -848,6 +854,9 @@ "(\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 + lemma single_valuedD: "single_valued r \ (x, y) \ r \ (x, z) \ r \ y = z" by (simp add: single_valued_def) @@ -856,6 +865,9 @@ "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 + lemma single_valued_empty [simp]: "single_valued {}" by (simp add: single_valued_def) diff -r c61367ada9bb -r c17902fcf5e7 src/HOL/Transfer.thy --- a/src/HOL/Transfer.thy Sat Mar 15 09:17:46 2025 +0100 +++ b/src/HOL/Transfer.thy Sat Mar 15 10:39:45 2025 +0100 @@ -115,9 +115,6 @@ definition right_total :: "('a \ 'b \ bool) \ bool" where "right_total R \ (\y. \x. R x y)" -definition right_unique :: "('a \ 'b \ bool) \ bool" - where "right_unique R \ (\x y z. R x y \ R x z \ y = z)" - definition bi_total :: "('a \ 'b \ bool) \ bool" where "bi_total R \ (\x. \y. R x y) \ (\y. \x. R x y)" @@ -126,9 +123,6 @@ (\x y z. R x y \ R x z \ y = z) \ (\x y z. R x z \ R y z \ x = y)" -lemma single_valuedp_eq_right_unique: "single_valuedp = right_unique" - by (rule ext) (simp add: single_valuedp_def right_unique_def) - lemma left_unique_iff: "left_unique R \ (\z. \\<^sub>\\<^sub>1x. R x z)" unfolding Uniq_def left_unique_def by force @@ -159,12 +153,6 @@ lemma right_unique_iff: "right_unique R \ (\z. \\<^sub>\\<^sub>1x. R z x)" unfolding Uniq_def right_unique_def by force -lemma right_uniqueI: "(\x y z. \ A x y; A x z \ \ y = z) \ right_unique A" -unfolding right_unique_def by fast - -lemma right_uniqueD: "\ right_unique A; A x y; A x z \ \ y = z" -unfolding right_unique_def by fast - lemma right_totalI: "(\y. \x. A x y) \ right_total A" by(simp add: right_total_def)