PREFIX t: <http://josd.github.io/eye/reasoning/tfcontext#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
PREFIX r: <http://www.w3.org/2000/10/swap/reason#>

[] a r:Proof, r:Conjunction;
  r:component <#lemma1>;
  r:component <#lemma2>;
  r:component <#lemma3>;
  r:component <#lemma4>;
  r:component <#lemma5>;
  r:component <#lemma6>;
  r:component <#lemma7>;
  r:gives {
    t:Antwerp-Belgium t:answer (t:Ghent-Belgium).
    t:Boston-USA t:answer (t:Cambridge-USA).
    t:Bruges-Belgium t:answer (t:Ghent-Belgium t:Ostend-Belgium).
    t:Cambridge-USA t:answer (t:Boston-USA).
    t:Chicago-USA t:answer ().
    t:Ghent-Belgium t:answer (t:Antwerp-Belgium t:Bruges-Belgium t:Ostend-Belgium).
    t:Ostend-Belgium t:answer (t:Bruges-Belgium t:Ghent-Belgium).
  }.

<#lemma1> a r:Inference;
  r:gives {
    t:Antwerp-Belgium t:answer (t:Ghent-Belgium).
  };
  r:evidence (
    <#lemma8>
    <#lemma8>
    [ a r:Fact; r:gives {((<http://josd.github.io/eye/reasoning/tfcontext/data-001.n3> <http://josd.github.io/eye/reasoning/tfcontext/rules-001.n3>) 1) e:findall (_:sk_0 {_:sk_0 geo:lat _:sk_1.
     _:sk_0 geo:long _:sk_2.
     _:sk_0 log:notEqualTo t:Antwerp-Belgium.
     (_:sk_1 51.2192) math:difference _:sk_3.
     (_:sk_3 2) math:exponentiation _:sk_4.
     (_:sk_2 4.4029) math:difference _:sk_5.
     (_:sk_5 2) math:exponentiation _:sk_6.
     (_:sk_4 _:sk_6) math:sum _:sk_7.
     (_:sk_7 0.5) math:exponentiation _:sk_8.
     _:sk_8 math:lessThan 1.0} (t:Ghent-Belgium))}]
  );
  r:rule <#lemma9>.

<#lemma2> a r:Inference;
  r:gives {
    t:Boston-USA t:answer (t:Cambridge-USA).
  };
  r:evidence (
    <#lemma10>
    <#lemma10>
    [ a r:Fact; r:gives {((<http://josd.github.io/eye/reasoning/tfcontext/data-001.n3> <http://josd.github.io/eye/reasoning/tfcontext/rules-001.n3>) 1) e:findall (_:sk_9 {_:sk_9 geo:lat _:sk_10.
     _:sk_9 geo:long _:sk_11.
     _:sk_9 log:notEqualTo t:Boston-USA.
     (_:sk_10 42.3584) math:difference _:sk_12.
     (_:sk_12 2) math:exponentiation _:sk_13.
     (_:sk_11 -71.0598) math:difference _:sk_14.
     (_:sk_14 2) math:exponentiation _:sk_15.
     (_:sk_13 _:sk_15) math:sum _:sk_16.
     (_:sk_16 0.5) math:exponentiation _:sk_17.
     _:sk_17 math:lessThan 1.0} (t:Cambridge-USA))}]
  );
  r:rule <#lemma9>.

<#lemma3> a r:Inference;
  r:gives {
    t:Bruges-Belgium t:answer (t:Ghent-Belgium t:Ostend-Belgium).
  };
  r:evidence (
    <#lemma11>
    <#lemma11>
    [ a r:Fact; r:gives {((<http://josd.github.io/eye/reasoning/tfcontext/data-001.n3> <http://josd.github.io/eye/reasoning/tfcontext/rules-001.n3>) 1) e:findall (_:sk_18 {_:sk_18 geo:lat _:sk_19.
     _:sk_18 geo:long _:sk_20.
     _:sk_18 log:notEqualTo t:Bruges-Belgium.
     (_:sk_19 51.2108) math:difference _:sk_21.
     (_:sk_21 2) math:exponentiation _:sk_22.
     (_:sk_20 3.2249) math:difference _:sk_23.
     (_:sk_23 2) math:exponentiation _:sk_24.
     (_:sk_22 _:sk_24) math:sum _:sk_25.
     (_:sk_25 0.5) math:exponentiation _:sk_26.
     _:sk_26 math:lessThan 1.0} (t:Ghent-Belgium t:Ostend-Belgium))}]
  );
  r:rule <#lemma9>.

