doc-src/Tutorial/Misc/GCD.ML
author wenzelm
Thu, 04 Oct 2001 15:20:40 +0200
changeset 11670 59f79df42d1f
parent 5377 efb799c5ed3c
permissions -rw-r--r--
proof by cases and induction on types and sets (used to be specific for HOL);

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];