Skip to content

[Merged by Bors] - feat: predicates for extensions of complex embeddings#27977

Closed
smmercuri wants to merge 5 commits intoleanprover-community:masterfrom
smmercuri:smmercuri/ComplexEmbeddingExtension
Closed

[Merged by Bors] - feat: predicates for extensions of complex embeddings#27977
smmercuri wants to merge 5 commits intoleanprover-community:masterfrom
smmercuri:smmercuri/ComplexEmbeddingExtension

Conversation

@smmercuri
Copy link
Copy Markdown
Collaborator

@smmercuri smmercuri commented Aug 5, 2025

If L/K and ψ : K →+* ℂ, we define the subtype ComplexExtension L ψ of L →+* ℂ that extend ψ to L. Also define two predicates asserting ways that φ can extend ψ.

  • φ.IsMixed : ψ has real image while φ has complex image.
  • φ.IsUnmixed: the negation of IsMixed -- ψ has real image if and only if φ has real image.

ComplexExtension.IsMixed and ComplexExtension.IsUnmixed are the ComplexEmbedding analogues to ramified and unramified infinite places, which is a two-to-one isomorphism in the former and a one-to-one isomorphism in the latter, hence the slightly different terminology.

This PR continues the work from #24877.

Original PR: #24877

@smmercuri
Copy link
Copy Markdown
Collaborator Author

Comments from Original PR #24877

This section contains 2 comment(s) from the original PR, excluding bot comments.


@xroblot (2025-05-20 11:10 UTC):
I think something like that it's definitely a good idea, but I'd like to have a better understanding of how this is going to combine with what's already there for infinite places. In particular, I have the feeling there is a risk for code duplication. Maybe ramification of complex embeddings should follow from ramification of infinite places or the other way around, but I don't think that having two definitions of ramifications and then prove that there are consistent is the way to go. I could be wrong though so I am ready to hear counterargument.


@smmercuri (2025-05-20 16:43 UTC):
One of the main results of these series of PRs is ∑ (v | w), w.ramificationIdx K = Module.finrank K L, whose proof basically goes #UnramifiedExtension + 2*#RamifiedExtension = #ComplexExtensions = #(L →ₐ[K] ℂ) = Module.finrank K L. So I need some way of talking about extensions of complex embeddings. I think these differ somewhat from ramification of infinite places, since if v | w then we are not guaranteed that w.embedding extends v.embedding. Indeed in the ramified case there is a two-to-one map from infinite place extensions to complex extensions (see one of the dependent PRs). Because of this difference, I feel the content of this PR does not quite risk duplication, and I think it's just a question of whether these predicates are worth giving explicit names to or not, which I think they are.

Your point about duplication is valid though, particularly to the dependent PR #24882 where, for example, I define UnramifiedExtension as

