-
Notifications
You must be signed in to change notification settings - Fork 297
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] - feat(linear_algebra/alternating): Add dom_coprod #5269
Conversation
src/group_theory/perm/shuffle.lean
Outdated
@@ -0,0 +1,80 @@ | |||
import group_theory.perm.sign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is junk, I'll delete it when I next push.
fe37f4b
to
4902e95
Compare
fe04aaf
to
1740bb0
Compare
src/linear_algebra/alternating.lean
Outdated
with_cases { | ||
cases hi : σ⁻¹ i; | ||
cases hj : σ⁻¹ j; | ||
rw perm.inv_eq_iff_eq at hi hj; | ||
propagate_tags' { substs hi hj, }, }, | ||
case [sum.inl sum.inr : i' j', sum.inr sum.inl : i' j'] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gebner, this is where I needed propagate_tags
from leanprover-community/lean#540. Can you think of a better solution? Should substs
just call propagate_tags
itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good lord! I think propagate_tags
is the least of this proof's problems. Is there any way it can be split up into more manageable and maybe even independently useful chunks?
But yes, substs
should call propagate_tags
itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the first impressions. I don't find it particularly readable when every line is either all_goals
or work_on_goal
. While I value avoiding duplication, I think it would be better to refactor all_goals { a }, work_on_goal 0 { b }, work_on_goal 1 { b' }, all_goals { c }
into { a, b, c }, { a, b', c }
here.
I would also introduce a definition for the summand of dom_coprod_fun
. This is an unwieldy expression, and you can probably extract two of the big blocks in the proof here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also introduce a definition for the summand of dom_coprod_fun. This is an unwieldy expression, and you can probably extract two of the big blocks in the proof here.
I've done this as dom_coprod.summand
and eliminated dom_coprod_fun
- good idea.
src/linear_algebra/alternating.lean
Outdated
{R : Type*} {M N₁ N₂ : Type*} | ||
[comm_semiring R] | ||
[add_comm_group N₁] [semimodule R N₁] | ||
[add_comm_group N₂] [semimodule R N₂] | ||
[add_comm_monoid M] [semimodule R M] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use variables
for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't do this because there is already a global R
variable in the file with an associated semiring
. It's frustrating that def ... {R : Type*}
can shadow variables, but section
variables {R : Type*}
def ...
can't.
I guess I'll just introduce an R'
and use that instead...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🎉
bors d+
✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with |
Do you think it's worth citing the reference in the PR comment (and adding it to |
@@ -281,6 +281,13 @@ @InProceedings{ fuerer-lochbihler-schneider-traytel2020 | |||
bibsource = {dblp computer science bibliography, https://dblp.org} | |||
} | |||
|
|||
@Inproceedings{ Gallier2011Notes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was what "semantic scholar" suggested, but I have no idea what the right choice is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as far as doc-gen
is concerned.
@bryangingechen, does the way I've included the reference look ok to you? |
@@ -281,6 +281,13 @@ @InProceedings{ fuerer-lochbihler-schneider-traytel2020 | |||
bibsource = {dblp computer science bibliography, https://dblp.org} | |||
} | |||
|
|||
@Inproceedings{ Gallier2011Notes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as far as doc-gen
is concerned.
bors r+ |
This implements a variant of the multiplication defined in the second half of [Proposition 22.24 of "Notes on Differential Geometry and Lie Groups" (Jean Gallier)](https://www.cis.upenn.edu/~cis610/diffgeom-n.pdf): ![image](https://user-images.githubusercontent.com/425260/104042315-3dfe7380-51d2-11eb-9b3a-bbbb52d180f0.png) Despite what the commit generated by bors may claim, none of this is @zhangir-azerbayev's work Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
bors r- Commit has the wrong main author, let me try again |
Canceled. |
This implements a variant of the multiplication defined in the second half of [Proposition 22.24 of "Notes on Differential Geometry and Lie Groups" (Jean Gallier)](https://www.cis.upenn.edu/~cis610/diffgeom-n.pdf): ![image](https://user-images.githubusercontent.com/425260/104042315-3dfe7380-51d2-11eb-9b3a-bbbb52d180f0.png)
71d61e3
to
6d7c47b
Compare
bors r+ |
This implements a variant of the multiplication defined in the second half of [Proposition 22.24 of "Notes on Differential Geometry and Lie Groups" (Jean Gallier)](https://www.cis.upenn.edu/~cis610/diffgeom-n.pdf): ![image](https://user-images.githubusercontent.com/425260/104042315-3dfe7380-51d2-11eb-9b3a-bbbb52d180f0.png)
Pull request successfully merged into master. Build succeeded: |
This implements a variant of the multiplication defined in the second half of [Proposition 22.24 of "Notes on Differential Geometry and Lie Groups" (Jean Gallier)](https://www.cis.upenn.edu/~cis610/diffgeom-n.pdf): ![image](https://user-images.githubusercontent.com/425260/104042315-3dfe7380-51d2-11eb-9b3a-bbbb52d180f0.png)
This implements a variant of the multiplication defined in the second half of Proposition 22.24 of "Notes on Differential Geometry and Lie Groups" (Jean Gallier):
Before this gets merged I'll want to squash the commits to remove @zhangir-azerbayev from the history, as none of the code changed in this PR is theirs.
Resolved Dependencies
linear_map.comp_multilinear_map_dom_dom_congr
#5270subsingleton (semimodule ℕ M)
#5396ℕ
andℤ
is_scalar_tower
andsmul_comm_class
instances to a specific definition ofsmul
#5509