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] - split power series in several files #10866

Closed
wants to merge 25 commits into from

Conversation

AntoineChambert-Loir
Copy link
Collaborator

@AntoineChambert-Loir AntoineChambert-Loir commented Feb 22, 2024

This PR split the files devoted to power series (especially RingTheory/PowerSeries/Basic) into several ones:

  • RingTheory/MvPowerSeries/Basic - initial definitions (multivariate)

  • RingTheory/MvPowerSeries/Trunc - truncation

  • RingTheory/MvPowerSeries/Inverse - stuff pertaining to inverses

  • RingTheory/PowerSeries/Basic - initial definitions (univariate)

  • RingTheory/PowerSeries/Trunc - truncation

  • RingTheory/PowerSeries/Inverse - stuff pertaining to inverses

  • RingTheory/PowerSeries/Order - stuff pertaining to order

it remains to adjust the other files (PowerSeries/Derivative and PowerSeries/WellKnown)


Open in Gitpod

@AntoineChambert-Loir AntoineChambert-Loir added the WIP Work in progress label Feb 22, 2024
@AntoineChambert-Loir AntoineChambert-Loir added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Feb 23, 2024
@jcommelin jcommelin added the auto-merge-after-CI Please do not add manually. Requests for a bot to merge automatically once CI is done. label Feb 28, 2024
@jcommelin jcommelin added awaiting-CI and removed auto-merge-after-CI Please do not add manually. Requests for a bot to merge automatically once CI is done. labels Feb 28, 2024

end Map

section Algebra
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this interlude about Algebra is here? Shouldn't it be further below, together with the rest of the Algebra section?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. But that section is about general algebras, and the next one is about the commutative case.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, I do not have a strong opinion here although I would slightly prefer the idea of "richer structures" being further down. But ignore this message if you prefer so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In fact, not so much… the second Algebra section is about having polynomials into power series being an algHom. But I moved the algebra section after the commsemiring section, it is more logic.

@faenuccio faenuccio added awaiting-author A reviewer has asked the author a question or requested changes t-algebra Algebra (groups, rings, fields etc) and removed awaiting-review The author would like community review of the PR labels Feb 28, 2024
Co-authored-by: Filippo A. E. Nuccio <filippo.nuccio@univ-st-etienne.fr>
Co-authored-by: Filippo A. E. Nuccio <filippo.nuccio@univ-st-etienne.fr>
Co-authored-by: Filippo A. E. Nuccio <filippo.nuccio@univ-st-etienne.fr>
Co-authored-by: Filippo A. E. Nuccio <filippo.nuccio@univ-st-etienne.fr>
Comment on lines 6 to 7
theorem smul_inv (r : k) (φ : MvPowerSeries σ k) : (r • φ)⁻¹ = r⁻¹ • φ⁻¹ := by
simp [smul_eq_C_mul, mul_comm]
#align mv_power_series.smul_inv MvPowerSeries.smul_inv

end Field

end MvPowerSeries

namespace MvPolynomial

open Finsupp

variable {σ : Type*} {R : Type*} [CommSemiring R] (φ ψ : MvPolynomial σ R)

-- Porting note: added so we can add the `@[coe]` attribute
/-- The natural inclusion from multivariate polynomials into multivariate formal power series.-/
@[coe]
def toMvPowerSeries : MvPolynomial σ R → MvPowerSeries σ R :=
fun φ n => coeff n φ

/-- The natural inclusion from multivariate polynomials into multivariate formal power series.-/
instance coeToMvPowerSeries : Coe (MvPolynomial σ R) (MvPowerSeries σ R) :=
⟨toMvPowerSeries⟩
#align mv_polynomial.coe_to_mv_power_series MvPolynomial.coeToMvPowerSeries

theorem coe_def : (φ : MvPowerSeries σ R) = fun n => coeff n φ :=
rfl
#align mv_polynomial.coe_def MvPolynomial.coe_def

@[simp, norm_cast]
theorem coeff_coe (n : σ →₀ ℕ) : MvPowerSeries.coeff R n ↑φ = coeff n φ :=
rfl
#align mv_polynomial.coeff_coe MvPolynomial.coeff_coe

