-
Notifications
You must be signed in to change notification settings - Fork 63
/
integral-domains.lagda.md
611 lines (501 loc) · 21.2 KB
/
integral-domains.lagda.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
# Integral domains
```agda
module commutative-algebra.integral-domains where
```
<details><summary>Imports</summary>
```agda
open import commutative-algebra.commutative-rings
open import commutative-algebra.commutative-semirings
open import commutative-algebra.trivial-commutative-rings
open import elementary-number-theory.addition-natural-numbers
open import elementary-number-theory.natural-numbers
open import foundation.binary-embeddings
open import foundation.binary-equivalences
open import foundation.cartesian-product-types
open import foundation.dependent-pair-types
open import foundation.embeddings
open import foundation.equivalences
open import foundation.identity-types
open import foundation.injective-maps
open import foundation.interchange-law
open import foundation.involutions
open import foundation.negation
open import foundation.propositions
open import foundation.sets
open import foundation.unital-binary-operations
open import foundation.universe-levels
open import group-theory.abelian-groups
open import group-theory.commutative-monoids
open import group-theory.groups
open import group-theory.monoids
open import group-theory.semigroups
open import lists.concatenation-lists
open import lists.lists
open import ring-theory.rings
open import ring-theory.semirings
```
</details>
## Idea
An **integral domain** is a nonzero commutative ring `R` such that the product
of any two nonzero elements in `R` is nonzero. Equivalently, a commutative ring
`R` is an integral domain if and only if multiplication by any nonzero element
`a` satisfies the cancellation property: `ax = ay ⇒ x = y`.
## Definition
### The cancellation property for a commutative ring
```agda
cancellation-property-Commutative-Ring :
{l : Level} (R : Commutative-Ring l) → UU l
cancellation-property-Commutative-Ring R =
(x : type-Commutative-Ring R) → is-nonzero-Commutative-Ring R x →
is-injective (mul-Commutative-Ring R x)
```
### Integral domains
```agda
Integral-Domain : (l : Level) → UU (lsuc l)
Integral-Domain l =
Σ ( Commutative-Ring l)
( λ R →
cancellation-property-Commutative-Ring R ×
is-nontrivial-Commutative-Ring R)
module _
{l : Level} (R : Integral-Domain l)
where
commutative-ring-Integral-Domain : Commutative-Ring l
commutative-ring-Integral-Domain = pr1 R
has-cancellation-property-Integral-Domain :
cancellation-property-Commutative-Ring commutative-ring-Integral-Domain
has-cancellation-property-Integral-Domain = pr1 (pr2 R)
is-nontrivial-Integral-Domain :
is-nontrivial-Commutative-Ring commutative-ring-Integral-Domain
is-nontrivial-Integral-Domain = pr2 (pr2 R)
ab-Integral-Domain : Ab l
ab-Integral-Domain = ab-Commutative-Ring commutative-ring-Integral-Domain
ring-Integral-Domain : Ring l
ring-Integral-Domain = ring-Commutative-Ring commutative-ring-Integral-Domain
set-Integral-Domain : Set l
set-Integral-Domain = set-Ring ring-Integral-Domain
type-Integral-Domain : UU l
type-Integral-Domain = type-Ring ring-Integral-Domain
is-set-type-Integral-Domain : is-set type-Integral-Domain
is-set-type-Integral-Domain = is-set-type-Ring ring-Integral-Domain
```
### Addition in an integral domain
```agda
has-associative-add-Integral-Domain :
has-associative-mul-Set set-Integral-Domain
has-associative-add-Integral-Domain =
has-associative-add-Commutative-Ring commutative-ring-Integral-Domain
add-Integral-Domain :
type-Integral-Domain → type-Integral-Domain → type-Integral-Domain
add-Integral-Domain = add-Commutative-Ring commutative-ring-Integral-Domain
add-Integral-Domain' :
type-Integral-Domain → type-Integral-Domain → type-Integral-Domain
add-Integral-Domain' = add-Commutative-Ring' commutative-ring-Integral-Domain
ap-add-Integral-Domain :
{x x' y y' : type-Integral-Domain} →
(x = x') → (y = y') →
add-Integral-Domain x y = add-Integral-Domain x' y'
ap-add-Integral-Domain =
ap-add-Commutative-Ring commutative-ring-Integral-Domain
associative-add-Integral-Domain :
(x y z : type-Integral-Domain) →
( add-Integral-Domain (add-Integral-Domain x y) z) =
( add-Integral-Domain x (add-Integral-Domain y z))
associative-add-Integral-Domain =
associative-add-Commutative-Ring commutative-ring-Integral-Domain
additive-semigroup-Integral-Domain : Semigroup l
additive-semigroup-Integral-Domain = semigroup-Ab ab-Integral-Domain
is-group-additive-semigroup-Integral-Domain :
is-group additive-semigroup-Integral-Domain
is-group-additive-semigroup-Integral-Domain =
is-group-Ab ab-Integral-Domain
commutative-add-Integral-Domain :
(x y : type-Integral-Domain) →
Id (add-Integral-Domain x y) (add-Integral-Domain y x)
commutative-add-Integral-Domain = commutative-add-Ab ab-Integral-Domain
interchange-add-add-Integral-Domain :
(x y x' y' : type-Integral-Domain) →
( add-Integral-Domain
( add-Integral-Domain x y)
( add-Integral-Domain x' y')) =
( add-Integral-Domain
( add-Integral-Domain x x')
( add-Integral-Domain y y'))
interchange-add-add-Integral-Domain =
interchange-add-add-Commutative-Ring commutative-ring-Integral-Domain
right-swap-add-Integral-Domain :
(x y z : type-Integral-Domain) →
( add-Integral-Domain (add-Integral-Domain x y) z) =
( add-Integral-Domain (add-Integral-Domain x z) y)
right-swap-add-Integral-Domain =
right-swap-add-Commutative-Ring commutative-ring-Integral-Domain
left-swap-add-Integral-Domain :
(x y z : type-Integral-Domain) →
( add-Integral-Domain x (add-Integral-Domain y z)) =
( add-Integral-Domain y (add-Integral-Domain x z))
left-swap-add-Integral-Domain =
left-swap-add-Commutative-Ring commutative-ring-Integral-Domain
is-equiv-add-Integral-Domain :
(x : type-Integral-Domain) → is-equiv (add-Integral-Domain x)
is-equiv-add-Integral-Domain = is-equiv-add-Ab ab-Integral-Domain
is-equiv-add-Integral-Domain' :
(x : type-Integral-Domain) → is-equiv (add-Integral-Domain' x)
is-equiv-add-Integral-Domain' = is-equiv-add-Ab' ab-Integral-Domain
is-binary-equiv-add-Integral-Domain : is-binary-equiv add-Integral-Domain
pr1 is-binary-equiv-add-Integral-Domain = is-equiv-add-Integral-Domain'
pr2 is-binary-equiv-add-Integral-Domain = is-equiv-add-Integral-Domain
is-binary-emb-add-Integral-Domain : is-binary-emb add-Integral-Domain
is-binary-emb-add-Integral-Domain = is-binary-emb-add-Ab ab-Integral-Domain
is-emb-add-Integral-Domain :
(x : type-Integral-Domain) → is-emb (add-Integral-Domain x)
is-emb-add-Integral-Domain = is-emb-add-Ab ab-Integral-Domain
is-emb-add-Integral-Domain' :
(x : type-Integral-Domain) → is-emb (add-Integral-Domain' x)
is-emb-add-Integral-Domain' = is-emb-add-Ab' ab-Integral-Domain
is-injective-add-Integral-Domain :
(x : type-Integral-Domain) → is-injective (add-Integral-Domain x)
is-injective-add-Integral-Domain = is-injective-add-Ab ab-Integral-Domain
is-injective-add-Integral-Domain' :
(x : type-Integral-Domain) → is-injective (add-Integral-Domain' x)
is-injective-add-Integral-Domain' = is-injective-add-Ab' ab-Integral-Domain
```
### The zero element of an integral domain
```agda
has-zero-Integral-Domain : is-unital add-Integral-Domain
has-zero-Integral-Domain =
has-zero-Commutative-Ring commutative-ring-Integral-Domain
zero-Integral-Domain : type-Integral-Domain
zero-Integral-Domain =
zero-Commutative-Ring commutative-ring-Integral-Domain
is-zero-Integral-Domain : type-Integral-Domain → UU l
is-zero-Integral-Domain =
is-zero-Commutative-Ring commutative-ring-Integral-Domain
is-nonzero-Integral-Domain : type-Integral-Domain → UU l
is-nonzero-Integral-Domain =
is-nonzero-Commutative-Ring commutative-ring-Integral-Domain
is-zero-integral-domain-Prop : type-Integral-Domain → Prop l
is-zero-integral-domain-Prop x =
Id-Prop set-Integral-Domain x zero-Integral-Domain
is-nonzero-integral-domain-Prop : type-Integral-Domain → Prop l
is-nonzero-integral-domain-Prop x =
neg-Prop (is-zero-integral-domain-Prop x)
left-unit-law-add-Integral-Domain :
(x : type-Integral-Domain) →
add-Integral-Domain zero-Integral-Domain x = x
left-unit-law-add-Integral-Domain =
left-unit-law-add-Commutative-Ring commutative-ring-Integral-Domain
right-unit-law-add-Integral-Domain :
(x : type-Integral-Domain) →
add-Integral-Domain x zero-Integral-Domain = x
right-unit-law-add-Integral-Domain =
right-unit-law-add-Commutative-Ring commutative-ring-Integral-Domain
```
### Additive inverses in an integral domain
```agda
has-negatives-Integral-Domain :
is-group' additive-semigroup-Integral-Domain has-zero-Integral-Domain
has-negatives-Integral-Domain = has-negatives-Ab ab-Integral-Domain
neg-Integral-Domain : type-Integral-Domain → type-Integral-Domain
neg-Integral-Domain = neg-Commutative-Ring commutative-ring-Integral-Domain
left-inverse-law-add-Integral-Domain :
(x : type-Integral-Domain) →
add-Integral-Domain (neg-Integral-Domain x) x = zero-Integral-Domain
left-inverse-law-add-Integral-Domain =
left-inverse-law-add-Commutative-Ring commutative-ring-Integral-Domain
right-inverse-law-add-Integral-Domain :
(x : type-Integral-Domain) →
add-Integral-Domain x (neg-Integral-Domain x) = zero-Integral-Domain
right-inverse-law-add-Integral-Domain =
right-inverse-law-add-Commutative-Ring commutative-ring-Integral-Domain
neg-neg-Integral-Domain :
(x : type-Integral-Domain) →
neg-Integral-Domain (neg-Integral-Domain x) = x
neg-neg-Integral-Domain = neg-neg-Ab ab-Integral-Domain
distributive-neg-add-Integral-Domain :
(x y : type-Integral-Domain) →
neg-Integral-Domain (add-Integral-Domain x y) =
add-Integral-Domain (neg-Integral-Domain x) (neg-Integral-Domain y)
distributive-neg-add-Integral-Domain =
distributive-neg-add-Ab ab-Integral-Domain
```
### Multiplication in an integral domain
```agda
has-associative-mul-Integral-Domain :
has-associative-mul-Set set-Integral-Domain
has-associative-mul-Integral-Domain =
has-associative-mul-Commutative-Ring commutative-ring-Integral-Domain
mul-Integral-Domain :
(x y : type-Integral-Domain) → type-Integral-Domain
mul-Integral-Domain =
mul-Commutative-Ring commutative-ring-Integral-Domain
mul-Integral-Domain' :
(x y : type-Integral-Domain) → type-Integral-Domain
mul-Integral-Domain' =
mul-Commutative-Ring' commutative-ring-Integral-Domain
ap-mul-Integral-Domain :
{x x' y y' : type-Integral-Domain} (p : Id x x') (q : Id y y') →
Id (mul-Integral-Domain x y) (mul-Integral-Domain x' y')
ap-mul-Integral-Domain p q = ap-binary mul-Integral-Domain p q
associative-mul-Integral-Domain :
(x y z : type-Integral-Domain) →
mul-Integral-Domain (mul-Integral-Domain x y) z =
mul-Integral-Domain x (mul-Integral-Domain y z)
associative-mul-Integral-Domain =
associative-mul-Commutative-Ring commutative-ring-Integral-Domain
multiplicative-semigroup-Integral-Domain : Semigroup l
multiplicative-semigroup-Integral-Domain =
multiplicative-semigroup-Commutative-Ring
commutative-ring-Integral-Domain
left-distributive-mul-add-Integral-Domain :
(x y z : type-Integral-Domain) →
( mul-Integral-Domain x (add-Integral-Domain y z)) =
( add-Integral-Domain
( mul-Integral-Domain x y)
( mul-Integral-Domain x z))
left-distributive-mul-add-Integral-Domain =
left-distributive-mul-add-Commutative-Ring
commutative-ring-Integral-Domain
right-distributive-mul-add-Integral-Domain :
(x y z : type-Integral-Domain) →
( mul-Integral-Domain (add-Integral-Domain x y) z) =
( add-Integral-Domain
( mul-Integral-Domain x z)
( mul-Integral-Domain y z))
right-distributive-mul-add-Integral-Domain =
right-distributive-mul-add-Commutative-Ring
commutative-ring-Integral-Domain
commutative-mul-Integral-Domain :
(x y : type-Integral-Domain) →
mul-Integral-Domain x y = mul-Integral-Domain y x
commutative-mul-Integral-Domain =
commutative-mul-Commutative-Ring
commutative-ring-Integral-Domain
```
### Multiplicative units in an integral domain
```agda
is-unital-Integral-Domain : is-unital mul-Integral-Domain
is-unital-Integral-Domain =
is-unital-Commutative-Ring
commutative-ring-Integral-Domain
multiplicative-monoid-Integral-Domain : Monoid l
multiplicative-monoid-Integral-Domain =
multiplicative-monoid-Commutative-Ring
commutative-ring-Integral-Domain
one-Integral-Domain : type-Integral-Domain
one-Integral-Domain =
one-Commutative-Ring
commutative-ring-Integral-Domain
left-unit-law-mul-Integral-Domain :
(x : type-Integral-Domain) →
mul-Integral-Domain one-Integral-Domain x = x
left-unit-law-mul-Integral-Domain =
left-unit-law-mul-Commutative-Ring
commutative-ring-Integral-Domain
right-unit-law-mul-Integral-Domain :
(x : type-Integral-Domain) →
mul-Integral-Domain x one-Integral-Domain = x
right-unit-law-mul-Integral-Domain =
right-unit-law-mul-Commutative-Ring
commutative-ring-Integral-Domain
right-swap-mul-Integral-Domain :
(x y z : type-Integral-Domain) →
mul-Integral-Domain (mul-Integral-Domain x y) z =
mul-Integral-Domain (mul-Integral-Domain x z) y
right-swap-mul-Integral-Domain x y z =
( associative-mul-Integral-Domain x y z) ∙
( ( ap
( mul-Integral-Domain x)
( commutative-mul-Integral-Domain y z)) ∙
( inv (associative-mul-Integral-Domain x z y)))
left-swap-mul-Integral-Domain :
(x y z : type-Integral-Domain) →
mul-Integral-Domain x (mul-Integral-Domain y z) =
mul-Integral-Domain y (mul-Integral-Domain x z)
left-swap-mul-Integral-Domain x y z =
( inv (associative-mul-Integral-Domain x y z)) ∙
( ( ap
( mul-Integral-Domain' z)
( commutative-mul-Integral-Domain x y)) ∙
( associative-mul-Integral-Domain y x z))
interchange-mul-mul-Integral-Domain :
(x y z w : type-Integral-Domain) →
mul-Integral-Domain
( mul-Integral-Domain x y)
( mul-Integral-Domain z w) =
mul-Integral-Domain
( mul-Integral-Domain x z)
( mul-Integral-Domain y w)
interchange-mul-mul-Integral-Domain =
interchange-law-commutative-and-associative
mul-Integral-Domain
commutative-mul-Integral-Domain
associative-mul-Integral-Domain
```
### The zero laws for multiplication of a integral domains
```agda
left-zero-law-mul-Integral-Domain :
(x : type-Integral-Domain) →
mul-Integral-Domain zero-Integral-Domain x =
zero-Integral-Domain
left-zero-law-mul-Integral-Domain =
left-zero-law-mul-Commutative-Ring commutative-ring-Integral-Domain
right-zero-law-mul-Integral-Domain :
(x : type-Integral-Domain) →
mul-Integral-Domain x zero-Integral-Domain =
zero-Integral-Domain
right-zero-law-mul-Integral-Domain =
right-zero-law-mul-Commutative-Ring commutative-ring-Integral-Domain
```
### Integral domains are commutative semirings
```agda
multiplicative-commutative-monoid-Integral-Domain : Commutative-Monoid l
multiplicative-commutative-monoid-Integral-Domain =
multiplicative-commutative-monoid-Commutative-Ring
commutative-ring-Integral-Domain
semiring-Integral-Domain : Semiring l
semiring-Integral-Domain =
semiring-Commutative-Ring commutative-ring-Integral-Domain
commutative-semiring-Integral-Domain : Commutative-Semiring l
commutative-semiring-Integral-Domain =
commutative-semiring-Commutative-Ring
commutative-ring-Integral-Domain
```
### Computing multiplication with minus one in an integral domain
```agda
neg-one-Integral-Domain : type-Integral-Domain
neg-one-Integral-Domain =
neg-one-Commutative-Ring
commutative-ring-Integral-Domain
mul-neg-one-Integral-Domain :
(x : type-Integral-Domain) →
mul-Integral-Domain neg-one-Integral-Domain x =
neg-Integral-Domain x
mul-neg-one-Integral-Domain =
mul-neg-one-Commutative-Ring
commutative-ring-Integral-Domain
mul-neg-one-Integral-Domain' :
(x : type-Integral-Domain) →
mul-Integral-Domain x neg-one-Integral-Domain =
neg-Integral-Domain x
mul-neg-one-Integral-Domain' =
mul-neg-one-Commutative-Ring'
commutative-ring-Integral-Domain
is-involution-mul-neg-one-Integral-Domain :
is-involution (mul-Integral-Domain neg-one-Integral-Domain)
is-involution-mul-neg-one-Integral-Domain =
is-involution-mul-neg-one-Commutative-Ring
commutative-ring-Integral-Domain
is-involution-mul-neg-one-Integral-Domain' :
is-involution (mul-Integral-Domain' neg-one-Integral-Domain)
is-involution-mul-neg-one-Integral-Domain' =
is-involution-mul-neg-one-Commutative-Ring'
commutative-ring-Integral-Domain
```
### Left and right negative laws for multiplication
```agda
left-negative-law-mul-Integral-Domain :
(x y : type-Integral-Domain) →
mul-Integral-Domain (neg-Integral-Domain x) y =
neg-Integral-Domain (mul-Integral-Domain x y)
left-negative-law-mul-Integral-Domain =
left-negative-law-mul-Commutative-Ring
commutative-ring-Integral-Domain
right-negative-law-mul-Integral-Domain :
(x y : type-Integral-Domain) →
mul-Integral-Domain x (neg-Integral-Domain y) =
neg-Integral-Domain (mul-Integral-Domain x y)
right-negative-law-mul-Integral-Domain =
right-negative-law-mul-Commutative-Ring
commutative-ring-Integral-Domain
mul-neg-Integral-Domain :
(x y : type-Integral-Domain) →
mul-Integral-Domain (neg-Integral-Domain x) (neg-Integral-Domain y) =
mul-Integral-Domain x y
mul-neg-Integral-Domain =
mul-neg-Commutative-Ring
commutative-ring-Integral-Domain
```
### Scalar multiplication of elements of a integral domain by natural numbers
```agda
mul-nat-scalar-Integral-Domain :
ℕ → type-Integral-Domain → type-Integral-Domain
mul-nat-scalar-Integral-Domain =
mul-nat-scalar-Commutative-Ring
commutative-ring-Integral-Domain
ap-mul-nat-scalar-Integral-Domain :
{m n : ℕ} {x y : type-Integral-Domain} →
(m = n) → (x = y) →
mul-nat-scalar-Integral-Domain m x =
mul-nat-scalar-Integral-Domain n y
ap-mul-nat-scalar-Integral-Domain =
ap-mul-nat-scalar-Commutative-Ring
commutative-ring-Integral-Domain
left-zero-law-mul-nat-scalar-Integral-Domain :
(x : type-Integral-Domain) →
mul-nat-scalar-Integral-Domain 0 x = zero-Integral-Domain
left-zero-law-mul-nat-scalar-Integral-Domain =
left-zero-law-mul-nat-scalar-Commutative-Ring
commutative-ring-Integral-Domain
right-zero-law-mul-nat-scalar-Integral-Domain :
(n : ℕ) →
mul-nat-scalar-Integral-Domain n zero-Integral-Domain =
zero-Integral-Domain
right-zero-law-mul-nat-scalar-Integral-Domain =
right-zero-law-mul-nat-scalar-Commutative-Ring
commutative-ring-Integral-Domain
left-unit-law-mul-nat-scalar-Integral-Domain :
(x : type-Integral-Domain) →
mul-nat-scalar-Integral-Domain 1 x = x
left-unit-law-mul-nat-scalar-Integral-Domain =
left-unit-law-mul-nat-scalar-Commutative-Ring
commutative-ring-Integral-Domain
left-nat-scalar-law-mul-Integral-Domain :
(n : ℕ) (x y : type-Integral-Domain) →
mul-Integral-Domain (mul-nat-scalar-Integral-Domain n x) y =
mul-nat-scalar-Integral-Domain n (mul-Integral-Domain x y)
left-nat-scalar-law-mul-Integral-Domain =
left-nat-scalar-law-mul-Commutative-Ring
commutative-ring-Integral-Domain
right-nat-scalar-law-mul-Integral-Domain :
(n : ℕ) (x y : type-Integral-Domain) →
mul-Integral-Domain x (mul-nat-scalar-Integral-Domain n y) =
mul-nat-scalar-Integral-Domain n (mul-Integral-Domain x y)
right-nat-scalar-law-mul-Integral-Domain =
right-nat-scalar-law-mul-Commutative-Ring
commutative-ring-Integral-Domain
left-distributive-mul-nat-scalar-add-Integral-Domain :
(n : ℕ) (x y : type-Integral-Domain) →
mul-nat-scalar-Integral-Domain n (add-Integral-Domain x y) =
add-Integral-Domain
( mul-nat-scalar-Integral-Domain n x)
( mul-nat-scalar-Integral-Domain n y)
left-distributive-mul-nat-scalar-add-Integral-Domain =
left-distributive-mul-nat-scalar-add-Commutative-Ring
commutative-ring-Integral-Domain
right-distributive-mul-nat-scalar-add-Integral-Domain :
(m n : ℕ) (x : type-Integral-Domain) →
mul-nat-scalar-Integral-Domain (m +ℕ n) x =
add-Integral-Domain
( mul-nat-scalar-Integral-Domain m x)
( mul-nat-scalar-Integral-Domain n x)
right-distributive-mul-nat-scalar-add-Integral-Domain =
right-distributive-mul-nat-scalar-add-Commutative-Ring
commutative-ring-Integral-Domain
```
### Addition of a list of elements in an integral domain
```agda
add-list-Integral-Domain :
list type-Integral-Domain → type-Integral-Domain
add-list-Integral-Domain =
add-list-Commutative-Ring commutative-ring-Integral-Domain
preserves-concat-add-list-Integral-Domain :
(l1 l2 : list type-Integral-Domain) →
Id
( add-list-Integral-Domain (concat-list l1 l2))
( add-Integral-Domain
( add-list-Integral-Domain l1)
( add-list-Integral-Domain l2))
preserves-concat-add-list-Integral-Domain =
preserves-concat-add-list-Commutative-Ring
commutative-ring-Integral-Domain
```