1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
|
-- THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS
-- [loops]: templates for the decreases clauses
import Base.Primitives
import Loops.Types
/- [loops::sum]: termination measure -/
@[simp] def sum_loop_terminates (max : U32) (i : U32) (s : U32) := (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)
/- [loops::sum_with_mut_borrows]: termination measure -/
@[simp]
def sum_with_mut_borrows_loop_terminates (max : U32) (mi : U32) (ms : U32) :=
(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)
/- [loops::sum_with_shared_borrows]: termination measure -/
@[simp]
def sum_with_shared_borrows_loop_terminates (max : U32) (i : U32) (s : U32) :=
(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 U32) (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)
/- [loops::list_mem]: termination measure -/
@[simp] def list_mem_loop_terminates (x : U32) (ls : list_t U32) := (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)
/- [loops::list_nth_mut_loop]: termination measure -/
@[simp]
def list_nth_mut_loop_loop_terminates (T : Type) (ls : list_t T) (i : U32) :=
(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)
/- [loops::list_nth_shared_loop]: termination measure -/
@[simp]
def list_nth_shared_loop_loop_terminates (T : Type) (ls : list_t T) (i : U32)
:=
(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)
/- [loops::get_elem_mut]: termination measure -/
@[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)
/- [loops::get_elem_shared]: termination measure -/
@[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)
/- [loops::list_nth_mut_loop_with_id]: termination measure -/
@[simp]
def list_nth_mut_loop_with_id_loop_terminates (T : Type) (i : U32)
(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)
/- [loops::list_nth_shared_loop_with_id]: termination measure -/
@[simp]
def list_nth_shared_loop_with_id_loop_terminates (T : Type) (i : U32)
(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)
/- [loops::list_nth_mut_loop_pair]: termination measure -/
@[simp]
def list_nth_mut_loop_pair_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : U32) :=
(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)
/- [loops::list_nth_shared_loop_pair]: termination measure -/
@[simp]
def list_nth_shared_loop_pair_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : U32) :=
(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)
/- [loops::list_nth_mut_loop_pair_merge]: termination measure -/
@[simp]
def list_nth_mut_loop_pair_merge_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : U32) :=
(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)
/- [loops::list_nth_shared_loop_pair_merge]: termination measure -/
@[simp]
def list_nth_shared_loop_pair_merge_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : U32) :=
(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)
/- [loops::list_nth_mut_shared_loop_pair]: termination measure -/
@[simp]
def list_nth_mut_shared_loop_pair_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : U32) :=
(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)
/- [loops::list_nth_mut_shared_loop_pair_merge]: termination measure -/
@[simp]
def list_nth_mut_shared_loop_pair_merge_loop_terminates (T : Type)
(ls0 : list_t T) (ls1 : list_t T) (i : U32) :=
(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)
/- [loops::list_nth_shared_mut_loop_pair]: termination measure -/
@[simp]
def list_nth_shared_mut_loop_pair_loop_terminates (T : Type) (ls0 : list_t T)
(ls1 : list_t T) (i : U32) :=
(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)
/- [loops::list_nth_shared_mut_loop_pair_merge]: termination measure -/
@[simp]
def list_nth_shared_mut_loop_pair_merge_loop_terminates (T : Type)
(ls0 : list_t T) (ls1 : list_t T) (i : U32) :=
(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)
|