@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>.
@prefix : <https://eyereasoner.github.io/eye/reasoning#>.

{(?U ?N) :randomsample ?A} <=
{
    ?U log:semantics ?G.
    ?G e:graphList ?L.
    ?L math:memberCount ?C.
    ?S e:findall (
        ?T
        {   ("between" 1 ?N ?I) log:pro true.
            (?C) e:random ?J.
            ("nth0" ?J ?L ?T) log:pro true.
        }
        ?B
    ).
    ?B log:conjunction ?A.
}.
