Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 00f9122

Browse files
committed
feat(number_theory/number_field/units): add is_unit_iff_norm (#18866)
This PR creates the file `number_theory/number_field/units.lean` and proves the result : ```lean lemma is_unit_iff_norm [number_field K] (x : π“ž K) : is_unit x ↔ abs (ring_of_integers.norm β„š x : β„š) = 1 ```
1 parent 2558080 commit 00f9122

8 files changed

Lines changed: 114 additions & 2 deletions

File tree

β€Žsrc/algebra/group_power/order.leanβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,11 @@ lemma pow_abs (a : R) (n : β„•) : |a| ^ n = |a ^ n| :=
457457
lemma abs_neg_one_pow (n : β„•) : |(-1 : R) ^ n| = 1 :=
458458
by rw [←pow_abs, abs_neg, abs_one, one_pow]
459459

460+
lemma abs_pow_eq_one (a : R) {n : β„•} (h : 0 < n) :
461+
|a ^ n| = 1 ↔ |a| = 1 :=
462+
by { convert pow_left_inj (abs_nonneg a) zero_le_one h,
463+
exacts [(pow_abs _ _).symm, (one_pow _).symm] }
464+
460465
theorem pow_bit0_nonneg (a : R) (n : β„•) : 0 ≀ a ^ bit0 n :=
461466
by { rw pow_bit0, exact mul_self_nonneg _ }
462467

β€Žsrc/algebra/ring/equiv.leanβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ variables [non_assoc_ring R] [non_assoc_ring S] (f : R ≃+* S) (x y : R)
392392

393393
@[simp] lemma map_neg_one : f (-1) = -1 := f.map_one β–Έ f.map_neg 1
394394

395+
lemma map_eq_neg_one_iff {x : R} : f x = -1 ↔ x = -1 :=
396+
by rw [← neg_eq_iff_eq_neg, ← neg_eq_iff_eq_neg, ← map_neg, ring_equiv.map_eq_one_iff]
397+
395398
end ring
396399

397400
section non_unital_semiring_hom

β€Žsrc/field_theory/galois.leanβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,16 @@ end is_galois
424424

425425
end galois_equivalent_definitions
426426

427+
section normal_closure
428+
429+
variables (k K F : Type*) [field k] [field K] [field F] [algebra k K] [algebra k F]
430+
[algebra K F] [is_scalar_tower k K F] [is_galois k F]
431+
432+
instance is_galois.normal_closure : is_galois k (normal_closure k K F) :=
433+
{ to_is_separable := is_separable_tower_bot_of_is_separable k _ F }
434+
435+
end normal_closure
436+
427437
section is_alg_closure
428438

429439
@[priority 100]

β€Žsrc/field_theory/is_alg_closed/algebraic_closure.leanβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Kenny Lau
55
-/
66
import algebra.direct_limit
7+
import algebra.char_p.algebra
78
import field_theory.is_alg_closed.basic
89

910
/-!

β€Žsrc/field_theory/is_alg_closed/basic.leanβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ variables [algebra R S] [algebra R L] [is_scalar_tower R S L]
411411
variables [algebra K J] [algebra J L] [is_alg_closure J L] [algebra K L]
412412
[is_scalar_tower K J L]
413413

414+
/-- If `J` is an algebraic extension of `K` and `L` is an algebraic closure of `J`, then it is
415+
also an algebraic closure of `K`. -/
416+
lemma of_algebraic (hKJ : algebra.is_algebraic K J) : is_alg_closure K L :=
417+
⟨is_alg_closure.alg_closed J, algebra.is_algebraic_trans hKJ is_alg_closure.algebraic⟩
414418

415419
/-- A (random) isomorphism between an algebraic closure of `R` and an algebraic closure of
416420
an algebraic extension of `R` -/

β€Žsrc/field_theory/normal.leanβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ begin
435435
apply intermediate_field.finite_dimensional_supr_of_finite,
436436
end
437437

438+
instance is_scalar_tower : is_scalar_tower F (normal_closure F K L) L :=
439+
is_scalar_tower.subalgebra' F L L _
440+
438441
end normal_closure
439442

440443
end normal_closure

β€Žsrc/number_theory/number_field/norm.leanβ€Ž

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rings of integers.
2222

2323
open_locale number_field big_operators
2424

25-
open finset number_field algebra
25+
open finset number_field algebra finite_dimensional
2626

2727
namespace ring_of_integers
2828

@@ -37,7 +37,15 @@ local attribute [instance] number_field.ring_of_integers_algebra
3737
lemma coe_algebra_map_norm [is_separable K L] (x : π“ž L) :
3838
(algebra_map (π“ž K) (π“ž L) (norm K x) : L) = algebra_map K L (algebra.norm K (x : L)) := rfl
3939

40-
lemma is_unit_norm [is_galois K L] {x : π“ž L} :
40+
lemma coe_norm_algebra_map [is_separable K L] (x : π“ž K) :
41+
(norm K (algebra_map (π“ž K) (π“ž L) x) : K) = algebra.norm K (algebra_map K L x) := rfl
42+
43+
lemma norm_algebra_map [is_separable K L] (x : π“ž K) :
44+
norm K (algebra_map (π“ž K) (π“ž L) x) = x ^ finrank K L :=
45+
by rw [← subtype.coe_inj, ring_of_integers.coe_norm_algebra_map, algebra.norm_algebra_map,
46+
subsemiring_class.coe_pow]
47+
48+
lemma is_unit_norm_of_is_galois [is_galois K L] {x : π“ž L} :
4149
is_unit (norm K x) ↔ is_unit x :=
4250
begin
4351
classical,
@@ -68,4 +76,32 @@ begin
6876
simp [← finset.mul_prod_erase _ _ (mem_univ alg_equiv.refl)]
6977
end
7078

79+
variables (F : Type*) [field F] [algebra K F] [is_separable K F] [finite_dimensional K F]
80+
81+
lemma norm_norm [is_separable K L] [algebra F L] [is_separable F L] [finite_dimensional F L]
82+
[is_scalar_tower K F L] (x : π“ž L) : norm K (norm F x) = norm K x :=
83+
by rw [← subtype.coe_inj, norm_apply_coe, norm_apply_coe, norm_apply_coe, algebra.norm_norm]
84+
85+
variable {F}
86+
87+
lemma is_unit_norm [char_zero K] {x : π“ž F} :
88+
is_unit (norm K x) ↔ is_unit x :=
89+
begin
90+
letI : algebra K (algebraic_closure K) := algebraic_closure.algebra K,
91+
let L := normal_closure K F (algebraic_closure F),
92+
haveI : finite_dimensional F L := finite_dimensional.right K F L,
93+
haveI : is_alg_closure K (algebraic_closure F) :=
94+
is_alg_closure.of_algebraic K F (algebraic_closure F) (algebra.is_algebraic_of_finite K F),
95+
haveI : is_galois F L := is_galois.tower_top_of_is_galois K F L,
96+
calc
97+
is_unit (norm K x) ↔ is_unit ((norm K) x ^ finrank F L) :
98+
(is_unit_pow_iff (pos_iff_ne_zero.mp finrank_pos)).symm
99+
... ↔ is_unit (norm K (algebra_map (π“ž F) (π“ž L) x)) :
100+
by rw [← norm_norm K F (algebra_map (π“ž F) (π“ž L) x), norm_algebra_map F _, map_pow]
101+
... ↔ is_unit (algebra_map (π“ž F) (π“ž L) x) : is_unit_norm_of_is_galois K
102+
... ↔ is_unit (norm F (algebra_map (π“ž F) (π“ž L) x)) : (is_unit_norm_of_is_galois F).symm
103+
... ↔ is_unit (x ^ finrank F L) : (congr_arg is_unit (norm_algebra_map F _)).to_iff
104+
... ↔ is_unit x : is_unit_pow_iff (pos_iff_ne_zero.mp finrank_pos),
105+
end
106+
71107
end ring_of_integers
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/-
2+
Copyright (c) 2023 Xavier Roblot. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Xavier Roblot
5+
-/
6+
import number_theory.number_field.norm
7+
8+
/-!
9+
# Units of a number field
10+
We prove results about the group `(π“ž K)Λ£` of units of the ring of integers `π“ž K` of a number
11+
field `K`.
12+
13+
## Main results
14+
* `number_field.is_unit_iff_norm`: an algebraic integer `x : π“ž K` is a unit if and only if
15+
`|norm β„š x| = 1`
16+
17+
## Tags
18+
number field, units
19+
-/
20+
21+
open_locale number_field
22+
23+
noncomputable theory
24+
25+
open number_field units
26+
27+
section rat
28+
29+
lemma rat.ring_of_integers.is_unit_iff {x : π“ž β„š} :
30+
is_unit x ↔ ((x : β„š) = 1) ∨ ((x : β„š) = -1) :=
31+
by simp_rw [(is_unit_map_iff (rat.ring_of_integers_equiv : π“ž β„š β†’+* β„€) x).symm, int.is_unit_iff,
32+
ring_equiv.coe_to_ring_hom, ring_equiv.map_eq_one_iff, ring_equiv.map_eq_neg_one_iff,
33+
← subtype.coe_injective.eq_iff, add_subgroup_class.coe_neg, algebra_map.coe_one]
34+
35+
end rat
36+
37+
variables (K : Type*) [field K]
38+
39+
section is_unit
40+
41+
local attribute [instance] number_field.ring_of_integers_algebra
42+
43+
variable {K}
44+
45+
lemma is_unit_iff_norm [number_field K] (x : π“ž K) :
46+
is_unit x ↔ |(ring_of_integers.norm β„š x : β„š)| = 1 :=
47+
by { convert (ring_of_integers.is_unit_norm β„š).symm,
48+
rw [← abs_one, abs_eq_abs, ← rat.ring_of_integers.is_unit_iff], }
49+
50+
end is_unit

0 commit comments

Comments
Β (0)