Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 2b79f1d

Browse files
committed
feat(ring_theory/ideal_operations): lemmas about ideals and galois connections (#2767)
depends on #2766 Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>
1 parent ceb13ba commit 2b79f1d

File tree

3 files changed

+152
-28
lines changed

3 files changed

+152
-28
lines changed

src/order/complete_lattice.lean

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ supr_le $ le_supr _ ∘ h
252252
@[simp] theorem supr_le_iff : supr s ≤ a ↔ (∀i, s i ≤ a) :=
253253
(is_lub_le_iff is_lub_supr).trans forall_range_iff
254254

255+
theorem Sup_eq_supr {s : set α} : Sup s = (⨆a ∈ s, a) :=
256+
le_antisymm
257+
(Sup_le $ assume b h, le_supr_of_le b $ le_supr _ h)
258+
(supr_le $ assume b, supr_le $ assume h, le_Sup h)
259+
255260
lemma le_supr_iff : (a ≤ supr s) ↔ (∀ b, (∀ i, s i ≤ b) → a ≤ b) :=
256261
⟨λ h b hb, le_trans h (supr_le hb), λ h, h _ $ λ i, le_supr s i⟩
257262

@@ -266,6 +271,10 @@ calc (⨆ i h, f (s i h)) ≤ (⨆ i, f (⨆ h, s i h)) :
266271
supr_le_supr $ λ i, hf.le_map_supr
267272
... ≤ f (⨆ i (h : ι' i), s i h) : hf.le_map_supr
268273

274+
lemma monotone.le_map_Sup [complete_lattice β] {s : set α} {f : α → β} (hf : monotone f) :
275+
(⨆a∈s, f a) ≤ f (Sup s) :=
276+
by rw [Sup_eq_supr]; exact hf.le_map_supr2 _
277+
269278
lemma supr_comp_le {ι' : Sort*} (f : ι' → α) (g : ι → ι') :
270279
(⨆ x, f (g x)) ≤ ⨆ y, f y :=
271280
supr_le_supr2 $ λ x, ⟨_, le_refl _⟩
@@ -321,6 +330,11 @@ le_infi $ infi_le _ ∘ h
321330
@[simp] theorem le_infi_iff : a ≤ infi s ↔ (∀i, a ≤ s i) :=
322331
⟨assume : a ≤ infi s, assume i, le_trans this (infi_le _ _), le_infi⟩
323332

333+
theorem Inf_eq_infi {s : set α} : Inf s = (⨅a ∈ s, a) :=
334+
le_antisymm
335+
(le_infi $ assume b, le_infi $ assume h, Inf_le h)
336+
(le_Inf $ assume b h, infi_le_of_le b $ infi_le _ h)
337+
324338
lemma monotone.map_infi_le [complete_lattice β] {f : α → β} (hf : monotone f) :
325339
f (infi s) ≤ (⨅ i, f (s i)) :=
326340
le_infi $ λ i, hf $ infi_le _ _
@@ -331,6 +345,10 @@ lemma monotone.map_infi2_le [complete_lattice β] {f : α → β} (hf : monotone
331345
calc f (⨅ i (h : ι' i), s i h) ≤ (⨅ i, f (⨅ h, s i h)) : hf.map_infi_le
332346
... ≤ (⨅ i h, f (s i h)) : infi_le_infi $ λ i, hf.map_infi_le
333347

348+
lemma monotone.map_Inf_le [complete_lattice β] {s : set α} {f : α → β} (hf : monotone f) :
349+
f (Inf s) ≤ ⨅ a∈s, f a :=
350+
by rw [Inf_eq_infi]; exact hf.map_infi2_le _
351+
334352
lemma le_infi_comp {ι' : Sort*} (f : ι' → α) (g : ι → ι') :
335353
(⨅ y, f y) ≤ ⨅ x, f (g x) :=
336354
infi_le_infi2 $ λ x, ⟨_, le_refl _⟩
@@ -550,16 +568,6 @@ le_antisymm
550568
(supr_le_supr2 $ assume i, ⟨or.inl i, le_refl _⟩)
551569
(supr_le_supr2 $ assume j, ⟨or.inr j, le_refl _⟩))
552570

553-
theorem Inf_eq_infi {s : set α} : Inf s = (⨅a ∈ s, a) :=
554-
le_antisymm
555-
(le_infi $ assume b, le_infi $ assume h, Inf_le h)
556-
(le_Inf $ assume b h, infi_le_of_le b $ infi_le _ h)
557-
558-
theorem Sup_eq_supr {s : set α} : Sup s = (⨆a ∈ s, a) :=
559-
le_antisymm
560-
(Sup_le $ assume b h, le_supr_of_le b $ le_supr _ h)
561-
(supr_le $ assume b, supr_le $ assume h, le_Sup h)
562-
563571
lemma Sup_range {α : Type u} [has_Sup α] {f : ι → α} : Sup (range f) = supr f := rfl
564572

565573
lemma Inf_range {α : Type u} [has_Inf α] {f : ι → α} : Inf (range f) = infi f := rfl

src/order/galois_connection.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ funext (assume x, le_antisymm (gc.monotone_u (gc.l_u_le _)) (gc.le_u_l _))
8383
lemma l_u_l_eq_l : l ∘ u ∘ l = l :=
8484
funext (assume x, le_antisymm (gc.l_u_le _) (gc.monotone_l (gc.le_u_l _)))
8585

86+
lemma l_unique {l' : α → β} {u' : β → α} (gc' : galois_connection l' u')
87+
(hu : ∀ b, u b = u' b) {a : α} : l a = l' a :=
88+
le_antisymm (gc.l_le $ (hu (l' a)).symm ▸ gc'.le_u_l _)
89+
(gc'.l_le $ hu (l a) ▸ gc.le_u_l _)
90+
91+
lemma u_unique {l' : α → β} {u' : β → α} (gc' : galois_connection l' u')
92+
(hl : ∀ a, l a = l' a) {b : β} : u b = u' b :=
93+
le_antisymm (gc'.le_u $ hl (u b) ▸ gc.l_u_le _)
94+
(gc.le_u $ (hl (u' b)).symm ▸ gc'.l_u_le _)
95+
8696
end partial_order
8797

8898
section order_top

src/ring_theory/ideal_operations.lean

Lines changed: 124 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ theorem annihilator_eq_top_iff : N.annihilator = ⊤ ↔ N = ⊥ :=
4545
theorem annihilator_mono (h : N ≤ P) : P.annihilator ≤ N.annihilator :=
4646
λ r hrp, mem_annihilator.2 $ λ n hn, mem_annihilator.1 hrp n $ h hn
4747

48-
theorem annihilator_supr (ι : Type w) (f : ι → submodule R M) :
48+
theorem annihilator_supr (ι : Sort w) (f : ι → submodule R M) :
4949
(annihilator ⨆ i, f i) = ⨅ i, annihilator (f i) :=
5050
le_antisymm (le_infi $ λ i, annihilator_mono $ le_supr _ _)
5151
(λ r H, mem_annihilator'.2 $ supr_le $ λ i,
@@ -61,8 +61,8 @@ mem_colon
6161
theorem colon_mono (hn : N₁ ≤ N₂) (hp : P₁ ≤ P₂) : N₁.colon P₂ ≤ N₂.colon P₁ :=
6262
λ r hrnp, mem_colon.2 $ λ p₁ hp₁, hn $ mem_colon.1 hrnp p₁ $ hp hp₁
6363

64-
theorem infi_colon_supr (ι₁ : Type w) (f : ι₁ → submodule R M)
65-
(ι₂ : Type x) (g : ι₂ → submodule R M) :
64+
theorem infi_colon_supr (ι₁ : Sort w) (f : ι₁ → submodule R M)
65+
(ι₂ : Sort x) (g : ι₂ → submodule R M) :
6666
(⨅ i, f i).colon (⨆ j, g j) = ⨅ i j, (f i).colon (g j) :=
6767
le_antisymm (le_infi $ λ i, le_infi $ λ j, colon_mono (infi_le _ _) (le_supr _ _))
6868
(λ r H, mem_colon'.2 $ supr_le $ λ j, map_le_iff_le_comap.1 $ le_infi $ λ i,
@@ -251,6 +251,24 @@ mul_comm r s ▸ mul_mem_mul hr hs
251251
theorem mul_le : I * J ≤ K ↔ ∀ (r ∈ I) (s ∈ J), r * s ∈ K :=
252252
submodule.smul_le
253253

254+
lemma mul_le_left : I * J ≤ J :=
255+
ideal.mul_le.2 (λ r hr s, ideal.mul_mem_left _)
256+
257+
lemma mul_le_right : I * J ≤ I :=
258+
ideal.mul_le.2 (λ r hr s hs, ideal.mul_mem_right _ hr)
259+
260+
@[simp] lemma sup_mul_right_self : I ⊔ (I * J) = I :=
261+
sup_eq_left.2 ideal.mul_le_right
262+
263+
@[simp] lemma sup_mul_left_self : I ⊔ (J * I) = I :=
264+
sup_eq_left.2 ideal.mul_le_left
265+
266+
@[simp] lemma mul_right_self_sup : (I * J) ⊔ I = I :=
267+
sup_eq_right.2 ideal.mul_le_right
268+
269+
@[simp] lemma mul_left_self_sup : (J * I) ⊔ I = I :=
270+
sup_eq_right.2 ideal.mul_le_left
271+
254272
variables (I J K)
255273
protected theorem mul_comm : I * J = J * I :=
256274
le_antisymm (mul_le.2 $ λ r hrI s hsJ, mul_mem_mul_rev hsJ hrI)
@@ -448,21 +466,10 @@ theorem is_prime.comap [hK : K.is_prime] : (comap f K).is_prime :=
448466
by simp only [mem_comap, f.map_mul]; apply hK.2
449467

450468
variables (I J K L)
451-
theorem map_bot : map f ⊥ = ⊥ :=
452-
le_antisymm (map_le_iff_le_comap.2 bot_le) bot_le
453469

454470
theorem map_top : map f ⊤ = ⊤ :=
455471
(eq_top_iff_one _).2 $ subset_span ⟨1, trivial, f.map_one⟩
456472

457-
theorem comap_top : comap f ⊤ = ⊤ :=
458-
(eq_top_iff_one _).2 trivial
459-
460-
theorem map_sup : map f (I ⊔ J) = map f I ⊔ map f J :=
461-
le_antisymm (map_le_iff_le_comap.2 $ sup_le
462-
(map_le_iff_le_comap.1 le_sup_left)
463-
(map_le_iff_le_comap.1 le_sup_right))
464-
(sup_le (map_mono le_sup_left) (map_mono le_sup_right))
465-
466473
theorem map_mul : map f (I * J) = map f I * map f J :=
467474
le_antisymm (map_le_iff_le_comap.2 $ mul_le.2 $ λ r hri s hsj,
468475
show f (r * s) ∈ _, by rw f.map_mul;
@@ -474,8 +481,71 @@ le_antisymm (map_le_iff_le_comap.2 $ mul_le.2 $ λ r hri s hsj,
474481
by rw [← f.map_mul];
475482
exact mem_map_of_mem (mul_mem_mul hri hsj))
476483

484+
variable (f)
485+
lemma gc_map_comap : galois_connection (ideal.map f) (ideal.comap f) :=
486+
λ I J, ideal.map_le_iff_le_comap
487+
488+
@[simp] lemma comap_id : I.comap (ring_hom.id R) = I :=
489+
ideal.ext $ λ _, iff.rfl
490+
491+
@[simp] lemma map_id : I.map (ring_hom.id R) = I :=
492+
(gc_map_comap (ring_hom.id R)).l_unique galois_connection.id comap_id
493+
494+
lemma comap_comap {T : Type*} [comm_ring T] {I : ideal T} (f : R →+* S)
495+
(g : S →+*T) : (I.comap g).comap f = I.comap (g.comp f) := rfl
496+
497+
lemma map_map {T : Type*} [comm_ring T] {I : ideal R} (f : R →+* S)
498+
(g : S →+*T) : (I.map f).map g = I.map (g.comp f) :=
499+
((gc_map_comap f).compose _ _ _ _ (gc_map_comap g)).l_unique
500+
(gc_map_comap (g.comp f)) (λ _, comap_comap _ _)
501+
502+
variables {f I J K L}
503+
504+
lemma map_le_of_le_comap : I ≤ K.comap f → I.map f ≤ K :=
505+
(gc_map_comap f).l_le
506+
507+
lemma le_comap_of_map_le : I.map f ≤ K → I ≤ K.comap f :=
508+
(gc_map_comap f).le_u
509+
510+
lemma le_comap_map : I ≤ (I.map f).comap f :=
511+
(gc_map_comap f).le_u_l _
512+
513+
lemma map_comap_le : (K.comap f).map f ≤ K :=
514+
(gc_map_comap f).l_u_le _
515+
516+
@[simp] lemma comap_top : (⊤ : ideal S).comap f = ⊤ :=
517+
(gc_map_comap f).u_top
518+
519+
@[simp] lemma map_bot : (⊥ : ideal R).map f = ⊥ :=
520+
(gc_map_comap f).l_bot
521+
522+
variables (f I J K L)
523+
524+
@[simp] lemma map_comap_map : ((I.map f).comap f).map f = I.map f :=
525+
congr_fun (gc_map_comap f).l_u_l_eq_l I
526+
527+
@[simp] lemma comap_map_comap : ((K.comap f).map f).comap f = K.comap f :=
528+
congr_fun (gc_map_comap f).u_l_u_eq_u K
529+
530+
lemma map_sup : (I ⊔ J).map f = I.map f ⊔ J.map f :=
531+
(gc_map_comap f).l_sup
532+
477533
theorem comap_inf : comap f (K ⊓ L) = comap f K ⊓ comap f L := rfl
478534

535+
variables {ι : Sort*}
536+
537+
lemma map_supr (K : ι → ideal R) : (supr K).map f = ⨆ i, (K i).map f :=
538+
(gc_map_comap f).l_supr
539+
540+
lemma comap_infi (K : ι → ideal S) : (infi K).comap f = ⨅ i, (K i).comap f :=
541+
(gc_map_comap f).u_infi
542+
543+
lemma map_Sup (s : set (ideal R)): (Sup s).map f = ⨆ I ∈ s, (I : ideal R).map f :=
544+
(gc_map_comap f).l_Sup
545+
546+
lemma comap_Inf (s : set (ideal S)): (Inf s).comap f = ⨅ I ∈ s, (I : ideal S).comap f :=
547+
(gc_map_comap f).u_Inf
548+
479549
theorem comap_radical : comap f (radical K) = radical (comap f K) :=
480550
le_antisymm (λ r ⟨n, hfrnk⟩, ⟨n, show f (r ^ n) ∈ K,
481551
from (f.map_pow r n).symm ▸ hfrnk⟩)
@@ -489,15 +559,13 @@ eq_bot_iff.2 $ ideal.map_le_iff_le_comap.2 $ λ x hx,
489559
variables {I J K L}
490560

491561
theorem map_inf_le : map f (I ⊓ J) ≤ map f I ⊓ map f J :=
492-
map_le_iff_le_comap.2 $ (comap_inf f (map f I) (map f J)).symm ▸
493-
inf_le_inf (map_le_iff_le_comap.1 $ le_refl _) (map_le_iff_le_comap.1 $ le_refl _)
562+
(gc_map_comap f).monotone_l.map_inf_le _ _
494563

495564
theorem map_radical_le : map f (radical I) ≤ radical (map f I) :=
496565
map_le_iff_le_comap.2 $ λ r ⟨n, hrni⟩, ⟨n, f.map_pow r n ▸ mem_map_of_mem hrni⟩
497566

498567
theorem le_comap_sup : comap f K ⊔ comap f L ≤ comap f (K ⊔ L) :=
499-
map_le_iff_le_comap.1 $ (map_sup f (comap f K) (comap f L)).symm ▸
500-
sup_le_sup (map_le_iff_le_comap.2 $ le_refl _) (map_le_iff_le_comap.2 $ le_refl _)
568+
(gc_map_comap f).monotone_u.le_map_sup _ _
501569

502570
theorem le_comap_mul : comap f K * comap f L ≤ comap f (K * L) :=
503571
map_le_iff_le_comap.1 $ (map_mul f (comap f K) (comap f L)).symm ▸
@@ -507,12 +575,41 @@ section surjective
507575
variables (hf : function.surjective f)
508576
include hf
509577

578+
open function
579+
510580
theorem map_comap_of_surjective (I : ideal S) :
511581
map f (comap f I) = I :=
512582
le_antisymm (map_le_iff_le_comap.2 (le_refl _))
513583
(λ s hsi, let ⟨r, hfrs⟩ := hf s in
514584
hfrs ▸ (mem_map_of_mem $ show f r ∈ I, from hfrs.symm ▸ hsi))
515585

586+
/-- `map` and `comap` are adjoint, and the composition `map f ∘ comap f` is the
587+
identity -/
588+
def gi_map_comap : galois_insertion (map f) (comap f) :=
589+
galois_insertion.monotone_intro
590+
((gc_map_comap f).monotone_u)
591+
((gc_map_comap f).monotone_l)
592+
(λ _, le_comap_map)
593+
(map_comap_of_surjective _ hf)
594+
595+
lemma map_surjective_of_surjective : surjective (map f) :=
596+
(gi_map_comap f hf).l_surjective
597+
598+
lemma comap_injective_of_surjective : injective (comap f) :=
599+
(gi_map_comap f hf).u_injective
600+
601+
lemma map_sup_comap_of_surjective (I J : ideal S) : (I.comap f ⊔ J.comap f).map f = I ⊔ J :=
602+
(gi_map_comap f hf).l_sup_u _ _
603+
604+
lemma map_supr_comap_of_surjective (K : ι → ideal S) : (⨆i, (K i).comap f).map f = supr K :=
605+
(gi_map_comap f hf).l_supr_u _
606+
607+
lemma map_inf_comap_of_surjective (I J : ideal S) : (I.comap f ⊓ J.comap f).map f = I ⊓ J :=
608+
(gi_map_comap f hf).l_inf_u _ _
609+
610+
lemma map_infi_comap_of_surjective (K : ι → ideal S) : (⨅i, (K i).comap f).map f = infi K :=
611+
(gi_map_comap f hf).l_infi_u _
612+
516613
theorem mem_image_of_mem_map_of_surjective {I : ideal R} {y}
517614
(H : y ∈ map f I) : y ∈ f '' I :=
518615
submodule.span_induction H (λ _, id) ⟨0, I.zero_mem, f.map_zero⟩
@@ -695,6 +792,15 @@ lemma ker_is_prime [integral_domain S] (f : R →+* S) :
695792

696793
end ring_hom
697794

795+
namespace ideal
796+
797+
variables {R : Type*} {S : Type*} [comm_ring R] [comm_ring S]
798+
799+
lemma map_eq_bot_iff_le_ker {I : ideal R} (f : R →+* S) : I.map f = ⊥ ↔ I ≤ f.ker :=
800+
by rw [ring_hom.ker, eq_bot_iff, map_le_iff_le_comap]
801+
802+
end ideal
803+
698804
namespace submodule
699805

700806
variables {R : Type u} {M : Type v}

0 commit comments

Comments
 (0)