Skip to content

[Merged by Bors] - feat(RingTheory/Derivation): define Differential and DifferentialAlgebra typeclasses - #14699

Closed
Command-Master wants to merge 19 commits into
masterfrom
CommandMaster_diffring
Closed

Command-Master wants to merge 19 commits into
masterfrom
CommandMaster_diffring

Conversation

@Command-Master

@Command-Master Command-Master commented Jul 13, 2024 •

Copy link
Copy Markdown
Collaborator

Define a typeclass Differential of CommRings with a chosen Derivation, a notation for that derivation, and a DifferentialAlgebra for Algerbas on differential rings whose algebraMap commutes with the derivation.


Open in Gitpod

@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Jul 13, 2024
@Command-Master Command-Master added the t-algebra Algebra (groups, rings, fields, etc) label Jul 13, 2024
@github-actions

github-actions Bot commented Jul 13, 2024 •

Copy link
Copy Markdown

PR summary 487dac828a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.RingTheory.Derivation.DifferentialRing 965

Declarations diff

+ Differential
+ Differential.ContainConstants
+ Differential.equiv
+ DifferentialAlgebra
+ DifferentialAlgebra.equiv
+ algebraMap.coe_deriv
+ delabDeriv
+ instance (A : Type*) [CommRing A] [Differential A] : Differential.ContainConstants A A
+ instance (A : Type*) [CommRing A] [Differential A] : DifferentialAlgebra A A
+ mem_range_of_deriv_eq_zero

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>
The doc-module for `script/declarations_diff.sh` contains some details about this script.

@Command-Master

Copy link
Copy Markdown
Collaborator Author

Is there a problem with the instance I add?

@erdOne

erdOne commented Jul 14, 2024

Copy link
Copy Markdown
Member

Do you plan to add more results about this? Please move it into a new file in that case.

@Command-Master

Copy link
Copy Markdown
Collaborator Author

Do you plan to add more results about this? Please move it into a new file in that case.

A few more, proving that AlgHoms commute with the derivative in some cases. What's a good name for this file?

@erdOne

erdOne commented Jul 14, 2024

Copy link
Copy Markdown
Member

RingTheory/Derivation/DifferentialRing or RingTheory/DifferentialRing both makes sense IMO.

@Command-Master Command-Master changed the title feat(RingTheory/Derivation/Basic): define bundled CommDifferentialRing and DifferentialAlgebra feat(RingTheory/Derivation): define bundled CommDifferentialRing and DifferentialAlgebra Jul 14, 2024
/--
A `CommRing` with a bundled `Derivation` to itself.
-/
class CommDifferentialRing (R : Type*) extends CommRing R where

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.

Are there any non-commutative CommDifferentialRings?

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'm not aware of any, the existing definition of Derivation requires commutativity, and Wikipedia defines it with commutativity, but I don't know differential algebra well enough to tell for sure.

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.

Would you ever want to consider multiple differential-ring structures on the same ring (maybe multiple partial derivatives)? If so, I would suggest class DifferentialRing (R : Type*) [CommRing R] where instead.

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.

You could have multiple (d1 d2 : DifferentialRing R) lying around, like how mathlib deals with multiple topologies on a type. Also you wouldn't be able to declare differential fields with this bundled approach.

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 would (and do, in #14860), they just extend both CommDifferentialRing and Field

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 tried to change it, what do you think? It's nicer in some ways, but it also requires writing more typeclass assumptions

@Command-Master
Command-Master requested a review from erdOne July 16, 2024 09:20
/--
A `CommRing` with a bundled `Derivation` to itself.
-/
class CommDifferentialRing (R : Type*) extends CommRing R where

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.

Would you ever want to consider multiple differential-ring structures on the same ring (maybe multiple partial derivatives)? If so, I would suggest class DifferentialRing (R : Type*) [CommRing R] where instead.

@Command-Master

Copy link
Copy Markdown
Collaborator Author

How would class DifferentialRing (R : Type*) [CommRing R] where help for having multiple derivatives?

@Command-Master
Command-Master requested a review from erdOne July 23, 2024 03:15
@Command-Master Command-Master changed the title feat(RingTheory/Derivation): define bundled CommDifferentialRing and DifferentialAlgebra feat(RingTheory/Derivation): define Differential and DifferentialAlgebra typeclasses Jul 26, 2024

@jcommelin jcommelin left a comment

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.

My apologies for the delay in reviewing. Holiday season etc...

I think this looks good now.

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Aug 23, 2024
mathlib-bors Bot pushed a commit that referenced this pull request Aug 23, 2024
…lgebra` typeclasses (#14699)

Define a typeclass `Differential` of `CommRing`s with a chosen `Derivation`, a notation for that derivation, and a `DifferentialAlgebra` for `Algerba`s on differential rings whose `algebraMap` commutes with the derivation.



Co-authored-by: Daniel Weber <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(RingTheory/Derivation): define Differential and DifferentialAlgebra typeclasses [Merged by Bors] - feat(RingTheory/Derivation): define Differential and DifferentialAlgebra typeclasses Aug 23, 2024
@mathlib-bors mathlib-bors Bot closed this Aug 23, 2024
@mathlib-bors
mathlib-bors Bot deleted the CommandMaster_diffring branch August 23, 2024 04:06
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
…lgebra` typeclasses (#14699)

Define a typeclass `Differential` of `CommRing`s with a chosen `Derivation`, a notation for that derivation, and a `DifferentialAlgebra` for `Algerba`s on differential rings whose `algebraMap` commutes with the derivation.



Co-authored-by: Daniel Weber <[email protected]>
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
…lgebra` typeclasses (#14699)

Define a typeclass `Differential` of `CommRing`s with a chosen `Derivation`, a notation for that derivation, and a `DifferentialAlgebra` for `Algerba`s on differential rings whose `algebraMap` commutes with the derivation.



Co-authored-by: Daniel Weber <[email protected]>
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 12, 2024
…lgebra` typeclasses (#14699)

Define a typeclass `Differential` of `CommRing`s with a chosen `Derivation`, a notation for that derivation, and a `DifferentialAlgebra` for `Algerba`s on differential rings whose `algebraMap` commutes with the derivation.



Co-authored-by: Daniel Weber <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants