@@ -88,14 +88,6 @@ let decr (#n:pos) (a:int_t n)
8888 ( requires ( b2t ( a > min_int n ))) ( ensures ( fun _ -> True ))
8989 = a - 1
9090
91- val incr_underspec : # n :pos -> a : int_t n -> Pure ( int_t n )
92- ( requires ( b2t ( a < max_int n )))
93- ( ensures ( fun b -> a + 1 = b ))
94-
95- val decr_underspec : # n :pos -> a : int_t n -> Pure ( int_t n )
96- ( requires ( b2t ( a > min_int n )))
97- ( ensures ( fun b -> a - 1 = b ))
98-
9991let incr_mod (# n :pos) ( a : int_t n ) : Tot ( int_t n ) =
10092 ( a + 1 ) % ( pow2 ( n - 1 ))
10193
@@ -109,11 +101,6 @@ let add (#n:pos) (a:int_t n) (b:int_t n)
109101 ( ensures ( fun _ -> True ))
110102 = a + b
111103
112- val add_underspec : # n :pos -> a : int_t n -> b : int_t n -> Pure ( int_t n )
113- ( requires True )
114- ( ensures ( fun c ->
115- size ( a + b ) n ==> a + b = c ))
116-
117104# push - options " --fuel 1"
118105
119106let add_mod (# n :pos) ( a : int_t n ) ( b : int_t n ) : Tot ( int_t n ) =
@@ -126,11 +113,6 @@ let sub (#n:pos) (a:int_t n) (b:int_t n)
126113 ( ensures ( fun _ -> True ))
127114 = a - b
128115
129- val sub_underspec : # n :pos -> a : int_t n -> b : int_t n -> Pure ( int_t n )
130- ( requires True )
131- ( ensures ( fun c ->
132- size ( a - b ) n ==> a - b = c ))
133-
134116let sub_mod (# n :pos) ( a : int_t n ) ( b : int_t n ) : Tot ( int_t n ) =
135117 ( a - b ) @% ( pow2 n )
136118
@@ -141,11 +123,6 @@ let mul (#n:pos) (a:int_t n) (b:int_t n)
141123 ( ensures ( fun _ -> True ))
142124 = a * b
143125
144- val mul_underspec : # n :pos -> a : int_t n -> b : int_t n -> Pure ( int_t n )
145- ( requires True )
146- ( ensures ( fun c ->
147- size ( a * b ) n ==> a * b = c ))
148-
149126let mul_mod (# n :pos) ( a : int_t n ) ( b : int_t n ) : Tot ( int_t n ) =
150127 ( a * b ) @% ( pow2 n )
151128
@@ -158,11 +135,6 @@ let div (#n:pos) (a:int_t n) (b:int_t n{b <> 0})
158135 ( ensures ( fun c -> b <> 0 ==> a /- b = c ))
159136= a /- b
160137
161- val div_underspec : # n :pos -> a : int_t n -> b : int_t n { b <> 0 } -> Pure ( int_t n )
162- ( requires True )
163- ( ensures ( fun c ->
164- ( b <> 0 /\ size ( a /- b ) n ) ==> a /- b = c ))
165-
166138val div_size : # n :pos -> a : int_t n { min_int n < a } -> b : int_t n { b <> 0 } ->
167139 Lemma ( requires ( size a n )) ( ensures ( size ( a / b ) n ))
168140
0 commit comments