-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
245ecab
commit a6410c1
Showing
7 changed files
with
78 additions
and
62 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
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
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,27 @@ | ||
import ProofLibrary.KnowledgeBaseBasics | ||
import ProofLibrary.SubstitutionAndHomomorphismBasics | ||
|
||
namespace FactSet | ||
variable {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] | ||
|
||
def modelsDb (fs : FactSet sig) (db : Database sig) : Prop := | ||
db.toFactSet ⊆ fs | ||
|
||
def modelsRule (fs : FactSet sig) (rule : Rule sig) : Prop := | ||
∀ (s : GroundSubstitution sig), | ||
((s.apply_function_free_conj rule.body).toSet ⊆ fs) -> | ||
∃ (s' : GroundSubstitution sig) (i : Fin rule.head.length), | ||
(∀ v, v ∈ rule.frontier → s' v = s v) ∧ | ||
((s'.apply_function_free_conj (rule.head.get i)).toSet ⊆ fs) | ||
|
||
def modelsRules (fs : FactSet sig) (rules : RuleSet sig) : Prop := | ||
∀ r, r ∈ rules.rules -> fs.modelsRule r | ||
|
||
def modelsKb (fs : FactSet sig) (kb : KnowledgeBase sig) : Prop := | ||
fs.modelsDb kb.db ∧ fs.modelsRules kb.rules | ||
|
||
def universallyModelsKb (fs : FactSet sig) (kb : KnowledgeBase sig) : Prop := | ||
fs.modelsKb kb ∧ | ||
(∀ (m : FactSet sig), m.modelsKb kb -> ∃ (h : GroundTermMapping sig), h.isHomomorphism fs m) | ||
end FactSet | ||
|
Empty file.
Oops, something went wrong.