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

feat(group_theory/congruence): quotients of monoids by congruence relations #1710

Merged
merged 17 commits into from Nov 20, 2019

Conversation

101damnations
Copy link
Collaborator

This is the second half of congruence.lean. Not sure to_submonoid should be a coercion if it's not really to be used. I'll see if I can word the docstrings better when I get the chance. map_gen should be called map but there's a different more important map :(

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • reviewed and applied the documentation requirements
  • for tactics:
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

If this PR is related to a discussion on Zulip, please include a link in the discussion.

For reviewers: code review check list

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.

This looks very thorough to me. Well done!

defined by '`x ≈ y` iff the elements of `f⁻¹(x)` are related to the elements of `f⁻¹(y)`
by `c`.' -/
@[to_additive "Given an addition-preserving function `f` whose kernel is contained in an additive congruence relation `c`, the smallest additive congruence relation containing the binary relation on `f`'s image defined by '`x ≈ y` iff the elements of `f⁻¹(x)` are related to the elements of `f⁻¹(y)` by `c`.'"]
def map_gen (f : M → N) (H : ∀ x y, f (x * y) = f x * f y) (h : mul_ker f H ≤ c) : con N :=
Copy link
Member

Choose a reason for hiding this comment

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

You never use h or H here.

Is there some mad result here, like if I quotient N by this relation, then f \comp quotient.mk is multiplicative even if f isn't?

Copy link
Member

Choose a reason for hiding this comment

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

Just thought about it and there isn't any result like that.

the quotient induces a congruence relation on `f`'s domain defined by '`x ≈ y` iff `f(x)` is
related to `f(y)` by `d`.' -/
@[to_additive "Given an additive congruence relation `c` on a type `M` with an addition and an addition-preserving map `f` to the quotient of `M` by `c`, an additive congruence relation `d` on the quotient induces an additive congruence relation on `f`'s domain defined by '`x ≈ y` iff `f(x)` is related to `f(y)` by `d`.'"]
def comap (f : N → c.quotient) (H : ∀ x y, f (x * y) = f x * f y)
Copy link
Member

Choose a reason for hiding this comment

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

There's no need for the image of f to be a quotient of N here I don't think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you, damn, I see I didn't properly address this in setoid.lean when you mentioned it either.

/-- Restriction of a congruence relation on a monoid to a submonoid. -/
@[to_additive "Restriction of a congruence relation on an `add_monoid` to an `add_submonoid`."]
def subtype (A : submonoid M) : con A :=
⟨λ x y, c x y, ⟨λ x, c.refl x, λ _ _, c.symm, λ _ _ _, c.trans⟩,
Copy link
Member

Choose a reason for hiding this comment

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

This could just be comap

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've generalised the 'second isomorphism theorem for monoids' a bit based on this and added a 'second isomorphism theorem for sets' but I'm not really sure there's much point to their existences.

@ChrisHughes24 ChrisHughes24 added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Nov 20, 2019
@mergify mergify bot merged commit 9d031be into master Nov 20, 2019
@mergify mergify bot deleted the congruence branch November 20, 2019 20:04
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
…ations (leanprover-community#1710)

* add congruence.lean

* add has_mul

* add definition of congruence relation

* minor changes

* Tidy up second half of congruence.lean

* tidying docstrings

* tidying

* constructive 3rd isom in setoid used in congruence

* remove import

* open namespaces earlier

* responding to PR comments
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 16, 2020
…ations (leanprover-community#1710)

* add congruence.lean

* add has_mul

* add definition of congruence relation

* minor changes

* Tidy up second half of congruence.lean

* tidying docstrings

* tidying

* constructive 3rd isom in setoid used in congruence

* remove import

* open namespaces earlier

* responding to PR comments
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

3 participants