Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - refactor(analysis/complex/basic, data/complex/is_R_or_C): downgrade imports#18217

Closed
hrmacbeth wants to merge 27 commits intomasterfrom
hrmacbeth-downgrade-complex
Closed

[Merged by Bors] - refactor(analysis/complex/basic, data/complex/is_R_or_C): downgrade imports#18217
hrmacbeth wants to merge 27 commits intomasterfrom
hrmacbeth-downgrade-complex

Conversation

@hrmacbeth
Copy link
Copy Markdown
Member

The files data/complex/is_R_or_C and analysis/complex/basic are imported widely across the analysis library: for example

  • data/complex/is_R_or_C into inner product spaces
  • analysis/complex/basic into the construction of rpow and thence into Lp spaces and the Bochner integral

So it is useful (for the port and for compilation time) to make them as elementary as possible.

Currently they both import analysis/normed_space/operator_norm and analysis/normed_space/finite_dimension, rather heavy imports, but use quite little from these files: they provide lemmas about the operator norms of re/im/conj/of_real, and get cheaply some facts about the topology of /is_R_or_C via real-finite-dimensionality.

This PR splits both files.

  • analysis/complex/basic is split in place, with substantially downgraded imports, and with a few heavier lemmas moved to analysis/complex/operator_norm. (And a few lemmas moved earlier to data/complex/module.). I wrote direct proofs for the completeness and properness of so that these facts can remain available by importing this file, even though with heavier imports these facts can be deduced from the real-finite-dimensionality of .
  • data/complex/is_R_or_C is split into data/is_R_or_C/basic (lightweight file containing most of the former file) and data/is_R_or_C/lemmas (a few heavier lemmas).

Also rename equiv_real_prod_add_hom_lm to equiv_real_prod_lm (an apparent typo), and equiv_real_prodₗ to equiv_real_prod_clm (also an apparent error since in our naming convention usually refers to linearity, not continuous-linearity).


Open in Gitpod

@hrmacbeth hrmacbeth requested a review from a team as a code owner January 18, 2023 23:37
@hrmacbeth hrmacbeth added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. t-analysis Analysis (normed *, calculus) labels Jan 18, 2023
bors bot pushed a commit that referenced this pull request Jan 19, 2023
Half of this file is completely elementary, able to be proved directly from the definitions in `normed/group/hom/basic` after a few instances are added there.  The other half consists of technical lemmas from LTE, never used elsewhere in mathlib, and requires more imports.  Since this file is imported by many files (including `data/complex/is_R_or_C`, see #18217 for a discussion of what that file imports), I propose splitting off the LTE half.
@sgouezel
Copy link
Copy Markdown
Collaborator

The linter is still not happy.

@sgouezel sgouezel removed the awaiting-review The author would like community review of the PR label Jan 19, 2023
@sgouezel sgouezel added the awaiting-author A reviewer has asked the author a question or requested changes label Jan 19, 2023
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Jan 19, 2023
@hrmacbeth hrmacbeth added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jan 21, 2023
@sgouezel
Copy link
Copy Markdown
Collaborator

bors d+
Can you merge master and fix the conflict first?

@bors
Copy link
Copy Markdown

bors bot commented Jan 23, 2023

✌️ hrmacbeth can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Jan 23, 2023
@hrmacbeth
Copy link
Copy Markdown
Member Author

bors r+

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Jan 24, 2023
bors bot pushed a commit that referenced this pull request Jan 24, 2023
…mports (#18217)

The files `data/complex/is_R_or_C` and `analysis/complex/basic` are imported widely across the analysis library: for example 
- `data/complex/is_R_or_C` into inner product spaces
- `analysis/complex/basic` into the construction of `rpow` and thence into Lp spaces and the Bochner integral

So it is useful (for the port and for compilation time) to make them as elementary as possible.

Currently they both import `analysis/normed_space/operator_norm` and `analysis/normed_space/finite_dimension`, rather heavy imports, but use quite little from these files: they provide lemmas about the operator norms of `re`/`im`/`conj`/`of_real`, and get cheaply some facts about the topology of `ℂ`/`is_R_or_C` via real-finite-dimensionality.

This PR splits both files.
- `analysis/complex/basic` is split in place, with substantially downgraded imports, and with a few heavier lemmas moved to `analysis/complex/operator_norm`.  (And a few lemmas moved earlier to `data/complex/module`.).  I wrote direct proofs for the completeness and properness of `ℂ` so that these facts can remain available by importing this file, even though with heavier imports these facts can be deduced from the real-finite-dimensionality of `ℂ`.
- `data/complex/is_R_or_C` is split into `data/is_R_or_C/basic` (lightweight file containing most of the former file) and `data/is_R_or_C/lemmas` (a few heavier lemmas).

Also rename `equiv_real_prod_add_hom_lm` to `equiv_real_prod_lm` (an apparent typo), and `equiv_real_prodₗ` to `equiv_real_prod_clm` (also an apparent error since in our naming convention `ₗ` usually refers to linearity, not continuous-linearity).
@bors
Copy link
Copy Markdown

bors bot commented Jan 24, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(analysis/complex/basic, data/complex/is_R_or_C): downgrade imports [Merged by Bors] - refactor(analysis/complex/basic, data/complex/is_R_or_C): downgrade imports Jan 24, 2023
@bors bors bot closed this Jan 24, 2023
@bors bors bot deleted the hrmacbeth-downgrade-complex branch January 24, 2023 05:14
grunweg added a commit to leanprover-community/mathlib4 that referenced this pull request May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

delegated The PR author may merge after reviewing final suggestions. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants