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_map
andlinear_map
are now both structures, and they are independent, meaning thatlinear_map
is no longer defined assubtype is_linear_map
. The idiom for makinglinear_map
fromis_linear_map
isis_linear_map.mk' (f : M -> N) (sorry : is_linear_map f)
, and the idiom for makingis_linear_map
fromlinear_map
isf.is_linear
(i.e.linear_map.is_linear f
).is_linear_map.add
etc no longer exist. instead, you can now add two linear maps together, etc.- the class
is_submodule
is gone, replaced by the structuresubmodule
which contains a carrier, i.e. ifN : submodule R M
thenN.carrier
is a type. And there is an instancemodule R N
in the same situation. - similarly, the class
is_ideal
is 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.lean
is deleted, and it's nowsubmodule.quotient
(so ifN : submodule R M
thensubmodule R N.quotient
) Similarly,quotient_ring.quotient
is replaced byideal.quotient
. The canonical map fromN
toN.quotient
issubmodule.quotient.mk
, and the canonical map from the idealI
toI.quotient
isideal.quotient.mk I
.linear_equiv
is 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.lean
andlinear_algebra/prod_module.lean
andlinear_algebra/quotient_module.lean
andlinear_algebra/submodule.lean
andlinear_algebra/subtype_module.lean
are 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