@[simp, norm_cast]
theorem coe_monomial (n : σ →₀ ℕ) (a : R) :
(monomial n a : MvPowerSeries σ R) = MvPowerSeries.monomial R n a :=
MvPowerSeries.ext fun m => by
classical
rw [coeff_coe, coeff_monomial, MvPowerSeries.coeff_monomial]
split_ifs with h₁ h₂ <;> first |rfl|subst m; contradiction
#align mv_polynomial.coe_monomial MvPolynomial.coe_monomial

@[simp, norm_cast]
theorem coe_zero : ((0 : MvPolynomial σ R) : MvPowerSeries σ R) = 0 :=
rfl
#align mv_polynomial.coe_zero MvPolynomial.coe_zero

@[simp, norm_cast]
theorem coe_one : ((1 : MvPolynomial σ R) : MvPowerSeries σ R) = 1 :=
coe_monomial _ _
#align mv_polynomial.coe_one MvPolynomial.coe_one

@[simp, norm_cast]
theorem coe_add : ((φ + ψ : MvPolynomial σ R) : MvPowerSeries σ R) = φ + ψ :=
rfl
#align mv_polynomial.coe_add MvPolynomial.coe_add

@[simp, norm_cast]
theorem coe_mul : ((φ * ψ : MvPolynomial σ R) : MvPowerSeries σ R) = φ * ψ :=
MvPowerSeries.ext fun n => by
classical
simp only [coeff_coe, MvPowerSeries.coeff_mul, coeff_mul]
#align mv_polynomial.coe_mul MvPolynomial.coe_mul

@[simp, norm_cast]
theorem coe_C (a : R) : ((C a : MvPolynomial σ R) : MvPowerSeries σ R) = MvPowerSeries.C σ R a :=
coe_monomial _ _
set_option linter.uppercaseLean3 false in
#align mv_polynomial.coe_C MvPolynomial.coe_C

set_option linter.deprecated false in
@[simp, norm_cast]
theorem coe_bit0 :
((bit0 φ : MvPolynomial σ R) : MvPowerSeries σ R) = bit0 (φ : MvPowerSeries σ R) :=
coe_add _ _
#align mv_polynomial.coe_bit0 MvPolynomial.coe_bit0

set_option linter.deprecated false in
@[simp, norm_cast]
theorem coe_bit1 :
((bit1 φ : MvPolynomial σ R) : MvPowerSeries σ R) = bit1 (φ : MvPowerSeries σ R) := by
rw [bit1, bit1, coe_add, coe_one, coe_bit0]
#align mv_polynomial.coe_bit1 MvPolynomial.coe_bit1

@[simp, norm_cast]
theorem coe_X (s : σ) : ((X s : MvPolynomial σ R) : MvPowerSeries σ R) = MvPowerSeries.X s :=
coe_monomial _ _
set_option linter.uppercaseLean3 false in
#align mv_polynomial.coe_X MvPolynomial.coe_X

variable (σ R)

theorem coe_injective : Function.Injective (Coe.coe : MvPolynomial σ R → MvPowerSeries σ R) :=
fun x y h => by
ext
simp_rw [← coeff_coe]
congr
#align mv_polynomial.coe_injective MvPolynomial.coe_injective
import Mathlib.RingTheory.MvPowerSeries.Basic
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What do you mean?

@faenuccio
Copy link
Collaborator

Thanks, LGTM.

@riccardobrasca
Copy link
Member

This is surely better than the current situation, thanks!

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-author A reviewer has asked the author a question or requested changes labels Feb 29, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 29, 2024
This PR split the files devoted to power series (especially RingTheory/PowerSeries/Basic) into several ones:

* RingTheory/MvPowerSeries/Basic - initial definitions (multivariate)
* RingTheory/MvPowerSeries/Trunc - truncation
* RingTheory/MvPowerSeries/Inverse - stuff pertaining to inverses

* RingTheory/PowerSeries/Basic - initial definitions (univariate)
* RingTheory/PowerSeries/Trunc - truncation
* RingTheory/PowerSeries/Inverse - stuff pertaining to inverses
* RingTheory/PowerSeries/Order - stuff pertaining to order

it remains to adjust the other files (PowerSeries/Derivative and PowerSeries/WellKnown)



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: faenuccio <filippo.nuccio@univ-st-etienne.fr>
@mathlib-bors
Copy link

