8.15/3.56 YES 9.94/4.05 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 9.94/4.05 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.94/4.05 9.94/4.05 9.94/4.05 H-Termination with start terms of the given HASKELL could be proven: 9.94/4.05 9.94/4.05 (0) HASKELL 9.94/4.05 (1) BR [EQUIVALENT, 0 ms] 9.94/4.05 (2) HASKELL 9.94/4.05 (3) COR [EQUIVALENT, 0 ms] 9.94/4.05 (4) HASKELL 9.94/4.05 (5) NumRed [SOUND, 0 ms] 9.94/4.05 (6) HASKELL 9.94/4.05 (7) Narrow [SOUND, 0 ms] 9.94/4.05 (8) QDP 9.94/4.05 (9) TransformationProof [EQUIVALENT, 0 ms] 9.94/4.05 (10) QDP 9.94/4.05 (11) DependencyGraphProof [EQUIVALENT, 0 ms] 9.94/4.05 (12) QDP 9.94/4.05 (13) UsableRulesProof [EQUIVALENT, 0 ms] 9.94/4.05 (14) QDP 9.94/4.05 (15) QReductionProof [EQUIVALENT, 0 ms] 9.94/4.05 (16) QDP 9.94/4.05 (17) QDPSizeChangeProof [EQUIVALENT, 0 ms] 9.94/4.05 (18) YES 9.94/4.05 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (0) 9.94/4.05 Obligation: 9.94/4.05 mainModule Main 9.94/4.05 module Main where { 9.94/4.05 import qualified Prelude; 9.94/4.05 } 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (1) BR (EQUIVALENT) 9.94/4.05 Replaced joker patterns by fresh variables and removed binding patterns. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (2) 9.94/4.05 Obligation: 9.94/4.05 mainModule Main 9.94/4.05 module Main where { 9.94/4.05 import qualified Prelude; 9.94/4.05 } 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (3) COR (EQUIVALENT) 9.94/4.05 Cond Reductions: 9.94/4.05 The following Function with conditions 9.94/4.05 "undefined |Falseundefined; 9.94/4.05 " 9.94/4.05 is transformed to 9.94/4.05 "undefined = undefined1; 9.94/4.05 " 9.94/4.05 "undefined0 True = undefined; 9.94/4.05 " 9.94/4.05 "undefined1 = undefined0 False; 9.94/4.05 " 9.94/4.05 The following Function with conditions 9.94/4.05 "take n vx|n <= 0[]; 9.94/4.05 take vy [] = []; 9.94/4.05 take n (x : xs) = x : take (n - 1) xs; 9.94/4.05 " 9.94/4.05 is transformed to 9.94/4.05 "take n vx = take3 n vx; 9.94/4.05 take vy [] = take1 vy []; 9.94/4.05 take n (x : xs) = take0 n (x : xs); 9.94/4.05 " 9.94/4.05 "take0 n (x : xs) = x : take (n - 1) xs; 9.94/4.05 " 9.94/4.05 "take1 vy [] = []; 9.94/4.05 take1 wv ww = take0 wv ww; 9.94/4.05 " 9.94/4.05 "take2 n vx True = []; 9.94/4.05 take2 n vx False = take1 n vx; 9.94/4.05 " 9.94/4.05 "take3 n vx = take2 n vx (n <= 0); 9.94/4.05 take3 wx wy = take1 wx wy; 9.94/4.05 " 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (4) 9.94/4.05 Obligation: 9.94/4.05 mainModule Main 9.94/4.05 module Main where { 9.94/4.05 import qualified Prelude; 9.94/4.05 } 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (5) NumRed (SOUND) 9.94/4.05 Num Reduction:All numbers are transformed to their corresponding representation with Succ, Pred and Zero. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (6) 9.94/4.05 Obligation: 9.94/4.05 mainModule Main 9.94/4.05 module Main where { 9.94/4.05 import qualified Prelude; 9.94/4.05 } 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (7) Narrow (SOUND) 9.94/4.05 Haskell To QDPs 9.94/4.05 9.94/4.05 digraph dp_graph { 9.94/4.05 node [outthreshold=100, inthreshold=100];1[label="take",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 9.94/4.05 3[label="take wz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 9.94/4.05 4[label="take wz3 wz4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 9.94/4.05 5[label="take3 wz3 wz4",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 9.94/4.05 6[label="take2 wz3 wz4 (wz3 <= Pos Zero)",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 9.94/4.05 7[label="take2 wz3 wz4 (compare wz3 (Pos Zero) /= GT)",fontsize=16,color="black",shape="box"];7 -> 8[label="",style="solid", color="black", weight=3]; 9.94/4.05 8[label="take2 wz3 wz4 (not (compare wz3 (Pos Zero) == GT))",fontsize=16,color="black",shape="box"];8 -> 9[label="",style="solid", color="black", weight=3]; 9.94/4.05 9[label="take2 wz3 wz4 (not (primCmpInt wz3 (Pos Zero) == GT))",fontsize=16,color="burlywood",shape="box"];48[label="wz3/Pos wz30",fontsize=10,color="white",style="solid",shape="box"];9 -> 48[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 48 -> 10[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 49[label="wz3/Neg wz30",fontsize=10,color="white",style="solid",shape="box"];9 -> 49[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 49 -> 11[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 10[label="take2 (Pos wz30) wz4 (not (primCmpInt (Pos wz30) (Pos Zero) == GT))",fontsize=16,color="burlywood",shape="box"];50[label="wz30/Succ wz300",fontsize=10,color="white",style="solid",shape="box"];10 -> 50[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 50 -> 12[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 51[label="wz30/Zero",fontsize=10,color="white",style="solid",shape="box"];10 -> 51[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 51 -> 13[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 11[label="take2 (Neg wz30) wz4 (not (primCmpInt (Neg wz30) (Pos Zero) == GT))",fontsize=16,color="burlywood",shape="box"];52[label="wz30/Succ wz300",fontsize=10,color="white",style="solid",shape="box"];11 -> 52[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 52 -> 14[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 53[label="wz30/Zero",fontsize=10,color="white",style="solid",shape="box"];11 -> 53[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 53 -> 15[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 12[label="take2 (Pos (Succ wz300)) wz4 (not (primCmpInt (Pos (Succ wz300)) (Pos Zero) == GT))",fontsize=16,color="black",shape="box"];12 -> 16[label="",style="solid", color="black", weight=3]; 9.94/4.05 13[label="take2 (Pos Zero) wz4 (not (primCmpInt (Pos Zero) (Pos Zero) == GT))",fontsize=16,color="black",shape="box"];13 -> 17[label="",style="solid", color="black", weight=3]; 9.94/4.05 14[label="take2 (Neg (Succ wz300)) wz4 (not (primCmpInt (Neg (Succ wz300)) (Pos Zero) == GT))",fontsize=16,color="black",shape="box"];14 -> 18[label="",style="solid", color="black", weight=3]; 9.94/4.05 15[label="take2 (Neg Zero) wz4 (not (primCmpInt (Neg Zero) (Pos Zero) == GT))",fontsize=16,color="black",shape="box"];15 -> 19[label="",style="solid", color="black", weight=3]; 9.94/4.05 16[label="take2 (Pos (Succ wz300)) wz4 (not (primCmpNat (Succ wz300) Zero == GT))",fontsize=16,color="black",shape="box"];16 -> 20[label="",style="solid", color="black", weight=3]; 9.94/4.05 17[label="take2 (Pos Zero) wz4 (not (EQ == GT))",fontsize=16,color="black",shape="box"];17 -> 21[label="",style="solid", color="black", weight=3]; 9.94/4.05 18[label="take2 (Neg (Succ wz300)) wz4 (not (LT == GT))",fontsize=16,color="black",shape="box"];18 -> 22[label="",style="solid", color="black", weight=3]; 9.94/4.05 19[label="take2 (Neg Zero) wz4 (not (EQ == GT))",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3]; 9.94/4.05 20[label="take2 (Pos (Succ wz300)) wz4 (not (GT == GT))",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3]; 9.94/4.05 21[label="take2 (Pos Zero) wz4 (not False)",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3]; 9.94/4.05 22[label="take2 (Neg (Succ wz300)) wz4 (not False)",fontsize=16,color="black",shape="box"];22 -> 26[label="",style="solid", color="black", weight=3]; 9.94/4.05 23[label="take2 (Neg Zero) wz4 (not False)",fontsize=16,color="black",shape="box"];23 -> 27[label="",style="solid", color="black", weight=3]; 9.94/4.05 24[label="take2 (Pos (Succ wz300)) wz4 (not True)",fontsize=16,color="black",shape="box"];24 -> 28[label="",style="solid", color="black", weight=3]; 9.94/4.05 25[label="take2 (Pos Zero) wz4 True",fontsize=16,color="black",shape="box"];25 -> 29[label="",style="solid", color="black", weight=3]; 9.94/4.05 26[label="take2 (Neg (Succ wz300)) wz4 True",fontsize=16,color="black",shape="box"];26 -> 30[label="",style="solid", color="black", weight=3]; 9.94/4.05 27[label="take2 (Neg Zero) wz4 True",fontsize=16,color="black",shape="box"];27 -> 31[label="",style="solid", color="black", weight=3]; 9.94/4.05 28[label="take2 (Pos (Succ wz300)) wz4 False",fontsize=16,color="black",shape="box"];28 -> 32[label="",style="solid", color="black", weight=3]; 9.94/4.05 29[label="[]",fontsize=16,color="green",shape="box"];30[label="[]",fontsize=16,color="green",shape="box"];31[label="[]",fontsize=16,color="green",shape="box"];32[label="take1 (Pos (Succ wz300)) wz4",fontsize=16,color="burlywood",shape="box"];54[label="wz4/wz40 : wz41",fontsize=10,color="white",style="solid",shape="box"];32 -> 54[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 54 -> 33[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 55[label="wz4/[]",fontsize=10,color="white",style="solid",shape="box"];32 -> 55[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 55 -> 34[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 33[label="take1 (Pos (Succ wz300)) (wz40 : wz41)",fontsize=16,color="black",shape="box"];33 -> 35[label="",style="solid", color="black", weight=3]; 9.94/4.05 34[label="take1 (Pos (Succ wz300)) []",fontsize=16,color="black",shape="box"];34 -> 36[label="",style="solid", color="black", weight=3]; 9.94/4.05 35[label="take0 (Pos (Succ wz300)) (wz40 : wz41)",fontsize=16,color="black",shape="box"];35 -> 37[label="",style="solid", color="black", weight=3]; 9.94/4.05 36[label="[]",fontsize=16,color="green",shape="box"];37[label="wz40 : take (Pos (Succ wz300) - Pos (Succ Zero)) wz41",fontsize=16,color="green",shape="box"];37 -> 38[label="",style="dashed", color="green", weight=3]; 9.94/4.05 38 -> 4[label="",style="dashed", color="red", weight=0]; 9.94/4.05 38[label="take (Pos (Succ wz300) - Pos (Succ Zero)) wz41",fontsize=16,color="magenta"];38 -> 39[label="",style="dashed", color="magenta", weight=3]; 9.94/4.05 38 -> 40[label="",style="dashed", color="magenta", weight=3]; 9.94/4.05 39[label="wz41",fontsize=16,color="green",shape="box"];40[label="Pos (Succ wz300) - Pos (Succ Zero)",fontsize=16,color="black",shape="box"];40 -> 41[label="",style="solid", color="black", weight=3]; 9.94/4.05 41[label="primMinusInt (Pos (Succ wz300)) (Pos (Succ Zero))",fontsize=16,color="black",shape="box"];41 -> 42[label="",style="solid", color="black", weight=3]; 9.94/4.05 42[label="primMinusNat (Succ wz300) (Succ Zero)",fontsize=16,color="black",shape="box"];42 -> 43[label="",style="solid", color="black", weight=3]; 9.94/4.05 43[label="primMinusNat wz300 Zero",fontsize=16,color="burlywood",shape="box"];56[label="wz300/Succ wz3000",fontsize=10,color="white",style="solid",shape="box"];43 -> 56[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 56 -> 44[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 57[label="wz300/Zero",fontsize=10,color="white",style="solid",shape="box"];43 -> 57[label="",style="solid", color="burlywood", weight=9]; 9.94/4.05 57 -> 45[label="",style="solid", color="burlywood", weight=3]; 9.94/4.05 44[label="primMinusNat (Succ wz3000) Zero",fontsize=16,color="black",shape="box"];44 -> 46[label="",style="solid", color="black", weight=3]; 9.94/4.05 45[label="primMinusNat Zero Zero",fontsize=16,color="black",shape="box"];45 -> 47[label="",style="solid", color="black", weight=3]; 9.94/4.05 46[label="Pos (Succ wz3000)",fontsize=16,color="green",shape="box"];47[label="Pos Zero",fontsize=16,color="green",shape="box"];} 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (8) 9.94/4.05 Obligation: 9.94/4.05 Q DP problem: 9.94/4.05 The TRS P consists of the following rules: 9.94/4.05 9.94/4.05 new_take(Pos(Succ(wz300)), :(wz40, wz41), h) -> new_take(new_primMinusNat(wz300), wz41, h) 9.94/4.05 9.94/4.05 The TRS R consists of the following rules: 9.94/4.05 9.94/4.05 new_primMinusNat(Succ(wz3000)) -> Pos(Succ(wz3000)) 9.94/4.05 new_primMinusNat(Zero) -> Pos(Zero) 9.94/4.05 9.94/4.05 The set Q consists of the following terms: 9.94/4.05 9.94/4.05 new_primMinusNat(Succ(x0)) 9.94/4.05 new_primMinusNat(Zero) 9.94/4.05 9.94/4.05 We have to consider all minimal (P,Q,R)-chains. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (9) TransformationProof (EQUIVALENT) 9.94/4.05 By narrowing [LPAR04] the rule new_take(Pos(Succ(wz300)), :(wz40, wz41), h) -> new_take(new_primMinusNat(wz300), wz41, h) at position [0] we obtained the following new rules [LPAR04]: 9.94/4.05 9.94/4.05 (new_take(Pos(Succ(Succ(x0))), :(y1, y2), y3) -> new_take(Pos(Succ(x0)), y2, y3),new_take(Pos(Succ(Succ(x0))), :(y1, y2), y3) -> new_take(Pos(Succ(x0)), y2, y3)) 9.94/4.05 (new_take(Pos(Succ(Zero)), :(y1, y2), y3) -> new_take(Pos(Zero), y2, y3),new_take(Pos(Succ(Zero)), :(y1, y2), y3) -> new_take(Pos(Zero), y2, y3)) 9.94/4.05 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (10) 9.94/4.05 Obligation: 9.94/4.05 Q DP problem: 9.94/4.05 The TRS P consists of the following rules: 9.94/4.05 9.94/4.05 new_take(Pos(Succ(Succ(x0))), :(y1, y2), y3) -> new_take(Pos(Succ(x0)), y2, y3) 9.94/4.05 new_take(Pos(Succ(Zero)), :(y1, y2), y3) -> new_take(Pos(Zero), y2, y3) 9.94/4.05 9.94/4.05 The TRS R consists of the following rules: 9.94/4.05 9.94/4.05 new_primMinusNat(Succ(wz3000)) -> Pos(Succ(wz3000)) 9.94/4.05 new_primMinusNat(Zero) -> Pos(Zero) 9.94/4.05 9.94/4.05 The set Q consists of the following terms: 9.94/4.05 9.94/4.05 new_primMinusNat(Succ(x0)) 9.94/4.05 new_primMinusNat(Zero) 9.94/4.05 9.94/4.05 We have to consider all minimal (P,Q,R)-chains. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (11) DependencyGraphProof (EQUIVALENT) 9.94/4.05 The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (12) 9.94/4.05 Obligation: 9.94/4.05 Q DP problem: 9.94/4.05 The TRS P consists of the following rules: 9.94/4.05 9.94/4.05 new_take(Pos(Succ(Succ(x0))), :(y1, y2), y3) -> new_take(Pos(Succ(x0)), y2, y3) 9.94/4.05 9.94/4.05 The TRS R consists of the following rules: 9.94/4.05 9.94/4.05 new_primMinusNat(Succ(wz3000)) -> Pos(Succ(wz3000)) 9.94/4.05 new_primMinusNat(Zero) -> Pos(Zero) 9.94/4.05 9.94/4.05 The set Q consists of the following terms: 9.94/4.05 9.94/4.05 new_primMinusNat(Succ(x0)) 9.94/4.05 new_primMinusNat(Zero) 9.94/4.05 9.94/4.05 We have to consider all minimal (P,Q,R)-chains. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (13) UsableRulesProof (EQUIVALENT) 9.94/4.05 As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (14) 9.94/4.05 Obligation: 9.94/4.05 Q DP problem: 9.94/4.05 The TRS P consists of the following rules: 9.94/4.05 9.94/4.05 new_take(Pos(Succ(Succ(x0))), :(y1, y2), y3) -> new_take(Pos(Succ(x0)), y2, y3) 9.94/4.05 9.94/4.05 R is empty. 9.94/4.05 The set Q consists of the following terms: 9.94/4.05 9.94/4.05 new_primMinusNat(Succ(x0)) 9.94/4.05 new_primMinusNat(Zero) 9.94/4.05 9.94/4.05 We have to consider all minimal (P,Q,R)-chains. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (15) QReductionProof (EQUIVALENT) 9.94/4.05 We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. 9.94/4.05 9.94/4.05 new_primMinusNat(Succ(x0)) 9.94/4.05 new_primMinusNat(Zero) 9.94/4.05 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (16) 9.94/4.05 Obligation: 9.94/4.05 Q DP problem: 9.94/4.05 The TRS P consists of the following rules: 9.94/4.05 9.94/4.05 new_take(Pos(Succ(Succ(x0))), :(y1, y2), y3) -> new_take(Pos(Succ(x0)), y2, y3) 9.94/4.05 9.94/4.05 R is empty. 9.94/4.05 Q is empty. 9.94/4.05 We have to consider all minimal (P,Q,R)-chains. 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (17) QDPSizeChangeProof (EQUIVALENT) 9.94/4.05 By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 9.94/4.05 9.94/4.05 From the DPs we obtained the following set of size-change graphs: 9.94/4.05 *new_take(Pos(Succ(Succ(x0))), :(y1, y2), y3) -> new_take(Pos(Succ(x0)), y2, y3) 9.94/4.05 The graph contains the following edges 2 > 2, 3 >= 3 9.94/4.05 9.94/4.05 9.94/4.05 ---------------------------------------- 9.94/4.05 9.94/4.05 (18) 9.94/4.05 YES 10.05/4.10 EOF