Download data/lean/OAI/NumberTheory/PiExponent/Polynomials/HomogeneousSubmoduleGrading.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.62 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Polynomials/HomogeneousSubmoduleGrading.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/NumberTheory/PiExponent/Polynomials/HomogeneousSubmoduleGrading.lean
-
curl -L -o HomogeneousSubmoduleGrading.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/NumberTheory/PiExponent/Polynomials/HomogeneousSubmoduleGrading.lean
3.62 kB
| import Mathlib | |
| namespace OAI | |
| namespace PiExponent.HomogeneousSubmoduleGrading | |
| noncomputable section | |
| open DirectSum | |
| variable {R M ΟM : Type*} [Ring R] [AddCommGroup M] [Module R M] | |
| [SetLike ΟM M] [AddSubgroupClass ΟM M] | |
| (π : β€ β ΟM) [DirectSum.Decomposition π] | |
| (K : Submodule R M) (hK : K.IsHomogeneous π) | |
| def piece (_hK : K.IsHomogeneous π) (d : β€) : AddSubgroup K where | |
| carrier := {m | (m : M) β π d} | |
| zero_mem' := zero_mem _ | |
| add_mem' := fun hm hn => add_mem hm hn | |
| neg_mem' := fun hm => neg_mem hm | |
| def component (m : K) (d : β€) : piece π K hK d := | |
| β¨β¨DirectSum.decompose π (m : M) d, hK d m.propertyβ©, | |
| (DirectSum.decompose π (m : M) d).propertyβ© | |
| def decompositionMap : K β+ β¨ d, piece π K hK d where | |
| toFun m := by | |
| classical | |
| exact DFinsupp.mk' (component π K hK m) (Trunc.mk | |
| β¨(DirectSum.decompose π (m : M)).support.val, fun d => by | |
| classical | |
| by_cases hd : d β (DirectSum.decompose π (m : M)).support | |
| Β· exact Or.inl hd | |
| Β· right | |
| apply Subtype.ext | |
| apply Subtype.ext | |
| change (DirectSum.decompose π (m : M) d : M) = 0 | |
| rw [DFinsupp.notMem_support_iff.mp hd] | |
| rflβ©) | |
| map_zero' := by | |
| ext d | |
| change (DirectSum.decompose π (0 : M) d : M) = 0 | |
| rw [DirectSum.decompose_zero] | |
| rfl | |
| map_add' m n := by | |
| ext d | |
| change (DirectSum.decompose π ((m : M) + (n : M)) d : M) = | |
| (DirectSum.decompose π (m : M) d : M) + (DirectSum.decompose π (n : M) d : M) | |
| rw [DirectSum.decompose_add] | |
| rfl | |
| @[simp] theorem decompositionMap_apply (m : K) (d : β€) : | |
| (((decompositionMap π K hK m) d : K) : M) = | |
| (DirectSum.decompose π (m : M) d : M) := rfl | |
| theorem decompositionMap_injective : Function.Injective (decompositionMap π K hK) := by | |
| intro m n h | |
| apply Subtype.ext | |
| apply (DirectSum.decompose π).injective | |
| ext d | |
| exact congrArg (fun z : β¨ d, piece π K hK d => ((z d : K) : M)) h | |
| theorem decompositionMap_homogeneous (d : β€) (m : piece π K hK d) : | |
| decompositionMap π K hK m.val = DirectSum.of (fun d => piece π K hK d) d m := by | |
| classical | |
| ext e | |
| by_cases he : d = e | |
| Β· subst e | |
| rw [DirectSum.of_eq_same] | |
| exact DirectSum.decompose_of_mem_same π m.property | |
| Β· rw [DirectSum.of_eq_of_ne _ _ _ (Ne.symm he)] | |
| exact DirectSum.decompose_of_mem_ne π m.property he | |
| instance decomposition : DirectSum.Decomposition (piece π K hK) := by | |
| classical | |
| have hr : (decompositionMap π K hK).comp (DirectSum.coeAddMonoidHom (piece π K hK)) = | |
| AddMonoidHom.id _ := by | |
| apply DirectSum.addHom_ext | |
| intro d m | |
| simp only [AddMonoidHom.comp_apply, DirectSum.coeAddMonoidHom_of, | |
| AddMonoidHom.id_apply, decompositionMap_homogeneous] | |
| apply DirectSum.Decomposition.ofAddHom (piece π K hK) (decompositionMap π K hK) ?_ hr | |
| apply AddMonoidHom.ext | |
| intro m | |
| apply decompositionMap_injective π K hK | |
| exact DFunLike.congr_fun hr (decompositionMap π K hK m) | |
| theorem subtype_degree_compatible (d : β€) (m : K) : | |
| K.subtype (DirectSum.decompose (piece π K hK) m d : K) = | |
| (DirectSum.decompose π (K.subtype m) d : M) := rfl | |
| variable {ΟR : Type*} [SetLike ΟR R] [AddSubgroupClass ΟR R] | |
| (π : β€ β ΟR) [SetLike.GradedSMul π π] | |
| instance gradedSMul : SetLike.GradedSMul π (piece π K hK) where | |
| smul_mem := by | |
| intro i d a m ha hm | |
| change a β’ (m : M) β π (i + d) | |
| exact SetLike.GradedSMul.smul_mem ha (show (m : M) β π d from hm) | |
| end | |
| end PiExponent.HomogeneousSubmoduleGrading | |
| end OAI | |