-
Notifications
You must be signed in to change notification settings - Fork 12
/
rules13.n3
42 lines (29 loc) · 965 Bytes
/
rules13.n3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Test filter in N3
#
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix daml: <http://www.daml.org/2001/03/daml+oil#> .
@prefix : <#> .
@prefix rules: <#> .
# Full DanC challenge
@forAll <#a>, <#b>, <#p> .
{ <#p> a daml:TransitiveProperty . } :means
{
{ @forAll <#x> , <#y> , <#z>.
{ <#x> <#p> <#y>. <#y> <#p> <#z>. } log:implies { <#x> <#p> <#z>. }
} a log:Truth.
} .
# Intoduce a symmetric implication for convienience
{ <#a> :means <#b>. } log:implies { <#a> log:implies <#b> .
<#b> log:implies <#a> . } .
{ <#a> log:implies <#b> .
<#b> log:implies <#a> . } log:implies { <#a> :means <#b>. } .
# and in fact, though it is not axiomatic...
#
#{ <#x> :means <#y>. } :means { <#x> log:implies <#y> .
# <#y> log:implies <#x> . } .
#
<#ancestor> a daml:TransitiveProperty .
# (Was the wrong way around for a long time, just confused people.)
<#pa> <#ancestor> <#granpa> .
<#bill> <#ancestor> <#pa> .
#ends