-- Fundamental theorem of arithmetic -- https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic -- execute with: curry check homework_1 import Test.Prop -- Define the following function: -- For any n > 1, compute the list of prime factors of n in non-decreasing order arith_th n = ... -- Execute the program with the command curry check homework test4 = arith_th 4 -=- [2,2] test1200 = arith_th 1200 -=- [2,2,2,2,3,5,5] test36 = arith_th 36 -=- [2,2,3,3] test17 = arith_th 17 -=- [17] test12345 = arith_th 12345 -=- [3,5,823] -- ensure the argument is in the proper range, x > 1 mtest x = (x > 1) ==> x -=- foldl1 (*) (arith_th x) -- mtest x | x > 1 = x -=- foldl1 (*) (arith_th x) -- | otherwise = always True