summaryrefslogtreecommitdiff
path: root/tests/fstar/misc/Loops.Clauses.fst
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/fstar/misc/Loops.Clauses.fst4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/fstar/misc/Loops.Clauses.fst b/tests/fstar/misc/Loops.Clauses.fst
index e09eda9a..2087f2e7 100644
--- a/tests/fstar/misc/Loops.Clauses.fst
+++ b/tests/fstar/misc/Loops.Clauses.fst
@@ -5,6 +5,10 @@ open Loops.Types
#set-options "--z3rlimit 50 --fuel 1 --ifuel 1"
+(** [loops::sum]: decreases clause *)
+unfold let sum_decreases (max : u32) (i : u32) (s : u32) : nat =
+ if i <= max then max - i else 0
+
(** [loops::list_nth_mut_loop]: decreases clause *)
unfold
let list_nth_mut_loop_decreases (t : Type0) (ls : list_t t) (i : u32) : nat =