AlgebraicAnalysis/Module/SplitLatticePresentation.lean

AlgebraicAnalysis library · bbbbf3fc358ca8100b158cec4cf47f336ab70163

1 module
2 public import Mathlib.RingTheory.LocalRing.Module
3 public import Mathlib.LinearAlgebra.Matrix.Basis
4 
5 @[expose] public section
6 
7 /-!
8 # Matrix coordinates for a finite-rank direct summand
9 
10 This file contains the coordinate-free-to-matrix step used by the general
11 tangent-limit criterion.  A complemented submodule of a finite coordinate
12 module over a local ring is finite projective, hence finite free.  Choosing a
13 basis only inside the proof produces a column matrix and a retraction matrix.
14 The matrices split, and their columns span exactly the original submodule.
15 -/
16 
17 namespace AlgebraicAnalysis.SplitLatticePresentation
18 
19 noncomputable section
20 
21 variable {R : Type*} [CommRing R] [IsLocalRing R]
22 variable {ι : Type*} [Fintype ι] [DecidableEq ι]
23 
24 /-- A matrix presentation constructed from a direct summand, with no chosen
25 basis or retraction in the input. -/
26 structure SplitMatrixPresentation
27     (L : Submodule R (ι → R)) (r : ℕ) where
28   /-- Column matrix for the inclusion of the summand. -/
29   B : Matrix ι (Fin r) R
30   /-- Retraction matrix for the chosen summand coordinates. -/
31   C : Matrix (Fin r) ι R
32   leftInverse : C * B = 1
33   columnsSpan :
34     Submodule.span R (Set.range fun j => fun i => B i j) = L
35 
36 /-- A finite-rank complemented submodule of a finite coordinate module over a
37 local ring has split matrix coordinates.  Finiteness descends along the
38 projection onto the summand, projectivity comes from the split inclusion, and
39 finite flat modules over local rings are free. -/
40 theorem exists_splitMatrixPresentation
41     (L L' : Submodule R (ι → R)) (hcompl : IsCompl L L') (r : ℕ)
42     (hrank : Module.finrank R L = r) :
43     Nonempty (SplitMatrixPresentation L r) := by
44   let p : (ι → R) →ₗ[R] L := L.projectionOnto L' hcompl
45   let : Module.Finite R L :=
46     Module.Finite.of_surjective p (Submodule.projectionOnto_surjective hcompl)
47   let : Module.Projective R L :=
48     Module.Projective.of_split L.subtype p
49       (Submodule.projectionOnto_comp_subtype hcompl)
50   let : Module.Flat R L := Module.Flat.of_projective
51   let : Module.Free R L := Module.free_of_flat_of_isLocalRing
52   let b : Module.Basis (Fin r) R L :=
53     Module.finBasisOfFinrankEq R L hrank
54   let e : Module.Basis ι R (ι → R) := Pi.basisFun R ι
55   let B : Matrix ι (Fin r) R := LinearMap.toMatrix b e L.subtype
56   let C : Matrix (Fin r) ι R := LinearMap.toMatrix e b p
57   refine ⟨{
58     B := B
59     C := C
60     leftInverse := ?_
61     columnsSpan := ?_ }⟩
62   · have hmatrix := LinearMap.toMatrix_comp b e b p L.subtype
63     rw [Submodule.projectionOnto_comp_subtype hcompl,
64       LinearMap.toMatrix_id] at hmatrix
65     simpa [B, C] using hmatrix.symm
66   · have hcolumns :
67         (fun j : Fin r => fun i => B i j) =
68           fun j => (b j : ι → R) := by
69       funext j i
70       simp [B, e, LinearMap.toMatrix_apply, Pi.basisFun_repr]
71     rw [hcolumns]
72     have himage :
73         L.subtype '' Set.range b =
74           Set.range (fun j => (b j : ι → R)) := by
75       ext x
76       simp only [Set.mem_image, Set.mem_range, Submodule.coe_subtype,
77         exists_exists_eq_and]
78     rw [← himage, ← Submodule.map_span, b.span_eq, Submodule.map_top]
79     exact Submodule.range_subtype (p := L)
80 
81 /-- Property-valued form: no particular complement is part of the input. -/
82 theorem exists_splitMatrixPresentation_of_isComplemented
83     (L : Submodule R (ι → R)) (hcompl : IsComplemented L) (r : ℕ)
84     (hrank : Module.finrank R L = r) :
85     Nonempty (SplitMatrixPresentation L r) := by
86   obtain ⟨L', hLL'⟩ := hcompl
87   exact exists_splitMatrixPresentation L L' hLL' r hrank
88 
89 #print axioms exists_splitMatrixPresentation
90 #print axioms exists_splitMatrixPresentation_of_isComplemented
91 
92 end
93 end AlgebraicAnalysis.SplitLatticePresentation
94