lemma assumes"\i::int. 0 \ i \ i + 0 = i" shows"\i::nat. i + 0 = i" apply transfer apply fact done
lemma assumes"\i k::int. \0 \ i; 0 \ k; i < k\ \ \j\{0..}. i + j = k" shows"\i k::nat. i < k \ \j. i + j = k" apply transfer apply fact done
lemma assumes"\x\{0::int..}. \y\{0..}. x * y div y = x" shows"\x y :: nat. x * y div y = x" apply transfer apply fact done
lemma assumes"\m n::int. \0 \ m; 0 \ n; m * n = 0\ \ m = 0 \ n = 0" shows"m * n = (0::nat) \ m = 0 \ n = 0" apply transfer apply fact done
lemma assumes"\x\{0::int..}. \y\{0..}. \z\{0..}. x + 3 * y = 5 * z" shows"\x::nat. \y z. x + 3 * y = 5 * z" apply transfer apply fact done
text\<open>The \<open>fixing\<close> option prevents generalization over the free
variable \<open>n\<close>, allowing the local transfer rule to be used.\<close>
lemma assumes [transfer_rule]: "ZN x n" assumes"\i\{0..}. i < x \ 2 * i < 3 * x" shows"\i. i < n \ 2 * i < 3 * n" apply (transfer fixing: n) apply fact done
lemma assumes"\x y z::int. \0 \ x; 0 \ y; 0 \ z\ \
sum_list [x, y, z] = 0 \<longleftrightarrow> list_all (\<lambda>x. x = 0) [x, y, z]" shows"sum_list [x, y, z] = (0::nat) \ list_all (\x. x = 0) [x, y, z]" apply transfer apply fact done
text\<open>Quantifiers over higher types (e.g. \<open>nat list\<close>) are
transferred to a readable formula thanks to the transfer domain rule @{thm Domainp_ZN}\<close>
lemma assumes"\xs::int list. list_all (\x. x \ 0) xs \
(sum_list xs = 0) = list_all (\<lambda>x. x = 0) xs" shows"sum_list xs = (0::nat) \ list_all (\x. x = 0) xs" apply transfer apply fact done
text\<open>Equality on a higher type can be transferred if the relations
involved are bi-unique.\<close>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.