Skip to content

Commit ae148fb

Browse files
committed
update mathlib + finish DualKoszulComplex + update blueprint names
1 parent efef2cb commit ae148fb

File tree

3 files changed

+27
-79
lines changed

3 files changed

+27
-79
lines changed

LeanCommAlg/Koszul.lean

Lines changed: 14 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -106,84 +106,31 @@ def KoszulComplex (a : M) [Module R M] : CochainComplex (ModuleCat R) ℕ := {
106106
d_comp_d' := by
107107
intro i _ _ hij hjk
108108
simp at hij hjk; subst hij hjk; simp
109-
have conv (j : ℕ) (a : ⋀[R]^j M →ₗ[R] ⋀[R]^(j + 1) M) (b : ⋀[R]^(j + 1) M →ₗ[R] ⋀[R]^(j + 2) M) :
110-
ofHom a ≫ ofHom b = ofHom (b ∘ₗ a) := rfl
111-
rw [conv]
112-
have : i + 1 + 1 = i + 2 := rfl; rw [this]; clear this
109+
rw [← @ofHom_comp]
110+
have : i + 1 + 1 = i + 2 := rfl; rw [this];
113111
rw [koszul_d_squared_zero i a]
114112
rfl
115113
}
116114

117115
-- Self-duality of the Koszul Complex
118116
variable {E : Type*} [AddCommGroup E] [Module R E] [Module.Free R E] [Module.Finite R E]
117+
variable [ CommMonoid (ExteriorAlgebra R E)]
119118

120-
noncomputable def rank_E : ℕ := (Module.rank R E).toNat
121-
def aux_KoszulComplex (e : E) : CochainComplex (ModuleCat R) ℕ := KoszulComplex e
122-
123-
-- im not sure how to "take the dual"
124-
-- i know you have to do `Hom(-, R)` but i dont know how to do that in lean
125-
-- hence, the definition is not complete
126119
#check Module.Dual R (⋀[R]^2 E)
127-
128120
#check (Module.Free R E)
129-
130-
-- Aluffi Lemma 8.4.3
131-
lemma rank_free_wedge :
132-
(Module.rank R (⋀[R]^ℓ E)).toNat = Nat.choose ((Module.rank R E).toNat) ℓ := by
133-
sorry
134-
135-
136-
noncomputable def dual_is_rank_minus_power (i : ℕ) :
137-
(⋀[R]^i E) ≃ₗ[R] Module.Dual R (⋀[R]^((Module.rank R E).toNat - i) E) := by
138-
generalize rankh : (Module.rank R E).toNat = r
139-
have E_basis := Module.Free.chooseBasis R E
140-
-- need to get some a ∈ ⋀[R]^i E
141-
-- need to get some b ∈ ⋀[R]^(r - i) E
142-
-- multiply them together
143-
-- show the result is in ⋀[R]^r E ≃ R
144-
-- so a ^ b = r
145-
unfold Module.Dual
146-
147-
148-
apply LinearEquiv.ofBijective
149-
. case hf =>
150-
151-
sorry
152-
. case f =>
153-
apply LinearMap.mk
154-
. case _ =>
155-
intro m x
156-
157-
158-
sorry
159-
160-
161-
162-
163-
noncomputable def dual_ext_comm (j : ℕ) :
164-
Module.Dual R (⋀[R]^j E) ≃ₗ[R] ⋀[R]^j (Module.Dual R E) := by
165-
sorry
166-
167-
def dual_rank_comm (i : ℕ) :
168-
(⋀[R]^i E) → ⋀[R]^((Module.rank R E).toNat - i) (Module.Dual R E) := by
169-
sorry
170-
121+
#check exteriorPower.zeroEquiv
122+
#check exteriorPower.oneEquiv
171123

172124
def DualKoszulComplex (e : E) : ChainComplex (ModuleCat R) ℕ := {
173-
X := (fun i => of R (⋀[R]^i M)),
174-
d := fun i j => if i == j + 1 then ofHom (diff_map i j e) else 0,
175-
shape := fun i j h => by
176-
simp_all
177-
sorry
178-
,
125+
X := fun i => of R (Module.Dual R (⋀[R]^i E)),
126+
d := fun i j => if j + 1 == i then @ofHom R _ _ _ _ _ _ _ (LinearMap.dualMap (diff_map j i e)) else 0,
127+
shape := fun i j h => by simp_all,
179128
d_comp_d' := by
180-
intro i _ _ hij hjk
129+
intro _ _ k hij hjk
181130
simp at hij hjk; subst hij hjk; simp
182-
have conv (j : ℕ) (a : ⋀[R]^j M →ₗ[R] ⋀[R]^(j + 1) M) (b : ⋀[R]^(j + 1) M →ₗ[R] ⋀[R]^(j + 2) M) :
183-
ofHom a ≫ ofHom b = ofHom (b ∘ₗ a) := rfl
184-
-- rw [conv]
185-
sorry
186-
-- have : i + 1 + 1 = i + 2 := rfl; rw [this]; clear this
187-
-- rw [koszul_d_squared_zero i a]
188-
-- rfl
131+
rw [← @ofHom_comp]
132+
have : k + 1 + 1 = k + 2 := rfl; rw [this]; clear this
133+
rw [LinearMap.dualMap_comp_dualMap, koszul_d_squared_zero k e]
134+
rw [LinearMap.dualMap_eq_lcomp, LinearMap.lcomp, LinearMap.comp_zero]
135+
rfl
189136
}