mathlib-bors bot commented Feb 29, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title split power series in several files [Merged by Bors] - split power series in several files Feb 29, 2024
@mathlib-bors mathlib-bors bot closed this Feb 29, 2024
@mathlib-bors mathlib-bors bot deleted the ACL/splitPowerSeries branch February 29, 2024 13:07
riccardobrasca pushed a commit that referenced this pull request Mar 1, 2024
This PR split the files devoted to power series (especially RingTheory/PowerSeries/Basic) into several ones:

* RingTheory/MvPowerSeries/Basic - initial definitions (multivariate)
* RingTheory/MvPowerSeries/Trunc - truncation
* RingTheory/MvPowerSeries/Inverse - stuff pertaining to inverses

* RingTheory/PowerSeries/Basic - initial definitions (univariate)
* RingTheory/PowerSeries/Trunc - truncation
* RingTheory/PowerSeries/Inverse - stuff pertaining to inverses
* RingTheory/PowerSeries/Order - stuff pertaining to order

it remains to adjust the other files (PowerSeries/Derivative and PowerSeries/WellKnown)



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: faenuccio <filippo.nuccio@univ-st-etienne.fr>
kbuzzard pushed a commit that referenced this pull request Mar 12, 2024
This PR split the files devoted to power series (especially RingTheory/PowerSeries/Basic) into several ones:

* RingTheory/MvPowerSeries/Basic - initial definitions (multivariate)
* RingTheory/MvPowerSeries/Trunc - truncation
* RingTheory/MvPowerSeries/Inverse - stuff pertaining to inverses

* RingTheory/PowerSeries/Basic - initial definitions (univariate)
* RingTheory/PowerSeries/Trunc - truncation
* RingTheory/PowerSeries/Inverse - stuff pertaining to inverses
* RingTheory/PowerSeries/Order - stuff pertaining to order

it remains to adjust the other files (PowerSeries/Derivative and PowerSeries/WellKnown)



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: faenuccio <filippo.nuccio@univ-st-etienne.fr>
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
This PR split the files devoted to power series (especially RingTheory/PowerSeries/Basic) into several ones:

* RingTheory/MvPowerSeries/Basic - initial definitions (multivariate)
* RingTheory/MvPowerSeries/Trunc - truncation
* RingTheory/MvPowerSeries/Inverse - stuff pertaining to inverses

* RingTheory/PowerSeries/Basic - initial definitions (univariate)
* RingTheory/PowerSeries/Trunc - truncation
* RingTheory/PowerSeries/Inverse - stuff pertaining to inverses
* RingTheory/PowerSeries/Order - stuff pertaining to order

it remains to adjust the other files (PowerSeries/Derivative and PowerSeries/WellKnown)



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: faenuccio <filippo.nuccio@univ-st-etienne.fr>
utensil pushed a commit that referenced this pull request Mar 26, 2024
This PR split the files devoted to power series (especially RingTheory/PowerSeries/Basic) into several ones:

* RingTheory/MvPowerSeries/Basic - initial definitions (multivariate)
* RingTheory/MvPowerSeries/Trunc - truncation
* RingTheory/MvPowerSeries/Inverse - stuff pertaining to inverses

* RingTheory/PowerSeries/Basic - initial definitions (univariate)
* RingTheory/PowerSeries/Trunc - truncation
* RingTheory/PowerSeries/Inverse - stuff pertaining to inverses
* RingTheory/PowerSeries/Order - stuff pertaining to order

it remains to adjust the other files (PowerSeries/Derivative and PowerSeries/WellKnown)



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: faenuccio <filippo.nuccio@univ-st-etienne.fr>
Louddy pushed a commit that referenced this pull request Apr 15, 2024
This PR split the files devoted to power series (especially RingTheory/PowerSeries/Basic) into several ones:

* RingTheory/MvPowerSeries/Basic - initial definitions (multivariate)
* RingTheory/MvPowerSeries/Trunc - truncation
* RingTheory/MvPowerSeries/Inverse - stuff pertaining to inverses

* RingTheory/PowerSeries/Basic - initial definitions (univariate)
* RingTheory/PowerSeries/Trunc - truncation
* RingTheory/PowerSeries/Inverse - stuff pertaining to inverses
* RingTheory/PowerSeries/Order - stuff pertaining to order

it remains to adjust the other files (PowerSeries/Derivative and PowerSeries/WellKnown)



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: faenuccio <filippo.nuccio@univ-st-etienne.fr>
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. t-algebra Algebra (groups, rings, fields etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants