projects
/
cfuerst
/
formal-numbers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f925021
)
modified loop invariant for primes
author
Christoph Fuerst
<ch.fuerst@gmx.at>
Tue, 21 Mar 2017 19:17:38 +0000
(20:17 +0100)
committer
Christoph Fuerst
<ch.fuerst@gmx.at>
Tue, 21 Mar 2017 19:17:38 +0000
(20:17 +0100)
numbertheory.txt
patch
|
blob
|
history
diff --git
a/numbertheory.txt
b/numbertheory.txt
index
f83a239
..
e7e2a4e
100644
(file)
--- a/
numbertheory.txt
+++ b/
numbertheory.txt
@@
-46,7
+46,7
@@
proc isprime(p:nat): Bool
if p ≥ 2 then
{
while i < integerroot(p)+1 ∧ res = true do
- invariant 2 ≤ i ∧ i ≤
p
;
+ invariant 2 ≤ i ∧ i ≤
integerroot(p)+1
;
decreases p-i;
{
res = ¬ divides(i,p);