Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
File size: 1,777 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 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 |
(* ---------------------------------------------------------------------- *)
(* Num *)
(* ---------------------------------------------------------------------- *)
let NUM_REWRITES = ref [
LT_TRANS;
LET_TRANS;
LTE_TRANS;
LE_TRANS;
GT;
GE;
PRE;
ARITH_RULE `x + 0 = x`;
ARITH_RULE `0 + x = x`;
ARITH_RULE `1 * x = x`;
ARITH_RULE `x * 1 = x`;
];;
let NUM_SIMP_TAC = REWRITE_TAC !NUM_REWRITES;;
let extend_num_rewrites l =
NUM_REWRITES := !NUM_REWRITES @ l;;
(* ---------------------------------------------------------------------- *)
(* Real *)
(* ---------------------------------------------------------------------- *)
(*
search [`(pow)`;rp]
*)
let REAL_REWRITES = ref [
REAL_MUL_LID;
REAL_MUL_RID;
REAL_MUL_RZERO;
REAL_MUL_LZERO;
REAL_LT_TRANS;
REAL_LET_TRANS;
REAL_LTE_TRANS;
REAL_LE_TRANS;
REAL_LE_MUL;
REAL_NOT_LT;
REAL_LT_REFL;
REAL_LE_REFL;
REAL_ADD_RID;
REAL_ADD_LID;
REAL_ADD_LDISTRIB;
REAL_ADD_RDISTRIB;
REAL_NEG_0;
REAL_NEG_MUL2;
REAL_OF_NUM_LT;
REAL_MAX_MAX;
real_pow;
REAL_ARITH `x - &0 = x`;
REAL_NOT_LT;
REAL_NOT_LE;
REAL_INV_INV;
REAL_INV_MUL;
real_gt;
real_ge;
REAL_POW_1;
ARITH_RULE `-- &1 * x = -- x`;
ARITH_RULE `-- &1 * -- &1 = &1`;
ARITH_RULE `-- (-- x * y) = x * y`;
ARITH_RULE `x - x = &0`;
REAL_POW_ONE;
REAL_NEG_NEG;
];;
let REAL_ELIM = ref [
REAL_LT_INV;
REAL_ADD_SYM;
REAL_ADD_ASSOC;
REAL_MUL_SYM;
REAL_MUL_ASSOC;
REAL_LT_LE;
REAL_LE_LT;
real_div;
];;
let REAL_SIMP_TAC = REWRITE_TAC (
!REAL_REWRITES
);;
let REAL_SOLVE_TAC = ASM_MESON_TAC (!REAL_REWRITES @ !REAL_ELIM);;
let extend_real_rewrites l =
REAL_REWRITES := !REAL_REWRITES @ l;;
let BASIC_REWRITES = ref (!REAL_REWRITES @ !NUM_REWRITES);;
|