summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSon Ho2023-03-07 09:05:45 +0100
committerSon HO2023-06-04 21:44:33 +0200
commitdb8cca3c3177fec2e66634366a6621ca979c0dc9 (patch)
treec84958eb00667700cf628f55aabc5128ca4a55d5
parent73b95970460fb7d8c90e2ea97fa6457d7850af07 (diff)
Update the generation of termination and decreases_by templates for Lean
-rw-r--r--compiler/Extract.ml53
-rw-r--r--compiler/Translate.ml14
-rw-r--r--tests/lean/hashmap/Hashmap/Clauses/Template.lean18
-rw-r--r--tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean18
-rw-r--r--tests/lean/misc/loops/Loops/Clauses/Template.lean38
5 files changed, 76 insertions, 65 deletions
diff --git a/compiler/Extract.ml b/compiler/Extract.ml
index c90d2170..35e5d64c 100644
--- a/compiler/Extract.ml
+++ b/compiler/Extract.ml
@@ -136,19 +136,22 @@ let keywords () =
List.concat [ named_unops; named_binops; misc ]
let assumed_adts () : (assumed_ty * string) list =
- List.map (fun (t, s) ->
- if !backend = Lean then
- t, Printf.sprintf "%c%s" (Char.uppercase_ascii s.[0]) (String.sub s 1 (String.length s - 1))
- else
- t, s
- ) [
- (State, "state");
- (Result, "result");
- (Error, "error");
- (Fuel, "nat");
- (Option, "option");
- (Vec, "vec");
- ]
+ List.map
+ (fun (t, s) ->
+ if !backend = Lean then
+ ( t,
+ Printf.sprintf "%c%s"
+ (Char.uppercase_ascii s.[0])
+ (String.sub s 1 (String.length s - 1)) )
+ else (t, s))
+ [
+ (State, "state");
+ (Result, "result");
+ (Error, "error");
+ (Fuel, "nat");
+ (Option, "option");
+ (Vec, "vec");
+ ]
let assumed_structs : (assumed_ty * string) list = []
@@ -1868,8 +1871,7 @@ and extract_Switch (ctx : extraction_ctx) (fmt : F.formatter) (inside : bool)
(* Open a box for the [if e] *)
F.pp_open_hovbox fmt ctx.indent_incr;
F.pp_print_string fmt "if";
- if !backend = Lean then
- F.pp_print_string fmt " h:";
+ if !backend = Lean then F.pp_print_string fmt " h:";
F.pp_print_space fmt ();
let scrut_inside = PureUtils.texpression_requires_parentheses scrut in
extract_texpression ctx fmt scrut_inside scrut;
@@ -1927,7 +1929,10 @@ and extract_Switch (ctx : extraction_ctx) (fmt : F.formatter) (inside : bool)
F.pp_open_hovbox fmt ctx.indent_incr;
(* Print the [match ... with] *)
let match_begin =
- match !backend with FStar -> "begin match" | Coq -> "match" | Lean -> "match h:"
+ match !backend with
+ | FStar -> "begin match"
+ | Coq -> "match"
+ | Lean -> "match h:"
in
F.pp_print_string fmt match_begin;
F.pp_print_space fmt ();
@@ -2059,9 +2064,9 @@ let assert_backend_supports_decreases_clauses () =
| FStar | Lean -> ()
| _ -> failwith "decreases clauses only supported for the Lean & F* backends"
-(** Extract a decrease clause function template body.
+(** Extract a decreases clause function template body.
- Only for F*.
+ For F* only.
In order to help the user, we can generate a template for the functions
required by the decreases clauses for. We simply generate definitions of
@@ -2075,8 +2080,8 @@ let assert_backend_supports_decreases_clauses () =
let f_fwd (t : Type0) (x : t) : Tot ... (decreases (f_decrease t x)) = ...
]}
*)
-let extract_template_decreases_clause (ctx : extraction_ctx) (fmt : F.formatter)
- (def : fun_decl) : unit =
+let extract_template_fstar_decreases_clause (ctx : extraction_ctx)
+ (fmt : F.formatter) (def : fun_decl) : unit =
assert (!backend = FStar);
(* Retrieve the function name *)
@@ -2123,7 +2128,7 @@ let extract_template_decreases_clause (ctx : extraction_ctx) (fmt : F.formatter)
(* Add breaks to insert new lines between definitions *)
F.pp_print_break fmt 0 0
-(** Extract templates for the termination_by and decreases_by clauses of a
+(** Extract templates for the [termination_by] and [decreases_by] clauses of a
recursive function definition.
For Lean only.
@@ -2134,7 +2139,7 @@ let extract_template_decreases_clause (ctx : extraction_ctx) (fmt : F.formatter)
defines a proof script (allowed to refer to function arguments) that proves
termination.
*)
-let extract_termination_and_decreasing (ctx : extraction_ctx)
+let extract_template_lean_termination_and_decreasing (ctx : extraction_ctx)
(fmt : F.formatter) (def : fun_decl) : unit =
assert (!backend = Lean);
@@ -2196,12 +2201,14 @@ let extract_termination_and_decreasing (ctx : extraction_ctx)
let def_name = ctx_get_decreases_clause def.def_id def.loop_id ctx in
(* syntax <def_name> term ... term : tactic *)
F.pp_print_break fmt 0 0;
+ extract_comment fmt
+ ("[" ^ Print.fun_name_to_string def.basename ^ "]: decreases_by tactic");
+ F.pp_print_space fmt ();
F.pp_open_hvbox fmt 0;
F.pp_print_string fmt "syntax \"";
F.pp_print_string fmt def_name;
F.pp_print_string fmt "\" term+ : tactic";
F.pp_print_break fmt 0 0;
- F.pp_print_break fmt 0 0;
(* macro_rules | `(tactic| fact_termination_proof $x) => `(tactic| ( *)
F.pp_print_string fmt "macro_rules";
F.pp_print_space fmt ();
diff --git a/compiler/Translate.ml b/compiler/Translate.ml
index 3a75c885..b2cab4c2 100644
--- a/compiler/Translate.ml
+++ b/compiler/Translate.ml
@@ -562,11 +562,15 @@ let export_functions_group (fmt : Format.formatter) (config : gen_config)
let extract_decrease decl =
let has_decr_clause = has_decreases_clause decl in
if has_decr_clause then
- if !Config.backend = Lean then
- Extract.extract_termination_and_decreasing ctx.extract_ctx fmt
- decl
- else
- Extract.extract_template_decreases_clause ctx.extract_ctx fmt decl
+ match !Config.backend with
+ | Lean ->
+ Extract.extract_template_lean_termination_and_decreasing
+ ctx.extract_ctx fmt decl
+ | FStar ->
+ Extract.extract_template_fstar_decreases_clause ctx.extract_ctx
+ fmt decl
+ | Coq ->
+ raise (Failure "Coq doesn't have decreases/termination clauses")
in
extract_decrease fwd;
List.iter extract_decrease loop_fwds)
diff --git a/tests/lean/hashmap/Hashmap/Clauses/Template.lean b/tests/lean/hashmap/Hashmap/Clauses/Template.lean
index b767a0eb..7ba079f2 100644
--- a/tests/lean/hashmap/Hashmap/Clauses/Template.lean
+++ b/tests/lean/hashmap/Hashmap/Clauses/Template.lean
@@ -9,8 +9,8 @@ def hash_map_allocate_slots_loop_terminates (T : Type) (slots : Vec (list_t T))
(n : USize) :=
(slots, n)
+/- [hashmap::HashMap::{0}::allocate_slots]: decreases_by tactic -/
syntax "hash_map_allocate_slots_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_allocate_slots_loop_decreases $slots $n) =>`(tactic| sorry)
@@ -20,8 +20,8 @@ def hash_map_clear_loop_terminates (T : Type) (slots : Vec (list_t T))
(i : USize) :=
(slots, i)
+/- [hashmap::HashMap::{0}::clear]: decreases_by tactic -/
syntax "hash_map_clear_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_clear_loop_decreases $slots $i) =>`(tactic| sorry)
@@ -31,8 +31,8 @@ def hash_map_insert_in_list_loop_terminates (T : Type) (key : USize)
(value : T) (ls : list_t T) :=
(key, value, ls)
+/- [hashmap::HashMap::{0}::insert_in_list]: decreases_by tactic -/
syntax "hash_map_insert_in_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_insert_in_list_loop_decreases $key $value $ls) =>
`(tactic| sorry)
@@ -43,8 +43,8 @@ def hash_map_move_elements_from_list_loop_terminates (T : Type)
(ntable : hash_map_t T) (ls : list_t T) :=
(ntable, ls)
+/- [hashmap::HashMap::{0}::move_elements_from_list]: decreases_by tactic -/
syntax "hash_map_move_elements_from_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_move_elements_from_list_loop_decreases $ntable $ls) =>
`(tactic| sorry)
@@ -55,8 +55,8 @@ def hash_map_move_elements_loop_terminates (T : Type) (ntable : hash_map_t T)
(slots : Vec (list_t T)) (i : USize) :=
(ntable, slots, i)
+/- [hashmap::HashMap::{0}::move_elements]: decreases_by tactic -/
syntax "hash_map_move_elements_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_move_elements_loop_decreases $ntable $slots $i) =>
`(tactic| sorry)
@@ -67,8 +67,8 @@ def hash_map_contains_key_in_list_loop_terminates (T : Type) (key : USize)
(ls : list_t T) :=
(key, ls)
+/- [hashmap::HashMap::{0}::contains_key_in_list]: decreases_by tactic -/
syntax "hash_map_contains_key_in_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_contains_key_in_list_loop_decreases $key $ls) =>
`(tactic| sorry)
@@ -79,8 +79,8 @@ def hash_map_get_in_list_loop_terminates (T : Type) (key : USize)
(ls : list_t T) :=
(key, ls)
+/- [hashmap::HashMap::{0}::get_in_list]: decreases_by tactic -/
syntax "hash_map_get_in_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_get_in_list_loop_decreases $key $ls) =>`(tactic| sorry)
@@ -90,8 +90,8 @@ def hash_map_get_mut_in_list_loop_terminates (T : Type) (ls : list_t T)
(key : USize) :=
(ls, key)
+/- [hashmap::HashMap::{0}::get_mut_in_list]: decreases_by tactic -/
syntax "hash_map_get_mut_in_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_get_mut_in_list_loop_decreases $ls $key) =>`(tactic| sorry)
@@ -101,8 +101,8 @@ def hash_map_remove_from_list_loop_terminates (T : Type) (key : USize)
(ls : list_t T) :=
(key, ls)
+/- [hashmap::HashMap::{0}::remove_from_list]: decreases_by tactic -/
syntax "hash_map_remove_from_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hash_map_remove_from_list_loop_decreases $key $ls) =>`(tactic| sorry)
diff --git a/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean b/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean
index e64419a6..753c92ac 100644
--- a/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean
+++ b/tests/lean/hashmap_on_disk/HashmapMain/Clauses/Template.lean
@@ -9,8 +9,8 @@ def hashmap_hash_map_allocate_slots_loop_terminates (T : Type)
(slots : Vec (hashmap_list_t T)) (n : USize) :=
(slots, n)
+/- [hashmap_main::hashmap::HashMap::{0}::allocate_slots]: decreases_by tactic -/
syntax "hashmap_hash_map_allocate_slots_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_allocate_slots_loop_decreases $slots $n) =>
`(tactic| sorry)
@@ -21,8 +21,8 @@ def hashmap_hash_map_clear_loop_terminates (T : Type)
(slots : Vec (hashmap_list_t T)) (i : USize) :=
(slots, i)
+/- [hashmap_main::hashmap::HashMap::{0}::clear]: decreases_by tactic -/
syntax "hashmap_hash_map_clear_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_clear_loop_decreases $slots $i) =>`(tactic| sorry)
@@ -32,8 +32,8 @@ def hashmap_hash_map_insert_in_list_loop_terminates (T : Type) (key : USize)
(value : T) (ls : hashmap_list_t T) :=
(key, value, ls)
+/- [hashmap_main::hashmap::HashMap::{0}::insert_in_list]: decreases_by tactic -/
syntax "hashmap_hash_map_insert_in_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_insert_in_list_loop_decreases $key $value $ls) =>
`(tactic| sorry)
@@ -44,8 +44,8 @@ def hashmap_hash_map_move_elements_from_list_loop_terminates (T : Type)
(ntable : hashmap_hash_map_t T) (ls : hashmap_list_t T) :=
(ntable, ls)
+/- [hashmap_main::hashmap::HashMap::{0}::move_elements_from_list]: decreases_by tactic -/
syntax "hashmap_hash_map_move_elements_from_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_move_elements_from_list_loop_decreases $ntable
$ls) =>`(tactic| sorry)
@@ -57,8 +57,8 @@ def hashmap_hash_map_move_elements_loop_terminates (T : Type)
:=
(ntable, slots, i)
+/- [hashmap_main::hashmap::HashMap::{0}::move_elements]: decreases_by tactic -/
syntax "hashmap_hash_map_move_elements_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_move_elements_loop_decreases $ntable $slots $i) =>
`(tactic| sorry)
@@ -69,8 +69,8 @@ def hashmap_hash_map_contains_key_in_list_loop_terminates (T : Type)
(key : USize) (ls : hashmap_list_t T) :=
(key, ls)
+/- [hashmap_main::hashmap::HashMap::{0}::contains_key_in_list]: decreases_by tactic -/
syntax "hashmap_hash_map_contains_key_in_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_contains_key_in_list_loop_decreases $key $ls) =>
`(tactic| sorry)
@@ -81,8 +81,8 @@ def hashmap_hash_map_get_in_list_loop_terminates (T : Type) (key : USize)
(ls : hashmap_list_t T) :=
(key, ls)
+/- [hashmap_main::hashmap::HashMap::{0}::get_in_list]: decreases_by tactic -/
syntax "hashmap_hash_map_get_in_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_get_in_list_loop_decreases $key $ls) =>`(tactic| sorry)
@@ -92,8 +92,8 @@ def hashmap_hash_map_get_mut_in_list_loop_terminates (T : Type)
(ls : hashmap_list_t T) (key : USize) :=
(ls, key)
+/- [hashmap_main::hashmap::HashMap::{0}::get_mut_in_list]: decreases_by tactic -/
syntax "hashmap_hash_map_get_mut_in_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_get_mut_in_list_loop_decreases $ls $key) =>
`(tactic| sorry)
@@ -104,8 +104,8 @@ def hashmap_hash_map_remove_from_list_loop_terminates (T : Type) (key : USize)
(ls : hashmap_list_t T) :=
(key, ls)
+/- [hashmap_main::hashmap::HashMap::{0}::remove_from_list]: decreases_by tactic -/
syntax "hashmap_hash_map_remove_from_list_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| hashmap_hash_map_remove_from_list_loop_decreases $key $ls) =>
`(tactic| sorry)
diff --git a/tests/lean/misc/loops/Loops/Clauses/Template.lean b/tests/lean/misc/loops/Loops/Clauses/Template.lean
index d74f71e1..d1e72d65 100644
--- a/tests/lean/misc/loops/Loops/Clauses/Template.lean
+++ b/tests/lean/misc/loops/Loops/Clauses/Template.lean
@@ -7,8 +7,8 @@ import Loops.Types
@[simp]
def sum_loop_terminates (max : UInt32) (i : UInt32) (s : UInt32) := (max, i, s)
+/- [loops::sum]: decreases_by tactic -/
syntax "sum_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| sum_loop_decreases $max $i $s) =>`(tactic| sorry)
@@ -18,8 +18,8 @@ def sum_with_mut_borrows_loop_terminates (max : UInt32) (mi : UInt32)
(ms : UInt32) :=
(max, mi, ms)
+/- [loops::sum_with_mut_borrows]: decreases_by tactic -/
syntax "sum_with_mut_borrows_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| sum_with_mut_borrows_loop_decreases $max $mi $ms) =>`(tactic| sorry)
@@ -29,16 +29,16 @@ def sum_with_shared_borrows_loop_terminates (max : UInt32) (i : UInt32)
(s : UInt32) :=
(max, i, s)
+/- [loops::sum_with_shared_borrows]: decreases_by tactic -/
syntax "sum_with_shared_borrows_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| sum_with_shared_borrows_loop_decreases $max $i $s) =>`(tactic| sorry)
/- [loops::clear]: termination measure -/
@[simp] def clear_loop_terminates (v : Vec UInt32) (i : USize) := (v, i)
+/- [loops::clear]: decreases_by tactic -/
syntax "clear_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| clear_loop_decreases $v $i) =>`(tactic| sorry)
@@ -46,8 +46,8 @@ macro_rules
@[simp]
def list_mem_loop_terminates (x : UInt32) (ls : list_t UInt32) := (x, ls)
+/- [loops::list_mem]: decreases_by tactic -/
syntax "list_mem_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_mem_loop_decreases $x $ls) =>`(tactic| sorry)
@@ -57,8 +57,8 @@ def list_nth_mut_loop_loop_terminates (T : Type) (ls : list_t T) (i : UInt32)
:=
(ls, i)
+/- [loops::list_nth_mut_loop]: decreases_by tactic -/
syntax "list_nth_mut_loop_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_mut_loop_loop_decreases $ls $i) =>`(tactic| sorry)
@@ -68,8 +68,8 @@ def list_nth_shared_loop_loop_terminates (T : Type) (ls : list_t T)
(i : UInt32) :=
(ls, i)
+/- [loops::list_nth_shared_loop]: decreases_by tactic -/
syntax "list_nth_shared_loop_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_shared_loop_loop_decreases $ls $i) =>`(tactic| sorry)
@@ -77,8 +77,8 @@ macro_rules
@[simp]
def get_elem_mut_loop_terminates (x : USize) (ls : list_t USize) := (x, ls)
+/- [loops::get_elem_mut]: decreases_by tactic -/
syntax "get_elem_mut_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| get_elem_mut_loop_decreases $x $ls) =>`(tactic| sorry)
@@ -86,8 +86,8 @@ macro_rules
@[simp]
def get_elem_shared_loop_terminates (x : USize) (ls : list_t USize) := (x, ls)
+/- [loops::get_elem_shared]: decreases_by tactic -/
syntax "get_elem_shared_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| get_elem_shared_loop_decreases $x $ls) =>`(tactic| sorry)
@@ -97,8 +97,8 @@ def list_nth_mut_loop_with_id_loop_terminates (T : Type) (i : UInt32)
(ls : list_t T) :=
(i, ls)
+/- [loops::list_nth_mut_loop_with_id]: decreases_by tactic -/
syntax "list_nth_mut_loop_with_id_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_mut_loop_with_id_loop_decreases $i $ls) =>`(tactic| sorry)
@@ -108,8 +108,8 @@ def list_nth_shared_loop_with_id_loop_terminates (T : Type) (i : UInt32)
(ls : list_t T) :=
(i, ls)
+/- [loops::list_nth_shared_loop_with_id]: decreases_by tactic -/
syntax "list_nth_shared_loop_with_id_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_shared_loop_with_id_loop_decreases $i $ls) =>`(tactic| sorry)
@@ -119,8 +119,8 @@ def list_nth_mut_loop_pair_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : UInt32) :=
(ls0, ls1, i)
+/- [loops::list_nth_mut_loop_pair]: decreases_by tactic -/
syntax "list_nth_mut_loop_pair_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_mut_loop_pair_loop_decreases $ls0 $ls1 $i) =>`(tactic| sorry)
@@ -130,8 +130,8 @@ def list_nth_shared_loop_pair_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : UInt32) :=
(ls0, ls1, i)
+/- [loops::list_nth_shared_loop_pair]: decreases_by tactic -/
syntax "list_nth_shared_loop_pair_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_shared_loop_pair_loop_decreases $ls0 $ls1 $i) =>
`(tactic| sorry)
@@ -142,8 +142,8 @@ def list_nth_mut_loop_pair_merge_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : UInt32) :=
(ls0, ls1, i)
+/- [loops::list_nth_mut_loop_pair_merge]: decreases_by tactic -/
syntax "list_nth_mut_loop_pair_merge_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_mut_loop_pair_merge_loop_decreases $ls0 $ls1 $i) =>
`(tactic| sorry)
@@ -154,8 +154,8 @@ def list_nth_shared_loop_pair_merge_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : UInt32) :=
(ls0, ls1, i)
+/- [loops::list_nth_shared_loop_pair_merge]: decreases_by tactic -/
syntax "list_nth_shared_loop_pair_merge_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_shared_loop_pair_merge_loop_decreases $ls0 $ls1 $i) =>
`(tactic| sorry)
@@ -166,8 +166,8 @@ def list_nth_mut_shared_loop_pair_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : UInt32) :=
(ls0, ls1, i)
+/- [loops::list_nth_mut_shared_loop_pair]: decreases_by tactic -/
syntax "list_nth_mut_shared_loop_pair_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_mut_shared_loop_pair_loop_decreases $ls0 $ls1 $i) =>
`(tactic| sorry)
@@ -178,8 +178,8 @@ def list_nth_mut_shared_loop_pair_merge_loop_terminates (T : Type)
(ls0 : list_t T) (ls1 : list_t T) (i : UInt32) :=
(ls0, ls1, i)
+/- [loops::list_nth_mut_shared_loop_pair_merge]: decreases_by tactic -/
syntax "list_nth_mut_shared_loop_pair_merge_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_mut_shared_loop_pair_merge_loop_decreases $ls0 $ls1 $i) =>
`(tactic| sorry)
@@ -190,8 +190,8 @@ def list_nth_shared_mut_loop_pair_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : UInt32) :=
(ls0, ls1, i)
+/- [loops::list_nth_shared_mut_loop_pair]: decreases_by tactic -/
syntax "list_nth_shared_mut_loop_pair_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_shared_mut_loop_pair_loop_decreases $ls0 $ls1 $i) =>
`(tactic| sorry)
@@ -202,8 +202,8 @@ def list_nth_shared_mut_loop_pair_merge_loop_terminates (T : Type)
(ls0 : list_t T) (ls1 : list_t T) (i : UInt32) :=
(ls0, ls1, i)
+/- [loops::list_nth_shared_mut_loop_pair_merge]: decreases_by tactic -/
syntax "list_nth_shared_mut_loop_pair_merge_loop_decreases" term+ : tactic
-
macro_rules
| `(tactic| list_nth_shared_mut_loop_pair_merge_loop_decreases $ls0 $ls1 $i) =>
`(tactic| sorry)