Documentation

ExistentialRules.ChaseSequence.Termination.ConstantMappings.InterplayWithRenamingConstantsApart

Interaction of Strict Constant Mappings and Renaming Constant Apart #

For PreGroundTerm, GroundTerm, GroundSubstitution, and PreTrigger, we do the following things:

  1. We define what it means for them to have the same_skeleton, which is the case if their only difference is the naming of constants in terms (but their structure is the same),
  2. we show a few obvious implications of the definition in 1,
  3. we show that applying a StrictConstantMapping yields something that has the same skeleton,
  4. we show that for two things with the same skeleton, we can find a StrictConstantMapping that maps the renamed apart version of the first thing to the second one while mapping each constant to itself that does not occur in the renamed apart version,
  5. we show that renaming constants apart does not change the skeleton.
theorem PreGroundTerm.same_skeleton_symm {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (term term2 : PreGroundTerm sig) :
term.same_skeleton term2 → term2.same_skeleton term
theorem PreGroundTerm.same_skeleton_list_symm {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (terms terms2 : List (PreGroundTerm sig)) :
same_skeleton_list terms terms2 → same_skeleton_list terms2 terms
theorem PreGroundTerm.same_skeleton_trans {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (term term2 term3 : PreGroundTerm sig) :
term.same_skeleton term2 → term2.same_skeleton term3 → term.same_skeleton term3
theorem PreGroundTerm.same_skeleton_list_trans {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (terms terms2 terms3 : List (PreGroundTerm sig)) :
same_skeleton_list terms terms2 → same_skeleton_list terms2 terms3 → same_skeleton_list terms terms3
theorem PreGroundTerm.exists_strict_constant_mapping_to_reverse_renaming {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] [CustomBasicDatastructures.GetFreshInhabitant sig.C] (term term2 : PreGroundTerm sig) (terms_same_skeleton : term.same_skeleton term2) (forbidden_constants : List sig.C) :
theorem PreGroundTerm.exists_strict_constant_mapping_to_reverse_renaming_list {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] [CustomBasicDatastructures.GetFreshInhabitant sig.C] (terms terms2 : List (PreGroundTerm sig)) (terms_same_skeleton : same_skeleton_list terms terms2) (forbidden_constants : List sig.C) :
def GroundTerm.same_skeleton {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (term term2 : GroundTerm sig) :
Equations
Instances For
    theorem GroundTerm.same_skeleton_symm {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (term term2 : GroundTerm sig) :
    term.same_skeleton term2 → term2.same_skeleton term
    theorem GroundTerm.same_skeleton_trans {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (term term2 term3 : GroundTerm sig) :
    term.same_skeleton term2 → term2.same_skeleton term3 → term.same_skeleton term3
    theorem GroundTerm.functions_eq_of_same_skeleton {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {term term2 : GroundTerm sig} (same_skel : term.same_skeleton term2) :
    term.functions = term2.functions
    theorem GroundTerm.rules_eq_of_same_skeleton {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {term term2 : GroundTerm sig} (same_skel : term.same_skeleton term2) :
    term.rules = term2.rules
    theorem GroundTerm.exists_strict_constant_mapping_to_reverse_renaming {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] [CustomBasicDatastructures.GetFreshInhabitant sig.C] (term term2 : GroundTerm sig) (terms_same_skeleton : term.same_skeleton term2) (forbidden_constants : List sig.C) :
    ∃ (g : StrictConstantMapping sig), g.toConstantMapping.apply_ground_term (term.rename_constants_apart forbidden_constants) = term2 ∧ ∀ (d : sig.C), ¬d ∈ (term.rename_constants_apart forbidden_constants).constants → g d = d
    Equations
    Instances For
      theorem GroundSubstitution.same_skeleton_for_vars_symm {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (subs subs2 : GroundSubstitution sig) (vars : List sig.V) :
      subs.same_skeleton_for_vars subs2 vars → subs2.same_skeleton_for_vars subs vars
      theorem GroundSubstitution.same_skeleton_for_vars_trans {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (subs subs2 subs3 : GroundSubstitution sig) (vars : List sig.V) :
      subs.same_skeleton_for_vars subs2 vars → subs2.same_skeleton_for_vars subs3 vars → subs.same_skeleton_for_vars subs3 vars
      theorem GroundSubstitution.same_skeleton_of_mem_vars {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {subs subs2 : GroundSubstitution sig} {vars : List sig.V} (same_skel : subs.same_skeleton_for_vars subs2 vars) {v : sig.V} (v_mem : v ∈ vars) :
      (subs v).same_skeleton (subs2 v)
      theorem GroundSubstitution.exists_strict_constant_mapping_to_reverse_renaming_for_vars {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] [CustomBasicDatastructures.GetFreshInhabitant sig.C] (subs subs2 : GroundSubstitution sig) (vars : List sig.V) (vars_nodup : vars.Nodup) (subs_same_skeleton : subs.same_skeleton_for_vars subs2 vars) (forbidden_constants : List sig.C) :
      ∃ (g : StrictConstantMapping sig), (∀ (v : sig.V), v ∈ vars → g.toConstantMapping.apply_ground_term (subs.rename_constants_apart_for_vars forbidden_constants vars v) = subs2 v) ∧ ∀ (d : sig.C), ¬d ∈ List.flatMap GroundTerm.constants (List.map (subs.rename_constants_apart_for_vars forbidden_constants vars) vars) → g d = d
      theorem GroundSubstitution.same_skeleton_of_rename_constants_apart_for_each_var {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] [CustomBasicDatastructures.GetFreshInhabitant sig.C] {subs : GroundSubstitution sig} {forbidden_constants : List sig.C} {vars : List sig.V} {v : sig.V} (v_mem : v ∈ vars) :
      (subs.rename_constants_apart_for_vars forbidden_constants vars v).same_skeleton (subs v)
      theorem PreTrigger.same_skeleton_symm {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (trg trg2 : PreTrigger sig) :
      trg.same_skeleton trg2 → trg2.same_skeleton trg
      theorem PreTrigger.same_skeleton_trans {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (trg trg2 trg3 : PreTrigger sig) :
      trg.same_skeleton trg2 → trg2.same_skeleton trg3 → trg.same_skeleton trg3