0 Prolog
↳1 PrologToPrologProblemTransformerProof (⇐)
↳2 Prolog
↳3 PrologToPiTRSProof (⇐)
↳4 PiTRS
↳5 DependencyPairsProof (⇔)
↳6 PiDP
↳7 DependencyGraphProof (⇔)
↳8 PiDP
↳9 UsableRulesProof (⇔)
↳10 PiDP
↳11 PiDPToQDPProof (⇐)
↳12 QDP
↳13 MRRProof (⇔)
↳14 QDP
↳15 NonTerminationProof (⇔)
↳16 NO
↳17 PrologToPiTRSProof (⇐)
↳18 PiTRS
↳19 DependencyPairsProof (⇔)
↳20 PiDP
↳21 DependencyGraphProof (⇔)
↳22 PiDP
↳23 UsableRulesProof (⇔)
↳24 PiDP
↳25 PiDPToQDPProof (⇐)
↳26 QDP
↳27 MRRProof (⇔)
↳28 QDP
↳29 NonTerminationProof (⇔)
↳30 NO
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_AG(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → FLAT1_IN_AG(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → U2_AG(T84, T86, T72, flat1_in_ag(T86, T72))
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → FLAT1_IN_AG(T86, T72)
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_AG(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → FLAT1_IN_AG(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_AG(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → FLAT1_IN_AG(tree(T181, T182, T183), T159)
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_AG(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → FLAT1_IN_AG(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_AG(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → FLAT1_IN_AG(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → U2_AG(T84, T86, T72, flat1_in_ag(T86, T72))
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → FLAT1_IN_AG(T86, T72)
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_AG(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → FLAT1_IN_AG(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_AG(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → FLAT1_IN_AG(tree(T181, T182, T183), T159)
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_AG(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → FLAT1_IN_AG(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → FLAT1_IN_AG(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → FLAT1_IN_AG(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → FLAT1_IN_AG(T86, T72)
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → FLAT1_IN_AG(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → FLAT1_IN_AG(tree(T181, T182, T183), T159)
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → FLAT1_IN_AG(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → FLAT1_IN_AG(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → FLAT1_IN_AG(T86, T72)
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → FLAT1_IN_AG(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → FLAT1_IN_AG(tree(T181, T182, T183), T159)
FLAT1_IN_AG(T210) → FLAT1_IN_AG(T210)
FLAT1_IN_AG(nil) → FLAT1_IN_AG(nil)
FLAT1_IN_AG(cons(T84, T72)) → FLAT1_IN_AG(T72)
FLAT1_IN_AG(cons(T106, T107)) → FLAT1_IN_AG(cons(T106, T107))
FLAT1_IN_AG(cons(T84, T72)) → FLAT1_IN_AG(T72)
POL(FLAT1_IN_AG(x1)) = x1
POL(cons(x1, x2)) = 1 + x1 + x2
POL(nil) = 0
FLAT1_IN_AG(T210) → FLAT1_IN_AG(T210)
FLAT1_IN_AG(nil) → FLAT1_IN_AG(nil)
FLAT1_IN_AG(cons(T106, T107)) → FLAT1_IN_AG(cons(T106, T107))
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_AG(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → FLAT1_IN_AG(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → U2_AG(T84, T86, T72, flat1_in_ag(T86, T72))
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → FLAT1_IN_AG(T86, T72)
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_AG(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → FLAT1_IN_AG(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_AG(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → FLAT1_IN_AG(tree(T181, T182, T183), T159)
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_AG(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → FLAT1_IN_AG(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_AG(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → FLAT1_IN_AG(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → U2_AG(T84, T86, T72, flat1_in_ag(T86, T72))
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → FLAT1_IN_AG(T86, T72)
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_AG(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → FLAT1_IN_AG(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_AG(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → FLAT1_IN_AG(tree(T181, T182, T183), T159)
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_AG(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → FLAT1_IN_AG(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → FLAT1_IN_AG(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → FLAT1_IN_AG(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → FLAT1_IN_AG(T86, T72)
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → FLAT1_IN_AG(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → FLAT1_IN_AG(tree(T181, T182, T183), T159)
flat1_in_ag(niltree, nil) → flat1_out_ag(niltree, nil)
flat1_in_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_in_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil))
flat1_in_ag(tree(T84, niltree, T86), cons(T84, T72)) → U2_ag(T84, T86, T72, flat1_in_ag(T86, T72))
flat1_in_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_in_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107)))
flat1_in_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → U4_ag(T181, T177, T182, T183, T159, flat1_in_ag(tree(T181, T182, T183), T159))
flat1_in_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_in_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210))
U5_ag(T215, T213, T211, T212, T214, T216, T217, T210, flat1_out_ag(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)) → flat1_out_ag(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210)
U4_ag(T181, T177, T182, T183, T159, flat1_out_ag(tree(T181, T182, T183), T159)) → flat1_out_ag(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159))
U3_ag(T110, T108, T109, T111, T112, T106, T107, flat1_out_ag(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))) → flat1_out_ag(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107))
U2_ag(T84, T86, T72, flat1_out_ag(T86, T72)) → flat1_out_ag(tree(T84, niltree, T86), cons(T84, T72))
U1_ag(T49, T47, T45, T46, T48, T50, T51, flat1_out_ag(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)) → flat1_out_ag(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil)
FLAT1_IN_AG(tree(T215, tree(T213, tree(T211, T212, T214), T216), T217), T210) → FLAT1_IN_AG(tree(T211, T212, tree(T213, T214, tree(T215, T216, T217))), T210)
FLAT1_IN_AG(tree(T49, tree(T47, tree(T45, T46, T48), T50), T51), nil) → FLAT1_IN_AG(tree(T45, T46, tree(T47, T48, tree(T49, T50, T51))), nil)
FLAT1_IN_AG(tree(T84, niltree, T86), cons(T84, T72)) → FLAT1_IN_AG(T86, T72)
FLAT1_IN_AG(tree(T110, tree(T108, T109, T111), T112), cons(T106, T107)) → FLAT1_IN_AG(tree(T108, T109, tree(T110, T111, T112)), cons(T106, T107))
FLAT1_IN_AG(tree(T181, tree(T177, niltree, T182), T183), cons(T177, T159)) → FLAT1_IN_AG(tree(T181, T182, T183), T159)
FLAT1_IN_AG(T210) → FLAT1_IN_AG(T210)
FLAT1_IN_AG(nil) → FLAT1_IN_AG(nil)
FLAT1_IN_AG(cons(T84, T72)) → FLAT1_IN_AG(T72)
FLAT1_IN_AG(cons(T106, T107)) → FLAT1_IN_AG(cons(T106, T107))
FLAT1_IN_AG(cons(T84, T72)) → FLAT1_IN_AG(T72)
POL(FLAT1_IN_AG(x1)) = x1
POL(cons(x1, x2)) = 1 + x1 + x2
POL(nil) = 0
FLAT1_IN_AG(T210) → FLAT1_IN_AG(T210)
FLAT1_IN_AG(nil) → FLAT1_IN_AG(nil)
FLAT1_IN_AG(cons(T106, T107)) → FLAT1_IN_AG(cons(T106, T107))