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