Skip to content

Commit c00a373

Browse files
committed
Remove list_max for #1122 in examples
1 parent bbdadb9 commit c00a373

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

examples/lpr_checker/array/lpr_arrayProgScript.sml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ QED
11201120

11211121
val _ = translate safe_hd_def;
11221122

1123-
val _ = translate list_max_def;
1123+
val _ = translate MAX_LIST_def;
11241124
val _ = translate list_max_index_def;
11251125

11261126
(* bump up the length to a large number *)
@@ -1406,7 +1406,9 @@ Theorem list_max_index_bounded_clause:
14061406
EVERY ($> n o index) l ∧ EVERY ($> n o index o $~) l
14071407
Proof
14081408
simp[list_max_index_def]>>
1409-
Induct>>rw[list_max_def,index_def]>>
1409+
Induct>>rw[] >>
1410+
fs[MAX_LIST_def,MAX_DEF,index_def]>>
1411+
rw[] >>
14101412
intLib.ARITH_TAC
14111413
QED
14121414

@@ -1440,8 +1442,8 @@ Theorem EVERY_index_resize_Clist:
14401442
Proof
14411443
rw[]>>
14421444
simp[resize_Clist_def,list_max_index_def]>>
1443-
qmatch_goalsub_abbrev_tac`list_max lss`>>
1444-
qspec_then `lss` assume_tac list_max_max>>
1445+
qmatch_goalsub_abbrev_tac`MAX_LIST lss`>>
1446+
qspec_then `lss` assume_tac MAX_LIST_PROPERTY>>
14451447
fs[EVERY_MEM,Abbr`lss`,MEM_MAP,PULL_EXISTS]>>
14461448
ntac 2 strip_tac>>first_x_assum drule>>
14471449
rw[]>>simp[index_def]>>rw[]>>

examples/lpr_checker/array/lpr_listScript.sml

+2-1
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,9 @@ Definition safe_hd_def:
302302
safe_hd ls = case ls of [] => (0:int) | (x::xs) => x
303303
End
304304

305+
(*Might want to rename to MAX_LIST_index*)
305306
Definition list_max_index_def:
306-
list_max_index C = 2*list_max (MAP (λc. Num (ABS c)) C) + 1
307+
list_max_index C = 2*MAX_LIST (MAP (λc. Num (ABS c)) C) + 1
307308
End
308309

309310
(* bump up the length to a large number *)

examples/xlrup_checker/array/xlrup_arrayProgScript.sml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ Proof
12631263
simp[LIST_REL_REPLICATE_same,OPTION_TYPE_def]
12641264
QED
12651265

1266-
val _ = translate list_max_def;
1266+
val _ = translate MAX_LIST_def;
12671267
val _ = translate list_max_index_def;
12681268

12691269
(* bump up the length to a large number *)
@@ -1738,8 +1738,10 @@ Theorem list_max_index_bounded_clause:
17381738
EVERY ($> n o index) l ∧ EVERY ($> n o index o $~) l
17391739
Proof
17401740
simp[list_max_index_def]>>
1741-
Induct>>rw[list_max_def,index_def]>>
1742-
intLib.ARITH_TAC
1741+
Induct>>rw[] >>
1742+
fs[MAX_LIST_def,MAX_DEF,index_def]>>
1743+
rw[] >>
1744+
intLib.COOPER_TAC
17431745
QED
17441746

17451747
Theorem bounded_cfml_update_resize:
@@ -1772,8 +1774,8 @@ Theorem EVERY_index_resize_Clist:
17721774
Proof
17731775
rw[]>>
17741776
simp[resize_Clist_def,list_max_index_def]>>
1775-
qmatch_goalsub_abbrev_tac`list_max lss`>>
1776-
qspec_then `lss` assume_tac list_max_max>>
1777+
qmatch_goalsub_abbrev_tac`MAX_LIST lss`>>
1778+
qspec_then `lss` assume_tac MAX_LIST_PROPERTY>>
17771779
fs[EVERY_MEM,Abbr`lss`,MEM_MAP,PULL_EXISTS]>>
17781780
ntac 2 strip_tac>>first_x_assum drule>>
17791781
rw[]>>simp[index_def]>>rw[]>>

examples/xlrup_checker/array/xlrup_listScript.sml

+2-1
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ Definition list_delete_list_def:
162162
else list_delete_list is (LUPDATE NONE i fml))
163163
End
164164

165+
(*Might want to rename to MAX_LIST_index*)
165166
Definition list_max_index_def:
166-
list_max_index C = 2*list_max (MAP (λc. Num (ABS c)) C) + 1
167+
list_max_index C = 2* MAX_LIST (MAP (λc. Num (ABS c)) C) + 1
167168
End
168169

169170
(* bump up the length to a large number *)

0 commit comments

Comments
 (0)