(* holyhammer *) load "holyHammer"; open holyHammer; load "transcTheory"; holyhammer ``1+1=2``; holyhammer ``cos (2 * x) = 2 * (cos x * cos x) - 1``; (* holyhammer proof *) val thm1 = holyhammer ``cos (2 * x) = cos (x + x)``; val thm2 = holyhammer ``cos (x + x) = cos x * cos x - sin x * sin x``; val thm3_l0 = holyhammer ``cos x * cos x + sin x * sin x = 1``; val thm3_l1 = holyhammer ``(a + b = 1) ==> (b = 1 - a)``; val thm3 = METIS_PROVE [thm3_l0,thm3_l1] holyhammer ``cos x * cos x - sin x * sin x = cos x * cos x - (1 - cos x * cos x)``; val thm4_l1 = holyhammer ``a - (1 - a) = a + a - 1``; val thm4_l2 = holyhammer ``a - (1 - a) = 2 * a - 1``; val thm4 = holyhammer ``cos x * cos x - (1 - cos x * cos x) = 2 * (cos x * cos x) - 1``; val thm5 = holyhammer ``cos (2 * x) = 2 * (cos x * cos x) - 1``; (* tactictoe *) load "holyHammer"; open holyHammer; load "tacticToe"; open tacticToe; tactictoe ``(2 * x + 1 = 3) ==> (x = 1)``; load "dividesTheory"; load "gcdTheory"; (* tactictoe ``~((a * a = 2 * (b * b)) /\ (gcd a b = 1))``; *) (* tactictoe proof *) val thm1 = tactictoe ``(a * a = 2 * (b * b)) ==> divides 2 a``; val tacl = [REWRITE_TAC [dividesTheory.divides_def], simpLib.ASM_SIMP_TAC (BasicProvers.srw_ss ()) [(DB.fetch "arithmetic" "MULT_COMM")], ONCE_REWRITE_TAC [arithmeticTheory.MULT_COMM], REWRITE_TAC [GSYM arithmeticTheory.EVEN_EXISTS], METIS_TAC [arithmeticTheory.EVEN_DOUBLE, arithmeticTheory.EVEN_MULT]]; val g: goal = ([],``(a * a = 2 * (b * b)) ==> divides 2 a``); aiLib.trace_tacl tacl g; val thm2_l1 = tactictoe ``divides x y ==> divides (x * x) (y * y)``; val thm2_l2 = METIS_PROVE [thm2_l1] ``divides 2 a ==> divides (2 * 2) (a * a)``; val thm2_l3 = tactictoe ``(a * a = 2 * (b * b)) ==> divides (2 * 2) (2 * (b * b))``; val thm2_l4 = tactictoe ``divides (2 * a) (2 * b) ==> divides a b``; val thm2_l5 = tactictoe ``divides (2 * 2) (2 * (b * b)) ==> divides 2 (b * b)``; val thm2_l6 = tactictoe ``divides 2 (b * b) ==> divides 2 b``; val thm2_l7 = tactictoe ``divides (2 * 2) (2 * (b * b)) ==> divides 2 b``; val thm2 = tactictoe ``(a * a = 2 * (b * b)) ==> divides 2 b``; val thm3 = tactictoe ``divides 2 a /\ divides 2 b ==> divides 2 (gcd a b)``; val thm4 = tactictoe ``~(divides 2 1)``; val thm5 = tactictoe ``~ ((divides 2 a /\ divides 2 b) /\ (gcd a b = 1))``; val thm6 = tactictoe ``~((a * a = 2 * (b * b)) /\ (gcd a b = 1))``;