Skip to content

[Merged by Bors] - feat: port Algebra.Quotient#643

Closed
siddhartha-gadgil wants to merge 11 commits intoleanprover-community:masterfrom
siddhartha-gadgil:algebra-quotient
Closed

[Merged by Bors] - feat: port Algebra.Quotient#643
siddhartha-gadgil wants to merge 11 commits intoleanprover-community:masterfrom
siddhartha-gadgil:algebra-quotient

Conversation

@siddhartha-gadgil
Copy link
Copy Markdown
Collaborator

@siddhartha-gadgil siddhartha-gadgil commented Nov 18, 2022

Had to do very little. Please let me know if there is something I missed.

Starting mathlib commit: c3019c79074b0619edb4b27553a91b2e82242395

@siddhartha-gadgil siddhartha-gadgil requested review from riccardobrasca and removed request for riccardobrasca November 18, 2022 12:31
@siddhartha-gadgil siddhartha-gadgil added mathlib-port This is a port of a theory file from mathlib. awaiting-review labels Nov 18, 2022

universe u v

/-- `has_quotient A B` is a notation typeclass that allows us to write `A ⧸ b` for `b : B`.
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.

Suggested change
/-- `has_quotient A B` is a notation typeclass that allows us to write `A ⧸ b` for `b : B`.
/-- `HasQuotient A B` is a notation typeclass that allows us to write `A ⧸ b` for `b : B`.

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.

I think the class itself should be called Quotient according to the naming convention?

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 would, but that name is already taken. There are a few notation typeclasses in core which also have this issue: AndOp and OrOp are the names of the notation typeclasses for bitwise and / or, which have to avoid clashing with the propositions And and Or. So QuotientOp is another option. But HasQuotient seems like the least disruptive option.

Quotient' : B → Type max u v
#align has_quotient HasQuotient

-- Will be provided by e.g. `ideal.quotient.inhabited`
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.

Suggested change
-- Will be provided by e.g. `ideal.quotient.inhabited`
-- Will be provided by e.g. `Ideal.quotient.inhabited`

`A` is a parameter, despite being unused in the definition below, so it appears in the notation.
-/
class HasQuotient (A : outParam <| Type u) (B : Type v) where
Quotient' : B → Type max u v
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.

Suggested change
Quotient' : B → Type max u v
quotient' : B → Type max u v

Comment on lines +56 to +58
def HasQuotient.Quotient (A : outParam <| Type u) {B : Type v} [HasQuotient A B] (b : B) : Type max u v :=
HasQuotient.Quotient' b
#align has_quotient.quotient HasQuotient.Quotient
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.

Suggested change
def HasQuotient.Quotient (A : outParam <| Type u) {B : Type v} [HasQuotient A B] (b : B) : Type max u v :=
HasQuotient.Quotient' b
#align has_quotient.quotient HasQuotient.Quotient
def HasQuotient.quotient (A : outParam <| Type u) {B : Type v} [HasQuotient A B] (b : B) : Type max u v :=
HasQuotient.quotient' b
#align has_quotient.quotient HasQuotient.quotient

#align has_quotient.quotient HasQuotient.Quotient

-- mathport name: «expr ⧸ »
notation:35 G " ⧸ " H:34 => HasQuotient.Quotient G H
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.

Suggested change
notation:35 G "" H:34 => HasQuotient.Quotient G H
notation:35 G "" H:34 => HasQuotient.quotient G H

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Nov 20, 2022

A bunch of casing issues. Please ping if you disagree with / don't understand these suggestions. Otherwise,

bors d+

(and please update the port status wiki after merging).

@bors
Copy link
Copy Markdown

bors bot commented Nov 20, 2022

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

@kim-em kim-em added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed awaiting-review labels Nov 20, 2022
siddhartha-gadgil and others added 4 commits November 20, 2022 20:36
Co-authored-by: Scott Morrison <scott@tqft.net>
Co-authored-by: Scott Morrison <scott@tqft.net>
@siddhartha-gadgil
Copy link
Copy Markdown
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Nov 20, 2022
Had to do very little. Please let me know if there is something I missed.

Starting mathlib commit: c3019c79074b0619edb4b27553a91b2e82242395
@siddhartha-gadgil
Copy link
Copy Markdown
Collaborator Author

v siddhartha-gadgil can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

bors r+

@bors
Copy link
Copy Markdown

bors bot commented Nov 20, 2022

Already running a review

@bors
Copy link
Copy Markdown

bors bot commented Nov 20, 2022

Build failed:

@siddhartha-gadgil
Copy link
Copy Markdown
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Nov 20, 2022
Had to do very little. Please let me know if there is something I missed.

Starting mathlib commit: c3019c79074b0619edb4b27553a91b2e82242395
@bors
Copy link
Copy Markdown

bors bot commented Nov 20, 2022

Build failed:

  • Build

