(0) Obligation:

Clauses:

max_valued(.(Head, Tail), Max) :- max_Valued(Tail, Head, Max).
max_valued([], Term, Term).
max_valued(.(Head, Tail), Term, Max) :- ','(higher_valued(Head, Term), ','(!, max_valued(Tail, Head, Max))).
max_valued(.(Head, Tail), Term, Max) :- ','(higher_valued(Term, Head), max_valued(Tail, Term, Max)).
higher_valued(X, Y) :- greater(s(X), Y).
greater(s(X1), 0).
greater(s(X), s(Y)) :- greater(X, Y).

Query: max_valued(g,a)

(1) PrologToTRSTransformerProof (SOUND transformation)

Transformed Prolog program to TRS.

(2) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(3) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(4) YES