PREFIX n3: <https://www.w3.org/ns/n3#>
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
PREFIX : <http://example.org/test#>
PREFIX r: <http://www.w3.org/2000/10/swap/reason#>

[] a r:Proof, r:Conjunction;
  r:component <#lemma1>;
  r:component <#lemma2>;
  r:gives {
    :task1 a :NotDiscardedTask.
    :task2 a :NotDiscardedTask.
  }.

<#lemma1> a r:Inference;
  r:gives {
    :task1 a :NotDiscardedTask.
  };
  r:evidence (
    <#lemma3>
    <#lemma4>
  );
  r:rule <#lemma5>.

<#lemma2> a r:Inference;
  r:gives {
    :task2 a :NotDiscardedTask.
  };
  r:evidence (
    <#lemma6>
    <#lemma7>
  );
  r:rule <#lemma5>.

<#lemma3> a r:Extraction;
  r:gives {
    :task1 a :CompositeTask.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/n3c/tasks.n3>].

<#lemma4> a r:Inference;
  r:gives {
    {:task1 a :DiscardedTask} n3:notIn <http://josd.github.io/eye/reasoning/n3c/tasks.n3>.
  };
  r:evidence (
    [ a r:Fact; r:gives {<http://josd.github.io/eye/reasoning/n3c/tasks.n3> log:semantics {:task1 a :CompositeTask.
     :task2 a :CompositeTask}}]
    [ a r:Fact; r:gives {{:task1 a :CompositeTask.
     :task2 a :CompositeTask} log:notIncludes {:task1 a :DiscardedTask}}]
  );
  r:rule <#lemma8>.

<#lemma5> a r:Extraction;
  r:gives {
    {?x_0_1 a :CompositeTask.
     {?x_0_1 a :DiscardedTask} n3:notIn <http://josd.github.io/eye/reasoning/n3c/tasks.n3>} => {?x_0_1 a :NotDiscardedTask}.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/n3c/notIn_query.n3>].

<#lemma6> a r:Extraction;
  r:gives {
    :task2 a :CompositeTask.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/n3c/tasks.n3>].

<#lemma7> a r:Inference;
  r:gives {
    {:task2 a :DiscardedTask} n3:notIn <http://josd.github.io/eye/reasoning/n3c/tasks.n3>.
  };
  r:evidence (
    [ a r:Fact; r:gives {<http://josd.github.io/eye/reasoning/n3c/tasks.n3> log:semantics {:task1 a :CompositeTask.
     :task2 a :CompositeTask}}]
    [ a r:Fact; r:gives {{:task1 a :CompositeTask.
     :task2 a :CompositeTask} log:notIncludes {:task2 a :DiscardedTask}}]
  );
  r:rule <#lemma8>.

<#lemma8> a r:Extraction;
  r:gives {
    {?x_2_2 n3:notIn ?x_0_2} <= {?x_0_2 log:semantics ?x_1_2.
     ?x_1_2 log:notIncludes ?x_2_2}.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/n3c/components.n3>].

