763 val cc = cterm_of sg c |
763 val cc = cterm_of sg c |
764 val ct = cterm_of sg t |
764 val ct = cterm_of sg t |
765 val cx = cterm_of sg x |
765 val cx = cterm_of sg x |
766 val ca = cterm_of sg a |
766 val ca = cterm_of sg a |
767 in case p of |
767 in case p of |
768 "op <" => let val pre = prove_elementar sg "ss" |
768 "op <" => let val pre = prove_elementar sg "lf" |
769 (HOLogic.mk_binrel "op <" (Const("0",HOLogic.intT),(mk_numeral k))) |
769 (HOLogic.mk_binrel "op <" (Const("0",HOLogic.intT),(mk_numeral k))) |
770 val th1 = (pre RS (instantiate' [] [Some ck,Some ca,Some cc, Some cx, Some ct] (ac_lt_eq))) |
770 val th1 = (pre RS (instantiate' [] [Some ck,Some ca,Some cc, Some cx, Some ct] (ac_lt_eq))) |
771 in [th1,(prove_elementar sg "ss" (HOLogic.mk_eq (snd (qe_get_terms th1) ,rs)))] MRS trans |
771 in [th1,(prove_elementar sg "lf" (HOLogic.mk_eq (snd (qe_get_terms th1) ,rs)))] MRS trans |
772 end |
772 end |
773 |"op =" =>let val pre = prove_elementar sg "ss" |
773 |"op =" =>let val pre = prove_elementar sg "lf" |
774 (HOLogic.Not $ (HOLogic.mk_binrel "op =" (Const("0",HOLogic.intT),(mk_numeral k)))) |
774 (HOLogic.Not $ (HOLogic.mk_binrel "op =" (Const("0",HOLogic.intT),(mk_numeral k)))) |
775 in let val th1 = (pre RS(instantiate' [] [Some ck,Some ca,Some cc, Some cx, Some ct] (ac_eq_eq))) |
775 in let val th1 = (pre RS(instantiate' [] [Some ck,Some ca,Some cc, Some cx, Some ct] (ac_eq_eq))) |
776 in [th1,(prove_elementar sg "ss" (HOLogic.mk_eq (snd (qe_get_terms th1) ,rs)))] MRS trans |
776 in [th1,(prove_elementar sg "lf" (HOLogic.mk_eq (snd (qe_get_terms th1) ,rs)))] MRS trans |
777 end |
777 end |
778 end |
778 end |
779 |"Divides.op dvd" =>let val pre = prove_elementar sg "ss" |
779 |"Divides.op dvd" =>let val pre = prove_elementar sg "lf" |
780 (HOLogic.Not $ (HOLogic.mk_binrel "op =" (Const("0",HOLogic.intT),(mk_numeral k)))) |
780 (HOLogic.Not $ (HOLogic.mk_binrel "op =" (Const("0",HOLogic.intT),(mk_numeral k)))) |
781 val th1 = (pre RS (instantiate' [] [Some ck,Some ca,Some cc, Some cx, Some ct]) (ac_dvd_eq)) |
781 val th1 = (pre RS (instantiate' [] [Some ck,Some ca,Some cc, Some cx, Some ct]) (ac_dvd_eq)) |
782 in [th1,(prove_elementar sg "ss" (HOLogic.mk_eq (snd (qe_get_terms th1) ,rs)))] MRS trans |
782 in [th1,(prove_elementar sg "lf" (HOLogic.mk_eq (snd (qe_get_terms th1) ,rs)))] MRS trans |
783 |
783 |
784 end |
784 end |
785 end |
785 end |
786 |ACPI(k,at as (Const("Not",_)$(Const("op <",_) $a $( Const ("op +", _)$(Const ("op *",_) $ c $ x ) $t )))) => |
786 |ACPI(k,at as (Const("Not",_)$(Const("op <",_) $a $( Const ("op +", _)$(Const ("op *",_) $ c $ x ) $t )))) => |
787 let |
787 let |
788 val ck = cterm_of sg (mk_numeral k) |
788 val ck = cterm_of sg (mk_numeral k) |
789 val cc = cterm_of sg c |
789 val cc = cterm_of sg c |
790 val ct = cterm_of sg t |
790 val ct = cterm_of sg t |
791 val cx = cterm_of sg x |
791 val cx = cterm_of sg x |
792 val pre = prove_elementar sg "ss" |
792 val pre = prove_elementar sg "lf" |
793 (HOLogic.mk_binrel "op <" (Const("0",HOLogic.intT),(mk_numeral k))) |
793 (HOLogic.mk_binrel "op <" (Const("0",HOLogic.intT),(mk_numeral k))) |
794 val th1 = (pre RS (instantiate' [] [Some ck,Some cc, Some cx, Some ct] (ac_pi_eq))) |
794 val th1 = (pre RS (instantiate' [] [Some ck,Some cc, Some cx, Some ct] (ac_pi_eq))) |
795 |
795 |
796 in [th1,(prove_elementar sg "sa" (HOLogic.mk_eq (snd (qe_get_terms th1) ,rs)))] MRS trans |
796 in [th1,(prove_elementar sg "sa" (HOLogic.mk_eq (snd (qe_get_terms th1) ,rs)))] MRS trans |
797 end |
797 end |