@@ -1201,6 +1201,19 @@ by rw ← image_union; simp [image_univ_of_surjective H]
1201
1201
theorem image_compl_eq {f : α → β} {s : set α} (H : bijective f) : f '' -s = -(f '' s) :=
1202
1202
subset.antisymm (image_compl_subset H.1 ) (subset_image_compl H.2 )
1203
1203
1204
+ theorem subset_image_diff (f : α → β) (s t : set α) :
1205
+ f '' s \ f '' t ⊆ f '' (s \ t) :=
1206
+ begin
1207
+ rw [diff_subset_iff, ← image_union, union_diff_self],
1208
+ exact image_subset f (subset_union_right t s)
1209
+ end
1210
+
1211
+ theorem image_diff {f : α → β} (hf : injective f) (s t : set α) :
1212
+ f '' (s \ t) = f '' s \ f '' t :=
1213
+ subset.antisymm
1214
+ (subset.trans (image_inter_subset _ _ _) $ inter_subset_inter_right _ $ image_compl_subset hf)
1215
+ (subset_image_diff f s t)
1216
+
1204
1217
lemma nonempty.image (f : α → β) {s : set α} : s.nonempty → (f '' s).nonempty
1205
1218
| ⟨x, hx⟩ := ⟨f x, mem_image_of_mem f hx⟩
1206
1219
@@ -1539,15 +1552,15 @@ theorem val_image_subset (s : set α) (t : set (subtype s)) : t.image val ⊆ s
1539
1552
λ x ⟨y, yt, yvaleq⟩, by rw ←yvaleq; exact y.property
1540
1553
1541
1554
theorem val_image_univ (s : set α) : @val _ s '' set.univ = s :=
1542
- set.eq_of_subset_of_subset (val_image_subset _ _) (λ x xs, ⟨⟨x, xs⟩, ⟨set.mem_univ _, rfl⟩⟩ )
1555
+ image_univ.trans (range_val s )
1543
1556
1544
- theorem image_preimage_val (s t : set α) :
1557
+ @[simp] theorem image_preimage_val (s t : set α) :
1545
1558
(@subtype.val _ s) '' ((@subtype.val _ s) ⁻¹' t) = t ∩ s :=
1546
- begin
1547
- ext x, simp, split,
1548
- { rintros ⟨y, ys, yt, yx⟩, rw ←yx, exact ⟨yt, ys⟩ },
1549
- rintros ⟨xt, xs⟩, exact ⟨x, xs, xt, rfl⟩
1550
- end
1559
+ image_preimage_eq_inter_range.trans $ congr_arg _ (range_val s)
1560
+
1561
+ @[simp] theorem image_preimage_coe (s t : set α) :
1562
+ (coe : s → α) '' (coe ⁻¹' t) = t ∩ s :=
1563
+ image_preimage_val s t
1551
1564
1552
1565
theorem preimage_val_eq_preimage_val_iff (s t u : set α) :
1553
1566
((@subtype.val _ s) ⁻¹' t = (@subtype.val _ s) ⁻¹' u) ↔ (t ∩ s = u ∩ s) :=
@@ -1558,7 +1571,7 @@ begin
1558
1571
end
1559
1572
1560
1573
lemma exists_set_subtype {t : set α} (p : set α → Prop ) :
1561
- (∃(s : set t), p (subtype.val '' s)) ↔ ∃(s : set α), s ⊆ t ∧ p s :=
1574
+ (∃(s : set t), p (subtype.val '' s)) ↔ ∃(s : set α), s ⊆ t ∧ p s :=
1562
1575
begin
1563
1576
split,
1564
1577
{ rintro ⟨s, hs⟩, refine ⟨subtype.val '' s, _, hs⟩,
0 commit comments