Commit a93167a2 by Raphael Rieu-Helft

### Simplify sqrt proof

parent 9bb0a1d1
 ... ... @@ -117,16 +117,9 @@ let sqrt1 (rp: ptr uint64) (a0: uint64): uint64 = from_int ((c+2) * (c+2)) }; let ref s = c * c in assert { (c+1) * (c+1) <= radix so iexp x = -32 so pow2 32 *. x <. pow2 32 so 0 <= Trunc.floor (pow2 32 *. x) < power 2 32 so c < power 2 32 so c+1 <= power 2 32 so (c+1) * (c+1) <= power 2 32 * power 2 32 = radix }; assert { (c+1) * (c+1) <= radix }; assert { s + c <= s + c + c < (c+1) * (c+1) <= radix }; if (s + c + c <= a0 - 1) if (s + 2 * c <= a0 - 1) then begin assert { (c+1) * (c+1) <= a0 }; s <- s + 2 * c + 1; ... ...
 ... ... @@ -27,7 +27,7 @@ ... ... @@ -42,7 +42,7 @@ ... ... @@ -52,24 +52,16 @@ ... ... @@ -141,7 +133,7 @@ ... ... @@ -192,10 +184,10 @@ ... ... @@ -240,7 +232,7 @@ ... ... @@ -273,7 +265,7 @@ ... ... @@ -289,43 +281,7 @@ ... ... @@ -336,10 +292,10 @@ ... ...
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!