<#lemma4> a r:Inference;
  r:gives {
    t:Cambridge-USA t:answer (t:Boston-USA).
  };
  r:evidence (
    <#lemma12>
    <#lemma12>
    [ a r:Fact; r:gives {((<http://josd.github.io/eye/reasoning/tfcontext/data-001.n3> <http://josd.github.io/eye/reasoning/tfcontext/rules-001.n3>) 1) e:findall (_:sk_27 {_:sk_27 geo:lat _:sk_28.
     _:sk_27 geo:long _:sk_29.
     _:sk_27 log:notEqualTo t:Cambridge-USA.
     (_:sk_28 42.3736) math:difference _:sk_30.
     (_:sk_30 2) math:exponentiation _:sk_31.
     (_:sk_29 -71.1097) math:difference _:sk_32.
     (_:sk_32 2) math:exponentiation _:sk_33.
     (_:sk_31 _:sk_33) math:sum _:sk_34.
     (_:sk_34 0.5) math:exponentiation _:sk_35.
     _:sk_35 math:lessThan 1.0} (t:Boston-USA))}]
  );
  r:rule <#lemma9>.

<#lemma5> a r:Inference;
  r:gives {
    t:Chicago-USA t:answer ().
  };
  r:evidence (
    <#lemma13>
    <#lemma13>
    [ a r:Fact; r:gives {((<http://josd.github.io/eye/reasoning/tfcontext/data-001.n3> <http://josd.github.io/eye/reasoning/tfcontext/rules-001.n3>) 1) e:findall (_:sk_36 {_:sk_36 geo:lat _:sk_37.
     _:sk_36 geo:long _:sk_38.
     _:sk_36 log:notEqualTo t:Chicago-USA.
     (_:sk_37 41.8781) math:difference _:sk_39.
     (_:sk_39 2) math:exponentiation _:sk_40.
     (_:sk_38 -87.6298) math:difference _:sk_41.
     (_:sk_41 2) math:exponentiation _:sk_42.
     (_:sk_40 _:sk_42) math:sum _:sk_43.
     (_:sk_43 0.5) math:exponentiation _:sk_44.
     _:sk_44 math:lessThan 1.0} ())}]
  );
  r:rule <#lemma9>.

<#lemma6> a r:Inference;
  r:gives {
    t:Ghent-Belgium t:answer (t:Antwerp-Belgium t:Bruges-Belgium t:Ostend-Belgium).
  };
  r:evidence (
    <#lemma14>
    <#lemma14>
    [ a r:Fact; r:gives {((<http://josd.github.io/eye/reasoning/tfcontext/data-001.n3> <http://josd.github.io/eye/reasoning/tfcontext/rules-001.n3>) 1) e:findall (_:sk_45 {_:sk_45 geo:lat _:sk_46.
     _:sk_45 geo:long _:sk_47.
     _:sk_45 log:notEqualTo t:Ghent-Belgium.
     (_:sk_46 51.0535) math:difference _:sk_48.
     (_:sk_48 2) math:exponentiation _:sk_49.
     (_:sk_47 3.7304) math:difference _:sk_50.
     (_:sk_50 2) math:exponentiation _:sk_51.
     (_:sk_49 _:sk_51) math:sum _:sk_52.
     (_:sk_52 0.5) math:exponentiation _:sk_53.
     _:sk_53 math:lessThan 1.0} (t:Antwerp-Belgium t:Bruges-Belgium t:Ostend-Belgium))}]
  );
  r:rule <#lemma9>.

<#lemma7> a r:Inference;
  r:gives {
    t:Ostend-Belgium t:answer (t:Bruges-Belgium t:Ghent-Belgium).
  };
  r:evidence (
    <#lemma15>
    <#lemma15>
    [ a r:Fact; r:gives {((<http://josd.github.io/eye/reasoning/tfcontext/data-001.n3> <http://josd.github.io/eye/reasoning/tfcontext/rules-001.n3>) 1) e:findall (_:sk_54 {_:sk_54 geo:lat _:sk_55.
     _:sk_54 geo:long _:sk_56.
     _:sk_54 log:notEqualTo t:Ostend-Belgium.
     (_:sk_55 51.2154) math:difference _:sk_57.
     (_:sk_57 2) math:exponentiation _:sk_58.
     (_:sk_56 2.9286) math:difference _:sk_59.
     (_:sk_59 2) math:exponentiation _:sk_60.
     (_:sk_58 _:sk_60) math:sum _:sk_61.
     (_:sk_61 0.5) math:exponentiation _:sk_62.
     _:sk_62 math:lessThan 1.0} (t:Bruges-Belgium t:Ghent-Belgium))}]
  );
  r:rule <#lemma9>.

