Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - feat(linear_algebra): submodules of f.g. free modules are free #6178

Closed
wants to merge 9 commits into from

Conversation

Vierkantor
Copy link
Collaborator

@Vierkantor Vierkantor commented Feb 11, 2021

This PR proves the first half of the structure theorem for modules over a PID: if R is a principal ideal domain and M an R-module which is free and finitely generated (expressed by is_basis R (b : ι → M), for a [fintype ι]), then all submodules of M are also free and finitely generated.

This result requires some lemmas about the rank of (free) modules (which in that case is basically the same as fintype.card ι). If M were a vector space, this could just be expressed as findim R M, but it isn't necessarily, so it can't be.


@Vierkantor Vierkantor added the awaiting-review The author would like community review of the PR label Feb 11, 2021
Comment on lines +12 to +13
A free `R`-module `M` is a module with a basis over `R`,
equivalently it is an `R`-module linearly equivalent to `ι →₀ R` for some `ι`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding abbreviation free_module := ι →₀ R to this file, just so that people using doc search find it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this file actually proves anything for ι →₀ R itself, only indirectly via is_basis. (Spoiler alert: I'm even experimenting with redefining a basis to be the linear equivalence with ι →₀ R.)

Vierkantor added a commit that referenced this pull request Feb 12, 2021
Moves the theorem on division rings `smul_eq_zero` to a typeclass
`no_zero_smul_divisors` with instances for the previously existing cases.
The motivation for this change is that #6178 added another `smul_eq_zero`,
which could be captured neatly as an instance of the typeclass.

I didn't spend a lot of time yet on figuring out all the necessary instances,
first let's see whether this compiles.
@github-actions github-actions bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Feb 12, 2021
bors bot pushed a commit that referenced this pull request Feb 22, 2021
Moves the theorem on division rings `smul_eq_zero` to a typeclass `no_zero_smul_divisors` with instances for the previously existing cases. The motivation for this change is that #6178 added another `smul_eq_zero`, which could be captured neatly as an instance of the typeclass.

I didn't spend a lot of time yet on figuring out all the necessary instances, first let's see whether this compiles.




Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
bors bot pushed a commit that referenced this pull request Feb 22, 2021
Moves the theorem on division rings `smul_eq_zero` to a typeclass `no_zero_smul_divisors` with instances for the previously existing cases. The motivation for this change is that #6178 added another `smul_eq_zero`, which could be captured neatly as an instance of the typeclass.

I didn't spend a lot of time yet on figuring out all the necessary instances, first let's see whether this compiles.




Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@github-actions github-actions bot added merge-conflict Please `git merge origin/master` then a bot will remove this label. and removed blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. labels Feb 22, 2021
@github-actions
Copy link

🎉 Great news! Looks like all the dependencies have been resolved:

💡 To add or remove a dependency please update this issue/PR description.

Brought to you by Dependent Issues (:robot: ). Happy coding!

@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Mar 1, 2021
src/linear_algebra/linear_independent.lean Show resolved Hide resolved
open submodule.is_principal

lemma eq_bot_of_rank_eq_zero [no_zero_divisors R] (hb : is_basis R b) (N : submodule R M)
(rank_eq : ∀ {m : ℕ} (v : fin m → N),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to have a similar lemma for fintypes instead of only fin m?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit awkward because the condition would look like

  (rank_eq : ∀ {ι : Type*} {ft : fintype ι} (v : ι → N),
    linear_independent R (coe ∘ v : ι → M) → @fintype.card ι ft = 0) :

and the counterexample becomes fintype.card (ulift (fin 1)) ≠ 0 instead of just 1 ≠ 0. I'll add a version for finset Ns, let me know if you still want a fintype version.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Also, using fin works well with the condition of submodule.induction_on_rank_aux. I recall trying to state that with finsets instead and it became a mess of coes, erases and inserts.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bah, I can't figure out how to turn sum_eq : ∑ (i : ↥↑{⟨x, hx⟩}), g i • ↑i = 0, into g ⟨⟨x, hx⟩, _⟩ = 0 and it's almost dinner time. Let me know if you still want a different variant, I'll take a fresh look at it tomorrow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh well, we can always add it later. It's probably useful to have both variants.

src/linear_algebra/free_module.lean Outdated Show resolved Hide resolved
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🎉

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Mar 8, 2021
bors bot pushed a commit that referenced this pull request Mar 8, 2021
This PR proves the first half of the structure theorem for modules over a PID: if `R` is a principal ideal domain and `M` an `R`-module which is free and finitely generated (expressed by `is_basis R (b : ι → M)`, for a `[fintype ι]`), then all submodules of `M` are also free and finitely generated.

This result requires some lemmas about the rank of (free) modules (which in that case is basically the same as `fintype.card ι`). If `M` were a vector space, this could just be expressed as `findim R M`, but it isn't necessarily, so it can't be.
@bors
Copy link

bors bot commented Mar 8, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(linear_algebra): submodules of f.g. free modules are free [Merged by Bors] - feat(linear_algebra): submodules of f.g. free modules are free Mar 8, 2021
@bors bors bot closed this Mar 8, 2021
@bors bors bot deleted the free-module branch March 8, 2021 22:36
ocfnash pushed a commit that referenced this pull request Mar 12, 2021
This PR proves the first half of the structure theorem for modules over a PID: if `R` is a principal ideal domain and `M` an `R`-module which is free and finitely generated (expressed by `is_basis R (b : ι → M)`, for a `[fintype ι]`), then all submodules of `M` are also free and finitely generated.

This result requires some lemmas about the rank of (free) modules (which in that case is basically the same as `fintype.card ι`). If `M` were a vector space, this could just be expressed as `findim R M`, but it isn't necessarily, so it can't be.
b-mehta pushed a commit that referenced this pull request Apr 2, 2021
Moves the theorem on division rings `smul_eq_zero` to a typeclass `no_zero_smul_divisors` with instances for the previously existing cases. The motivation for this change is that #6178 added another `smul_eq_zero`, which could be captured neatly as an instance of the typeclass.

I didn't spend a lot of time yet on figuring out all the necessary instances, first let's see whether this compiles.




Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
b-mehta pushed a commit that referenced this pull request Apr 2, 2021
This PR proves the first half of the structure theorem for modules over a PID: if `R` is a principal ideal domain and `M` an `R`-module which is free and finitely generated (expressed by `is_basis R (b : ι → M)`, for a `[fintype ι]`), then all submodules of `M` are also free and finitely generated.

This result requires some lemmas about the rank of (free) modules (which in that case is basically the same as `fintype.card ι`). If `M` were a vector space, this could just be expressed as `findim R M`, but it isn't necessarily, so it can't be.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants