-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6410c1
commit e5ffe19
Showing
4 changed files
with
114 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import ProofLibrary.SubstitutionAndHomomorphismBasics | ||
|
||
namespace Function | ||
|
||
def injective (f : α -> β) : Prop := ∀ a b, f a = f b -> a = b | ||
|
||
def surjective (f : α -> β) : Prop := ∀ b, ∃ a, f a = b | ||
|
||
end Function | ||
|
||
namespace GroundTermMapping | ||
|
||
variable {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] | ||
|
||
-- TODO: do we really need this? | ||
def injective (h : GroundTermMapping sig) (A : FactSet sig) : Prop := | ||
∀ t t', (t ∈ A.terms ∧ t' ∈ A.terms) -> (h t = h t' -> t = t') | ||
|
||
-- TODO: do we really need this? | ||
def surjective (h : GroundTermMapping sig) (B : FactSet sig) : Prop := | ||
∀ t', t' ∈ B.terms -> ∃ t, h t = t' | ||
|
||
def strong (h : GroundTermMapping sig) (A B : FactSet sig) : Prop := | ||
∀ e, ¬ e ∈ A -> ¬ (h.applyFact e) ∈ B | ||
|
||
end GroundTermMapping | ||
|
||
namespace FactSet | ||
|
||
variable {sig : Signature} [DecidableEq sig.P] [DecidableEq sig.C] [DecidableEq sig.V] | ||
|
||
def isWeakCore (fs : FactSet sig) : Prop := | ||
∀ (h : GroundTermMapping sig), h.isHomomorphism fs fs -> h.strong fs fs ∧ h.injective fs | ||
|
||
def isStrongCore (fs : FactSet sig) : Prop := | ||
∀ (h : GroundTermMapping sig), h.isHomomorphism fs fs -> h.strong fs fs ∧ h.injective fs ∧ h.surjective fs | ||
|
||
theorem isStrongCore_of_isWeakCore_of_finite (fs : FactSet sig) (weakCore : fs.isWeakCore) (finite : fs.finite) : fs.isStrongCore := by | ||
rcases finite with ⟨l, finite⟩ | ||
unfold isStrongCore | ||
intro h isHom | ||
specialize weakCore h isHom | ||
rcases weakCore with ⟨strong, injective⟩ | ||
constructor | ||
. exact strong | ||
constructor | ||
. exact injective | ||
. intro b b_mem | ||
sorry | ||
|
||
end FactSet | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters