equal
deleted
inserted
replaced
789 |
789 |
790 inductive divmod_rel :: "nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> bool" where |
790 inductive divmod_rel :: "nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> bool" where |
791 "k < l \<Longrightarrow> divmod_rel k l 0 k" |
791 "k < l \<Longrightarrow> divmod_rel k l 0 k" |
792 | "k \<ge> l \<Longrightarrow> divmod_rel (k - l) l q r \<Longrightarrow> divmod_rel k l (Suc q) r" |
792 | "k \<ge> l \<Longrightarrow> divmod_rel (k - l) l q r \<Longrightarrow> divmod_rel k l (Suc q) r" |
793 |
793 |
794 code_pred divmod_rel .. |
794 code_pred divmod_rel . |
795 thm divmod_rel.equation |
795 thm divmod_rel.equation |
796 value [code] "Predicate.the (divmod_rel_i_i_o_o 1705 42)" |
796 value [code] "Predicate.the (divmod_rel_i_i_o_o 1705 42)" |
797 |
797 |
798 subsection {* Transforming predicate logic into logic programs *} |
798 subsection {* Transforming predicate logic into logic programs *} |
799 |
799 |