Skip to content

Commit 83707e3

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

File tree

6 files changed

+530
-0
lines changed

6 files changed

+530
-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: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module linear-algebra.linear-combinations-tuples-of-vectors-left-modules-rings w
1010
open import elementary-number-theory.natural-numbers
1111
1212
open import foundation.action-on-identifications-functions
13+
open import foundation.coproduct-types
1314
open import foundation.identity-types
1415
open import foundation.universe-levels
1516
@@ -20,6 +21,8 @@ open import lists.functoriality-tuples
2021
open import lists.tuples
2122
2223
open import ring-theory.rings
24+
25+
open import univalent-combinatorics.standard-finite-types
2326
```
2427

2528
</details>
@@ -291,3 +294,151 @@ module _
291294
( vectors-b))
292295
by refl
293296
```
297+
298+
### Whenever the coefficient tuple is the trivial tuple, the linear combination is equal to the zero element
299+
300+
```agda
301+
module _
302+
{l1 l2 : Level}
303+
(R : Ring l1)
304+
(M : left-module-Ring l2 R)
305+
where
306+
307+
zero-trivial-tuple-linear-combination-tuple-left-module-Ring :
308+
(n : ℕ) →
309+
(vectors : tuple (type-left-module-Ring R M) n) →
310+
linear-combination-tuple-left-module-Ring R M
311+
( trivial-tuple-Ring R n)
312+
( vectors) =
313+
zero-left-module-Ring R M
314+
zero-trivial-tuple-linear-combination-tuple-left-module-Ring n empty-tuple =
315+
refl
316+
zero-trivial-tuple-linear-combination-tuple-left-module-Ring
317+
(succ-ℕ n) (x ∷ vectors) =
318+
equational-reasoning
319+
linear-combination-tuple-left-module-Ring R M
320+
( zero-Ring R ∷ trivial-tuple-Ring R n)
321+
( x ∷ vectors)
322+
= add-left-module-Ring R M
323+
( linear-combination-tuple-left-module-Ring R M
324+
( trivial-tuple-Ring R n)
325+
( vectors))
326+
( mul-left-module-Ring R M (zero-Ring R) x)
327+
by refl
328+
= add-left-module-Ring R M
329+
( linear-combination-tuple-left-module-Ring R M
330+
( trivial-tuple-Ring R n)
331+
( vectors))
332+
( zero-left-module-Ring R M)
333+
by
334+
ap
335+
( λ y → add-left-module-Ring R M
336+
( linear-combination-tuple-left-module-Ring R M
337+
( trivial-tuple-Ring R n)
338+
( vectors))
339+
( y))
340+
(left-zero-law-mul-left-module-Ring R M x)
341+
= add-left-module-Ring R M
342+
( zero-left-module-Ring R M)
343+
( zero-left-module-Ring R M)
344+
by
345+
ap
346+
( λ y → add-left-module-Ring R M y (zero-left-module-Ring R M))
347+
( zero-trivial-tuple-linear-combination-tuple-left-module-Ring n
348+
( vectors))
349+
= zero-left-module-Ring R M
350+
by left-unit-law-add-left-module-Ring R M (zero-left-module-Ring R M)
351+
```
352+
353+
### Whenever the coefficient tuple is the trivial tuple besides one value, that value determines the value of the linear combination
354+
355+
```agda
356+
module _
357+
{l1 l2 : Level}
358+
(R : Ring l1)
359+
(M : left-module-Ring l2 R)
360+
where
361+
362+
component-with-value-tuple-trivial-tuple-linear-combination-tuple-left-module-Ring :
363+
(n : ℕ) →
364+
(r : type-Ring R)
365+
(vectors : tuple (type-left-module-Ring R M) n) →
366+
(i : Fin n) →
367+
linear-combination-tuple-left-module-Ring R M
368+
( with-value-tuple i r (trivial-tuple-Ring R n))
369+
( vectors) =
370+
mul-left-module-Ring R M r (component-tuple n vectors i)
371+
component-with-value-tuple-trivial-tuple-linear-combination-tuple-left-module-Ring
372+
(succ-ℕ n) r (x ∷ vectors) (inr _) =
373+
equational-reasoning
374+
linear-combination-tuple-left-module-Ring R M
375+
( with-value-tuple (inr _) r (trivial-tuple-Ring R (succ-ℕ n)))
376+
( x ∷ vectors)
377+
= linear-combination-tuple-left-module-Ring R M
378+
( r ∷ (trivial-tuple-Ring R n))
379+
( x ∷ vectors)
380+
by refl
381+
= add-left-module-Ring R M
382+
( linear-combination-tuple-left-module-Ring R M
383+
( trivial-tuple-Ring R n)
384+
( vectors))
385+
( mul-left-module-Ring R M r x)
386+
by refl
387+
= add-left-module-Ring R M
388+
( zero-left-module-Ring R M)
389+
( mul-left-module-Ring R M r x)
390+
by
391+
ap
392+
( λ y → add-left-module-Ring R M y (mul-left-module-Ring R M r x))
393+
( zero-trivial-tuple-linear-combination-tuple-left-module-Ring R M n
394+
( vectors))
395+
= mul-left-module-Ring R M r x
396+
by left-unit-law-add-left-module-Ring R M (mul-left-module-Ring R M r x)
397+
= mul-left-module-Ring R M r
398+
( 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
437+
( component-tuple (succ-ℕ n) (x ∷ vectors) (inl i))
438+
by
439+
component-with-value-tuple-trivial-tuple-linear-combination-tuple-left-module-Ring
440+
( n)
441+
( r)
442+
( vectors)
443+
( i)
444+
```

0 commit comments

Comments
 (0)