@@ -156,7 +156,7 @@ end NumberField.canonicalEmbedding
156
156
157
157
namespace NumberField.mixedEmbedding
158
158
159
- open NumberField NumberField.InfinitePlace FiniteDimensional
159
+ open NumberField NumberField.InfinitePlace FiniteDimensional Finset
160
160
161
161
/-- The space `ℝ^r₁ × ℂ^r₂` with `(r₁, r₂)` the signature of `K`. -/
162
162
local notation "E" K =>
@@ -177,9 +177,9 @@ instance [NumberField K] : Nontrivial (E K) := by
177
177
178
178
protected theorem finrank [NumberField K] : finrank ℝ (E K) = finrank ℚ K := by
179
179
classical
180
- rw [finrank_prod, finrank_pi, finrank_pi_fintype, Complex.finrank_real_complex, Finset. sum_const,
181
- Finset. card_univ, ← NrRealPlaces, ← NrComplexPlaces, ← card_real_embeddings,
182
- Algebra.id.smul_eq_mul, mul_comm, ← card_complex_embeddings, ← NumberField.Embeddings.card K ℂ,
180
+ rw [finrank_prod, finrank_pi, finrank_pi_fintype, Complex.finrank_real_complex, sum_const,
181
+ card_univ, ← NrRealPlaces, ← NrComplexPlaces, ← card_real_embeddings, Algebra.id.smul_eq_mul ,
182
+ mul_comm, ← card_complex_embeddings, ← NumberField.Embeddings.card K ℂ,
183
183
Fintype.card_subtype_compl, Nat.add_sub_of_le (Fintype.card_subtype_le _)]
184
184
185
185
theorem _root_.NumberField.mixedEmbedding_injective [NumberField K] :
@@ -246,57 +246,126 @@ noncomputable section norm
246
246
247
247
open scoped Classical
248
248
249
- variable [NumberField K] {K}
249
+ variable {K}
250
+
251
+ /-- The norm at the infinite place `w` of an element of
252
+ `({w // IsReal w} → ℝ) × ({ w // IsComplex w } → ℂ)`. -/
253
+ def normAtPlace (w : InfinitePlace K) : (E K) →*₀ ℝ where
254
+ toFun x := if hw : IsReal w then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, not_isReal_iff_isComplex.mp hw⟩‖
255
+ map_zero' := by simp
256
+ map_one' := by simp
257
+ map_mul' x y := by split_ifs <;> simp
258
+
259
+ theorem normAtPlace_nonneg (w : InfinitePlace K) (x : E K) :
260
+ 0 ≤ normAtPlace w x := by
261
+ rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
262
+ split_ifs <;> exact norm_nonneg _
263
+
264
+ theorem normAtPlace_neg (w : InfinitePlace K) (x : E K) :
265
+ normAtPlace w (- x) = normAtPlace w x := by
266
+ rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
267
+ split_ifs <;> simp
268
+
269
+ theorem normAtPlace_add_le (w : InfinitePlace K) (x y : E K) :
270
+ normAtPlace w (x + y) ≤ normAtPlace w x + normAtPlace w y := by
271
+ rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
272
+ split_ifs <;> exact norm_add_le _ _
273
+
274
+ theorem normAtPlace_smul (w : InfinitePlace K) (x : E K) (c : ℝ) :
275
+ normAtPlace w (c • x) = |c| * normAtPlace w x := by
276
+ rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
277
+ split_ifs
278
+ · rw [Prod.smul_fst, Pi.smul_apply, norm_smul, Real.norm_eq_abs]
279
+ · rw [Prod.smul_snd, Pi.smul_apply, norm_smul, Real.norm_eq_abs, Complex.norm_eq_abs]
280
+
281
+ theorem normAtPlace_real (w : InfinitePlace K) (c : ℝ) :
282
+ normAtPlace w ((fun _ ↦ c, fun _ ↦ c) : (E K)) = |c| := by
283
+ rw [show ((fun _ ↦ c, fun _ ↦ c) : (E K)) = c • 1 by ext <;> simp, normAtPlace_smul, map_one,
284
+ mul_one]
285
+
286
+ theorem normAtPlace_apply_isReal {w : InfinitePlace K} (hw : IsReal w) (x : E K):
287
+ normAtPlace w x = ‖x.1 ⟨w, hw⟩‖ := by
288
+ rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, dif_pos]
289
+
290
+ theorem normAtPlace_apply_isComplex {w : InfinitePlace K} (hw : IsComplex w) (x : E K) :
291
+ normAtPlace w x = ‖x.2 ⟨w, hw⟩‖ := by
292
+ rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk,
293
+ dif_neg (not_isReal_iff_isComplex.mpr hw)]
294
+
295
+ @[simp]
296
+ theorem normAtPlace_apply (w : InfinitePlace K) (x : K) :
297
+ normAtPlace w (mixedEmbedding K x) = w x := by
298
+ simp_rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, mixedEmbedding,
299
+ RingHom.prod_apply, Pi.ringHom_apply, norm_embedding_of_isReal, norm_embedding_eq, dite_eq_ite,
300
+ ite_id]
301
+
302
+ theorem normAtPlace_eq_zero {x : E K} :
303
+ (∀ w, normAtPlace w x = 0 ) ↔ x = 0 := by
304
+ refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
305
+ · ext w
306
+ · exact norm_eq_zero'.mp (normAtPlace_apply_isReal w.prop _ ▸ h w.1 )
307
+ · exact norm_eq_zero'.mp (normAtPlace_apply_isComplex w.prop _ ▸ h w.1 )
308
+ · simp_rw [h, map_zero, implies_true]
309
+
310
+ variable [NumberField K]
311
+
312
+ theorem nnnorm_eq_sup_normAtPlace (x : E K) :
313
+ ‖x‖₊ = univ.sup fun w ↦ ⟨normAtPlace w x, normAtPlace_nonneg w x⟩ := by
314
+ rw [show (univ : Finset (InfinitePlace K)) = (univ.image
315
+ (fun w : {w : InfinitePlace K // IsReal w} ↦ w.1 )) ∪
316
+ (univ.image (fun w : {w : InfinitePlace K // IsComplex w} ↦ w.1 ))
317
+ by ext; simp [isReal_or_isComplex], sup_union, univ.sup_image, univ.sup_image, sup_eq_max,
318
+ Prod.nnnorm_def', Pi.nnnorm_def, Pi.nnnorm_def]
319
+ congr
320
+ · ext w
321
+ simp [normAtPlace_apply_isReal w.prop]
322
+ · ext w
323
+ simp [normAtPlace_apply_isComplex w.prop]
324
+
325
+ theorem norm_eq_sup'_normAtPlace (x : E K) :
326
+ ‖x‖ = univ.sup' univ_nonempty fun w ↦ normAtPlace w x := by
327
+ rw [← coe_nnnorm, nnnorm_eq_sup_normAtPlace, ← sup'_eq_sup univ_nonempty, ← NNReal.val_eq_coe,
328
+ ← OrderHom.Subtype.val_coe, map_finset_sup', OrderHom.Subtype.val_coe]
329
+ rfl
250
330
251
- /-- The norm of `x` is `∏ w real, ‖x‖_w * ∏ w complex, ‖x‖_w ^ 2 `. It is defined such that
252
- the norm of `mixedEmbedding K a` for `a : K` is equal to the absolute value of the norm of `a`
253
- over `ℚ`, see `norm_eq_norm`. -/
331
+ /-- The norm of `x` is `∏ w, (normAtPlace x) ^ mult w `. It is defined such that the norm of
332
+ `mixedEmbedding K a` for `a : K` is equal to the absolute value of the norm of `a` over `ℚ`,
333
+ see `norm_eq_norm`. -/
254
334
protected def norm : (E K) →*₀ ℝ where
255
- toFun := fun x ↦ (∏ w, ‖x.1 w‖) * ∏ w, ‖x.2 w‖ ^ 2
256
- map_one' := by simp only [Prod.fst_one, Pi.one_apply, norm_one, Finset.prod_const_one,
257
- Prod.snd_one, one_pow, mul_one]
258
- map_zero' := by
259
- simp_rw [Prod.fst_zero, Prod.snd_zero, Pi.zero_apply, norm_zero, zero_pow (two_ne_zero),
260
- mul_eq_zero, Finset.prod_const, pow_eq_zero_iff', true_and, Finset.card_univ]
261
- by_contra!
262
- have : finrank ℚ K = 0 := by
263
- rw [← card_add_two_mul_card_eq_rank, NrRealPlaces, NrComplexPlaces, this.1 , this.2 ]
264
- exact ne_of_gt finrank_pos this
265
- map_mul' _ _ := by simp only [Prod.fst_mul, Pi.mul_apply, norm_mul, Real.norm_eq_abs,
266
- Finset.prod_mul_distrib, Prod.snd_mul, Complex.norm_eq_abs, mul_pow]; ring
335
+ toFun x := ∏ w, (normAtPlace w x) ^ (mult w)
336
+ map_one' := by simp only [map_one, one_pow, prod_const_one]
337
+ map_zero' := by simp [mult]
338
+ map_mul' _ _ := by simp only [map_mul, mul_pow, prod_mul_distrib]
339
+
340
+ protected theorem norm_apply (x : E K) :
341
+ mixedEmbedding.norm x = ∏ w, (normAtPlace w x) ^ (mult w) := rfl
342
+
343
+ protected theorem norm_nonneg (x : E K) :
344
+ 0 ≤ mixedEmbedding.norm x := univ.prod_nonneg fun _ _ ↦ pow_nonneg (normAtPlace_nonneg _ _) _
267
345
268
346
protected theorem norm_eq_zero_iff {x : E K} :
269
- mixedEmbedding.norm x = 0 ↔ ( ∃ w, x. 1 w = 0 ) ∨ (∃ w, x. 2 w = 0 ) := by
270
- simp_rw [mixedEmbedding.norm, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, mul_eq_zero ,
271
- Finset.prod_eq_zero_iff, Finset. mem_univ, true_and, pow_eq_zero_iff two_ne_zero, norm_eq_zero ]
347
+ mixedEmbedding.norm x = 0 ↔ ∃ w, normAtPlace w x = 0 := by
348
+ simp_rw [mixedEmbedding.norm, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, prod_eq_zero_iff ,
349
+ mem_univ, true_and, pow_eq_zero_iff mult_ne_zero ]
272
350
273
351
protected theorem norm_ne_zero_iff {x : E K} :
274
- mixedEmbedding.norm x ≠ 0 ↔ ( ∀ w, x. 1 w ≠ 0 ) ∧ (∀ w, x. 2 w ≠ 0 ) := by
352
+ mixedEmbedding.norm x ≠ 0 ↔ ∀ w, normAtPlace w x ≠ 0 := by
275
353
rw [← not_iff_not]
276
- simp_rw [ne_eq, mixedEmbedding.norm_eq_zero_iff, not_and_or, not_forall, not_not]
277
-
278
- theorem norm_real (c : ℝ) :
279
- mixedEmbedding.norm ((fun _ ↦ c, fun _ ↦ c) : (E K)) = |c| ^ finrank ℚ K := by
280
- simp_rw [mixedEmbedding.norm, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, Real.norm_eq_abs,
281
- Complex.norm_eq_abs, Complex.abs_ofReal, Finset.prod_const, ← pow_mul,
282
- ← card_add_two_mul_card_eq_rank, Finset.card_univ, pow_add]
354
+ simp_rw [ne_eq, mixedEmbedding.norm_eq_zero_iff, not_not, not_forall, not_not]
283
355
284
356
theorem norm_smul (c : ℝ) (x : E K) :
285
357
mixedEmbedding.norm (c • x) = |c| ^ finrank ℚ K * (mixedEmbedding.norm x) := by
286
- rw [show c • x = ((fun _ ↦ c, fun _ ↦ c) : (E K)) * x by rfl, map_mul, norm_real]
358
+ simp_rw [mixedEmbedding.norm_apply, normAtPlace_smul, mul_pow, prod_mul_distrib,
359
+ prod_pow_eq_pow_sum, sum_mult_eq]
360
+
361
+ theorem norm_real (c : ℝ) :
362
+ mixedEmbedding.norm ((fun _ ↦ c, fun _ ↦ c) : (E K)) = |c| ^ finrank ℚ K := by
363
+ rw [show ((fun _ ↦ c, fun _ ↦ c) : (E K)) = c • 1 by ext <;> simp, norm_smul, map_one, mul_one]
287
364
288
365
@[simp]
289
366
theorem norm_eq_norm (x : K) :
290
367
mixedEmbedding.norm (mixedEmbedding K x) = |Algebra.norm ℚ x| := by
291
- simp_rw [← prod_eq_abs_norm, mixedEmbedding.norm, mixedEmbedding, RingHom.prod_apply,
292
- MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, Pi.ringHom_apply, norm_embedding_eq,
293
- norm_embedding_of_isReal]
294
- rw [← Fintype.prod_subtype_mul_prod_subtype (fun w : InfinitePlace K ↦ IsReal w)]
295
- congr 1
296
- · exact Finset.prod_congr rfl (fun w _ ↦ by rw [mult, if_pos w.prop, pow_one])
297
- · refine (Fintype.prod_equiv (Equiv.subtypeEquivRight ?_) _ _ (fun w ↦ ?_)).symm
298
- · exact fun _ ↦ not_isReal_iff_isComplex
299
- · rw [Equiv.subtypeEquivRight_apply_coe, mult, if_neg w.prop]
368
+ simp_rw [mixedEmbedding.norm_apply, normAtPlace_apply, prod_eq_abs_norm]
300
369
301
370
theorem norm_eq_zero_iff' {x : E K} (hx : x ∈ Set.range (mixedEmbedding K)) :
302
371
mixedEmbedding.norm x = 0 ↔ x = 0 := by
@@ -310,8 +379,7 @@ noncomputable section stdBasis
310
379
311
380
open scoped Classical
312
381
313
- open Complex MeasureTheory MeasureTheory.Measure Zspan Matrix BigOperators
314
- ComplexConjugate
382
+ open Complex MeasureTheory MeasureTheory.Measure Zspan Matrix BigOperators Finset ComplexConjugate
315
383
316
384
variable [NumberField K]
317
385
@@ -352,8 +420,7 @@ theorem volume_fundamentalDomain_stdBasis :
352
420
volume (fundamentalDomain (stdBasis K)) = 1 := by
353
421
rw [fundamentalDomain_stdBasis, volume_eq_prod, prod_prod, volume_pi, volume_pi, pi_pi, pi_pi,
354
422
Complex.volume_preserving_equiv_pi.measure_preimage ?_, volume_pi, pi_pi, Real.volume_Ico,
355
- sub_zero, ENNReal.ofReal_one, Finset.prod_const_one, Finset.prod_const_one,
356
- Finset.prod_const_one, one_mul]
423
+ sub_zero, ENNReal.ofReal_one, prod_const_one, prod_const_one, prod_const_one, one_mul]
357
424
exact MeasurableSet.pi Set.countable_univ (fun _ _ => measurableSet_Ico)
358
425
359
426
/-- The `Equiv` between `index K` and `K →+* ℂ` defined by sending a real infinite place `w` to
@@ -403,13 +470,13 @@ theorem det_matrixToStdBasis :
403
470
(matrixToStdBasis K).det = (2 ⁻¹ * I) ^ NrComplexPlaces K :=
404
471
calc
405
472
_ = ∏ _k : { w : InfinitePlace K // IsComplex w }, det ((2 : ℂ)⁻¹ • !![1 , 1 ; -I, I]) := by
406
- rw [matrixToStdBasis, det_fromBlocks_zero₂₁, det_diagonal, Finset. prod_const_one, one_mul,
473
+ rw [matrixToStdBasis, det_fromBlocks_zero₂₁, det_diagonal, prod_const_one, one_mul,
407
474
det_reindex_self, det_blockDiagonal]
408
475
_ = ∏ _k : { w : InfinitePlace K // IsComplex w }, (2 ⁻¹ * Complex.I) := by
409
- refine Finset. prod_congr (Eq.refl _) (fun _ _ => ?_)
476
+ refine prod_congr (Eq.refl _) (fun _ _ => ?_)
410
477
field_simp; ring
411
478
_ = (2 ⁻¹ * Complex.I) ^ Fintype.card {w : InfinitePlace K // IsComplex w} := by
412
- rw [Finset. prod_const, Fintype.card]
479
+ rw [prod_const, Fintype.card]
413
480
414
481
/-- Let `x : (K →+* ℂ) → ℂ` such that `x_φ = conj x_(conj φ)` for all `φ : K →+* ℂ`, then the
415
482
representation of `commMap K x` on `stdBasis` is given (up to reindexing) by the product of
@@ -420,32 +487,30 @@ theorem stdBasis_repr_eq_matrixToStdBasis_mul (x : (K →+* ℂ) → ℂ)
420
487
(matrixToStdBasis K *ᵥ (x ∘ (indexEquiv K))) c := by
421
488
simp_rw [commMap, matrixToStdBasis, LinearMap.coe_mk, AddHom.coe_mk,
422
489
mulVec, dotProduct, Function.comp_apply, index, Fintype.sum_sum_type,
423
- diagonal_one, reindex_apply, ← Finset. univ_product_univ, Finset. sum_product,
490
+ diagonal_one, reindex_apply, ← univ_product_univ, sum_product,
424
491
indexEquiv_apply_ofIsReal, Fin.sum_univ_two, indexEquiv_apply_ofIsComplex_fst,
425
492
indexEquiv_apply_ofIsComplex_snd, smul_of, smul_cons, smul_eq_mul,
426
- mul_one, smul_empty, Equiv.prodComm_symm, Equiv.coe_prodComm]
493
+ mul_one, Matrix. smul_empty, Equiv.prodComm_symm, Equiv.coe_prodComm]
427
494
cases c with
428
495
| inl w =>
429
496
simp_rw [stdBasis_apply_ofIsReal, fromBlocks_apply₁₁, fromBlocks_apply₁₂,
430
- one_apply, Matrix.zero_apply, ite_mul, one_mul, zero_mul, Finset. sum_ite_eq,
431
- Finset.mem_univ, ite_true , add_zero, Finset.sum_const_zero, add_zero ,
432
- ← conj_eq_iff_re, hx (embedding w.val), conjugate_embedding_eq_of_isReal w.prop]
497
+ one_apply, Matrix.zero_apply, ite_mul, one_mul, zero_mul, sum_ite_eq, mem_univ, ite_true ,
498
+ add_zero, sum_const_zero , add_zero, ← conj_eq_iff_re, hx (embedding w.val) ,
499
+ conjugate_embedding_eq_of_isReal w.prop]
433
500
| inr c =>
434
501
rcases c with ⟨w, j⟩
435
502
fin_cases j
436
503
· simp_rw [Fin.mk_zero, stdBasis_apply_ofIsComplex_fst, fromBlocks_apply₂₁,
437
504
fromBlocks_apply₂₂, Matrix.zero_apply, submatrix_apply,
438
- blockDiagonal_apply, Prod.swap_prod_mk, ite_mul, zero_mul, Finset.sum_const_zero,
439
- zero_add, Finset.sum_add_distrib, Finset.sum_ite_eq, Finset.mem_univ, ite_true,
440
- of_apply, cons_val', cons_val_zero, cons_val_one,
441
- head_cons, ← hx (embedding w), re_eq_add_conj]
505
+ blockDiagonal_apply, Prod.swap_prod_mk, ite_mul, zero_mul, sum_const_zero, zero_add,
506
+ sum_add_distrib, sum_ite_eq, mem_univ, ite_true, of_apply, cons_val', cons_val_zero,
507
+ cons_val_one, head_cons, ← hx (embedding w), re_eq_add_conj]
442
508
field_simp
443
509
· simp_rw [Fin.mk_one, stdBasis_apply_ofIsComplex_snd, fromBlocks_apply₂₁,
444
- fromBlocks_apply₂₂, Matrix.zero_apply, submatrix_apply,
445
- blockDiagonal_apply, Prod.swap_prod_mk, ite_mul, zero_mul, Finset.sum_const_zero,
446
- zero_add, Finset.sum_add_distrib, Finset.sum_ite_eq, Finset.mem_univ, ite_true,
447
- of_apply, cons_val', cons_val_zero, cons_val_one,
448
- head_cons, ← hx (embedding w), im_eq_sub_conj]
510
+ fromBlocks_apply₂₂, Matrix.zero_apply, submatrix_apply, blockDiagonal_apply,
511
+ Prod.swap_prod_mk, ite_mul, zero_mul, sum_const_zero, zero_add, sum_add_distrib, sum_ite_eq,
512
+ mem_univ, ite_true, of_apply, cons_val', cons_val_zero, cons_val_one, head_cons,
513
+ ← hx (embedding w), im_eq_sub_conj]
449
514
ring_nf; field_simp
450
515
451
516
end stdBasis
@@ -471,8 +536,8 @@ def latticeBasis :
471
536
-- and it's a basis since it has the right cardinality
472
537
refine basisOfLinearIndependentOfCardEqFinrank this ?_
473
538
rw [← finrank_eq_card_chooseBasisIndex, RingOfIntegers.rank, finrank_prod, finrank_pi,
474
- finrank_pi_fintype, Complex.finrank_real_complex, Finset. sum_const, Finset. card_univ,
475
- ← NrRealPlaces, ← NrComplexPlaces, ← card_real_embeddings, Algebra.id.smul_eq_mul, mul_comm,
539
+ finrank_pi_fintype, Complex.finrank_real_complex, sum_const, card_univ, ← NrRealPlaces ,
540
+ ← NrComplexPlaces, ← card_real_embeddings, Algebra.id.smul_eq_mul, mul_comm,
476
541
← card_complex_embeddings, ← NumberField.Embeddings.card K ℂ, Fintype.card_subtype_compl,
477
542
Nat.add_sub_of_le (Fintype.card_subtype_le _)]
478
543
0 commit comments