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

Commit ae6d77b

Browse files
committed
feat(linear_algebra/free_module): a set of linearly independent vectors over a ring S is also linearly independent over a subring R of S (#6993)
Zulip: https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there.20code.20for.20X.3F/topic/.60algebra_map.2Einjective.2Elinear_independent.60
1 parent 5f0dbf6 commit ae6d77b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/linear_algebra/free_module.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,3 +335,11 @@ lemma submodule.exists_is_basis_of_le_span
335335
submodule.exists_is_basis_of_le le (is_basis_span hb)
336336

337337
end principal_ideal_domain
338+
339+
/-- A set of linearly independent vectors in a module `M` over a semiring `S` is also linearly
340+
independent over a subring `R` of `K`. -/
341+
lemma linear_independent.restrict_scalars_algebras {R S M ι : Type*} [comm_semiring R] [semiring S]
342+
[add_comm_monoid M] [algebra R S] [semimodule R M] [semimodule S M] [is_scalar_tower R S M]
343+
(hinj : function.injective (algebra_map R S)) {v : ι → M} (li : linear_independent S v) :
344+
linear_independent R v :=
345+
linear_independent.restrict_scalars (by rwa algebra.algebra_map_eq_smul_one' at hinj) li

src/linear_algebra/linear_independent.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,22 @@ begin
260260
simpa only [this, zero_smul, zero_add] using total_eq
261261
end
262262

263+
/-- A set of linearly independent vectors in a semimodule `M` over a semiring `K` is also linearly
264+
independent over a subring `R` of `K`.
265+
The implementation uses minimal assumptions about the relationship between `R`, `K` and `M`.
266+
The version where `K` is an `R`-algebra is `linear_independent.restrict_scalars_algebras`.
267+
-/
268+
lemma linear_independent.restrict_scalars [semiring K] [smul_with_zero R K] [semimodule K M]
269+
[is_scalar_tower R K M]
270+
(hinj : function.injective (λ r : R, r • (1 : K))) (li : linear_independent K v) :
271+
linear_independent R v :=
272+
begin
273+
refine linear_independent_iff'.mpr (λ s g hg i hi, hinj (eq.trans _ (zero_smul _ _).symm)),
274+
refine (linear_independent_iff'.mp li : _) _ _ _ i hi,
275+
simp_rw [smul_assoc, one_smul],
276+
exact hg,
277+
end
278+
263279
section subtype
264280
/-! The following lemmas use the subtype defined by a set in `M` as the index set `ι`. -/
265281

0 commit comments

Comments
 (0)