We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
max_sub_max_le_max
grind
1 parent 7a743c4 commit f48b2e9Copy full SHA for f48b2e9
1 file changed
Mathlib/Algebra/Order/Group/MinMax.lean
@@ -65,13 +65,7 @@ section LinearOrderedAddCommGroup
65
variable {α : Type*} [AddCommGroup α] [LinearOrder α] [IsOrderedAddMonoid α]
66
67
theorem max_sub_max_le_max (a b c d : α) : max a b - max c d ≤ max (a - c) (b - d) := by
68
- simp only [sub_le_iff_le_add, max_le_iff]; constructor
69
- · calc
70
- a = a - c + c := (sub_add_cancel a c).symm
71
- _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_left _ _) (le_max_left _ _)
72
73
- b = b - d + d := (sub_add_cancel b d).symm
74
- _ ≤ max (a - c) (b - d) + max c d := add_le_add (le_max_right _ _) (le_max_right _ _)
+ grind
75
76
theorem abs_max_sub_max_le_max (a b c d : α) : |max a b - max c d| ≤ max |a - c| |b - d| := by
77
refine abs_sub_le_iff.2 ⟨?_, ?_⟩
0 commit comments