Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | import OAI.Geometry.ComplexBall.ArithmeticQuotientEquationsData |
| 2 | import OAI.NumberTheory.ArithmeticGroups.Lattices.Algebraic |
| 3 | |
| 4 | /-! # Arithmetic Quotient Split Unitary -/ |
| 5 | |
| 6 | namespace OAI.Geometry.ComplexBall.ArithmeticQuotientSplitUnitary |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | section |
| 11 | |
| 12 | /-! The actual unitary algebraic group in Lattices's repaired polynomial API. |
| 13 | Every point group is the verified six-dimensional matrix image, and the |
| 14 | membership equivalence is proved by evaluation of the explicit equations. |
| 15 | Geometric connectedness and semisimplicity are separate obligations. -/ |
| 16 | |
| 17 | open scoped Classical |
| 18 | |
| 19 | variable {k : Type} [Field k] |
| 20 | |
| 21 | def unitaryAlgebraicGroup (d b : k) : NumberTheory.ArithmeticGroups.Lattices.Algebraic.MatrixAlgebraicGroup k 6 where |
| 22 | equations := Set.range (ArithmeticQuotientEquationsData.unitaryPolynomial d b) |
| 23 | subgroup K _ f := ArithmeticQuotientEquationsData.sixDimensionalUnitary (f d) (f b) |
| 24 | mem_iff K _ f M := by |
| 25 | change M ∈ ArithmeticQuotientEquationsData.sixDimensionalUnitary (f d) (f b) ↔ |
| 26 | ∀ p ∈ Set.range (ArithmeticQuotientEquationsData.unitaryPolynomial d b), |
| 27 | MvPolynomial.eval₂Hom f (fun ij => M.val ij.1 ij.2) p = 0 |
| 28 | constructor |
| 29 | · intro h p hp |
| 30 | obtain ⟨e, rfl⟩ := hp |
| 31 | rw [ArithmeticQuotientEquationsData.unitaryPolynomial_eval] |
| 32 | exact (ArithmeticQuotientEquationsData.unitaryEquation_zero_iff (f d) (f b) M).mpr h e |
| 33 | · intro h |
| 34 | apply (ArithmeticQuotientEquationsData.unitaryEquation_zero_iff (f d) (f b) M).mp |
| 35 | intro e |
| 36 | rw [← ArithmeticQuotientEquationsData.unitaryPolynomial_eval d b f M.val e] |
| 37 | exact h _ ⟨e, rfl⟩ |
| 38 | |
| 39 | def regularUnitaryPoints (d b : k) : |
| 40 | ArithmeticQuotientEquationsData.SU (starRingEnd (QuadraticAlgebra k d 0)) (algebraMap k _ b) →* |
| 41 | (unitaryAlgebraicGroup d b).RationalPoints where |
| 42 | toFun g := ⟨ArithmeticQuotientEquationsData.regularSpecialLinear d g.val, ⟨g.val, g.property, rfl⟩⟩ |
| 43 | map_one' := Subtype.ext (map_one (ArithmeticQuotientEquationsData.regularSpecialLinear d)) |
| 44 | map_mul' g h := Subtype.ext (map_mul (ArithmeticQuotientEquationsData.regularSpecialLinear d) g.val h.val) |
| 45 | |
| 46 | theorem regularUnitaryPoints_bijective (d b : k) : |
| 47 | Function.Bijective (regularUnitaryPoints d b) := by |
| 48 | constructor |
| 49 | · intro g h he |
| 50 | apply Subtype.ext |
| 51 | exact ArithmeticQuotientEquationsData.regularSpecialLinear_injective d (congrArg Subtype.val he) |
| 52 | · intro g |
| 53 | obtain ⟨A, hA, hM⟩ := g.property |
| 54 | refine ⟨⟨A, hA⟩, ?_⟩ |
| 55 | exact Subtype.ext hM |
| 56 | |
| 57 | /-- A proved identification of the unitary matrices with rational points. -/ |
| 58 | def regularUnitaryEquiv (d b : k) : |
| 59 | ArithmeticQuotientEquationsData.SU (starRingEnd (QuadraticAlgebra k d 0)) (algebraMap k _ b) ≃* |
| 60 | (unitaryAlgebraicGroup d b).RationalPoints := |
| 61 | MulEquiv.ofBijective (regularUnitaryPoints d b) (regularUnitaryPoints_bijective d b) |
| 62 | |
| 63 | end |
| 64 | |
| 65 | section |
| 66 | |
| 67 | /-! Identification of the polynomial model with the original CM-field |
| 68 | unitary group. The quadratic presentation and conjugation compatibility |
| 69 | are proved, and no point-realization hypothesis is introduced. -/ |
| 70 | |
| 71 | open scoped Classical QuadraticAlgebra |
| 72 | open _root_.NumberField |
| 73 | |
| 74 | section Equiv |
| 75 | variable {K L : Type*} [CommRing K] [CommRing L] |
| 76 | |
| 77 | /-- Changing a proved-equal coefficient leaves every matrix entry unchanged. -/ |
| 78 | def unitaryCoefficientEquiv (c : K →+* K) (b b' : K) (h : b = b') : ArithmeticQuotientEquationsData.SU c b ≃* ArithmeticQuotientEquationsData.SU c b' where |
| 79 | toFun g := ⟨g.val, h ▸ g.property⟩ |
| 80 | invFun g := ⟨g.val, h.symm ▸ g.property⟩ |
| 81 | left_inv _ := rfl |
| 82 | right_inv _ := rfl |
| 83 | map_mul' _ _ := rfl |
| 84 | |
| 85 | def unitaryEquiv (c : K →+* K) (d : L →+* L) (b : K) (e : K ≃+* L) |
| 86 | (hc : ∀ x : K, e (c x) = d (e x)) : ArithmeticQuotientEquationsData.SU c b ≃* ArithmeticQuotientEquationsData.SU d (e b) := |
| 87 | MulEquiv.ofBijective (ArithmeticQuotientEquationsData.unitaryMap c d b e.toRingHom hc) ⟨by |
| 88 | intro g h he |
| 89 | apply Subtype.ext |
| 90 | apply Matrix.SpecialLinearGroup.ext |
| 91 | intro i j |
| 92 | apply e.injective |
| 93 | exact congrArg (fun z : ArithmeticQuotientEquationsData.SU d (e b) => z.val i j) he, |
| 94 | by |
| 95 | intro g |
| 96 | have hd (x : L) : e.symm (d x) = c (e.symm x) := by |
| 97 | apply e.injective |
| 98 | rw [e.apply_symm_apply, hc, e.apply_symm_apply] |
| 99 | let A : ArithmeticQuotientEquationsData.SL K := Matrix.SpecialLinearGroup.map e.symm.toRingHom g.val |
| 100 | have hA : A ∈ ArithmeticQuotientEquationsData.unitarySubgroup c b := by |
| 101 | have h := (ArithmeticQuotientEquationsData.unitaryMap d c (e b) e.symm.toRingHom hd g).property |
| 102 | change A ∈ ArithmeticQuotientEquationsData.unitarySubgroup c (e.symm (e b)) at h |
| 103 | simpa only [RingEquiv.symm_apply_apply] using h |
| 104 | refine ⟨⟨A, hA⟩, ?_⟩ |
| 105 | apply Subtype.ext |
| 106 | apply Matrix.SpecialLinearGroup.ext |
| 107 | intro i j |
| 108 | exact e.apply_symm_apply (g.val i j)⟩ |
| 109 | |
| 110 | end Equiv |
| 111 | |
| 112 | section CM |
| 113 | variable {E : Type*} [Field E] [NumberField E] [IsCMField E] |
| 114 | |
| 115 | lemma quadraticEquiv_star (δ : E) (hδ : IsCMField.complexConj E δ = -δ) (hδ0 : δ ≠ 0) |
| 116 | (z : QuadraticAlgebra (ArithmeticQuotientEquationsData.RealField E) (ArithmeticQuotientEquationsData.imaginarySquare δ hδ) 0) : |
| 117 | ArithmeticQuotientEquationsData.quadraticEquiv δ hδ hδ0 (star z) = |
| 118 | IsCMField.complexConj E (ArithmeticQuotientEquationsData.quadraticEquiv δ hδ hδ0 z) := by |
| 119 | change ArithmeticQuotientEquationsData.quadraticLift δ hδ (star z) = IsCMField.complexConj E (ArithmeticQuotientEquationsData.quadraticLift δ hδ z) |
| 120 | rw [ArithmeticQuotientEquationsData.quadraticLift_conjugate, ArithmeticQuotientEquationsData.quadraticLift_apply] |
| 121 | simp [QuadraticAlgebra.re_star, QuadraticAlgebra.im_star, sub_eq_add_neg] |
| 122 | |
| 123 | def realCoefficient (b : E) (hb : IsCMField.complexConj E b = b) : ArithmeticQuotientEquationsData.RealField E := |
| 124 | ⟨b, (IsCMField.complexConj_eq_self_iff E b).mp hb⟩ |
| 125 | |
| 126 | def rationalQuadraticUnitaryEquiv (b : E) (hb : IsCMField.complexConj E b = b) |
| 127 | (δ : E) (hδ : IsCMField.complexConj E δ = -δ) (hδ0 : δ ≠ 0) : |
| 128 | ArithmeticQuotientEquationsData.SU (starRingEnd (QuadraticAlgebra (ArithmeticQuotientEquationsData.RealField E) (ArithmeticQuotientEquationsData.imaginarySquare δ hδ) 0)) |
| 129 | (algebraMap (ArithmeticQuotientEquationsData.RealField E) _ (realCoefficient b hb)) ≃* ArithmeticQuotientEquationsData.RationalSU b := by |
| 130 | let e := ArithmeticQuotientEquationsData.quadraticEquiv δ hδ hδ0 |
| 131 | have hc : e (algebraMap (ArithmeticQuotientEquationsData.RealField E) _ (realCoefficient b hb)) = b := |
| 132 | e.commutes (realCoefficient b hb) |
| 133 | have he := unitaryEquiv |
| 134 | (starRingEnd (QuadraticAlgebra (ArithmeticQuotientEquationsData.RealField E) (ArithmeticQuotientEquationsData.imaginarySquare δ hδ) 0)) |
| 135 | (IsCMField.complexConj E).toRingHom |
| 136 | (algebraMap (ArithmeticQuotientEquationsData.RealField E) _ (realCoefficient b hb)) e.toRingEquiv |
| 137 | (fun z => by simpa [e, starRingEnd_apply] using quadraticEquiv_star δ hδ hδ0 z) |
| 138 | have hc' : e.toRingEquiv (algebraMap (ArithmeticQuotientEquationsData.RealField E) _ (realCoefficient b hb)) = b := by |
| 139 | simpa only [AlgEquiv.coe_ringEquiv] using hc |
| 140 | exact he.trans (unitaryCoefficientEquiv _ _ b hc') |
| 141 | |
| 142 | end CM |
| 143 | |
| 144 | variable {E : Type} [Field E] [NumberField E] [IsCMField E] |
| 145 | |
| 146 | def originalUnitaryAlgebraicGroup (b : E) (hb : IsCMField.complexConj E b = b) |
| 147 | (δ : E) (hδ : IsCMField.complexConj E δ = -δ) : |
| 148 | NumberTheory.ArithmeticGroups.Lattices.Algebraic.MatrixAlgebraicGroup (ArithmeticQuotientEquationsData.RealField E) 6 := |
| 149 | unitaryAlgebraicGroup (ArithmeticQuotientEquationsData.imaginarySquare δ hδ) (realCoefficient b hb) |
| 150 | |
| 151 | /-- The original E-matrices are the rational points of the constructed |
| 152 | algebraic group over F = E⁺. -/ |
| 153 | def originalUnitaryRationalEquiv (b : E) (hb : IsCMField.complexConj E b = b) |
| 154 | (δ : E) (hδ : IsCMField.complexConj E δ = -δ) (hδ0 : δ ≠ 0) : |
| 155 | ArithmeticQuotientEquationsData.RationalSU b ≃* (originalUnitaryAlgebraicGroup b hb δ hδ).RationalPoints := |
| 156 | (rationalQuadraticUnitaryEquiv b hb δ hδ hδ0).symm.trans |
| 157 | (regularUnitaryEquiv (ArithmeticQuotientEquationsData.imaginarySquare δ hδ) (realCoefficient b hb)) |
| 158 | |
| 159 | end |
| 160 | |
| 161 | section |
| 162 | |
| 163 | /-! Splitting the quadratic algebra over a field containing a nonzero square |
| 164 | root of d. This is the first step in identifying the geometric unitary group |
| 165 | with SL(3), with conjugation becoming exchange of the two factors. -/ |
| 166 | |
| 167 | open scoped Classical QuadraticAlgebra |
| 168 | |
| 169 | variable {K : Type*} [Field K] [CharZero K] |
| 170 | |
| 171 | def splitQuadraticHom (d r : K) (hr : r ^ 2 = d) : QuadraticAlgebra K d 0 →+* K × K := |
| 172 | ((QuadraticAlgebra.lift ⟨r, by simpa [pow_two, Algebra.smul_def] using hr⟩ : |
| 173 | QuadraticAlgebra K d 0 →ₐ[K] K).toRingHom).prod |
| 174 | ((QuadraticAlgebra.lift ⟨-r, by simpa [pow_two, Algebra.smul_def] using hr⟩ : |
| 175 | QuadraticAlgebra K d 0 →ₐ[K] K).toRingHom) |
| 176 | |
| 177 | omit [CharZero K] in |
| 178 | lemma splitQuadraticHom_apply (d r : K) (hr : r ^ 2 = d) (z : QuadraticAlgebra K d 0) : |
| 179 | splitQuadraticHom d r hr z = (z.re + z.im * r, z.re - z.im * r) := by |
| 180 | apply Prod.ext <;> simp [splitQuadraticHom, QuadraticAlgebra.lift, |
| 181 | sub_eq_add_neg] |
| 182 | |
| 183 | def splitQuadraticInverse (d r : K) (z : K × K) : QuadraticAlgebra K d 0 := |
| 184 | ⟨(z.1 + z.2) / 2, (z.1 - z.2) / (2 * r)⟩ |
| 185 | |
| 186 | lemma splitQuadratic_left_inverse (d r : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) |
| 187 | (z : QuadraticAlgebra K d 0) : |
| 188 | splitQuadraticInverse d r (splitQuadraticHom d r hr z) = z := by |
| 189 | rw [splitQuadraticHom_apply] |
| 190 | apply QuadraticAlgebra.ext |
| 191 | · change (z.re + z.im * r + (z.re - z.im * r)) / 2 = z.re |
| 192 | field_simp |
| 193 | ring |
| 194 | · change (z.re + z.im * r - (z.re - z.im * r)) / (2 * r) = z.im |
| 195 | field_simp |
| 196 | ring |
| 197 | |
| 198 | lemma splitQuadratic_right_inverse (d r : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) |
| 199 | (z : K × K) : |
| 200 | splitQuadraticHom d r hr (splitQuadraticInverse d r z) = z := by |
| 201 | rw [splitQuadraticHom_apply] |
| 202 | apply Prod.ext |
| 203 | · change (z.1 + z.2) / 2 + ((z.1 - z.2) / (2 * r)) * r = z.1 |
| 204 | field_simp |
| 205 | ring |
| 206 | · change (z.1 + z.2) / 2 - ((z.1 - z.2) / (2 * r)) * r = z.2 |
| 207 | field_simp |
| 208 | ring |
| 209 | |
| 210 | def splitQuadraticEquiv (d r : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) : |
| 211 | QuadraticAlgebra K d 0 ≃+* K × K := |
| 212 | RingEquiv.ofBijective (splitQuadraticHom d r hr) |
| 213 | ⟨Function.LeftInverse.injective (splitQuadratic_left_inverse d r hr hr0), |
| 214 | Function.RightInverse.surjective (splitQuadratic_right_inverse d r hr hr0)⟩ |
| 215 | |
| 216 | lemma splitQuadraticEquiv_star (d r : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) |
| 217 | (z : QuadraticAlgebra K d 0) : |
| 218 | splitQuadraticEquiv d r hr hr0 (star z) = Prod.swap (splitQuadraticEquiv d r hr hr0 z) := by |
| 219 | change splitQuadraticHom d r hr (star z) = Prod.swap (splitQuadraticHom d r hr z) |
| 220 | rw [splitQuadraticHom_apply, splitQuadraticHom_apply] |
| 221 | apply Prod.ext <;> simp [QuadraticAlgebra.re_star, QuadraticAlgebra.im_star, sub_eq_add_neg] |
| 222 | |
| 223 | lemma splitQuadraticEquiv_scalar (d r b : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) : |
| 224 | splitQuadraticEquiv d r hr hr0 (algebraMap K (QuadraticAlgebra K d 0) b) = (b, b) := by |
| 225 | change splitQuadraticHom d r hr _ = _ |
| 226 | rw [splitQuadraticHom_apply] |
| 227 | simp |
| 228 | |
| 229 | def splitUnitaryEquiv (d r b : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) : |
| 230 | ArithmeticQuotientEquationsData.SU (starRingEnd (QuadraticAlgebra K d 0)) (algebraMap K _ b) ≃* |
| 231 | ArithmeticQuotientEquationsData.SU (RingEquiv.prodComm : K × K ≃+* K × K).toRingHom (b, b) := by |
| 232 | have h := unitaryEquiv (starRingEnd (QuadraticAlgebra K d 0)) |
| 233 | (RingEquiv.prodComm : K × K ≃+* K × K).toRingHom (algebraMap K _ b) |
| 234 | (splitQuadraticEquiv d r hr hr0) |
| 235 | (fun z => by simpa [starRingEnd_apply] using splitQuadraticEquiv_star d r hr hr0 z) |
| 236 | exact h.trans (unitaryCoefficientEquiv _ _ (b, b) |
| 237 | (splitQuadraticEquiv_scalar d r b hr hr0)) |
| 238 | |
| 239 | end |
| 240 | |
| 241 | section |
| 242 | |
| 243 | /-! The split unitary group is SL(3): the first component determines the |
| 244 | second by inverse transpose relative to the diagonal form. -/ |
| 245 | |
| 246 | open scoped Classical BigOperators |
| 247 | open _root_.Matrix |
| 248 | open OAI.Geometry.ComplexBall.ArithmeticQuotientEquationsData |
| 249 | |
| 250 | variable {K : Type*} [Field K] |
| 251 | |
| 252 | abbrev swapInvolution : K × K →+* K × K := |
| 253 | (RingEquiv.prodComm : K × K ≃+* K × K).toRingHom |
| 254 | |
| 255 | lemma swapInvolution_apply (z : K × K) : swapInvolution z = (z.2, z.1) := rfl |
| 256 | |
| 257 | def formMatrix (b : K) : ArithmeticQuotientEquationsData.Mat K := Matrix.diagonal (ArithmeticQuotientEquationsData.diagonalCoefficient b) |
| 258 | |
| 259 | lemma formMatrix_transpose (b : K) : (formMatrix b).transpose = formMatrix b := |
| 260 | Matrix.diagonal_transpose _ |
| 261 | |
| 262 | lemma formMatrix_mul_inverse (b : K) (hb : b ≠ 0) : |
| 263 | formMatrix b * formMatrix b⁻¹ = 1 := by |
| 264 | rw [formMatrix, formMatrix, Matrix.diagonal_mul_diagonal] |
| 265 | ext i j |
| 266 | by_cases h : i = j |
| 267 | · subst j |
| 268 | by_cases hi : i = 2 <;> simp [ArithmeticQuotientEquationsData.diagonalCoefficient, hb, hi] |
| 269 | · simp [h] |
| 270 | |
| 271 | lemma formMatrix_inverse_mul (b : K) (hb : b ≠ 0) : |
| 272 | formMatrix b⁻¹ * formMatrix b = 1 := by |
| 273 | simpa only [inv_inv] using formMatrix_mul_inverse b⁻¹ (inv_ne_zero hb) |
| 274 | |
| 275 | def dualMatrix (b : K) (A : ArithmeticQuotientEquationsData.SL K) : ArithmeticQuotientEquationsData.Mat K := |
| 276 | formMatrix b⁻¹ * (A⁻¹ : ArithmeticQuotientEquationsData.SL K).val.transpose * formMatrix b |
| 277 | |
| 278 | lemma dualMatrix_det (b : K) (hb : b ≠ 0) (A : ArithmeticQuotientEquationsData.SL K) : |
| 279 | (dualMatrix b A).det = 1 := by |
| 280 | have hi := congrArg Matrix.det (formMatrix_inverse_mul b hb) |
| 281 | simpa only [dualMatrix, det_mul, det_transpose, (A⁻¹ : ArithmeticQuotientEquationsData.SL K).property, |
| 282 | mul_one, det_one] using hi |
| 283 | |
| 284 | lemma dualMatrix_preserves (b : K) (hb : b ≠ 0) (A : ArithmeticQuotientEquationsData.SL K) : |
| 285 | A.val.transpose * formMatrix b * dualMatrix b A = formMatrix b := by |
| 286 | calc |
| 287 | _ = (A.val.transpose * (formMatrix b * formMatrix b⁻¹) * |
| 288 | (A⁻¹ : ArithmeticQuotientEquationsData.SL K).val.transpose) * formMatrix b := by |
| 289 | dsimp [dualMatrix] |
| 290 | noncomm_ring |
| 291 | _ = formMatrix b := by |
| 292 | rw [formMatrix_mul_inverse b hb, mul_one, ← Matrix.transpose_mul] |
| 293 | change ((↑(A⁻¹ * A) : ArithmeticQuotientEquationsData.Mat K).transpose) * formMatrix b = _ |
| 294 | rw [inv_mul_cancel] |
| 295 | simp |
| 296 | |
| 297 | lemma dualMatrix_unique (b : K) (hb : b ≠ 0) (A : ArithmeticQuotientEquationsData.SL K) (B : ArithmeticQuotientEquationsData.Mat K) |
| 298 | (h : A.val.transpose * formMatrix b * B = formMatrix b) : B = dualMatrix b A := by |
| 299 | have he := congrArg (fun M : ArithmeticQuotientEquationsData.Mat K => |
| 300 | formMatrix b⁻¹ * (A⁻¹ : ArithmeticQuotientEquationsData.SL K).val.transpose * M) h |
| 301 | have hi : (A⁻¹ : ArithmeticQuotientEquationsData.SL K).val.transpose * A.val.transpose = 1 := by |
| 302 | rw [← Matrix.transpose_mul] |
| 303 | change (↑(A * A⁻¹) : ArithmeticQuotientEquationsData.Mat K).transpose = 1 |
| 304 | simp |
| 305 | calc |
| 306 | B = (formMatrix b⁻¹ * ((A⁻¹ : ArithmeticQuotientEquationsData.SL K).val.transpose * A.val.transpose) * |
| 307 | formMatrix b) * B := by rw [hi, mul_one, formMatrix_inverse_mul b hb, one_mul] |
| 308 | _ = dualMatrix b A := by |
| 309 | change _ = formMatrix b⁻¹ * (A⁻¹ : ArithmeticQuotientEquationsData.SL K).val.transpose * formMatrix b |
| 310 | rw [← he] |
| 311 | noncomm_ring |
| 312 | |
| 313 | def pairSL (A B : ArithmeticQuotientEquationsData.SL K) : ArithmeticQuotientEquationsData.SL (K × K) := |
| 314 | ⟨fun i j => (A.val i j, B.val i j), by |
| 315 | apply Prod.ext |
| 316 | · exact ((RingHom.fst K K).map_det |
| 317 | (fun i j : Fin 3 => (A.val i j, B.val i j))).trans A.property |
| 318 | · exact ((RingHom.snd K K).map_det |
| 319 | (fun i j : Fin 3 => (A.val i j, B.val i j))).trans B.property⟩ |
| 320 | |
| 321 | lemma swapUnitary_iff (b : K) (g : ArithmeticQuotientEquationsData.SL (K × K)) : |
| 322 | g ∈ ArithmeticQuotientEquationsData.unitarySubgroup swapInvolution (b, b) ↔ |
| 323 | (g.val.map Prod.fst).transpose * formMatrix b * g.val.map Prod.snd = formMatrix b := by |
| 324 | rw [ArithmeticQuotientEquationsData.unitary_iff_columns] |
| 325 | have entry (A B : ArithmeticQuotientEquationsData.Mat K) (i j : Fin 3) : |
| 326 | (A.transpose * formMatrix b * B) i j = |
| 327 | ∑ k, ArithmeticQuotientEquationsData.diagonalCoefficient b k * A k i * B k j := by |
| 328 | change (A.transpose * Matrix.diagonal (ArithmeticQuotientEquationsData.diagonalCoefficient b) * B) i j = _ |
| 329 | rw [Matrix.mul_apply] |
| 330 | simp only [Matrix.mul_diagonal, Matrix.transpose_apply] |
| 331 | apply Finset.sum_congr rfl |
| 332 | intro k _ |
| 333 | ring |
| 334 | constructor |
| 335 | · intro h |
| 336 | apply Matrix.ext |
| 337 | intro i j |
| 338 | have he := congrArg Prod.fst (h i j) |
| 339 | rw [entry] |
| 340 | simpa only [ArithmeticQuotientEquationsData.diagonalCoefficient, formMatrix, Matrix.diagonal_apply, |
| 341 | Prod.fst_sum, Prod.fst_mul, swapInvolution_apply, |
| 342 | Matrix.map_apply, Prod.fst_zero, Prod.fst_one, apply_ite] using he |
| 343 | · intro h i j |
| 344 | have h' := congrArg Matrix.transpose h |
| 345 | simp only [Matrix.transpose_mul, formMatrix_transpose, Matrix.transpose_transpose, |
| 346 | ← Matrix.mul_assoc] at h' |
| 347 | apply Prod.ext |
| 348 | · have he := congrArg (fun M : ArithmeticQuotientEquationsData.Mat K => M i j) h |
| 349 | rw [entry] at he |
| 350 | simpa only [ArithmeticQuotientEquationsData.diagonalCoefficient, formMatrix, Matrix.diagonal_apply, |
| 351 | Prod.fst_sum, Prod.fst_mul, swapInvolution_apply, |
| 352 | Matrix.map_apply, Prod.fst_zero, Prod.fst_one, apply_ite] using he |
| 353 | · have he := congrArg (fun M : ArithmeticQuotientEquationsData.Mat K => M i j) h' |
| 354 | rw [entry] at he |
| 355 | simpa only [ArithmeticQuotientEquationsData.diagonalCoefficient, formMatrix, Matrix.diagonal_apply, |
| 356 | Prod.snd_sum, Prod.snd_mul, swapInvolution_apply, |
| 357 | Matrix.map_apply, Prod.snd_zero, Prod.snd_one, apply_ite] using he |
| 358 | |
| 359 | def swapUnitaryToSL (b : K) : ArithmeticQuotientEquationsData.SU (swapInvolution (K := K)) (b, b) →* ArithmeticQuotientEquationsData.SL K := |
| 360 | { toFun := fun g => Matrix.SpecialLinearGroup.map (RingHom.fst K K) g.val |
| 361 | map_one' := map_one _ |
| 362 | map_mul' := fun g h => map_mul _ g.val h.val } |
| 363 | |
| 364 | lemma swapUnitaryToSL_injective (b : K) (hb : b ≠ 0) : |
| 365 | Function.Injective (swapUnitaryToSL b) := by |
| 366 | intro g h he |
| 367 | have hg := (swapUnitary_iff b g.val).mp g.property |
| 368 | have hh := (swapUnitary_iff b h.val).mp h.property |
| 369 | have hgf : g.val.val.map Prod.fst = h.val.val.map Prod.fst := |
| 370 | congrArg Subtype.val he |
| 371 | have hgs : g.val.val.map Prod.snd = h.val.val.map Prod.snd := by |
| 372 | rw [dualMatrix_unique b hb (swapUnitaryToSL b g) _ hg, |
| 373 | dualMatrix_unique b hb (swapUnitaryToSL b h) _ hh, he] |
| 374 | apply Subtype.ext |
| 375 | apply Matrix.SpecialLinearGroup.ext |
| 376 | intro i j |
| 377 | exact Prod.ext (congrArg (fun M : ArithmeticQuotientEquationsData.Mat K => M i j) hgf) |
| 378 | (congrArg (fun M : ArithmeticQuotientEquationsData.Mat K => M i j) hgs) |
| 379 | |
| 380 | lemma swapUnitaryToSL_surjective (b : K) (hb : b ≠ 0) : |
| 381 | Function.Surjective (swapUnitaryToSL b) := by |
| 382 | intro A |
| 383 | let B : ArithmeticQuotientEquationsData.SL K := ⟨dualMatrix b A, dualMatrix_det b hb A⟩ |
| 384 | let g := pairSL A B |
| 385 | have hg : g ∈ ArithmeticQuotientEquationsData.unitarySubgroup swapInvolution (b, b) := by |
| 386 | rw [swapUnitary_iff] |
| 387 | exact dualMatrix_preserves b hb A |
| 388 | exact ⟨⟨g, hg⟩, rfl⟩ |
| 389 | |
| 390 | def swapUnitaryEquivSL (b : K) (hb : b ≠ 0) : ArithmeticQuotientEquationsData.SU (swapInvolution (K := K)) (b, b) ≃* ArithmeticQuotientEquationsData.SL K := |
| 391 | MulEquiv.ofBijective (swapUnitaryToSL b) |
| 392 | ⟨swapUnitaryToSL_injective b hb, swapUnitaryToSL_surjective b hb⟩ |
| 393 | |
| 394 | def quadraticUnitaryEquivSL [CharZero K] (d r b : K) |
| 395 | (hr : r ^ 2 = d) (hr0 : r ≠ 0) (hb : b ≠ 0) : |
| 396 | ArithmeticQuotientEquationsData.SU (starRingEnd (QuadraticAlgebra K d 0)) (algebraMap K _ b) ≃* ArithmeticQuotientEquationsData.SL K := |
| 397 | (splitUnitaryEquiv d r b hr hr0).trans (swapUnitaryEquivSL b hb) |
| 398 | |
| 399 | end |
| 400 | |
| 401 | section |
| 402 | |
| 403 | /-! Coordinate formulas for the inverse of the split unitary isomorphism. |
| 404 | They are polynomial in an SL matrix and its adjugate. -/ |
| 405 | |
| 406 | open scoped Classical QuadraticAlgebra |
| 407 | open OAI.Geometry.ComplexBall.ArithmeticQuotientEquationsData |
| 408 | |
| 409 | variable {K : Type*} [Field K] [CharZero K] |
| 410 | |
| 411 | lemma splitUnitaryEquiv_entry (d r b : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) |
| 412 | (g : ArithmeticQuotientEquationsData.SU (starRingEnd (QuadraticAlgebra K d 0)) (algebraMap K _ b)) (i j : Fin 3) : |
| 413 | (splitUnitaryEquiv d r b hr hr0 g).val i j = splitQuadraticHom d r hr (g.val i j) := rfl |
| 414 | |
| 415 | lemma quadraticUnitaryEquivSL_fst (d r b : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) |
| 416 | (hb : b ≠ 0) (g : ArithmeticQuotientEquationsData.SU (starRingEnd (QuadraticAlgebra K d 0)) (algebraMap K _ b)) |
| 417 | (i j : Fin 3) : |
| 418 | (quadraticUnitaryEquivSL d r b hr hr0 hb g).val i j = |
| 419 | (splitQuadraticHom d r hr (g.val i j)).1 := by |
| 420 | exact congrArg Prod.fst (splitUnitaryEquiv_entry d r b hr hr0 g i j) |
| 421 | |
| 422 | lemma quadraticUnitaryEquivSL_snd (d r b : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) |
| 423 | (hb : b ≠ 0) (g : ArithmeticQuotientEquationsData.SU (starRingEnd (QuadraticAlgebra K d 0)) (algebraMap K _ b)) |
| 424 | (i j : Fin 3) : |
| 425 | dualMatrix b (quadraticUnitaryEquivSL d r b hr hr0 hb g) i j = |
| 426 | (splitQuadraticHom d r hr (g.val i j)).2 := by |
| 427 | let s := splitUnitaryEquiv d r b hr hr0 g |
| 428 | have hs := (swapUnitary_iff b s.val).mp s.property |
| 429 | have he := dualMatrix_unique b hb (swapUnitaryToSL b s) _ hs |
| 430 | calc |
| 431 | _ = (s.val i j).2 := congrArg (fun M : ArithmeticQuotientEquationsData.Mat K => M i j) he.symm |
| 432 | _ = _ := congrArg Prod.snd (splitUnitaryEquiv_entry d r b hr hr0 g i j) |
| 433 | |
| 434 | lemma quadraticUnitaryEquivSL_symm_entry (d r b : K) (hr : r ^ 2 = d) |
| 435 | (hr0 : r ≠ 0) (hb : b ≠ 0) (A : ArithmeticQuotientEquationsData.SL K) (i j : Fin 3) : |
| 436 | ((quadraticUnitaryEquivSL d r b hr hr0 hb).symm A).val i j = |
| 437 | splitQuadraticInverse d r (A.val i j, dualMatrix b A i j) := by |
| 438 | let e := quadraticUnitaryEquivSL d r b hr hr0 hb |
| 439 | have hf := quadraticUnitaryEquivSL_fst d r b hr hr0 hb (e.symm A) i j |
| 440 | have hs := quadraticUnitaryEquivSL_snd d r b hr hr0 hb (e.symm A) i j |
| 441 | change (e (e.symm A)).val i j = _ at hf |
| 442 | change dualMatrix b (e (e.symm A)) i j = _ at hs |
| 443 | rw [e.apply_symm_apply] at hf hs |
| 444 | have he : splitQuadraticHom d r hr ((e.symm A).val i j) = |
| 445 | (A.val i j, dualMatrix b A i j) := Prod.ext hf.symm hs.symm |
| 446 | rw [← he] |
| 447 | exact (splitQuadratic_left_inverse d r hr hr0 _).symm |
| 448 | |
| 449 | end |
| 450 | |
| 451 | /-! Polynomial coordinates for the inverse splitting map, with all divisions |
| 452 | absorbed into fixed scalar coefficients. -/ |
| 453 | |
| 454 | open scoped Classical |
| 455 | open OAI.Geometry.ComplexBall.ArithmeticQuotientEquationsData |
| 456 | |
| 457 | section Ring |
| 458 | variable {R S : Type*} [CommRing R] [CommRing S] |
| 459 | |
| 460 | def splitDualMatrix (b binv : R) (A : ArithmeticQuotientEquationsData.Mat R) : ArithmeticQuotientEquationsData.Mat R := |
| 461 | Matrix.diagonal (ArithmeticQuotientEquationsData.diagonalCoefficient binv) * A.adjugate.transpose * |
| 462 | Matrix.diagonal (ArithmeticQuotientEquationsData.diagonalCoefficient b) |
| 463 | |
| 464 | lemma splitDualMatrix_map (b binv : R) (A : ArithmeticQuotientEquationsData.Mat R) (f : R →+* S) : |
| 465 | (splitDualMatrix b binv A).map f = splitDualMatrix (f b) (f binv) (A.map f) := by |
| 466 | have hd (x : R) : (Matrix.diagonal (ArithmeticQuotientEquationsData.diagonalCoefficient x)).map f = |
| 467 | Matrix.diagonal (ArithmeticQuotientEquationsData.diagonalCoefficient (f x)) := by |
| 468 | rw [Matrix.diagonal_map (map_zero f)] |
| 469 | apply congrArg Matrix.diagonal |
| 470 | funext i |
| 471 | dsimp [ArithmeticQuotientEquationsData.diagonalCoefficient] |
| 472 | split_ifs <;> simp |
| 473 | have ha : A.adjugate.transpose.map f = (A.map f).adjugate.transpose := |
| 474 | congrArg Matrix.transpose (f.map_adjugate A) |
| 475 | simp only [splitDualMatrix, Matrix.map_mul, hd, ha] |
| 476 | |
| 477 | def splitDecodeMatrix (d b binv half invTwoRoot : R) (A : ArithmeticQuotientEquationsData.Mat R) : |
| 478 | ArithmeticQuotientEquationsData.Mat (QuadraticAlgebra R d 0) := fun i j => |
| 479 | ⟨(A i j + splitDualMatrix b binv A i j) * half, |
| 480 | (A i j - splitDualMatrix b binv A i j) * invTwoRoot⟩ |
| 481 | |
| 482 | lemma splitDecodeMatrix_map (d b binv half invTwoRoot : R) (A : ArithmeticQuotientEquationsData.Mat R) (f : R →+* S) : |
| 483 | (splitDecodeMatrix d b binv half invTwoRoot A).map (ArithmeticQuotientEquationsData.quadraticMap d f) = |
| 484 | splitDecodeMatrix (f d) (f b) (f binv) (f half) (f invTwoRoot) (A.map f) := by |
| 485 | apply Matrix.ext |
| 486 | intro i j |
| 487 | have he := congrArg (fun M : ArithmeticQuotientEquationsData.Mat S => M i j) (splitDualMatrix_map b binv A f) |
| 488 | change f (splitDualMatrix b binv A i j) = |
| 489 | splitDualMatrix (f b) (f binv) (A.map f) i j at he |
| 490 | apply QuadraticAlgebra.ext |
| 491 | · change f ((A i j + splitDualMatrix b binv A i j) * half) = _ |
| 492 | simp only [splitDecodeMatrix, map_mul, map_add, he, Matrix.map_apply] |
| 493 | · change f ((A i j - splitDualMatrix b binv A i j) * invTwoRoot) = _ |
| 494 | simp only [splitDecodeMatrix, map_mul, map_sub, he, Matrix.map_apply] |
| 495 | |
| 496 | def splitLiftMatrix (d b binv half invTwoRoot : R) (A : ArithmeticQuotientEquationsData.Mat R) : Matrix (Fin 6) (Fin 6) R := |
| 497 | ArithmeticQuotientEquationsData.regularMatrix d (splitDecodeMatrix d b binv half invTwoRoot A) |
| 498 | |
| 499 | lemma splitLiftMatrix_map (d b binv half invTwoRoot : R) (A : ArithmeticQuotientEquationsData.Mat R) (f : R →+* S) : |
| 500 | (splitLiftMatrix d b binv half invTwoRoot A).map f = |
| 501 | splitLiftMatrix (f d) (f b) (f binv) (f half) (f invTwoRoot) (A.map f) := by |
| 502 | rw [splitLiftMatrix, ← ArithmeticQuotientEquationsData.regularMatrix_map, splitDecodeMatrix_map] |
| 503 | rfl |
| 504 | |
| 505 | end Ring |
| 506 | |
| 507 | variable {K : Type} [Field K] [CharZero K] |
| 508 | |
| 509 | def splitSLToPoints (d r b : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) (hb : b ≠ 0) : |
| 510 | ArithmeticQuotientEquationsData.SL K ≃* (unitaryAlgebraicGroup d b).RationalPoints := |
| 511 | (quadraticUnitaryEquivSL d r b hr hr0 hb).symm.trans (regularUnitaryEquiv d b) |
| 512 | |
| 513 | lemma splitSLToPoints_matrix (d r b : K) (hr : r ^ 2 = d) (hr0 : r ≠ 0) (hb : b ≠ 0) |
| 514 | (A : ArithmeticQuotientEquationsData.SL K) : |
| 515 | (splitSLToPoints d r b hr hr0 hb A).val.val = |
| 516 | splitLiftMatrix d b b⁻¹ (2⁻¹) ((2 * r)⁻¹) A.val := by |
| 517 | change ArithmeticQuotientEquationsData.regularMatrix d ((quadraticUnitaryEquivSL d r b hr hr0 hb).symm A).val.val = _ |
| 518 | apply congrArg (ArithmeticQuotientEquationsData.regularMatrix d) |
| 519 | apply Matrix.ext |
| 520 | intro i j |
| 521 | rw [quadraticUnitaryEquivSL_symm_entry] |
| 522 | apply QuadraticAlgebra.ext <;> |
| 523 | simp [splitQuadraticInverse, splitDecodeMatrix, splitDualMatrix, dualMatrix, |
| 524 | formMatrix, div_eq_mul_inv] |
| 525 | |
| 526 | end |
| 527 | |
| 528 | end OAI.Geometry.ComplexBall.ArithmeticQuotientSplitUnitary |