Skip to content

Commit 57dc18e

Browse files
committed
Add linear independence and left modules with an ordered basis
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
1 parent 8b6accd commit 57dc18e

File tree

5 files changed

+158
-0
lines changed

5 files changed

+158
-0
lines changed

src/linear-algebra.lagda.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ open import linear-algebra.finite-sequences-in-semigroups public
2222
open import linear-algebra.finite-sequences-in-semirings public
2323
open import linear-algebra.functoriality-matrices public
2424
open import linear-algebra.left-modules-rings public
25+
open import linear-algebra.left-modules-rings-with-ordered-basis public
2526
open import linear-algebra.left-submodules-rings public
2627
open import linear-algebra.linear-combinations public
28+
open import linear-algebra.linear-independence public
2729
open import linear-algebra.linear-maps-left-modules-rings public
2830
open import linear-algebra.linear-spans public
2931
open import linear-algebra.matrices public
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Left modules over rings with ordered basis
2+
3+
```agda
4+
module linear-algebra.left-modules-rings-with-ordered-basis where
5+
```
6+
7+
<details><summary>Imports</summary>
8+
9+
```agda
10+
open import elementary-number-theory.natural-numbers
11+
12+
open import foundation.dependent-pair-types
13+
open import foundation.universe-levels
14+
15+
open import foundation-core.cartesian-product-types
16+
17+
open import linear-algebra.left-modules-rings
18+
open import linear-algebra.linear-independence
19+
open import linear-algebra.linear-spans
20+
open import linear-algebra.subsets-left-modules-rings
21+
22+
open import lists.tuples
23+
24+
open import ring-theory.rings
25+
```
26+
27+
</details>
28+
29+
## Idea
30+
31+
A
32+
{{#concept "left module over a ring with an ordered basis" Agda=left-module-with-ordered-basis-Ring}}
33+
is a [left module](linear-algebra.left-modules-rings.md) `M` over a
34+
[ring](ring-theory.rings.md) `R` with a linearly independent tuple whose linear
35+
span is the whole of `M`.
36+
37+
## Definitions
38+
39+
### Left modules over rings with ordered basis
40+
41+
```agda
42+
left-module-with-ordered-basis-Ring :
43+
{l1 : Level} (n : ℕ) (l : Level) (R : Ring l1) → UU (l1 ⊔ lsuc l)
44+
left-module-with-ordered-basis-Ring {l1} n l R =
45+
Σ
46+
( Σ (left-module-Ring l R) (λ M → linearly-independent-tuple n R M))
47+
( λ (M , b) → is-linear-span-subset-left-module-Ring R M
48+
( whole-subset-left-module-Ring R M)
49+
( subset-tuple (tuple-linearly-independent-tuple R M b)))
50+
```
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Linear independence
2+
3+
```agda
4+
module linear-algebra.linear-independence where
5+
```
6+
7+
<details><summary>Imports</summary>
8+
9+
```agda
10+
open import elementary-number-theory.natural-numbers
11+
12+
open import foundation.dependent-pair-types
13+
open import foundation.identity-types
14+
open import foundation.propositions
15+
open import foundation.universe-levels
16+
17+
open import foundation-core.sets
18+
19+
open import linear-algebra.left-modules-rings
20+
open import linear-algebra.linear-combinations
21+
22+
open import lists.tuples
23+
24+
open import ring-theory.rings
25+
```
26+
27+
</details>
28+
29+
## Idea
30+
31+
Let `M` be a [left module](linear-algebra.left-modules-rings.md) over a
32+
[ring](ring-theory.rings.md) `R`. A tuple `x_1, ..., x_n` of elements of `M` is
33+
{{#concept "linearly independent" Agda=is-linearly-independent-tuple-prop Agda=linearly-independent-tuple}},
34+
if `r_1 * x_1 + ... + r_n * x_n = 0` implies `r_1 = ... = r_n = 0`.
35+
36+
## Definitions
37+
38+
### The condition of a tuple being linearly independent
39+
40+
```agda
41+
module _
42+
{l1 l2 : Level}
43+
{n : ℕ}
44+
(R : Ring l1)
45+
(M : left-module-Ring l2 R)
46+
(vectors : tuple (type-left-module-Ring R M) n)
47+
where
48+
49+
trivial-tuple : (n : ℕ) → tuple (type-Ring R) n
50+
trivial-tuple zero-ℕ = empty-tuple
51+
trivial-tuple (succ-ℕ n) = zero-Ring R ∷ trivial-tuple n
52+
53+
is-linearly-independent-tuple-prop : Prop (l1 ⊔ l2)
54+
is-linearly-independent-tuple-prop =
55+
Π-Prop
56+
( tuple (type-Ring R) n)
57+
λ scalars →
58+
hom-Prop
59+
( Id-Prop
60+
( set-left-module-Ring R M)
61+
( linear-combination-left-module-Ring R M scalars vectors)
62+
( zero-left-module-Ring R M))
63+
( Id-Prop
64+
( tuple-Set (set-Ring R) n)
65+
( scalars)
66+
( trivial-tuple n))
67+
68+
is-linearly-independent-tuple : UU (l1 ⊔ l2)
69+
is-linearly-independent-tuple = type-Prop is-linearly-independent-tuple-prop
70+
```
71+
72+
### Linearly independent tuple in a left-module over ring
73+
74+
```agda
75+
linearly-independent-tuple :
76+
{l1 l2 : Level}
77+
(n : ℕ) (R : Ring l1) (M : left-module-Ring l2 R) → UU (l1 ⊔ l2)
78+
linearly-independent-tuple n R M =
79+
Σ
80+
( tuple (type-left-module-Ring R M) n)
81+
( λ v → is-linearly-independent-tuple R M v)
82+
83+
module _
84+
{l1 l2 : Level}
85+
{n : ℕ}
86+
(R : Ring l1)
87+
(M : left-module-Ring l2 R)
88+
(v : linearly-independent-tuple n R M)
89+
where
90+
91+
tuple-linearly-independent-tuple : tuple (type-left-module-Ring R M) n
92+
tuple-linearly-independent-tuple = pr1 v
93+
```

src/linear-algebra/subsets-left-modules-rings.lagda.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module linear-algebra.subsets-left-modules-rings where
1010
open import foundation.conjunction
1111
open import foundation.propositions
1212
open import foundation.subtypes
13+
open import foundation.unit-type
1314
open import foundation.universe-levels
1415
1516
open import linear-algebra.left-modules-rings
@@ -44,6 +45,11 @@ type-subset-left-module-Ring :
4445
(S : subset-left-module-Ring l3 R M) →
4546
UU (l2 ⊔ l3)
4647
type-subset-left-module-Ring R M S = type-subtype S
48+
49+
whole-subset-left-module-Ring :
50+
{l1 l2 l3 : Level}
51+
(R : Ring l1) (M : left-module-Ring l2 R) → subset-left-module-Ring l3 R M
52+
whole-subset-left-module-Ring R M _ = raise-unit-Prop _
4753
```
4854

4955
### The condition that a subset is closed under addition

src/lists/tuples.lagda.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ open import foundation.equality-dependent-pair-types
1818
open import foundation.equivalences
1919
open import foundation.homotopies
2020
open import foundation.identity-types
21+
open import foundation.propositional-truncations
2122
open import foundation.raising-universe-levels
2223
open import foundation.sets
24+
open import foundation.subtypes
2325
open import foundation.transport-along-identifications
2426
open import foundation.truncated-types
2527
open import foundation.truncation-levels
2628
open import foundation.unit-type
2729
open import foundation.universe-levels
2830
open import foundation.whiskering-higher-homotopies-composition
2931
32+
open import foundation-core.empty-types
33+
3034
open import univalent-combinatorics.standard-finite-types
3135
```
3236

@@ -96,6 +100,9 @@ module _
96100
eq-component-tuple-index-in-tuple
97101
(succ-ℕ n) a (x ∷ v) (is-in-tail .a .x .v I) =
98102
eq-component-tuple-index-in-tuple n a v I
103+
104+
subset-tuple : {n : ℕ} (v : tuple A n) → subtype l A
105+
subset-tuple v a = trunc-Prop (a ∈-tuple v)
99106
```
100107

101108
## Properties

0 commit comments

Comments
 (0)