@@ -548,10 +548,9 @@ theorem IsMaxOn.max (hf : IsMaxOn f s a) (hg : IsMaxOn g s a) :
548548
549549/-! ### Extrema from monotonicity and antitonicity -/
550550
551-
552551variable {β : Type *} [LinearOrder α] [Preorder β] {a b c : α} {f : α → β}
553552
554- /-- If `f` is monotone on `(a, b]` and antitone on `[b,c)`, then the maximum of `f` on `(a, c)` is
553+ /-- If `f` is monotone on `(a, b]` and antitone on `[b, c)`, then the maximum of `f` on `(a, c)` is
555554attained at `b`. -/
556555lemma isMaxOn_Ioo_of_mono_anti (h₀ : MonotoneOn f (Ioc a b)) (h₁ : AntitoneOn f (Ico b c)) :
557556 IsMaxOn f (Ioo a c) b := by
@@ -560,29 +559,28 @@ lemma isMaxOn_Ioo_of_mono_anti (h₀ : MonotoneOn f (Ioc a b)) (h₁ : AntitoneO
560559 · exact h₀ ⟨hx.1 , g₀⟩ (right_mem_Ioc.2 (g₀.trans_lt' hx.1 )) g₀
561560 · refine h₁ (left_mem_Ico.2 (g₀.trans hx.2 )) ⟨g₀.le, hx.2 ⟩ g₀.le
562561
563- /-- If `f` is antitone on `(a, b]` and monotone on `[b,c)`, then the minimum of `f` on `(a, c)` is
562+ /-- If `f` is antitone on `(a, b]` and monotone on `[b, c)`, then the minimum of `f` on `(a, c)` is
564563attained at `b`. -/
565564lemma isMinOn_Ioo_of_anti_mono (h₀ : AntitoneOn f (Ioc a b)) (h₁ : MonotoneOn f (Ico b c)) :
566565 IsMinOn f (Ioo a c) b :=
567566 isMaxOn_Ioo_of_mono_anti (β := βᵒᵈ) h₀ h₁
568567
569- /-- If `f` is monotone on `[a, b]` and antitone on `[b,c)`, then the maximum of `f` on `[a, c)` is
568+ /-- If `f` is monotone on `[a, b]` and antitone on `[b, c)`, then the maximum of `f` on `[a, c)` is
570569attained at `b`. -/
571- lemma isMaxOn_Ico_of_mono_anti
572- (h₀ : MonotoneOn f (Icc a b))
573- (h₁ : AntitoneOn f (Ico b c)) : IsMaxOn f (Ico a c) b := by
570+ lemma isMaxOn_Ico_of_mono_anti (h₀ : MonotoneOn f (Icc a b)) (h₁ : AntitoneOn f (Ico b c)) :
571+ IsMaxOn f (Ico a c) b := by
574572 intro x hx
575573 by_cases! g₀ : x ≤ b
576574 · exact h₀ ⟨hx.1 , g₀⟩ (right_mem_Icc.2 (hx.1 .trans g₀)) g₀
577575 · exact h₁ (left_mem_Ico.2 (g₀.trans hx.2 )) ⟨g₀.le, hx.2 ⟩ g₀.le
578576
579- /-- If `f` is antitone on `[a, b]` and monotone on `[b,c)`, then the minimum of `f` on `[a, c)` is
577+ /-- If `f` is antitone on `[a, b]` and monotone on `[b, c)`, then the minimum of `f` on `[a, c)` is
580578attained at `b`. -/
581579lemma isMinOn_Ico_of_anti_mono (h₀ : AntitoneOn f (Icc a b)) (h₁ : MonotoneOn f (Ico b c)) :
582580 IsMinOn f (Ico a c) b :=
583581 isMaxOn_Ico_of_mono_anti (β := βᵒᵈ) h₀ h₁
584582
585- /-- If `f` is monotone on `(a, b]` and antitone on `[b,c]`, then the maximum of `f` on `(a, c]` is
583+ /-- If `f` is monotone on `(a, b]` and antitone on `[b, c]`, then the maximum of `f` on `(a, c]` is
586584attained at `b`. -/
587585lemma isMaxOn_Ioc_of_mono_anti (h₀ : MonotoneOn f (Ioc a b)) (h₁ : AntitoneOn f (Icc b c)) :
588586 IsMaxOn f (Ioc a c) b := by
@@ -591,13 +589,13 @@ lemma isMaxOn_Ioc_of_mono_anti (h₀ : MonotoneOn f (Ioc a b)) (h₁ : AntitoneO
591589 · exact h₀ ⟨hx.1 , g₀⟩ (right_mem_Ioc.2 (g₀.trans_lt' hx.1 )) g₀
592590 · exact h₁ (left_mem_Icc.2 (g₀.le.trans hx.2 )) ⟨g₀.le, hx.2 ⟩ g₀.le
593591
594- /-- If `f` is monotone on `(a, b]` and antitone on `[b,c]`, then the maximum of `f` on `(a, c]` is
592+ /-- If `f` is antitone on `(a, b]` and monotone on `[b, c]`, then the minimum of `f` on `(a, c]` is
595593attained at `b`. -/
596594lemma isMinOn_Ioc_of_anti_mono (h₀ : AntitoneOn f (Ioc a b)) (h₁ : MonotoneOn f (Icc b c)) :
597595 IsMinOn f (Ioc a c) b :=
598596 isMaxOn_Ioc_of_mono_anti (β := βᵒᵈ) h₀ h₁
599597
600- /-- If `f` is monotone on `[a, b]` and antitone on `[b,c]`, then the maximum of `f` on `[a, c]` is
598+ /-- If `f` is monotone on `[a, b]` and antitone on `[b, c]`, then the maximum of `f` on `[a, c]` is
601599attained at `b`. -/
602600lemma isMaxOn_Icc_of_mono_anti (h₀ : MonotoneOn f (Icc a b)) (h₁ : AntitoneOn f (Icc b c)) :
603601 IsMaxOn f (Icc a c) b := by
@@ -606,13 +604,13 @@ lemma isMaxOn_Icc_of_mono_anti (h₀ : MonotoneOn f (Icc a b)) (h₁ : AntitoneO
606604 · exact h₀ ⟨hx.1 , g₀⟩ (right_mem_Icc.2 (hx.1 .trans g₀)) g₀
607605 · exact h₁ (left_mem_Icc.2 (g₀.le.trans hx.2 )) ⟨g₀.le, hx.2 ⟩ g₀.le
608606
609- /-- If `f` is antitone on `[a, b]` and monotone on `[b,c]`, then the minimum of `f` on `( a, c]` is
607+ /-- If `f` is antitone on `[a, b]` and monotone on `[b, c]`, then the minimum of `f` on `[ a, c]` is
610608attained at `b`. -/
611609lemma isMinOn_Icc_of_anti_mono (h₀ : AntitoneOn f (Icc a b)) (h₁ : MonotoneOn f (Icc b c)) :
612610 IsMinOn f (Icc a c) b :=
613611 isMaxOn_Icc_of_mono_anti (β := βᵒᵈ) h₀ h₁
614612
615- /-- If `f` is monotone on `(a, b]` and antitone on `[b,∞)`, then the maximum of `f` on `(a, ∞)` is
613+ /-- If `f` is monotone on `(a, b]` and antitone on `[b, ∞)`, then the maximum of `f` on `(a, ∞)` is
616614attained at `b`. -/
617615lemma isMaxOn_Ioi_of_mono_anti (h₀ : MonotoneOn f (Ioc a b)) (h₁ : AntitoneOn f (Ici b)) :
618616 IsMaxOn f (Ioi a) b := by
@@ -621,13 +619,13 @@ lemma isMaxOn_Ioi_of_mono_anti (h₀ : MonotoneOn f (Ioc a b)) (h₁ : AntitoneO
621619 · exact h₀ ⟨hx, g₀⟩ (right_mem_Ioc.2 (g₀.trans_lt' hx)) g₀
622620 · exact h₁ self_mem_Ici g₀.le g₀.le
623621
624- /-- If `f` is antitone on `(a, b]` and monotone on `[b,∞)`, then the minimum of `f` on `(a, ∞)` is
622+ /-- If `f` is antitone on `(a, b]` and monotone on `[b, ∞)`, then the minimum of `f` on `(a, ∞)` is
625623attained at `b`. -/
626624lemma isMinOn_Ioi_of_anti_mono (h₀ : AntitoneOn f (Ioc a b)) (h₁ : MonotoneOn f (Ici b)) :
627625 IsMinOn f (Ioi a) b :=
628626 isMaxOn_Ioi_of_mono_anti (β := βᵒᵈ) h₀ h₁
629627
630- /-- If `f` is monotone on `[a, b]` and antitone on `[b,∞)`, then the maximum of `f` on `[a, ∞)` is
628+ /-- If `f` is monotone on `[a, b]` and antitone on `[b, ∞)`, then the maximum of `f` on `[a, ∞)` is
631629attained at `b`. -/
632630lemma isMaxOn_Ici_of_mono_anti (h₀ : MonotoneOn f (Icc a b)) (h₁ : AntitoneOn f (Ici b)) :
633631 IsMaxOn f (Ici a) b := by
@@ -636,49 +634,49 @@ lemma isMaxOn_Ici_of_mono_anti (h₀ : MonotoneOn f (Icc a b)) (h₁ : AntitoneO
636634 · exact h₀ ⟨hx, g₀⟩ (right_mem_Icc.2 (hx.trans g₀)) g₀
637635 · exact h₁ self_mem_Ici g₀.le g₀.le
638636
639- /-- If `f` is antitone on `( a, b]` and monotone on `[b,∞)`, then the minimum of `f` on `[a, ∞)` is
637+ /-- If `f` is antitone on `[ a, b]` and monotone on `[b, ∞)`, then the minimum of `f` on `[a, ∞)` is
640638attained at `b`. -/
641639lemma isMinOn_Ici_of_anti_mono (h₀ : AntitoneOn f (Icc a b)) (h₁ : MonotoneOn f (Ici b)) :
642640 IsMinOn f (Ici a) b :=
643641 isMaxOn_Ici_of_mono_anti (β := βᵒᵈ) h₀ h₁
644642
645- /-- If `f` is monotone on `(-∞, b]` and antitone on `[b,a)`, then the maximum of `f` on `(-∞, a)` is
646- attained at `b`. -/
643+ /-- If `f` is monotone on `(-∞, b]` and antitone on `[b, a)`, then the maximum of `f` on `(-∞, a)`
644+ is attained at `b`. -/
647645lemma isMaxOn_Iio_of_mono_anti (h₀ : MonotoneOn f (Iic b)) (h₁ : AntitoneOn f (Ico b a)) :
648646 IsMaxOn f (Iio a) b := by
649647 intro x hx
650648 by_cases! g₀ : x ≤ b
651649 · exact h₀ g₀ self_mem_Iic g₀
652650 · exact h₁ (left_mem_Ico.2 (g₀.trans hx)) ⟨g₀.le, hx⟩ g₀.le
653651
654- /-- If `f` is antitone on `(-∞, b]` and monotone on `[b,a)`, then the minimum of `f` on `(-∞, a)` is
655- attained at `b`. -/
652+ /-- If `f` is antitone on `(-∞, b]` and monotone on `[b, a)`, then the minimum of `f` on `(-∞, a)`
653+ is attained at `b`. -/
656654lemma isMinOn_Iio_of_anti_mono (h₀ : AntitoneOn f (Iic b)) (h₁ : MonotoneOn f (Ico b a)) :
657655 IsMinOn f (Iio a) b :=
658656 isMaxOn_Iio_of_mono_anti (β := βᵒᵈ) h₀ h₁
659657
660- /-- If `f` is monotone on `(-∞, b]` and antitone on `[b,a]`, then the maximum of
661- `f` on `(-∞, a]` is attained at `b`. -/
658+ /-- If `f` is monotone on `(-∞, b]` and antitone on `[b, a]`, then the maximum of `f` on `(-∞, a]`
659+ is attained at `b`. -/
662660lemma isMaxOn_Iic_of_mono_anti (h₀ : MonotoneOn f (Iic b)) (h₁ : AntitoneOn f (Icc b a)) :
663661 IsMaxOn f (Iic a) b := by
664662 intro x hx
665663 by_cases! g₀ : x ≤ b
666664 · exact h₀ g₀ self_mem_Iic g₀
667665 · exact h₁ (left_mem_Icc.2 (g₀.le.trans hx)) ⟨g₀.le, hx⟩ g₀.le
668666
669- /-- If `f` is antitone on `(-∞, b]` and monotone on `[b,a]`, then the minimum of `f` on `(-∞, a]` is
670- attained at `b`. -/
667+ /-- If `f` is antitone on `(-∞, b]` and monotone on `[b, a]`, then the minimum of `f` on `(-∞, a]`
668+ is attained at `b`. -/
671669lemma isMinOn_Iic_of_anti_mono (h₀ : AntitoneOn f (Iic b)) (h₁ : MonotoneOn f (Icc b a)) :
672670 IsMinOn f (Iic a) b :=
673671 isMaxOn_Iic_of_mono_anti (β := βᵒᵈ) h₀ h₁
674672
675- /-- If `f` is monotone on `(-∞, b]` and antitone on `[b,∞)`, then the maximum of `f` is attained
673+ /-- If `f` is monotone on `(-∞, b]` and antitone on `[b, ∞)`, then the maximum of `f` is attained
676674at `b`. -/
677675lemma isMaxOn_univ_of_mono_anti (h₀ : MonotoneOn f (Iic b)) (h₁ : AntitoneOn f (Ici b)) :
678676 IsMaxOn f univ b :=
679677 fun x _ => by rcases le_total x b <;> aesop
680678
681- /-- If `f` is antitone on `(-∞, b]` and monotone on `[b,∞)`, then the minimum of `f` is attained
679+ /-- If `f` is antitone on `(-∞, b]` and monotone on `[b, ∞)`, then the minimum of `f` is attained
682680at `b`. -/
683681lemma isMinOn_univ_of_anti_mono (h₀ : AntitoneOn f (Iic b)) (h₁ : MonotoneOn f (Ici b)) :
684682 IsMinOn f univ b :=
0 commit comments