@siddhartha-gadgil
Copy link
Copy Markdown
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Nov 20, 2022
Had to do very little. Please let me know if there is something I missed.

Starting mathlib commit: c3019c79074b0619edb4b27553a91b2e82242395
@bors
Copy link
Copy Markdown

bors bot commented Nov 20, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: port Algebra.Quotient [Merged by Bors] - feat: port Algebra.Quotient Nov 20, 2022
@bors bors bot closed this Nov 20, 2022
@siddhartha-gadgil siddhartha-gadgil deleted the algebra-quotient branch November 20, 2022 16:30
bors bot pushed a commit to leanprover-community/mathlib3 that referenced this pull request Nov 23, 2022
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status).
Relates to the following PRs:
* `algebra.char_zero.defs`: leanprover-community/mathlib4#661
* `algebra.group.order_synonym`: leanprover-community/mathlib4#651
* `algebra.hierarchy_design`: leanprover-community/mathlib4#657
* `algebra.quotient`: leanprover-community/mathlib4#643
* `algebra.ring.defs`: leanprover-community/mathlib4#655
* `algebra.ring.order_synonym`: leanprover-community/mathlib4#671
* `control.equiv_functor`: leanprover-community/mathlib4#649
* `data.dlist.basic`: leanprover-community/mathlib4#616
* `data.int.cast.basic`: leanprover-community/mathlib4#670
* `data.lazy_list`: leanprover-community/mathlib4#686
* `data.list.lex`: leanprover-community/mathlib4#672
* `data.option.n_ary`: leanprover-community/mathlib4#656
* `data.sigma.lex`: leanprover-community/mathlib4#646
* `group_theory.eckmann_hilton`: leanprover-community/mathlib4#626
* `logic.equiv.basic`: leanprover-community/mathlib4#631
* `order.iterate`: leanprover-community/mathlib4#648
bors bot pushed a commit to leanprover-community/mathlib3 that referenced this pull request Nov 24, 2022
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status).
Relates to the following PRs:
* `algebra.char_zero.defs`: leanprover-community/mathlib4#661
* `algebra.group.inj_surj`: leanprover-community/mathlib4#707
* `algebra.group.order_synonym`: leanprover-community/mathlib4#651
* `algebra.group.units`: leanprover-community/mathlib4#549
* `algebra.hierarchy_design`: leanprover-community/mathlib4#657
* `algebra.quotient`: leanprover-community/mathlib4#643
* `algebra.ring.defs`: leanprover-community/mathlib4#655
* `algebra.ring.order_synonym`: leanprover-community/mathlib4#671
* `control.equiv_functor`: leanprover-community/mathlib4#649
* `data.dlist.basic`: leanprover-community/mathlib4#616
* `data.int.cast.basic`: leanprover-community/mathlib4#670
* `data.lazy_list`: leanprover-community/mathlib4#686
* `data.list.lex`: leanprover-community/mathlib4#672
* `data.option.n_ary`: leanprover-community/mathlib4#656
* `data.sigma.lex`: leanprover-community/mathlib4#646
* `data.ulift`: leanprover-community/mathlib4#703
* `group_theory.eckmann_hilton`: leanprover-community/mathlib4#626
* `logic.equiv.basic`: leanprover-community/mathlib4#631
* `order.iterate`: leanprover-community/mathlib4#648
bors bot pushed a commit to leanprover-community/mathlib3 that referenced this pull request Nov 25, 2022
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status).
Relates to the following PRs:
* `algebra.char_zero.defs`: leanprover-community/mathlib4#661
* `algebra.group.inj_surj`: leanprover-community/mathlib4#707
* `algebra.group.order_synonym`: leanprover-community/mathlib4#651
* `algebra.group.units`: leanprover-community/mathlib4#549
* `algebra.hierarchy_design`: leanprover-community/mathlib4#657
* `algebra.opposites`: leanprover-community/mathlib4#644
* `algebra.quotient`: leanprover-community/mathlib4#643
* `algebra.ring.defs`: leanprover-community/mathlib4#655
* `algebra.ring.order_synonym`: leanprover-community/mathlib4#671
* `control.equiv_functor`: leanprover-community/mathlib4#649
* `data.dlist.basic`: leanprover-community/mathlib4#616
* `data.int.cast.basic`: leanprover-community/mathlib4#670
* `data.lazy_list`: leanprover-community/mathlib4#686
* `data.list.lex`: leanprover-community/mathlib4#672
* `data.option.n_ary`: leanprover-community/mathlib4#656
* `data.sigma.lex`: leanprover-community/mathlib4#646
* `data.ulift`: leanprover-community/mathlib4#703
* `group_theory.eckmann_hilton`: leanprover-community/mathlib4#626
* `logic.equiv.basic`: leanprover-community/mathlib4#631
* `order.iterate`: leanprover-community/mathlib4#648
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). mathlib-port This is a port of a theory file from mathlib.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants