@@ -568,35 +568,27 @@ theorem comp_sup_eq_sup_comp_of_is_total [SemilatticeSup β] [OrderBot β] (g :
568
568
@[simp]
569
569
protected theorem le_sup_iff (ha : ⊥ < a) : a ≤ s.sup f ↔ ∃ b ∈ s, a ≤ f b := by
570
570
apply Iff.intro
571
- · intro h'
572
- induction s using Finset.cons_induction with
573
- | h₁ => exact False.elim (not_le_of_lt ha h')
574
- | @h₂ c s hc ih =>
575
- rw [sup_cons, _root_.le_sup_iff] at h'
576
- cases h' with
577
- | inl h => exact ⟨c, mem_cons.2 (Or.inl rfl), h⟩
578
- | inr h =>
579
- rcases ih h with ⟨b, hb, hle⟩
580
- exact ⟨b, mem_cons.2 (Or.inr hb), hle⟩
581
- · rintro ⟨b, hb, hle⟩
582
- exact le_trans hle (le_sup hb)
571
+ · induction s using cons_induction with
572
+ | empty => exact (absurd · (not_le_of_lt ha))
573
+ | @cons c t hc ih =>
574
+ rw [sup_cons, le_sup_iff]
575
+ exact fun
576
+ | Or.inl h => ⟨c, mem_cons.2 (Or.inl rfl), h⟩
577
+ | Or.inr h => let ⟨b, hb, hle⟩ := ih h; ⟨b, mem_cons.2 (Or.inr hb), hle⟩
578
+ · exact fun ⟨b, hb, hle⟩ => le_trans hle (le_sup hb)
583
579
#align finset.le_sup_iff Finset.le_sup_iff
584
580
585
581
@[simp]
586
582
protected theorem lt_sup_iff : a < s.sup f ↔ ∃ b ∈ s, a < f b := by
587
583
apply Iff.intro
588
- · intro h'
589
- induction s using Finset.cons_induction with
590
- | h₁ => exact False.elim (not_lt_bot h')
591
- | @h₂ c s hc ih =>
592
- rw [sup_cons, _root_.lt_sup_iff] at h'
593
- cases h' with
594
- | inl h => exact ⟨c, mem_cons.2 (Or.inl rfl), h⟩
595
- | inr h =>
596
- rcases ih h with ⟨b, hb, hlt⟩
597
- exact ⟨b, mem_cons.2 (Or.inr hb), hlt⟩
598
- · rintro ⟨b, hb, hlt⟩
599
- exact lt_of_lt_of_le hlt (le_sup hb)
584
+ · induction s using cons_induction with
585
+ | empty => exact (absurd · not_lt_bot)
586
+ | @cons c t hc ih =>
587
+ rw [sup_cons, lt_sup_iff]
588
+ exact fun
589
+ | Or.inl h => ⟨c, mem_cons.2 (Or.inl rfl), h⟩
590
+ | Or.inr h => let ⟨b, hb, hlt⟩ := ih h; ⟨b, mem_cons.2 (Or.inr hb), hlt⟩
591
+ · exact fun ⟨b, hb, hlt⟩ => lt_of_lt_of_le hlt (le_sup hb)
600
592
#align finset.lt_sup_iff Finset.lt_sup_iff
601
593
602
594
@[simp]
@@ -738,27 +730,27 @@ theorem comp_sup'_eq_sup'_comp [SemilatticeSup γ] {s : Finset β} (H : s.Nonemp
738
730
rw [coe_sup']
739
731
refine' comp_sup_eq_sup_comp g' _ rfl
740
732
intro f₁ f₂
741
- induction f₁ using WithBot.recBotCoe with
742
- | h₁ =>
733
+ cases f₁ using WithBot.recBotCoe with
734
+ | bot =>
743
735
rw [bot_sup_eq]
744
736
exact bot_sup_eq.symm
745
- | h₂ f₁ =>
746
- induction f₂ using WithBot.recBotCoe with
747
- | h₁ => rfl
748
- | h₂ f₂ => exact congr_arg _ (g_sup f₁ f₂)
737
+ | coe f₁ =>
738
+ cases f₂ using WithBot.recBotCoe with
739
+ | bot => rfl
740
+ | coe f₂ => exact congr_arg _ (g_sup f₁ f₂)
749
741
#align finset.comp_sup'_eq_sup'_comp Finset.comp_sup'_eq_sup'_comp
750
742
751
743
theorem sup'_induction {p : α → Prop } (hp : ∀ a₁, p a₁ → ∀ a₂, p a₂ → p (a₁ ⊔ a₂))
752
744
(hs : ∀ b ∈ s, p (f b)) : p (s.sup' H f) := by
753
745
show @WithBot.recBotCoe α (fun _ => Prop ) True p ↑(s.sup' H f)
754
746
rw [coe_sup']
755
747
refine' sup_induction trivial _ hs
756
- rintro (_ | a₁) h1 a₂ h2
748
+ rintro (_ | a₁) h₁ a₂ h₂
757
749
· rw [WithBot.none_eq_bot, bot_sup_eq]
758
- exact h2
759
- induction a₂ using WithBot.recBotCoe with
760
- | h₁ => exact h1
761
- | h₂ a₂ => exact hp a₁ h1 a₂ h2
750
+ exact h₂
751
+ · cases a₂ using WithBot.recBotCoe with
752
+ | bot => exact h₁
753
+ | coe a₂ => exact hp a₁ h₁ a₂ h₂
762
754
#align finset.sup'_induction Finset.sup'_induction
763
755
764
756
theorem sup'_mem (s : Set α) (w : ∀ (x) (_ : x ∈ s) (y) (_ : y ∈ s), x ⊔ y ∈ s) {ι : Type _}
@@ -824,37 +816,37 @@ theorem inf'_singleton {b : β} {h : ({b} : Finset β).Nonempty} : ({b} : Finset
824
816
#align finset.inf'_singleton Finset.inf'_singleton
825
817
826
818
theorem le_inf' {a : α} (hs : ∀ b ∈ s, a ≤ f b) : a ≤ s.inf' H f :=
827
- @ sup'_le αᵒᵈ _ _ _ H f _ hs
819
+ sup'_le (α := αᵒᵈ) H f hs
828
820
#align finset.le_inf' Finset.le_inf'
829
821
830
822
theorem inf'_le {b : β} (h : b ∈ s) : s.inf' ⟨b, h⟩ f ≤ f b :=
831
- @ le_sup' αᵒᵈ _ _ _ f _ h
823
+ le_sup' (α := αᵒᵈ) f h
832
824
#align finset.inf'_le Finset.inf'_le
833
825
834
826
@[simp]
835
827
theorem inf'_const (a : α) : (s.inf' H fun _ => a) = a :=
836
- @ sup'_const αᵒᵈ _ _ _ H _
828
+ sup'_const (α := αᵒᵈ) H a
837
829
#align finset.inf'_const Finset.inf'_const
838
830
839
831
@[simp]
840
832
theorem le_inf'_iff {a : α} : a ≤ s.inf' H f ↔ ∀ b ∈ s, a ≤ f b :=
841
- @ sup'_le_iff αᵒᵈ _ _ _ H f _
833
+ sup'_le_iff (α := αᵒᵈ) H f
842
834
#align finset.le_inf'_iff Finset.le_inf'_iff
843
835
844
836
theorem inf'_bunionᵢ [DecidableEq β] {s : Finset γ} (Hs : s.Nonempty) {t : γ → Finset β}
845
837
(Ht : ∀ b, (t b).Nonempty) :
846
838
(s.bunionᵢ t).inf' (Hs.bunionᵢ fun b _ => Ht b) f = s.inf' Hs (fun b => (t b).inf' (Ht b) f) :=
847
- @ sup'_bunionᵢ αᵒᵈ _ _ _ _ _ _ Hs _ Ht
839
+ sup'_bunionᵢ (α := αᵒᵈ) _ Hs Ht
848
840
#align finset.inf'_bUnion Finset.inf'_bunionᵢ
849
841
850
842
theorem comp_inf'_eq_inf'_comp [SemilatticeInf γ] {s : Finset β} (H : s.Nonempty) {f : β → α}
851
843
(g : α → γ) (g_inf : ∀ x y, g (x ⊓ y) = g x ⊓ g y) : g (s.inf' H f) = s.inf' H (g ∘ f) :=
852
- @ comp_sup'_eq_sup'_comp αᵒᵈ _ γᵒᵈ _ _ _ H f g g_inf
844
+ comp_sup'_eq_sup'_comp (α := αᵒᵈ) (γ := γᵒᵈ) H g g_inf
853
845
#align finset.comp_inf'_eq_inf'_comp Finset.comp_inf'_eq_inf'_comp
854
846
855
847
theorem inf'_induction {p : α → Prop } (hp : ∀ a₁, p a₁ → ∀ a₂, p a₂ → p (a₁ ⊓ a₂))
856
848
(hs : ∀ b ∈ s, p (f b)) : p (s.inf' H f) :=
857
- @ sup'_induction αᵒᵈ _ _ _ H f _ hp hs
849
+ sup'_induction (α := αᵒᵈ) H f hp hs
858
850
#align finset.inf'_induction Finset.inf'_induction
859
851
860
852
theorem inf'_mem (s : Set α) (w : ∀ (x) (_ : x ∈ s) (y) (_ : y ∈ s), x ⊓ y ∈ s) {ι : Type _}
@@ -865,13 +857,13 @@ theorem inf'_mem (s : Set α) (w : ∀ (x) (_ : x ∈ s) (y) (_ : y ∈ s), x
865
857
@[congr]
866
858
theorem inf'_congr {t : Finset β} {f g : β → α} (h₁ : s = t) (h₂ : ∀ x ∈ s, f x = g x) :
867
859
s.inf' H f = t.inf' (h₁ ▸ H) g :=
868
- @ sup'_congr αᵒᵈ _ _ _ H _ _ _ h₁ h₂
860
+ sup'_congr (α := αᵒᵈ) H h₁ h₂
869
861
#align finset.inf'_congr Finset.inf'_congr
870
862
871
863
@[simp]
872
864
theorem inf'_map {s : Finset γ} {f : γ ↪ β} (g : β → α) (hs : (s.map f).Nonempty)
873
865
(hs' : s.Nonempty := Finset.map_nonempty.mp hs) : (s.map f).inf' hs g = s.inf' hs' (g ∘ f) :=
874
- @ sup'_map αᵒᵈ _ _ _ _ _ _ hs hs'
866
+ sup'_map (α := αᵒᵈ) _ hs hs'
875
867
#align finset.inf'_map Finset.inf'_map
876
868
877
869
end Inf'
@@ -900,17 +892,17 @@ section Inf
900
892
variable [SemilatticeInf α] [OrderTop α]
901
893
902
894
theorem inf'_eq_inf {s : Finset β} (H : s.Nonempty) (f : β → α) : s.inf' H f = s.inf f :=
903
- @ sup'_eq_sup αᵒᵈ _ _ _ _ H f
895
+ sup'_eq_sup (α := αᵒᵈ) H f
904
896
#align finset.inf'_eq_inf Finset.inf'_eq_inf
905
897
906
898
theorem inf_closed_of_inf_closed {s : Set α} (t : Finset α) (htne : t.Nonempty) (h_subset : ↑t ⊆ s)
907
899
(h : ∀ (a) (_ : a ∈ s) (b) (_ : b ∈ s), a ⊓ b ∈ s) : t.inf id ∈ s :=
908
- @ sup_closed_of_sup_closed αᵒᵈ _ _ _ t htne h_subset h
900
+ sup_closed_of_sup_closed (α := αᵒᵈ) t htne h_subset h
909
901
#align finset.inf_closed_of_inf_closed Finset.inf_closed_of_inf_closed
910
902
911
903
theorem coe_inf_of_nonempty {s : Finset β} (h : s.Nonempty) (f : β → α) :
912
904
(↑(s.inf f) : WithTop α) = s.inf ((↑) ∘ f) :=
913
- @ coe_sup_of_nonempty αᵒᵈ _ _ _ _ h f
905
+ coe_sup_of_nonempty (α := αᵒᵈ) h f
914
906
#align finset.coe_inf_of_nonempty Finset.coe_inf_of_nonempty
915
907
916
908
end Inf
@@ -926,7 +918,7 @@ protected theorem sup_apply {C : β → Type _} [∀ b : β, SemilatticeSup (C b
926
918
protected theorem inf_apply {C : β → Type _} [∀ b : β, SemilatticeInf (C b)]
927
919
[∀ b : β, OrderTop (C b)] (s : Finset α) (f : α → ∀ b : β, C b) (b : β) :
928
920
s.inf f b = s.inf fun a => f a b :=
929
- @ Finset.sup_apply _ _ ( fun b => (C b)ᵒᵈ) _ _ s f b
921
+ Finset.sup_apply (C := fun b => (C b)ᵒᵈ) s f b
930
922
#align finset.inf_apply Finset.inf_apply
931
923
932
924
@[simp]
@@ -940,7 +932,7 @@ protected theorem sup'_apply {C : β → Type _} [∀ b : β, SemilatticeSup (C
940
932
protected theorem inf'_apply {C : β → Type _} [∀ b : β, SemilatticeInf (C b)]
941
933
{s : Finset α} (H : s.Nonempty) (f : α → ∀ b : β, C b) (b : β) :
942
934
s.inf' H f b = s.inf' H fun a => f a b :=
943
- @ Finset.sup'_apply _ _ ( fun b => (C b)ᵒᵈ) _ _ H f b
935
+ Finset.sup'_apply (C := fun b => (C b)ᵒᵈ) H f b
944
936
#align finset.inf'_apply Finset.inf'_apply
945
937
946
938
@[simp]
@@ -991,17 +983,17 @@ theorem sup'_lt_iff : s.sup' H f < a ↔ ∀ i ∈ s, f i < a := by
991
983
992
984
@[simp]
993
985
theorem inf'_le_iff : s.inf' H f ≤ a ↔ ∃ i ∈ s, f i ≤ a :=
994
- @ le_sup'_iff αᵒᵈ _ _ _ H f _
986
+ le_sup'_iff (α := αᵒᵈ) H
995
987
#align finset.inf'_le_iff Finset.inf'_le_iff
996
988
997
989
@[simp]
998
990
theorem inf'_lt_iff : s.inf' H f < a ↔ ∃ i ∈ s, f i < a :=
999
- @ lt_sup'_iff αᵒᵈ _ _ _ H f _
991
+ lt_sup'_iff (α := αᵒᵈ) H
1000
992
#align finset.inf'_lt_iff Finset.inf'_lt_iff
1001
993
1002
994
@[simp]
1003
995
theorem lt_inf'_iff : a < s.inf' H f ↔ ∀ i ∈ s, a < f i :=
1004
- @ sup'_lt_iff αᵒᵈ _ _ _ H f _
996
+ sup'_lt_iff (α := αᵒᵈ) H
1005
997
#align finset.lt_inf'_iff Finset.lt_inf'_iff
1006
998
1007
999
theorem exists_mem_eq_sup' (f : ι → α) : ∃ i, i ∈ s ∧ s.sup' H f = f i := by
@@ -1015,7 +1007,7 @@ theorem exists_mem_eq_sup' (f : ι → α) : ∃ i, i ∈ s ∧ s.sup' H f = f i
1015
1007
#align finset.exists_mem_eq_sup' Finset.exists_mem_eq_sup'
1016
1008
1017
1009
theorem exists_mem_eq_inf' (f : ι → α) : ∃ i, i ∈ s ∧ s.inf' H f = f i :=
1018
- @ exists_mem_eq_sup' αᵒᵈ _ _ _ H f
1010
+ exists_mem_eq_sup' (α := αᵒᵈ) H f
1019
1011
#align finset.exists_mem_eq_inf' Finset.exists_mem_eq_inf'
1020
1012
1021
1013
theorem exists_mem_eq_sup [OrderBot α] (s : Finset ι) (h : s.Nonempty) (f : ι → α) :
@@ -1025,7 +1017,7 @@ theorem exists_mem_eq_sup [OrderBot α] (s : Finset ι) (h : s.Nonempty) (f : ι
1025
1017
1026
1018
theorem exists_mem_eq_inf [OrderTop α] (s : Finset ι) (h : s.Nonempty) (f : ι → α) :
1027
1019
∃ i, i ∈ s ∧ s.inf f = f i :=
1028
- @ exists_mem_eq_sup αᵒᵈ _ _ _ _ h f
1020
+ exists_mem_eq_sup (α := αᵒᵈ) s h f
1029
1021
#align finset.exists_mem_eq_inf Finset.exists_mem_eq_inf
1030
1022
1031
1023
end LinearOrder
0 commit comments