-
Notifications
You must be signed in to change notification settings - Fork 0
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
hom approach of tensor of type p q #1
Open
jjaassoonn
wants to merge
19
commits into
main
Choose a base branch
from
zjj/test-hom-approach
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4c39962
preliminary
1e7756f
Update PiTensorProduct.lean
Yichen-Feng bab9b16
commit for now
819a0de
test
1311268
finish
cecef99
perfection
aef8b32
no induction
202f756
a bit extending scalar
89b3d1b
more extending scalars
cbc3a57
finish extend scalars
6c6a17a
reorganize
b1883ec
finish gal action defintion
45f28c2
some linear algebra
cf4715b
sorry free
f46d888
for now
cfd0f75
a bunch of sorries which I am not sure if they are correct
c197b92
okay, this doesn't work
0bf2917
for now
0649862
correct tiwsted form
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,155 @@ | ||
|
||
|
||
-- #exit | ||
-- section PiTensorProduct.fin | ||
|
||
-- variable {n : ℕ} (k K : Type*) [CommSemiring k] [CommSemiring K] [Algebra k K] | ||
-- variable (V : Fin (n + 1) → Type*) [Π i, AddCommMonoid (V i)] [Π i, Module k (V i)] | ||
-- variable (W : Fin (n + 1) → Type*) [Π i, AddCommMonoid (W i)] [Π i, Module k (W i)] | ||
|
||
-- def PiTensorProduct.succ : (⨂[k] i, V i) ≃ₗ[k] V 0 ⊗[k] (⨂[k] i : Fin n, V i.succ) := | ||
-- LinearEquiv.ofLinear | ||
-- (PiTensorProduct.lift | ||
-- { toFun := fun v => v 0 ⊗ₜ[k] tprod k fun i => v i.succ | ||
-- map_add' := by | ||
-- intro _ v i x y | ||
-- simp only | ||
-- by_cases h : i = 0 | ||
-- · subst h | ||
-- simp only [Function.update_same] | ||
-- rw [add_tmul] | ||
-- congr 3 <;> | ||
-- · ext i | ||
-- rw [Function.update_noteq (h := Fin.succ_ne_zero i), | ||
-- Function.update_noteq (h := Fin.succ_ne_zero i)] | ||
|
||
-- rw [Function.update_noteq (Ne.symm h), Function.update_noteq (Ne.symm h), | ||
-- Function.update_noteq (Ne.symm h), ← tmul_add] | ||
-- congr 1 | ||
-- have eq1 : (fun j : Fin n ↦ Function.update v i (x + y) j.succ) = | ||
-- Function.update (fun i : Fin n ↦ v i.succ) (i.pred h) | ||
-- (cast (by simp) x + cast (by simp) y):= by | ||
-- ext j | ||
-- simp only [Function.update, eq_mpr_eq_cast] | ||
-- aesop | ||
-- rw [eq1, (tprod k).map_add] | ||
-- congr 2 <;> | ||
-- ext j <;> | ||
-- simp only [Function.update] <;> | ||
-- have eq : (j = i.pred h) = (j.succ = i) := by | ||
-- rw [← iff_eq_eq] | ||
-- constructor | ||
-- · rintro rfl | ||
-- exact Fin.succ_pred i h | ||
-- · rintro rfl | ||
-- simp only [Fin.pred_succ] | ||
-- · simp_rw [eq] <;> aesop | ||
-- · simp_rw [eq] <;> aesop | ||
-- map_smul' := by | ||
-- intro _ v i a x | ||
-- simp only | ||
-- rw [smul_tmul', smul_tmul] | ||
-- by_cases h : i = 0 | ||
-- · subst h | ||
-- simp only [Function.update_same, tmul_smul] | ||
-- rw [smul_tmul'] | ||
-- congr 2 | ||
-- ext j | ||
-- rw [Function.update_noteq (Fin.succ_ne_zero j), | ||
-- Function.update_noteq (Fin.succ_ne_zero j)] | ||
-- · rw [Function.update_noteq (Ne.symm h), Function.update_noteq (Ne.symm h)] | ||
-- congr 1 | ||
-- have eq1 : (fun j : Fin n ↦ Function.update v i (a • x) j.succ) = | ||
-- Function.update (fun i : Fin n ↦ v i.succ) (i.pred h) | ||
-- (a • cast (by simp) x):= by | ||
-- ext j | ||
-- simp only [Function.update, eq_mpr_eq_cast] | ||
-- aesop | ||
-- rw [eq1, (tprod k).map_smul] | ||
-- congr | ||
-- ext j | ||
-- simp only [Function.update] | ||
-- have eq : (j = i.pred h) = (j.succ = i) := by | ||
-- rw [← iff_eq_eq] | ||
-- constructor | ||
-- · rintro rfl | ||
-- exact Fin.succ_pred i h | ||
-- · rintro rfl | ||
-- simp only [Fin.pred_succ] | ||
-- simp_rw [eq] <;> aesop }) | ||
-- (TensorProduct.lift | ||
-- { toFun := fun v₀ => PiTensorProduct.lift | ||
-- { toFun := fun v => tprod k $ Fin.cases v₀ v | ||
-- map_add' := sorry | ||
-- map_smul' := sorry } | ||
-- map_add' := sorry | ||
-- map_smul' := sorry }) sorry sorry | ||
|
||
-- end PiTensorProduct.fin | ||
|
||
|
||
-- section PiTensorProduct.fin | ||
|
||
-- variable {k K : Type*} [Field k] [Field K] [Algebra k K] | ||
-- variable {V W : Type*} [AddCommGroup V] [AddCommGroup W] [Module k V] [Module k W] | ||
|
||
-- variable (k) in | ||
-- def zeroPower (ι : Type*) (V : ι → Type*) [hι: IsEmpty ι] | ||
-- [∀ i, AddCommGroup $ V i] [∀ i, Module k $ V i]: (⨂[k] i : ι, V i) ≃ₗ[k] k := | ||
-- LinearEquiv.ofLinear | ||
-- (PiTensorProduct.lift | ||
-- { toFun := fun _ ↦ 1 | ||
-- map_add' := by | ||
-- intros; exact hι.elim (by assumption) | ||
-- map_smul' := by | ||
-- intros; exact hι.elim (by assumption) }) | ||
-- { toFun := fun a ↦ a • tprod k fun x ↦ hι.elim x | ||
-- map_add' := by | ||
-- intro x y | ||
-- simp only [self_eq_add_right, add_smul] | ||
-- map_smul' := by | ||
-- intro m x | ||
-- simp [mul_smul] | ||
-- } | ||
-- (by | ||
-- refine LinearMap.ext_ring ?h | ||
-- simp only [LinearMap.coe_comp, LinearMap.coe_mk, AddHom.coe_mk, Function.comp_apply, one_smul, | ||
-- lift.tprod, MultilinearMap.coe_mk, LinearMap.id_coe, id_eq]) | ||
-- (by | ||
-- ext x | ||
-- simp only [LinearMap.compMultilinearMap_apply, LinearMap.coe_comp, LinearMap.coe_mk, | ||
-- AddHom.coe_mk, Function.comp_apply, lift.tprod, MultilinearMap.coe_mk, one_smul, | ||
-- LinearMap.id_coe, id_eq] | ||
-- refine MultilinearMap.congr_arg (tprod k) ?_ | ||
-- ext y | ||
-- exact hι.elim y) | ||
|
||
-- variable (k) in | ||
-- def PiTensorProduct.tensorCommutes (n : ℕ) : | ||
-- ∀ (V W : Fin n → Type*) | ||
-- [∀ i, AddCommGroup (V i)] [∀ i, Module k (V i)] | ||
-- [∀ i, AddCommGroup (W i)] [∀ i, Module k (W i)], | ||
-- (⨂[k] i : Fin n, V i) ⊗[k] (⨂[k] i : Fin n, W i) ≃ₗ[k] | ||
-- ⨂[k] i : Fin n, (V i ⊗[k] W i) := | ||
-- n.recOn | ||
-- (fun V W _ _ _ _ ↦ LinearEquiv.symm $ zeroPower k (Fin 0) (fun i : (Fin 0) ↦ V i ⊗[k] W i) ≪≫ₗ | ||
-- (TensorProduct.lid k k).symm ≪≫ₗ TensorProduct.congr (zeroPower k (Fin 0) _).symm | ||
-- (zeroPower k (Fin 0) _).symm) | ||
-- (fun m em V W _ _ _ _ ↦ | ||
-- (TensorProduct.congr (PiTensorProduct.succ k (fun i : Fin (m+1) ↦ V i)) | ||
-- (PiTensorProduct.succ k (fun i : Fin (m+1) ↦ W i))) ≪≫ₗ | ||
-- (TensorProduct.AlgebraTensorModule.tensorTensorTensorComm k k _ _ _ _) ≪≫ₗ | ||
-- LinearEquiv.symm | ||
-- ((PiTensorProduct.succ (n := m) k (V := fun i : Fin (m.succ) ↦ (V i ⊗[k] W i))) ≪≫ₗ | ||
-- TensorProduct.congr (LinearEquiv.refl _ _) | ||
-- (em (fun i => V i.succ) (fun i => W i.succ)).symm)) | ||
|
||
-- theorem PiTensorProduct.tensorCommutes_apply (n : ℕ) (V W : Fin n → Type*) | ||
-- [hi1 : ∀ i, AddCommGroup (V i)] [hi2 : ∀ i, Module k (V i)] | ||
-- [hi1' : ∀ i, AddCommGroup (W i)] [hi2' : ∀ i, Module k (W i)] | ||
-- (v : Π i : Fin n, V i) (w : Π i : Fin n, W i) : | ||
-- PiTensorProduct.tensorCommutes k n V W ((tprod k v) ⊗ₜ (tprod k w)) = | ||
-- tprod k (fun i ↦ v i ⊗ₜ w i) := by | ||
-- sorry | ||
|
||
-- end PiTensorProduct.fin |
File renamed without changes.
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,57 @@ | ||
import BrauerGroup.TensorOfTypePQ.VectorSpaceWithTensorOfTypePQ | ||
|
||
suppress_compilation | ||
|
||
open TensorProduct PiTensorProduct | ||
|
||
variable {k K : Type*} {p q : ℕ} [Field k] [Field K] [Algebra k K] | ||
variable {V W : VectorSpaceWithTensorOfType k p q} | ||
variable {ιV ιW : Type*} (bV : Basis ιV k V) (bW : Basis ιW k W) | ||
|
||
open VectorSpaceWithTensorOfType | ||
|
||
set_option maxHeartbeats 500000 in | ||
|
||
lemma indeucedByGalAux_comm (σ : K ≃ₐ[k] K) | ||
(f : V.extendScalars K bV ⟶ W.extendScalars K bW) : | ||
(TensorOfType.extendScalars K bW W.tensor ∘ₗ | ||
PiTensorProduct.map fun _ ↦ LinearMap.galAct σ f.toLinearMap) = | ||
(PiTensorProduct.map fun _ ↦ LinearMap.galAct σ f.toLinearMap) ∘ₗ | ||
TensorOfType.extendScalars K bV V.tensor := by | ||
apply_fun LinearMap.restrictScalars k using LinearMap.restrictScalars_injective k | ||
rw [LinearMap.restrictScalars_comp, LinearMap.restrictScalars_comp, | ||
VectorSpaceWithTensorOfType.galAct_tensor_power_eq, ← LinearMap.comp_assoc, | ||
VectorSpaceWithTensorOfType.galAct_tensor_power_eq] | ||
have := VectorSpaceWithTensorOfType.oneTMulPow_comm_sq bW σ.toAlgHom | ||
simp only [extendScalars_carrier, extendScalars_tensor, AlgEquiv.toAlgHom_eq_coe] at this | ||
set lhs := _; change lhs = _ | ||
rw [show lhs = (AlgHom.oneTMulPow p bW ↑σ ∘ₗ LinearMap.restrictScalars k (TensorOfType.extendScalars K bW W.tensor)) ∘ₗ | ||
LinearMap.restrictScalars k (PiTensorProduct.map fun _ ↦ f.toLinearMap) ∘ₗ | ||
AlgHom.oneTMulPow q bV σ.symm.toAlgHom by | ||
simp only [AlgEquiv.toAlgHom_eq_coe, extendScalars_carrier, lhs] | ||
rw [this]] | ||
clear lhs | ||
rw [LinearMap.comp_assoc, ← LinearMap.comp_assoc (f := AlgHom.oneTMulPow q bV _)] | ||
have eq := congr(LinearMap.restrictScalars k $f.comm) | ||
simp only [extendScalars_carrier, extendScalars_tensor, LinearMap.restrictScalars_comp] at eq | ||
rw [eq] | ||
rw [LinearMap.comp_assoc] | ||
have := VectorSpaceWithTensorOfType.oneTMulPow_comm_sq bV σ.symm.toAlgHom | ||
simp only [extendScalars_carrier, extendScalars_tensor, AlgEquiv.toAlgHom_eq_coe] at this | ||
set lhs := _; change lhs = _ | ||
rw [show lhs = AlgHom.oneTMulPow p bW ↑σ ∘ₗ | ||
LinearMap.restrictScalars k (PiTensorProduct.map fun _ ↦ f.toLinearMap) ∘ₗ | ||
AlgHom.oneTMulPow p bV ↑σ.symm ∘ₗ | ||
LinearMap.restrictScalars k (TensorOfType.extendScalars K bV V.tensor) by | ||
simp only [AlgEquiv.toAlgHom_eq_coe, extendScalars_carrier, lhs] | ||
rw [this]] | ||
clear lhs | ||
simp only [extendScalars_carrier, ← LinearMap.comp_assoc] | ||
rfl | ||
|
||
def inducedByGal (σ : K ≃ₐ[k] K) (f : V.extendScalars K bV ⟶ W.extendScalars K bW) : | ||
V.extendScalars K bV ⟶ W.extendScalars K bW where | ||
__ := LinearMap.galAct σ f.toLinearMap | ||
comm := by | ||
simp only [extendScalars_carrier, extendScalars_tensor] | ||
apply indeucedByGalAux_comm |
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,107 @@ | ||
import Mathlib.RingTheory.TensorProduct.Basic | ||
import Mathlib.LinearAlgebra.TensorPower | ||
|
||
suppress_compilation | ||
|
||
open TensorProduct | ||
|
||
section | ||
|
||
variable (k K V W W' : Type*) | ||
variable {p q : ℕ} | ||
variable [CommSemiring k] [Semiring K] [Algebra k K] | ||
variable [AddCommMonoid V] [Module k V] | ||
variable [AddCommMonoid W] [Module k W] | ||
variable [AddCommMonoid W'] [Module k W'] | ||
|
||
variable {k V W} in | ||
def _root_.LinearMap.extendScalars (f : V →ₗ[k] W) : K ⊗[k] V →ₗ[K] K ⊗[k] W := | ||
{ f.lTensor K with | ||
map_smul' := fun a x => by | ||
simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, RingHom.id_apply] | ||
induction x using TensorProduct.induction_on with | ||
| zero => simp | ||
| tmul b v => | ||
simp only [smul_tmul', smul_eq_mul, LinearMap.lTensor_tmul] | ||
| add => aesop } | ||
|
||
variable {k V W} in | ||
@[simp] | ||
lemma _root_.LinearMap.extendScalars_apply (f : V →ₗ[k] W) (a : K) (v : V) : | ||
LinearMap.extendScalars K f (a ⊗ₜ v) = a ⊗ₜ f v := by | ||
simp only [LinearMap.extendScalars, LinearMap.coe_mk, LinearMap.coe_toAddHom, | ||
LinearMap.lTensor_tmul] | ||
|
||
@[simp] | ||
lemma _root_.LinearMap.extendScalars_id : | ||
LinearMap.extendScalars K (LinearMap.id : V →ₗ[k] V) = LinearMap.id := by | ||
ext | ||
simp | ||
|
||
lemma _root_.LinearMap.extendScalars_comp (f : V →ₗ[k] W) (g : W →ₗ[k] W') : | ||
(g ∘ₗ f).extendScalars K = g.extendScalars K ∘ₗ f.extendScalars K := by | ||
ext v | ||
simp | ||
|
||
variable {k K V W} in | ||
def _root_.LinearMap.galAct (σ : K ≃ₐ[k] K) (f : K ⊗[k] V →ₗ[K] K ⊗[k] W) : | ||
K ⊗[k] V →ₗ[K] K ⊗[k] W where | ||
toFun := LinearMap.rTensor W σ.toLinearMap ∘ f ∘ LinearMap.rTensor V σ.symm.toLinearMap | ||
map_add' := by aesop | ||
map_smul' a x := by | ||
simp only [Function.comp_apply, RingHom.id_apply] | ||
induction x using TensorProduct.induction_on with | ||
| zero => simp | ||
| tmul b x => | ||
simp only [smul_tmul', smul_eq_mul, LinearMap.rTensor_tmul, AlgEquiv.toLinearMap_apply, | ||
_root_.map_mul] | ||
rw [show (σ.symm a * σ.symm b) ⊗ₜ[k] x = σ.symm (a * b) • ((1 : K) ⊗ₜ x) by | ||
simp [smul_tmul'], map_smul] | ||
have mem : f (1 ⊗ₜ[k] x) ∈ (⊤ : Submodule k _):= ⟨⟩ | ||
rw [← span_tmul_eq_top k K W, mem_span_set] at mem | ||
obtain ⟨c, hc, (eq1 : (∑ i in c.support, _ • _) = _)⟩ := mem | ||
choose xᵢ yᵢ hxy using hc | ||
have eq1 : f (1 ⊗ₜ[k] x) = ∑ i in c.support.attach, (c i.1 • xᵢ i.2) ⊗ₜ[k] yᵢ i.2 := by | ||
rw [← eq1, ← Finset.sum_attach] | ||
refine Finset.sum_congr rfl fun i _ => ?_ | ||
rw [← smul_tmul', hxy i.2] | ||
rw [eq1, Finset.smul_sum, map_sum] | ||
simp_rw [smul_tmul', LinearMap.rTensor_tmul, smul_eq_mul, AlgEquiv.toLinearMap_apply, | ||
_root_.map_mul, AlgEquiv.apply_symm_apply] | ||
rw [show σ.symm b ⊗ₜ[k] x = σ.symm b • (1 ⊗ₜ x) by simp [smul_tmul'], map_smul, eq1, | ||
Finset.smul_sum, map_sum] | ||
simp_rw [smul_tmul', LinearMap.rTensor_tmul, AlgEquiv.toLinearMap_apply, smul_eq_mul, | ||
_root_.map_mul, AlgEquiv.apply_symm_apply] | ||
rw [Finset.smul_sum] | ||
simp_rw [smul_tmul', smul_eq_mul, mul_assoc] | ||
| add => aesop | ||
|
||
@[simp] | ||
lemma _root_.LinearMap.galAct_extendScalars_apply | ||
(σ : K ≃ₐ[k] K) (f : K ⊗[k] V →ₗ[K] K ⊗[k] W) (a : K) (v : V) : | ||
LinearMap.galAct σ f (a ⊗ₜ v) = | ||
LinearMap.rTensor W σ.toLinearMap (f $ σ.symm a ⊗ₜ v) := by | ||
simp only [LinearMap.galAct, LinearMap.coe_mk, AddHom.coe_mk, Function.comp_apply, | ||
LinearMap.rTensor_tmul, AlgEquiv.toLinearMap_apply] | ||
|
||
@[simp] | ||
lemma _root_.LinearMap.galAct_extendScalars_apply' | ||
(σ : K ≃ₐ[k] K) (f : V →ₗ[k] W) (a : K) (v : V) : | ||
LinearMap.galAct σ (f.extendScalars K) (a ⊗ₜ v) = a ⊗ₜ f v := by | ||
simp only [LinearMap.galAct, LinearMap.coe_mk, AddHom.coe_mk, Function.comp_apply, | ||
LinearMap.rTensor_tmul, AlgEquiv.toLinearMap_apply, LinearMap.extendScalars_apply, | ||
AlgEquiv.apply_symm_apply] | ||
|
||
lemma _root_.LinearMap.restrictScalars_comp | ||
{k K : Type*} [Semiring k] [Semiring K] | ||
{V W W' : Type*} [AddCommMonoid V] [AddCommMonoid W] [AddCommMonoid W'] | ||
[Module k V] [Module k W] [Module k W'] | ||
[Module K V] [Module K W] [Module K W'] | ||
[LinearMap.CompatibleSMul V W k K] [LinearMap.CompatibleSMul W W' k K] | ||
[LinearMap.CompatibleSMul V W' k K] | ||
(f : V →ₗ[K] W) (g : W →ₗ[K] W') : | ||
(LinearMap.restrictScalars k (g ∘ₗ f)) = | ||
LinearMap.restrictScalars k g ∘ₗ LinearMap.restrictScalars k f := by | ||
ext; rfl | ||
|
||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is the action of$\mathrm{Gal}(K/k)$ on $K$ -morphism between $V_K$ and $W_K$