@@ -754,11 +754,7 @@ range_succ
754
754
755
755
@[simp] theorem range_subset {n m} : range n ⊆ range m ↔ n ≤ m := range_subset
756
756
757
- theorem exists_nat_subset_range (s : finset ℕ) : ∃n : ℕ, s ⊆ range n :=
758
- finset.induction_on s ⟨0 , empty_subset _⟩ $ λ a s ha ⟨n, hn⟩,
759
- ⟨max (a + 1 ) n, insert_subset.2
760
- ⟨by simpa only [mem_range] using le_max_left (a+1 ) n,
761
- subset.trans hn (by simpa only [range_subset] using le_max_right (a+1 ) n)⟩⟩
757
+ theorem range_mono : monotone range := λ _ _, range_subset.2
762
758
763
759
end range
764
760
@@ -986,6 +982,8 @@ eq_of_veq $ by simp only [image_val, erase_dup_map_erase_dup_eq, multiset.map_ma
986
982
theorem image_subset_image {s₁ s₂ : finset α} (h : s₁ ⊆ s₂) : s₁.image f ⊆ s₂.image f :=
987
983
by simp only [subset_def, image_val, subset_erase_dup', erase_dup_subset', multiset.map_subset_map h]
988
984
985
+ theorem image_mono (f : α → β) : monotone (finset.image f) := λ _ _, image_subset_image
986
+
989
987
theorem image_filter {p : β → Prop } [decidable_pred p] :
990
988
(s.image f).filter p = (s.filter (p ∘ f)).image f :=
991
989
ext.2 $ λ b, by simp only [mem_filter, mem_image, exists_prop]; exact
@@ -1566,6 +1564,12 @@ end,
1566
1564
by letI := classical.dec_eq β; from
1567
1565
finset.induction_on s (by simp [bot]) (by simp [A] {contextual := tt})
1568
1566
1567
+ theorem subset_range_sup_succ (s : finset ℕ) : s ⊆ range (s.sup id).succ :=
1568
+ λ n hn, mem_range.2 $ nat.lt_succ_of_le $ le_sup hn
1569
+
1570
+ theorem exists_nat_subset_range (s : finset ℕ) : ∃n : ℕ, s ⊆ range n :=
1571
+ ⟨_, s.subset_range_sup_succ⟩
1572
+
1569
1573
end sup
1570
1574
1571
1575
lemma sup_eq_supr [complete_lattice β] (s : finset α) (f : α → β) : s.sup f = (⨆a∈s, f a) :=
0 commit comments