/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 insert_at(g,g,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, 0 ms] (4) PiTRS (5) DependencyPairsProof [EQUIVALENT, 0 ms] (6) PiDP (7) DependencyGraphProof [EQUIVALENT, 0 ms] (8) PiDP (9) UsableRulesProof [EQUIVALENT, 0 ms] (10) PiDP (11) PiDPToQDPProof [SOUND, 0 ms] (12) QDP (13) QDPSizeChangeProof [EQUIVALENT, 0 ms] (14) YES ---------------------------------------- (0) Obligation: Clauses: insert_at(X, L, K, R) :- remove_at(X, R, K, L). remove_at(X, .(X, Xs), 1, Xs). remove_at(X, .(Y, Xs), K, .(Y, Ys)) :- ','(>(K, 1), ','(is(K1, -(K, 1)), remove_at(X, Xs, K1, Ys))). Query: insert_at(g,g,g,a) ---------------------------------------- (1) UndefinedPredicateHandlerProof (SOUND) Added facts for all undefined predicates [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: insert_at(X, L, K, R) :- remove_at(X, R, K, L). remove_at(X, .(X, Xs), 1, Xs). remove_at(X, .(Y, Xs), K, .(Y, Ys)) :- ','(>(K, 1), ','(is(K1, -(K, 1)), remove_at(X, Xs, K1, Ys))). >(X0, X1). is(X0, X1). Query: insert_at(g,g,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: insert_at_in_4: (b,b,b,f) remove_at_in_4: (b,f,b,b) (b,f,f,b) Transforming Prolog into the following Term Rewriting System: Pi-finite rewrite system: The TRS R consists of the following rules: insert_at_in_ggga(X, L, K, R) -> U1_ggga(X, L, K, R, remove_at_in_gagg(X, R, K, L)) remove_at_in_gagg(X, .(X, Xs), 1, Xs) -> remove_at_out_gagg(X, .(X, Xs), 1, Xs) remove_at_in_gagg(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gagg(X, Y, Xs, K, Ys, >_in_gg(K, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gagg(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> U3_gagg(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U3_gagg(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gagg(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) remove_at_in_gaag(X, .(X, Xs), 1, Xs) -> remove_at_out_gaag(X, .(X, Xs), 1, Xs) remove_at_in_gaag(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gaag(X, Y, Xs, K, Ys, >_in_ag(K, 1)) >_in_ag(X0, X1) -> >_out_ag(X0, X1) U2_gaag(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_gaag(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U3_gaag(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gaag(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U4_gaag(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gaag(X, .(Y, Xs), K, .(Y, Ys)) U4_gagg(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gagg(X, .(Y, Xs), K, .(Y, Ys)) U1_ggga(X, L, K, R, remove_at_out_gagg(X, R, K, L)) -> insert_at_out_ggga(X, L, K, R) The argument filtering Pi contains the following mapping: insert_at_in_ggga(x1, x2, x3, x4) = insert_at_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4, x5) = U1_ggga(x5) remove_at_in_gagg(x1, x2, x3, x4) = remove_at_in_gagg(x1, x3, x4) 1 = 1 remove_at_out_gagg(x1, x2, x3, x4) = remove_at_out_gagg(x2) .(x1, x2) = .(x1, x2) U2_gagg(x1, x2, x3, x4, x5, x6) = U2_gagg(x1, x2, x5, x6) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gagg(x1, x2, x3, x4, x5, x6) = U3_gagg(x1, x2, x5, x6) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag -(x1, x2) = -(x2) U4_gagg(x1, x2, x3, x4, x5, x6) = U4_gagg(x2, x6) remove_at_in_gaag(x1, x2, x3, x4) = remove_at_in_gaag(x1, x4) remove_at_out_gaag(x1, x2, x3, x4) = remove_at_out_gaag(x2) U2_gaag(x1, x2, x3, x4, x5, x6) = U2_gaag(x1, x2, x5, x6) >_in_ag(x1, x2) = >_in_ag(x2) >_out_ag(x1, x2) = >_out_ag U3_gaag(x1, x2, x3, x4, x5, x6) = U3_gaag(x1, x2, x5, x6) U4_gaag(x1, x2, x3, x4, x5, x6) = U4_gaag(x2, x6) insert_at_out_ggga(x1, x2, x3, x4) = insert_at_out_ggga(x4) Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog ---------------------------------------- (4) Obligation: Pi-finite rewrite system: The TRS R consists of the following rules: insert_at_in_ggga(X, L, K, R) -> U1_ggga(X, L, K, R, remove_at_in_gagg(X, R, K, L)) remove_at_in_gagg(X, .(X, Xs), 1, Xs) -> remove_at_out_gagg(X, .(X, Xs), 1, Xs) remove_at_in_gagg(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gagg(X, Y, Xs, K, Ys, >_in_gg(K, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gagg(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> U3_gagg(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U3_gagg(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gagg(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) remove_at_in_gaag(X, .(X, Xs), 1, Xs) -> remove_at_out_gaag(X, .(X, Xs), 1, Xs) remove_at_in_gaag(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gaag(X, Y, Xs, K, Ys, >_in_ag(K, 1)) >_in_ag(X0, X1) -> >_out_ag(X0, X1) U2_gaag(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_gaag(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U3_gaag(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gaag(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U4_gaag(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gaag(X, .(Y, Xs), K, .(Y, Ys)) U4_gagg(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gagg(X, .(Y, Xs), K, .(Y, Ys)) U1_ggga(X, L, K, R, remove_at_out_gagg(X, R, K, L)) -> insert_at_out_ggga(X, L, K, R) The argument filtering Pi contains the following mapping: insert_at_in_ggga(x1, x2, x3, x4) = insert_at_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4, x5) = U1_ggga(x5) remove_at_in_gagg(x1, x2, x3, x4) = remove_at_in_gagg(x1, x3, x4) 1 = 1 remove_at_out_gagg(x1, x2, x3, x4) = remove_at_out_gagg(x2) .(x1, x2) = .(x1, x2) U2_gagg(x1, x2, x3, x4, x5, x6) = U2_gagg(x1, x2, x5, x6) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gagg(x1, x2, x3, x4, x5, x6) = U3_gagg(x1, x2, x5, x6) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag -(x1, x2) = -(x2) U4_gagg(x1, x2, x3, x4, x5, x6) = U4_gagg(x2, x6) remove_at_in_gaag(x1, x2, x3, x4) = remove_at_in_gaag(x1, x4) remove_at_out_gaag(x1, x2, x3, x4) = remove_at_out_gaag(x2) U2_gaag(x1, x2, x3, x4, x5, x6) = U2_gaag(x1, x2, x5, x6) >_in_ag(x1, x2) = >_in_ag(x2) >_out_ag(x1, x2) = >_out_ag U3_gaag(x1, x2, x3, x4, x5, x6) = U3_gaag(x1, x2, x5, x6) U4_gaag(x1, x2, x3, x4, x5, x6) = U4_gaag(x2, x6) insert_at_out_ggga(x1, x2, x3, x4) = insert_at_out_ggga(x4) ---------------------------------------- (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: INSERT_AT_IN_GGGA(X, L, K, R) -> U1_GGGA(X, L, K, R, remove_at_in_gagg(X, R, K, L)) INSERT_AT_IN_GGGA(X, L, K, R) -> REMOVE_AT_IN_GAGG(X, R, K, L) REMOVE_AT_IN_GAGG(X, .(Y, Xs), K, .(Y, Ys)) -> U2_GAGG(X, Y, Xs, K, Ys, >_in_gg(K, 1)) REMOVE_AT_IN_GAGG(X, .(Y, Xs), K, .(Y, Ys)) -> >_IN_GG(K, 1) U2_GAGG(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> U3_GAGG(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U2_GAGG(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> IS_IN_AG(K1, -(K, 1)) U3_GAGG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_GAGG(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U3_GAGG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> REMOVE_AT_IN_GAAG(X, Xs, K1, Ys) REMOVE_AT_IN_GAAG(X, .(Y, Xs), K, .(Y, Ys)) -> U2_GAAG(X, Y, Xs, K, Ys, >_in_ag(K, 1)) REMOVE_AT_IN_GAAG(X, .(Y, Xs), K, .(Y, Ys)) -> >_IN_AG(K, 1) U2_GAAG(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_GAAG(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U2_GAAG(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> IS_IN_AG(K1, -(K, 1)) U3_GAAG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_GAAG(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U3_GAAG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> REMOVE_AT_IN_GAAG(X, Xs, K1, Ys) The TRS R consists of the following rules: insert_at_in_ggga(X, L, K, R) -> U1_ggga(X, L, K, R, remove_at_in_gagg(X, R, K, L)) remove_at_in_gagg(X, .(X, Xs), 1, Xs) -> remove_at_out_gagg(X, .(X, Xs), 1, Xs) remove_at_in_gagg(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gagg(X, Y, Xs, K, Ys, >_in_gg(K, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gagg(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> U3_gagg(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U3_gagg(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gagg(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) remove_at_in_gaag(X, .(X, Xs), 1, Xs) -> remove_at_out_gaag(X, .(X, Xs), 1, Xs) remove_at_in_gaag(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gaag(X, Y, Xs, K, Ys, >_in_ag(K, 1)) >_in_ag(X0, X1) -> >_out_ag(X0, X1) U2_gaag(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_gaag(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U3_gaag(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gaag(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U4_gaag(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gaag(X, .(Y, Xs), K, .(Y, Ys)) U4_gagg(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gagg(X, .(Y, Xs), K, .(Y, Ys)) U1_ggga(X, L, K, R, remove_at_out_gagg(X, R, K, L)) -> insert_at_out_ggga(X, L, K, R) The argument filtering Pi contains the following mapping: insert_at_in_ggga(x1, x2, x3, x4) = insert_at_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4, x5) = U1_ggga(x5) remove_at_in_gagg(x1, x2, x3, x4) = remove_at_in_gagg(x1, x3, x4) 1 = 1 remove_at_out_gagg(x1, x2, x3, x4) = remove_at_out_gagg(x2) .(x1, x2) = .(x1, x2) U2_gagg(x1, x2, x3, x4, x5, x6) = U2_gagg(x1, x2, x5, x6) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gagg(x1, x2, x3, x4, x5, x6) = U3_gagg(x1, x2, x5, x6) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag -(x1, x2) = -(x2) U4_gagg(x1, x2, x3, x4, x5, x6) = U4_gagg(x2, x6) remove_at_in_gaag(x1, x2, x3, x4) = remove_at_in_gaag(x1, x4) remove_at_out_gaag(x1, x2, x3, x4) = remove_at_out_gaag(x2) U2_gaag(x1, x2, x3, x4, x5, x6) = U2_gaag(x1, x2, x5, x6) >_in_ag(x1, x2) = >_in_ag(x2) >_out_ag(x1, x2) = >_out_ag U3_gaag(x1, x2, x3, x4, x5, x6) = U3_gaag(x1, x2, x5, x6) U4_gaag(x1, x2, x3, x4, x5, x6) = U4_gaag(x2, x6) insert_at_out_ggga(x1, x2, x3, x4) = insert_at_out_ggga(x4) INSERT_AT_IN_GGGA(x1, x2, x3, x4) = INSERT_AT_IN_GGGA(x1, x2, x3) U1_GGGA(x1, x2, x3, x4, x5) = U1_GGGA(x5) REMOVE_AT_IN_GAGG(x1, x2, x3, x4) = REMOVE_AT_IN_GAGG(x1, x3, x4) U2_GAGG(x1, x2, x3, x4, x5, x6) = U2_GAGG(x1, x2, x5, x6) >_IN_GG(x1, x2) = >_IN_GG(x1, x2) U3_GAGG(x1, x2, x3, x4, x5, x6) = U3_GAGG(x1, x2, x5, x6) IS_IN_AG(x1, x2) = IS_IN_AG(x2) U4_GAGG(x1, x2, x3, x4, x5, x6) = U4_GAGG(x2, x6) REMOVE_AT_IN_GAAG(x1, x2, x3, x4) = REMOVE_AT_IN_GAAG(x1, x4) U2_GAAG(x1, x2, x3, x4, x5, x6) = U2_GAAG(x1, x2, x5, x6) >_IN_AG(x1, x2) = >_IN_AG(x2) U3_GAAG(x1, x2, x3, x4, x5, x6) = U3_GAAG(x1, x2, x5, x6) U4_GAAG(x1, x2, x3, x4, x5, x6) = U4_GAAG(x2, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: INSERT_AT_IN_GGGA(X, L, K, R) -> U1_GGGA(X, L, K, R, remove_at_in_gagg(X, R, K, L)) INSERT_AT_IN_GGGA(X, L, K, R) -> REMOVE_AT_IN_GAGG(X, R, K, L) REMOVE_AT_IN_GAGG(X, .(Y, Xs), K, .(Y, Ys)) -> U2_GAGG(X, Y, Xs, K, Ys, >_in_gg(K, 1)) REMOVE_AT_IN_GAGG(X, .(Y, Xs), K, .(Y, Ys)) -> >_IN_GG(K, 1) U2_GAGG(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> U3_GAGG(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U2_GAGG(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> IS_IN_AG(K1, -(K, 1)) U3_GAGG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_GAGG(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U3_GAGG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> REMOVE_AT_IN_GAAG(X, Xs, K1, Ys) REMOVE_AT_IN_GAAG(X, .(Y, Xs), K, .(Y, Ys)) -> U2_GAAG(X, Y, Xs, K, Ys, >_in_ag(K, 1)) REMOVE_AT_IN_GAAG(X, .(Y, Xs), K, .(Y, Ys)) -> >_IN_AG(K, 1) U2_GAAG(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_GAAG(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U2_GAAG(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> IS_IN_AG(K1, -(K, 1)) U3_GAAG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_GAAG(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U3_GAAG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> REMOVE_AT_IN_GAAG(X, Xs, K1, Ys) The TRS R consists of the following rules: insert_at_in_ggga(X, L, K, R) -> U1_ggga(X, L, K, R, remove_at_in_gagg(X, R, K, L)) remove_at_in_gagg(X, .(X, Xs), 1, Xs) -> remove_at_out_gagg(X, .(X, Xs), 1, Xs) remove_at_in_gagg(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gagg(X, Y, Xs, K, Ys, >_in_gg(K, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gagg(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> U3_gagg(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U3_gagg(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gagg(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) remove_at_in_gaag(X, .(X, Xs), 1, Xs) -> remove_at_out_gaag(X, .(X, Xs), 1, Xs) remove_at_in_gaag(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gaag(X, Y, Xs, K, Ys, >_in_ag(K, 1)) >_in_ag(X0, X1) -> >_out_ag(X0, X1) U2_gaag(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_gaag(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U3_gaag(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gaag(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U4_gaag(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gaag(X, .(Y, Xs), K, .(Y, Ys)) U4_gagg(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gagg(X, .(Y, Xs), K, .(Y, Ys)) U1_ggga(X, L, K, R, remove_at_out_gagg(X, R, K, L)) -> insert_at_out_ggga(X, L, K, R) The argument filtering Pi contains the following mapping: insert_at_in_ggga(x1, x2, x3, x4) = insert_at_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4, x5) = U1_ggga(x5) remove_at_in_gagg(x1, x2, x3, x4) = remove_at_in_gagg(x1, x3, x4) 1 = 1 remove_at_out_gagg(x1, x2, x3, x4) = remove_at_out_gagg(x2) .(x1, x2) = .(x1, x2) U2_gagg(x1, x2, x3, x4, x5, x6) = U2_gagg(x1, x2, x5, x6) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gagg(x1, x2, x3, x4, x5, x6) = U3_gagg(x1, x2, x5, x6) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag -(x1, x2) = -(x2) U4_gagg(x1, x2, x3, x4, x5, x6) = U4_gagg(x2, x6) remove_at_in_gaag(x1, x2, x3, x4) = remove_at_in_gaag(x1, x4) remove_at_out_gaag(x1, x2, x3, x4) = remove_at_out_gaag(x2) U2_gaag(x1, x2, x3, x4, x5, x6) = U2_gaag(x1, x2, x5, x6) >_in_ag(x1, x2) = >_in_ag(x2) >_out_ag(x1, x2) = >_out_ag U3_gaag(x1, x2, x3, x4, x5, x6) = U3_gaag(x1, x2, x5, x6) U4_gaag(x1, x2, x3, x4, x5, x6) = U4_gaag(x2, x6) insert_at_out_ggga(x1, x2, x3, x4) = insert_at_out_ggga(x4) INSERT_AT_IN_GGGA(x1, x2, x3, x4) = INSERT_AT_IN_GGGA(x1, x2, x3) U1_GGGA(x1, x2, x3, x4, x5) = U1_GGGA(x5) REMOVE_AT_IN_GAGG(x1, x2, x3, x4) = REMOVE_AT_IN_GAGG(x1, x3, x4) U2_GAGG(x1, x2, x3, x4, x5, x6) = U2_GAGG(x1, x2, x5, x6) >_IN_GG(x1, x2) = >_IN_GG(x1, x2) U3_GAGG(x1, x2, x3, x4, x5, x6) = U3_GAGG(x1, x2, x5, x6) IS_IN_AG(x1, x2) = IS_IN_AG(x2) U4_GAGG(x1, x2, x3, x4, x5, x6) = U4_GAGG(x2, x6) REMOVE_AT_IN_GAAG(x1, x2, x3, x4) = REMOVE_AT_IN_GAAG(x1, x4) U2_GAAG(x1, x2, x3, x4, x5, x6) = U2_GAAG(x1, x2, x5, x6) >_IN_AG(x1, x2) = >_IN_AG(x2) U3_GAAG(x1, x2, x3, x4, x5, x6) = U3_GAAG(x1, x2, x5, x6) U4_GAAG(x1, x2, x3, x4, x5, x6) = U4_GAAG(x2, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 11 less nodes. ---------------------------------------- (8) Obligation: Pi DP problem: The TRS P consists of the following rules: U2_GAAG(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_GAAG(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U3_GAAG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> REMOVE_AT_IN_GAAG(X, Xs, K1, Ys) REMOVE_AT_IN_GAAG(X, .(Y, Xs), K, .(Y, Ys)) -> U2_GAAG(X, Y, Xs, K, Ys, >_in_ag(K, 1)) The TRS R consists of the following rules: insert_at_in_ggga(X, L, K, R) -> U1_ggga(X, L, K, R, remove_at_in_gagg(X, R, K, L)) remove_at_in_gagg(X, .(X, Xs), 1, Xs) -> remove_at_out_gagg(X, .(X, Xs), 1, Xs) remove_at_in_gagg(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gagg(X, Y, Xs, K, Ys, >_in_gg(K, 1)) >_in_gg(X0, X1) -> >_out_gg(X0, X1) U2_gagg(X, Y, Xs, K, Ys, >_out_gg(K, 1)) -> U3_gagg(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) is_in_ag(X0, X1) -> is_out_ag(X0, X1) U3_gagg(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gagg(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) remove_at_in_gaag(X, .(X, Xs), 1, Xs) -> remove_at_out_gaag(X, .(X, Xs), 1, Xs) remove_at_in_gaag(X, .(Y, Xs), K, .(Y, Ys)) -> U2_gaag(X, Y, Xs, K, Ys, >_in_ag(K, 1)) >_in_ag(X0, X1) -> >_out_ag(X0, X1) U2_gaag(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_gaag(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U3_gaag(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> U4_gaag(X, Y, Xs, K, Ys, remove_at_in_gaag(X, Xs, K1, Ys)) U4_gaag(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gaag(X, .(Y, Xs), K, .(Y, Ys)) U4_gagg(X, Y, Xs, K, Ys, remove_at_out_gaag(X, Xs, K1, Ys)) -> remove_at_out_gagg(X, .(Y, Xs), K, .(Y, Ys)) U1_ggga(X, L, K, R, remove_at_out_gagg(X, R, K, L)) -> insert_at_out_ggga(X, L, K, R) The argument filtering Pi contains the following mapping: insert_at_in_ggga(x1, x2, x3, x4) = insert_at_in_ggga(x1, x2, x3) U1_ggga(x1, x2, x3, x4, x5) = U1_ggga(x5) remove_at_in_gagg(x1, x2, x3, x4) = remove_at_in_gagg(x1, x3, x4) 1 = 1 remove_at_out_gagg(x1, x2, x3, x4) = remove_at_out_gagg(x2) .(x1, x2) = .(x1, x2) U2_gagg(x1, x2, x3, x4, x5, x6) = U2_gagg(x1, x2, x5, x6) >_in_gg(x1, x2) = >_in_gg(x1, x2) >_out_gg(x1, x2) = >_out_gg U3_gagg(x1, x2, x3, x4, x5, x6) = U3_gagg(x1, x2, x5, x6) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag -(x1, x2) = -(x2) U4_gagg(x1, x2, x3, x4, x5, x6) = U4_gagg(x2, x6) remove_at_in_gaag(x1, x2, x3, x4) = remove_at_in_gaag(x1, x4) remove_at_out_gaag(x1, x2, x3, x4) = remove_at_out_gaag(x2) U2_gaag(x1, x2, x3, x4, x5, x6) = U2_gaag(x1, x2, x5, x6) >_in_ag(x1, x2) = >_in_ag(x2) >_out_ag(x1, x2) = >_out_ag U3_gaag(x1, x2, x3, x4, x5, x6) = U3_gaag(x1, x2, x5, x6) U4_gaag(x1, x2, x3, x4, x5, x6) = U4_gaag(x2, x6) insert_at_out_ggga(x1, x2, x3, x4) = insert_at_out_ggga(x4) REMOVE_AT_IN_GAAG(x1, x2, x3, x4) = REMOVE_AT_IN_GAAG(x1, x4) U2_GAAG(x1, x2, x3, x4, x5, x6) = U2_GAAG(x1, x2, x5, x6) U3_GAAG(x1, x2, x3, x4, x5, x6) = U3_GAAG(x1, x2, x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (9) UsableRulesProof (EQUIVALENT) For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. ---------------------------------------- (10) Obligation: Pi DP problem: The TRS P consists of the following rules: U2_GAAG(X, Y, Xs, K, Ys, >_out_ag(K, 1)) -> U3_GAAG(X, Y, Xs, K, Ys, is_in_ag(K1, -(K, 1))) U3_GAAG(X, Y, Xs, K, Ys, is_out_ag(K1, -(K, 1))) -> REMOVE_AT_IN_GAAG(X, Xs, K1, Ys) REMOVE_AT_IN_GAAG(X, .(Y, Xs), K, .(Y, Ys)) -> U2_GAAG(X, Y, Xs, K, Ys, >_in_ag(K, 1)) The TRS R consists of the following rules: is_in_ag(X0, X1) -> is_out_ag(X0, X1) >_in_ag(X0, X1) -> >_out_ag(X0, X1) The argument filtering Pi contains the following mapping: 1 = 1 .(x1, x2) = .(x1, x2) is_in_ag(x1, x2) = is_in_ag(x2) is_out_ag(x1, x2) = is_out_ag -(x1, x2) = -(x2) >_in_ag(x1, x2) = >_in_ag(x2) >_out_ag(x1, x2) = >_out_ag REMOVE_AT_IN_GAAG(x1, x2, x3, x4) = REMOVE_AT_IN_GAAG(x1, x4) U2_GAAG(x1, x2, x3, x4, x5, x6) = U2_GAAG(x1, x2, x5, x6) U3_GAAG(x1, x2, x3, x4, x5, x6) = U3_GAAG(x1, x2, x5, x6) We have to consider all (P,R,Pi)-chains ---------------------------------------- (11) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: U2_GAAG(X, Y, Ys, >_out_ag) -> U3_GAAG(X, Y, Ys, is_in_ag(-(1))) U3_GAAG(X, Y, Ys, is_out_ag) -> REMOVE_AT_IN_GAAG(X, Ys) REMOVE_AT_IN_GAAG(X, .(Y, Ys)) -> U2_GAAG(X, Y, Ys, >_in_ag(1)) The TRS R consists of the following rules: is_in_ag(X1) -> is_out_ag >_in_ag(X1) -> >_out_ag The set Q consists of the following terms: is_in_ag(x0) >_in_ag(x0) We have to consider all (P,Q,R)-chains. ---------------------------------------- (13) 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: *U3_GAAG(X, Y, Ys, is_out_ag) -> REMOVE_AT_IN_GAAG(X, Ys) The graph contains the following edges 1 >= 1, 3 >= 2 *REMOVE_AT_IN_GAAG(X, .(Y, Ys)) -> U2_GAAG(X, Y, Ys, >_in_ag(1)) The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3 *U2_GAAG(X, Y, Ys, >_out_ag) -> U3_GAAG(X, Y, Ys, is_in_ag(-(1))) The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3 ---------------------------------------- (14) YES