summaryrefslogtreecommitdiff
path: root/tests/lean/betree/BetreeMain/Clauses/Template.lean
blob: 1d18174eabb1185e603ed8f997a271be1bb5f318 (plain)
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
-- THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS
-- [betree_main]: templates for the decreases clauses
import Base.Primitives
import BetreeMain.Types

/- [betree_main::betree::List::{1}::len]: termination measure -/
@[simp]
def betree_list_len_terminates (T : Type) (self : betree_list_t T) := self

/- [betree_main::betree::List::{1}::len]: decreases_by tactic -/
syntax "betree_list_len_decreases" term+ : tactic
macro_rules
| `(tactic| betree_list_len_decreases $self) =>`(tactic| sorry)

/- [betree_main::betree::List::{1}::split_at]: termination measure -/
@[simp]
def betree_list_split_at_terminates (T : Type) (self : betree_list_t T)
  (n : UInt64) :=
  (self, n)

/- [betree_main::betree::List::{1}::split_at]: decreases_by tactic -/
syntax "betree_list_split_at_decreases" term+ : tactic
macro_rules
| `(tactic| betree_list_split_at_decreases $self $n) =>`(tactic| sorry)

/- [betree_main::betree::List::{2}::partition_at_pivot]: termination measure -/
@[simp]
def betree_list_partition_at_pivot_terminates (T : Type)
  (self : betree_list_t (UInt64 × T)) (pivot : UInt64) :=
  (self, pivot)

/- [betree_main::betree::List::{2}::partition_at_pivot]: decreases_by tactic -/
syntax "betree_list_partition_at_pivot_decreases" term+ : tactic
macro_rules
| `(tactic| betree_list_partition_at_pivot_decreases $self $pivot) =>
  `(tactic| sorry)

/- [betree_main::betree::Node::{5}::lookup_in_bindings]: termination measure -/
@[simp]
def betree_node_lookup_in_bindings_terminates (key : UInt64)
  (bindings : betree_list_t (UInt64 × UInt64)) :=
  (key, bindings)

/- [betree_main::betree::Node::{5}::lookup_in_bindings]: decreases_by tactic -/
syntax "betree_node_lookup_in_bindings_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_lookup_in_bindings_decreases $key $bindings) =>
  `(tactic| sorry)

/- [betree_main::betree::Node::{5}::lookup_first_message_for_key]: termination measure -/
@[simp]
def betree_node_lookup_first_message_for_key_terminates (key : UInt64)
  (msgs : betree_list_t (UInt64 × betree_message_t)) :=
  (key, msgs)

/- [betree_main::betree::Node::{5}::lookup_first_message_for_key]: decreases_by tactic -/
syntax "betree_node_lookup_first_message_for_key_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_lookup_first_message_for_key_decreases $key $msgs) =>
  `(tactic| sorry)

/- [betree_main::betree::Node::{5}::apply_upserts]: termination measure -/
@[simp]
def betree_node_apply_upserts_terminates
  (msgs : betree_list_t (UInt64 × betree_message_t)) (prev : Option UInt64)
  (key : UInt64) (st : State) :=
  (msgs, prev, key, st)

/- [betree_main::betree::Node::{5}::apply_upserts]: decreases_by tactic -/
syntax "betree_node_apply_upserts_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_apply_upserts_decreases $msgs $prev $key $st) =>
  `(tactic| sorry)

/- [betree_main::betree::Node::{5}::lookup]: termination measure -/
@[simp]
def betree_node_lookup_terminates (self : betree_node_t) (key : UInt64)
  (st : State) :=
  (self, key, st)

/- [betree_main::betree::Node::{5}::lookup]: decreases_by tactic -/
syntax "betree_node_lookup_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_lookup_decreases $self $key $st) =>`(tactic| sorry)

/- [betree_main::betree::Internal::{4}::lookup_in_children]: termination measure -/
@[simp]
def betree_internal_lookup_in_children_terminates (self : betree_internal_t)
  (key : UInt64) (st : State) :=
  (self, key, st)

/- [betree_main::betree::Internal::{4}::lookup_in_children]: decreases_by tactic -/
syntax "betree_internal_lookup_in_children_decreases" term+ : tactic
macro_rules
| `(tactic| betree_internal_lookup_in_children_decreases $self $key $st) =>
  `(tactic| sorry)

