equal
deleted
inserted
replaced
291 (*version without the hyps argument*) |
291 (*version without the hyps argument*) |
292 fun prove_conv_nohyps name tacs sg = ArithData.prove_conv name tacs sg []; |
292 fun prove_conv_nohyps name tacs sg = ArithData.prove_conv name tacs sg []; |
293 |
293 |
294 structure CombineNumeralsData = |
294 structure CombineNumeralsData = |
295 struct |
295 struct |
296 type coeff = IntInf.int |
296 type coeff = int |
297 val iszero = (fn x : IntInf.int => x = 0) |
297 val iszero = (fn x => x = 0) |
298 val add = IntInf.+ |
298 val add = op + |
299 val mk_sum = (fn T:typ => long_mk_sum) (*to work for #2*x $+ #3*x *) |
299 val mk_sum = (fn T:typ => long_mk_sum) (*to work for #2*x $+ #3*x *) |
300 val dest_sum = dest_sum |
300 val dest_sum = dest_sum |
301 val mk_coeff = mk_coeff |
301 val mk_coeff = mk_coeff |
302 val dest_coeff = dest_coeff 1 |
302 val dest_coeff = dest_coeff 1 |
303 val left_distrib = left_zadd_zmult_distrib RS trans |
303 val left_distrib = left_zadd_zmult_distrib RS trans |
331 the "sum" of #3, x, #4; the literals are then multiplied*) |
331 the "sum" of #3, x, #4; the literals are then multiplied*) |
332 |
332 |
333 |
333 |
334 structure CombineNumeralsProdData = |
334 structure CombineNumeralsProdData = |
335 struct |
335 struct |
336 type coeff = IntInf.int |
336 type coeff = int |
337 val iszero = (fn x : IntInf.int => x = 0) |
337 val iszero = (fn x => x = 0) |
338 val add = IntInf.* |
338 val add = op * |
339 val mk_sum = (fn T:typ => mk_prod) |
339 val mk_sum = (fn T:typ => mk_prod) |
340 val dest_sum = dest_prod |
340 val dest_sum = dest_prod |
341 fun mk_coeff(k,t) = if t=one then mk_numeral k |
341 fun mk_coeff(k,t) = if t=one then mk_numeral k |
342 else raise TERM("mk_coeff", []) |
342 else raise TERM("mk_coeff", []) |
343 fun dest_coeff t = (dest_numeral t, one) (*We ONLY want pure numerals.*) |
343 fun dest_coeff t = (dest_numeral t, one) (*We ONLY want pure numerals.*) |