Ciao Preprocessor (integrated Alpha version)
 | This is an alpha distribution, meant only for testing. Please do let us 
 | know at ciaopp-bugclip.dia.fi.upm.es any problems you may have.

{loaded in 3368.21 msec.}
{preprocessed for plai in 0.0 msec.}
{analyzed by plai using det with local-control off in 8.001 msec.}
{written file /tmp/tmpbWlI0z/ordered_det_co.pl}
:- module(_1,[ordered/1],[assertions]).

:- entry ordered(A)
         : ground(A).

:- true pred ordered(A)
         : ( ground([A]), gnd(A) )
        => ( ground([A]), rt29(A) )
         + ( is_det, mut_exclusive ).

:- true pred ordered([_1|_2])
         : ( ground([_1,_2]), gnd(_1), gnd(_2) )
        => ( ground([_1,_2]), rt22(_1), rt23(_2) )
         + ( is_det, mut_exclusive ).

ordered([]).
ordered([_1]).
ordered([X,Y|Xs]) :-
        less(X,s(Y)),
        ordered([Y|Xs]).

:- true pred less(_1,s(_2))
         : ( ground([_1,_2]), gnd(_1), gnd(_2) )
        => ( ground([_1,_2]), rt16(_1), gnd(_2) )
         + ( is_det, mut_exclusive ).

:- true pred less(_1,_2)
         : ( ground([_1,_2]), gnd(_1), gnd(_2) )
        => ( ground([_1,_2]), rt10(_1), rt12(_2) )
         + ( is_det, mut_exclusive ).

less(0,s(_1)).
less(s(X),s(Y)) :-
        less(X,Y).


:- regtype rt35/1.

rt35(A) :-
        gnd(A).


:- regtype rt34/1.

rt34(A) :-
        gnd(A).


:- regtype rt33/1.

rt33(A) :-
        gnd(A).


:- regtype rt32/1.

rt32([]).
rt32([A|B]) :-
        rt33(A),
        rt32(B).


:- regtype rt31/1.

rt31([]).
rt31([A|B]) :-
        rt33(A),
        rt32(B).


:- regtype rt30/1.

rt30([]).
rt30([A|B]) :-
        rt34(A),
        rt31(B).


:- regtype rt29/1.

rt29([]).
rt29([A|B]) :-
        rt35(A),
        rt30(B).


:- regtype rt22/1.

rt22(A) :-
        gnd(A).


:- regtype rt25/1.

rt25(A) :-
        gnd(A).


:- regtype rt24/1.

rt24([]).
rt24([A|B]) :-
        rt25(A),
        rt24(B).


:- regtype rt23/1.

rt23([]).
rt23([A|B]) :-
        rt25(A),
        rt24(B).


:- regtype rt18/1.

rt18(0).
rt18(s(A)) :-
        rt18(A).


:- regtype rt17/1.

rt17(0).
rt17(s(A)) :-
        rt18(A).


:- regtype rt16/1.

rt16(0).
rt16(s(A)) :-
        rt17(A).


:- regtype rt11/1.

rt11(0).
rt11(s(A)) :-
        rt11(A).


:- regtype rt10/1.

rt10(0).
rt10(s(A)) :-
        rt11(A).


:- regtype rt13/1.

rt13(A) :-
        gnd(A).
rt13(s(A)) :-
        rt13(A).


:- regtype rt12/1.

rt12(s(A)) :-
        rt13(A).