Cores #
In this file, we define cores of fact sets. Namely, we define FactSet.isWeakCore and FactSet.isStrongCore.
FactSets that are models and cores are interesting since there are (intuitively speaking) the smallest possible models.
Under certain condition, the chase is able to produce a core directly, which is very desirable since the result of the chase is also always a universal model.
But this is discussed in other files. Here, we are only concerned with the definition of cores on FactSets and some of their properties.
Strong GroundTermMappings (and Homomorphisms) #
Intuitively, a homomorphism is strong if it not only retains membership but also non-membership.
We define being strong as a standalone property for GroundTermMappings
without requiring any additional properties for the underlying GroundTermMapping.
A GroundTermMapping is strong for FactSets $A$ and $B$ if each element not in $A$, its mapping is not in $B$. However, we only demand this for elements that only feature terms from a given domain because we do not want to care about the mapping of terms outside the domain.
Equations
Instances For
If the composition of two mappings is strong from $A$ to $C$ and the second mapping is a homomorphism from $B$ to $C$, then the first mapping is strong from $A$ to $B$.
Repetition of GroundTermMappings (and Homomorphisms) #
Since homomorphisms are functions over terms, we can repeat them. Here, we show some nice properties of repeated homomorphisms and endomorphisms in particular. For example, we prove that a repeated endomorphisms is again an endomorphisms.
Repeating a mapping retains the GroundTermMapping.isIdOnConstants property.
Repeating a mapping retains the GroundTermMapping.isHomomorphism property at least for endomorphisms.
Cores Definitions and some of their Properties #
Here, we finally define isWeakCore and isStrongCore and show some of their relations and additional properties. This also involves some more theorems about homomorphisms.
A FactSet is a weak core if every endomorphisms on the fact set is strong and injective.
Equations
- fs.isWeakCore = ∀ (h : GroundTermMapping sig), h.isHomomorphism fs fs → h.strong fs.terms fs fs ∧ Function.injectiveSet h fs.terms
Instances For
A FactSet is a strong core if every endomorphisms on the fact set is strong, injective, and surjective. (By definition, every strong core is a weak core.)
Equations
- fs.isStrongCore = ∀ (h : GroundTermMapping sig), h.isHomomorphism fs fs → h.strong fs.terms fs fs ∧ Function.injectiveSet h fs.terms ∧ Function.surjectiveSet h fs.terms fs.terms
Instances For
We say that a fact set $C$ is a homomorphic subset of another fact set $F$ if $C$ is a subset of $F$ and there is a homomorphism from $F$ to $C$.
Instances For
For a homomorphism on a finite fact set, injectivity implies surjectivity.
For a homomorphism on a finite fact set, injectivity implies that the homomorphisms is also strong.
For finite fact sets, isWeakCore implies isStrongCore. That means that isWeakCore and isStrongCore are equivalent on finite fact sets.
Given two fact sets A,B of which one is a weak and one is a strong core, if there are homomorphisms from A to B and B to A, then there exists an isomorphism from A to B, i.e. a strong homomorphisms that is injective and surjective.
Strong cores of fact sets are unique up to isomorphism. That is, consider a fact set $F$. A strong core $C$ for $F$ is a strong core that is also a homomorphic subset of $F$. Now every (other) homomorphic subset $C'$ of $F$ that is at least a weak core has an isomorphism into $C$.
Consider a KnowledgeBase and a universal model of the KB that is a strong core. Then every (other) universal model that is at least a weak core, is isomorphism to the strong core.
Given a model of a KnowledgeBase, every strong core of the model is also a model. In general, this does not hold for weak cores (in the infinite setting).
Building on top of the previous theorem, a strong core of a universal model is not only a model but also universal.