equal
deleted
inserted
replaced
17 *) |
17 *) |
18 |
18 |
19 signature COMBINE_NUMERALS_DATA = |
19 signature COMBINE_NUMERALS_DATA = |
20 sig |
20 sig |
21 (*abstract syntax*) |
21 (*abstract syntax*) |
|
22 val add: int * int -> int (*addition (or multiplication) *) |
22 val mk_sum: term list -> term |
23 val mk_sum: term list -> term |
23 val dest_sum: term -> term list |
24 val dest_sum: term -> term list |
24 val mk_coeff: int * term -> term |
25 val mk_coeff: int * term -> term |
25 val dest_coeff: term -> int * term |
26 val dest_coeff: term -> int * term |
26 (*rules*) |
27 (*rules*) |
81 in |
82 in |
82 apsome Data.simplify_meta_eq |
83 apsome Data.simplify_meta_eq |
83 (Data.prove_conv |
84 (Data.prove_conv |
84 [Data.trans_tac reshape, rtac Data.left_distrib 1, |
85 [Data.trans_tac reshape, rtac Data.left_distrib 1, |
85 Data.numeral_simp_tac] sg |
86 Data.numeral_simp_tac] sg |
86 (t', Data.mk_sum (Data.mk_coeff(m+n,u) :: terms))) |
87 (t', Data.mk_sum (Data.mk_coeff(Data.add(m,n), u) :: terms))) |
87 end |
88 end |
88 handle TERM _ => None |
89 handle TERM _ => None |
89 | TYPE _ => None; (*Typically (if thy doesn't include Numeral) |
90 | TYPE _ => None; (*Typically (if thy doesn't include Numeral) |
90 Undeclared type constructor "Numeral.bin"*) |
91 Undeclared type constructor "Numeral.bin"*) |
91 |
92 |