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

Commit 53e2307

Browse files
kim-emjcommelin
andcommitted
feat(ring_theory): every left-noetherian ring has invariant basis number (#7678)
This is a lovely case where we get more for less. By directly proving that every left-noetherian ring has invariant basis number, we don't need to import `linear_algebra.finite_dimensional` in order to do the `field` case. This means that in a future PR we can instead import `ring_theory.invariant_basis_number` in `linear_algebra.finite_dimensional`, and set up the theory of bases in greater generality. Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Johan Commelin <johan@commelin.net>
1 parent c63c6d1 commit 53e2307

File tree

3 files changed

+114
-16
lines changed

3 files changed

+114
-16
lines changed

src/algebra/module/linear_map.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ variables (f g)
133133
@[simp] lemma map_zero : f 0 = 0 :=
134134
f.to_distrib_mul_action_hom.map_zero
135135

136+
@[simp] lemma map_eq_zero_iff (h : function.injective f) {x : M} : f x = 0 ↔ x = 0 :=
137+
⟨λ w, by { apply h, simp [w], }, λ w, by { subst w, simp, }⟩
138+
136139
variables (M M₂)
137140
/--
138141
A typeclass for `has_scalar` structures which can be moved through a `linear_map`.

src/linear_algebra/basic.lean

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,6 +2635,30 @@ theorem fun_left_comp (f₁ : n → p) (f₂ : m → n) :
26352635
fun_left R M (f₁ ∘ f₂) = (fun_left R M f₂).comp (fun_left R M f₁) :=
26362636
rfl
26372637

2638+
theorem fun_left_surjective_of_injective (f : m → n) (hf : injective f) :
2639+
surjective (fun_left R M f) :=
2640+
begin
2641+
classical,
2642+
intro g,
2643+
refine ⟨λ x, if h : ∃ y, f y = x then g h.some else 0, _⟩,
2644+
{ ext,
2645+
dsimp only [fun_left_apply],
2646+
split_ifs with w,
2647+
{ congr,
2648+
exact hf w.some_spec, },
2649+
{ simpa only [not_true, exists_apply_eq_apply] using w } },
2650+
end
2651+
2652+
theorem fun_left_injective_of_surjective (f : m → n) (hf : surjective f) :
2653+
injective (fun_left R M f) :=
2654+
begin
2655+
obtain ⟨g, hg⟩ := hf.has_right_inverse,
2656+
suffices : left_inverse (fun_left R M g) (fun_left R M f),
2657+
{ exact this.injective },
2658+
intro x,
2659+
simp only [← linear_map.comp_apply, ← fun_left_comp, hg.id, fun_left_id]
2660+
end
2661+
26382662
/-- Given an `R`-module `M` and an equivalence `m ≃ n` between arbitrary types,
26392663
construct a linear equivalence `(n → M) ≃ₗ[R] (m → M)` -/
26402664
def fun_congr_left (e : m ≃ n) : (n → M) ≃ₗ[R] (m → M) :=

src/linear_algebra/invariant_basis_number.lean

Lines changed: 87 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2020 Markus Himmel. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Markus Himmel
55
-/
6-
import linear_algebra.finite_dimensional
6+
import ring_theory.principal_ideal_domain
77
import ring_theory.ideal.basic
88

99
/-!
@@ -14,19 +14,34 @@ notion of the rank of a finitely generated free (left) `R`-module. Since a finit
1414
module with a basis consisting of `n` elements is linearly equivalent to `fin n → R`, it is
1515
sufficient that `(fin n → R) ≃ₗ[R] (fin m → R)` implies `n = m`.
1616
17+
It is also useful to consider two stronger conditions, namely the rank condition,
18+
that a surjective linear map `(fin n → R) →ₗ[R] (fin m → R)` implies `m ≤ n` and
19+
the strong rank condition, that an injective linear map `(fin n → R) →ₗ[R] (fin m → R)`
20+
implies `n ≤ m`.
21+
22+
The strong rank condition implies the rank condition, and the rank condition implies
23+
the invariant basis number property.
24+
1725
## Main definitions
1826
27+
`strong_rank_condition R` is a type class stating that `R` satisfies the strong rank condition.
28+
`rank_condition R` is a type class stating that `R` satisfies the rank condition.
1929
`invariant_basis_number R` is a type class stating that `R` has the invariant basis number property.
2030
2131
## Main results
2232
23-
We show that every nontrivial commutative ring has the invariant basis number property.
33+
We show that every nontrivial left-noetherian ring satifies the rank condition,
34+
(and so in particular every division ring or field),
35+
and then use this to show every nontrivial commutative ring has the invariant basis number property.
2436
2537
## Future work
2638
39+
We can improve these results: in fact every nontrivial left-noetherian ring,
40+
and every commutative rings, satisfies the strong rank condition.
41+
2742
So far, there is no API at all for the `invariant_basis_number` class. There are several natural
2843
ways to formulate that a module `M` is finitely generated and free, for example
29-
`M ≃ₗ[R] (fin n → R)`, `M ≃ₗ[R] (ι → R)`, where `ι` is a fintype, or prividing a basis indexed by
44+
`M ≃ₗ[R] (fin n → R)`, `M ≃ₗ[R] (ι → R)`, where `ι` is a fintype, or providing a basis indexed by
3045
a finite type. There should be lemmas applying the invariant basis number property to each
3146
situation.
3247
@@ -37,6 +52,7 @@ variants) should be formalized.
3752
## References
3853
3954
* https://en.wikipedia.org/wiki/Invariant_basis_number
55+
* https://mathoverflow.net/a/2574/
4056
4157
## Tags
4258
@@ -47,18 +63,45 @@ free module, rank, invariant basis number, IBN
4763
noncomputable theory
4864

