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

[Merged by Bors] - feat(linear_algebra/quadratic_form): Complex version of Sylvester's law of inertia - #7416

Closed
kex-y wants to merge 45 commits into
masterfrom
sylvester
Closed

[Merged by Bors] - feat(linear_algebra/quadratic_form): Complex version of Sylvester's law of inertia#7416
kex-y wants to merge 45 commits into
masterfrom
sylvester

Conversation

@kex-y

@kex-y kex-y commented Apr 29, 2021

Copy link
Copy Markdown
Member

Every nondegenerate complex quadratic form is equivalent to a quadratic form corresponding to the sum of squares.


Open in Gitpod

@kex-y

kex-y commented Apr 29, 2021

Copy link
Copy Markdown
Member Author

I'm not sure if field.invertible exists/ where it should go. algebra.algebra.field does not import invertible nor vice versa.

@kex-y kex-y added the awaiting-review The author would like community review of the PR label Apr 29, 2021
Comment thread src/linear_algebra/basis.lean Outdated
Comment thread src/linear_algebra/basis.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
@kex-y

kex-y commented May 2, 2021

Copy link
Copy Markdown
Member Author

Since I intend to work more with the classification of quadratic forms in the future, I think it is a good idea to make a quadratic form folder and a new file for the classification of quadratic forms since the file is getting quite long. What do you think @eric-wieser? I can keep it in one file if you think its a bad idea.

@eric-wieser

eric-wieser commented May 2, 2021

Copy link
Copy Markdown
Member

Splitting files is fine, but usually best if done in its own PR

Comment thread src/linear_algebra/quadratic_form.lean Outdated
Comment thread src/linear_algebra/basis.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels May 6, 2021
Comment thread src/linear_algebra/basis.lean Outdated
mk_apply smul_group_linear_independent smul_group_span_eq_top i

-- This lemma cannot be proved with `smul_group_linear_independent` since the action of
-- `units R` on `R` is not commutative.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are you sure this comment is still true?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried but failed to prove smul_group_linear_independent without the smul_comm_class instance. Though I don't know if the problem is just with my method

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I thought I provided the instance in the other PR; what instance specifically is missing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think this instance is true: smul_comm_class (units R) R M

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I suspect smul_group_linear_independent can be proved without the smul_comm_class G R M instance though I couldn't figure out how to do it :/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll have a go tomorrow to see if I missed something

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you just adapt the units proof to work for an arbitrary group?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The proof of the units version uses the smul action of R on units R but we don't have the corresponding action of R on G in the group version

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The proof of the units version uses the smul action of R on units R

There can be no such action - it actually seems to be using the action of opposite (units R) on R (which is easy to make exist), which I'm having a headache trying to generalize.

Comment thread src/linear_algebra/basis.lean Outdated
Comment thread src/linear_algebra/basis.lean Outdated
Comment thread src/linear_algebra/basis.lean Outdated
Comment thread src/linear_algebra/basis.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated
Comment thread src/linear_algebra/basis.lean Outdated
Comment on lines +464 to +465
-- This lemma cannot be proved with `smul_group_linear_independent` since the action of
-- `units R` on `R` is not commutative.

@eric-wieser eric-wieser May 26, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the generalization we're missing here is maybe about right actions. I think the key step in the proof is solving

(g x •← w x) • v x = g x • (w x • v x)

where notation a ` •← ` b := op b • a, and the action r •← u is defined using #7723 as

instance (R) [semiring R] : distrib_mul_action (units R)ᵒᵖ R :=
distrib_mul_action.comp_hom R (units.op_equiv.symm : (units R)ᵒᵖ ≃* _).to_monoid_hom

To complete this generalization, we'd need a variable of smul_assoc that covers (g x •← w x) • v x = g x • w x • v x, which is definitely out of scope for this PR.

Comment thread src/linear_algebra/basis.lean Outdated
Comment thread src/linear_algebra/quadratic_form.lean Outdated

@eric-wieser eric-wieser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All the units stuff looks good to me now, thanks. Perhaps @jcommelin or @Vierkantor should skim this one last time.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

@jcommelin jcommelin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

the sum of squares, i.e. `weighted_sum_squares` with weight `λ i : ι, 1`. -/
theorem equivalent_sum_squares {M : Type*} [add_comm_group M] [module ℂ M]
[finite_dimensional ℂ M] (Q : quadratic_form ℂ M) (hQ : (associated Q).nondegenerate) :
equivalent Q (weighted_sum_squares ℂ (1 : fin (finite_dimensional.finrank ℂ M) → ℂ)) :=

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I still think that it would be nice to be able to write

equivalent Q (sum_squares ℂ (fin (finite_dimensional.finrank ℂ M)))

@github-actions github-actions Bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Jun 7, 2021
bors Bot pushed a commit that referenced this pull request Jun 7, 2021
…aw of inertia (#7416)

Every nondegenerate complex quadratic form is equivalent to a quadratic form corresponding to the sum of squares.
@bors

bors Bot commented Jun 7, 2021

Copy link
Copy Markdown

Build failed (retrying...):

bors Bot pushed a commit that referenced this pull request Jun 7, 2021
…aw of inertia (#7416)

Every nondegenerate complex quadratic form is equivalent to a quadratic form corresponding to the sum of squares.
@bors

bors Bot commented Jun 7, 2021

Copy link
Copy Markdown

Pull request successfully merged into master.

Build succeeded:

@bors bors Bot changed the title feat(linear_algebra/quadratic_form): Complex version of Sylvester's law of inertia [Merged by Bors] - feat(linear_algebra/quadratic_form): Complex version of Sylvester's law of inertia Jun 7, 2021
@bors bors Bot closed this Jun 7, 2021
@bors
bors Bot deleted the sylvester branch June 7, 2021 20:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants