Documentation

ExistentialRules.ChaseSequence.Termination.ConstantMappings.InterplayWithBacktracking.BacktrackingUnderConstantMappingSubsetOfComposingWithSubs.PreTrigger

Interaction of Backtrackings and Strict Constant Mappings on PreTrigger #

We merely lift GroundTerm.backtrackFacts_under_constant_mapping_subset_of_composing_with_subs to PreTrigger here.

The affected rules for triggers with the PreTrigger.same_skeleton are the same.

Since a strict constant mapping does not change term structure, the affected rules of a trigger stay the same when a strict constant mapping is applied after the substitution.

theorem PreTrigger.backtracking_under_constant_mapping_subset_of_composing_with_subs {sig : Signature} [DecidableEq sig.C] [DecidableEq sig.V] [DecidableEq sig.P] [GetFreshInhabitant sig.C] [Inhabited sig.C] (trg : PreTrigger sig) (g : StrictConstantMapping sig) :
(∀ (d : sig.C), d List.flatMap Rule.constants trg.affected_rules_for_backtrackingg d = d) (fresh_constant_remapping : StrictConstantMapping sig), (∀ (d : sig.C), ¬d trg.backtrackFacts.sndfresh_constant_remapping d = d) (StrictConstantMapping.toConstantMapping fun (c : sig.C) => if c trg.backtrackFacts.snd then fresh_constant_remapping c else g c).apply_fact_set trg.backtrackFacts.fst.toSet { rule := trg.rule, subs := g.toConstantMapping.apply_ground_term trg.subs }.backtrackFacts.fst.toSet List.map fresh_constant_remapping trg.backtrackFacts.snd = { rule := trg.rule, subs := g.toConstantMapping.apply_ground_term trg.subs }.backtrackFacts.snd