-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add semialgebra maps and refactor finiteadelering basechange
- Loading branch information
Showing
7 changed files
with
203 additions
and
110 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,17 @@ | ||
import Mathlib | ||
import FLT.Mathlib.Algebra.Algebra.Hom | ||
|
||
variable {R S : Type*} [CommSemiring R] [CommSemiring S] {φ : R →+* S} | ||
{A B : Type*} [CommSemiring A] [Semiring B] [Algebra R A] [Algebra S B] | ||
|
||
open scoped TensorProduct in | ||
noncomputable | ||
def SemialgHom.baseChange_of_algebraMap [Algebra R S] (ψ : A →ₛₐ[algebraMap R S] B) : | ||
S ⊗[R] A →ₐ[S] B := | ||
letI : Algebra R B := Algebra.compHom _ (algebraMap R S) | ||
have : IsScalarTower R S B := .of_algebraMap_eq fun _ ↦ rfl | ||
let ρ : A →ₐ[R] B := { | ||
toRingHom := ψ.toRingHom | ||
commutes' := ψ.commutes | ||
} | ||
Algebra.TensorProduct.lift (Algebra.ofId S _) ρ fun s a ↦ Algebra.commutes s (ρ a) |
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,68 @@ | ||
import Mathlib.Algebra.Algebra.Hom | ||
|
||
section semialghom | ||
|
||
/-- Let `φ : R →+* S` be a ring homomorphism, let `A` be an `R`-algebra and let `B` be | ||
an `S`-algebra. Then `SemialgHom φ A B` or `A →ₛₐ[φ] B` is the ring homomorphisms `ψ : A →+* B` | ||
making lying above `φ` (i.e. such that `ψ (r • a) = φ r • ψ a`). | ||
-/ | ||
structure SemialgHom {R S : Type*} [CommSemiring R] [CommSemiring S] (φ : R →+* S) | ||
(A B : Type*) [Semiring A] [Semiring B] [Algebra R A] [Algebra S B] | ||
extends A →ₛₗ[φ] B, RingHom A B | ||
|
||
@[inherit_doc SemialgHom] | ||
infixr:25 " →ₛₐ " => SemialgHom _ | ||
|
||
@[inherit_doc] | ||
notation:25 A " →ₛₐ[" φ:25 "] " B:0 => SemialgHom φ A B | ||
|
||
variable {R S : Type*} [CommSemiring R] [CommSemiring S] (φ : R →+* S) | ||
(A B : Type*) [Semiring A] [Semiring B] [Algebra R A] [Algebra S B] | ||
|
||
instance instFunLike : FunLike (A →ₛₐ[φ] B) A B where | ||
coe f := f.toFun | ||
coe_injective' f g h := by | ||
cases f | ||
cases g | ||
congr | ||
exact DFunLike.coe_injective' h | ||
|
||
variable {φ} {A} {B} in | ||
lemma SemialgHom.map_smul (ψ : A →ₛₐ[φ] B) (m : R) (x : A) : ψ (m • x) = φ m • ψ x := | ||
LinearMap.map_smul' ψ.toLinearMap m x | ||
|
||
end semialghom | ||
|
||
section semialghomclass | ||
|
||
class SemialgHomClass (F : Type*) {R S : outParam Type*} | ||
[CommSemiring R] [CommSemiring S] (φ : outParam (R →+* S)) (A B : outParam Type*) | ||
[Semiring A] [Semiring B] [Algebra R A] [Algebra S B] | ||
[FunLike F A B] extends SemilinearMapClass F φ A B, RingHomClass F A B | ||
|
||
variable (F : Type*) {R S : Type*} | ||
[CommSemiring R] [CommSemiring S] (φ : R →+* S) (A B : outParam Type*) | ||
[Semiring A] [Semiring B] [Algebra R A] [Algebra S B] | ||
[FunLike F A B] [SemialgHomClass F φ A B] | ||
|
||
instance SemialgHomClass.instSemialgHom : SemialgHomClass (A →ₛₐ[φ] B) φ A B where | ||
map_add ψ := ψ.map_add | ||
map_smulₛₗ ψ := ψ.map_smulₛₗ | ||
map_mul ψ := ψ.map_mul | ||
map_one ψ := ψ.map_one | ||
map_zero ψ := ψ.map_zero | ||
|
||
end semialghomclass | ||
|
||
section semialghom | ||
|
||
variable {R S : Type*} [CommSemiring R] [CommSemiring S] {φ : R →+* S} | ||
{A B : Type*} [Semiring A] [Semiring B] [Algebra R A] [Algebra S B] | ||
|
||
lemma SemialgHom.commutes (ψ : A →ₛₐ[φ] B) (r : R) : | ||
ψ (algebraMap R A r) = algebraMap S B (φ r) := by | ||
have := ψ.map_smul r 1 | ||
rw [Algebra.smul_def, mul_one, map_one] at this | ||
rw [this, Algebra.smul_def, mul_one] | ||
|
||
end semialghom |
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,9 @@ | ||
import Mathlib.Algebra.Algebra.Pi | ||
import FLT.Mathlib.Algebra.Algebra.Hom | ||
|
||
def Pi.semialgHom {I : Type*} {R S : Type*} (f : I → Type*) [CommSemiring R] [CommSemiring S] | ||
(φ : R →+* S) [s : (i : I) → Semiring (f i)] [(i : I) → Algebra S (f i)] {A : Type*} | ||
[Semiring A] [Algebra R A] (g : (i : I) → A →ₛₐ[φ] f i) : | ||
A →ₛₐ[φ] (i : I) → f i where | ||
__ := Pi.ringHom fun i ↦ (g i).toRingHom | ||
map_smul' r a := by ext; simp |
Oops, something went wrong.