4965
open_locale classical big_operators
66+
open function
5067

5168
universes u v w
5269

5370
section
5471
variables (R : Type u) [ring R]
5572

73+
/-- We say that `R` satisfies the strong rank condition if `(fin n → R) →ₗ[R] (fin m → R)` injective
74+
implies `n ≤ m`. -/
75+
class strong_rank_condition : Prop :=
76+
(le_of_fin_injective : ∀ {n m : ℕ} (f : (fin n → R) →ₗ[R] (fin m → R)), injective f → n ≤ m)
77+
78+
lemma le_of_fin_injective [strong_rank_condition R] {n m : ℕ} (f : (fin n → R) →ₗ[R] (fin m → R)) :
79+
injective f → n ≤ m :=
80+
strong_rank_condition.le_of_fin_injective f
81+
82+
/-- We say that `R` satisfies the rank condition if `(fin n → R) →ₗ[R] (fin m → R)` surjective
83+
implies `m ≤ n`. -/
84+
class rank_condition : Prop :=
85+
(le_of_fin_surjective : ∀ {n m : ℕ} (f : (fin n → R) →ₗ[R] (fin m → R)), surjective f → m ≤ n)
86+
87+
lemma le_of_fin_surjective [rank_condition R] {n m : ℕ} (f : (fin n → R) →ₗ[R] (fin m → R)) :
88+
surjective f → m ≤ n :=
89+
rank_condition.le_of_fin_surjective f
90+
91+
-- TODO the strong rank condition implies the rank condition
92+
5693
/-- We say that `R` has the invariant basis number property if `(fin n → R) ≃ₗ[R] (fin m → R)`
5794
implies `n = m`. This gives rise to a well-defined notion of rank of a finitely generated free
5895
module. -/
5996
class invariant_basis_number : Prop :=
6097
(eq_of_fin_equiv : ∀ {n m : ℕ}, ((fin n → R) ≃ₗ[R] (fin m → R)) → n = m)
6198

