Documentation

ExistentialRules.ChaseSequence.Termination.Basic

Chase Termination #

We introduce basic definitions and theorems around chase termination.

A ChaseDerivationSkeleton terminates if the underlying PossiblyInfiniteList is finite.

Equations
Instances For
    def ChaseDerivation.terminates {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} (cd : ChaseDerivation obs rules) :

    A ChaseDerivation terminates if the underlying ChaseDerivationSkeleton is finite.

    Equations
    Instances For
      def TreeDerivation.terminates {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} (td : TreeDerivation obs rules) :

      A TreeDerivation terminates if all of its branches terminate.

      Equations
      Instances For

        A KnowledgeBase terminates if all of its ChaseTrees terminate.

        Equations
        Instances For
          def RuleSet.terminates {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (rs : RuleSet sig) (obs : ObsolescenceCondition sig) :

          A RuleSet terminates if all knowledge bases featuring this rule set terminate.

          Equations
          Instances For
            theorem ChaseDerivationSkeleton.has_last_node_of_terminates {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} (cds : ChaseDerivationSkeleton obs rules) :
            cds.terminates (node : cds.Node), ∀ (node2 : cds.Node), node2 node

            If a ChaseDerivationSkeleton terminates, then there is a maximal node according to the relation.

            theorem ChaseDerivation.terminating_has_last_node {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} (cd : ChaseDerivation obs rules) :
            cd.terminates (node : cd.Node), ∀ (node2 : cd.Node), node2 node

            A ChaseDerivation terminates if and only if there is a maximal node according to the relation.

            A ChaseBranch terminates if and only if its result is Set.finite.

            A terminating TreeDerivation only has finitely many branches. We show this using König's Lemma.

            A TreeDerivation with finitely many branches only has finitely many fact sets in its result.

            theorem ChaseTree.terminates_iff_result_finite {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {kb : KnowledgeBase sig} (ct : ChaseTree obs kb) :
            ct.terminates ∀ (fs : FactSet sig), fs ct.resultSet.finite fs

            A ChaseTree terminates if and only if each fact set in its result is finite.