equal
deleted
inserted
replaced
547 end; |
547 end; |
548 |
548 |
549 (* A linear arithmetic prover *) |
549 (* A linear arithmetic prover *) |
550 local |
550 local |
551 val linear_add = FuncUtil.Ctermfunc.combine (curry op +/) (fn z => z =/ Rat.zero) |
551 val linear_add = FuncUtil.Ctermfunc.combine (curry op +/) (fn z => z =/ Rat.zero) |
552 fun linear_cmul c = FuncUtil.Ctermfunc.map (fn x => c */ x) |
552 fun linear_cmul c = FuncUtil.Ctermfunc.map (fn _ => fn x => c */ x) |
553 val one_tm = @{cterm "1::real"} |
553 val one_tm = @{cterm "1::real"} |
554 fun contradictory p (e,_) = ((FuncUtil.Ctermfunc.is_empty e) andalso not(p Rat.zero)) orelse |
554 fun contradictory p (e,_) = ((FuncUtil.Ctermfunc.is_empty e) andalso not(p Rat.zero)) orelse |
555 ((eq_set (op aconvc) (FuncUtil.Ctermfunc.dom e, [one_tm])) andalso |
555 ((eq_set (op aconvc) (FuncUtil.Ctermfunc.dom e, [one_tm])) andalso |
556 not(p(FuncUtil.Ctermfunc.apply e one_tm))) |
556 not(p(FuncUtil.Ctermfunc.apply e one_tm))) |
557 |
557 |