@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 log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <https://eyereasoner.github.io/ns#>.
@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:component skolem:lemma2;
    r:gives [ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (:ground :is :wet)]
        )] log:implies false)]
        [ log:triple ([ log:graph (
            [ log:triple (:it :is :raining)]
        )] log:implies false)]
    )].

skolem:lemma1 a r:Inference;
    r:gives [ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (:ground :is :wet)]
        )] log:implies false)]
    )];
    r:evidence (
        skolem:lemma3
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "https://eyereasoner.github.io/ns#ground"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "https://eyereasoner.github.io/ns#wet"]];
    r:rule [ a r:Fact; r:gives [ log:graph ([ log:triple ([ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (var:x_0 :is var:x_1)]
        )] log:implies false)]
    )] log:implies [ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (var:x_0 :is var:x_1)]
        )] log:implies false)]
    )])])]].

skolem:lemma2 a r:Inference;
    r:gives [ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (:it :is :raining)]
        )] log:implies false)]
    )];
    r:evidence (
        skolem:lemma4
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "https://eyereasoner.github.io/ns#it"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "https://eyereasoner.github.io/ns#raining"]];
    r:rule [ a r:Fact; r:gives [ log:graph ([ log:triple ([ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (var:x_0 :is var:x_1)]
        )] log:implies false)]
    )] log:implies [ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (var:x_0 :is var:x_1)]
        )] log:implies false)]
    )])])]].

skolem:lemma3 a r:Inference;
    r:gives [ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (:ground :is :wet)]
        )] log:implies false)]
    )];
    r:evidence (
        skolem:lemma3
        [ a r:Fact; r:gives [ log:graph (( "ground" ([ log:graph (
            [ log:triple (:ground :is :wet)]
        )] false) ))]]
        [ a r:Fact; r:gives [ log:graph (( "retract" [ log:graph (
            [ log:triple ([ log:graph (
                [ log:triple (:ground :is :wet)]
            )] log:implies false)]
        )] ))]]
        [ a r:Fact; r:gives [ log:graph (( "findvars" ([ log:graph (
            [ log:triple (:ground :is :wet)]
        )] false) () "alpha" ))]]
        [ a r:Fact; r:gives [ log:graph (( "list_to_set" () () ))]]
        [ a r:Fact; r:gives [ log:graph (( "makevars" ([ log:graph (
            [ log:triple (:ground :is :wet)]
        )] false) ([ log:graph (
            [ log:triple (:ground :is :wet)]
        )] false) ( "beta" () ) ))]]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ log:graph (
        [ log:triple (:ground :is :wet)]
    )]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo false];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo ()];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo ()];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo [ log:graph (
        [ log:triple (:ground :is :wet)]
    )]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo false];
    r:rule [ a r:Fact; r:gives [ log:graph ([ log:triple ([ log:graph (
        [ log:triple (var:x_0 log:implies var:x_1)]
        ( "ground" (var:x_0 var:x_1) )
        ( "retract" [ log:graph (
            [ log:triple (var:x_0 log:implies var:x_1)]
        )] )
        ( "findvars" (var:x_0 var:x_1) var:x_2 "alpha" )
        ( "list_to_set" var:x_2 var:x_3 )
        ( "makevars" (var:x_0 var:x_1) (var:x_4 var:x_5) ( "beta" var:x_3 ) )
    )] log:implies [ log:graph (
        [ log:triple (var:x_4 log:implies var:x_5)]
    )])])]].

skolem:lemma4 a r:Inference;
    r:gives [ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (:it :is :raining)]
        )] log:implies false)]
    )];
    r:evidence (
        skolem:lemma5
        skolem:lemma3
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ log:graph (
        [ log:triple (:it :is :raining)]
    )]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ log:graph (
        [ log:triple (:ground :is :wet)]
    )]];
    r:rule [ a r:Fact; r:gives [ log:graph ([ log:triple ([ log:graph (
        [ log:triple (var:x_0 log:implies var:x_1)]
        [ log:triple (var:x_1 log:implies false)]
    )] log:implies [ log:graph (
        [ log:triple (var:x_0 log:implies false)]
    )])])]].

skolem:lemma5 a r:Inference;
    r:gives [ log:graph (
        [ log:triple ([ log:graph (
            [ log:triple (:it :is :raining)]
        )] log:implies [ log:graph (
            [ log:triple (:ground :is :wet)]
        )])]
    )];
    r:evidence (
        skolem:lemma5
        [ a r:Fact; r:gives [ log:graph (( "ground" ([ log:graph (
            [ log:triple (:it :is :raining)]
        )] [ log:graph (
            [ log:triple (:ground :is :wet)]
        )]) ))]]
        [ a r:Fact; r:gives [ log:graph (( "retract" [ log:graph (
            [ log:triple ([ log:graph (
                [ log:triple (:it :is :raining)]
            )] log:implies [ log:graph (
                [ log:triple (:ground :is :wet)]
            )])]
        )] ))]]
        [ a r:Fact; r:gives [ log:graph (( "findvars" ([ log:graph (
            [ log:triple (:it :is :raining)]
        )] [ log:graph (
            [ log:triple (:ground :is :wet)]
        )]) () "alpha" ))]]
        [ a r:Fact; r:gives [ log:graph (( "list_to_set" () () ))]]
        [ a r:Fact; r:gives [ log:graph (( "makevars" ([ log:graph (
            [ log:triple (:it :is :raining)]
        )] [ log:graph (
            [ log:triple (:ground :is :wet)]
        )]) ([ log:graph (
            [ log:triple (:it :is :raining)]
        )] [ log:graph (
            [ log:triple (:ground :is :wet)]
        )]) ( "beta" () ) ))]]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ log:graph (
        [ log:triple (:it :is :raining)]
    )]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ log:graph (
        [ log:triple (:ground :is :wet)]
    )]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo ()];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_3"]; r:boundTo ()];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_4"]; r:boundTo [ log:graph (
        [ log:triple (:it :is :raining)]
    )]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_5"]; r:boundTo [ log:graph (
        [ log:triple (:ground :is :wet)]
    )]];
    r:rule [ a r:Fact; r:gives [ log:graph ([ log:triple ([ log:graph (
        [ log:triple (var:x_0 log:implies var:x_1)]
        ( "ground" (var:x_0 var:x_1) )
        ( "retract" [ log:graph (
            [ log:triple (var:x_0 log:implies var:x_1)]
        )] )
        ( "findvars" (var:x_0 var:x_1) var:x_2 "alpha" )
        ( "list_to_set" var:x_2 var:x_3 )
        ( "makevars" (var:x_0 var:x_1) (var:x_4 var:x_5) ( "beta" var:x_3 ) )
    )] log:implies [ log:graph (
        [ log:triple (var:x_4 log:implies var:x_5)]
    )])])]].