99+
@[priority 100]
100+
instance invariant_basis_number_of_rank_condition [rank_condition R] : invariant_basis_number R :=
101+
{ eq_of_fin_equiv := λ n m e, le_antisymm
102+
(le_of_fin_surjective R e.symm.to_linear_map e.symm.surjective)
103+
(le_of_fin_surjective R e.to_linear_map e.surjective) }
104+
62105
end
63106

64107
section
@@ -79,17 +122,44 @@ end
79122
end
80123

81124
section
82-
open finite_dimensional
83-
84-
/-- A field has invariant basis number. This will be superseded below by the fact that any nonzero
85-
commutative ring has invariant basis number. -/
86-
lemma invariant_basis_number_field {K : Type u} [field K] : invariant_basis_number K :=
87-
⟨λ n m e,
88-
calc n = fintype.card (fin n) : eq.symm $ fintype.card_fin n
89-
... = finrank K (fin n → K) : eq.symm $ finrank_eq_card_basis (pi.basis_fun K (fin n))
90-
... = finrank K (fin m → K) : linear_equiv.finrank_eq e
91-
... = fintype.card (fin m) : finrank_eq_card_basis (pi.basis_fun K (fin m))
92-
... = m : fintype.card_fin m⟩
125+
variables (R : Type u) [ring R] [nontrivial R] [is_noetherian_ring R]
126+
127+
-- TODO: in fact, any nontrivial noetherian ring satisfies the strong rank condition.
128+
129+
/-- Any nontrivial noetherian ring satisfies the rank condition. -/
130+
-- Note this includes fields,
131+
-- and we use this below to show any commutative ring has invariant basis number.
132+
@[priority 100]
133+
instance noetherian_ring_rank_condition : rank_condition R :=
134+
begin
135+
intros n m f fs,
136+
by_contradiction h,
137+
rw [not_le, ←nat.add_one_le_iff, le_iff_exists_add] at h,
138+
obtain ⟨m, rfl⟩ := h,
139+
-- Let `g` be the projection map discarding the last `n` coordinates.
140+
let g : (fin ((n + 1) + m) → R) →ₗ[R] (fin n → R) :=
141+
linear_map.fun_left R R ((fin.cast_add 1).trans (fin.cast_add m)),
142+
have gs : function.surjective g :=
143+
linear_map.fun_left_surjective_of_injective _ _ _
144+
((fin.cast_add m).injective.comp (fin.cast_add 1).injective),
145+
-- Since `g` composed with the `f` is a surjective endomorphism of
146+
-- a noetherian module, it is injective, and so `f` itself is injective.
147+
have gi : function.injective g :=
148+
(is_noetherian.injective_of_surjective_endomorphism (f.comp g)
149+
(function.surjective.comp fs gs)).of_comp,
150+
-- But this gives an easy contradiction.
151+
let i : fin (n + 1 + m) := fin.cast_add m (fin.nat_add n 0),
152+
let x : fin (n + 1 + m) → R := finsupp.single i 1,
153+
have z : g x = 0 := begin
154+
ext j,
155+
simp only [g, x, i, linear_map.fun_left_apply, pi.zero_apply],
156+
rw finsupp.single_eq_of_ne,
157+
refine fin.ne_of_vne _,
158+
simp only [add_zero, fin.coe_zero, fin.val_eq_coe, fin.coe_nat_add, ne.def, fin.coe_cast_add],
159+
exact j.2.ne.symm,
160+
end,
161+
simpa [x] using congr_fun ((g.map_eq_zero_iff gi).mp z) i,
162+
end
93163

94164
end
95165

@@ -134,8 +204,9 @@ end
134204
end
135205

136206
section
137-
local attribute [instance] invariant_basis_number_field
138-
local attribute [instance, priority 1] ideal.quotient.field
207+
local attribute [instance] ideal.quotient.field
208+
209+
-- TODO: in fact, any nontrivial commutative ring satisfies the strong rank condition.
139210

140211
/-- Nontrivial commutative rings have the invariant basis number property. -/
141212
@[priority 100]

0 commit comments

Comments
 (0)