Skip to content

[Merged by Bors] - feat: some results on dimension of field adjoin#18515

Closed
acmepjz wants to merge 5 commits intomasterfrom
acmepjz_if_finrank_sup_le
Closed

[Merged by Bors] - feat: some results on dimension of field adjoin#18515
acmepjz wants to merge 5 commits intomasterfrom
acmepjz_if_finrank_sup_le

Conversation

@acmepjz
Copy link
Copy Markdown
Collaborator

@acmepjz acmepjz commented Nov 1, 2024

In Mathlib/FieldTheory/Adjoin.lean:

  • IntermediateField.rank_sup_le_of_isAlgebraic: if A and B are intermediate fields, and at least one them are algebraic, then the rank of A ⊔ B is less than or equal to the product of that of A and B. (Note that this result is also true without algebraic assumption, but the proof becomes very complicated, and which is out of scope of this PR.)
  • IntermediateField.finrank_sup_le: if A and B are intermediate fields, then the Module.finrank of A ⊔ B is less than or equal to the product of that of A and B.

Move the result Subalgebra.[fin]rank_sup_le_of_free from Mathlib/LinearAlgebra/TensorProduct/Subalgebra.lean to a new file Mathlib/RingTheory/Adjoin/Dimension.lean, as their proofs don't use tensor mulMap anymore.


Open in Gitpod

@acmepjz acmepjz added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-algebra Algebra (groups, rings, fields, etc) labels Nov 1, 2024
@acmepjz acmepjz changed the title feat(): some results on fields whose proof requires tensor product feat(LinearAlgebra/TensorProduct/Field): some results on fields whose proof requires tensor product Nov 1, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 1, 2024

