Skip to content

[Merged by Bors] - feat(GroupTheory/Perm/DomMulAct) : Subgroup of Equiv.Perm α preserving a function p : α → ι#9342

Closed
AntoineChambert-Loir wants to merge 16 commits intomasterfrom
ACL/ArrowAction
Closed

[Merged by Bors] - feat(GroupTheory/Perm/DomMulAct) : Subgroup of Equiv.Perm α preserving a function p : α → ι#9342
AntoineChambert-Loir wants to merge 16 commits intomasterfrom
ACL/ArrowAction

Conversation

@AntoineChambert-Loir
Copy link
Copy Markdown
Collaborator

@AntoineChambert-Loir AntoineChambert-Loir commented Dec 29, 2023

Subgroup of Equiv.Perm α preserving a function

Let α and ι by types and let p : α → ι

  • DomMulAct.mem_stabilizer_iff proves that the stabilizer of p : α → ι
    in (Equiv.Perm α)ᵈᵐᵃ is the set of g : (Equiv.Perm α)ᵈᵐᵃ such that p ∘ (mk.symm g) = p.

    The natural equivalence from stabilizer (Perm α)ᵈᵐᵃ p to { g : Perm α // p ∘ g = p }
    can be obtained as subtypeEquiv mk.symm (fun _ => mem_stabilizer_iff)

  • DomMulAct.stabilizerMulEquiv is the MulEquiv from
    the MulOpposite of this stabilizer to the product,
    for i : ι, of Equiv.Perm {a // p a = i}.

  • Under Fintype α and Fintype ι, DomMulAct.stabilizer_card p computes
    the cardinality of the type of permutations preserving p :
    Fintype.card {f : Perm α // p ∘ f = p} = ∏ i , (Fintype.card ({a // p a = i})).factorial

Co-Authored by : Junyan Xu junyanxu.math@gmail.com


This was written by Junyan Xu after a request on Zulip, https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/permutations.20preserving.20a.20function/near/391930331

It appeared again in
https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Cardinality.20of.20permutation/near/410241414

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@AntoineChambert-Loir
Copy link
Copy Markdown
Collaborator Author

With notation, it is more readable.
The file should be renamed DomMulAct ?

@AntoineChambert-Loir
Copy link
Copy Markdown
Collaborator Author

In the finite case, I added the proof that the cardinality is the product of the factorials.
This is quite short and shows that passing to DomMulAct is not too annoying.

Comment on lines +96 to +98
theorem stabilizer_card:
Nat.card {f : Perm α // p ∘ f = p} =
Finset.univ.prod fun i => (Nat.card {a // p a = i}).factorial := by
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think Fintype.card is more appropriate here, since you assumed both α and ι are Fintype, and you have the necessary DecidableEq assumptions. (You could use Finset.card with Finset.filter but that seems uglier.) If you want Nat.card you only need ι to be Fintype, and α just need to be finite.
Also, I think It's better to write the RHS as Π i in ι, ....

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i did that. For the proof, however, I have to resort to Nat.card because Fintype.card_congr does not find a necessary Fintype instance.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Question : maybe the namespace should be Equiv.Perm.DomMulAct rather than DomMulAct

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have to resort to Nat.card because Fintype.card_congr does not find a necessary Fintype instance.

Probably because DomMulAct doesn't inherit the Fintype instance?

Copy link
Copy Markdown
Collaborator Author

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 add that instance?


/-- The cardinality of the type of permutations preserving a function -/
theorem stabilizer_card:
Fintype.card {f : Perm α // p ∘ f = p} =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's a bit confusing here that p is the function and f is the permutation,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

In my mind, p was the projection of a fibration and the permutations are called f all over mathlib.
I'll make the change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It might be worth waiting for a second opinion; an alterative would be to change the docstring to use the word fibration somehow

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have done it already, that was quick…

@AntoineChambert-Loir
Copy link
Copy Markdown
Collaborator Author

I have been able (I use it elsewhere) to remove the finiteness assumption for the target in the formula for the cardinality.
I can PR it here or do it later when it will be useful…

@alreadydone
Copy link
Copy Markdown
Contributor

remove the finiteness assumption for the target in the formula for the cardinality.

How do you state that? There's tsum but tprod isn't in mathlib yet? Or you just restrict to the finite subset where the fiber is nonempty?

@AntoineChambert-Loir
Copy link
Copy Markdown
Collaborator Author

Yes, I restrict the product to Finset.image f. The proof can be seen in PR #9359, same file

@AntoineChambert-Loir AntoineChambert-Loir changed the title feat(GroupTheory/Perm/ArrowAction) : Subgroup of Equiv.Perm α preserving a function p : α → ι feat(GroupTheory/Perm/DomMulAct) : Subgroup of Equiv.Perm α preserving a function p : α → ι Jan 2, 2024
Copy link
Copy Markdown
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

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jan 6, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jan 6, 2024
…ing a function `p : α → ι` (#9342)

Subgroup of `Equiv.Perm α` preserving a function

Let `α` and `ι` by types and let `p : α → ι`

* `DomMulAct.mem_stabilizer_iff` proves that the stabilizer of `p : α → ι`
  in `(Equiv.Perm α)ᵈᵐᵃ` is the set of `g : (Equiv.Perm α)ᵈᵐᵃ` such that `p ∘ (mk.symm g) = p`.

  The natural equivalence from `stabilizer (Perm α)ᵈᵐᵃ p` to `{ g : Perm α // p ∘ g = p }`
  can be obtained as `subtypeEquiv mk.symm (fun _ => mem_stabilizer_iff)`

* `DomMulAct.stabilizerMulEquiv` is the `MulEquiv` from
  the MulOpposite of this stabilizer to the product,
  for `i : ι`, of `Equiv.Perm {a // p a = i}`.

* Under `Fintype α` and `Fintype ι`, `DomMulAct.stabilizer_card p` computes
  the cardinality of the type of permutations preserving `p` :
  `Fintype.card {f : Perm α // p ∘ f = p} =
      ∏ i , (Fintype.card ({a // p a = i})).factorial`

Co-Authored by : Junyan Xu <junyanxu.math@gmail.com>



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 6, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(GroupTheory/Perm/DomMulAct) : Subgroup of Equiv.Perm α preserving a function p : α → ι [Merged by Bors] - feat(GroupTheory/Perm/DomMulAct) : Subgroup of Equiv.Perm α preserving a function p : α → ι Jan 6, 2024
@mathlib-bors mathlib-bors bot closed this Jan 6, 2024
@mathlib-bors mathlib-bors bot deleted the ACL/ArrowAction branch January 6, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants