@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <http://example.com/>.
@prefix r: <http://www.w3.org/2000/10/swap/reason#>.
@prefix var: <http://josd.github.io/var#>.
@prefix skolem: <http://josd.github.io/.well-known/genid/3917894951695475063#>.
@prefix n3: <http://www.w3.org/2004/06/rei#>.

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://josd.github.io/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://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/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://josd.github.io/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://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA1"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/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://josd.github.io/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://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA2"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/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://josd.github.io/var#x_0"]; r:boundTo [ n3:uri "http://example.com/subtask"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/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://josd.github.io/var#x_0"]; r:boundTo [ n3:uri "http://example.com/subtask"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/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://josd.github.io/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://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/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 <http://josd.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 <http://josd.github.io/eye/reasoning/twf/example27.n3>].

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

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

skolem:lemma12 a r:Extraction;
  r:gives {
    :taskA :subtask :taskA2.
  };
  r:because [ a r:Parsing; r:source <http://josd.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 ((<http://josd.github.io/eye/reasoning/twf/example27.n3>) 1)}]
  );
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_0"]; r:boundTo [ n3:uri "http://example.com/taskA"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_2"]; r:boundTo ((<http://josd.github.io/eye/reasoning/twf/example27.n3>) 1)];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/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 <http://josd.github.io/eye/reasoning/twf/example27.n3>].

