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 α βand- module α βand- vector_space α βnow take one more argument, that- βis an- add_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_mapand- linear_mapare now both structures, and they are independent, meaning that- linear_mapis no longer defined as- subtype is_linear_map. The idiom for making- linear_mapfrom- is_linear_mapis- is_linear_map.mk' (f : M -> N) (sorry : is_linear_map f), and the idiom for making- is_linear_mapfrom- linear_mapis- f.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 classis_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 now- submodule.quotient(so if- N : submodule R Mthen- submodule R N.quotient) Similarly,- quotient_ring.quotientis replaced by- ideal.quotient. The canonical map from- Nto- N.quotientis- submodule.quotient.mk, and the canonical map from the ideal- Ito- I.quotientis- ideal.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.leanand- linear_algebra/prod_module.leanand- linear_algebra/quotient_module.leanand- linear_algebra/submodule.leanand- linear_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