-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ring_theory/algebra): move instances about complex to get rid o…
…f dependency (#2549) Previously `ring_theory.algebra` imported the complex numbers. This PR moves some instances in order to get rid of that dependency.
- Loading branch information
1 parent
948d0ff
commit fd3afb4
Showing
5 changed files
with
27 additions
and
14 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,24 @@ | ||
/- | ||
Copyright (c) 2020 Alexander Bentkamp, Sébastien Gouëzel. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Alexander Bentkamp, Sébastien Gouëzel | ||
-/ | ||
import data.complex.basic ring_theory.algebra | ||
/-! | ||
This file contains two instance, the fact the ℂ is an ℝ algebra, | ||
and an instance to view any complex vector space as a | ||
real vector space | ||
-/ | ||
noncomputable theory | ||
|
||
namespace complex | ||
|
||
instance algebra_over_reals : algebra ℝ ℂ := (ring_hom.of coe).to_algebra | ||
|
||
end complex | ||
|
||
/- Register as an instance (with low priority) the fact that a complex vector space is also a real | ||
vector space. -/ | ||
instance module.complex_to_real (E : Type*) [add_comm_group E] [module ℂ E] : module ℝ E := | ||
module.restrict_scalars ℝ ℂ E | ||
attribute [instance, priority 900] module.complex_to_real |
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
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