doc-src/Tutorial/Misc/GCD.ML
author berghofe
Thu, 23 Sep 2004 10:20:52 +0200
changeset 15204 d15f85347fcb
parent 5377 efb799c5ed3c
permissions -rw-r--r--
- Inserted additional check for equality types in check_mode_clause that avoids ill-typed code to be generated. - Mode inference algorithm now outputs additional diagnostic messages.

Goal "gcd(m,0) = m";
by(resolve_tac [trans] 1);
by(resolve_tac gcd.rules 1);
by(Simp_tac 1);
qed "gcd_0";
Addsimps [gcd_0];

Goal "!!n. n ~= 0 ==> gcd(m,n) = gcd(n, m mod n)";
by(resolve_tac [trans] 1);
by(resolve_tac gcd.rules 1);
by(Asm_simp_tac 1);
qed "gcd_not_0";
Addsimps [gcd_not_0];