Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(order/complete_lattice): independence of an indexed family #7199

Closed
wants to merge 14 commits into from

Conversation

kbuzzard
Copy link
Member

@kbuzzard kbuzzard commented Apr 15, 2021

This PR reclaims the concept of independent for elements of a complete lattice.
Right now it's defined on subsets -- a subset of a complete lattice L is independent if every
element of it is disjoint from (i.e. bot is the meet of it with) the Sup of all the other elements.
The problem with this is that if you have an indexed family f:I->L of elements of L then
duplications get lost if you ask for the image of f to be independent (rather like the issue
with a basis of a vector space being a subset rather than an indexed family). This is
an issue when defining gradings on rings, for example: if M is a monoid and R is
a ring, then I don't want the map which sends every m to (top : subgroup R) to
be independent.

I have renamed the set-theoretic version of independent to set_independent


Open in Gitpod

A previously suggested name was sindependent (cf Union and sUnion) but am certainly open to other ideas!

@kbuzzard kbuzzard added the awaiting-review The author would like community review of the PR label Apr 15, 2021
@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Apr 15, 2021
kbuzzard and others added 5 commits April 18, 2021 21:16
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@kbuzzard kbuzzard added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Apr 18, 2021
kbuzzard and others added 2 commits April 18, 2021 21:48
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Looks good to me now, although I'll let someone else confirm the names are sufficiently bike-shedded.

I managed to prove the following, with the goal of trying to match the API that's there for set_independent, but the proof is ugly and I'm not convinced its useful anyway:

/-- If the elements of a set are independent, then any element is disjoint from the `supr` of some
subset of the rest. -/
lemma independent.disjoint_supr {ι : Type*} {α : Type*} [complete_lattice α]
  {s : ι → α} (hs : independent s) {x : ι} {y : set ι} (hx : x ∉ y) :
  disjoint (s x) (⨆ i ∈ y, s i) :=
begin
  classical,
  have ite_i : independent (λ i, if i ∈ y ∨ i = x then s i else ⊥) := (hs.mono _),
  convert ite_i x using 1,
  { simp, },
  { congr' 1,
    ext i,
    by_cases hiy : i ∈ y,
    { have : i ≠ x := ne_of_mem_of_not_mem hiy hx,
      simp [hiy, this], },
    by_cases hix : i = x,
    { simp [hix, hx], },
    simp [hix, hiy], },
  { intro i,
    dsimp only,
    split_ifs,
    refl,
    simp, }
end

@eric-wieser
Copy link
Member

eric-wieser commented Apr 18, 2021

Although this lemma is probably useful:

/-- Composing an indepedent indexed family with an injective function on the index results in
another indepedendent indexed family. -/
lemma independent.comp {ι ι' : Sort*} {α : Type*} [complete_lattice α]
  {s : ι → α} (hs : independent s) (f : ι' → ι) (hf : function.injective f) :
  independent (s ∘ f) :=
λ i, (hs (f i)).mono_right begin
  refine (supr_le_supr $ λ i, _).trans (supr_comp_le _ f),
  exact supr_le_supr_const hf.ne,
end

@kbuzzard kbuzzard added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Apr 19, 2021
@kbuzzard
Copy link
Member Author

OK I managed to tame independent.disjoint_supr. I also remaned it -- apparently bsupr is a thing?

@kbuzzard kbuzzard removed the awaiting-author A reviewer has asked the author a question or requested changes label Apr 19, 2021
@kbuzzard kbuzzard added the awaiting-review The author would like community review of the PR label Apr 19, 2021
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@robertylewis
Copy link
Member

Looks good to me!

bors merge

bors bot pushed a commit that referenced this pull request Apr 21, 2021
This PR reclaims the concept of `independent` for elements of a complete lattice. 
Right now it's defined on subsets -- a subset of a complete lattice L is independent if every
element of it is disjoint from (i.e. bot is the meet of it with) the Sup of all the other elements. 
The problem with this is that if you have an indexed family f:I->L of elements of L then
duplications get lost if you ask for the image of f to be independent (rather like the issue
with a basis of a vector space being a subset rather than an indexed family). This is
an issue when defining gradings on rings, for example: if M is a monoid and R is
a ring, then I don't want the map which sends every m to (top : subgroup R) to
be independent. 

I have renamed the set-theoretic version of `independent` to `set_independent`
@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 Apr 21, 2021
@bors
Copy link

bors bot commented Apr 22, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(order/complete_lattice): independence of an indexed family [Merged by Bors] - feat(order/complete_lattice): independence of an indexed family Apr 22, 2021
@bors bors bot closed this Apr 22, 2021
@bors bors bot deleted the independent2 branch April 22, 2021 01:02
bors bot pushed a commit that referenced this pull request Mar 21, 2022
…ependent` (#12588)

Putting this here means that in future we can talk about `pairwise_disjoint` at the same time, which was previously defined downstream of `complete_lattice.independent`.
This commit only moves existing declarations and adjusts module docstrings.

The new authorship comes from #5971 and #7199, which predate this file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

None yet

5 participants