Commit 2018-11-05 10:47 a12d5a19
View on Github →feat(linear_algebra,ring_theory): refactoring modules (#456) Co-authored with Kenny Lau. See also https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/module.20refactoring for discussion. Major changes made:
semimodule α βandmodule α βandvector_space α βnow take one more argument, thatβis anadd_comm_group, i.e. before making an instance of a module, you need to prove that it's an abelian group first.- vector space is no longer over a field, but a discrete field.
- The idiom for making an instance
module α β(after proving thatβis an abelian group) ismodule.of_core { smul := sorry, smul_add := sorry, add_smul := sorry, mul_smul := sorry, one_smul := sorry }. is_linear_mapandlinear_mapare now both structures, and they are independent, meaning thatlinear_mapis no longer defined assubtype is_linear_map. The idiom for makinglinear_mapfromis_linear_mapisis_linear_map.mk' (f : M -> N) (sorry : is_linear_map f), and the idiom for makingis_linear_mapfromlinear_mapisf.is_linear(i.e.linear_map.is_linear f).is_linear_map.addetc no longer exist. instead, you can now add two linear maps together, etc.- the class
is_submoduleis gone, replaced by the structuresubmodulewhich contains a carrier, i.e. ifN : submodule R MthenN.carrieris a type. And there is an instancemodule R Nin the same situation. - similarly, the class
is_idealis gone, replaced by the structureideal, which also contains a carrier. - endomorphism ring and general linear group are defined.
- submodules form a complete lattice. the trivial ideal is now idiomatically the bottom element, and the universal ideal the top element.
linear_algebra/quotient_module.leanis deleted, and it's nowsubmodule.quotient(so ifN : submodule R Mthensubmodule R N.quotient) Similarly,quotient_ring.quotientis replaced byideal.quotient. The canonical map fromNtoN.quotientissubmodule.quotient.mk, and the canonical map from the idealItoI.quotientisideal.quotient.mk I.linear_equivis now based on a linear map and an equiv, and the difference being that now you need to prove that the inverse is also linear, and there is currently no interface to get around that.- Everything you want to know about linear independence and basis is now in the newly created file
linear_algebra/basis.lean. - Everything you want to know about linear combinations is now in the newly created file
linear_algebra/lc.lean. linear_algebra/linear_map_module.leanandlinear_algebra/prod_module.leanandlinear_algebra/quotient_module.leanandlinear_algebra/submodule.leanandlinear_algebra/subtype_module.leanare deleted (with their contents placed elsewhere). squashed commits:
- feat(linear_algebra/basic): product modules, cat/lat structure
- feat(linear_algebra/basic): refactoring quotient_module
- feat(linear_algebra/basic): merge in submodule.lean
- feat(linear_algebra/basic): merge in linear_map_module.lean
- refactor(linear_algebra/dimension): update for new modules
- feat(ring_theory/ideals): convert ideals
- refactor tensor product
- simplify local ring proof for Zp
- refactor(ring_theory/noetherian)
- refactor(ring_theory/localization)
- refactor(linear_algebra/tensor_product)
- feat(data/polynomial): lcoeff