136.16/107.63 MAYBE 138.19/108.22 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 138.19/108.22 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 138.19/108.22 138.19/108.22 138.19/108.22 H-Termination with start terms of the given HASKELL could not be shown: 138.19/108.22 138.19/108.22 (0) HASKELL 138.19/108.22 (1) LR [EQUIVALENT, 0 ms] 138.19/108.22 (2) HASKELL 138.19/108.22 (3) IFR [EQUIVALENT, 0 ms] 138.19/108.22 (4) HASKELL 138.19/108.22 (5) BR [EQUIVALENT, 0 ms] 138.19/108.22 (6) HASKELL 138.19/108.22 (7) COR [EQUIVALENT, 0 ms] 138.19/108.22 (8) HASKELL 138.19/108.22 (9) LetRed [EQUIVALENT, 0 ms] 138.19/108.22 (10) HASKELL 138.19/108.22 (11) NumRed [SOUND, 1 ms] 138.19/108.22 (12) HASKELL 138.19/108.22 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (0) 138.19/108.22 Obligation: 138.19/108.22 mainModule Main 138.19/108.22 module Main where { 138.19/108.22 import qualified Prelude; 138.19/108.22 } 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (1) LR (EQUIVALENT) 138.19/108.22 Lambda Reductions: 138.19/108.22 The following Lambda expression 138.19/108.22 "\(_ :% d')->d'" 138.19/108.22 is transformed to 138.19/108.22 "d'0 (_ :% d') = d'; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(_ :% d)->d" 138.19/108.22 is transformed to 138.19/108.22 "d0 (_ :% d) = d; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(n' :% _)->n'" 138.19/108.22 is transformed to 138.19/108.22 "n'0 (n' :% _) = n'; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\xr->xr" 138.19/108.22 is transformed to 138.19/108.22 "xr0 xr = xr; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(n :% _)->n" 138.19/108.22 is transformed to 138.19/108.22 "n0 (n :% _) = n; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(q,_)->q" 138.19/108.22 is transformed to 138.19/108.22 "q1 (q,_) = q; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(_,r)->r" 138.19/108.22 is transformed to 138.19/108.22 "r0 (_,r) = r; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(_,r')->r'" 138.19/108.22 is transformed to 138.19/108.22 "r'0 (_,r') = r'; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(_ :% d'')->d''" 138.19/108.22 is transformed to 138.19/108.22 "d''0 (_ :% d'') = d''; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(q',_)->q'" 138.19/108.22 is transformed to 138.19/108.22 "q'0 (q',_) = q'; 138.19/108.22 " 138.19/108.22 The following Lambda expression 138.19/108.22 "\(n'' :% _)->n''" 138.19/108.22 is transformed to 138.19/108.22 "n''0 (n'' :% _) = n''; 138.19/108.22 " 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (2) 138.19/108.22 Obligation: 138.19/108.22 mainModule Main 138.19/108.22 module Main where { 138.19/108.22 import qualified Prelude; 138.19/108.22 } 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (3) IFR (EQUIVALENT) 138.19/108.22 If Reductions: 138.19/108.22 The following If expression 138.19/108.22 "if primGEqNatS x y then Succ (primDivNatS (primMinusNatS x y) (Succ y)) else Zero" 138.19/108.22 is transformed to 138.19/108.22 "primDivNatS0 x y True = Succ (primDivNatS (primMinusNatS x y) (Succ y)); 138.19/108.22 primDivNatS0 x y False = Zero; 138.19/108.22 " 138.19/108.22 The following If expression 138.19/108.22 "if primGEqNatS x y then primModNatS (primMinusNatS x y) (Succ y) else Succ x" 138.19/108.22 is transformed to 138.19/108.22 "primModNatS0 x y True = primModNatS (primMinusNatS x y) (Succ y); 138.19/108.22 primModNatS0 x y False = Succ x; 138.19/108.22 " 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (4) 138.19/108.22 Obligation: 138.19/108.22 mainModule Main 138.19/108.22 module Main where { 138.19/108.22 import qualified Prelude; 138.19/108.22 } 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (5) BR (EQUIVALENT) 138.19/108.22 Replaced joker patterns by fresh variables and removed binding patterns. 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (6) 138.19/108.22 Obligation: 138.19/108.22 mainModule Main 138.19/108.22 module Main where { 138.19/108.22 import qualified Prelude; 138.19/108.22 } 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (7) COR (EQUIVALENT) 138.19/108.22 Cond Reductions: 138.19/108.22 The following Function with conditions 138.19/108.22 "absReal x|x >= 0x|otherwise`negate` x; 138.19/108.22 " 138.19/108.22 is transformed to 138.19/108.22 "absReal x = absReal2 x; 138.19/108.22 " 138.19/108.22 "absReal0 x True = `negate` x; 138.19/108.22 " 138.19/108.22 "absReal1 x True = x; 138.19/108.22 absReal1 x False = absReal0 x otherwise; 138.19/108.22 " 138.19/108.22 "absReal2 x = absReal1 x (x >= 0); 138.19/108.22 " 138.19/108.22 The following Function with conditions 138.19/108.22 "gcd' x 0 = x; 138.19/108.22 gcd' x y = gcd' y (x `rem` y); 138.19/108.22 " 138.19/108.22 is transformed to 138.19/108.22 "gcd' x zx = gcd'2 x zx; 138.19/108.22 gcd' x y = gcd'0 x y; 138.19/108.22 " 138.19/108.22 "gcd'0 x y = gcd' y (x `rem` y); 138.19/108.22 " 138.19/108.22 "gcd'1 True x zx = x; 138.19/108.22 gcd'1 zy zz vuu = gcd'0 zz vuu; 138.19/108.22 " 138.19/108.22 "gcd'2 x zx = gcd'1 (zx == 0) x zx; 138.19/108.22 gcd'2 vuv vuw = gcd'0 vuv vuw; 138.19/108.22 " 138.19/108.22 The following Function with conditions 138.19/108.22 "gcd 0 0 = error []; 138.19/108.22 gcd x y = gcd' (abs x) (abs y) where { 138.19/108.22 gcd' x 0 = x; 138.19/108.22 gcd' x y = gcd' y (x `rem` y); 138.19/108.22 } 138.19/108.22 ; 138.19/108.22 " 138.19/108.22 is transformed to 138.19/108.22 "gcd vux vuy = gcd3 vux vuy; 138.19/108.22 gcd x y = gcd0 x y; 138.19/108.22 " 138.19/108.22 "gcd0 x y = gcd' (abs x) (abs y) where { 138.19/108.22 gcd' x zx = gcd'2 x zx; 138.19/108.22 gcd' x y = gcd'0 x y; 138.19/108.22 ; 138.19/108.22 gcd'0 x y = gcd' y (x `rem` y); 138.19/108.22 ; 138.19/108.22 gcd'1 True x zx = x; 138.19/108.22 gcd'1 zy zz vuu = gcd'0 zz vuu; 138.19/108.22 ; 138.19/108.22 gcd'2 x zx = gcd'1 (zx == 0) x zx; 138.19/108.22 gcd'2 vuv vuw = gcd'0 vuv vuw; 138.19/108.22 } 138.19/108.22 ; 138.19/108.22 " 138.19/108.22 "gcd1 True vux vuy = error []; 138.19/108.22 gcd1 vuz vvu vvv = gcd0 vvu vvv; 138.19/108.22 " 138.19/108.22 "gcd2 True vux vuy = gcd1 (vuy == 0) vux vuy; 138.19/108.22 gcd2 vvw vvx vvy = gcd0 vvx vvy; 138.19/108.22 " 138.19/108.22 "gcd3 vux vuy = gcd2 (vux == 0) vux vuy; 138.19/108.22 gcd3 vvz vwu = gcd0 vvz vwu; 138.19/108.22 " 138.19/108.22 The following Function with conditions 138.19/108.22 "simplest x y|y < xsimplest y x|x == yxr|x > 0simplest' n d n' d'|y < 0`negate` simplest' (`negate` n') d' (`negate` n) d|otherwise0 :% 1 where { 138.19/108.22 d = d0 vu34; 138.19/108.22 ; 138.19/108.22 d' = d'0 vu35; 138.19/108.22 ; 138.19/108.22 d'0 (xu :% d') = d'; 138.19/108.22 ; 138.19/108.22 d0 (xv :% d) = d; 138.19/108.22 ; 138.19/108.22 n = n0 vu34; 138.19/108.22 ; 138.19/108.22 n' = n'0 vu35; 138.19/108.22 ; 138.19/108.22 n'0 (n' :% wz) = n'; 138.19/108.22 ; 138.19/108.22 n0 (n :% wy) = n; 138.19/108.22 ; 138.19/108.22 vu34 = toRational x; 138.19/108.22 ; 138.19/108.22 vu35 = toRational y; 138.19/108.22 ; 138.19/108.22 xr = xr0 vu34; 138.19/108.22 ; 138.19/108.22 xr0 xr = xr; 138.19/108.22 } 138.19/108.22 ; 138.19/108.22 " 138.19/108.22 is transformed to 138.19/108.22 "simplest x y = simplest5 x y; 138.19/108.22 " 138.19/108.22 "simplest5 x y = simplest4 x y (y < x) where { 138.19/108.22 d = d0 vu34; 138.19/108.22 ; 138.19/108.22 d' = d'0 vu35; 138.19/108.22 ; 138.19/108.22 d'0 (xu :% d') = d'; 138.19/108.22 ; 138.19/108.22 d0 (xv :% d) = d; 138.19/108.22 ; 138.19/108.22 n = n0 vu34; 138.19/108.22 ; 138.19/108.22 n' = n'0 vu35; 138.19/108.22 ; 138.19/108.22 n'0 (n' :% wz) = n'; 138.19/108.22 ; 138.19/108.22 n0 (n :% wy) = n; 138.19/108.22 ; 138.19/108.22 simplest0 x y True = 0 :% 1; 138.19/108.22 ; 138.19/108.22 simplest1 x y True = `negate` simplest' (`negate` n') d' (`negate` n) d; 138.19/108.22 simplest1 x y False = simplest0 x y otherwise; 138.19/108.22 ; 138.19/108.22 simplest2 x y True = simplest' n d n' d'; 138.19/108.22 simplest2 x y False = simplest1 x y (y < 0); 138.19/108.22 ; 138.19/108.22 simplest3 x y True = xr; 138.19/108.22 simplest3 x y False = simplest2 x y (x > 0); 138.19/108.22 ; 138.19/108.22 simplest4 x y True = simplest y x; 138.19/108.22 simplest4 x y False = simplest3 x y (x == y); 138.19/108.22 ; 138.19/108.22 vu34 = toRational x; 138.19/108.22 ; 138.19/108.22 vu35 = toRational y; 138.19/108.22 ; 138.19/108.22 xr = xr0 vu34; 138.19/108.22 ; 138.19/108.22 xr0 xr = xr; 138.19/108.22 } 138.19/108.22 ; 138.19/108.22 " 138.19/108.22 The following Function with conditions 138.19/108.22 "simplest' n d n' d'|r == 0q :% 1|q /= q'(q + 1) :% 1|otherwise(q * n'' + d'') :% n'' where { 138.19/108.22 d'' = d''0 vu38; 138.19/108.22 ; 138.19/108.22 d''0 (xx :% d'') = d''; 138.19/108.22 ; 138.19/108.22 n'' = n''0 vu38; 138.19/108.22 ; 138.19/108.22 n''0 (n'' :% xy) = n''; 138.19/108.22 ; 138.19/108.22 q = q1 vu36; 138.19/108.22 ; 138.19/108.22 q' = q'0 vu37; 138.19/108.22 ; 138.19/108.22 q'0 (q',yu) = q'; 138.19/108.22 ; 138.19/108.22 q1 (q,xw) = q; 138.19/108.22 ; 138.19/108.22 r = r0 vu36; 138.19/108.22 ; 138.19/108.22 r' = r'0 vu37; 138.19/108.22 ; 138.19/108.22 r'0 (xz,r') = r'; 138.19/108.22 ; 138.19/108.22 r0 (yv,r) = r; 138.19/108.22 ; 138.19/108.22 vu36 = quotRem n d; 138.19/108.22 ; 138.19/108.22 vu37 = quotRem n' d'; 138.19/108.22 ; 138.19/108.22 vu38 = simplest' d' r' d r; 138.19/108.22 } 138.19/108.22 ; 138.19/108.22 " 138.19/108.22 is transformed to 138.19/108.22 "simplest' n d n' d' = simplest'3 n d n' d'; 138.19/108.22 " 138.19/108.22 "simplest'3 n d n' d' = simplest'2 n d n' d' (r == 0) where { 138.19/108.22 d'' = d''0 vu38; 138.19/108.22 ; 138.19/108.22 d''0 (xx :% d'') = d''; 138.19/108.22 ; 138.19/108.22 n'' = n''0 vu38; 138.19/108.22 ; 138.19/108.22 n''0 (n'' :% xy) = n''; 138.19/108.22 ; 138.19/108.22 q = q1 vu36; 138.19/108.22 ; 138.19/108.22 q' = q'0 vu37; 138.19/108.22 ; 138.19/108.22 q'0 (q',yu) = q'; 138.19/108.22 ; 138.19/108.22 q1 (q,xw) = q; 138.19/108.22 ; 138.19/108.22 r = r0 vu36; 138.19/108.22 ; 138.19/108.22 r' = r'0 vu37; 138.19/108.22 ; 138.19/108.22 r'0 (xz,r') = r'; 138.19/108.22 ; 138.19/108.22 r0 (yv,r) = r; 138.19/108.22 ; 138.19/108.22 simplest'0 n d n' d' True = (q * n'' + d'') :% n''; 138.19/108.22 ; 138.19/108.22 simplest'1 n d n' d' True = (q + 1) :% 1; 138.19/108.22 simplest'1 n d n' d' False = simplest'0 n d n' d' otherwise; 138.19/108.22 ; 138.19/108.22 simplest'2 n d n' d' True = q :% 1; 138.19/108.22 simplest'2 n d n' d' False = simplest'1 n d n' d' (q /= q'); 138.19/108.22 ; 138.19/108.22 vu36 = quotRem n d; 138.19/108.22 ; 138.19/108.22 vu37 = quotRem n' d'; 138.19/108.22 ; 138.19/108.22 vu38 = simplest' d' r' d r; 138.19/108.22 } 138.19/108.22 ; 138.19/108.22 " 138.19/108.22 The following Function with conditions 138.19/108.22 "undefined |Falseundefined; 138.19/108.22 " 138.19/108.22 is transformed to 138.19/108.22 "undefined = undefined1; 138.19/108.22 " 138.19/108.22 "undefined0 True = undefined; 138.19/108.22 " 138.19/108.22 "undefined1 = undefined0 False; 138.19/108.22 " 138.19/108.22 The following Function with conditions 138.19/108.22 "reduce x y|y == 0error []|otherwisex `quot` d :% (y `quot` d) where { 138.19/108.22 d = gcd x y; 138.19/108.22 } 138.19/108.22 ; 138.19/108.22 " 138.19/108.22 is transformed to 138.19/108.22 "reduce x y = reduce2 x y; 138.19/108.22 " 138.19/108.22 "reduce2 x y = reduce1 x y (y == 0) where { 138.19/108.22 d = gcd x y; 138.19/108.22 ; 138.19/108.22 reduce0 x y True = x `quot` d :% (y `quot` d); 138.19/108.22 ; 138.19/108.22 reduce1 x y True = error []; 138.19/108.22 reduce1 x y False = reduce0 x y otherwise; 138.19/108.22 } 138.19/108.22 ; 138.19/108.22 " 138.19/108.22 The following Function with conditions 138.19/108.22 "signumReal x|x == 00|x > 01|otherwise-1; 138.19/108.22 " 138.19/108.22 is transformed to 138.19/108.22 "signumReal x = signumReal3 x; 138.19/108.22 " 138.19/108.22 "signumReal0 x True = -1; 138.19/108.22 " 138.19/108.22 "signumReal2 x True = 0; 138.19/108.22 signumReal2 x False = signumReal1 x (x > 0); 138.19/108.22 " 138.19/108.22 "signumReal1 x True = 1; 138.19/108.22 signumReal1 x False = signumReal0 x otherwise; 138.19/108.22 " 138.19/108.22 "signumReal3 x = signumReal2 x (x == 0); 138.19/108.22 " 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (8) 138.19/108.22 Obligation: 138.19/108.22 mainModule Main 138.19/108.22 module Main where { 138.19/108.22 import qualified Prelude; 138.19/108.22 } 138.19/108.22 138.19/108.22 ---------------------------------------- 138.19/108.22 138.19/108.22 (9) LetRed (EQUIVALENT) 138.19/108.22 Let/Where Reductions: 138.19/108.22 The bindings of the following Let/Where expression 138.19/108.22 "gcd' (abs x) (abs y) where { 138.19/108.22 gcd' x zx = gcd'2 x zx; 138.19/108.22 gcd' x y = gcd'0 x y; 138.19/108.22 ; 138.19/108.22 gcd'0 x y = gcd' y (x `rem` y); 138.19/108.22 ; 138.19/108.22 gcd'1 True x zx = x; 138.19/108.22 gcd'1 zy zz vuu = gcd'0 zz vuu; 138.19/108.22 ; 138.19/108.22 gcd'2 x zx = gcd'1 (zx == 0) x zx; 138.19/108.22 gcd'2 vuv vuw = gcd'0 vuv vuw; 138.19/108.22 } 138.19/108.22 " 138.19/108.22 are unpacked to the following functions on top level 138.19/108.22 "gcd0Gcd'2 x zx = gcd0Gcd'1 (zx == 0) x zx; 138.19/108.22 gcd0Gcd'2 vuv vuw = gcd0Gcd'0 vuv vuw; 138.19/108.22 " 138.19/108.22 "gcd0Gcd'1 True x zx = x; 138.19/108.22 gcd0Gcd'1 zy zz vuu = gcd0Gcd'0 zz vuu; 138.19/108.22 " 138.19/108.22 "gcd0Gcd' x zx = gcd0Gcd'2 x zx; 138.19/108.22 gcd0Gcd' x y = gcd0Gcd'0 x y; 138.19/108.22 " 138.19/108.22 "gcd0Gcd'0 x y = gcd0Gcd' y (x `rem` y); 138.19/108.22 " 138.19/108.22 The bindings of the following Let/Where expression 138.19/108.22 "reduce1 x y (y == 0) where { 138.19/108.22 d = gcd x y; 138.19/108.22 ; 138.19/108.22 reduce0 x y True = x `quot` d :% (y `quot` d); 138.40/108.29 ; 138.40/108.29 reduce1 x y True = error []; 138.40/108.29 reduce1 x y False = reduce0 x y otherwise; 138.40/108.29 } 138.40/108.29 " 138.40/108.29 are unpacked to the following functions on top level 138.40/108.29 "reduce2D vwv vww = gcd vwv vww; 138.40/108.29 " 138.40/108.29 "reduce2Reduce1 vwv vww x y True = error []; 138.40/108.29 reduce2Reduce1 vwv vww x y False = reduce2Reduce0 vwv vww x y otherwise; 138.40/108.29 " 138.40/108.29 "reduce2Reduce0 vwv vww x y True = x `quot` reduce2D vwv vww :% (y `quot` reduce2D vwv vww); 138.40/108.29 " 138.40/108.29 The bindings of the following Let/Where expression 138.40/108.29 "simplest (x - eps) (x + eps) where { 138.40/108.29 simplest x y = simplest5 x y; 138.40/108.29 ; 138.40/108.29 simplest' n d n' d' = simplest'3 n d n' d'; 138.40/108.29 ; 138.40/108.29 simplest'3 n d n' d' = simplest'2 n d n' d' (r == 0) where { 138.40/108.29 d'' = d''0 vu38; 138.40/108.29 ; 138.40/108.29 d''0 (xx :% d'') = d''; 138.40/108.29 ; 138.40/108.29 n'' = n''0 vu38; 138.40/108.29 ; 138.40/108.29 n''0 (n'' :% xy) = n''; 138.40/108.29 ; 138.40/108.29 q = q1 vu36; 138.40/108.29 ; 138.40/108.29 q' = q'0 vu37; 138.40/108.29 ; 138.40/108.29 q'0 (q',yu) = q'; 138.40/108.29 ; 138.40/108.29 q1 (q,xw) = q; 138.40/108.29 ; 138.40/108.29 r = r0 vu36; 138.40/108.29 ; 138.40/108.29 r' = r'0 vu37; 138.40/108.29 ; 138.40/108.29 r'0 (xz,r') = r'; 138.40/108.29 ; 138.40/108.29 r0 (yv,r) = r; 138.40/108.29 ; 138.40/108.29 simplest'0 n d n' d' True = (q * n'' + d'') :% n''; 138.40/108.29 ; 138.40/108.29 simplest'1 n d n' d' True = (q + 1) :% 1; 138.40/108.29 simplest'1 n d n' d' False = simplest'0 n d n' d' otherwise; 138.40/108.29 ; 138.40/108.29 simplest'2 n d n' d' True = q :% 1; 138.40/108.29 simplest'2 n d n' d' False = simplest'1 n d n' d' (q /= q'); 138.40/108.29 ; 138.40/108.29 vu36 = quotRem n d; 138.40/108.29 ; 138.40/108.29 vu37 = quotRem n' d'; 138.40/108.29 ; 138.40/108.29 vu38 = simplest' d' r' d r; 138.40/108.29 } 138.40/108.29 ; 138.40/108.29 ; 138.40/108.29 simplest5 x y = simplest4 x y (y < x) where { 138.40/108.29 d = d0 vu34; 138.40/108.29 ; 138.40/108.29 d' = d'0 vu35; 138.40/108.29 ; 138.40/108.29 d'0 (xu :% d') = d'; 138.40/108.29 ; 138.40/108.29 d0 (xv :% d) = d; 138.40/108.29 ; 138.40/108.29 n = n0 vu34; 138.40/108.29 ; 138.40/108.29 n' = n'0 vu35; 138.40/108.29 ; 138.40/108.29 n'0 (n' :% wz) = n'; 138.40/108.29 ; 138.40/108.29 n0 (n :% wy) = n; 138.40/108.29 ; 138.40/108.29 simplest0 x y True = 0 :% 1; 138.40/108.29 ; 138.40/108.29 simplest1 x y True = `negate` simplest' (`negate` n') d' (`negate` n) d; 138.40/108.29 simplest1 x y False = simplest0 x y otherwise; 138.40/108.29 ; 138.40/108.29 simplest2 x y True = simplest' n d n' d'; 138.40/108.29 simplest2 x y False = simplest1 x y (y < 0); 138.40/108.29 ; 138.40/108.29 simplest3 x y True = xr; 138.40/108.29 simplest3 x y False = simplest2 x y (x > 0); 138.40/108.29 ; 138.40/108.29 simplest4 x y True = simplest y x; 138.40/108.29 simplest4 x y False = simplest3 x y (x == y); 138.40/108.29 ; 138.40/108.29 vu34 = toRational x; 138.40/108.29 ; 138.40/108.29 vu35 = toRational y; 138.40/108.29 ; 138.40/108.29 xr = xr0 vu34; 138.40/108.29 ; 138.40/108.29 xr0 xr = xr; 138.40/108.29 } 138.40/108.29 ; 138.40/108.29 } 138.40/108.29 " 138.40/108.29 are unpacked to the following functions on top level 138.40/108.29 "approxRationalSimplest' n d n' d' = approxRationalSimplest'3 n d n' d'; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5 x y = approxRationalSimplest5Simplest4 y x x y (y < x); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest x y = approxRationalSimplest5 x y; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3 n d n' d' = approxRationalSimplest'3Simplest'2 d' d n' n n d n' d' (approxRationalSimplest'3R d' d n' n == 0); 138.40/108.29 " 138.40/108.29 The bindings of the following Let/Where expression 138.40/108.29 "simplest4 x y (y < x) where { 138.40/108.29 d = d0 vu34; 138.40/108.29 ; 138.40/108.29 d' = d'0 vu35; 138.40/108.29 ; 138.40/108.29 d'0 (xu :% d') = d'; 138.40/108.29 ; 138.40/108.29 d0 (xv :% d) = d; 138.40/108.29 ; 138.40/108.29 n = n0 vu34; 138.40/108.29 ; 138.40/108.29 n' = n'0 vu35; 138.40/108.29 ; 138.40/108.29 n'0 (n' :% wz) = n'; 138.40/108.29 ; 138.40/108.29 n0 (n :% wy) = n; 138.40/108.29 ; 138.40/108.29 simplest0 x y True = 0 :% 1; 138.40/108.29 ; 138.40/108.29 simplest1 x y True = `negate` simplest' (`negate` n') d' (`negate` n) d; 138.40/108.29 simplest1 x y False = simplest0 x y otherwise; 138.40/108.29 ; 138.40/108.29 simplest2 x y True = simplest' n d n' d'; 138.40/108.29 simplest2 x y False = simplest1 x y (y < 0); 138.40/108.29 ; 138.40/108.29 simplest3 x y True = xr; 138.40/108.29 simplest3 x y False = simplest2 x y (x > 0); 138.40/108.29 ; 138.40/108.29 simplest4 x y True = simplest y x; 138.40/108.29 simplest4 x y False = simplest3 x y (x == y); 138.40/108.29 ; 138.40/108.29 vu34 = toRational x; 138.40/108.29 ; 138.40/108.29 vu35 = toRational y; 138.40/108.29 ; 138.40/108.29 xr = xr0 vu34; 138.40/108.29 ; 138.40/108.29 xr0 xr = xr; 138.40/108.29 } 138.40/108.29 " 138.40/108.29 are unpacked to the following functions on top level 138.40/108.29 "approxRationalSimplest5Vu35 vwx vwy = toRational vwx; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5N' vwx vwy = approxRationalSimplest5N'0 vwx vwy (approxRationalSimplest5Vu35 vwx vwy); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5Simplest2 vwx vwy x y True = approxRationalSimplest' (approxRationalSimplest5N vwx vwy) (approxRationalSimplest5D vwx vwy) (approxRationalSimplest5N' vwx vwy) (approxRationalSimplest5D' vwx vwy); 138.40/108.29 approxRationalSimplest5Simplest2 vwx vwy x y False = approxRationalSimplest5Simplest1 vwx vwy x y (y < 0); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5Vu34 vwx vwy = toRational vwy; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5Xr vwx vwy = approxRationalSimplest5Xr0 vwx vwy (approxRationalSimplest5Vu34 vwx vwy); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5D'0 vwx vwy (xu :% d') = d'; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5Simplest4 vwx vwy x y True = approxRationalSimplest y x; 138.40/108.29 approxRationalSimplest5Simplest4 vwx vwy x y False = approxRationalSimplest5Simplest3 vwx vwy x y (x == y); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5D vwx vwy = approxRationalSimplest5D0 vwx vwy (approxRationalSimplest5Vu34 vwx vwy); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5N'0 vwx vwy (n' :% wz) = n'; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5Simplest1 vwx vwy x y True = `negate` approxRationalSimplest' (`negate` approxRationalSimplest5N' vwx vwy) (approxRationalSimplest5D' vwx vwy) (`negate` approxRationalSimplest5N vwx vwy) (approxRationalSimplest5D vwx vwy); 138.40/108.29 approxRationalSimplest5Simplest1 vwx vwy x y False = approxRationalSimplest5Simplest0 vwx vwy x y otherwise; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5D0 vwx vwy (xv :% d) = d; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5Xr0 vwx vwy xr = xr; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5N0 vwx vwy (n :% wy) = n; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5Simplest0 vwx vwy x y True = 0 :% 1; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5Simplest3 vwx vwy x y True = approxRationalSimplest5Xr vwx vwy; 138.40/108.29 approxRationalSimplest5Simplest3 vwx vwy x y False = approxRationalSimplest5Simplest2 vwx vwy x y (x > 0); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5N vwx vwy = approxRationalSimplest5N0 vwx vwy (approxRationalSimplest5Vu34 vwx vwy); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest5D' vwx vwy = approxRationalSimplest5D'0 vwx vwy (approxRationalSimplest5Vu35 vwx vwy); 138.40/108.29 " 138.40/108.29 The bindings of the following Let/Where expression 138.40/108.29 "simplest'2 n d n' d' (r == 0) where { 138.40/108.29 d'' = d''0 vu38; 138.40/108.29 ; 138.40/108.29 d''0 (xx :% d'') = d''; 138.40/108.29 ; 138.40/108.29 n'' = n''0 vu38; 138.40/108.29 ; 138.40/108.29 n''0 (n'' :% xy) = n''; 138.40/108.29 ; 138.40/108.29 q = q1 vu36; 138.40/108.29 ; 138.40/108.29 q' = q'0 vu37; 138.40/108.29 ; 138.40/108.29 q'0 (q',yu) = q'; 138.40/108.29 ; 138.40/108.29 q1 (q,xw) = q; 138.40/108.29 ; 138.40/108.29 r = r0 vu36; 138.40/108.29 ; 138.40/108.29 r' = r'0 vu37; 138.40/108.29 ; 138.40/108.29 r'0 (xz,r') = r'; 138.40/108.29 ; 138.40/108.29 r0 (yv,r) = r; 138.40/108.29 ; 138.40/108.29 simplest'0 n d n' d' True = (q * n'' + d'') :% n''; 138.40/108.29 ; 138.40/108.29 simplest'1 n d n' d' True = (q + 1) :% 1; 138.40/108.29 simplest'1 n d n' d' False = simplest'0 n d n' d' otherwise; 138.40/108.29 ; 138.40/108.29 simplest'2 n d n' d' True = q :% 1; 138.40/108.29 simplest'2 n d n' d' False = simplest'1 n d n' d' (q /= q'); 138.40/108.29 ; 138.40/108.29 vu36 = quotRem n d; 138.40/108.29 ; 138.40/108.29 vu37 = quotRem n' d'; 138.40/108.29 ; 138.40/108.29 vu38 = simplest' d' r' d r; 138.40/108.29 } 138.40/108.29 " 138.40/108.29 are unpacked to the following functions on top level 138.40/108.29 "approxRationalSimplest'3D''0 vwz vxu vxv vxw (xx :% d'') = d''; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3N''0 vwz vxu vxv vxw (n'' :% xy) = n''; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Vu38 vwz vxu vxv vxw = approxRationalSimplest' vwz (approxRationalSimplest'3R' vwz vxu vxv vxw) vxu (approxRationalSimplest'3R vwz vxu vxv vxw); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3R0 vwz vxu vxv vxw (yv,r) = r; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Vu37 vwz vxu vxv vxw = quotRem vxv vwz; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Q' vwz vxu vxv vxw = approxRationalSimplest'3Q'0 vwz vxu vxv vxw (approxRationalSimplest'3Vu37 vwz vxu vxv vxw); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Q1 vwz vxu vxv vxw (q,xw) = q; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Simplest'1 vwz vxu vxv vxw n d n' d' True = (approxRationalSimplest'3Q vwz vxu vxv vxw + 1) :% 1; 138.40/108.29 approxRationalSimplest'3Simplest'1 vwz vxu vxv vxw n d n' d' False = approxRationalSimplest'3Simplest'0 vwz vxu vxv vxw n d n' d' otherwise; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Simplest'0 vwz vxu vxv vxw n d n' d' True = (approxRationalSimplest'3Q vwz vxu vxv vxw * approxRationalSimplest'3N'' vwz vxu vxv vxw + approxRationalSimplest'3D'' vwz vxu vxv vxw) :% approxRationalSimplest'3N'' vwz vxu vxv vxw; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Vu36 vwz vxu vxv vxw = quotRem vxw vxu; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3R' vwz vxu vxv vxw = approxRationalSimplest'3R'0 vwz vxu vxv vxw (approxRationalSimplest'3Vu37 vwz vxu vxv vxw); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3D'' vwz vxu vxv vxw = approxRationalSimplest'3D''0 vwz vxu vxv vxw (approxRationalSimplest'3Vu38 vwz vxu vxv vxw); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Q'0 vwz vxu vxv vxw (q',yu) = q'; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Simplest'2 vwz vxu vxv vxw n d n' d' True = approxRationalSimplest'3Q vwz vxu vxv vxw :% 1; 138.40/108.29 approxRationalSimplest'3Simplest'2 vwz vxu vxv vxw n d n' d' False = approxRationalSimplest'3Simplest'1 vwz vxu vxv vxw n d n' d' (approxRationalSimplest'3Q vwz vxu vxv vxw /= approxRationalSimplest'3Q' vwz vxu vxv vxw); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3R'0 vwz vxu vxv vxw (xz,r') = r'; 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3N'' vwz vxu vxv vxw = approxRationalSimplest'3N''0 vwz vxu vxv vxw (approxRationalSimplest'3Vu38 vwz vxu vxv vxw); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3R vwz vxu vxv vxw = approxRationalSimplest'3R0 vwz vxu vxv vxw (approxRationalSimplest'3Vu36 vwz vxu vxv vxw); 138.40/108.29 " 138.40/108.29 "approxRationalSimplest'3Q vwz vxu vxv vxw = approxRationalSimplest'3Q1 vwz vxu vxv vxw (approxRationalSimplest'3Vu36 vwz vxu vxv vxw); 138.40/108.29 " 138.40/108.29 138.40/108.29 ---------------------------------------- 138.40/108.29 138.40/108.29 (10) 138.40/108.29 Obligation: 138.40/108.29 mainModule Main 138.40/108.29 module Main where { 138.40/108.29 import qualified Prelude; 138.40/108.29 } 138.40/108.29 138.40/108.29 ---------------------------------------- 138.40/108.29 138.40/108.29 (11) NumRed (SOUND) 138.40/108.29 Num Reduction:All numbers are transformed to their corresponding representation with Succ, Pred and Zero. 138.40/108.29 ---------------------------------------- 138.40/108.29 138.40/108.29 (12) 138.40/108.29 Obligation: 138.40/108.29 mainModule Main 138.40/108.29 module Main where { 138.40/108.29 import qualified Prelude; 138.40/108.29 } 138.40/108.33 EOF