0 Prolog
↳1 PrologToPiTRSProof (⇐)
↳2 PiTRS
↳3 DependencyPairsProof (⇔)
↳4 PiDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 PiDP
↳8 UsableRulesProof (⇔)
↳9 PiDP
↳10 PiDPToQDPProof (⇐)
↳11 QDP
↳12 NonTerminationProof (⇔)
↳13 FALSE
↳14 PiDP
↳15 UsableRulesProof (⇔)
↳16 PiDP
↳17 PiDPToQDPProof (⇐)
↳18 QDP
↳19 NonTerminationProof (⇔)
↳20 FALSE
↳21 PrologToPiTRSProof (⇐)
↳22 PiTRS
↳23 DependencyPairsProof (⇔)
↳24 PiDP
↳25 DependencyGraphProof (⇔)
↳26 AND
↳27 PiDP
↳28 UsableRulesProof (⇔)
↳29 PiDP
↳30 PiDPToQDPProof (⇐)
↳31 QDP
↳32 NonTerminationProof (⇔)
↳33 FALSE
↳34 PiDP
↳35 UsableRulesProof (⇔)
↳36 PiDP
↳37 PiDPToQDPProof (⇐)
↳38 QDP
↳39 NonTerminationProof (⇔)
↳40 FALSE
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
G_IN_A(W) → U1_A(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
G_IN_A(W) → EQ_IN_AA(X, .(.(a, []), .(.(R, []), [])))
U1_A(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_A(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U1_A(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → EQ_IN_AA(Y, .(.(S, .(c, [])), .([], [])))
U2_A(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_A(W, app_1_in_aaa(X, Y, Z))
U2_A(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → APP_1_IN_AAA(X, Y, Z)
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U6_AAA(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_1_IN_AAA(Xs, Ys, Zs)
U3_A(W, app_1_out_aaa(X, Y, Z)) → U4_A(W, eq_in_aa(Z, .(U, V)))
U3_A(W, app_1_out_aaa(X, Y, Z)) → EQ_IN_AA(Z, .(U, V))
U4_A(W, eq_out_aa(Z, .(U, V))) → U5_A(W, app_2_in_aaa(U, U, W))
U4_A(W, eq_out_aa(Z, .(U, V))) → APP_2_IN_AAA(U, U, W)
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U7_AAA(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_2_IN_AAA(Xs, Ys, Zs)
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
G_IN_A(W) → U1_A(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
G_IN_A(W) → EQ_IN_AA(X, .(.(a, []), .(.(R, []), [])))
U1_A(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_A(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U1_A(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → EQ_IN_AA(Y, .(.(S, .(c, [])), .([], [])))
U2_A(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_A(W, app_1_in_aaa(X, Y, Z))
U2_A(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → APP_1_IN_AAA(X, Y, Z)
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U6_AAA(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_1_IN_AAA(Xs, Ys, Zs)
U3_A(W, app_1_out_aaa(X, Y, Z)) → U4_A(W, eq_in_aa(Z, .(U, V)))
U3_A(W, app_1_out_aaa(X, Y, Z)) → EQ_IN_AA(Z, .(U, V))
U4_A(W, eq_out_aa(Z, .(U, V))) → U5_A(W, app_2_in_aaa(U, U, W))
U4_A(W, eq_out_aa(Z, .(U, V))) → APP_2_IN_AAA(U, U, W)
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U7_AAA(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_2_IN_AAA(Xs, Ys, Zs)
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_2_IN_AAA(Xs, Ys, Zs)
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_2_IN_AAA(Xs, Ys, Zs)
APP_2_IN_AAA → APP_2_IN_AAA
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_1_IN_AAA(Xs, Ys, Zs)
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_1_IN_AAA(Xs, Ys, Zs)
APP_1_IN_AAA → APP_1_IN_AAA
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
G_IN_A(W) → U1_A(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
G_IN_A(W) → EQ_IN_AA(X, .(.(a, []), .(.(R, []), [])))
U1_A(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_A(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U1_A(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → EQ_IN_AA(Y, .(.(S, .(c, [])), .([], [])))
U2_A(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_A(W, app_1_in_aaa(X, Y, Z))
U2_A(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → APP_1_IN_AAA(X, Y, Z)
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U6_AAA(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_1_IN_AAA(Xs, Ys, Zs)
U3_A(W, app_1_out_aaa(X, Y, Z)) → U4_A(W, eq_in_aa(Z, .(U, V)))
U3_A(W, app_1_out_aaa(X, Y, Z)) → EQ_IN_AA(Z, .(U, V))
U4_A(W, eq_out_aa(Z, .(U, V))) → U5_A(W, app_2_in_aaa(U, U, W))
U4_A(W, eq_out_aa(Z, .(U, V))) → APP_2_IN_AAA(U, U, W)
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U7_AAA(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_2_IN_AAA(Xs, Ys, Zs)
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
G_IN_A(W) → U1_A(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
G_IN_A(W) → EQ_IN_AA(X, .(.(a, []), .(.(R, []), [])))
U1_A(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_A(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U1_A(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → EQ_IN_AA(Y, .(.(S, .(c, [])), .([], [])))
U2_A(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_A(W, app_1_in_aaa(X, Y, Z))
U2_A(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → APP_1_IN_AAA(X, Y, Z)
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U6_AAA(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_1_IN_AAA(Xs, Ys, Zs)
U3_A(W, app_1_out_aaa(X, Y, Z)) → U4_A(W, eq_in_aa(Z, .(U, V)))
U3_A(W, app_1_out_aaa(X, Y, Z)) → EQ_IN_AA(Z, .(U, V))
U4_A(W, eq_out_aa(Z, .(U, V))) → U5_A(W, app_2_in_aaa(U, U, W))
U4_A(W, eq_out_aa(Z, .(U, V))) → APP_2_IN_AAA(U, U, W)
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U7_AAA(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_2_IN_AAA(Xs, Ys, Zs)
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_2_IN_AAA(Xs, Ys, Zs)
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
APP_2_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_2_IN_AAA(Xs, Ys, Zs)
APP_2_IN_AAA → APP_2_IN_AAA
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_1_IN_AAA(Xs, Ys, Zs)
g_in_a(W) → U1_a(W, eq_in_aa(X, .(.(a, []), .(.(R, []), []))))
eq_in_aa(X, X) → eq_out_aa(X, X)
U1_a(W, eq_out_aa(X, .(.(a, []), .(.(R, []), [])))) → U2_a(W, X, eq_in_aa(Y, .(.(S, .(c, [])), .([], []))))
U2_a(W, X, eq_out_aa(Y, .(.(S, .(c, [])), .([], [])))) → U3_a(W, app_1_in_aaa(X, Y, Z))
app_1_in_aaa([], X, X) → app_1_out_aaa([], X, X)
app_1_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U6_aaa(X, Xs, Ys, Zs, app_1_in_aaa(Xs, Ys, Zs))
U6_aaa(X, Xs, Ys, Zs, app_1_out_aaa(Xs, Ys, Zs)) → app_1_out_aaa(.(X, Xs), Ys, .(X, Zs))
U3_a(W, app_1_out_aaa(X, Y, Z)) → U4_a(W, eq_in_aa(Z, .(U, V)))
U4_a(W, eq_out_aa(Z, .(U, V))) → U5_a(W, app_2_in_aaa(U, U, W))
app_2_in_aaa([], X, X) → app_2_out_aaa([], X, X)
app_2_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U7_aaa(X, Xs, Ys, Zs, app_2_in_aaa(Xs, Ys, Zs))
U7_aaa(X, Xs, Ys, Zs, app_2_out_aaa(Xs, Ys, Zs)) → app_2_out_aaa(.(X, Xs), Ys, .(X, Zs))
U5_a(W, app_2_out_aaa(U, U, W)) → g_out_a(W)
APP_1_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_1_IN_AAA(Xs, Ys, Zs)
APP_1_IN_AAA → APP_1_IN_AAA