diff options
author | Son Ho | 2023-03-07 09:05:45 +0100 |
---|---|---|
committer | Son HO | 2023-06-04 21:44:33 +0200 |
commit | db8cca3c3177fec2e66634366a6621ca979c0dc9 (patch) | |
tree | c84958eb00667700cf628f55aabc5128ca4a55d5 /tests/lean/misc/loops | |
parent | 73b95970460fb7d8c90e2ea97fa6457d7850af07 (diff) |
Update the generation of termination and decreases_by templates for Lean
Diffstat (limited to 'tests/lean/misc/loops')
-rw-r--r-- | tests/lean/misc/loops/Loops/Clauses/Template.lean | 38 |
1 files changed, 19 insertions, 19 deletions
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) |