|
| 1 | +/- |
| 2 | +Copyright (c) 2025 Antoine Chambert-Loir. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Antoine Chambert-Loir |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.RingTheory.TensorProduct.IsBaseChangePi |
| 9 | +public import Mathlib.LinearAlgebra.FreeModule.Basic |
| 10 | + |
| 11 | +/-! # Base change of a free module |
| 12 | +
|
| 13 | +* `IsBaseChange.basis` : the natural basis of the base change of a module with a basis |
| 14 | +
|
| 15 | +* `IsBaseChange.free` : a base change of a free module is free. |
| 16 | +
|
| 17 | +-/ |
| 18 | + |
| 19 | +@[expose] public section |
| 20 | + |
| 21 | +namespace IsBaseChange |
| 22 | + |
| 23 | +variable {R : Type*} [CommSemiring R] |
| 24 | + {S : Type*} [CommSemiring S] [Algebra R S] |
| 25 | + {V : Type*} [AddCommMonoid V] [Module R V] |
| 26 | + {W : Type*} [AddCommMonoid W] [Module R W] [Module S W] [IsScalarTower R S W] |
| 27 | + {ι : Type*} [DecidableEq ι] |
| 28 | + {ε : V →ₗ[R] W} |
| 29 | + |
| 30 | +variable (b : Module.Basis ι R V) (ibc : IsBaseChange S ε) |
| 31 | + |
| 32 | +/-- The basis of a module deduced by base change from a free module with a basis. -/ |
| 33 | +noncomputable def basis : |
| 34 | + Module.Basis ι S W where |
| 35 | + repr := (ibc.equiv.symm.trans (b.repr.baseChange R S _ _)).trans |
| 36 | + (finsuppPow ι (linearMap R S)).equiv |
| 37 | + |
| 38 | +theorem basis_apply (i) : ibc.basis b i = ε (b i) := by |
| 39 | + simp [basis] |
| 40 | + simp [LinearEquiv.baseChange] |
| 41 | + generalize_proofs _ _ _ _ ibcRA |
| 42 | + have : ibcRA.equiv.symm (Finsupp.single i 1) = 1 ⊗ₜ (Finsupp.single i 1) := by |
| 43 | + simp [LinearEquiv.symm_apply_eq, IsBaseChange.equiv_tmul] |
| 44 | + simp [this, IsBaseChange.equiv_tmul] |
| 45 | + |
| 46 | +theorem basis_repr_comp_apply (v i) : |
| 47 | + (ibc.basis b).repr (ε v) i = algebraMap R S (b.repr v i):= by |
| 48 | + conv_lhs => rw [← b.linearCombination_repr v, Finsupp.linearCombination_apply, |
| 49 | + map_finsuppSum, map_finsuppSum] |
| 50 | + simp only [map_smul, Finsupp.sum_apply] |
| 51 | + rw [Finsupp.sum_eq_single i] |
| 52 | + · rw [← IsScalarTower.algebraMap_smul S (b.repr v i) (ε (b i)), |
| 53 | + map_smul, ← ibc.basis_apply] |
| 54 | + simp [Finsupp.single_eq_same, Algebra.algebraMap_eq_smul_one] |
| 55 | + · intro i' _ h |
| 56 | + rw [← IsScalarTower.algebraMap_smul S (b.repr v i') (ε (b i')), map_smul, |
| 57 | + ← ibc.basis_apply] |
| 58 | + simp [Finsupp.single_eq_of_ne (Ne.symm h)] |
| 59 | + · simp |
| 60 | + |
| 61 | +theorem basis_repr_comp (v : V) : |
| 62 | + (ibc.basis b).repr (ε v) = |
| 63 | + Finsupp.mapRange.linearMap (Algebra.linearMap R S) (b.repr v) := by |
| 64 | + ext i |
| 65 | + simp [basis_repr_comp_apply] |
| 66 | + |
| 67 | +variable [Module.Free R V] |
| 68 | + |
| 69 | +include ibc in |
| 70 | +theorem free : Module.Free S W := |
| 71 | + Module.Free.of_basis (ibc.basis (Module.Free.chooseBasis R V)) |
| 72 | + |
| 73 | +end IsBaseChange |
0 commit comments