Documentation

ExistentialRules.ChaseSequence.Nontermination.RpcLike

RPC-like Non-Termination #

We are going to formalize sufficient conditions for chase non-termination. Mainly, we will introduce the necessary machinery from Restricted Prefix Cyclicity (RPC) [GC23a] but we also aim to generalize this to capture (Disjunctive) Model-Faithful Cyclicity ((D)MFC) [GC23b] [CDK17] at the same time.

SO FAR, WE ONLY HAVE A FEW VERY BASIC DEFINITIONS. THERE IS A LONG WAY TO GO.

A KnowledgeBase never-terminates if none of its ChaseTrees terminates.

Equations
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
      def Trigger.unblockable {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} (trg : Trigger obs.toLaxObsolescenceCondition) (disjIdx : Fin trg.mapped_head.length) (rules : RuleSet sig) :

      A trigger is unblockable if its result necessarily occurs in every derivation where the trigger is loaded. In the introducing paper this is called g-unblockable.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        structure CyclicityDerivation {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (obs : ObsolescenceCondition sig) (rules : RuleSet sig) extends ChaseDerivationSkeleton obs rules :
        Type (max (max u_1 u_2) u_3)

        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 unblockable. 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.

        Instances For
          @[implicit_reducible]
          Equations

          Each suffix of the underlying ChaseDerivationSkeleton is itself a CyclicityDerivation.

          Equations
          • cd.derivation_for_skeleton l2 suffix = { toChaseDerivationSkeleton := l2, triggers_loaded := , growing := , unblockable := }
          Instances For

            We restate the growing property using suffix vocabulary available for ChaseDerivationSkeletons.

            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.

            theorem CyclicityDerivation.growing'' {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} {cd : CyclicityDerivation obs rules} (node : cd.Node) :
            (node2 : cd.Node), node node2 (t : GroundTerm sig), ¬t node.val.facts.terms t node2.val.facts.terms

            We restate the growing property using predecessor vocabulary available for ChaseDerivationSkeletons.

            theorem CyclicityDerivation.isSome_next {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} {cd : CyclicityDerivation obs rules} :

            Since the derivation is growing, a next node always exists.

            def CyclicityDerivation.next {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} (cd : CyclicityDerivation obs rules) :
            ChaseNode obs rules

            Lifting ChaseDerivationSkeleton.next to the CyclicityDerivation.

            Equations
            Instances For
              theorem CyclicityDerivation.next_mem {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} {cd : CyclicityDerivation obs rules} :
              cd.next cd

              The next node is a member.

              The origin of the next ChaseNode needs to be set.

              theorem CyclicityDerivation.facts_next {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} {cd : CyclicityDerivation obs rules} :

              The fact set of the next ChaseNode consists exactly of the facts from head and the result of the trigger that introduces next.

              def CyclicityDerivation.tail {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} (cd : CyclicityDerivation obs rules) :

              The tail of a CyclicityDerivation is again a CyclicityDerivation.

              Equations
              Instances For

                The result of a CyclicityDerivation is infinite due to the growing property.

                theorem CyclicityDerivation.infinite {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} {cd : CyclicityDerivation obs rules} :

                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.

                theorem CyclicityDerivation.corresponding_tree_branch_exists {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} {cd : CyclicityDerivation obs rules} (td : TreeDerivation obs rules) (same_start : cd.head.facts = td.root.facts) :
                (deriv : ChaseDerivation obs rules), deriv td.branches cd.result deriv.result

                In every TreeDerivation that starts on the same initial fact set as the CyclicityDerivation, there exists a branch that corresponds to the CyclicityDerivation, meaning that it has the same result.

                structure CyclicityBranch {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (obs : ObsolescenceCondition sig) (kb : KnowledgeBase sig) extends CyclicityDerivation obs kb.rules :
                Type (max (max u_1 u_2) u_3)

                This is the CyclicitySequence from the RPC paper. For us, it is a CyclicityDerivation that starts on a database.

                Instances For
                  theorem CyclicityBranch.database_first' {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {kb : KnowledgeBase sig} {cb : CyclicityBranch obs kb} :
                  cb.head = { facts := kb.db.toFactSet.val, origin := none, facts_contain_origin_result := }

                  We restate the database_first condition in terms of the CyclicityDerivation vocabulary.

                  In every ChaseTree, there exists a branch that corresponds to the CyclicityBranch, meaning that it has the same result.