Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
File size: 719 Bytes
4365a98 |
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 |
(* ---------------------------------------------------------------------- *)
(* List *)
(* ---------------------------------------------------------------------- *)
let NOT_NIL = prove_by_refinement(
`!l. ~(l = []) <=> ?(h:A) t. l = CONS h t`,
(* {{{ Proof *)
[
STRIP_TAC THEN EQ_TAC;
MESON_TAC[list_CASES];
STRIP_TAC;
ASM_MESON_TAC[NOT_CONS_NIL];
]);;
(* }}} *)
let LIST_REWRITES = ref [
NOT_CONS_NIL;
HD;
TL;
CONS_11;
LENGTH;
LAST;
list_CASES;
NOT_NIL;
];;
let LIST_SIMP_TAC = REWRITE_TAC (
!LIST_REWRITES
);;
let extend_list_rewrites l =
LIST_REWRITES := !LIST_REWRITES @ l;;
BASIC_REWRITES := !LIST_REWRITES @ !BASIC_REWRITES;;
|