tuned: prefer explicit names of inferred types;
authorwenzelm
Sun, 08 Dec 2024 15:12:20 +0100
changeset 81563 c4c983c5c7f2
parent 81562 d387683ea725
child 81564 56075edacb10
tuned: prefer explicit names of inferred types;
src/HOL/Fun.thy
--- a/src/HOL/Fun.thy	Sun Dec 08 14:27:06 2024 +0100
+++ b/src/HOL/Fun.thy	Sun Dec 08 15:12:20 2024 +0100
@@ -1077,7 +1077,8 @@
 end
 
 lemma mono_on_greaterD:
-  assumes "mono_on A g" "x \<in> A" "y \<in> A" "g x > (g (y::_::linorder) :: _ :: linorder)"
+  fixes g :: "'a::linorder \<Rightarrow> 'b::linorder"
+  assumes "mono_on A g" "x \<in> A" "y \<in> A" "g x > g y"
   shows "x > y"
 proof (rule ccontr)
   assume "\<not>x > y"
@@ -1263,7 +1264,8 @@
 qed
 
 lemma strict_mono_on_imp_inj_on:
-  assumes "strict_mono_on A (f :: (_ :: linorder) \<Rightarrow> (_ :: preorder))"
+  fixes f :: "'a::linorder \<Rightarrow> 'b::preorder"
+  assumes "strict_mono_on A f"
   shows "inj_on f A"
 proof (rule inj_onI)
   fix x y assume "x \<in> A" "y \<in> A" "f x = f y"
@@ -1273,7 +1275,8 @@
 qed
 
 lemma strict_mono_on_leD:
-  assumes "strict_mono_on A (f :: (_ :: linorder) \<Rightarrow> _ :: preorder)" "x \<in> A" "y \<in> A" "x \<le> y"
+  fixes f :: "'a::linorder \<Rightarrow> 'b::preorder"
+  assumes "strict_mono_on A f" "x \<in> A" "y \<in> A" "x \<le> y"
   shows "f x \<le> f y"
 proof (cases "x = y")
   case True
@@ -1286,13 +1289,13 @@
 qed
 
 lemma strict_mono_on_eqD:
-  fixes f :: "(_ :: linorder) \<Rightarrow> (_ :: preorder)"
+  fixes f :: "'c::linorder \<Rightarrow> 'd::preorder"
   assumes "strict_mono_on A f" "f x = f y" "x \<in> A" "y \<in> A"
   shows "y = x"
   using assms by (cases rule: linorder_cases) (auto dest: strict_mono_onD)
 
-lemma strict_mono_on_imp_mono_on:
-  "strict_mono_on A (f :: (_ :: linorder) \<Rightarrow> _ :: preorder) \<Longrightarrow> mono_on A f"
+lemma strict_mono_on_imp_mono_on: "strict_mono_on A f \<Longrightarrow> mono_on A f"
+  for f :: "'a::linorder \<Rightarrow> 'b::preorder"
   by (rule mono_onI, rule strict_mono_on_leD)
 
 lemma mono_imp_strict_mono: