Skip to content

[Merged by Bors] - feat: add [s|i]sup_toXXX for intermediate fields and subalgebras#15088

Closed
acmepjz wants to merge 12 commits intomasterfrom
acmepjz_sup_toSubfield
Closed

[Merged by Bors] - feat: add [s|i]sup_toXXX for intermediate fields and subalgebras#15088
acmepjz wants to merge 12 commits intomasterfrom
acmepjz_sup_toSubfield

Conversation

@acmepjz
Copy link
Copy Markdown
Collaborator

@acmepjz acmepjz commented Jul 23, 2024

  • IntermediateField.[s|i]sup_toSubfield which states that the sup, sSup and iSup for IntermediateField is the same as for Subfield.
  • Algebra.[s|i]sup_toSubsemiring which states that the sup, sSup and iSup for Subalgebra is the same as for Subsemiring.
  • Also add a missing Algebra.iInf_toSubsemiring.

discussion: https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/IntermediateField.2Esup_toSubfield

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 Jul 23, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 23, 2024

PR summary 296dd124fe

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ adjoin_toSubfield
+ iInf_toSubsemiring
+ iSup_toSubfield
+ iSup_toSubsemiring
+ sSup_toSubfield
+ sSup_toSubsemiring
+ sup_toSubfield
+ sup_toSubsemiring
++ sSup_def
++ sup_def

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 Jul 23, 2024
@acmepjz
Copy link
Copy Markdown
Collaborator Author

acmepjz commented Jul 28, 2024

Probably Subalgebra->Subsemiring version should also be added...

@acmepjz acmepjz added the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 28, 2024
@acmepjz acmepjz changed the title feat(FieldTheory/Adjoin): add IntermediateField.[s|i]sup_toSubfield feat: add [s|i]sup_toXXX for intermediate fields and subalgebras Jul 28, 2024
@acmepjz acmepjz removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 28, 2024
Copy link
Copy Markdown
Contributor

@Ruben-VandeVelde Ruben-VandeVelde left a comment

Choose a reason for hiding this comment

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

Thanks!

@acmepjz acmepjz added the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 7, 2024
@acmepjz
Copy link
Copy Markdown
Collaborator Author

acmepjz commented Aug 7, 2024

Sorry I'm on vacation at August; will look at it later.

@acmepjz acmepjz removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 3, 2024
@acmepjz
Copy link
Copy Markdown
Collaborator Author

acmepjz commented Sep 3, 2024

Done.


theorem sup_def (S T : Subalgebra R A) : S ⊔ T = adjoin R (S ∪ T : Set A) := rfl

theorem sSup_def (S : Set (Subalgebra R A)) : sSup S = adjoin R (⋃₀ (SetLike.coe '' S)) := rfl
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.

The rhs here looks like it should be stated with iSup

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 sure about this. Since LHS is s version, I think the RHS should also be s version, i.e. sUnion. Could you give an equivalent statement in iUnion?

open Subalgebra in
@[simp]
theorem sSup_toSubsemiring (S : Set (Subalgebra R A)) (hS : S.Nonempty) :
(sSup S).toSubsemiring = sSup (toSubsemiring '' S) := 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.

Similarly iSup on the right here looks nicer

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 sure about this. The existing result sInf_toSubsemiring uses sInf on RHS. For consistency, I think this should also use sSup instead of iSup.

algebraMap_mem' := fun x => Subfield.subset_closure (Or.inl (Set.mem_range_self x)) }

@[simp]
theorem adjoin_toSubfield :
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.

as previously

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.

In this case it is not working, since the definition of IntermediateField extends Subalgebra but not Subfield. The @[simps] is not working at all, and @[simps!] creates IntermediateField.adjoin_carrier which is unwanted, @[simps! toSubfield] is not working either.

@b-mehta b-mehta added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 4, 2024
@acmepjz acmepjz removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 5, 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 Oct 16, 2024
mathlib-bors bot pushed a commit that referenced this pull request Oct 16, 2024
…15088)

- `IntermediateField.[s|i]sup_toSubfield` which states that the `sup`, `sSup` and `iSup` for `IntermediateField` is the same as for `Subfield`.
- `Algebra.[s|i]sup_toSubsemiring` which states that the `sup`, `sSup` and `iSup` for `Subalgebra` is the same as for `Subsemiring`.
- Also add a missing `Algebra.iInf_toSubsemiring`.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 16, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: add [s|i]sup_toXXX for intermediate fields and subalgebras [Merged by Bors] - feat: add [s|i]sup_toXXX for intermediate fields and subalgebras Oct 16, 2024
@mathlib-bors mathlib-bors bot closed this Oct 16, 2024
@mathlib-bors mathlib-bors bot deleted the acmepjz_sup_toSubfield branch October 16, 2024 05:33
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.

4 participants