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] - feat(linear_algebra/{multilinear,alternating): add of_subsingleton #9196

Closed
wants to merge 1 commit into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Sep 14, 2021

This was refactored from the koszul_cx branch, something I mentioned doing in this Zulip thread.

The original version was:

def multilinear_map.of_subsingleton (ι : Type v) [subsingleton ι] [inhabited ι] {N : Type u}
  [add_comm_group N] [module R N] (f : M →ₗ[R] N) : multilinear_map R (λ (i : ι), M) N :=
{ to_fun := λ x, f (x $ default ι),
  map_add' := λ m i x y, by rw subsingleton.elim i (default ι); simp only
    [function.update_same, f.map_add],
  map_smul' := λ m i r x, by rw subsingleton.elim i (default ι); simp only
    [function.update_same, f.map_smul], }

but I decided to remove the f : M →ₗ[R] N argument as it can be added later with (of_subsingleton R M i).comp_linear_map f.

Co-authored-by: Amelia Livingston al3717@ic.ac.uk


Open in Gitpod

Link to the original:

def multilinear_map.of_subsingleton (ι : Type v) [subsingleton ι] [inhabited ι] {N : Type u}
[add_comm_group N] [module R N] (f : M →ₗ[R] N) : multilinear_map R (λ (i : ι), M) N :=
{ to_fun := λ x, f (x $ default ι),
map_add' := λ m i x y, by rw subsingleton.elim i (default ι); simp only
[function.update_same, f.map_add],
map_smul' := λ m i r x, by rw subsingleton.elim i (default ι); simp only
[function.update_same, f.map_smul], }

This was refactored from the `koszul_cx` branch, something I mentioned doing in [this Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/two.20decidable_eq.20instances.20on.20.28fin.201.29.20in.20mathlib.20.3A-.28/near/225596630).

The original version was:
```lean
def multilinear_map.of_subsingleton (ι : Type v) [subsingleton ι] [inhabited ι] {N : Type u}
  [add_comm_group N] [module R N] (f : M →ₗ[R] N) : multilinear_map R (λ (i : ι), M) N :=
{ to_fun := λ x, f (x $ default ι),
  map_add' := λ m i x y, by rw subsingleton.elim i (default ι); simp only
    [function.update_same, f.map_add],
  map_smul' := λ m i r x, by rw subsingleton.elim i (default ι); simp only
    [function.update_same, f.map_smul], }
```
but I decided to remove the `f : M →ₗ[R] N` argument as it can be added later with `(of_subsingleton R M i).comp_linear_map f`.

Co-authored-by: Amelia Livingston <al3717@ic.ac.uk>
@eric-wieser eric-wieser added the awaiting-review The author would like community review of the PR label Sep 14, 2021
@urkud
Copy link
Member

urkud commented Sep 20, 2021

bors merge

@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 Sep 20, 2021
bors bot pushed a commit that referenced this pull request Sep 20, 2021
…9196)

This was refactored from the `koszul_cx` branch, something I mentioned doing in [this Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/two.20decidable_eq.20instances.20on.20.28fin.201.29.20in.20mathlib.20.3A-.28/near/225596630).

The original version was:
```lean
def multilinear_map.of_subsingleton (ι : Type v) [subsingleton ι] [inhabited ι] {N : Type u}
  [add_comm_group N] [module R N] (f : M →ₗ[R] N) : multilinear_map R (λ (i : ι), M) N :=
{ to_fun := λ x, f (x $ default ι),
  map_add' := λ m i x y, by rw subsingleton.elim i (default ι); simp only
    [function.update_same, f.map_add],
  map_smul' := λ m i r x, by rw subsingleton.elim i (default ι); simp only
    [function.update_same, f.map_smul], }
```
but I decided to remove the `f : M →ₗ[R] N` argument as it can be added later with `(of_subsingleton R M i).comp_linear_map f`.

Co-authored-by: Amelia Livingston <al3717@ic.ac.uk>
@bors
Copy link

bors bot commented Sep 20, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(linear_algebra/{multilinear,alternating): add of_subsingleton [Merged by Bors] - feat(linear_algebra/{multilinear,alternating): add of_subsingleton Sep 20, 2021
@bors bors bot closed this Sep 20, 2021
@bors bors bot deleted the eric-wieser/alternating_map.of_unique branch September 20, 2021 06:29
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

2 participants