@@ -367,6 +367,35 @@ instance (L) [AddCommMonoid L] [Module R L] [Module A L] [IsScalarTower R A L]
367367 [Module.Invertible A L] : Module.Invertible A (L ⊗[R] M) :=
368368 .congr (AlgebraTensorModule.cancelBaseChange R A A L M)
369369
370+ /-- An invertible module over a commutative semiring is Zariski-locally free of rank 1.
371+ Theorem 10.7 in [ BorgerJun2024 ] .
372+
373+ More precisely, there is a finite set of elements of `R` that generate the unit ideal,
374+ and localizing `M` at any one of them yields a free module.
375+
376+ Finite projective modules over a local commutative semiring may not be free,
377+ see Remark 7.10, Example 9.6 and 9.8. -/
378+ theorem exists_finset_free_localization :
379+ ∃ s : Finset R, Ideal.span (s : Set R) = ⊤ ∧
380+ ∀ r ∈ s, Free (Localization.Away r) (LocalizedModule.Away r M) := by
381+ classical
382+ -- write 1 = ∑ᵢ fᵢ(mᵢ) with `mᵢ : M` and `fᵢ : Dual R M`
383+ obtain ⟨S, hS⟩ := ((linearEquiv R M).symm 1 ).exists_finset
384+ refine ⟨S.image fun i ↦ i.1 i.2 , ?_, fun r hr ↦ ?_⟩
385+ -- Part 1: The evaluations fᵢ(mᵢ) generate the unit ideal
386+ · simpa [Ideal.eq_top_iff_one, (LinearEquiv.symm_apply_eq _).mp hS, linearEquiv]
387+ using Ideal.sum_mem _ fun i hi ↦ Ideal.subset_span (Finset.mem_image_of_mem _ hi)
388+ -- Part 2: After localizing at any f(m), the module becomes free
389+ obtain ⟨⟨f, m⟩, _, rfl⟩ := Finset.mem_image.mp hr
390+ -- Extend f to a R_{f(m)}-linear functional f' on the localized module
391+ let f' : Dual (Localization.Away (f m)) (LocalizedModule.Away (f m) M) :=
392+ .extendScalarsOfIsLocalization (.powers (f m)) _ <| IsLocalizedModule.map
393+ (.powers (f m)) (LocalizedModule.mkLinearMap _ M) (Algebra.linearMap R _) f
394+ -- f'(m/1) = f(m)/1 is a unit in R_{f(m)}, so f' is surjective and therefore bijective
395+ have surj : Function.Surjective f' := LinearMap.range_eq_top.mp <| Ideal.eq_top_of_isUnit_mem
396+ _ ⟨_, IsLocalizedModule.map_apply ..⟩ (IsLocalization.Away.algebraMap_isUnit (f m))
397+ exact .of_equiv <| .symm <| .ofBijective f' (bijective_of_surjective surj)
398+
370399end CommSemiring
371400
372401end Algebra
@@ -404,8 +433,7 @@ open CommRing (Pic)
404433
405434noncomputable instance : CommGroup (Pic R) := fast_instance% (equivShrink _).symm.commGroup
406435
407- variable (M N : Type *) [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N]
408- [Module.Invertible R M] [Module.Invertible R N]
436+ variable [Module.Invertible R M] [Module.Invertible R N]
409437
410438instance : Module.Invertible R (Finite.reprₛ R M) := .congr (Finite.reprEquivₛ R M).symm
411439
@@ -503,11 +531,14 @@ instance [Subsingleton (Pic R)] : Free R M :=
503531 have := subsingleton_iffₛ.mp ‹_› (Finite.reprₛ R M) inferInstance
504532 .of_equiv (Finite.reprEquivₛ R M)
505533
506- /- TODO: it's still true that the Picard group of a (commutative) local semiring is trivial;
507- in fact invertible modules over a semiring are Zariski-locally free (but projective module may
508- not be). See Remark 7.10, Example 9.6 and 9.8, and Theorem 11.7 in [ BorgerJun2024 ] . -/
509- instance (R) [CommRing R] [IsLocalRing R] : Subsingleton (Pic R) :=
510- subsingleton_iff.mpr fun _ _ _ _ ↦ free_of_flat_of_isLocalRing
534+ /-- The Picard group of a local semiring is trivial. -/
535+ instance [IsLocalRing R] : Subsingleton (Pic R) := subsingleton_iffₛ.mpr fun M _ _ _ ↦ by
536+ obtain ⟨S, hS⟩ := ((Invertible.linearEquiv R M).symm 1 ).exists_finset
537+ replace hS : 1 = ∑ i ∈ S, i.1 i.2 := by
538+ simpa [LinearEquiv.symm_apply_eq, Invertible.linearEquiv] using hS
539+ obtain ⟨⟨f, m⟩, mem, hfm⟩ := IsLocalRing.exists_of_isUnit_sum (hS ▸ isUnit_one)
540+ exact .of_equiv <| .symm <| .ofBijective f (Invertible.bijective_of_surjective <|
541+ LinearMap.range_eq_top.mp <| Ideal.eq_top_of_isUnit_mem _ ⟨m, rfl⟩ hfm)
511542
512543/-- The Picard group of a semilocal ring is trivial. -/
513544instance (R) [CommRing R] [Finite (MaximalSpectrum R)] : Subsingleton (Pic R) :=
@@ -592,18 +623,15 @@ end PicardGroup
592623
593624namespace Module.Invertible
594625
595- variable (R M : Type *) [CommRing R] [AddCommGroup M] [Module R M] [Module.Invertible R M]
626+ variable [Module.Invertible R M]
596627
597- set_option backward.defeqAttrib.useBackward true in
598- -- TODO: generalize to CommSemiring by generalizing `CommRing.Pic.instSubsingletonOfIsLocalRing`
599628theorem tensorProductComm_eq_refl : TensorProduct.comm R M M = .refl .. := by
600629 let f (P : Ideal R) [P.IsMaximal] := LocalizedModule.mkLinearMap P.primeCompl M
601630 let ff (P : Ideal R) [P.IsMaximal] := TensorProduct.map (f P) (f P)
602631 refine LinearEquiv.toLinearMap_injective <| LinearMap.eq_of_localization_maximal _ ff _ ff _ _
603632 fun P _ ↦ .trans (b := (TensorProduct.comm ..).toLinearMap) ?_ ?_
604633 · apply IsLocalizedModule.linearMap_ext P.primeCompl (ff P) (ff P)
605- ext; dsimp
606- apply IsLocalizedModule.map_apply
634+ ext; exact IsLocalizedModule.map_apply _ (ff P) ..
607635 let Rp := Localization P.primeCompl
608636 have ⟨e⟩ := free_iff_linearEquiv.mp (inferInstance : Free Rp (LocalizedModule P.primeCompl M))
609637 have e := e.restrictScalars R
0 commit comments