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