Advertisement
Semantiquele

OWL 2 Full Example "Mutual Love" (TPTP)

Nov 10th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 4.66 KB | None | 0 0
  1. % This is the translation of the example for mutual love
  2. % based on a functional "loves" relation into TPTP.
  3. % "conclusion.tptp" and "premise.tptp" are the
  4. % conclusion and premise, respectively, translated
  5. % from the respective RDF files at
  6. % <http://pastebin.com/W8n6YuQN>.
  7. % owl2full_sufficientaxioms.tptp is the translation
  8. % of a small fragment of the full set of
  9. % OWL 2 RDF-Based semantic conditions into TPTP,
  10. % which is sufficient to prove the result.
  11. % To do OWL 2 Full reasoning, just copy and paste
  12. % this whole file into any TPTP-aware FOL theorem prover.
  13. % There are plenty of FOL reasoners at
  14. %     <http://tptp.org/cgi-bin/SystemOnTPTP>
  15.  
  16. % ============= conclusion.tptp ==================
  17.  
  18. fof(conclusion,conjecture,(
  19.     iext(uri_ex_mutuallyLoves,uri_ex_Naoko,uri_ex_Sato) )).
  20.  
  21. % ============= premise.tptp =====================
  22.  
  23. fof(premise,axiom,(
  24.     ? [X1,X2,X0,X3] :
  25.       ( iext(uri_ex_loves,uri_ex_Sato,uri_ex_Naoko)
  26.       & iext(uri_rdfs_subPropertyOf,uri_ex_mutuallyLoves,uri_ex_loves)
  27.       & iext(uri_owl_inverseOf,uri_ex_lovedBy,uri_ex_loves)
  28.       & iext(uri_owl_minCardinality,X0,literal_typed(dat_str_1,uri_xsd_nonNegativeInteger))
  29.       & iext(uri_owl_onProperty,X0,uri_ex_mutuallyLoves)
  30.       & iext(uri_rdf_type,X0,uri_owl_Restriction)
  31.       & iext(uri_ex_loves,uri_ex_Naoko,uri_ex_Sato)
  32.       & iext(uri_owl_equivalentClass,uri_ex_MutuallyLoved,X0)
  33.       & iext(uri_owl_equivalentClass,uri_ex_MutuallyLoved,X1)
  34.       & iext(uri_owl_hasSelf,X1,literal_typed(dat_str_true,uri_xsd_boolean))
  35.       & iext(uri_owl_onProperty,X1,uri_ex_lovesLovedBy)
  36.       & iext(uri_owl_propertyChainAxiom,uri_ex_lovesLovedBy,X2)
  37.       & iext(uri_rdf_rest,X3,uri_rdf_nil)
  38.       & iext(uri_rdf_first,X3,uri_ex_lovedBy)
  39.       & iext(uri_rdf_type,uri_ex_loves,uri_owl_FunctionalProperty)
  40.       & iext(uri_rdf_rest,X2,X3)
  41.       & iext(uri_rdf_first,X2,uri_ex_loves) ) )).
  42.  
  43. % ============= owl2full_sufficientaxioms.tptp ===
  44.  
  45. fof(simple_ir, axiom, (
  46.     ! [X] : (
  47.         ir(X) ))) .
  48.  
  49. fof(rdfs_ic_def, axiom, (
  50.     ! [X] : (
  51.             ic(X)
  52.         <=>
  53.             icext(uri_rdfs_Class, X) ))) .
  54.  
  55. fof(rdfs_cext_def, axiom, (
  56.     ! [X, C] : (
  57.             iext(uri_rdf_type, X, C)
  58.         <=>
  59.             icext(C, X) ))) .
  60.  
  61. fof(owl_chain_002, axiom, (
  62.     ! [P, S1, P1, S2, P2] : (
  63.             ( iext(uri_rdf_first, S1, P1)
  64.             & iext(uri_rdf_rest, S1, S2)
  65.             & iext(uri_rdf_first, S2, P2)
  66.             & iext(uri_rdf_rest, S2, uri_rdf_nil) )
  67.         => (
  68.                iext(uri_owl_propertyChainAxiom, P, S1)
  69.            <=> (
  70.                  ip(P)
  71.                & ip(P1)
  72.                & ip(P2)
  73.                & ( ! [Y0, Y1, Y2] : (
  74.                        ( iext(P1, Y0, Y1)
  75.                        & iext(P2, Y1, Y2) )
  76.                    =>
  77.                        iext(P, Y0, Y2) ))))))) .
  78.  
  79. fof(owl_inv, axiom, (
  80.     ! [P1, P2] : (
  81.             iext(uri_owl_inverseOf, P1, P2)
  82.         <=> (
  83.               ip(P1)
  84.             & ip(P2)
  85.             & ( ! [X, Y] : (
  86.                     iext(P1, X, Y)
  87.                 <=>
  88.                     iext(P2, Y, X) )))))) .
  89.  
  90. fof(owl_eqdis_equivalentclass, axiom, (
  91.     ! [C1, C2] : (
  92.             iext(uri_owl_equivalentClass, C1, C2)
  93.         <=> (
  94.               ic(C1)
  95.             & ic(C2)
  96.             & ( ! [X] : (
  97.                     icext(C1, X)
  98.                 <=>
  99.                     icext(C2, X) )))))) .
  100.  
  101. fof(owl_rdfsext_subpropertyof, axiom, (
  102.     ! [P1, P2] : (
  103.             iext(uri_rdfs_subPropertyOf, P1, P2)
  104.         <=> (
  105.               ip(P1)
  106.             & ip(P2)
  107.             & ( ! [X, Y] : (
  108.                     iext(P1, X, Y)
  109.                 =>
  110.                     iext(P2, X, Y) )))))) .
  111.  
  112.  
  113. fof(owl_char_functional, axiom, (
  114.     ! [P] : (
  115.             icext(uri_owl_FunctionalProperty, P)
  116.         <=> (
  117.               ip(P)
  118.             & ( ! [X, Y1, Y2] : (
  119.                     ( iext(P, X, Y1)
  120.                     & iext(P, X, Y2) )
  121.                 =>
  122.                     Y1 = Y2 )))))) .
  123.  
  124. fof(owl_restrict_mincard_001, axiom, (
  125.     ! [Z, P] : (
  126.            ( iext(uri_owl_minCardinality, Z, literal_typed(dat_str_1, uri_xsd_nonNegativeInteger))
  127.            & iext(uri_owl_onProperty, Z, P) )
  128.         => (
  129.             ! [X] : (
  130.                     icext(Z, X)
  131.                 <=> (
  132.                       ? [Y] :
  133.                           iext(P, X, Y) )))))) .
  134.  
  135. fof(owl_restrict_hasself, axiom, (
  136.     ! [Z, P, V] : (
  137.             ( iext(uri_owl_hasSelf, Z, V)
  138.             & iext(uri_owl_onProperty, Z, P) )
  139.         => (
  140.             ! [X] : (
  141.                     icext(Z, X)
  142.                 <=>
  143.                     iext(P, X, X) ))))) .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement