@prefix skolem: <https://eyereasoner.github.io/.well-known/genid/8b98b360-9a70-4845-b52c-c675af60ad01#>.
@prefix r: <http://www.w3.org/2000/10/swap/reason#>.
@prefix : <http://example.org/#>.
@prefix string: <http://www.w3.org/2000/10/swap/string#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix n3: <http://www.w3.org/2004/06/rei#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.

skolem:proof a r:Proof, r:Conjunction;
    r:component skolem:lemma1;
    r:gives {
        :result :is ("Huey" "Dewey").
    }.

skolem:lemma1 a r:Inference;
    r:gives {
        :result :is ("Huey" "Dewey").
    };
    r:evidence (
        [ a r:Fact; r:gives {(_:sk_0 {
            :Let :param _:sk_0.
            _:sk_0 string:lessThan "Louie".
        } ("Huey" "Dewey")) log:collectAllIn ((<https://eyereasoner.github.io/eye/reasoning/filter/filter.n3>) 1)}]
        [ a r:Fact; r:gives {("Huey" "Dewey") list:length 2}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo ((<https://eyereasoner.github.io/eye/reasoning/filter/filter.n3>) 1)];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ a r:Existential; n3:nodeId "_:sk_0"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo ("Huey" "Dewey")];
    r:rule skolem:lemma2.

skolem:lemma2 a r:Extraction;
    r:gives {
        @forAll var:x_0, var:x_1, var:x_2. {
            (var:x_0 {
                :Let :param var:x_0.
                var:x_0 string:lessThan "Louie".
            } var:x_1) log:collectAllIn var:x_2.
            var:x_1 list:length 2.
        } => {
            :result :is var:x_1.
        }.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/filter/filter-query.n3>].