{ w : InfinitePlace L // w.comap (algebraMap K L) = v ∧ w.IsUnramified K }

but it could be replaced with

{ w : InfinitePlace L // ∃ ψ, w = mk ψ ∧ IsUnmixedExtension v.embedding ψ }

or possibly removed altogether.

Overall, I still feel these are different enough to have as separate defs, but if we do want to reduce them then I think we should do it via the ComplexEmbedding -> InfinitePlace way around, which would affect #24882 rather than this PR.

@smmercuri smmercuri added the WIP Work in progress label Aug 5, 2025
@github-actions github-actions bot added the t-number-theory Number theory (also use t-algebra or t-analysis to specialize) label Aug 5, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 5, 2025

PR summary 7fe074626b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Extension
+ IsMixed
+ IsUnmixed
+ IsUnmixed.isReal_iff_isReal
+ comp_eq
+ conjugate_comp
+ conjugate_comp_ne
+ not_isReal_of_not_isReal

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.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@riccardobrasca
Copy link
Copy Markdown
Member

@smmercuri is this still WIP?

@smmercuri
Copy link
Copy Markdown
Collaborator Author

@smmercuri is this still WIP?

Ah yes it is, I still need to incorporate feedback from the old PR. Planning to work through my WIP PRs over the next week!

@xroblot
Copy link
Copy Markdown
Collaborator

xroblot commented Sep 17, 2025

@smmercuri is this still WIP?

Ah yes it is, I still need to incorporate feedback from the old PR. Planning to work through my WIP PRs over the next week!

Please let me know when this is not WIP anymore so I take another look.

@smmercuri
Copy link
Copy Markdown
Collaborator Author

@smmercuri is this still WIP?

Ah yes it is, I still need to incorporate feedback from the old PR. Planning to work through my WIP PRs over the next week!

Please let me know when this is not WIP anymore so I take another look.

Thanks! This is now ready to review.

@smmercuri smmercuri added FLT part of the ongoing formalization of Fermat's Last Theorem and removed WIP Work in progress labels Sep 18, 2025
Copy link
Copy Markdown
Collaborator

@xroblot xroblot left a comment

Choose a reason for hiding this comment

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

LGTM. I was gonna complain about the use of the term mixed by then I remembered that I was the one that named the NumberField.mixedEmbedding.mixedSpace so I should probably not 😅

On the other hand, I think I would drop the Complex in ComplexExtension but that might require to protect the definition since there seems to be quite a lot of things called Extension already in Mathlib. So it's up to you

@smmercuri
Copy link
Copy Markdown
Collaborator Author

LGTM. I was gonna complain about the use of the term mixed by then I remembered that I was the one that named the NumberField.mixedEmbedding.mixedSpace so I should probably not 😅

Yes this is one reason I went for that terminology. I'm also unsure about whether it's the right term in this case so I would be open to other suggestions. Perhaps IsSplit is more appropriate?

On the other hand, I think I would drop the Complex in ComplexExtension but that might require to protect the definition since there seems to be quite a lot of things called Extension already in Mathlib. So it's up to you

I did have this as ComplexEmbedding.Extension previously, but I also define InfinitePlace.Extension further up so was trying to avoid confusion. I'll just protect them and make sure to use dot notation instead!

@riccardobrasca
Copy link
Copy Markdown
Member

Thanks!

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Sep 19, 2025
mathlib-bors bot pushed a commit that referenced this pull request Sep 19, 2025
If `L/K` and  `ψ : K →+* ℂ`, we define the subtype `ComplexExtension L ψ` of `L →+* ℂ` that extend `ψ` to `L`. Also define two predicates asserting ways that `φ` can extend `ψ`.
- `φ.IsMixed` : `ψ` has real image while `φ` has complex image.
- `φ.IsUnmixed`: the negation of `IsMixed` -- `ψ` has real image if and only if `φ` has real image.

`ComplexExtension.IsMixed` and `ComplexExtension.IsUnmixed` are the `ComplexEmbedding` analogues to ramified and unramified infinite places, which is a two-to-one isomorphism in the former and a one-to-one isomorphism in the latter, hence the slightly different terminology.

This PR continues the work from #24877.

Original PR: #24877
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Sep 19, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: predicates for extensions of complex embeddings [Merged by Bors] - feat: predicates for extensions of complex embeddings Sep 19, 2025
@mathlib-bors mathlib-bors bot closed this Sep 19, 2025
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…munity#27977)

If `L/K` and  `ψ : K →+* ℂ`, we define the subtype `ComplexExtension L ψ` of `L →+* ℂ` that extend `ψ` to `L`. Also define two predicates asserting ways that `φ` can extend `ψ`.
- `φ.IsMixed` : `ψ` has real image while `φ` has complex image.
- `φ.IsUnmixed`: the negation of `IsMixed` -- `ψ` has real image if and only if `φ` has real image.

`ComplexExtension.IsMixed` and `ComplexExtension.IsUnmixed` are the `ComplexEmbedding` analogues to ramified and unramified infinite places, which is a two-to-one isomorphism in the former and a one-to-one isomorphism in the latter, hence the slightly different terminology.

This PR continues the work from leanprover-community#24877.

Original PR: leanprover-community#24877
zhuyizheng pushed a commit to zhuyizheng/mathlib4 that referenced this pull request Oct 2, 2025
…munity#27977)

If `L/K` and  `ψ : K →+* ℂ`, we define the subtype `ComplexExtension L ψ` of `L →+* ℂ` that extend `ψ` to `L`. Also define two predicates asserting ways that `φ` can extend `ψ`.
- `φ.IsMixed` : `ψ` has real image while `φ` has complex image.
- `φ.IsUnmixed`: the negation of `IsMixed` -- `ψ` has real image if and only if `φ` has real image.

`ComplexExtension.IsMixed` and `ComplexExtension.IsUnmixed` are the `ComplexEmbedding` analogues to ramified and unramified infinite places, which is a two-to-one isomorphism in the former and a one-to-one isomorphism in the latter, hence the slightly different terminology.

This PR continues the work from leanprover-community#24877.

Original PR: leanprover-community#24877
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FLT part of the ongoing formalization of Fermat's Last Theorem ready-to-merge This PR has been sent to bors. t-number-theory Number theory (also use t-algebra or t-analysis to specialize)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants