Download data/lean/OAI/NumberTheory/PiExponent/Polynomials/GradedLocalizationExact.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 10.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Polynomials/GradedLocalizationExact.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/PiExponent/Polynomials/GradedLocalizationExact.lean
-
curl -L -o GradedLocalizationExact.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Polynomials/GradedLocalizationExact.lean
10.3 kB
| import OAI.NumberTheory.PiExponent.Polynomials.GradedSerre | |
| namespace OAI | |
| namespace PiExponent.GradedLocalizationExact | |
| noncomputable section | |
| variable {R M N P ΟR ΟM ΟN ΟP : Type*} | |
| [CommRing R] [AddCommGroup M] [Module R M] | |
| [AddCommGroup N] [Module R N] [AddCommGroup P] [Module R P] | |
| [SetLike ΟR R] | |
| [SetLike ΟM M] [AddSubgroupClass ΟM M] | |
| [SetLike ΟN N] [AddSubgroupClass ΟN N] | |
| [SetLike ΟP P] [AddSubgroupClass ΟP P] | |
| def powerDenominator (a : R) (n : β) : Submonoid.powers a := | |
| β¨a ^ n, β¨n, rflβ©β© | |
| @[simp] theorem powerDenominator_val (a : R) (n : β) : | |
| (powerDenominator a n : R) = a ^ n := rfl | |
| @[simp] theorem powerDenominator_zero (a : R) : powerDenominator a 0 = 1 := by | |
| apply Subtype.ext | |
| simp [powerDenominator] | |
| theorem powerDenominator_add (a : R) (n k : β) : | |
| powerDenominator a (n + k) = powerDenominator a n * powerDenominator a k := by | |
| apply Subtype.ext | |
| exact pow_add a n k | |
| def fraction (a : R) (m : M) (n : β) : LocalizedModule (Submonoid.powers a) M := | |
| LocalizedModule.mk m (powerDenominator a n) | |
| @[simp] theorem fraction_zero (a : R) (n : β) : fraction a (0 : M) n = 0 := | |
| LocalizedModule.zero_mk _ | |
| @[simp] theorem fraction_neg (a : R) (m : M) (n : β) : | |
| fraction a (-m) n = -fraction a m n := LocalizedModule.mk_neg | |
| theorem fraction_add (a : R) (m m' : M) (n k : β) : | |
| fraction a m n + fraction a m' k = | |
| fraction a (a ^ k β’ m + a ^ n β’ m') (n + k) := by | |
| simp only [fraction, powerDenominator_add, LocalizedModule.mk_add_mk, | |
| Submonoid.smul_def, powerDenominator_val] | |
| theorem fraction_cancel (a : R) (m : M) (n k : β) : | |
| fraction a (a ^ k β’ m) (n + k) = fraction a m n := by | |
| simpa only [fraction, powerDenominator_add, Submonoid.smul_def, | |
| powerDenominator_val] using | |
| LocalizedModule.mk_cancel_common_right (powerDenominator a n) (powerDenominator a k) m | |
| theorem fraction_eq_zero (a : R) (m : M) (n : β) : | |
| fraction a m n = 0 β β k : β, a ^ k β’ m = 0 := by | |
| rw [β fraction_zero a 0, fraction, fraction, LocalizedModule.mk_eq] | |
| simp only [powerDenominator_zero, one_smul, smul_zero] | |
| constructor | |
| Β· rintro β¨s, hsβ© | |
| obtain β¨k, hkβ© := s.property | |
| refine β¨k, ?_β© | |
| simpa only [Submonoid.smul_def, β hk] using hs | |
| Β· rintro β¨k, hkβ© | |
| exact β¨powerDenominator a k, hkβ© | |
| variable (π : β€ β ΟR) (π : β€ β ΟM) | |
| [SetLike.GradedMonoid π] [SetLike.GradedSMul π π] | |
| (a : R) (e : β€) (ha : a β π e) | |
| omit [AddSubgroupClass ΟM M] in | |
| include ha in | |
| theorem power_smul_mem {d : β€} {m : M} (hm : m β π d) (n : β) : | |
| a ^ n β’ m β π (d + (n : β€) * e) := by | |
| have h := SetLike.GradedSMul.smul_mem (SetLike.pow_mem_graded n ha) hm | |
| simpa only [nsmul_eq_mul, vadd_eq_add, add_comm] using h | |
| def degreePiece (d : β€) : AddSubgroup (LocalizedModule (Submonoid.powers a) M) where | |
| carrier := {z | β (n : β) (m : M), m β π (d + (n : β€) * e) β§ z = fraction a m n} | |
| zero_mem' := β¨0, 0, zero_mem _, (fraction_zero a 0).symmβ© | |
| add_mem' := by | |
| rintro z z' β¨n, m, hm, rflβ© β¨k, m', hm', rflβ© | |
| refine β¨n + k, a ^ k β’ m + a ^ n β’ m', ?_, fraction_add a m m' n kβ© | |
| apply add_mem | |
| Β· have h := power_smul_mem π π a e ha hm k | |
| convert h using 1 | |
| push_cast | |
| ring_nf | |
| Β· have h := power_smul_mem π π a e ha hm' n | |
| convert h using 1 | |
| push_cast | |
| ring_nf | |
| neg_mem' := by | |
| rintro z β¨n, m, hm, rflβ© | |
| exact β¨n, -m, neg_mem hm, (fraction_neg a m n).symmβ© | |
| @[simp] theorem mem_degreePiece (d : β€) (z : LocalizedModule (Submonoid.powers a) M) : | |
| z β degreePiece π π a e ha d β | |
| β (n : β) (m : M), m β π (d + (n : β€) * e) β§ z = fraction a m n := Iff.rfl | |
| def localizedMap (f : M ββ[R] N) : | |
| LocalizedModule (Submonoid.powers a) M ββ[R] LocalizedModule (Submonoid.powers a) N := | |
| IsLocalizedModule.map (Submonoid.powers a) (LocalizedModule.mkLinearMap _ M) | |
| (LocalizedModule.mkLinearMap _ N) f | |
| @[simp] theorem localizedMap_fraction (f : M ββ[R] N) (m : M) (n : β) : | |
| localizedMap a f (fraction a m n) = fraction a (f m) n := | |
| IsLocalizedModule.map_LocalizedModules _ f m _ | |
| variable (π : β€ β ΟN) [SetLike.GradedSMul π π] | |
| def pieceMap (d : β€) (f : M ββ[R] N) | |
| (hf : β i m, m β π i β f m β π i) : | |
| degreePiece π π a e ha d β+ degreePiece π π a e ha d where | |
| toFun z := β¨localizedMap a f z.val, by | |
| obtain β¨n, m, hm, hzβ© := z.property | |
| refine β¨n, f m, hf _ _ hm, ?_β© | |
| rw [hz, localizedMap_fraction]β© | |
| map_zero' := Subtype.ext (map_zero _) | |
| map_add' z z' := Subtype.ext (map_add _ _ _) | |
| @[simp] theorem pieceMap_coe (d : β€) (f : M ββ[R] N) | |
| (hf : β i m, m β π i β f m β π i) | |
| (z : degreePiece π π a e ha d) : | |
| (pieceMap π π a e ha π d f hf z).val = localizedMap a f z.val := rfl | |
| section Decomposition | |
| variable [DirectSum.Decomposition π] [DirectSum.Decomposition π] | |
| theorem preserves_of_compatible (f : M ββ[R] N) | |
| (hf : β i x, f (DirectSum.decompose π x i : M) = | |
| (DirectSum.decompose π (f x) i : N)) : | |
| β i m, m β π i β f m β π i := by | |
| intro i m hm | |
| have h := hf i m | |
| rw [DirectSum.decompose_of_mem_same π hm] at h | |
| exact h.symm βΈ (DirectSum.decompose π (f m) i).property | |
| theorem homogeneous_preimage (f : M ββ[R] N) | |
| (hf : β i x, f (DirectSum.decompose π x i : M) = | |
| (DirectSum.decompose π (f x) i : N)) | |
| {d : β€} {y : N} (hy : y β π d) (hrange : y β LinearMap.range f) : | |
| β x : M, x β π d β§ f x = y := by | |
| obtain β¨x, hxβ© := hrange | |
| refine β¨DirectSum.decompose π x d, (DirectSum.decompose π x d).property, ?_β© | |
| rw [hf, hx, DirectSum.decompose_of_mem_same π hy] | |
| theorem pieceMap_surjective (d : β€) (f : M ββ[R] N) | |
| (hf : β i x, f (DirectSum.decompose π x i : M) = | |
| (DirectSum.decompose π (f x) i : N)) (hsurj : Function.Surjective f) : | |
| Function.Surjective | |
| (pieceMap π π a e ha π d f (preserves_of_compatible π π f hf)) := by | |
| intro z | |
| obtain β¨n, y, hy, hzβ© := z.property | |
| obtain β¨x, hx, hxyβ© := homogeneous_preimage π π f hf hy (hsurj y) | |
| refine β¨β¨fraction a x n, n, x, hx, rflβ©, ?_β© | |
| apply Subtype.ext | |
| change localizedMap a f (fraction a x n) = z.val | |
| rw [localizedMap_fraction, hxy, β hz] | |
| variable (π : β€ β ΟP) [SetLike.GradedSMul π π] [DirectSum.Decomposition π] | |
| theorem pieceMap_exact (d : β€) (f : M ββ[R] N) (g : N ββ[R] P) | |
| (hf : β i x, f (DirectSum.decompose π x i : M) = | |
| (DirectSum.decompose π (f x) i : N)) | |
| (hg : β i x, g (DirectSum.decompose π x i : N) = | |
| (DirectSum.decompose π (g x) i : P)) | |
| (hex : Function.Exact f g) : | |
| Function.Exact | |
| (pieceMap π π a e ha π d f (preserves_of_compatible π π f hf)) | |
| (pieceMap π π a e ha π d g (preserves_of_compatible π π g hg)) := by | |
| intro z | |
| constructor | |
| Β· intro hz | |
| obtain β¨n, y, hy, hzyβ© := z.property | |
| have hzero : localizedMap a g z.val = 0 := congrArg Subtype.val hz | |
| rw [hzy, localizedMap_fraction, fraction_eq_zero] at hzero | |
| obtain β¨k, hkβ© := hzero | |
| have hclear : g (a ^ k β’ y) = 0 := by rw [map_smul, hk] | |
| have hy' : a ^ k β’ y β π (d + ((n + k : β) : β€) * e) := by | |
| have h := power_smul_mem π π a e ha hy k | |
| convert h using 1 | |
| push_cast | |
| ring_nf | |
| obtain β¨x, hx, hxyβ© := homogeneous_preimage π π f hf hy' ((hex _).mp hclear) | |
| refine β¨β¨fraction a x (n + k), n + k, x, hx, rflβ©, ?_β© | |
| apply Subtype.ext | |
| change localizedMap a f (fraction a x (n + k)) = z.val | |
| rw [localizedMap_fraction, hxy, fraction_cancel, β hzy] | |
| Β· rintro β¨x, rflβ© | |
| apply Subtype.ext | |
| obtain β¨n, y, hy, hxyβ© := x.property | |
| change localizedMap a g (localizedMap a f x.val) = 0 | |
| rw [hxy, localizedMap_fraction, localizedMap_fraction, | |
| hex.apply_apply_eq_zero, fraction_zero] | |
| end Decomposition | |
| section FinitePresentation | |
| variable [AddSubgroupClass ΟR R] [DirectSum.Decomposition π] [DirectSum.Decomposition π] | |
| [IsNoetherianRing R] [Module.Finite R M] | |
| theorem exists_exact_localized_free_presentation : | |
| β (nβ nβ : β) (wβ : Fin nβ β β€) (wβ : Fin nβ β β€) | |
| (fβ : (Fin nβ β R) ββ[R] M) | |
| (fβ : (Fin nβ β R) ββ[R] (Fin nβ β R)), | |
| β (hfβ : β i x, | |
| fβ (DirectSum.decompose (ShiftedFreeGrading.piece π wβ) x i : Fin nβ β R) = | |
| (DirectSum.decompose π (fβ x) i : M)) | |
| (hfβ : β i x, | |
| fβ (DirectSum.decompose (ShiftedFreeGrading.piece π wβ) x i : Fin nβ β R) = | |
| (DirectSum.decompose (ShiftedFreeGrading.piece π wβ) (fβ x) i : Fin nβ β R)), | |
| Function.Surjective fβ β§ LinearMap.range fβ = fβ.ker β§ | |
| β d : β€, | |
| Function.Surjective | |
| (pieceMap π (ShiftedFreeGrading.piece π wβ) a e ha π d fβ | |
| (preserves_of_compatible (ShiftedFreeGrading.piece π wβ) π fβ hfβ)) β§ | |
| Function.Exact | |
| (pieceMap π (ShiftedFreeGrading.piece π wβ) a e ha | |
| (ShiftedFreeGrading.piece π wβ) d fβ | |
| (preserves_of_compatible (ShiftedFreeGrading.piece π wβ) | |
| (ShiftedFreeGrading.piece π wβ) fβ hfβ)) | |
| (pieceMap π (ShiftedFreeGrading.piece π wβ) a e ha π d fβ | |
| (preserves_of_compatible (ShiftedFreeGrading.piece π wβ) π fβ hfβ)) := by | |
| obtain β¨nβ, nβ, wβ, wβ, fβ, fβ, hsurj, hex, hfβ, hfββ© := | |
| GradedSerre.exists_graded_free_presentation π π | |
| refine β¨nβ, nβ, wβ, wβ, fβ, fβ, hfβ, hfβ, hsurj, hex, ?_β© | |
| intro d | |
| refine β¨pieceMap_surjective π (ShiftedFreeGrading.piece π wβ) a e ha π d fβ hfβ hsurj, | |
| pieceMap_exact π (ShiftedFreeGrading.piece π wβ) a e ha | |
| (ShiftedFreeGrading.piece π wβ) π d fβ fβ hfβ hfβ ?_β© | |
| exact LinearMap.exact_iff.mpr hex.symm | |
| end FinitePresentation | |
| end | |
| end PiExponent.GradedLocalizationExact | |
| end OAI | |