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] - refactor(group_theory/perm/cycle/basic): Consolidate API #17898

Closed
wants to merge 11 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Dec 11, 2022

Reorganise and complete the cycle API:

  • Previously, is_cycle was spelling out the definition of same_cycle. Now use it explicitly.
  • Change binder to semi-implicit in the definition of is_cycle.
  • Add lemmas and iff aliases.
  • Golf existing proofs using those (mostly invisible from the diff because git decided I am moving the is_cycle API)
  • Improve lemma names, mostly for better dot notation.

New lemmas

  • maps_to.extend_domain
  • surj_on.extend_domain
  • bij_on.extend_domain
  • extend_domain_pow
  • extend_domain_zpow
  • same_cycle.rfl
  • eq.same_cycle
  • same_cycle.conj
  • same_cycle_conj
  • same_cycle_pow_right_iff
  • same_cycle_zpow_right_iff
  • same_cycle.pow_left
  • same_cycle.pow_right
  • same_cycle.zpow_left
  • same_cycle.zpow_left
  • same_cycle.of_pow
  • same_cycle.of_zpow
  • same_cycle_subtype_perm
  • same_cycle.subtype_perm
  • same_cycle_extend_domain
  • is_cycle.conj
  • is_cycle.pow_eq_one_iff'
  • is_cycle.pow_eq_one_iff''

Renames

  • order_of_is_cycleis_cycle.order_of
  • is_cycle.is_cycle_conjis_cycle.conj
  • is_cycle_of_is_cycle_powis_cycle.of_pow
  • is_cycle_of_is_cycle_zpowis_cycle.of_zpow
  • same_cycle_cycleis_cycle_iff_same_cycle
  • mem_support_pos_pow_iff_of_lt_order_ofsupport_pow_of_pos_of_lt_order_of and change the statement to talk about unextensionalised finset equality

Open in Gitpod

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR t-algebra Algebra (groups, rings, fields etc) labels Dec 11, 2022
bors bot pushed a commit that referenced this pull request Dec 13, 2022
Move the `same_cycle` lemmas before the `is_cycle` ones in order to reduce the diff in #17898.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@Vierkantor Vierkantor self-assigned this Jan 4, 2023
Copy link
Collaborator

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

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

Nice cleanups, thanks!

bors d+

src/group_theory/perm/cycle/basic.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Jan 4, 2023

✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Jan 4, 2023
@YaelDillies
Copy link
Collaborator Author

The bors queue is currently empty, so I will just try going ahead.

bors merge

bors bot pushed a commit that referenced this pull request Jan 4, 2023
Reorganise and complete the cycle API:
* Previously, `is_cycle` was spelling out the definition of `same_cycle`. Now use it explicitly.
* Change binder to semi-implicit in the definition of `is_cycle`.
* Add lemmas and iff aliases.
* Golf existing proofs using those (mostly invisible from the diff because git decided I am moving the `is_cycle` API)
* Improve lemma names, mostly for better dot notation.

## New lemmas
* `maps_to.extend_domain`
* `surj_on.extend_domain`
* `bij_on.extend_domain`
* `extend_domain_pow`
* `extend_domain_zpow`
* `same_cycle.rfl`
* `eq.same_cycle`
* `same_cycle.conj`
* `same_cycle_conj`
* `same_cycle_pow_right_iff`
* `same_cycle_zpow_right_iff`
* `same_cycle.pow_left`
* `same_cycle.pow_right`
* `same_cycle.zpow_left`
* `same_cycle.zpow_left`
* `same_cycle.of_pow`
* `same_cycle.of_zpow`
* `same_cycle_subtype_perm`
* `same_cycle.subtype_perm`
* `same_cycle_extend_domain`
* `is_cycle.conj`
* `is_cycle.pow_eq_one_iff'`
* `is_cycle.pow_eq_one_iff''`


## Renames
* `order_of_is_cycle` → `is_cycle.order_of`
* `is_cycle.is_cycle_conj` → `is_cycle.conj`
* `is_cycle_of_is_cycle_pow` → `is_cycle.of_pow`
* `is_cycle_of_is_cycle_zpow` → `is_cycle.of_zpow`
* `same_cycle_cycle` → `is_cycle_iff_same_cycle`
* `mem_support_pos_pow_iff_of_lt_order_of` → `support_pow_of_pos_of_lt_order_of` and change the statement to talk about unextensionalised finset equality
@bors
Copy link

bors bot commented Jan 5, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(group_theory/perm/cycle/basic): Consolidate API [Merged by Bors] - refactor(group_theory/perm/cycle/basic): Consolidate API Jan 5, 2023
@bors bors bot closed this Jan 5, 2023
@bors bors bot deleted the is_cycle_same_cycle branch January 5, 2023 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. t-algebra Algebra (groups, rings, fields etc)
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants