-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10.30.16 | ||
10.30.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
---------------------- | ||
Proof by contradiction | ||
---------------------- | ||
|
||
Using log:implies false and log:satisfiable to deal with negation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@prefix : <urn:example:>. | ||
|
||
:Socrates a :Mortal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
@prefix : <urn:example:>. | ||
@prefix skolem: <https://eyereasoner.github.io/.well-known/genid/8b98b360-9a70-4845-b52c-c675af60ad01#>. | ||
@prefix r: <http://www.w3.org/2000/10/swap/reason#>. | ||
@prefix n3: <http://www.w3.org/2004/06/rei#>. | ||
@prefix var: <http://www.w3.org/2000/10/swap/var#>. | ||
@prefix log: <http://www.w3.org/2000/10/swap/log#>. | ||
|
||
skolem:proof a r:Proof, r:Conjunction; | ||
r:component skolem:lemma1; | ||
r:gives { | ||
:Socrates a :Mortal. | ||
}. | ||
|
||
skolem:lemma1 a r:Inference; | ||
r:gives { | ||
:Socrates a :Mortal. | ||
}; | ||
r:evidence ( | ||
skolem:lemma2 | ||
); | ||
r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "urn:example:Socrates"]]; | ||
r:rule skolem:lemma3. | ||
|
||
skolem:lemma2 a r:Inference; | ||
r:gives { | ||
:Socrates a :Mortal. | ||
}; | ||
r:evidence ( | ||
skolem:lemma4 | ||
[ a r:Fact; r:gives {@forSome var:x_0. { | ||
:Socrates a :Human. | ||
{ | ||
:Socrates a :Human. | ||
} => { | ||
:Socrates a :Mortal. | ||
}. | ||
{ | ||
var:x_0 a :Mortal. | ||
} => false. | ||
} log:satisfiable false}] | ||
); | ||
r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]; r:boundTo [ n3:uri "urn:example:Socrates"]]; | ||
r:binding [ r:variable [ n3:uri "http://www.w3.org/2000/10/swap/var#x_1"]; r:boundTo [ n3:uri "http://www.w3.org/2000/10/swap/var#x_0"]]; | ||
r:rule skolem:lemma5. | ||
|
||
skolem:lemma3 a r:Extraction; | ||
r:gives { | ||
@forAll var:x_0. { | ||
var:x_0 a :Mortal. | ||
} => { | ||
var:x_0 a :Mortal. | ||
}. | ||
}; | ||
r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/proof-by-contradiction/example1-query.n3>]. | ||
|
||
skolem:lemma4 a r:Extraction; | ||
r:gives { | ||
:Socrates a :Human. | ||
}; | ||
r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/proof-by-contradiction/example1.n3>]. | ||
|
||
skolem:lemma5 a r:Extraction; | ||
r:gives { | ||
@forAll var:x_0, var:x_1. { | ||
var:x_0 a :Human. | ||
{ | ||
var:x_0 a :Human. | ||
{ | ||
var:x_0 a :Human. | ||
} => { | ||
var:x_0 a :Mortal. | ||
}. | ||
{ | ||
var:x_1 a :Mortal. | ||
} => false. | ||
} log:satisfiable false. | ||
} => { | ||
var:x_0 a :Mortal. | ||
}. | ||
}; | ||
r:because [ a r:Parsing; r:source <https://eyereasoner.github.io/eye/reasoning/proof-by-contradiction/example1.n3>]. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@prefix : <urn:example:>. | ||
|
||
# query | ||
{ | ||
?X a :Mortal. | ||
} => { | ||
?X a :Mortal. | ||
}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@prefix list: <http://www.w3.org/2000/10/swap/list#>. | ||
@prefix log: <http://www.w3.org/2000/10/swap/log#>. | ||
@prefix var: <http://www.w3.org/2000/10/swap/var#>. | ||
@prefix : <urn:example:>. | ||
|
||
# facts | ||
:Socrates a :Human. | ||
|
||
# proof by contradiction | ||
{ | ||
?X a :Human. | ||
{ | ||
?X a :Human. | ||
{ ?X a :Human } => { ?X a :Mortal }. | ||
{ ?Y a :Mortal } => false. | ||
} log:satisfiable false. | ||
} => { | ||
?X a :Mortal. | ||
}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
eye --quiet --skolem-genid 8b98b360-9a70-4845-b52c-c675af60ad01 --wcache https://eyereasoner.github.io/eye/reasoning .. --nope https://eyereasoner.github.io/eye/reasoning/proof-by-contradiction/example1.n3 --query https://eyereasoner.github.io/eye/reasoning/proof-by-contradiction/example1-query.n3 --output example1-answer.n3 | ||
eye --quiet --skolem-genid 8b98b360-9a70-4845-b52c-c675af60ad01 --wcache https://eyereasoner.github.io/eye/reasoning .. https://eyereasoner.github.io/eye/reasoning/proof-by-contradiction/example1.n3 --query https://eyereasoner.github.io/eye/reasoning/proof-by-contradiction/example1-query.n3 --output example1-proof.n3 |