/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.pl /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern isort(g,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) UndefinedPredicateHandlerProof [SOUND, 0 ms] (2) Prolog (3) PrologToPiTRSProof [SOUND, 7 ms] (4) PiTRS (5) DependencyPairsProof [EQUIVALENT, 0 ms] (6) PiDP (7) DependencyGraphProof [EQUIVALENT, 0 ms] (8) AND (9) PiDP (10) UsableRulesProof [EQUIVALENT, 0 ms] (11) PiDP (12) PiDPToQDPProof [SOUND, 0 ms] (13) QDP (14) QDPSizeChangeProof [EQUIVALENT, 1 ms] (15) YES (16) PiDP (17) UsableRulesProof [EQUIVALENT, 0 ms] (18) PiDP (19) PiDPToQDPProof [SOUND, 0 ms] (20) QDP (21) QDPSizeChangeProof [EQUIVALENT, 0 ms] (22) YES ---------------------------------------- (0) Obligation: Clauses: insert(X, [], .(X, [])). insert(X, .(Y, Ys), .(X, .(Y, Ys))) :- =<(X, Y). insert(X, .(Y, Ys), .(Y, Tail)) :- ','(>(X, Y), insert(X, Ys, Tail)). isort([], []). isort(.(X, Xs), Result) :- ','(isort(Xs, SortedTail), insert(X, SortedTail, Result)). Query: isort(g,a) ---------------------------------------- (1) UndefinedPredicateHandlerProof (SOUND) Added facts for all undefined predicates [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: insert(X, [], .(X, [])). insert(X, .(Y, Ys), .(X, .(Y, Ys))) :- =<(X, Y). insert(X, .(Y, Ys), .(Y, Tail)) :- ','(>(X, Y), insert(X, Ys, Tail)). isort([], []). isort(.(X, Xs), Result) :- ','(isort(Xs, SortedTail), insert(X, SortedTail, Result)). =<(X0, X1). >(X0, X1). Query: isort(g,a) ---------------------------------------- (3) PrologToPiTRSProof (SOUND) We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: isort_in_2: (b,f) insert_in_3: (b,b,f) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: isort_in_ga([], []) -> isort_out_ga([], []) isort_in_ga(.(X, Xs), Result) -> U4_ga(X, Xs, Result, isort_in_ga(Xs, SortedTail)) U4_ga(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> U5_ga(X, Xs, Result, insert_in_gga(X, SortedTail, Result)) insert_in_gga(X, [], .(X, [])) -> insert_out_gga(X, [], .(X, [])) insert_in_gga(X, .(Y, Ys), .(X, .(Y, Ys))) -> U1_gga(X, Y, Ys, =<_in_gg(X, Y)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U1_gga(X, Y, Ys, =<_out_gg(X, Y)) -> insert_out_gga(X, .(Y, Ys), .(X, .(Y, Ys))) insert_in_gga(X, .(Y, Ys), .(Y, Tail)) -> U2_gga(X, Y, Ys, Tail, >_in_gg(X, Y)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gga(X, Y, Ys, Tail, >_out_gg(X, Y)) -> U3_gga(X, Y, Ys, Tail, insert_in_gga(X, Ys, Tail)) U3_gga(X, Y, Ys, Tail, insert_out_gga(X, Ys, Tail)) -> insert_out_gga(X, .(Y, Ys), .(Y, Tail)) U5_ga(X, Xs, Result, insert_out_gga(X, SortedTail, Result)) -> isort_out_ga(.(X, Xs), Result) The argument filtering Pi contains the following mapping: isort_in_ga(x1, x2) = isort_in_ga(x1) [] = [] isort_out_ga(x1, x2) = isort_out_ga(x2) .(x1, x2) = .(x1, x2) U4_ga(x1, x2, x3, x4) = U4_ga(x1, x4) U5_ga(x1, x2, x3, x4) = U5_ga(x4) insert_in_gga(x1, x2, x3) = insert_in_gga(x1, x2) insert_out_gga(x1, x2, x3) = insert_out_gga(x3) U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x3, x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U2_gga(x1, x2, x3, x4, x5) = U2_gga(x1, x2, x3, x5) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gga(x1, x2, x3, x4, x5) = U3_gga(x2, x5) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (4) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: isort_in_ga([], []) -> isort_out_ga([], []) isort_in_ga(.(X, Xs), Result) -> U4_ga(X, Xs, Result, isort_in_ga(Xs, SortedTail)) U4_ga(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> U5_ga(X, Xs, Result, insert_in_gga(X, SortedTail, Result)) insert_in_gga(X, [], .(X, [])) -> insert_out_gga(X, [], .(X, [])) insert_in_gga(X, .(Y, Ys), .(X, .(Y, Ys))) -> U1_gga(X, Y, Ys, =<_in_gg(X, Y)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U1_gga(X, Y, Ys, =<_out_gg(X, Y)) -> insert_out_gga(X, .(Y, Ys), .(X, .(Y, Ys))) insert_in_gga(X, .(Y, Ys), .(Y, Tail)) -> U2_gga(X, Y, Ys, Tail, >_in_gg(X, Y)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gga(X, Y, Ys, Tail, >_out_gg(X, Y)) -> U3_gga(X, Y, Ys, Tail, insert_in_gga(X, Ys, Tail)) U3_gga(X, Y, Ys, Tail, insert_out_gga(X, Ys, Tail)) -> insert_out_gga(X, .(Y, Ys), .(Y, Tail)) U5_ga(X, Xs, Result, insert_out_gga(X, SortedTail, Result)) -> isort_out_ga(.(X, Xs), Result) The argument filtering Pi contains the following mapping: isort_in_ga(x1, x2) = isort_in_ga(x1) [] = [] isort_out_ga(x1, x2) = isort_out_ga(x2) .(x1, x2) = .(x1, x2) U4_ga(x1, x2, x3, x4) = U4_ga(x1, x4) U5_ga(x1, x2, x3, x4) = U5_ga(x4) insert_in_gga(x1, x2, x3) = insert_in_gga(x1, x2) insert_out_gga(x1, x2, x3) = insert_out_gga(x3) U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x3, x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U2_gga(x1, x2, x3, x4, x5) = U2_gga(x1, x2, x3, x5) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gga(x1, x2, x3, x4, x5) = U3_gga(x2, x5) ---------------------------------------- (5) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem: Pi DP problem: The TRS P consists of the following rules: ISORT_IN_GA(.(X, Xs), Result) -> U4_GA(X, Xs, Result, isort_in_ga(Xs, SortedTail)) ISORT_IN_GA(.(X, Xs), Result) -> ISORT_IN_GA(Xs, SortedTail) U4_GA(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> U5_GA(X, Xs, Result, insert_in_gga(X, SortedTail, Result)) U4_GA(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> INSERT_IN_GGA(X, SortedTail, Result) INSERT_IN_GGA(X, .(Y, Ys), .(X, .(Y, Ys))) -> U1_GGA(X, Y, Ys, =<_in_gg(X, Y)) INSERT_IN_GGA(X, .(Y, Ys), .(X, .(Y, Ys))) -> =<_IN_GG(X, Y) INSERT_IN_GGA(X, .(Y, Ys), .(Y, Tail)) -> U2_GGA(X, Y, Ys, Tail, >_in_gg(X, Y)) INSERT_IN_GGA(X, .(Y, Ys), .(Y, Tail)) -> >_IN_GG(X, Y) U2_GGA(X, Y, Ys, Tail, >_out_gg(X, Y)) -> U3_GGA(X, Y, Ys, Tail, insert_in_gga(X, Ys, Tail)) U2_GGA(X, Y, Ys, Tail, >_out_gg(X, Y)) -> INSERT_IN_GGA(X, Ys, Tail) The TRS R consists of the following rules: isort_in_ga([], []) -> isort_out_ga([], []) isort_in_ga(.(X, Xs), Result) -> U4_ga(X, Xs, Result, isort_in_ga(Xs, SortedTail)) U4_ga(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> U5_ga(X, Xs, Result, insert_in_gga(X, SortedTail, Result)) insert_in_gga(X, [], .(X, [])) -> insert_out_gga(X, [], .(X, [])) insert_in_gga(X, .(Y, Ys), .(X, .(Y, Ys))) -> U1_gga(X, Y, Ys, =<_in_gg(X, Y)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U1_gga(X, Y, Ys, =<_out_gg(X, Y)) -> insert_out_gga(X, .(Y, Ys), .(X, .(Y, Ys))) insert_in_gga(X, .(Y, Ys), .(Y, Tail)) -> U2_gga(X, Y, Ys, Tail, >_in_gg(X, Y)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gga(X, Y, Ys, Tail, >_out_gg(X, Y)) -> U3_gga(X, Y, Ys, Tail, insert_in_gga(X, Ys, Tail)) U3_gga(X, Y, Ys, Tail, insert_out_gga(X, Ys, Tail)) -> insert_out_gga(X, .(Y, Ys), .(Y, Tail)) U5_ga(X, Xs, Result, insert_out_gga(X, SortedTail, Result)) -> isort_out_ga(.(X, Xs), Result) The argument filtering Pi contains the following mapping: isort_in_ga(x1, x2) = isort_in_ga(x1) [] = [] isort_out_ga(x1, x2) = isort_out_ga(x2) .(x1, x2) = .(x1, x2) U4_ga(x1, x2, x3, x4) = U4_ga(x1, x4) U5_ga(x1, x2, x3, x4) = U5_ga(x4) insert_in_gga(x1, x2, x3) = insert_in_gga(x1, x2) insert_out_gga(x1, x2, x3) = insert_out_gga(x3) U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x3, x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U2_gga(x1, x2, x3, x4, x5) = U2_gga(x1, x2, x3, x5) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gga(x1, x2, x3, x4, x5) = U3_gga(x2, x5) ISORT_IN_GA(x1, x2) = ISORT_IN_GA(x1) U4_GA(x1, x2, x3, x4) = U4_GA(x1, x4) U5_GA(x1, x2, x3, x4) = U5_GA(x4) INSERT_IN_GGA(x1, x2, x3) = INSERT_IN_GGA(x1, x2) U1_GGA(x1, x2, x3, x4) = U1_GGA(x1, x2, x3, x4) =<_IN_GG(x1, x2) = =<_IN_GG(x1, x2) U2_GGA(x1, x2, x3, x4, x5) = U2_GGA(x1, x2, x3, x5) >_IN_GG(x1, x2) = >_IN_GG(x1, x2) U3_GGA(x1, x2, x3, x4, x5) = U3_GGA(x2, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: ISORT_IN_GA(.(X, Xs), Result) -> U4_GA(X, Xs, Result, isort_in_ga(Xs, SortedTail)) ISORT_IN_GA(.(X, Xs), Result) -> ISORT_IN_GA(Xs, SortedTail) U4_GA(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> U5_GA(X, Xs, Result, insert_in_gga(X, SortedTail, Result)) U4_GA(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> INSERT_IN_GGA(X, SortedTail, Result) INSERT_IN_GGA(X, .(Y, Ys), .(X, .(Y, Ys))) -> U1_GGA(X, Y, Ys, =<_in_gg(X, Y)) INSERT_IN_GGA(X, .(Y, Ys), .(X, .(Y, Ys))) -> =<_IN_GG(X, Y) INSERT_IN_GGA(X, .(Y, Ys), .(Y, Tail)) -> U2_GGA(X, Y, Ys, Tail, >_in_gg(X, Y)) INSERT_IN_GGA(X, .(Y, Ys), .(Y, Tail)) -> >_IN_GG(X, Y) U2_GGA(X, Y, Ys, Tail, >_out_gg(X, Y)) -> U3_GGA(X, Y, Ys, Tail, insert_in_gga(X, Ys, Tail)) U2_GGA(X, Y, Ys, Tail, >_out_gg(X, Y)) -> INSERT_IN_GGA(X, Ys, Tail) The TRS R consists of the following rules: isort_in_ga([], []) -> isort_out_ga([], []) isort_in_ga(.(X, Xs), Result) -> U4_ga(X, Xs, Result, isort_in_ga(Xs, SortedTail)) U4_ga(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> U5_ga(X, Xs, Result, insert_in_gga(X, SortedTail, Result)) insert_in_gga(X, [], .(X, [])) -> insert_out_gga(X, [], .(X, [])) insert_in_gga(X, .(Y, Ys), .(X, .(Y, Ys))) -> U1_gga(X, Y, Ys, =<_in_gg(X, Y)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U1_gga(X, Y, Ys, =<_out_gg(X, Y)) -> insert_out_gga(X, .(Y, Ys), .(X, .(Y, Ys))) insert_in_gga(X, .(Y, Ys), .(Y, Tail)) -> U2_gga(X, Y, Ys, Tail, >_in_gg(X, Y)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gga(X, Y, Ys, Tail, >_out_gg(X, Y)) -> U3_gga(X, Y, Ys, Tail, insert_in_gga(X, Ys, Tail)) U3_gga(X, Y, Ys, Tail, insert_out_gga(X, Ys, Tail)) -> insert_out_gga(X, .(Y, Ys), .(Y, Tail)) U5_ga(X, Xs, Result, insert_out_gga(X, SortedTail, Result)) -> isort_out_ga(.(X, Xs), Result) The argument filtering Pi contains the following mapping: isort_in_ga(x1, x2) = isort_in_ga(x1) [] = [] isort_out_ga(x1, x2) = isort_out_ga(x2) .(x1, x2) = .(x1, x2) U4_ga(x1, x2, x3, x4) = U4_ga(x1, x4) U5_ga(x1, x2, x3, x4) = U5_ga(x4) insert_in_gga(x1, x2, x3) = insert_in_gga(x1, x2) insert_out_gga(x1, x2, x3) = insert_out_gga(x3) U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x3, x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U2_gga(x1, x2, x3, x4, x5) = U2_gga(x1, x2, x3, x5) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gga(x1, x2, x3, x4, x5) = U3_gga(x2, x5) ISORT_IN_GA(x1, x2) = ISORT_IN_GA(x1) U4_GA(x1, x2, x3, x4) = U4_GA(x1, x4) U5_GA(x1, x2, x3, x4) = U5_GA(x4) INSERT_IN_GGA(x1, x2, x3) = INSERT_IN_GGA(x1, x2) U1_GGA(x1, x2, x3, x4) = U1_GGA(x1, x2, x3, x4) =<_IN_GG(x1, x2) = =<_IN_GG(x1, x2) U2_GGA(x1, x2, x3, x4, x5) = U2_GGA(x1, x2, x3, x5) >_IN_GG(x1, x2) = >_IN_GG(x1, x2) U3_GGA(x1, x2, x3, x4, x5) = U3_GGA(x2, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 7 less nodes. ---------------------------------------- (8) Complex Obligation (AND) ---------------------------------------- (9) Obligation: Pi DP problem: The TRS P consists of the following rules: INSERT_IN_GGA(X, .(Y, Ys), .(Y, Tail)) -> U2_GGA(X, Y, Ys, Tail, >_in_gg(X, Y)) U2_GGA(X, Y, Ys, Tail, >_out_gg(X, Y)) -> INSERT_IN_GGA(X, Ys, Tail) The TRS R consists of the following rules: isort_in_ga([], []) -> isort_out_ga([], []) isort_in_ga(.(X, Xs), Result) -> U4_ga(X, Xs, Result, isort_in_ga(Xs, SortedTail)) U4_ga(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> U5_ga(X, Xs, Result, insert_in_gga(X, SortedTail, Result)) insert_in_gga(X, [], .(X, [])) -> insert_out_gga(X, [], .(X, [])) insert_in_gga(X, .(Y, Ys), .(X, .(Y, Ys))) -> U1_gga(X, Y, Ys, =<_in_gg(X, Y)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U1_gga(X, Y, Ys, =<_out_gg(X, Y)) -> insert_out_gga(X, .(Y, Ys), .(X, .(Y, Ys))) insert_in_gga(X, .(Y, Ys), .(Y, Tail)) -> U2_gga(X, Y, Ys, Tail, >_in_gg(X, Y)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gga(X, Y, Ys, Tail, >_out_gg(X, Y)) -> U3_gga(X, Y, Ys, Tail, insert_in_gga(X, Ys, Tail)) U3_gga(X, Y, Ys, Tail, insert_out_gga(X, Ys, Tail)) -> insert_out_gga(X, .(Y, Ys), .(Y, Tail)) U5_ga(X, Xs, Result, insert_out_gga(X, SortedTail, Result)) -> isort_out_ga(.(X, Xs), Result) The argument filtering Pi contains the following mapping: isort_in_ga(x1, x2) = isort_in_ga(x1) [] = [] isort_out_ga(x1, x2) = isort_out_ga(x2) .(x1, x2) = .(x1, x2) U4_ga(x1, x2, x3, x4) = U4_ga(x1, x4) U5_ga(x1, x2, x3, x4) = U5_ga(x4) insert_in_gga(x1, x2, x3) = insert_in_gga(x1, x2) insert_out_gga(x1, x2, x3) = insert_out_gga(x3) U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x3, x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U2_gga(x1, x2, x3, x4, x5) = U2_gga(x1, x2, x3, x5) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gga(x1, x2, x3, x4, x5) = U3_gga(x2, x5) INSERT_IN_GGA(x1, x2, x3) = INSERT_IN_GGA(x1, x2) U2_GGA(x1, x2, x3, x4, x5) = U2_GGA(x1, x2, x3, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (10) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (11) Obligation: Pi DP problem: The TRS P consists of the following rules: INSERT_IN_GGA(X, .(Y, Ys), .(Y, Tail)) -> U2_GGA(X, Y, Ys, Tail, >_in_gg(X, Y)) U2_GGA(X, Y, Ys, Tail, >_out_gg(X, Y)) -> INSERT_IN_GGA(X, Ys, Tail) The TRS R consists of the following rules: >_in_gg(X0, X1) -> >_out_gg(X0, X1) The argument filtering Pi contains the following mapping: .(x1, x2) = .(x1, x2) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg INSERT_IN_GGA(x1, x2, x3) = INSERT_IN_GGA(x1, x2) U2_GGA(x1, x2, x3, x4, x5) = U2_GGA(x1, x2, x3, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (12) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (13) Obligation: Q DP problem: The TRS P consists of the following rules: INSERT_IN_GGA(X, .(Y, Ys)) -> U2_GGA(X, Y, Ys, >_in_gg(X, Y)) U2_GGA(X, Y, Ys, >_out_gg) -> INSERT_IN_GGA(X, Ys) The TRS R consists of the following rules: >_in_gg(X0, X1) -> >_out_gg The set Q consists of the following terms: >_in_gg(x0, x1) We have to consider all (P,Q,R)-chains. ---------------------------------------- (14) QDPSizeChangeProof (EQUIVALENT) 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. From the DPs we obtained the following set of size-change graphs: *U2_GGA(X, Y, Ys, >_out_gg) -> INSERT_IN_GGA(X, Ys) The graph contains the following edges 1 >= 1, 3 >= 2 *INSERT_IN_GGA(X, .(Y, Ys)) -> U2_GGA(X, Y, Ys, >_in_gg(X, Y)) The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3 ---------------------------------------- (15) YES ---------------------------------------- (16) Obligation: Pi DP problem: The TRS P consists of the following rules: ISORT_IN_GA(.(X, Xs), Result) -> ISORT_IN_GA(Xs, SortedTail) The TRS R consists of the following rules: isort_in_ga([], []) -> isort_out_ga([], []) isort_in_ga(.(X, Xs), Result) -> U4_ga(X, Xs, Result, isort_in_ga(Xs, SortedTail)) U4_ga(X, Xs, Result, isort_out_ga(Xs, SortedTail)) -> U5_ga(X, Xs, Result, insert_in_gga(X, SortedTail, Result)) insert_in_gga(X, [], .(X, [])) -> insert_out_gga(X, [], .(X, [])) insert_in_gga(X, .(Y, Ys), .(X, .(Y, Ys))) -> U1_gga(X, Y, Ys, =<_in_gg(X, Y)) =<_in_gg(X0, X1) -> =<_out_gg(X0, X1) U1_gga(X, Y, Ys, =<_out_gg(X, Y)) -> insert_out_gga(X, .(Y, Ys), .(X, .(Y, Ys))) insert_in_gga(X, .(Y, Ys), .(Y, Tail)) -> U2_gga(X, Y, Ys, Tail, >_in_gg(X, Y)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gga(X, Y, Ys, Tail, >_out_gg(X, Y)) -> U3_gga(X, Y, Ys, Tail, insert_in_gga(X, Ys, Tail)) U3_gga(X, Y, Ys, Tail, insert_out_gga(X, Ys, Tail)) -> insert_out_gga(X, .(Y, Ys), .(Y, Tail)) U5_ga(X, Xs, Result, insert_out_gga(X, SortedTail, Result)) -> isort_out_ga(.(X, Xs), Result) The argument filtering Pi contains the following mapping: isort_in_ga(x1, x2) = isort_in_ga(x1) [] = [] isort_out_ga(x1, x2) = isort_out_ga(x2) .(x1, x2) = .(x1, x2) U4_ga(x1, x2, x3, x4) = U4_ga(x1, x4) U5_ga(x1, x2, x3, x4) = U5_ga(x4) insert_in_gga(x1, x2, x3) = insert_in_gga(x1, x2) insert_out_gga(x1, x2, x3) = insert_out_gga(x3) U1_gga(x1, x2, x3, x4) = U1_gga(x1, x2, x3, x4) =<_in_gg(x1, x2) = =<_in_gg(x1, x2) =<_out_gg(x1, x2) = =<_out_gg U2_gga(x1, x2, x3, x4, x5) = U2_gga(x1, x2, x3, x5) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gga(x1, x2, x3, x4, x5) = U3_gga(x2, x5) ISORT_IN_GA(x1, x2) = ISORT_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (17) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (18) Obligation: Pi DP problem: The TRS P consists of the following rules: ISORT_IN_GA(.(X, Xs), Result) -> ISORT_IN_GA(Xs, SortedTail) R is empty. The argument filtering Pi contains the following mapping: .(x1, x2) = .(x1, x2) ISORT_IN_GA(x1, x2) = ISORT_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (19) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (20) Obligation: Q DP problem: The TRS P consists of the following rules: ISORT_IN_GA(.(X, Xs)) -> ISORT_IN_GA(Xs) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (21) QDPSizeChangeProof (EQUIVALENT) 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. From the DPs we obtained the following set of size-change graphs: *ISORT_IN_GA(.(X, Xs)) -> ISORT_IN_GA(Xs) The graph contains the following edges 1 > 1 ---------------------------------------- (22) YES