@@ -112,7 +112,7 @@ Section __.
112
112
Local Instance no_select_size : no_select_size_opt := no_select_size_of_no_select machine_wordsize.
113
113
Local Instance split_mul_to : split_mul_to_opt := split_mul_to_of_should_split_mul machine_wordsize possible_values.
114
114
Local Instance split_multiret_to : split_multiret_to_opt := split_multiret_to_of_should_split_multiret machine_wordsize possible_values.
115
-
115
+
116
116
(** Note: If you change the name or type signature of this
117
117
function, you will need to update the code in CLI.v *)
118
118
Definition check_args {T} (requests : list string) (res : Pipeline.ErrorT T)
@@ -122,26 +122,25 @@ Section __.
122
122
(fun v => (true, v))
123
123
[(negb (s - c =? 0), Pipeline.Values_not_provably_distinctZ "s - c <> 0" (s - c) 0)
124
124
; (4 <=? n, Pipeline.Value_not_leZ "4 <= n" 3 n)
125
- ; (last_limb_width * n <=? Z.log2_up s, Pipeline.Value_not_leZ "last_limb_width * n <= Z.log2_up s" (last_limb_width * n) (Z.log2_up s))
125
+ ; (last_limb_width * n <=? Z.log2 s, Pipeline.Value_not_leZ "last_limb_width * n <= Z.log2 s" (last_limb_width * n) (Z.log2 s))
126
126
; (1 <=? last_limb_width, Pipeline.Value_not_leZ "1 <= last_limb_width" 1 last_limb_width)
127
127
; (2 ^ (Z.log2 s) =? s, Pipeline.Values_not_provably_equalZ "2 ^ (Z.log2 s) = s" (2 ^ Z.log2 s) s)
128
- ; (Z.log2_up s - last_limb_width <=? (Z.to_nat machine_wordsize) * (n - 1), Pipeline.Value_not_leZ "Z.log2_up s - last_limb_width <= (Z.to_nat machine_wordsize) * (n - 1)" (Z.log2_up s - last_limb_width) (Z.to_nat machine_wordsize * (n - 1)))
129
- ; (Z.log2 s <=? n * (Z.log2_up s - last_limb_width) / (n - 1), Pipeline.Value_not_leZ "Z.log2 s <= n * (Z.log2_up s - last_limb_width) / (n - 1)" (Z.log2 s) (n * (Z.log2_up s - last_limb_width) / (n - 1)))
128
+ ; (Z.log2 s - last_limb_width <=? (Z.to_nat machine_wordsize) * (n - 1), Pipeline.Value_not_leZ "Z.log2 s - last_limb_width <= (Z.to_nat machine_wordsize) * (n - 1)" (Z.log2 s - last_limb_width) (Z.to_nat machine_wordsize * (n - 1)))
129
+ ; (Z.log2 s <=? n * (Z.log2 s - last_limb_width) / (n - 1), Pipeline.Value_not_leZ "Z.log2 s <= n * (Z.log2 s - last_limb_width) / (n - 1)" (Z.log2 s) (n * (Z.log2 s - last_limb_width) / (n - 1)))
130
130
])
131
131
res.
132
132
133
133
Context (requests : list string)
134
134
(curve_good : check_args requests (Success tt) = Success tt).
135
135
136
- (* should probably use limbwidth_num, limbwidth_den to make this less confusing-looking *)
137
136
Lemma use_curve_good
138
137
: s - c <> 0
139
138
/\ (4 <= n)
140
- /\ last_limb_width * n <= Z.log2_up s
139
+ /\ last_limb_width * n <= Z.log2 s
141
140
/\ 1 <= last_limb_width
142
141
/\ 2 ^ (Z.log2 s) = s
143
- /\ Z.log2_up s - last_limb_width <= (Z.to_nat machine_wordsize) * (n - 1)
144
- /\ Z.log2 s <= n * (Z.log2_up s - last_limb_width) / (n - 1).
142
+ /\ Z.log2 s - last_limb_width <= (Z.to_nat machine_wordsize) * (n - 1)
143
+ /\ Z.log2 s <= n * (Z.log2 s - last_limb_width) / (n - 1).
145
144
Proof using curve_good. prepare_use_curve_good (). Qed .
146
145
147
146
Local Notation evalf := (eval weightf n).
@@ -157,7 +156,7 @@ Section __.
157
156
summary
158
157
correctness)
159
158
(only parsing, at level 10, summary at next level, correctness at next level).
160
-
159
+
161
160
Definition mul
162
161
:= Pipeline.BoundsPipeline
163
162
false (* subst01 *)
0 commit comments