PR summary 950659d8d6

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.LinearAlgebra.TensorProduct.Subalgebra 1188 954 -234 (-19.70%)
Mathlib.FieldTheory.Adjoin 1353 1355 +2 (+0.15%)
Mathlib.RingTheory.LinearDisjoint 1617 1619 +2 (+0.12%)
Import changes for all files
Files Import difference
Mathlib.LinearAlgebra.TensorProduct.Subalgebra -234
134 files Mathlib.NumberTheory.NumberField.Discriminant.Defs Mathlib.RingTheory.FractionalIdeal.Norm Mathlib.LinearAlgebra.Matrix.Charpoly.Eigs Mathlib.Analysis.CStarAlgebra.GelfandDuality Mathlib.NumberTheory.Cyclotomic.Rat Mathlib.FieldTheory.IsPerfectClosure Mathlib.RepresentationTheory.GroupCohomology.Hilbert90 Mathlib.FieldTheory.Finite.Trace Mathlib.AlgebraicGeometry.EllipticCurve.J Mathlib.NumberTheory.NumberField.Discriminant.Basic Mathlib.NumberTheory.Cyclotomic.Discriminant Mathlib.NumberTheory.GaussSum Mathlib.Analysis.CStarAlgebra.Spectrum Mathlib.RingTheory.Localization.NormTrace Mathlib.FieldTheory.AbelRuffini Mathlib.NumberTheory.LSeries.DirichletContinuation Mathlib.NumberTheory.NumberField.FractionalIdeal Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure Mathlib.NumberTheory.NumberField.Norm Mathlib.Analysis.Normed.Algebra.Spectrum Mathlib.RingTheory.Trace.Basic Mathlib.NumberTheory.LSeries.ZMod Mathlib.Analysis.CStarAlgebra.Module.Constructions Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Isometric Mathlib.FieldTheory.Normal Mathlib.FieldTheory.Adjoin Mathlib.NumberTheory.NumberField.EquivReindex Mathlib.Algebra.Lie.Derivation.Killing Mathlib.FieldTheory.SeparableClosure Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots Mathlib.FieldTheory.IsAlgClosed.Classification Mathlib.Analysis.Fourier.ZMod Mathlib.NumberTheory.Cyclotomic.Three Mathlib.RingTheory.Unramified.Field Mathlib.FieldTheory.SeparableDegree Mathlib.FieldTheory.Minpoly.MinpolyDiv Mathlib.RingTheory.Nullstellensatz Mathlib.NumberTheory.NumberField.Completion Mathlib.FieldTheory.Galois.GaloisClosure Mathlib.FieldTheory.Fixed Mathlib.RingTheory.IntegralClosure.IntegralRestrict Mathlib.Algebra.Lie.TraceForm Mathlib.FieldTheory.IsSepClosed Mathlib.Algebra.Lie.Killing Mathlib.RingTheory.RootsOfUnity.Lemmas Mathlib.NumberTheory.Cyclotomic.Gal Mathlib.FieldTheory.Extension Mathlib.NumberTheory.NumberField.CanonicalEmbedding.FundamentalCone Mathlib.RingTheory.Etale.Field Mathlib.FieldTheory.AbsoluteGaloisGroup Mathlib.Analysis.InnerProductSpace.JointEigenspace Mathlib.Algebra.Lie.Weights.Basic Mathlib.Algebra.Lie.Weights.RootSystem Mathlib.RepresentationTheory.Invariants Mathlib.FieldTheory.KrullTopology Mathlib.CategoryTheory.Preadditive.Schur Mathlib.FieldTheory.Galois.Profinite Mathlib.NumberTheory.Cyclotomic.Embeddings Mathlib.Analysis.CStarAlgebra.Module.Defs Mathlib.FieldTheory.Finite.GaloisField Mathlib.RepresentationTheory.Character Mathlib.RingTheory.DedekindDomain.IntegralClosure Mathlib.NumberTheory.FLT.Three Mathlib.FieldTheory.Galois.Basic Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody Mathlib.Algebra.Lie.Weights.Chain Mathlib.NumberTheory.NumberField.Units.Basic Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Integral Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Unique Mathlib.NumberTheory.DirichletCharacter.GaussSum Mathlib.FieldTheory.PrimitiveElement Mathlib.NumberTheory.LSeries.QuadraticNonvanishing Mathlib.NumberTheory.Fermat Mathlib.LinearAlgebra.Eigenspace.Triangularizable Mathlib.Analysis.CStarAlgebra.ApproximateUnit Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.ExpLog Mathlib.Tactic.NormNum.LegendreSymbol Mathlib.RingTheory.DedekindDomain.Different Mathlib.RingTheory.Discriminant Mathlib.NumberTheory.ClassNumber.Finite Mathlib.Analysis.Complex.Polynomial.Basic Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol Mathlib.FieldTheory.IsAlgClosed.Basic Mathlib.FieldTheory.Minpoly.IsConjRoot Mathlib.NumberTheory.LegendreSymbol.AddCharacter Mathlib.FieldTheory.Cardinality Mathlib.NumberTheory.Cyclotomic.PID Mathlib.NumberTheory.JacobiSum.Basic Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity Mathlib.FieldTheory.IsAlgClosed.Spectrum Mathlib.Analysis.InnerProductSpace.StarOrder Mathlib.FieldTheory.AlgebraicClosure Mathlib.NumberTheory.NumberField.Basic Mathlib.NumberTheory.NumberField.Units.DirichletTheorem Mathlib.NumberTheory.ClassNumber.FunctionField Mathlib.Analysis.Normed.Algebra.Basic Mathlib.RepresentationTheory.FDRep Mathlib.RingTheory.WittVector.Isocrystal Mathlib.NumberTheory.NumberField.Units.Regulator Mathlib.RingTheory.Trace.Quotient Mathlib.RingTheory.Polynomial.Selmer Mathlib.FieldTheory.NormalClosure Mathlib.NumberTheory.Cyclotomic.Basic Mathlib.Algebra.Lie.Weights.Killing Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Instances Mathlib.FieldTheory.KummerExtension Mathlib.RepresentationTheory.GroupCohomology.LowDegree Mathlib.Analysis.CStarAlgebra.Hom Mathlib.Analysis.Complex.Polynomial.UnitTrinomial Mathlib.ModelTheory.Algebra.Field.IsAlgClosed Mathlib.RingTheory.LinearDisjoint Mathlib.RingTheory.Ideal.Norm Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order Mathlib.FieldTheory.PurelyInseparable Mathlib.NumberTheory.NumberField.House Mathlib.NumberTheory.NumberField.Embeddings Mathlib.Algebra.Lie.Weights.Cartan Mathlib.RingTheory.Valuation.Minpoly Mathlib.Analysis.SpecialFunctions.Complex.CircleAddChar Mathlib.LinearAlgebra.Eigenspace.Pi Mathlib.RingTheory.WittVector.FrobeniusFractionField Mathlib.NumberTheory.NumberField.ClassNumber Mathlib.FieldTheory.PolynomialGaloisGroup Mathlib.Tactic Mathlib.Algebra.Lie.Weights.Linear Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic Mathlib.RingTheory.RootsOfUnity.AlgebraicallyClosed Mathlib.LinearAlgebra.Matrix.HermitianFunctionalCalculus Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Basic Mathlib.RingTheory.Norm.Basic Mathlib.NumberTheory.FunctionField Mathlib.NumberTheory.NumberField.AdeleRing
2
Mathlib.RingTheory.Adjoin.Dimension 1128

Declarations diff

