changeset 15574 | b1d1b5bfc464 |
parent 15570 | 8d8c70b41bab |
child 15661 | 9ef583b08647 |
15573:cf53c2dcf440 | 15574:b1d1b5bfc464 |
---|---|
440 else [] |
440 else [] |
441 |_ => if (is_numeral t) then [dest_numeral t] else [] |
441 |_ => if (is_numeral t) then [dest_numeral t] else [] |
442 val ts = coeffs_of t |
442 val ts = coeffs_of t |
443 in case ts of |
443 in case ts of |
444 [] => raise DVD_UNKNOWN |
444 [] => raise DVD_UNKNOWN |
445 |_ => Library.foldr (fn(k,r) => r andalso (k mod dn = 0)) (ts,true) |
445 |_ => foldr (fn(k,r) => r andalso (k mod dn = 0)) true ts |
446 end; |
446 end; |
447 |
447 |
448 |
448 |
449 val operations = |
449 val operations = |
450 [("op =",op=), ("op <",op<), ("op >",op>), ("op <=",op<=) , ("op >=",op>=), |
450 [("op =",op=), ("op <",op<), ("op >",op>), ("op <=",op<=) , ("op >=",op>=), |
734 Const("True",_) => (SOME n,HOLogic.true_const) |
734 Const("True",_) => (SOME n,HOLogic.true_const) |
735 |F' => let val (rw,rf) = h nl |
735 |F' => let val (rw,rf) = h nl |
736 in (rw,HOLogic.mk_disj(F',rf)) |
736 in (rw,HOLogic.mk_disj(F',rf)) |
737 end) |
737 end) |
738 val f = if b then linear_add else linear_sub |
738 val f = if b then linear_add else linear_sub |
739 val p_elements = Library.foldr (fn (i,l) => l union (map (fn e => f [] e (mk_numeral i)) st)) (1 upto d,[]) |
739 val p_elements = foldr (fn (i,l) => l union (map (fn e => f [] e (mk_numeral i)) st)) [] (1 upto d) |
740 in h p_elements |
740 in h p_elements |
741 end; |
741 end; |
742 |
742 |
743 fun withness d b st vars x p = case (inf_w b d vars x p) of |
743 fun withness d b st vars x p = case (inf_w b d vars x p) of |
744 (SOME n,_) => (SOME n,HOLogic.true_const) |
744 (SOME n,_) => (SOME n,HOLogic.true_const) |