-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move IsLinearMap theorems to their own file (#14116)
- Loading branch information
1 parent
fd27592
commit f029851
Showing
4 changed files
with
51 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/- | ||
Copyright (c) 2019 Alexander Bentkamp. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Alexander Bentkamp | ||
-/ | ||
|
||
import Mathlib.Algebra.Module.Prod | ||
import Mathlib.Algebra.Module.LinearMap.Basic | ||
import Mathlib.Tactic.Abel | ||
|
||
#align_import linear_algebra.basic from "leanprover-community/mathlib"@"9d684a893c52e1d6692a504a118bfccbae04feeb" | ||
|
||
/-! | ||
# Addition and subtraction are linear maps from the product space | ||
Note that these results use `IsLinearMap`, which is mostly discouraged. | ||
## Tags | ||
linear algebra, vector space, module | ||
-/ | ||
|
||
variable {R : Type*} {M : Type*} [Semiring R] | ||
|
||
namespace IsLinearMap | ||
|
||
theorem isLinearMap_add [AddCommMonoid M] [Module R M] : | ||
IsLinearMap R fun x : M × M => x.1 + x.2 := by | ||
apply IsLinearMap.mk | ||
· intro x y | ||
simp only [Prod.fst_add, Prod.snd_add] | ||
abel | ||
· intro x y | ||
simp [smul_add] | ||
#align is_linear_map.is_linear_map_add IsLinearMap.isLinearMap_add | ||
|
||
theorem isLinearMap_sub [AddCommGroup M] [Module R M] : | ||
IsLinearMap R fun x : M × M => x.1 - x.2 := by | ||
apply IsLinearMap.mk | ||
· intro x y | ||
-- porting note (#10745): was `simp [add_comm, add_left_comm, sub_eq_add_neg]` | ||
rw [Prod.fst_add, Prod.snd_add] | ||
abel | ||
· intro x y | ||
simp [smul_sub] | ||
#align is_linear_map.is_linear_map_sub IsLinearMap.isLinearMap_sub | ||
|
||
end IsLinearMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters