@prefix : <http://example.org/>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@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:gives {
    :Alice :loves :Bob.
    :Bob a :Person.
    :Alice :hates :Nobody.
  }.

skolem:lemma1 a r:Inference;
  r:gives {
    :Alice :loves :Bob.
  };
  r:evidence (
    skolem:lemma4
  );
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_0"]; r:boundTo [ n3:uri "http://example.org/loves"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.org/Alice"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_2"]; r:boundTo [ n3:uri "http://example.org/Bob"]];
  r:rule skolem:lemma5.

skolem:lemma2 a r:Inference;
  r:gives {
    :Bob a :Person.
  };
  r:evidence (
    skolem:lemma6
  );
  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.org/Bob"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_2"]; r:boundTo [ n3:uri "http://example.org/Person"]];
  r:rule skolem:lemma5.

skolem:lemma3 a r:Inference;
  r:gives {
    :Alice :hates :Nobody.
  };
  r:evidence (
    skolem:lemma7
  );
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_0"]; r:boundTo [ n3:uri "http://example.org/hates"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.org/Alice"]];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_2"]; r:boundTo [ n3:uri "http://example.org/Nobody"]];
  r:rule skolem:lemma5.

skolem:lemma4 a r:Extraction;
  r:gives {
    :Alice :loves :Bob.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/snaf/demo.n3>].

skolem:lemma5 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:lemma6 a r:Extraction;
  r:gives {
    :Bob a :Person.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/snaf/demo.n3>].

skolem:lemma7 a r:Inference;
  r:gives {
    :Alice :hates :Nobody.
  };
  r:evidence (
    [ a r:Fact; r:gives {((<http://josd.github.io/eye/reasoning/snaf/demo.n3> <http://josd.github.io/eye/reasoning/snaf/rules.n3>) 1) log:notIncludes {:Alice :hates :Bob}}]
    skolem:lemma6
  );
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_0"]; r:boundTo ((<http://josd.github.io/eye/reasoning/snaf/demo.n3> <http://josd.github.io/eye/reasoning/snaf/rules.n3>) 1)];
  r:binding [ r:variable [ n3:uri "http://josd.github.io/var#x_1"]; r:boundTo [ n3:uri "http://example.org/Bob"]];
  r:rule skolem:lemma8.

skolem:lemma8 a r:Extraction;
  r:gives {
    @forAll var:x_0, var:x_1. {var:x_0 log:notIncludes {:Alice :hates var:x_1}.
     var:x_1 a :Person} => {:Alice :hates :Nobody}.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/snaf/rules.n3>].

