Documentation

ExistentialRules.ChaseSequence.Nontermination.Unblockability

Unblockability #

Here we define what it means for a trigger to be unblockable and we also introduce overapproximations that can be used to witness unblockability.

THIS IS VERY MUCH WORK IN PROGRESS!

Another Condition for Obsolescence #

For RPC-like conditions we require another property of ObsolescenceCondition conditions that does not hold for the general definition. The condition shall be stable across certain GroundTermMappings that at least map the head constants to themselves. But this only needs to be true of no fresh term of the trigger already occurs, which, in the context of a chase, means that the trigger itself has not been applied before. The reason for excluding this case is a bit technical. Bottom line, we do this as otherwise the property would simply not hold for SkolemObsolescence. But if a trigger is only obsolete according to SkolemObsolescence because it was already applied, then we do not really care. The interesting case is that a trigger is obsolete because a disjunct without existentials is already present.

Anyway, at the end you probably don't need to care much about the condition. It is enough to show the desired theorems and as a sanity check, we also prove that it holds for both SkolemObsolescence and RestrictedObsolescence as intended.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Unblockability and Overapproximations #

    We now start to define what it means for a trigger to be unblockable. Also we define the notion of Overapproximation that gives us a way of detecting unblockability. Specific such overapproximations will follow later.

    A trigger is kbUnblockable for a given KnowledgeBase and HeadChoice if, for every derivation, when the trigger is loaded in a node of the branch indicated by the HeadChoice, then the HeadChoice result of the trigger also occurs in that branch. In the introducing paper this is called g-unblockable.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      A trigger is rsUnblockable for a given RuleSet if it is kbUnblockable for every KnowledgeBase with the rule set in question.

      Equations
      Instances For
        theorem Trigger.rsUnblockable_of_isDatalog_of_isDeterministic {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} {hc : HeadChoice sig} {trg : RTrigger { cond := obs.cond, monotone := ⋯ } rules} (isDatalog : trg.val.rule.isDatalog = true) (isDet : trg.val.rule.isDeterministic = true) :
        rsUnblockable rules hc trg.val

        Every deterministic Datalog trigger is rsUnblockable.

        This is Definition 7 from the [GC23a] paper.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem FactSet.is_rpc_overapproximation_of_equiv {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} {rules : RuleSet sig} {hc : HeadChoice sig} (hc_consistent : hc.consistent_for_equivalent_triggers) {trg1 trg2 : Trigger obs.toLaxObsolescenceCondition} {fs : FactSet sig} (overapprox : is_rpc_overapproximation rules hc trg1 fs) :
          trg1.equiv trg2.toPreTrigger → is_rpc_overapproximation rules hc trg2 fs

          The overapproximation definition is independant of the trigger up to equivalence.

          theorem RTrigger.rsUnblockable_of_not_obsolete_for_overapproximation {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} (obs_propagates : obs.propagates_under_term_mapping_of_no_fresh_term_occurs) {rules : RuleSet sig} {hc : HeadChoice sig} (hc_consistent : hc.consistent_for_equivalent_triggers) {trg : RTrigger { cond := obs.cond, monotone := ⋯ } rules} {fs : FactSet sig} :
          FactSet.is_rpc_overapproximation rules hc trg.val fs → ¬obs.cond trg.val.toPreTrigger fs → Trigger.rsUnblockable rules hc trg.val

          This is Lemma 1 from the [GC23a] paper.

          theorem RTrigger.rsUnblockable_of_equiv_trigger_not_obsolete_for_overapproximation {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {obs : ObsolescenceCondition sig} (obs_propagates : obs.propagates_under_term_mapping_of_no_fresh_term_occurs) {rules : RuleSet sig} {hc : HeadChoice sig} (hc_consistent : hc.consistent_for_equivalent_triggers) {trg : RTrigger { cond := obs.cond, monotone := ⋯ } rules} {fs : FactSet sig} :
          FactSet.is_rpc_overapproximation rules hc trg.val fs → ¬obs.cond trg.val.toPreTrigger fs → ∀ (trg' : RTrigger { cond := obs.cond, monotone := ⋯ } rules), trg.equiv trg' → Trigger.rsUnblockable rules hc trg'.val

          A slight generalization of the above theorem showing that all equivalent triggers are also rsUnblockable.

          theorem Trigger.not_rsUnblockable_of_hc_exis_of_frontier_only_constants {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] [Inhabited sig.C] {rules : RuleSet sig} {hc : HeadChoice sig} {trg : RTrigger { cond := (RestrictedObsolescence sig).cond, monotone := ⋯ } rules} (rules_finite : CustomBasicDatastructures.Set.finite rules) (rules_non_empty_heads : ∀ (r : Rule sig), r ∈ rules → r.head ≠ []) (hc_consistent : hc.consistent_for_equivalent_triggers) (hc_exis : trg.val.rule.existential_vars_for_head_disjunct ↑(hc trg.val.toPreTrigger) ⋯ ≠ []) (frontier_only_constants : ∀ (t : GroundTerm sig), t ∈ trg.val.mapped_frontier → ∃ (c : sig.C), t = GroundTerm.const c) :
          ∃ (trg' : RTrigger { cond := (RestrictedObsolescence sig).cond, monotone := ⋯ } rules), trg.equiv trg' ∧ ¬rsUnblockable rules hc trg'.val

          If a trigger has a rule with at least one existentially quantified variable but only constants in the mapped frontier, then at least an equivalent trigger cannot be rsUnblockable. (It can still be kbUnblockable though.) To show this, we simply pick the knowledge base featuring the database with all the constants from the trigger interconnected. This is already a model so the only chase tree features exactly the root node. But then the result of the trigger does not occur.