# HG changeset patch # User desharna # Date 1656075904 -7200 # Node ID 6c542e152b8a07c852a4138699ca2bb6a49fef97 # Parent 3c544d64c2187d00f3264f402f4a09406f5a9544 redefined mono_on and strict_mono_on as an abbreviation of monotone_on diff -r 3c544d64c218 -r 6c542e152b8a NEWS --- a/NEWS Thu Jun 23 19:29:22 2022 +0200 +++ b/NEWS Fri Jun 24 15:05:04 2022 +0200 @@ -46,7 +46,8 @@ compatibility but its usage is discouraged. Minor INCOMPATIBILITY. - Changed argument order of mono_on and strict_mono_on to uniformize with monotone_on and the general "characterizing set at the beginning - of predicates" preference. Minor INCOMPATIBILITY + of predicates" preference. Also change them to be abbreviation of + monotone_of. Minor INCOMPATIBILITY - Added lemmas. monotone_onD monotone_onI diff -r 3c544d64c218 -r 6c542e152b8a src/HOL/Fun.thy --- a/src/HOL/Fun.thy Thu Jun 23 19:29:22 2022 +0200 +++ b/src/HOL/Fun.thy Fri Jun 24 15:05:04 2022 +0200 @@ -961,31 +961,39 @@ lemma monotone_on_empty[simp]: "monotone_on {} orda ordb f" by (auto intro: monotone_onI dest: monotone_onD) -definition "mono_on A f \ \r s. r \ A \ s \ A \ r \ s \ f r \ f s" +abbreviation mono_on :: "('a :: ord) set \ ('a \ 'b :: ord) \ bool" + where "mono_on A \ monotone_on A (\) (\)" + +lemma mono_on_def: "mono_on A f \ (\r s. r \ A \ s \ A \ r \ s \ f r \ f s)" + by (auto simp add: monotone_on_def) lemma mono_onI: "(\r s. r \ A \ s \ A \ r \ s \ f r \ f s) \ mono_on A f" - unfolding mono_on_def by simp + by (rule monotone_onI) lemma mono_onD: "\mono_on A f; r \ A; s \ A; r \ s\ \ f r \ f s" - unfolding mono_on_def by simp + by (rule monotone_onD) lemma mono_imp_mono_on: "mono f \ mono_on A f" unfolding mono_def mono_on_def by auto lemma mono_on_subset: "mono_on A f \ B \ A \ mono_on B f" - unfolding mono_on_def by auto + by (rule monotone_on_subset) -definition "strict_mono_on A f \ \r s. r \ A \ s \ A \ r < s \ f r < f s" +abbreviation strict_mono_on :: "('a :: ord) set \ ('a \ 'b :: ord) \ bool" + where "strict_mono_on A \ monotone_on A (<) (<)" + +lemma strict_mono_on_def: "strict_mono_on A f \ (\r s. r \ A \ s \ A \ r < s \ f r < f s)" + by (auto simp add: monotone_on_def) lemma strict_mono_onI: "(\r s. r \ A \ s \ A \ r < s \ f r < f s) \ strict_mono_on A f" - unfolding strict_mono_on_def by simp + by (rule monotone_onI) lemma strict_mono_onD: "\strict_mono_on A f; r \ A; s \ A; r < s\ \ f r < f s" - unfolding strict_mono_on_def by simp + by (rule monotone_onD) lemma mono_on_greaterD: assumes "mono_on A g" "x \ A" "y \ A" "g x > (g (y::_::linorder) :: _ :: linorder)"