# HG changeset patch # User desharna # Date 1671096261 -3600 # Node ID e772c8e6edd07e3ac4976a2977e720b71662c7c7 # Parent 833bae85ac2d63866295e683fd1df908fe317f46 added predicates antisym_on and antisymp_on and redefined antisym and antisymp to be abbreviations diff -r 833bae85ac2d -r e772c8e6edd0 NEWS --- a/NEWS Tue Dec 13 11:29:52 2022 +0100 +++ b/NEWS Thu Dec 15 10:24:21 2022 +0100 @@ -30,6 +30,10 @@ irreflp to be abbreviations. Lemmas irrefl_def and irreflp_def are explicitly provided for backward compatibility but their usage is discouraged. Minor INCOMPATIBILITY. + - Added predicates antisym_on and antisymp_on and redefined antisym and + antisymp to be abbreviations. Lemmas antisym_def and antisymp_def are + explicitly provided for backward compatibility but their usage is + discouraged. Minor INCOMPATIBILITY. - Strengthened (and renamed) lemmas. Minor INCOMPATIBILITY. preorder.irreflp_greater[simp] ~> preorder.irreflp_on_greater[simp] preorder.irreflp_less[simp] ~> preorder.irreflp_on_less[simp] diff -r 833bae85ac2d -r e772c8e6edd0 src/HOL/Relation.thy --- a/src/HOL/Relation.thy Tue Dec 13 11:29:52 2022 +0100 +++ b/src/HOL/Relation.thy Thu Dec 15 10:24:21 2022 +0100 @@ -423,11 +423,25 @@ subsubsection \Antisymmetry\ -definition antisym :: "'a rel \ bool" - where "antisym r \ (\x y. (x, y) \ r \ (y, x) \ r \ x = y)" +definition antisym_on :: "'a set \ 'a rel \ bool" where + "antisym_on A r \ (\x \ A. \y \ A. (x, y) \ r \ (y, x) \ r \ x = y)" + +abbreviation antisym :: "'a rel \ bool" where + "antisym \ antisym_on UNIV" + +definition antisymp_on :: "'a set \ ('a \ 'a \ bool) \ bool" where + "antisymp_on A R \ (\x \ A. \y \ A. R x y \ R y x \ x = y)" -definition antisymp :: "('a \ 'a \ bool) \ bool" - where "antisymp r \ (\x y. r x y \ r y x \ x = y)" +abbreviation antisymp :: "('a \ 'a \ bool) \ bool" where + "antisymp \ antisymp_on UNIV" + +lemma antisym_def[no_atp]: "antisym r \ (\x y. (x, y) \ r \ (y, x) \ r \ x = y)" + by (simp add: antisym_on_def) + +lemma antisymp_def[no_atp]: "antisymp R \ (\x y. R x y \ R y x \ x = y)" + by (simp add: antisymp_on_def) + +text \@{thm [source] antisym_def} and @{thm [source] antisymp_def} are for backward compatibility.\ lemma antisymp_antisym_eq [pred_set_conv]: "antisymp (\x y. (x, y) \ r) \ antisym r" by (simp add: antisym_def antisymp_def)