+ finrank_sup_le
+ rank_sup_le_of_isAlgebraic

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.

@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Nov 1, 2024
Comment on lines +26 to +31
/-- If `A` and `B` are intermediate fields, and at least one them are algebraic, then the rank of
`A ⊔ B` is less than or equal to the product of that of `A` and `B`. Note that this result is
also true without algebraic assumption, but the proof becomes very complicated. -/
theorem rank_sup_le_of_isAlgebraic
(halg : Algebra.IsAlgebraic F A ∨ Algebra.IsAlgebraic F B) :
Module.rank F ↥(A ⊔ B) ≤ Module.rank F A * Module.rank F B := by
Copy link
Copy Markdown
Contributor

@alreadydone alreadydone Nov 8, 2024

Choose a reason for hiding this comment

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

I think the transcendental case is not too complicated if you use item 1 of my comment here (probably requires extra import though). You've already proven the result for purely transcendental extensions here. Even though we don't have a definition of transcendental degree yet, you can take a F-transcendental basis in A and one in B, and A ⊔ B will be algebraic over the intermediate field generated by the union of the two bases, because of IsTranscendenceBasis.isAlgebraic and algebraicClosure is an intermediate field. (The union of the two bases needs not be a basis, but we should prove a general IntermediateField.card(inal)_adjoin_le.)
image

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.

By "complicated" I mean the proof is lengthy, cumbersome and need a lot of imports. In fact I have a proof but there are sill some sorrys mainly for struggling the relation of 9 intermediate fields...

Maybe later I'll reconsider your comments and looking for a simpler proof. My opinion is that if we want to keep the import of this file minimal, then we can only prove this version. The general version should go to another file with heavier imports. What's your opinion?

Copy link
Copy Markdown
Collaborator Author

@acmepjz acmepjz Nov 8, 2024

Choose a reason for hiding this comment

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

Even though we don't have a definition of transcendental degree yet

No I don't need that in this proof.

a general IntermediateField.card(inal)_adjoin_le

I think I have this result in my WIP file.

