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
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="coqdoc.css" rel="stylesheet" type="text/css" />
<title>mathcomp.ssreflect.prime</title>
</head>
<body>
<div id="page">
<div id="header">
</div>
<div id="main">
<h1 class="libtitle">Library mathcomp.ssreflect.prime</h1>
<div class="code">
<span class="comment">(* (c) Copyright 2006-2016 Microsoft Corporation and Inria. <br/>
Distributed under the terms of CeCILL-B. *)</span><br/>
<span class="id" title="keyword">Require</span> <span class="id" title="keyword">Import</span> <a class="idref" href="mathcomp.ssreflect.ssreflect.html#"><span class="id" title="library">mathcomp.ssreflect.ssreflect</span></a>.<br/>
<br/>
</div>
<div class="doc">
This file contains the definitions of:
prime p <=> p is a prime.
primes m == the sorted list of prime divisors of m > 1, else [:: ].
pfactor == the type of prime factors, syntax (p ^ e)%pfactor.
prime_decomp m == the list of prime factors of m > 1, sorted by primes.
logn p m == the e such that (p ^ e) \in prime_decomp n, else 0.
trunc_log p m == the largest e such that p ^ e <= m, or 0 if p or m is 0.
pdiv n == the smallest prime divisor of n > 1, else 1.
max_pdiv n == the largest prime divisor of n > 1, else 1.
divisors m == the sorted list of divisors of m > 0, else [:: ].
totient n == the Euler totient (#|{i < n | i and n coprime}|).
nat_pred == the type of explicit collective nat predicates.
:= simpl_pred nat.
<ul class="doclist">
<li>> We allow the coercion nat >-> nat_pred, interpreting p as pred1 p.
</li>
<li>> We define a predType for nat_pred, enabling the notation p \in pi.
</li>
<li>> We don't have nat_pred >-> pred, which would imply nat >-> Funclass.
pi^' == the complement of pi : nat_pred, i.e., the nat_pred such
that (p \in pi^') = (p \notin pi).
\pi(n) == the set of prime divisors of n, i.e., the nat_pred such
that (p \in \pi(n)) = (p \in primes n).
\pi(A) == the set of primes of #|A|, with A a collective predicate
over a finite Type.
<ul class="doclist">
<li>> The notation \pi(A) is implemented with a collapsible Coercion, so
the type of A must coerce to finpred_class (e.g., by coercing to
{set T}), not merely implement the predType interface (as seq T
does).
</li>
<li>> The expression #|A| will only appear in \pi(A) after simplification
collapses the coercion stack, so it is advisable to do so early on.
</li>
</ul>
pi.-nat n <=> n > 0 and all prime divisors of n are in pi.
n`<i>pi == the pi-part of n -- the largest pi.-nat divisor of n.
:= \prod</i>(0 <= p < n.+1 | p \in pi) p ^ logn p n.
<ul class="doclist">
<li>> The nat >-> nat_pred coercion lets us write p.-nat n and n`<i>p.
</li>
</ul>
</li>
</ul>
In addition to the lemmas relevant to these definitions, this file also
contains the dvdn_sum lemma, so that bigop.v doesn't depend on div.v.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Set Implicit Arguments</span>.<br/>
<br/>
</div>
<div class="doc">
The complexity of any arithmetic operation with the Peano representation
is pretty dreadful, so using algorithms for "harder" problems such as
factoring, that are geared for efficient artihmetic leads to dismal
performance -- it takes a significant time, for instance, to compute the
divisors of just a two-digit number. On the other hand, for Peano
integers, prime factoring (and testing) is linear-time with a small
constant factor -- indeed, the same as converting in and out of a binary
representation. This is implemented by the code below, which is then
used to give the "standard" definitions of prime, primes, and divisors,
which can then be used casually in proofs with moderately-sized numeric
values (indeed, the code here performs well for up to 6-digit numbers).
<div class="paragraph"> </div>
We start with faster mod-2 functions.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Fixpoint</span> <a name="edivn2"><span class="id" title="definition">edivn2</span></a> <span class="id" title="var">q</span> <span class="id" title="var">r</span> := <span class="id" title="keyword">if</span> <a class="idref" href="mathcomp.ssreflect.prime.html#r"><span class="id" title="variable">r</span></a> <span class="id" title="keyword">is</span> <span class="id" title="var">r'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#793e3499c36e4c6595d810e871a5acdd"><span class="id" title="notation">.+2</span></a> <span class="id" title="keyword">then</span> <a class="idref" href="mathcomp.ssreflect.prime.html#edivn2"><span class="id" title="definition">edivn2</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <span class="id" title="var">r'</span> <span class="id" title="keyword">else</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#r"><span class="id" title="variable">r</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="edivn2P"><span class="id" title="lemma">edivn2P</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.div.html#edivn_spec"><span class="id" title="inductive">edivn_spec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> 2 (<a class="idref" href="mathcomp.ssreflect.prime.html#edivn2"><span class="id" title="definition">edivn2</span></a> 0 <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Fixpoint</span> <a name="elogn2"><span class="id" title="definition">elogn2</span></a> <span class="id" title="var">e</span> <span class="id" title="var">q</span> <span class="id" title="var">r</span> {<span class="id" title="keyword">struct</span> <span class="id" title="var">q</span>} :=<br/>
<span class="id" title="keyword">match</span> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a>, <a class="idref" href="mathcomp.ssreflect.prime.html#r"><span class="id" title="variable">r</span></a> <span class="id" title="keyword">with</span><br/>
| 0, <span class="id" title="var">_</span> | <span class="id" title="var">_</span>, 0 ⇒ <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a><br/>
| <span class="id" title="var">q'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a>, 1 ⇒ <a class="idref" href="mathcomp.ssreflect.prime.html#elogn2"><span class="id" title="definition">elogn2</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <span class="id" title="var">q'</span> <span class="id" title="var">q'</span><br/>
| <span class="id" title="var">q'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a>, <span class="id" title="var">r'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#793e3499c36e4c6595d810e871a5acdd"><span class="id" title="notation">.+2</span></a> ⇒ <a class="idref" href="mathcomp.ssreflect.prime.html#elogn2"><span class="id" title="definition">elogn2</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> <span class="id" title="var">q'</span> <span class="id" title="var">r'</span><br/>
<span class="id" title="keyword">end</span>.<br/>
<br/>
<span class="id" title="keyword">CoInductive</span> <a name="elogn2_spec"><span class="id" title="inductive">elogn2_spec</span></a> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#d19c7eafd0e2d195d10df94b392087b5"><span class="id" title="notation">×</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <span class="id" title="keyword">Type</span> :=<br/>
<a name="Elogn2Spec"><span class="id" title="constructor">Elogn2Spec</span></a> <span class="id" title="var">e</span> <span class="id" title="var">m</span> <span class="id" title="keyword">of</span> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 2 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#f460b977ac49dd1a229be682bc38c411"><span class="id" title="notation">.*2</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> : <a class="idref" href="mathcomp.ssreflect.prime.html#elogn2_spec"><span class="id" title="inductive">elogn2_spec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="elogn2P"><span class="id" title="lemma">elogn2P</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#elogn2_spec"><span class="id" title="inductive">elogn2_spec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#elogn2"><span class="id" title="definition">elogn2</span></a> 0 <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="ifnz"><span class="id" title="definition">ifnz</span></a> <span class="id" title="var">T</span> <span class="id" title="var">n</span> (<span class="id" title="var">x</span> <span class="id" title="var">y</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#T"><span class="id" title="variable">T</span></a>) := <span class="id" title="keyword">if</span> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <span class="id" title="keyword">is</span> 0 <span class="id" title="keyword">then</span> <a class="idref" href="mathcomp.ssreflect.prime.html#y"><span class="id" title="variable">y</span></a> <span class="id" title="keyword">else</span> <a class="idref" href="mathcomp.ssreflect.prime.html#x"><span class="id" title="variable">x</span></a>.<br/>
<br/>
<span class="id" title="keyword">CoInductive</span> <a name="ifnz_spec"><span class="id" title="inductive">ifnz_spec</span></a> <span class="id" title="var">T</span> <span class="id" title="var">n</span> (<span class="id" title="var">x</span> <span class="id" title="var">y</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#T"><span class="id" title="variable">T</span></a>) : <span class="id" title="var">T</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <span class="id" title="keyword">Type</span> :=<br/>
| <a name="IfnzPos"><span class="id" title="constructor">IfnzPos</span></a> <span class="id" title="keyword">of</span> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 : <a class="idref" href="mathcomp.ssreflect.prime.html#ifnz_spec"><span class="id" title="inductive">ifnz_spec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#x"><span class="id" title="variable">x</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#y"><span class="id" title="variable">y</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#x"><span class="id" title="variable">x</span></a><br/>
| <a name="IfnzZero"><span class="id" title="constructor">IfnzZero</span></a> <span class="id" title="keyword">of</span> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 0 : <a class="idref" href="mathcomp.ssreflect.prime.html#ifnz_spec"><span class="id" title="inductive">ifnz_spec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#x"><span class="id" title="variable">x</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#y"><span class="id" title="variable">y</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#y"><span class="id" title="variable">y</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="ifnzP"><span class="id" title="lemma">ifnzP</span></a> <span class="id" title="var">T</span> <span class="id" title="var">n</span> (<span class="id" title="var">x</span> <span class="id" title="var">y</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#T"><span class="id" title="variable">T</span></a>) : <a class="idref" href="mathcomp.ssreflect.prime.html#ifnz_spec"><span class="id" title="inductive">ifnz_spec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#x"><span class="id" title="variable">x</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#y"><span class="id" title="variable">y</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#ifnz"><span class="id" title="definition">ifnz</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#x"><span class="id" title="variable">x</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#y"><span class="id" title="variable">y</span></a>).<br/>
<br/>
</div>
<div class="doc">
For pretty-printing.
</div>
<div class="code">
<span class="id" title="keyword">Definition</span> <a name="NumFactor"><span class="id" title="definition">NumFactor</span></a> (<span class="id" title="var">f</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#d19c7eafd0e2d195d10df94b392087b5"><span class="id" title="notation">×</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>) := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#9555e8c0f932c422f50252a2940c1008"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#9555e8c0f932c422f50252a2940c1008"><span class="id" title="notation">Num</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9555e8c0f932c422f50252a2940c1008"><span class="id" title="notation">of</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#c4877bbfe60d8f22b47ac99ace86216a"><span class="id" title="notation">.1</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#9555e8c0f932c422f50252a2940c1008"><span class="id" title="notation">]</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#f4827404159513e7fd691b60b7877737"><span class="id" title="notation">.2</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="pfactor"><span class="id" title="definition">pfactor</span></a> <span class="id" title="var">p</span> <span class="id" title="var">e</span> := <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="cons_pfactor"><span class="id" title="definition">cons_pfactor</span></a> (<span class="id" title="var">p</span> <span class="id" title="var">e</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>) <span class="id" title="var">pd</span> := <a class="idref" href="mathcomp.ssreflect.prime.html#ifnz"><span class="id" title="definition">ifnz</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> (<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#d7fed0909a58e41c49e3ee117361b0a5"><span class="id" title="notation">::</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd"><span class="id" title="variable">pd</span></a>) <a class="idref" href="mathcomp.ssreflect.prime.html#pd"><span class="id" title="variable">pd</span></a>.<br/>
<br/>
<br/>
<span class="id" title="keyword">Section</span> <a name="prime_decomp"><span class="id" title="section">prime_decomp</span></a>.<br/>
<br/>
<span class="id" title="keyword">Import</span> <span class="id" title="var">NatTrec</span>.<br/>
<br/>
<span class="id" title="keyword">Fixpoint</span> <a name="prime_decomp_rec"><span class="id" title="definition">prime_decomp_rec</span></a> <span class="id" title="var">m</span> <span class="id" title="var">k</span> <span class="id" title="var">a</span> <span class="id" title="var">b</span> <span class="id" title="var">c</span> <span class="id" title="var">e</span> :=<br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">p</span> := <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#9ea91de45bbac2f7bc67d6bfcbe695b2"><span class="id" title="notation">.*2</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <span class="id" title="tactic">in</span><br/>
<span class="id" title="keyword">if</span> <a class="idref" href="mathcomp.ssreflect.prime.html#a"><span class="id" title="variable">a</span></a> <span class="id" title="keyword">is</span> <span class="id" title="var">a'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <span class="id" title="keyword">then</span><br/>
<span class="id" title="keyword">if</span> <a class="idref" href="mathcomp.ssreflect.prime.html#b"><span class="id" title="variable">b</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9482aae3d3b06e249765c1225dbb8cbb"><span class="id" title="notation">-</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9482aae3d3b06e249765c1225dbb8cbb"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#ifnz"><span class="id" title="definition">ifnz</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> 1 <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9482aae3d3b06e249765c1225dbb8cbb"><span class="id" title="notation">-</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#c"><span class="id" title="variable">c</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#9482aae3d3b06e249765c1225dbb8cbb"><span class="id" title="notation">)</span></a> <span class="id" title="keyword">is</span> <span class="id" title="var">b'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <span class="id" title="keyword">then</span><br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">rec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <span class="id" title="var">a'</span><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <span class="id" title="var">b'</span><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#ifnz"><span class="id" title="definition">ifnz</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#c"><span class="id" title="variable">c</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#c"><span class="id" title="variable">c</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#ifnz"><span class="id" title="definition">ifnz</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#b870774a3786e6850cf468108b4e1ee5"><span class="id" title="notation">.-2</span></a> 1)<a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">]</span></a> <span class="id" title="keyword">else</span><br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">if</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#b"><span class="id" title="variable">b</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">&&</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#c"><span class="id" title="variable">c</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">then</span></a><br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">b'</span> := <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#c50bd965cea0fa974be322ff7c9fa45b"><span class="id" title="notation">+</span></a> <span class="id" title="var">a'</span> <span class="id" title="tactic">in</span> <a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">rec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#b'"><span class="id" title="variable">b'</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#9ea91de45bbac2f7bc67d6bfcbe695b2"><span class="id" title="notation">.*2</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#ee413ebc91a26852af33277faeb90e31"><span class="id" title="notation">.+3</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <span class="id" title="var">a'</span><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#b'"><span class="id" title="variable">b'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">]</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">else</span></a><br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">bc'</span> := <a class="idref" href="mathcomp.ssreflect.prime.html#ifnz"><span class="id" title="definition">ifnz</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#ifnz"><span class="id" title="definition">ifnz</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#b"><span class="id" title="variable">b</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#edivn2"><span class="id" title="definition">edivn2</span></a> 0 <a class="idref" href="mathcomp.ssreflect.prime.html#c"><span class="id" title="variable">c</span></a>)) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#b"><span class="id" title="variable">b</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#c"><span class="id" title="variable">c</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> <span class="id" title="tactic">in</span><br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">^?</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">::</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#ifnz"><span class="id" title="definition">ifnz</span></a> <span class="id" title="var">a'</span> <a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">rec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <span class="id" title="var">a'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#bc'"><span class="id" title="variable">bc'</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#c4877bbfe60d8f22b47ac99ace86216a"><span class="id" title="notation">.1</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#c50bd965cea0fa974be322ff7c9fa45b"><span class="id" title="notation">+</span></a> <span class="id" title="var">a'</span><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#bc'"><span class="id" title="variable">bc'</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#f4827404159513e7fd691b60b7877737"><span class="id" title="notation">.2</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> 0<a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">]</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">[::</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a><a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">]</span></a><br/>
<span class="id" title="keyword">else</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">if</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#b"><span class="id" title="variable">b</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">&&</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#c"><span class="id" title="variable">c</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">then</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">[::</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#793e3499c36e4c6595d810e871a5acdd"><span class="id" title="notation">.+2</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a><a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">]</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">else</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">^?</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">::</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">[::</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a><a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">]</span></a><br/>
<span class="id" title="keyword">where</span> <a name="07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">"</span></a>[ 'rec' m , k , a , b , c , e ]" := (<a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp_rec"><span class="id" title="definition">prime_decomp_rec</span></a> <span class="id" title="var">m</span> <span class="id" title="var">k</span> <span class="id" title="var">a</span> <span class="id" title="var">b</span> <span class="id" title="var">c</span> <span class="id" title="var">e</span>).<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <span class="id" title="var">n</span> :=<br/>
<span class="id" title="keyword">let</span>: <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><span class="id" title="var">e2</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <span class="id" title="var">m2</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> := <a class="idref" href="mathcomp.ssreflect.prime.html#elogn2"><span class="id" title="definition">elogn2</span></a> 0 <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a> <span class="id" title="tactic">in</span><br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">if</span></a> <span class="id" title="var">m2</span> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> 2 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">then</span></a> 2 <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">^?</span></a> <span class="id" title="var">e2</span> <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">::</span></a> 3 <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">^?</span></a> <span class="id" title="var">m2</span> <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">::</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#747e2b5d553b2dfe76e024e1f8fb39d1"><span class="id" title="notation">[::]</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">else</span></a><br/>
<span class="id" title="keyword">let</span>: <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><span class="id" title="var">a</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <span class="id" title="var">bc</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> := <a class="idref" href="mathcomp.ssreflect.div.html#edivn"><span class="id" title="definition">edivn</span></a> <span class="id" title="var">m2</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#b870774a3786e6850cf468108b4e1ee5"><span class="id" title="notation">.-2</span></a> 3 <span class="id" title="tactic">in</span><br/>
<span class="id" title="keyword">let</span>: <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><span class="id" title="var">b</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <span class="id" title="var">c</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> := <a class="idref" href="mathcomp.ssreflect.div.html#edivn"><span class="id" title="definition">edivn</span></a> (2 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9482aae3d3b06e249765c1225dbb8cbb"><span class="id" title="notation">-</span></a> <span class="id" title="var">bc</span>) 2 <span class="id" title="tactic">in</span><br/>
2 <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">^?</span></a> <span class="id" title="var">e2</span> <a class="idref" href="mathcomp.ssreflect.prime.html#91925c00d32764252f19b6e02cd6bbc9"><span class="id" title="notation">::</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">rec</span></a> <span class="id" title="var">m2</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#9ea91de45bbac2f7bc67d6bfcbe695b2"><span class="id" title="notation">.*2</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> 1<a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <span class="id" title="var">a</span><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <span class="id" title="var">b</span><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> <span class="id" title="var">c</span><a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">,</span></a> 0<a class="idref" href="mathcomp.ssreflect.prime.html#07e1474be9be12fc282844ac903c103e"><span class="id" title="notation">]</span></a>.<br/>
<br/>
</div>
<div class="doc">
The list of divisors and the Euler function are computed directly from
the decomposition, using a merge_sort variant sort the divisor list.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Definition</span> <a name="add_divisors"><span class="id" title="definition">add_divisors</span></a> <span class="id" title="var">f</span> <span class="id" title="var">divs</span> :=<br/>
<span class="id" title="keyword">let</span>: <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><span class="id" title="var">p</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <span class="id" title="var">e</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> := <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a> <span class="id" title="tactic">in</span><br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">add1</span> <span class="id" title="var">divs'</span> := <a class="idref" href="mathcomp.ssreflect.path.html#merge"><span class="id" title="definition">merge</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#leq"><span class="id" title="definition">leq</span></a> (<a class="idref" href="mathcomp.ssreflect.seq.html#map"><span class="id" title="definition">map</span></a> (<a class="idref" href="mathcomp.ssreflect.ssrnat.html#NatTrec.mul"><span class="id" title="definition">NatTrec.mul</span></a> <span class="id" title="var">p</span>) <a class="idref" href="mathcomp.ssreflect.prime.html#divs'"><span class="id" title="variable">divs'</span></a>) <a class="idref" href="mathcomp.ssreflect.prime.html#divs"><span class="id" title="variable">divs</span></a> <span class="id" title="tactic">in</span><br/>
<a class="idref" href="mathcomp.ssreflect.ssrnat.html#iter"><span class="id" title="definition">iter</span></a> <span class="id" title="var">e</span> <a class="idref" href="mathcomp.ssreflect.prime.html#add1"><span class="id" title="variable">add1</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#divs"><span class="id" title="variable">divs</span></a>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="add_totient_factor"><span class="id" title="definition">add_totient_factor</span></a> <span class="id" title="var">f</span> <span class="id" title="var">m</span> := <span class="id" title="keyword">let</span>: <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><span class="id" title="var">p</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <span class="id" title="var">e</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> := <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a> <span class="id" title="tactic">in</span> <span class="id" title="var">p</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#db68ec9399320f6b1e74e6c173769d9a"><span class="id" title="notation">×</span></a> <span class="id" title="var">p</span> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#5324a05440e2ec11a1246af1f549ecf5"><span class="id" title="notation">^</span></a> <span class="id" title="var">e</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#db68ec9399320f6b1e74e6c173769d9a"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>.<br/>
<br/>
<span class="id" title="keyword">End</span> <a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="section">prime_decomp</span></a>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="primes"><span class="id" title="definition">primes</span></a> <span class="id" title="var">n</span> := <a class="idref" href="mathcomp.ssreflect.seq.html#unzip1"><span class="id" title="definition">unzip1</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="prime"><span class="id" title="definition">prime</span></a> <span class="id" title="var">p</span> := <span class="id" title="keyword">if</span> <a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <span class="id" title="keyword">is</span> <a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">[::</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><span class="id" title="var">_</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a><a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">]</span></a> <span class="id" title="keyword">then</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#true"><span class="id" title="constructor">true</span></a> <span class="id" title="keyword">else</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#false"><span class="id" title="constructor">false</span></a>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="nat_pred"><span class="id" title="definition">nat_pred</span></a> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#simpl_pred"><span class="id" title="definition">simpl_pred</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="pi_unwrapped_arg"><span class="id" title="definition">pi_unwrapped_arg</span></a> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>.<br/>
<span class="id" title="keyword">Definition</span> <a name="pi_wrapped_arg"><span class="id" title="definition">pi_wrapped_arg</span></a> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#wrapped"><span class="id" title="record">wrapped</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>.<br/>
<span class="id" title="keyword">Coercion</span> <span class="id" title="var">unwrap_pi_arg</span> (<span class="id" title="var">wa</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi_wrapped_arg"><span class="id" title="definition">pi_wrapped_arg</span></a>) : <a class="idref" href="mathcomp.ssreflect.prime.html#pi_unwrapped_arg"><span class="id" title="definition">pi_unwrapped_arg</span></a> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#unwrap"><span class="id" title="projection">unwrap</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#wa"><span class="id" title="variable">wa</span></a>.<br/>
<span class="id" title="keyword">Coercion</span> <span class="id" title="var">pi_arg_of_nat</span> (<span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>) := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#Wrap"><span class="id" title="constructor">Wrap</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#4509b22bf26e3d6d771897e22bd8bc8f"><span class="id" title="notation">:</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi_wrapped_arg"><span class="id" title="definition">pi_wrapped_arg</span></a>.<br/>
<span class="id" title="keyword">Coercion</span> <span class="id" title="var">pi_arg_of_fin_pred</span> <span class="id" title="var">T</span> <span class="id" title="var">pT</span> (<span class="id" title="var">A</span> : @<a class="idref" href="mathcomp.ssreflect.fintype.html#fin_pred_sort"><span class="id" title="definition">fin_pred_sort</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#T"><span class="id" title="variable">T</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pT"><span class="id" title="variable">pT</span></a>) : <a class="idref" href="mathcomp.ssreflect.prime.html#pi_wrapped_arg"><span class="id" title="definition">pi_wrapped_arg</span></a> :=<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#Wrap"><span class="id" title="constructor">Wrap</span></a> <a class="idref" href="mathcomp.ssreflect.fintype.html#f01714bb99e6c7abc6cfb2e43eff7f6e"><span class="id" title="notation">#|</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#A"><span class="id" title="variable">A</span></a><a class="idref" href="mathcomp.ssreflect.fintype.html#f01714bb99e6c7abc6cfb2e43eff7f6e"><span class="id" title="notation">|</span></a>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="pi_of"><span class="id" title="definition">pi_of</span></a> (<span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi_unwrapped_arg"><span class="id" title="definition">pi_unwrapped_arg</span></a>) : <a class="idref" href="mathcomp.ssreflect.prime.html#nat_pred"><span class="id" title="definition">nat_pred</span></a> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5f5162cf071341faef72f7a202c2f54c"><span class="id" title="notation">[</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5f5162cf071341faef72f7a202c2f54c"><span class="id" title="notation">pred</span></a> <span class="id" title="var">p</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5f5162cf071341faef72f7a202c2f54c"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5f5162cf071341faef72f7a202c2f54c"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Notation</span> <a name="041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">"</span></a>\pi ( n )" := (<a class="idref" href="mathcomp.ssreflect.prime.html#pi_of"><span class="id" title="definition">pi_of</span></a> <span class="id" title="var">n</span>)<br/>
(<span class="id" title="tactic">at</span> <span class="id" title="keyword">level</span> 2, <span class="id" title="var">format</span> "\pi ( n )") : <span class="id" title="var">nat_scope</span>.<br/>
<span class="id" title="keyword">Notation</span> <a name="68004592c17c74363c2ceaac7205b469"><span class="id" title="notation">"</span></a>\p 'i' ( A )" := <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.fintype.html#f01714bb99e6c7abc6cfb2e43eff7f6e"><span class="id" title="notation">#|</span></a><span class="id" title="var">A</span><a class="idref" href="mathcomp.ssreflect.fintype.html#f01714bb99e6c7abc6cfb2e43eff7f6e"><span class="id" title="notation">|</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><br/>
(<span class="id" title="tactic">at</span> <span class="id" title="keyword">level</span> 2, <span class="id" title="var">format</span> "\p 'i' ( A )") : <span class="id" title="var">nat_scope</span>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="pdiv"><span class="id" title="definition">pdiv</span></a> <span class="id" title="var">n</span> := <a class="idref" href="mathcomp.ssreflect.seq.html#head"><span class="id" title="definition">head</span></a> 1 (<a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="max_pdiv"><span class="id" title="definition">max_pdiv</span></a> <span class="id" title="var">n</span> := <a class="idref" href="mathcomp.ssreflect.seq.html#last"><span class="id" title="definition">last</span></a> 1 (<a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="divisors"><span class="id" title="definition">divisors</span></a> <span class="id" title="var">n</span> := <a class="idref" href="mathcomp.ssreflect.seq.html#foldr"><span class="id" title="definition">foldr</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#add_divisors"><span class="id" title="definition">add_divisors</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">[::</span></a> 1<a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">]</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="totient"><span class="id" title="definition">totient</span></a> <span class="id" title="var">n</span> := <a class="idref" href="mathcomp.ssreflect.seq.html#foldr"><span class="id" title="definition">foldr</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#add_totient_factor"><span class="id" title="definition">add_totient_factor</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0) (<a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
</div>
<div class="doc">
Correctness of the decomposition algorithm.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prime_decomp_correct"><span class="id" title="lemma">prime_decomp_correct</span></a> :<br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">pd_val</span> <span class="id" title="var">pd</span> := <a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">prod_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">(</span></a><span class="id" title="var">f</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation"><-</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd"><span class="id" title="variable">pd</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pfactor"><span class="id" title="definition">pfactor</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#c4877bbfe60d8f22b47ac99ace86216a"><span class="id" title="notation">.1</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#f4827404159513e7fd691b60b7877737"><span class="id" title="notation">.2</span></a> <span class="id" title="tactic">in</span><br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">lb_dvd</span> <span class="id" title="var">q</span> <span class="id" title="var">m</span> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">~~</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#has"><span class="id" title="definition">has</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#880a9790dece461a678db8aa0c091f63"><span class="id" title="notation">[</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#880a9790dece461a678db8aa0c091f63"><span class="id" title="notation">pred</span></a> <span class="id" title="var">d</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#880a9790dece461a678db8aa0c091f63"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#880a9790dece461a678db8aa0c091f63"><span class="id" title="notation">]</span></a> (<a class="idref" href="mathcomp.ssreflect.bigop.html#index_iota"><span class="id" title="definition">index_iota</span></a> 2 <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a>) <span class="id" title="tactic">in</span><br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">pf_ok</span> <span class="id" title="var">f</span> := <a class="idref" href="mathcomp.ssreflect.prime.html#lb_dvd"><span class="id" title="variable">lb_dvd</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#c4877bbfe60d8f22b47ac99ace86216a"><span class="id" title="notation">.1</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#c4877bbfe60d8f22b47ac99ace86216a"><span class="id" title="notation">.1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">&&</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">(</span></a>0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#f4827404159513e7fd691b60b7877737"><span class="id" title="notation">.2</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">)</span></a> <span class="id" title="tactic">in</span><br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">pd_ord</span> <span class="id" title="var">q</span> <span class="id" title="var">pd</span> := <a class="idref" href="mathcomp.ssreflect.path.html#path"><span class="id" title="definition">path</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#ltn"><span class="id" title="definition">ltn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a> (<a class="idref" href="mathcomp.ssreflect.seq.html#unzip1"><span class="id" title="definition">unzip1</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd"><span class="id" title="variable">pd</span></a>) <span class="id" title="tactic">in</span><br/>
<span class="id" title="keyword">let</span> <span class="id" title="var">pd_ok</span> <span class="id" title="var">q</span> <span class="id" title="var">n</span> <span class="id" title="var">pd</span> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">[/\</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd_val"><span class="id" title="variable">pd_val</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd"><span class="id" title="variable">pd</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#all"><span class="id" title="definition">all</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pf_ok"><span class="id" title="variable">pf_ok</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd"><span class="id" title="variable">pd</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd_ord"><span class="id" title="variable">pd_ord</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd"><span class="id" title="variable">pd</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">]</span></a> <span class="id" title="tactic">in</span><br/>
<span class="id" title="keyword">∀</span> <span class="id" title="var">n</span>, <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pd_ok"><span class="id" title="variable">pd_ok</span></a> 1 <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="primePn"><span class="id" title="lemma">primePn</span></a> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> 2 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#7a45dffb109c3069e5c675be68643e60"><span class="id" title="notation">∨</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#28b18e493f7cb0bd8447607bdc385ff8"><span class="id" title="notation">exists2</span></a> <span class="id" title="var">d</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#28b18e493f7cb0bd8447607bdc385ff8"><span class="id" title="notation">,</span></a> 1 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#432e31800fc09abd260feb634dbbd1af"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#432e31800fc09abd260feb634dbbd1af"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#28b18e493f7cb0bd8447607bdc385ff8"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) (<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">~~</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="primeP"><span class="id" title="lemma">primeP</span></a> <span class="id" title="var">p</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 1 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d82a7d96d3659d805ffe732283716822"><span class="id" title="notation">∧</span></a> <span class="id" title="keyword">∀</span> <span class="id" title="var">d</span>, <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#xpred2"><span class="id" title="abbreviation">xpred2</span></a> 1 <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a>) (<a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prime_nt_dvdP"><span class="id" title="lemma">prime_nt_dvdP</span></a> <span class="id" title="var">d</span> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#b1eeadc2feabc7422252baa895418c7b"><span class="id" title="notation">!=</span></a> 1 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>) (<a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>).<br/>
<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prime_gt1"><span class="id" title="lemma">prime_gt1</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> 1 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prime_gt0"><span class="id" title="lemma">prime_gt0</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>.<br/>
<br/>
<span class="id" title="keyword">Hint Resolve</span> <span class="id" title="var">prime_gt1</span> <span class="id" title="var">prime_gt0</span>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prod_prime_decomp"><span class="id" title="lemma">prod_prime_decomp</span></a> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">prod_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">(</span></a><span class="id" title="var">f</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation"><-</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#c4877bbfe60d8f22b47ac99ace86216a"><span class="id" title="notation">.1</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#f"><span class="id" title="variable">f</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrfun.html#f4827404159513e7fd691b60b7877737"><span class="id" title="notation">.2</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="even_prime"><span class="id" title="lemma">even_prime</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 2 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#7a45dffb109c3069e5c675be68643e60"><span class="id" title="notation">∨</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#odd"><span class="id" title="definition">odd</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prime_oddPn"><span class="id" title="lemma">prime_oddPn</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 2) (<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">~~</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#odd"><span class="id" title="definition">odd</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="odd_prime_gt2"><span class="id" title="lemma">odd_prime_gt2</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.ssrnat.html#odd"><span class="id" title="definition">odd</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 2.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="mem_prime_decomp"><span class="id" title="lemma">mem_prime_decomp</span></a> <span class="id" title="var">n</span> <span class="id" title="var">p</span> <span class="id" title="var">e</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">[/\</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prime_coprime"><span class="id" title="lemma">prime_coprime</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">~~</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="dvdn_prime2"><span class="id" title="lemma">dvdn_prime2</span></a> <span class="id" title="var">p</span> <span class="id" title="var">q</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="Euclid_dvdM"><span class="id" title="lemma">Euclid_dvdM</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">||</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="Euclid_dvd1"><span class="id" title="lemma">Euclid_dvd1</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#false"><span class="id" title="constructor">false</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="Euclid_dvdX"><span class="id" title="lemma">Euclid_dvdX</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">&&</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="mem_primes"><span class="id" title="lemma">mem_primes</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#2e9317c5f71a1305fb695cdc49716482"><span class="id" title="notation">[&&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#2e9317c5f71a1305fb695cdc49716482"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#2e9317c5f71a1305fb695cdc49716482"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#2e9317c5f71a1305fb695cdc49716482"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="sorted_primes"><span class="id" title="lemma">sorted_primes</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.path.html#sorted"><span class="id" title="definition">sorted</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#ltn"><span class="id" title="definition">ltn</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="eq_primes"><span class="id" title="lemma">eq_primes</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#df1ced36fc33ce188051218bca314374"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#df1ced36fc33ce188051218bca314374"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#df1ced36fc33ce188051218bca314374"><span class="id" title="notation">↔</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#df1ced36fc33ce188051218bca314374"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#df1ced36fc33ce188051218bca314374"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="primes_uniq"><span class="id" title="lemma">primes_uniq</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.seq.html#uniq"><span class="id" title="definition">uniq</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
</div>
<div class="doc">
The smallest prime divisor
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_pdiv"><span class="id" title="lemma">pi_pdiv</span></a> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pdiv_prime"><span class="id" title="lemma">pdiv_prime</span></a> <span class="id" title="var">n</span> : 1 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pdiv_dvd"><span class="id" title="lemma">pdiv_dvd</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_max_pdiv"><span class="id" title="lemma">pi_max_pdiv</span></a> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#max_pdiv"><span class="id" title="definition">max_pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="max_pdiv_prime"><span class="id" title="lemma">max_pdiv_prime</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 1 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#max_pdiv"><span class="id" title="definition">max_pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="max_pdiv_dvd"><span class="id" title="lemma">max_pdiv_dvd</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#max_pdiv"><span class="id" title="definition">max_pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pdiv_leq"><span class="id" title="lemma">pdiv_leq</span></a> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="max_pdiv_leq"><span class="id" title="lemma">max_pdiv_leq</span></a> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#max_pdiv"><span class="id" title="definition">max_pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pdiv_gt0"><span class="id" title="lemma">pdiv_gt0</span></a> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="max_pdiv_gt0"><span class="id" title="lemma">max_pdiv_gt0</span></a> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#max_pdiv"><span class="id" title="definition">max_pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<span class="id" title="keyword">Hint Resolve</span> <span class="id" title="var">pdiv_gt0</span> <span class="id" title="var">max_pdiv_gt0</span>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pdiv_min_dvd"><span class="id" title="lemma">pdiv_min_dvd</span></a> <span class="id" title="var">m</span> <span class="id" title="var">d</span> : 1 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="max_pdiv_max"><span class="id" title="lemma">max_pdiv_max</span></a> <span class="id" title="var">n</span> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#max_pdiv"><span class="id" title="definition">max_pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="ltn_pdiv2_prime"><span class="id" title="lemma">ltn_pdiv2_prime</span></a> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> 2 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="primePns"><span class="id" title="lemma">primePns</span></a> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> 2 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#7a45dffb109c3069e5c675be68643e60"><span class="id" title="notation">∨</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#84eb6d2849dbf3581b1c0c05add5f2d8"><span class="id" title="notation">∃</span></a> <span class="id" title="var">p</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#84eb6d2849dbf3581b1c0c05add5f2d8"><span class="id" title="notation">,</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">[/\</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> 2 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">]</span></a>) (<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">~~</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pdivP"><span class="id" title="lemma">pdivP</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 1 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">{</span></a><span class="id" title="var">p</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">}</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="primes_mul"><span class="id" title="lemma">primes_mul</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a><br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>)<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">||</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="primes_exp"><span class="id" title="lemma">primes_exp</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="primes_prime"><span class="id" title="lemma">primes_prime</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">[::</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.seq.html#36229928b54642a4a7da943ccf8f9612"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="coprime_has_primes"><span class="id" title="lemma">coprime_has_primes</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a><br/>
<a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">~~</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#has"><span class="id" title="definition">has</span></a> (<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#mem"><span class="id" title="definition">mem</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>)) (<a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pdiv_id"><span class="id" title="lemma">pdiv_id</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pdiv_pfactor"><span class="id" title="lemma">pdiv_pfactor</span></a> <span class="id" title="var">p</span> <span class="id" title="var">k</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>.<br/>
<br/>
</div>
<div class="doc">
Primes are unbounded.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prime_above"><span class="id" title="lemma">prime_above</span></a> <span class="id" title="var">m</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">{</span></a><span class="id" title="var">p</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">}</span></a>.<br/>
<br/>
</div>
<div class="doc">
"prime" logarithms and p-parts.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Fixpoint</span> <a name="logn_rec"><span class="id" title="definition">logn_rec</span></a> <span class="id" title="var">d</span> <span class="id" title="var">m</span> <span class="id" title="var">r</span> :=<br/>
<span class="id" title="keyword">match</span> <a class="idref" href="mathcomp.ssreflect.prime.html#r"><span class="id" title="variable">r</span></a>, <a class="idref" href="mathcomp.ssreflect.div.html#edivn"><span class="id" title="definition">edivn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <span class="id" title="keyword">with</span><br/>
| <span class="id" title="var">r'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a>, <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><span class="id" title="var">_</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <span class="id" title="keyword">as</span> <span class="id" title="var">m'</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> ⇒ <a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#logn_rec"><span class="id" title="definition">logn_rec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <span class="id" title="var">m'</span> <span class="id" title="var">r'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">).+1</span></a><br/>
| <span class="id" title="var">_</span>, <span class="id" title="var">_</span> ⇒ 0<br/>
<span class="id" title="keyword">end</span>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="logn"><span class="id" title="definition">logn</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">if</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">then</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn_rec"><span class="id" title="definition">logn_rec</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">else</span></a> 0.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="lognE"><span class="id" title="lemma">lognE</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">if</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#2e9317c5f71a1305fb695cdc49716482"><span class="id" title="notation">[&&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#2e9317c5f71a1305fb695cdc49716482"><span class="id" title="notation">,</span></a> 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#2e9317c5f71a1305fb695cdc49716482"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#2e9317c5f71a1305fb695cdc49716482"><span class="id" title="notation">]</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">then</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#df17451da28eb630dbb51b12706ba39e"><span class="id" title="notation">%/</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>)<a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">).+1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">else</span></a> 0.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="logn_gt0"><span class="id" title="lemma">logn_gt0</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a>0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="ltn_log0"><span class="id" title="lemma">ltn_log0</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 0.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="logn0"><span class="id" title="lemma">logn0</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 0.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="logn1"><span class="id" title="lemma">logn1</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> 1 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 0.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pfactor_gt0"><span class="id" title="lemma">pfactor_gt0</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<span class="id" title="keyword">Hint Resolve</span> <span class="id" title="var">pfactor_gt0</span>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pfactor_dvdn"><span class="id" title="lemma">pfactor_dvdn</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> <span class="id" title="var">m</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pfactor_dvdnn"><span class="id" title="lemma">pfactor_dvdnn</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="logn_prime"><span class="id" title="lemma">logn_prime</span></a> <span class="id" title="var">p</span> <span class="id" title="var">q</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#q"><span class="id" title="variable">q</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pfactor_coprime"><span class="id" title="lemma">pfactor_coprime</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">{</span></a><span class="id" title="var">m</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#f5350ad671d3ce0e1e463e298917cf6e"><span class="id" title="notation">}</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pfactorK"><span class="id" title="lemma">pfactorK</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pfactorKpdiv"><span class="id" title="lemma">pfactorKpdiv</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#pdiv"><span class="id" title="definition">pdiv</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>)) (<a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="dvdn_leq_log"><span class="id" title="lemma">dvdn_leq_log</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="ltn_logl"><span class="id" title="lemma">ltn_logl</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="logn_Gauss"><span class="id" title="lemma">logn_Gauss</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="lognM"><span class="id" title="lemma">lognM</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#b3eea360671e1b32b18a26e15b3aace3"><span class="id" title="notation">+</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="lognX"><span class="id" title="lemma">lognX</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="logn_div"><span class="id" title="lemma">logn_div</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#df17451da28eb630dbb51b12706ba39e"><span class="id" title="notation">%/</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9482aae3d3b06e249765c1225dbb8cbb"><span class="id" title="notation">-</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="dvdn_pfactor"><span class="id" title="lemma">dvdn_pfactor</span></a> <span class="id" title="var">p</span> <span class="id" title="var">d</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a><br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#28b18e493f7cb0bd8447607bdc385ff8"><span class="id" title="notation">exists2</span></a> <span class="id" title="var">m</span><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#28b18e493f7cb0bd8447607bdc385ff8"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#28b18e493f7cb0bd8447607bdc385ff8"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>) (<a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="prime_decompE"><span class="id" title="lemma">prime_decompE</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime_decomp"><span class="id" title="definition">prime_decomp</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#b7adbae1ad6b5f8e6d4ef64ae286f319"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.seq.html#b7adbae1ad6b5f8e6d4ef64ae286f319"><span class="id" title="notation">seq</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#44400027531d4bc3f586a1997dc874c0"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#b7adbae1ad6b5f8e6d4ef64ae286f319"><span class="id" title="notation">|</span></a> <span class="id" title="var">p</span> <a class="idref" href="mathcomp.ssreflect.seq.html#b7adbae1ad6b5f8e6d4ef64ae286f319"><span class="id" title="notation"><-</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.seq.html#b7adbae1ad6b5f8e6d4ef64ae286f319"><span class="id" title="notation">]</span></a>.<br/>
<br/>
</div>
<div class="doc">
Some combinatorial formulae.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Lemma</span> <a name="divn_count_dvd"><span class="id" title="lemma">divn_count_dvd</span></a> <span class="id" title="var">d</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#df17451da28eb630dbb51b12706ba39e"><span class="id" title="notation">%/</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">sum_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">(</span></a>1 <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">≤</span></a> <span class="id" title="var">i</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="logn_count_dvd"><span class="id" title="lemma">logn_count_dvd</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">sum_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">(</span></a>1 <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">≤</span></a> <span class="id" title="var">k</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">)</span></a>.<br/>
<br/>
</div>
<div class="doc">
Truncated real log.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Definition</span> <a name="trunc_log"><span class="id" title="definition">trunc_log</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> :=<br/>
<span class="id" title="keyword">let</span> <span class="id" title="keyword">fix</span> <span class="id" title="var">loop</span> <span class="id" title="var">n</span> <span class="id" title="var">k</span> :=<br/>
<span class="id" title="keyword">if</span> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a> <span class="id" title="keyword">is</span> <span class="id" title="var">k'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <span class="id" title="keyword">then</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">if</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">then</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#loop"><span class="id" title="variable">loop</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#df17451da28eb630dbb51b12706ba39e"><span class="id" title="notation">%/</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>) <span class="id" title="var">k'</span><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">).+1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#0348819abaa88c2cd747e8fa60dde7ae"><span class="id" title="notation">else</span></a> 0 <span class="id" title="keyword">else</span> 0<br/>
<span class="id" title="tactic">in</span> <a class="idref" href="mathcomp.ssreflect.prime.html#loop"><span class="id" title="variable">loop</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="trunc_log_bounds"><span class="id" title="lemma">trunc_log_bounds</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> :<br/>
1 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <span class="id" title="keyword">let</span> <span class="id" title="var">k</span> := <a class="idref" href="mathcomp.ssreflect.prime.html#trunc_log"><span class="id" title="definition">trunc_log</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <span class="id" title="tactic">in</span> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#a37ed901e2f16b7d06c569763fc8034f"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#a37ed901e2f16b7d06c569763fc8034f"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="trunc_log_ltn"><span class="id" title="lemma">trunc_log_ltn</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : 1 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#trunc_log"><span class="id" title="definition">trunc_log</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">).+1</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="trunc_logP"><span class="id" title="lemma">trunc_logP</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : 1 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#trunc_log"><span class="id" title="definition">trunc_log</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="trunc_log_max"><span class="id" title="lemma">trunc_log_max</span></a> <span class="id" title="var">p</span> <span class="id" title="var">k</span> <span class="id" title="var">j</span> : 1 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#j"><span class="id" title="variable">j</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#j"><span class="id" title="variable">j</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#trunc_log"><span class="id" title="definition">trunc_log</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a>.<br/>
<br/>
</div>
<div class="doc">
pi- parts
<div class="paragraph"> </div>
Testing for membership in set of prime factors.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Canonical</span> <span class="id" title="var">nat_pred_pred</span> := <span class="id" title="keyword">Eval</span> <span class="id" title="tactic">hnf</span> <span class="id" title="tactic">in</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#df3be14ed329a6c5934d595bc1fa80bd"><span class="id" title="notation">[</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#df3be14ed329a6c5934d595bc1fa80bd"><span class="id" title="notation">predType</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#df3be14ed329a6c5934d595bc1fa80bd"><span class="id" title="notation">of</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#nat_pred"><span class="id" title="definition">nat_pred</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#df3be14ed329a6c5934d595bc1fa80bd"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Coercion</span> <span class="id" title="var">nat_pred_of_nat</span> (<span class="id" title="var">p</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>) : <a class="idref" href="mathcomp.ssreflect.prime.html#nat_pred"><span class="id" title="definition">nat_pred</span></a> := <a class="idref" href="mathcomp.ssreflect.eqtype.html#pred1"><span class="id" title="definition">pred1</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>.<br/>
<br/>
<span class="id" title="keyword">Section</span> <a name="NatPreds"><span class="id" title="section">NatPreds</span></a>.<br/>
<br/>
<span class="id" title="keyword">Variables</span> (<a name="NatPreds.n"><span class="id" title="variable">n</span></a> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>) (<a name="NatPreds.pi"><span class="id" title="variable">pi</span></a> : <a class="idref" href="mathcomp.ssreflect.prime.html#nat_pred"><span class="id" title="definition">nat_pred</span></a>).<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="negn"><span class="id" title="definition">negn</span></a> : <a class="idref" href="mathcomp.ssreflect.prime.html#nat_pred"><span class="id" title="definition">nat_pred</span></a> := <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#c2f58fba484177bda65c2ab1289a6fe6"><span class="id" title="notation">[</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#c2f58fba484177bda65c2ab1289a6fe6"><span class="id" title="notation">predC</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#NatPreds.pi"><span class="id" title="variable">pi</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#c2f58fba484177bda65c2ab1289a6fe6"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="pnat"><span class="id" title="definition">pnat</span></a> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#pred"><span class="id" title="definition">pred</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a> := <span class="id" title="keyword">fun</span> <span class="id" title="var">m</span> ⇒ <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">&&</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#all"><span class="id" title="definition">all</span></a> (<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#mem"><span class="id" title="definition">mem</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#NatPreds.pi"><span class="id" title="variable">pi</span></a>) (<a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>).<br/>
<br/>
<span class="id" title="keyword">Definition</span> <a name="partn"><span class="id" title="definition">partn</span></a> := <a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">prod_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">(</span></a>0 <a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">≤</span></a> <span class="id" title="var">p</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#NatPreds.n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#NatPreds.pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#NatPreds.n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">End</span> <a class="idref" href="mathcomp.ssreflect.prime.html#NatPreds"><span class="id" title="section">NatPreds</span></a>.<br/>
<br/>
<span class="id" title="keyword">Notation</span> <a name="233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">"</span></a>pi ^'" := (<a class="idref" href="mathcomp.ssreflect.prime.html#negn"><span class="id" title="definition">negn</span></a> <span class="id" title="var">pi</span>) (<span class="id" title="tactic">at</span> <span class="id" title="keyword">level</span> 2, <span class="id" title="var">format</span> "pi ^'") : <span class="id" title="var">nat_scope</span>.<br/>
<br/>
<span class="id" title="keyword">Notation</span> <a name="8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">"</span></a>pi .-nat" := (<a class="idref" href="mathcomp.ssreflect.prime.html#pnat"><span class="id" title="definition">pnat</span></a> <span class="id" title="var">pi</span>) (<span class="id" title="tactic">at</span> <span class="id" title="keyword">level</span> 2, <span class="id" title="var">format</span> "pi .-nat") : <span class="id" title="var">nat_scope</span>.<br/>
<br/>
<span class="id" title="keyword">Notation</span> <a name="fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">"</span></a>n `_ pi" := (<a class="idref" href="mathcomp.ssreflect.prime.html#partn"><span class="id" title="definition">partn</span></a> <span class="id" title="var">n</span> <span class="id" title="var">pi</span>) : <span class="id" title="var">nat_scope</span>.<br/>
<br/>
<span class="id" title="keyword">Section</span> <a name="PnatTheory"><span class="id" title="section">PnatTheory</span></a>.<br/>
<br/>
<span class="id" title="keyword">Implicit</span> <span class="id" title="keyword">Types</span> (<span class="id" title="var">n</span> <span class="id" title="var">p</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>) (<span class="id" title="var">pi</span> <span class="id" title="var">rho</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#nat_pred"><span class="id" title="definition">nat_pred</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="negnK"><span class="id" title="lemma">negnK</span></a> <span class="id" title="var">pi</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'^'</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="eq_negn"><span class="id" title="lemma">eq_negn</span></a> <span class="id" title="var">pi1</span> <span class="id" title="var">pi2</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi1"><span class="id" title="variable">pi1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi2"><span class="id" title="variable">pi2</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi1"><span class="id" title="variable">pi1</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi2"><span class="id" title="variable">pi2</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="eq_piP"><span class="id" title="lemma">eq_piP</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#df1ced36fc33ce188051218bca314374"><span class="id" title="notation">↔</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="part_gt0"><span class="id" title="lemma">part_gt0</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<span class="id" title="keyword">Hint Resolve</span> <span class="id" title="var">part_gt0</span>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="sub_in_partn"><span class="id" title="lemma">sub_in_partn</span></a> <span class="id" title="var">pi1</span> <span class="id" title="var">pi2</span> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">,</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">subset</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi1"><span class="id" title="variable">pi1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi2"><span class="id" title="variable">pi2</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">}</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">}</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi1</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi2</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="eq_in_partn"><span class="id" title="lemma">eq_in_partn</span></a> <span class="id" title="var">pi1</span> <span class="id" title="var">pi2</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi1"><span class="id" title="variable">pi1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi2"><span class="id" title="variable">pi2</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">}</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi2</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="eq_partn"><span class="id" title="lemma">eq_partn</span></a> <span class="id" title="var">pi1</span> <span class="id" title="var">pi2</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi1"><span class="id" title="variable">pi1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi2"><span class="id" title="variable">pi2</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi1</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi2</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partnNK"><span class="id" title="lemma">partnNK</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'^'</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="widen_partn"><span class="id" title="lemma">widen_partn</span></a> <span class="id" title="var">m</span> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#9b077c369e19739ef880736ba34623ff"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">prod_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">(</span></a>0 <a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">≤</span></a> <span class="id" title="var">p</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#361454269931ea8643f7b402f2ab7222"><span class="id" title="notation">.+1</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#62ab9ebfa3c5245858df07eba0304ff1"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn0"><span class="id" title="lemma">partn0</span></a> <span class="id" title="var">pi</span> : 0<a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 1.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn1"><span class="id" title="lemma">partn1</span></a> <span class="id" title="var">pi</span> : 1<a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 1.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partnM"><span class="id" title="lemma">partnM</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">)`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partnX"><span class="id" title="lemma">partnX</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">)`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn_dvd"><span class="id" title="lemma">partn_dvd</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="p_part"><span class="id" title="lemma">p_part</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="p_part_eq1"><span class="id" title="lemma">p_part_eq1</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_p</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#ad6d23746eb1a3b62e52010d3945a1db"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#ad6d23746eb1a3b62e52010d3945a1db"><span class="id" title="notation">notin</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="p_part_gt1"><span class="id" title="lemma">p_part_gt1</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="primes_part"><span class="id" title="lemma">primes_part</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#filter"><span class="id" title="definition">filter</span></a> (<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#mem"><span class="id" title="definition">mem</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a>) (<a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="filter_pi_of"><span class="id" title="lemma">filter_pi_of</span></a> <span class="id" title="var">n</span> <span class="id" title="var">m</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#filter"><span class="id" title="definition">filter</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> (<a class="idref" href="mathcomp.ssreflect.bigop.html#index_iota"><span class="id" title="definition">index_iota</span></a> 0 <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn_pi"><span class="id" title="lemma">partn_pi</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partnT"><span class="id" title="lemma">partnT</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_predT</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partnC"><span class="id" title="lemma">partnC</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="dvdn_part"><span class="id" title="lemma">dvdn_part</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="logn_part"><span class="id" title="lemma">logn_part</span></a> <span class="id" title="var">p</span> <span class="id" title="var">m</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn_lcm"><span class="id" title="lemma">partn_lcm</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.div.html#lcmn"><span class="id" title="definition">lcmn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">)`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#lcmn"><span class="id" title="definition">lcmn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn_gcd"><span class="id" title="lemma">partn_gcd</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.div.html#gcdn"><span class="id" title="definition">gcdn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">)`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#gcdn"><span class="id" title="definition">gcdn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn_biglcm"><span class="id" title="lemma">partn_biglcm</span></a> (<span class="id" title="var">I</span> : <a class="idref" href="mathcomp.ssreflect.fintype.html#Finite.Exports.finType"><span class="id" title="abbreviation">finType</span></a>) (<span class="id" title="var">P</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#pred"><span class="id" title="definition">pred</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#I"><span class="id" title="variable">I</span></a>) <span class="id" title="var">F</span> <span class="id" title="var">pi</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">(</span></a><span class="id" title="keyword">∀</span> <span class="id" title="var">i</span>, <a class="idref" href="mathcomp.ssreflect.prime.html#P"><span class="id" title="variable">P</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#F"><span class="id" title="variable">F</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a><br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">big</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.div.html#lcmn"><span class="id" title="definition">lcmn</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">/</span></a>1%<span class="id" title="var">N</span><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">]</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">(</span></a><span class="id" title="var">i</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#P"><span class="id" title="variable">P</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#F"><span class="id" title="variable">F</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">)`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">big</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.div.html#lcmn"><span class="id" title="definition">lcmn</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">/</span></a>1%<span class="id" title="var">N</span><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">]</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">(</span></a><span class="id" title="var">i</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#P"><span class="id" title="variable">P</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#F"><span class="id" title="variable">F</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">)`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn_biggcd"><span class="id" title="lemma">partn_biggcd</span></a> (<span class="id" title="var">I</span> : <a class="idref" href="mathcomp.ssreflect.fintype.html#Finite.Exports.finType"><span class="id" title="abbreviation">finType</span></a>) (<span class="id" title="var">P</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#pred"><span class="id" title="definition">pred</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#I"><span class="id" title="variable">I</span></a>) <span class="id" title="var">F</span> <span class="id" title="var">pi</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.fintype.html#f01714bb99e6c7abc6cfb2e43eff7f6e"><span class="id" title="notation">#|</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#SimplPred"><span class="id" title="definition">SimplPred</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#P"><span class="id" title="variable">P</span></a><a class="idref" href="mathcomp.ssreflect.fintype.html#f01714bb99e6c7abc6cfb2e43eff7f6e"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">(</span></a><span class="id" title="keyword">∀</span> <span class="id" title="var">i</span>, <a class="idref" href="mathcomp.ssreflect.prime.html#P"><span class="id" title="variable">P</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#F"><span class="id" title="variable">F</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a><br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">big</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.div.html#gcdn"><span class="id" title="definition">gcdn</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">/</span></a>0<a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">]</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">(</span></a><span class="id" title="var">i</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#P"><span class="id" title="variable">P</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#F"><span class="id" title="variable">F</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">)`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">big</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">[</span></a><a class="idref" href="mathcomp.ssreflect.div.html#gcdn"><span class="id" title="definition">gcdn</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">/</span></a>0<a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">]</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">(</span></a><span class="id" title="var">i</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#P"><span class="id" title="variable">P</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#8850ee6edf9a388b1213678f3d3ee856"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#F"><span class="id" title="variable">F</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">)`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="sub_in_pnat"><span class="id" title="lemma">sub_in_pnat</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">rho</span> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">,</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">subset</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">}</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">}</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="eq_in_pnat"><span class="id" title="lemma">eq_in_pnat</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">rho</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#5c59b35a0b51db520cf1fba473ecf127"><span class="id" title="notation">}</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="eq_pnat"><span class="id" title="lemma">eq_pnat</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">rho</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnatNK"><span class="id" title="lemma">pnatNK</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnatI"><span class="id" title="lemma">pnatI</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">rho</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">[</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">predI</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">]</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">&&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnat_mul"><span class="id" title="lemma">pnat_mul</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#49ac24efa716d8b0ee8943bc1d1769a9"><span class="id" title="notation">&&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnat_exp"><span class="id" title="lemma">pnat_exp</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">||</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> 0<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#14a7a9c7dc61f86bfb664d400fabaf8a"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="part_pnat"><span class="id" title="lemma">part_pnat</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnatE"><span class="id" title="lemma">pnatE</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnat_id"><span class="id" title="lemma">pnat_id</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="coprime_pi'"><span class="id" title="lemma">coprime_pi'</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnat_pi"><span class="id" title="lemma">pnat_pi</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_of_dvd"><span class="id" title="lemma">pi_of_dvd</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">subset</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">}</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_ofM"><span class="id" title="lemma">pi_ofM</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#1ffbd835ce363931871902ea52bd9208"><span class="id" title="notation">[</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#1ffbd835ce363931871902ea52bd9208"><span class="id" title="notation">predU</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#1ffbd835ce363931871902ea52bd9208"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#1ffbd835ce363931871902ea52bd9208"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_of_part"><span class="id" title="lemma">pi_of_part</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">[</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">predI</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_of_exp"><span class="id" title="lemma">pi_of_exp</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_of_prime"><span class="id" title="lemma">pi_of_prime</span></a> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">=</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">i</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssreflect.html#4509b22bf26e3d6d771897e22bd8bc8f"><span class="id" title="notation">:</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#nat_pred"><span class="id" title="definition">nat_pred</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#20bf07099d6d8cf369383b22fd37862e"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="p'natEpi"><span class="id" title="lemma">p'natEpi</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#ad6d23746eb1a3b62e52010d3945a1db"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#ad6d23746eb1a3b62e52010d3945a1db"><span class="id" title="notation">notin</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="p'natE"><span class="id" title="lemma">p'natE</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">~~</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#4b80c70cdb231351c5e129ba61f7f956"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnatPpi"><span class="id" title="lemma">pnatPpi</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> <span class="id" title="var">p</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnat_dvd"><span class="id" title="lemma">pnat_dvd</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> <span class="id" title="var">pi</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnat_div"><span class="id" title="lemma">pnat_div</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> <span class="id" title="var">pi</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#df17451da28eb630dbb51b12706ba39e"><span class="id" title="notation">%/</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnat_coprime"><span class="id" title="lemma">pnat_coprime</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="p'nat_coprime"><span class="id" title="lemma">p'nat_coprime</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="sub_pnat_coprime"><span class="id" title="lemma">sub_pnat_coprime</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">rho</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">subset</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">}</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="coprime_partC"><span class="id" title="lemma">coprime_partC</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">m</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnat_1"><span class="id" title="lemma">pnat_1</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 1.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="part_pnat_id"><span class="id" title="lemma">part_pnat_id</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="part_p'nat"><span class="id" title="lemma">part_p'nat</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 1.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn_eq1"><span class="id" title="lemma">partn_eq1</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="mathcomp.ssreflect.eqtype.html#17d28d004d0863cb022d4ce832ddaaae"><span class="id" title="notation">==</span></a> 1<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pnatP"><span class="id" title="lemma">pnatP</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<span class="id" title="keyword">∀</span> <span class="id" title="var">p</span>, <a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a>) (<a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_pnat"><span class="id" title="lemma">pi_pnat</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="p_natP"><span class="id" title="lemma">p_natP</span></a> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#5b63cb9ed0fed82566685c66e56592e4"><span class="id" title="notation">{</span></a><span class="id" title="var">k</span> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#5b63cb9ed0fed82566685c66e56592e4"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#k"><span class="id" title="variable">k</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Specif.html#5b63cb9ed0fed82566685c66e56592e4"><span class="id" title="notation">}</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi'_p'nat"><span class="id" title="lemma">pi'_p'nat</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">p</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="pi_p'nat"><span class="id" title="lemma">pi_p'nat</span></a> <span class="id" title="var">p</span> <span class="id" title="var">pi</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partn_part"><span class="id" title="lemma">partn_part</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">rho</span> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">{</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">subset</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">≤</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#53295d8f18390300c5a24f66e0bcda98"><span class="id" title="notation">}</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_rho</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="partnI"><span class="id" title="lemma">partnI</span></a> <span class="id" title="var">pi</span> <span class="id" title="var">rho</span> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">[</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">predI</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#pi"><span class="id" title="variable">pi</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">&</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#rho"><span class="id" title="variable">rho</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#bc8da799462dbe647b502e63c7d6c405"><span class="id" title="notation">]</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_rho</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="odd_2'nat"><span class="id" title="lemma">odd_2'nat</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.ssrnat.html#odd"><span class="id" title="definition">odd</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> 2<a class="idref" href="mathcomp.ssreflect.prime.html#233366c70a33ee49ba3eedb41626d66a"><span class="id" title="notation">^'</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">.-</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#8663a77d1d910826e10ba42d1e8d2a02"><span class="id" title="notation">nat</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">End</span> <a class="idref" href="mathcomp.ssreflect.prime.html#PnatTheory"><span class="id" title="section">PnatTheory</span></a>.<br/>
<span class="id" title="keyword">Hint Resolve</span> <span class="id" title="var">part_gt0</span>.<br/>
<br/>
</div>
<div class="doc">
Properties of the divisors list.
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Lemma</span> <a name="divisors_correct"><span class="id" title="lemma">divisors_correct</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a><br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">[/\</span></a> <a class="idref" href="mathcomp.ssreflect.seq.html#uniq"><span class="id" title="definition">uniq</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>)<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">,</span></a> <a class="idref" href="mathcomp.ssreflect.path.html#sorted"><span class="id" title="definition">sorted</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#leq"><span class="id" title="definition">leq</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>)<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">&</span></a> <span class="id" title="keyword">∀</span> <span class="id" title="var">d</span>, <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#962a3cb7af009aedac7986e261646bd1"><span class="id" title="notation">]</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="sorted_divisors"><span class="id" title="lemma">sorted_divisors</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.path.html#sorted"><span class="id" title="definition">sorted</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#leq"><span class="id" title="definition">leq</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="divisors_uniq"><span class="id" title="lemma">divisors_uniq</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.seq.html#uniq"><span class="id" title="definition">uniq</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="sorted_divisors_ltn"><span class="id" title="lemma">sorted_divisors_ltn</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.path.html#sorted"><span class="id" title="definition">sorted</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#ltn"><span class="id" title="definition">ltn</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="dvdn_divisors"><span class="id" title="lemma">dvdn_divisors</span></a> <span class="id" title="var">d</span> <span class="id" title="var">m</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="divisor1"><span class="id" title="lemma">divisor1</span></a> <span class="id" title="var">n</span> : 1 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="divisors_id"><span class="id" title="lemma">divisors_id</span></a> <span class="id" title="var">n</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#divisors"><span class="id" title="definition">divisors</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
</div>
<div class="doc">
Big sum / product lemmas
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Lemma</span> <a name="dvdn_sum"><span class="id" title="lemma">dvdn_sum</span></a> <span class="id" title="var">d</span> <span class="id" title="var">I</span> <span class="id" title="var">r</span> (<span class="id" title="var">K</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#pred"><span class="id" title="definition">pred</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#I"><span class="id" title="variable">I</span></a>) <span class="id" title="var">F</span> :<br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">(</span></a><span class="id" title="keyword">∀</span> <span class="id" title="var">i</span>, <a class="idref" href="mathcomp.ssreflect.prime.html#K"><span class="id" title="variable">K</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#F"><span class="id" title="variable">F</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#ea7e35bae15685d5cd3430a8e48be02b"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#ea7e35bae15685d5cd3430a8e48be02b"><span class="id" title="notation">sum_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#ea7e35bae15685d5cd3430a8e48be02b"><span class="id" title="notation">(</span></a><span class="id" title="var">i</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#ea7e35bae15685d5cd3430a8e48be02b"><span class="id" title="notation"><-</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#r"><span class="id" title="variable">r</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#ea7e35bae15685d5cd3430a8e48be02b"><span class="id" title="notation">|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#K"><span class="id" title="variable">K</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#ea7e35bae15685d5cd3430a8e48be02b"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#F"><span class="id" title="variable">F</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#i"><span class="id" title="variable">i</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="dvdn_partP"><span class="id" title="lemma">dvdn_partP</span></a> <span class="id" title="var">n</span> <span class="id" title="var">m</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a><br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<span class="id" title="keyword">∀</span> <span class="id" title="var">p</span>, <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_p</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>) (<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#aa34fd1c61c5cf0a3356b624a5d2afed"><span class="id" title="notation">%|</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a>).<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="modn_partP"><span class="id" title="lemma">modn_partP</span></a> <span class="id" title="var">n</span> <span class="id" title="var">a</span> <span class="id" title="var">b</span> : 0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a><br/>
<a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#reflect"><span class="id" title="abbreviation">reflect</span></a> (<span class="id" title="keyword">∀</span> <span class="id" title="var">p</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Datatypes.html#nat"><span class="id" title="inductive">nat</span></a>, <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">\</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.ssr.ssrbool.html#46c9e8232fa09401e24f1934bb65029f"><span class="id" title="notation">in</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">pi</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#041d58b37e83f44180445b7edc4ecdfd"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#a"><span class="id" title="variable">a</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#20229f50700a74daa1cbc50e0281abb6"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#b"><span class="id" title="variable">b</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#20229f50700a74daa1cbc50e0281abb6"><span class="id" title="notation">%[</span></a><a class="idref" href="mathcomp.ssreflect.div.html#20229f50700a74daa1cbc50e0281abb6"><span class="id" title="notation">mod</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">`</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#fdd58465d6c6ade4406f2c94baecf8f8"><span class="id" title="notation">_p</span></a><a class="idref" href="mathcomp.ssreflect.div.html#20229f50700a74daa1cbc50e0281abb6"><span class="id" title="notation">]</span></a>) (<a class="idref" href="mathcomp.ssreflect.prime.html#a"><span class="id" title="variable">a</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#29294f431c8c9e3d170b3ccfa621d03f"><span class="id" title="notation">==</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#b"><span class="id" title="variable">b</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#29294f431c8c9e3d170b3ccfa621d03f"><span class="id" title="notation">%[</span></a><a class="idref" href="mathcomp.ssreflect.div.html#29294f431c8c9e3d170b3ccfa621d03f"><span class="id" title="notation">mod</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.div.html#29294f431c8c9e3d170b3ccfa621d03f"><span class="id" title="notation">]</span></a>).<br/>
<br/>
</div>
<div class="doc">
The Euler totient function
</div>
<div class="code">
<br/>
<span class="id" title="keyword">Lemma</span> <a name="totientE"><span class="id" title="lemma">totientE</span></a> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#totient"><span class="id" title="definition">totient</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">prod_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">(</span></a><span class="id" title="var">p</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation"><-</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#primes"><span class="id" title="definition">primes</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">(</span></a><a class="idref" href="mathcomp.ssreflect.prime.html#logn"><span class="id" title="definition">logn</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">).-1</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#17f5e2c8159f7cb8a09e8ff3493701ed"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="totient_gt0"><span class="id" title="lemma">totient_gt0</span></a> <span class="id" title="var">n</span> : <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a>0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#totient"><span class="id" title="definition">totient</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">(</span></a>0 <a class="idref" href="mathcomp.ssreflect.ssrnat.html#989c98e7ddd65d5bf37c334ff2076de8"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">)</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="totient_pfactor"><span class="id" title="lemma">totient_pfactor</span></a> <span class="id" title="var">p</span> <span class="id" title="var">e</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.prime.html#prime"><span class="id" title="definition">prime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#19ab5cfd7e4f60fa14f22b576013bd96"><span class="id" title="notation">></span></a> 0 <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#totient"><span class="id" title="definition">totient</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#p"><span class="id" title="variable">p</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#4c362bcf0e947e2792a2e6989b44aeb0"><span class="id" title="notation">^</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#e"><span class="id" title="variable">e</span></a><a class="idref" href="mathcomp.ssreflect.ssrnat.html#1d63841e595f2805afd872744cbb1cce"><span class="id" title="notation">.-1</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="totient_coprime"><span class="id" title="lemma">totient_coprime</span></a> <span class="id" title="var">m</span> <span class="id" title="var">n</span> :<br/>
<a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#d43e996736952df71ebeeae74d10a287"><span class="id" title="notation">→</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#totient"><span class="id" title="definition">totient</span></a> (<a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>) <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#totient"><span class="id" title="definition">totient</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#m"><span class="id" title="variable">m</span></a> <a class="idref" href="mathcomp.ssreflect.ssrnat.html#697e4695610f677ae98a52af81f779d2"><span class="id" title="notation">×</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#totient"><span class="id" title="definition">totient</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a>.<br/>
<br/>
<span class="id" title="keyword">Lemma</span> <a name="totient_count_coprime"><span class="id" title="lemma">totient_count_coprime</span></a> <span class="id" title="var">n</span> : <a class="idref" href="mathcomp.ssreflect.prime.html#totient"><span class="id" title="definition">totient</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="http://coq.inria.fr/distrib/8.8.0/stdlib//Coq.Init.Logic.html#1c39bf18749e5cc609e83c0a0ba5a372"><span class="id" title="notation">=</span></a> <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">\</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">sum_</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">(</span></a>0 <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">≤</span></a> <span class="id" title="var">d</span> <a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation"><</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a><a class="idref" href="mathcomp.ssreflect.bigop.html#01dc18dd2300d727116181d8b66f2939"><span class="id" title="notation">)</span></a> <a class="idref" href="mathcomp.ssreflect.div.html#coprime"><span class="id" title="definition">coprime</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#n"><span class="id" title="variable">n</span></a> <a class="idref" href="mathcomp.ssreflect.prime.html#d"><span class="id" title="variable">d</span></a>.<br/>
<br/>
</div>
</div>
<div id="footer">
<hr/><a href="index.html">Index</a><hr/>This page has been generated by <a href="http://coq.inria.fr/">coqdoc</a>
</div>
</div>
</body>
</html>
|