Skip to content

Commit 1d9e997

Browse files
committed
Add linear independence
Signed-off-by: Šimon Brandner <[email protected]>
1 parent 04645dd commit 1d9e997

File tree

6 files changed

+519
-0
lines changed

6 files changed

+519
-0
lines changed

src/linear-algebra.lagda.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ open import linear-algebra.left-modules-commutative-rings public
2626
open import linear-algebra.left-modules-rings public
2727
open import linear-algebra.left-submodules-rings public
2828
open import linear-algebra.linear-combinations-tuples-of-vectors-left-modules-rings public
29+
open import linear-algebra.linear-independence-left-modules-rings public
2930
open import linear-algebra.linear-maps-left-modules-rings public
3031
open import linear-algebra.linear-spans-left-modules-rings public
3132
open import linear-algebra.matrices public

src/linear-algebra/linear-combinations-tuples-of-vectors-left-modules-rings.lagda.md

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ open import elementary-number-theory.natural-numbers
1212
open import foundation.action-on-identifications-functions
1313
open import foundation.identity-types
1414
open import foundation.universe-levels
15+
open import foundation.coproduct-types
16+
17+
open import foundation-core.identity-types
18+
19+
open import univalent-combinatorics.standard-finite-types
1520
1621
open import linear-algebra.left-modules-rings
1722
@@ -291,3 +296,143 @@ module _
291296
( vectors-b))
292297
by refl
293298
```
299+
300+
###
301+
302+
```agda
303+
module _
304+
{l1 l2 : Level}
305+
(R : Ring l1)
306+
(M : left-module-Ring l2 R)
307+
where
308+
309+
zero-trivial-tuple-linear-combination-tuple-left-module-Ring :
310+
(n : ℕ) →
311+
(vectors : tuple (type-left-module-Ring R M) n) →
312+
linear-combination-tuple-left-module-Ring R M
313+
( trivial-tuple-Ring R n)
314+
( vectors) =
315+
zero-left-module-Ring R M
316+
zero-trivial-tuple-linear-combination-tuple-left-module-Ring n empty-tuple =
317+
refl
318+
zero-trivial-tuple-linear-combination-tuple-left-module-Ring
319+
(succ-ℕ n) (x ∷ vectors) =
320+
equational-reasoning
321+
linear-combination-tuple-left-module-Ring R M
322+
( zero-Ring R ∷ trivial-tuple-Ring R n)
323+
( x ∷ vectors)
324+
= add-left-module-Ring R M
325+
( linear-combination-tuple-left-module-Ring R M
326+
( trivial-tuple-Ring R n)
327+
( vectors))
328+
( mul-left-module-Ring R M (zero-Ring R) x)
329+
by refl
330+
= add-left-module-Ring R M
331+
( linear-combination-tuple-left-module-Ring R M
332+
( trivial-tuple-Ring R n)
333+
( vectors))
334+
( zero-left-module-Ring R M)
335+
by
336+
ap
337+
( λ y → add-left-module-Ring R M
338+
( linear-combination-tuple-left-module-Ring R M
339+
( trivial-tuple-Ring R n)
340+
( vectors))
341+
( y))
342+
(left-zero-law-mul-left-module-Ring R M x)
343+
= add-left-module-Ring R M
344+
( zero-left-module-Ring R M)
345+
( zero-left-module-Ring R M)
346+
by
347+
ap
348+
( λ y → add-left-module-Ring R M y (zero-left-module-Ring R M))
349+
( zero-trivial-tuple-linear-combination-tuple-left-module-Ring n
350+
( vectors))
351+
= zero-left-module-Ring R M
352+
by left-unit-law-add-left-module-Ring R M (zero-left-module-Ring R M)
353+
```
354+
355+
###
356+
357+
```agda
358+
module _
359+
{l1 l2 : Level}
360+
(R : Ring l1)
361+
(M : left-module-Ring l2 R)
362+
where
363+
364+
component-with-value-tuple-trivial-tuple-linear-combination-tuple-left-module-Ring :
365+
(n : ℕ) →
366+
(r : type-Ring R)
367+
(vectors : tuple (type-left-module-Ring R M) n) →
368+
(i : Fin n) →
369+
linear-combination-tuple-left-module-Ring R M
370+
( with-value-tuple i r (trivial-tuple-Ring R n))
371+
( vectors) =
372+
mul-left-module-Ring R M r (component-tuple n vectors i)
373+
component-with-value-tuple-trivial-tuple-linear-combination-tuple-left-module-Ring
374+
(succ-ℕ n) r (x ∷ vectors) (inr _) =
375+
equational-reasoning
376+
linear-combination-tuple-left-module-Ring R M
377+
( with-value-tuple (inr _) r (trivial-tuple-Ring R (succ-ℕ n)))
378+
( x ∷ vectors)
379+
= linear-combination-tuple-left-module-Ring R M
380+
( r ∷ (trivial-tuple-Ring R n))
381+
( x ∷ vectors)
382+
by refl
383+
= add-left-module-Ring R M
384+
( linear-combination-tuple-left-module-Ring R M
385+
( trivial-tuple-Ring R n)
386+
( vectors))
387+
( mul-left-module-Ring R M r x)
388+
by refl
389+
= add-left-module-Ring R M
390+
( zero-left-module-Ring R M)
391+
( mul-left-module-Ring R M r x)
392+
by
393+
ap
394+
( λ y → add-left-module-Ring R M y (mul-left-module-Ring R M r x))
395+
(zero-trivial-tuple-linear-combination-tuple-left-module-Ring R M n vectors)
396+
= mul-left-module-Ring R M r x
397+
by left-unit-law-add-left-module-Ring R M (mul-left-module-Ring R M r x)
398+
= mul-left-module-Ring R M r (component-tuple (succ-ℕ n) (x ∷ vectors) (inr _))
399+
by ap (λ y → mul-left-module-Ring R M r y) refl
400+
component-with-value-tuple-trivial-tuple-linear-combination-tuple-left-module-Ring
401+
(succ-ℕ n) r (x ∷ vectors) (inl i) =
402+
equational-reasoning
403+
linear-combination-tuple-left-module-Ring R M
404+
( with-value-tuple (inl i) r (trivial-tuple-Ring R (succ-ℕ n)))
405+
( x ∷ vectors)
406+
= linear-combination-tuple-left-module-Ring R M
407+
( zero-Ring R ∷ (with-value-tuple i r (trivial-tuple-Ring R n)))
408+
( x ∷ vectors)
409+
by refl
410+
= add-left-module-Ring R M
411+
( linear-combination-tuple-left-module-Ring R M
412+
( with-value-tuple i r (trivial-tuple-Ring R n))
413+
( vectors))
414+
( mul-left-module-Ring R M (zero-Ring R) x)
415+
by refl
416+
= add-left-module-Ring R M
417+
( linear-combination-tuple-left-module-Ring R M
418+
( with-value-tuple i r (trivial-tuple-Ring R n))
419+
( vectors))
420+
( zero-left-module-Ring R M)
421+
by
422+
ap
423+
( λ y → add-left-module-Ring R M
424+
( linear-combination-tuple-left-module-Ring R M
425+
( with-value-tuple i r (trivial-tuple-Ring R n))
426+
( vectors))
427+
( y))
428+
( left-zero-law-mul-left-module-Ring R M x)
429+
= linear-combination-tuple-left-module-Ring R M
430+
( with-value-tuple i r (trivial-tuple-Ring R n))
431+
( vectors)
432+
by right-unit-law-add-left-module-Ring R M
433+
( linear-combination-tuple-left-module-Ring R M
434+
( with-value-tuple i r (trivial-tuple-Ring R n))
435+
( vectors))
436+
= mul-left-module-Ring R M r (component-tuple (succ-ℕ n) (x ∷ vectors) (inl i))
437+
by component-with-value-tuple-trivial-tuple-linear-combination-tuple-left-module-Ring n r vectors i
438+
```

0 commit comments

Comments
 (0)