[EDIT] I think at least I need to import AlgebraicIndependent (#18648 is needed, and probably relrank in my PR #14987 for ease of computation), which will bump the import count from 1338 to ~1370.

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.

Is there a reason to keep imports minimal? This is a new file after all. By the way, how do you count import increases without opening a PR?

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.

Is there a reason to keep imports minimal? This is a new file after all.

No particular reason. But I feel that these two results are basic. I'm afraid that they will be used in other places. The direct use of them is in linearly disjointness, which does not import AlgebraicIndependent if I remembered correctly.

But anyway they imported Algebraic. The AlgebraicIndependent only adds 4 files compare to Algebraic. So maybe... it's reasonable.

By the way, how do you count import increases without opening a PR?

I'm guessing from #18770 which imports AlgebraicIndependent.

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.

🎉

import Mathlib.RingTheory.Adjoin.Basic
import Mathlib.LinearAlgebra.Dimension.Constructions
import Mathlib.Algebra.Group.Pointwise.Set.Card

theorem Subalgebra.rank_sup_le_of_free!!! {R S : Type*} [CommRing R] [StrongRankCondition R]
    [CommRing S] [Algebra R S]
    (A : Subalgebra R S) (B : Subalgebra R S)
    [Module.Free R A] [Module.Free R B] :
    Module.rank R ↥(A ⊔ B) ≤ Module.rank R A * Module.rank R B := by
  obtain ⟨ιA, bA⟩ := Module.Free.exists_basis (R := R) (M := A)
  obtain ⟨ιB, bB⟩ := Module.Free.exists_basis (R := R) (M := B)
  have h := Algebra.adjoin_union_coe_submodule R (A : Set S) (B : Set S)
  rw [A.adjoin_eq_span_basis R bA, B.adjoin_eq_span_basis R bB, ← Algebra.sup_def,
    Submodule.span_mul_span] at h
  change Module.rank R ↥(toSubmodule (A ⊔ B)) ≤ _
  rw [h, ← bA.mk_eq_rank'', ← bB.mk_eq_rank'']
  refine (rank_span_le _).trans Cardinal.mk_mul_le |>.trans ?_
  gcongr <;> exact Cardinal.mk_range_le

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.

#find_home on my computer just runs out of memory. @alreadydone Could you help me to find a suitable place to put this result?

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.

Great! I usually use the web editor. In this case it finds Mathlib itself. Note that I replaced StrongRankCondition with Nontrivial but it doesn't affect the result. I'm not sure which current files can host this result without adding too many imports.

Copy link
Copy Markdown
Collaborator Author

@acmepjz acmepjz Nov 12, 2024

Choose a reason for hiding this comment

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

I replaced StrongRankCondition with Nontrivial but it doesn't affect the result

Because in this case it uses an instance that a non-trivial commutative ring satisfies strong rank condition. I think that file is not imported by so many files.

it finds Mathlib itself

Oops. What about Mathlib.RingTheory.Adjoin.Dimension?

But then we got too many such small files...

[EDIT] Mathlib.FieldTheory.Adjoin seems reasonable, except for missing import Mathlib.Algebra.Group.Pointwise.Set.Card. At least I can put IntermediateField.rank_sup_le_of_isAlgebraic in that file.

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.

I think for the Subalgebra result, Mathlib.LinearAlgebra.Dimension.Constructions is pretty reasonable. It has 2204 transitive imports and importing Mathlib.RingTheory.Adjoin.Basic adds 3 and importing Mathlib.Algebra.Group.Pointwise.Set.Card adds 1. (web editor link) The script is from Damiano here.

@acmepjz acmepjz added the WIP Work in progress label Nov 12, 2024
@acmepjz acmepjz removed the WIP Work in progress label Nov 12, 2024
@acmepjz acmepjz changed the title feat(LinearAlgebra/TensorProduct/Field): some results on fields whose proof requires tensor product feat: some results on dimension of field adjoin Nov 12, 2024
Copy link
Copy Markdown
Contributor

@alreadydone alreadydone left a comment

Choose a reason for hiding this comment

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

maintainer merge

Comment on lines +736 to +738
theorem rank_sup_le_of_isAlgebraic
(halg : Algebra.IsAlgebraic K E1 ∨ Algebra.IsAlgebraic K E2) :
Module.rank K ↥(E1 ⊔ E2) ≤ Module.rank K E1 * Module.rank K E2 := by
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.

LGTM! Let's merge this now; when you're able to remove the algebraic condition, it would be reasonable to import AlgebraicIndependent, which adds 3 imports, plus 1 for RelRank.

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.

it would be reasonable to import AlgebraicIndependent, which adds 3 imports, plus 1 for RelRank

Unfortunately, that's not possible, since AlgebraicIndependent (aevalEquivField in my working PR) and RelRank imports Mathlib.FieldTheory.Adjoin 😂

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by alreadydone.

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Nov 12, 2024
Copy link
Copy Markdown
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.

Thanks 🎉

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Nov 13, 2024
mathlib-bors bot pushed a commit that referenced this pull request Nov 13, 2024
In `Mathlib/FieldTheory/Adjoin.lean`:

- `IntermediateField.rank_sup_le_of_isAlgebraic`: if `A` and `B` are intermediate fields, and at least one them are algebraic, then the rank of `A ⊔ B` is less than or equal to the product of that of `A` and `B`. (Note that this result is also true without algebraic assumption, but the proof becomes very complicated, and which is out of scope of this PR.)
- `IntermediateField.finrank_sup_le`: if `A` and `B` are intermediate fields, then the `Module.finrank` of `A ⊔ B` is less than or equal to the product of that of `A` and `B`.

Move the result `Subalgebra.[fin]rank_sup_le_of_free` from `Mathlib/LinearAlgebra/TensorProduct/Subalgebra.lean` to a new file `Mathlib/RingTheory/Adjoin/Dimension.lean`, as their proofs don't use tensor `mulMap` anymore.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 13, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: some results on dimension of field adjoin [Merged by Bors] - feat: some results on dimension of field adjoin Nov 13, 2024
@mathlib-bors mathlib-bors bot closed this Nov 13, 2024
@mathlib-bors mathlib-bors bot deleted the acmepjz_if_finrank_sup_le branch November 13, 2024 08:11
TobiasLeichtfried pushed a commit that referenced this pull request Nov 21, 2024
In `Mathlib/FieldTheory/Adjoin.lean`:

- `IntermediateField.rank_sup_le_of_isAlgebraic`: if `A` and `B` are intermediate fields, and at least one them are algebraic, then the rank of `A ⊔ B` is less than or equal to the product of that of `A` and `B`. (Note that this result is also true without algebraic assumption, but the proof becomes very complicated, and which is out of scope of this PR.)
- `IntermediateField.finrank_sup_le`: if `A` and `B` are intermediate fields, then the `Module.finrank` of `A ⊔ B` is less than or equal to the product of that of `A` and `B`.

Move the result `Subalgebra.[fin]rank_sup_le_of_free` from `Mathlib/LinearAlgebra/TensorProduct/Subalgebra.lean` to a new file `Mathlib/RingTheory/Adjoin/Dimension.lean`, as their proofs don't use tensor `mulMap` anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. 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