Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - refactor(linear_algebra/quadratic_form/basic): generalize to semiring #14303

Closed
wants to merge 37 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented May 22, 2022

This uses a slightly nicer strategy than the one suggested by @adamtopaz on Zulip.

The main motivation here is to be able to talk about 0 : quadratic_form R M even when there is no negation available, as that will let us merge clifford_algebra (which currently requires negation) and exterior_algebra (which does not).

It's likely this generalization is broadly not very useful, so this adds a quadratic_form.of_polar constructor to preserve the old more convenient API.

Note the .bib file changed slightly as I ran the autoformatting tool.


Open in Gitpod

@eric-wieser eric-wieser added the WIP Work in progress label May 22, 2022
@eric-wieser eric-wieser changed the base branch from master to eric-wieser/bilin_form-tweak May 22, 2022 16:36
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label May 22, 2022
…gebra/quadratic_form/basic`

150 lines seems worthy of its own file, especially if this grows `fun_like` boilerplate in future.

No lemmas have been renamed or proofs changed.
@bors bors bot deleted the branch master May 23, 2022 01:49
@bors bors bot closed this May 23, 2022
@eric-wieser eric-wieser reopened this May 23, 2022
@eric-wieser eric-wieser changed the base branch from eric-wieser/bilin_form-tweak to master May 23, 2022 06:56
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label May 23, 2022
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label May 23, 2022
@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels May 24, 2022
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label May 24, 2022
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label May 24, 2022
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label May 24, 2022
@eric-wieser eric-wieser force-pushed the eric-wieser/quadratic_form-semiring branch from 784677c to 7d1c233 Compare May 31, 2022 09:21
Copy link
Collaborator

@adamtopaz adamtopaz 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 just had one small question/comment for you to consider.

Also, it seems that the file quadratic_form/basic is starting to get large, and trying to do too much. We should consider splitting it up (in a later PR). I think the basic defs should go in basic while the anisotropic stuff could go in a separate file called anisotropic for example.

src/linear_algebra/quadratic_form/basic.lean Show resolved Hide resolved
@eric-wieser
Copy link
Member Author

We should consider splitting it up (in a later PR).

I completely agree!

@adamtopaz
Copy link
Collaborator

bors r+

@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 17, 2022
bors bot pushed a commit that referenced this pull request Jun 17, 2022
…#14303)

This uses a slightly nicer strategy than the one suggested by @adamtopaz [on Zulip](https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/Exterior.20algebras.20over.20semiring/near/282808284).

The main motivation here is to be able to talk about `0 : quadratic_form R M` even when there is no negation available, as that will let us merge `clifford_algebra`  (which currently requires negation) and `exterior_algebra` (which does not).

It's likely this generalization is broadly not very useful, so this adds a `quadratic_form.of_polar` constructor to preserve the old more convenient API.

Note the `.bib` file changed slightly as I ran the autoformatting tool.
@bors
Copy link

bors bot commented Jun 17, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(linear_algebra/quadratic_form/basic): generalize to semiring [Merged by Bors] - refactor(linear_algebra/quadratic_form/basic): generalize to semiring Jun 17, 2022
@bors bors bot closed this Jun 17, 2022
@bors bors bot deleted the eric-wieser/quadratic_form-semiring branch June 17, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

None yet

3 participants