@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.com/>.
@prefix n3: <http://www.w3.org/2004/06/rei#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.

skolem:proof a r:Proof, r:Conjunction;
    r:component skolem:lemma1;
    r:component skolem:lemma2;
    r:component skolem:lemma3;
    r:component skolem:lemma4;
    r:component skolem:lemma5;
    r:component skolem:lemma6;
    r:gives {
        :taskA a :CompositeTask.
        :taskA1 a :Completed.
        :taskA2 a :Completed.
        :taskA :subtask :taskA1.
        :taskA :subtask :taskA2.
        :taskA a :Completed.
    }.

skolem:lemma1 a r:Inference;
    r:gives {
        :taskA a :CompositeTask.
    };
    r:evidence (
        skolem:lemma7
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo [ n3:uri "http://example.com/CompositeTask"]];
    r:rule skolem:lemma8.

skolem:lemma2 a r:Inference;
    r:gives {
        :taskA1 a :Completed.
    };
    r:evidence (
        skolem:lemma9
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA1"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo [ n3:uri "http://example.com/Completed"]];
    r:rule skolem:lemma8.

skolem:lemma3 a r:Inference;
    r:gives {
        :taskA2 a :Completed.
    };
    r:evidence (
        skolem:lemma10
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA2"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo [ n3:uri "http://example.com/Completed"]];
    r:rule skolem:lemma8.

skolem:lemma4 a r:Inference;
    r:gives {
        :taskA :subtask :taskA1.
    };
    r:evidence (
        skolem:lemma11
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "http://example.com/subtask"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo [ n3:uri "http://example.com/taskA1"]];
    r:rule skolem:lemma8.

skolem:lemma5 a r:Inference;
    r:gives {
        :taskA :subtask :taskA2.
    };
    r:evidence (
        skolem:lemma12
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "http://example.com/subtask"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo [ n3:uri "http://example.com/taskA2"]];
    r:rule skolem:lemma8.

skolem:lemma6 a r:Inference;
    r:gives {
        :taskA a :Completed.
    };
    r:evidence (
        skolem:lemma13
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo [ n3:uri "http://example.com/Completed"]];
    r:rule skolem:lemma8.

skolem:lemma7 a r:Extraction;
    r:gives {
        :taskA a :CompositeTask.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/twf/example27.n3>].

skolem:lemma8 a r:Extraction;
    r:gives {
        @forAll var:x_0, var:x_1, var:x_2. {
            var:x_1 var:x_0 var:x_2.
        } => {
            var:x_1 var:x_0 var:x_2.
        }.
    };
    r:because [ a r:Parsing; r:source <http://eulersharp.sourceforge.net/2003/03swap/pass>].

skolem:lemma9 a r:Extraction;
    r:gives {
        :taskA1 a :Completed.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/twf/example27.n3>].

skolem:lemma10 a r:Extraction;
    r:gives {
        :taskA2 a :Completed.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/twf/example27.n3>].

skolem:lemma11 a r:Extraction;
    r:gives {
        :taskA :subtask :taskA1.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/twf/example27.n3>].

skolem:lemma12 a r:Extraction;
    r:gives {
        :taskA :subtask :taskA2.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/twf/example27.n3>].

skolem:lemma13 a r:Inference;
    r:gives {
        :taskA a :Completed.
    };
    r:evidence (
        skolem:lemma7
        [ a r:Fact; r:gives {({
            :taskA :subtask _:sk_0.
        } {
            _:sk_0 a :Completed.
        }) log:forAllIn ((<https://eyereasoner.github.io/eye/reasoning/twf/example27.n3>) 1)}]
    );
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_2"]; r:boundTo ((<https://eyereasoner.github.io/eye/reasoning/twf/example27.n3>) 1)];
    r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ a r:Existential; n3:nodeId "_:sk_0"]];
    r:rule skolem:lemma14.

skolem:lemma14 a r:Extraction;
    r:gives {
        @forAll var:x_0, var:x_1, var:x_2. {
            var:x_0 a :CompositeTask.
            ({
                var:x_0 :subtask var:x_1.
            } {
                var:x_1 a :Completed.
            }) log:forAllIn var:x_2.
        } => {
            var:x_0 a :Completed.
        }.
    };
    r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/twf/example27.n3>].

