Documentation

ExistentialRules.AtomsAndRules.FactSet

FactSet #

A FactSet is plainly a Set of Facts.

@[reducible, inline]
abbrev FactSet (sig : Signature) [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] :
Type (max (max u_3 u_2) u_1)
Equations
Instances For
    def FactSet.predicates {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (fs : FactSet sig) :
    Set sig.P

    The predicate symbols of a FactSet are the predicate symbols from all facts.

    Equations
    Instances For
      def FactSet.terms {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (fs : FactSet sig) :

      The terms of a FactSet are the terms from all facts.

      Equations
      Instances For
        def FactSet.constants {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (fs : FactSet sig) :
        Set sig.C

        The constants of a FactSet are the constants from all facts.

        Equations
        Instances For
          def FactSet.function_symbols {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (fs : FactSet sig) :

          The function symbols of a FactSet are the function symbols from all facts.

          Equations
          Instances For

            A FactSet is function free if all of its facts are.

            Equations
            Instances For
              @[simp]

              When converting a list to a FactSet, the terms remain the same.

              theorem FactSet.terms_subset_of_subset {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {fs1 fs2 : FactSet sig} :
              fs1 fs2fs1.terms fs2.terms

              The a FactSet is a subset of another, then their terms share this subset relation.

              @[simp]
              theorem FactSet.terms_union {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {fs1 fs2 : FactSet sig} :
              (fs1 fs2).terms = fs1.terms fs2.terms

              The terms of the union of two FactSets are the union of the terms of both sets.

              theorem FactSet.terms_finite_of_finite {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] (fs : FactSet sig) (finite : Set.finite fs) :

              If a FactSet is finite, so are its terms.

              @[simp]

              When converting a list to a FactSet, the constants remain the same.

              theorem FactSet.mem_constants_iff_mem_terms {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {fs : FactSet sig} {c : sig.C} :

              A constant occurs in the fact set iff it occurs as a constant in one of its terms.

              theorem FactSet.constants_subset_of_subset {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {fs1 fs2 : FactSet sig} :
              fs1 fs2fs1.constants fs2.constants

              The a FactSet is a subset of another, then their constants share this subset relation.

              @[simp]
              theorem FactSet.constants_union {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] {fs1 fs2 : FactSet sig} :
              (fs1 fs2).constants = fs1.constants fs2.constants

              The constants of the union of two FactSets are the union of the constants of both sets.

              If a FactSet is finite, so are its constants.

              A FactSet is finite if both its predicates and terms are. This holds since the fact set must be a subset of all facts that can possibly be constructed using the prediactes and terms available. This overapproximation is easily shown to be finite.

              For a list of terms in a given FactSet, we can find a list of facts in the fact set such that all the terms from the list occur in the list of facts.