blueprint/src/koszul.tex

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ \subsection{Koszul complex}
2121
\end{proposition}
2222

2323

24-
\begin{definition}[koszul_complex]
25-
\label{def:koszul_complex}
24+
\begin{definition}[KoszulComplex]
25+
\label{def:KoszulComplex}
2626
\leanok
2727
\uses{def:ExteriorAlgebra}
2828
Let $R$ be a (Noetherian?) ring, $M$ be an (finitely generated?) $R$-module and $a \in M$.
@@ -36,8 +36,9 @@ \subsection{Koszul complex}
3636
\end{definition}
3737

3838
\begin{definition}[Dual Koszul complex]
39-
\label{def:koszul_complex_dual}
40-
\uses{def:koszul_complex}
39+
\label{def:DualKoszulComplex}
40+
% \leanok
41+
\uses{def:KoszulComplex}
4142
If $M \cong R^m$ is a free $R$-module, then applying the contravariant functor $\operatorname{Hom}_R(\ , R)$ gives us an isomorphic chain complex
4243
$$K_{\bullet}(a) :\begin{tikzcd}
4344
\bigwedge^{i+1}_R R^m \arrow[r, "d_{i+1}"] & \bigwedge^i_R R^m \arrow[r, "d_i"] & \bigwedge^{i-1}_R R^m \arrow[r] & \dots R^m \arrow[r, "d_1"] & R \arrow[r] & 0
@@ -53,7 +54,7 @@ \subsection{Koszul complex}
5354

5455
\begin{lemma}
5556
\label{lem:koszul_of_length_2}
56-
\uses{def:koszul_complex_dual}
57+
\uses{def:DualKoszulComplex}
5758
$K(x)$ is exact exept for the rightmost side iff $x$ is regular.
5859
\end{lemma}
5960

@@ -127,13 +128,13 @@ \subsection{Koszul complex}
127128
\end{corollary}
128129

129130
\begin{lemma}
130-
\label{thm:koszul_complex_res_quotient_ring}
131+
\label{thm:KoszulComplex_res_quotient_ring}
131132
\uses{def:free_resl}
132133
\end{lemma}
133134

134135
\begin{lemma}
135136
\label{lem:tor_measures_koszul_homology}
136-
\uses{thm:koszul_complex_res_quotient_ring}
137+
\uses{thm:KoszulComplex_res_quotient_ring}
137138
$$H_i(K(a) \otimes M) \cong \tor_i^R (R/(a), M)$$
138139
\end{lemma}
139140

@@ -165,7 +166,7 @@ \subsection{Koszul complex}
165166

166167
\begin{lemma}
167168
\label{lem:koszul_homotopy}
168-
\uses{def:koszul_complex_dual}
169+
\uses{def:DualKoszulComplex}
169170
\end{lemma}
170171

171172
\begin{proposition}

lake-manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"subDir": null,
1717
"scope": "",
18-
"rev": "2b00f62e9c1e9a582666b555d055d890c4a56149",
18+
"rev": "8d0660f3c507e19b8e729894cd0be53c2b1c73f5",
1919
"name": "mathlib",
2020
"manifestFile": "lake-manifest.json",
2121
"inputRev": null,
@@ -55,10 +55,10 @@
5555
"type": "git",
5656
"subDir": null,
5757
"scope": "leanprover-community",
58-
"rev": "8fff3f074da9237cd4e179fd6dd89be6c4022d41",
58+
"rev": "322a050322e97b0a701588d9b1efbe2bee7f8527",
5959
"name": "proofwidgets",
6060
"manifestFile": "lake-manifest.json",
61-
"inputRev": "v0.0.52-pre",
61+
"inputRev": "v0.0.52-pre2",
6262
"inherited": true,
6363
"configFile": "lakefile.lean"},
6464
{"url": "https://github.com/leanprover-community/aesop",
@@ -85,7 +85,7 @@
8585
"type": "git",
8686
"subDir": null,
8787
"scope": "leanprover-community",
88-
"rev": "309e155d9f70a477768c434ce015ad784deb094f",
88+
"rev": "80520e5834d0d9a2446cb88ea3d2a38a94d2e143",
8989
"name": "batteries",
9090
"manifestFile": "lake-manifest.json",
9191
"inputRev": "main",

0 commit comments

Comments
 (0)