Cyclicity Derivations and Branches #
This file formalizes what is called "cyclicity sequences" in the [GC23a] paper (Section 3) including the main result
that the existence of a CyclicityBranch implies that the given rule set RuleSet.neverTerminates (see CyclicityBranch.neverTerminates_of_cyclicityBranch).
A KnowledgeBase never-terminates if none of its ChaseTrees terminates.
Equations
- kb.neverTerminates obs N = ∀ (ct : ChaseTree N obs kb), ¬ct.terminates
Instances For
Maybe this seems counterintuitive but a RuleSet never-terminates if for at least one Database the corresponding KnowledgeBase.neverTerminates. Asking this question for all Databases would be trivial, at least for the restricted chase, since for every rule set there is a database that satisfies all the rules directly and therefore only has terminating restricted chase trees.
Equations
Instances For
A CyclicityDerivation is an infinite list of ChaseNodes. We demand only that triggers are loaded, new terms keep being added (growing) and that triggers are kbUnblockable. This is much different from a ChaseDerivation but intuitively, we can view a CyclicityDerivation as a very special non-continuous subderivation of a suitable ChaseDerivation.
- branch : PossiblyInfiniteList (RegularChaseNode obs kb.rules)
- triggers_exist (b2 : PossiblyInfiniteList (RegularChaseNode obs kb.rules)) : b2 <:+ self.branch → ∀ (before : RegularChaseNode obs kb.rules), before ∈ b2.head → ∀ (after : RegularChaseNode obs kb.rules), after ∈ b2.tail.head → ChaseNode.succ before after
- adheres_to_headChoice : self.adheres_to_headChoice hc
- triggers_loaded (cd2 : ChaseDerivationSkeleton (RegularChaseNode obs kb.rules) obs kb.rules) : cd2 <:+ self.toChaseDerivationSkeleton → ∀ (next : RegularChaseNode obs kb.rules), next ∈ cd2.next → ∃ (orig : ChaseNodeOrigin obs kb.rules), orig ∈ next.origin ∧ orig.fst.val.loaded cd2.head.facts
- unblockable (node : RegularChaseNode obs kb.rules) : node ∈ self.toChaseDerivationSkeleton → ∀ (orig : ChaseNodeOrigin obs kb.rules), orig ∈ node.origin → Trigger.kbUnblockable kb hc orig.fst.val
Instances For
Equations
- CyclicityDerivation.instMembershipRegularChaseNodeRules = { mem := fun (cd : CyclicityDerivation obs kb hc) (node : RegularChaseNode obs kb.rules) => node ∈ cd.toChaseDerivationSkeleton }
An element is a member of the derivation iff it occurs at some index in the underlying branch.
Each suffix of the underlying ChaseDerivationSkeleton is itself a CyclicityDerivation.
Equations
- cd.derivation_for_skeleton l2 suffix = { toChaseDerivationSkeleton := l2, adheres_to_headChoice := ⋯, triggers_loaded := ⋯, growing := ⋯, unblockable := ⋯ }
Instances For
We state a simplified version of the growing property.
Given a list of terms, we can find a suffix that contains a term that is not part of this list because of the growing property. This result is closest to the growing' statement.
We restate the growing property using predecessor vocabulary available for ChaseDerivationSkeletons.
Since the derivation is growing, a next node always exists.
Lifting ChaseDerivationSkeleton.next to the CyclicityDerivation.
Instances For
The next node is a member.
The fact set of the next ChaseNode consists exactly of the facts from head and the result of the trigger that introduces next.
The trigger used to derive ChaseDerivationSkeleton.next is loaded for ChaseDerivationSkeleton.head.
The tail of a CyclicityDerivation is again a CyclicityDerivation.
Equations
- cd.tail = cd.derivation_for_skeleton (cd.tail ⋯) ⋯
Instances For
The ChaseDerivationSkeleton.head of the tail is ChaseDerivationSkeleton.next.
We define a shortcut for RegularChaseDerivationSkeleton.result.
Equations
Instances For
The result of a CyclicityDerivation is infinite due to the growing property.
Each CyclicityDerivation is infinite because it is growing. It might surprise that this is independant from the above result. However, note that we can only relate finiteness of the result and termination for proper ChaseBranches so corresponding results are not applicable here.
For each node in the CyclicityDerivation, there is a node in the subderivation_for_headChoice for every TreeDerivation subsumes the facts.
The result of a CyclicityDerivation is a subset of the result of the subderivation_for_headChoice for every TreeDerivation.
This is the CyclicitySequence from the RPC paper. For us, it is a CyclicityDerivation that starts on a database.
- branch : PossiblyInfiniteList (RegularChaseNode obs kb.rules)
- triggers_exist (b2 : PossiblyInfiniteList (RegularChaseNode obs kb.rules)) : b2 <:+ self.branch → ∀ (before : RegularChaseNode obs kb.rules), before ∈ b2.head → ∀ (after : RegularChaseNode obs kb.rules), after ∈ b2.tail.head → ChaseNode.succ before after
- adheres_to_headChoice : self.adheres_to_headChoice hc
- triggers_loaded (cd2 : ChaseDerivationSkeleton (RegularChaseNode obs kb.rules) obs kb.rules) : cd2 <:+ self.toChaseDerivationSkeleton → ∀ (next : RegularChaseNode obs kb.rules), next ∈ cd2.next → ∃ (orig : ChaseNodeOrigin obs kb.rules), orig ∈ next.origin ∧ orig.fst.val.loaded cd2.head.facts
- unblockable (node : RegularChaseNode obs kb.rules) : node ∈ self.toChaseDerivationSkeleton → ∀ (orig : ChaseNodeOrigin obs kb.rules), orig ∈ node.origin → Trigger.kbUnblockable kb hc orig.fst.val
Instances For
The result of a CyclicityBranch is a subset of the result of the subderivation_for_headChoice for every ChaseTree.
If a KB admist a CyclicityBranch, then its rule set neverTerminates.