import Mathlib.RingTheory.Ideal.Span import Mathlib.Algebra.Regular.Basic /-! # Regular Principal Generator -/ namespace OAI.AlgebraicGeometry.Divisors.LineBundles.RegularPrincipalGenerator.BundleCycles noncomputable section /-! A module embedded as the principal ideal of a regular element is freely generated by the element that maps to that generator. -/ variable {R M : Type*} [CommRing R] [AddCommGroup M] [Module R M] (i : M →ₗ[R] R) (hinj : Function.Injective i) (s : M) (hs : IsRegular (i s)) (hspan : ∀ m : M, i m ∈ Ideal.span {i s}) include hinj hs hspan in theorem regularPrincipalGenerator_bijective : Function.Bijective (fun r : R => r • s) := by constructor · intro r t h have he := congrArg i h rw [map_smul, map_smul, smul_eq_mul, smul_eq_mul] at he exact hs.right he · intro m obtain ⟨r, hr⟩ := Ideal.mem_span_singleton.mp (hspan m) refine ⟨r, hinj ?_⟩ rw [map_smul, smul_eq_mul, mul_comm, ← hr] def regularPrincipalGeneratorEquiv : R ≃ₗ[R] M := LinearEquiv.ofBijective ((LinearMap.id : R →ₗ[R] R).smulRight s) (regularPrincipalGenerator_bijective i hinj s hs hspan) end end OAI.AlgebraicGeometry.Divisors.LineBundles.RegularPrincipalGenerator.BundleCycles