/- [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: termination measure -/
@[simp]
def betree_node_lookup_mut_in_bindings_terminates (key : UInt64)
  (bindings : betree_list_t (UInt64 × UInt64)) :=
  (key, bindings)

/- [betree_main::betree::Node::{5}::lookup_mut_in_bindings]: decreases_by tactic -/
syntax "betree_node_lookup_mut_in_bindings_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_lookup_mut_in_bindings_decreases $key $bindings) =>
  `(tactic| sorry)

/- [betree_main::betree::Node::{5}::apply_messages_to_leaf]: termination measure -/
@[simp]
def betree_node_apply_messages_to_leaf_terminates
  (bindings : betree_list_t (UInt64 × UInt64))
  (new_msgs : betree_list_t (UInt64 × betree_message_t)) :=
  (bindings, new_msgs)

/- [betree_main::betree::Node::{5}::apply_messages_to_leaf]: decreases_by tactic -/
syntax "betree_node_apply_messages_to_leaf_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_apply_messages_to_leaf_decreases $bindings
$new_msgs) =>`(tactic| sorry)

/- [betree_main::betree::Node::{5}::filter_messages_for_key]: termination measure -/
@[simp]
def betree_node_filter_messages_for_key_terminates (key : UInt64)
  (msgs : betree_list_t (UInt64 × betree_message_t)) :=
  (key, msgs)

/- [betree_main::betree::Node::{5}::filter_messages_for_key]: decreases_by tactic -/
syntax "betree_node_filter_messages_for_key_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_filter_messages_for_key_decreases $key $msgs) =>
  `(tactic| sorry)

/- [betree_main::betree::Node::{5}::lookup_first_message_after_key]: termination measure -/
@[simp]
def betree_node_lookup_first_message_after_key_terminates (key : UInt64)
  (msgs : betree_list_t (UInt64 × betree_message_t)) :=
  (key, msgs)

/- [betree_main::betree::Node::{5}::lookup_first_message_after_key]: decreases_by tactic -/
syntax "betree_node_lookup_first_message_after_key_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_lookup_first_message_after_key_decreases $key $msgs) =>
  `(tactic| sorry)

/- [betree_main::betree::Node::{5}::apply_messages_to_internal]: termination measure -/
@[simp]
def betree_node_apply_messages_to_internal_terminates
  (msgs : betree_list_t (UInt64 × betree_message_t))
  (new_msgs : betree_list_t (UInt64 × betree_message_t)) :=
  (msgs, new_msgs)

/- [betree_main::betree::Node::{5}::apply_messages_to_internal]: decreases_by tactic -/
syntax "betree_node_apply_messages_to_internal_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_apply_messages_to_internal_decreases $msgs
$new_msgs) =>`(tactic| sorry)

/- [betree_main::betree::Node::{5}::apply_messages]: termination measure -/
@[simp]
def betree_node_apply_messages_terminates (self : betree_node_t)
  (params : betree_params_t) (node_id_cnt : betree_node_id_counter_t)
  (msgs : betree_list_t (UInt64 × betree_message_t)) (st : State) :=
  (self, params, node_id_cnt, msgs, st)

/- [betree_main::betree::Node::{5}::apply_messages]: decreases_by tactic -/
syntax "betree_node_apply_messages_decreases" term+ : tactic
macro_rules
| `(tactic| betree_node_apply_messages_decreases $self $params $node_id_cnt
$msgs $st) =>`(tactic| sorry)

/- [betree_main::betree::Internal::{4}::flush]: termination measure -/
@[simp]
def betree_internal_flush_terminates (self : betree_internal_t)
  (params : betree_params_t) (node_id_cnt : betree_node_id_counter_t)
  (content : betree_list_t (UInt64 × betree_message_t)) (st : State) :=
  (self, params, node_id_cnt, content, st)

/- [betree_main::betree::Internal::{4}::flush]: decreases_by tactic -/
syntax "betree_internal_flush_decreases" term+ : tactic
macro_rules
| `(tactic| betree_internal_flush_decreases $self $params $node_id_cnt $content
$st) =>`(tactic| sorry)