<#lemma8> a r:Inference;
  r:gives {
    t:Antwerp-Belgium geo:lat 51.2192 .
    t:Antwerp-Belgium geo:long 4.4029 .
  };
  r:evidence (
    <#lemma16>
  );
  r:rule <#lemma17>.

<#lemma9> a r:Extraction;
  r:gives {
    {?x_0_1 geo:lat ?x_1_1.
     ?x_0_1 geo:long ?x_2_1.
     ?x_3_1 e:findall (?x_4_1 {?x_4_1 geo:lat ?x_5_1.
      ?x_4_1 geo:long ?x_6_1.
      ?x_4_1 log:notEqualTo ?x_0_1.
      (?x_5_1 ?x_1_1) math:difference ?x_7_1.
      (?x_7_1 2) math:exponentiation ?x_8_1.
      (?x_6_1 ?x_2_1) math:difference ?x_9_1.
      (?x_9_1 2) math:exponentiation ?x_10_1.
      (?x_8_1 ?x_10_1) math:sum ?x_11_1.
      (?x_11_1 0.5) math:exponentiation ?x_12_1.
      ?x_12_1 math:lessThan 1.0} ?x_13_1)} => {?x_0_1 t:answer ?x_13_1}.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/query-001.n3>].

<#lemma10> a r:Inference;
  r:gives {
    t:Boston-USA geo:lat 42.3584 .
    t:Boston-USA geo:long -71.0598 .
  };
  r:evidence (
    <#lemma18>
  );
  r:rule <#lemma17>.

<#lemma11> a r:Inference;
  r:gives {
    t:Bruges-Belgium geo:lat 51.2108 .
    t:Bruges-Belgium geo:long 3.2249 .
  };
  r:evidence (
    <#lemma19>
  );
  r:rule <#lemma17>.

<#lemma12> a r:Inference;
  r:gives {
    t:Cambridge-USA geo:lat 42.3736 .
    t:Cambridge-USA geo:long -71.1097 .
  };
  r:evidence (
    <#lemma20>
  );
  r:rule <#lemma17>.

<#lemma13> a r:Inference;
  r:gives {
    t:Chicago-USA geo:lat 41.8781 .
    t:Chicago-USA geo:long -87.6298 .
  };
  r:evidence (
    <#lemma21>
  );
  r:rule <#lemma17>.

<#lemma14> a r:Inference;
  r:gives {
    t:Ghent-Belgium geo:lat 51.0535 .
    t:Ghent-Belgium geo:long 3.7304 .
  };
  r:evidence (
    <#lemma22>
  );
  r:rule <#lemma17>.

<#lemma15> a r:Inference;
  r:gives {
    t:Ostend-Belgium geo:lat 51.2154 .
    t:Ostend-Belgium geo:long 2.9286 .
  };
  r:evidence (
    <#lemma23>
  );
  r:rule <#lemma17>.

<#lemma16> a r:Extraction;
  r:gives {
    t:Antwerp-Belgium t:position-tensor (51.2192 4.4029).
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/data-001.n3>].

<#lemma17> a r:Extraction;
  r:gives {
    {?x_0_2 t:position-tensor (?x_1_2 ?x_2_2)} => {?x_0_2 geo:lat ?x_1_2.
     ?x_0_2 geo:long ?x_2_2}.
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/rules-001.n3>].

<#lemma18> a r:Extraction;
  r:gives {
    t:Boston-USA t:position-tensor (42.3584 -71.0598).
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/data-001.n3>].

<#lemma19> a r:Extraction;
  r:gives {
    t:Bruges-Belgium t:position-tensor (51.2108 3.2249).
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/data-001.n3>].

<#lemma20> a r:Extraction;
  r:gives {
    t:Cambridge-USA t:position-tensor (42.3736 -71.1097).
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/data-001.n3>].

<#lemma21> a r:Extraction;
  r:gives {
    t:Chicago-USA t:position-tensor (41.8781 -87.6298).
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/data-001.n3>].

<#lemma22> a r:Extraction;
  r:gives {
    t:Ghent-Belgium t:position-tensor (51.0535 3.7304).
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/data-001.n3>].

<#lemma23> a r:Extraction;
  r:gives {
    t:Ostend-Belgium t:position-tensor (51.2154 2.9286).
  };
  r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/tfcontext/data-001.n3>].

