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

Commit c7bce28

Browse files
committed
feat(field_theory/tower): generalize rank_mul_rank to rings (#18885)
This also renames `rank_mul_rank` to `lift_rank_mul_lift_rank`
1 parent f231b9d commit c7bce28

2 files changed

Lines changed: 54 additions & 27 deletions

File tree

src/data/complex/module.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ finite_dimensional.trans ℝ ℂ E
198198
lemma rank_real_of_complex (E : Type*) [add_comm_group E] [module ℂ E] :
199199
module.rank ℝ E = 2 * module.rank ℂ E :=
200200
cardinal.lift_inj.1 $
201-
by { rw [← rank_mul_rank' ℝ ℂ E, complex.rank_real_complex], simp [bit0] }
201+
by { rw [← lift_rank_mul_lift_rank ℝ ℂ E, complex.rank_real_complex], simp [bit0] }
202202

203203
lemma finrank_real_of_complex (E : Type*) [add_comm_group E] [module ℂ E] :
204204
finite_dimensional.finrank ℝ E = 2 * finite_dimensional.finrank ℂ E :=

src/field_theory/tower.lean

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ In this file we prove the tower law for arbitrary extensions and finite extensio
1616
Suppose `L` is a field extension of `K` and `K` is a field extension of `F`.
1717
Then `[L:F] = [L:K] [K:F]` where `[E₁:E₂]` means the `E₂`-dimension of `E₁`.
1818
19-
In fact we generalize it to vector spaces, where `L` is not necessarily a field,
20-
but just a vector space over `K`.
19+
In fact we generalize it to rings and modules, where `L` is not necessarily a field,
20+
but just a free module over `K`.
2121
2222
## Implementation notes
2323
@@ -34,31 +34,60 @@ tower law
3434
universes u v w u₁ v₁ w₁
3535
open_locale classical big_operators
3636

37-
section field
38-
37+
open finite_dimensional
3938
open cardinal
4039

4140
variables (F : Type u) (K : Type v) (A : Type w)
42-
variables [field F] [division_ring K] [add_comm_group A]
41+
42+
section ring
43+
44+
variables [comm_ring F] [ring K] [add_comm_group A]
4345
variables [algebra F K] [module K A] [module F A] [is_scalar_tower F K A]
46+
variables [strong_rank_condition F] [strong_rank_condition K] [module.free F K] [module.free K A]
4447

45-
/-- Tower law: if `A` is a `K`-vector space and `K` is a field extension of `F` then
46-
`dim_F(A) = dim_F(K) * dim_K(A)`. -/
47-
theorem rank_mul_rank' :
48+
/-- Tower law: if `A` is a `K`-module and `K` is an extension of `F` then
49+
$\operatorname{rank}_F(A) = \operatorname{rank}_F(K) * \operatorname{rank}_K(A)$. -/
50+
theorem lift_rank_mul_lift_rank :
4851
(cardinal.lift.{w} (module.rank F K) * cardinal.lift.{v} (module.rank K A)) =
4952
cardinal.lift.{v} (module.rank F A) :=
50-
let b := basis.of_vector_space F K, c := basis.of_vector_space K A in
51-
by rw [← (module.rank F K).lift_id, ← b.mk_eq_rank,
52-
← (module.rank K A).lift_id, ← c.mk_eq_rank,
53-
← lift_umax.{w v}, ← (b.smul c).mk_eq_rank, mk_prod, lift_mul,
54-
lift_lift, lift_lift, lift_lift, lift_lift, lift_umax]
53+
begin
54+
obtain ⟨_, b⟩ := module.free.exists_basis F K,
55+
obtain ⟨_, c⟩ := module.free.exists_basis K A,
56+
rw [← (module.rank F K).lift_id, ← b.mk_eq_rank,
57+
← (module.rank K A).lift_id, ← c.mk_eq_rank,
58+
← lift_umax.{w v}, ← (b.smul c).mk_eq_rank, mk_prod, lift_mul,
59+
lift_lift, lift_lift, lift_lift, lift_lift, lift_umax]
60+
end
5561

56-
/-- Tower law: if `A` is a `K`-vector space and `K` is a field extension of `F` then
57-
`dim_F(A) = dim_F(K) * dim_K(A)`. -/
58-
theorem rank_mul_rank (F : Type u) (K A : Type v) [field F] [field K] [add_comm_group A]
59-
[algebra F K] [module K A] [module F A] [is_scalar_tower F K A] :
62+
/-- Tower law: if `A` is a `K`-module and `K` is an extension of `F` then
63+
$\operatorname{rank}_F(A) = \operatorname{rank}_F(K) * \operatorname{rank}_K(A)$.
64+
65+
This is a simpler version of `lift_rank_mul_lift_rank` with `K` and `A` in the same universe. -/
66+
theorem rank_mul_rank (F : Type u) (K A : Type v)
67+
[comm_ring F] [ring K] [add_comm_group A]
68+
[algebra F K] [module K A] [module F A] [is_scalar_tower F K A]
69+
[strong_rank_condition F] [strong_rank_condition K] [module.free F K] [module.free K A] :
6070
module.rank F K * module.rank K A = module.rank F A :=
61-
by convert rank_mul_rank' F K A; rw lift_id
71+
by convert lift_rank_mul_lift_rank F K A; rw lift_id
72+
73+
/-- Tower law: if `A` is a `K`-module and `K` is an extension of `F` then
74+
$\operatorname{rank}_F(A) = \operatorname{rank}_F(K) * \operatorname{rank}_K(A)$. -/
75+
theorem finite_dimensional.finrank_mul_finrank'
76+
[nontrivial K] [module.finite F K] [module.finite K A] :
77+
finrank F K * finrank K A = finrank F A :=
78+
begin
79+
letI := nontrivial_of_invariant_basis_number F,
80+
let b := module.free.choose_basis F K,
81+
let c := module.free.choose_basis K A,
82+
rw [finrank_eq_card_basis b, finrank_eq_card_basis c, finrank_eq_card_basis (b.smul c),
83+
fintype.card_prod],
84+
end
85+
86+
end ring
87+
88+
section field
89+
variables [field F] [division_ring K] [add_comm_group A]
90+
variables [algebra F K] [module K A] [module F A] [is_scalar_tower F K A]
6291

6392
namespace finite_dimensional
6493

@@ -85,17 +114,15 @@ let ⟨⟨b, hb⟩⟩ := hf in ⟨⟨b, submodule.restrict_scalars_injective F _
85114
by { rw [submodule.restrict_scalars_top, eq_top_iff, ← hb, submodule.span_le],
86115
exact submodule.subset_span }⟩⟩
87116

88-
/-- Tower law: if `A` is a `K`-algebra and `K` is a field extension of `F` then
89-
`dim_F(A) = dim_F(K) * dim_K(A)`. -/
90-
theorem finrank_mul_finrank [finite_dimensional F K] :
91-
finrank F K * finrank K A = finrank F A :=
117+
/-- Tower law: if `A` is a `K`-vector space and `K` is a field extension of `F` then
118+
`dim_F(A) = dim_F(K) * dim_K(A)`.
119+
120+
This is `finite_dimensional.finrank_mul_finrank'` with one fewer finiteness assumption. -/
121+
theorem finrank_mul_finrank [finite_dimensional F K] : finrank F K * finrank K A = finrank F A :=
92122
begin
93123
by_cases hA : finite_dimensional K A,
94124
{ resetI,
95-
let b := basis.of_vector_space F K,
96-
let c := basis.of_vector_space K A,
97-
rw [finrank_eq_card_basis b, finrank_eq_card_basis c,
98-
finrank_eq_card_basis (b.smul c), fintype.card_prod] },
125+
rw finrank_mul_finrank' },
99126
{ rw [finrank_of_infinite_dimensional hA, mul_zero, finrank_of_infinite_dimensional],
100127
exact mt (@right F K A _ _ _ _ _ _ _) hA }
101128
end

0 commit comments

Comments
 (0)