@@ -1286,3 +1286,41 @@ instance center.smulCommClass_right : SMulCommClass R (center R) R :=
1286
1286
end Subring
1287
1287
1288
1288
end Actions
1289
+
1290
+ namespace Subring
1291
+
1292
+ theorem map_comap_eq (f : R →+* S) (t : Subring S) : (t.comap f).map f = t ⊓ f.range :=
1293
+ SetLike.coe_injective Set.image_preimage_eq_inter_range
1294
+
1295
+ theorem map_comap_eq_self
1296
+ {f : R →+* S} {t : Subring S} (h : t ≤ f.range) : (t.comap f).map f = t := by
1297
+ simpa only [inf_of_le_left h] using Subring.map_comap_eq f t
1298
+
1299
+ theorem map_comap_eq_self_of_surjective
1300
+ {f : R →+* S} (hf : Function.Surjective f) (t : Subring S) : (t.comap f).map f = t :=
1301
+ map_comap_eq_self <| by simp [hf]
1302
+
1303
+ theorem comap_map_eq (f : R →+* S) (s : Subring R) :
1304
+ (s.map f).comap f = s ⊔ closure (f ⁻¹' {0 }) := by
1305
+ apply le_antisymm
1306
+ · intro x hx
1307
+ rw [mem_comap, mem_map] at hx
1308
+ obtain ⟨y, hy, hxy⟩ := hx
1309
+ replace hxy : x - y ∈ f ⁻¹' {0 } := by simp [hxy]
1310
+ rw [← closure_eq s, ← closure_union, ← add_sub_cancel y x]
1311
+ exact Subring.add_mem _ (subset_closure <| Or.inl hy) (subset_closure <| Or.inr hxy)
1312
+ · rw [← map_le_iff_le_comap, map_sup, f.map_closure]
1313
+ apply le_of_eq
1314
+ rw [sup_eq_left, closure_le]
1315
+ exact (Set.image_preimage_subset f {0 }).trans (Set.singleton_subset_iff.2 (s.map f).zero_mem)
1316
+
1317
+ theorem comap_map_eq_self {f : R →+* S} {s : Subring R}
1318
+ (h : f ⁻¹' {0 } ⊆ s) : (s.map f).comap f = s := by
1319
+ convert comap_map_eq f s
1320
+ rwa [left_eq_sup, closure_le]
1321
+
1322
+ theorem comap_map_eq_self_of_injective
1323
+ {f : R →+* S} (hf : Function.Injective f) (s : Subring R) : (s.map f).comap f = s :=
1324
+ SetLike.coe_injective (Set.preimage_image_eq _ hf)
1325
+
1326
+ end Subring
0 commit comments