The Chandra–Merlin theorem
Lax420092.ChandraMerlin · concepts/Lax420092/ChandraMerlin.lean · lax-420092
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
The left query of a pair is contained in the right one exactly when there is a homomorphism from the right query to the canonical database of the left one: a map of the universe to itself, fixing the constants, that sends every atom of the right query to an atom of the left query. This is the theorem of Chandra and Merlin (1977), at the schema of graph databases.
Concept map
Lean source view on GitHub
| 1 | import Lax904597.Problems |
| 2 | import Lax904597.Interpretations |
| 3 | import Lax904597.Classes |
| 4 | import Lax799700.Problems |
| 5 | import Lax420092.QueryDatabases |
| 6 | import Lax420092.Evaluation |
| 7 | import Lax420092.QueryPairs |
| 8 | import Lax420092.PackagedInstances |
| 9 | |
| 10 | /-! |
| 11 | --- |
| 12 | title: The Chandra–Merlin theorem |
| 13 | type: theorem |
| 14 | --- |
| 15 | The left query of a pair is contained in the right one exactly when there is |
| 16 | a homomorphism from the right query to the canonical database of the left |
| 17 | one: a map of the universe to itself, fixing the constants, that sends every |
| 18 | atom of the right query to an atom of the left query. This is the theorem of |
| 19 | Chandra and Merlin (1977), at the schema of graph databases. |
| 20 | -/ |
| 21 | |
| 22 | namespace Lax420092.ChandraMerlin |
| 23 | |
| 24 | open FirstOrder FirstOrder.Language |
| 25 | open Lax904597.Problems Lax904597.Interpretations Lax904597.Classes Lax799700.Problems |
| 26 | open Lax420092.QueryDatabases Lax420092.Evaluation Lax420092.QueryPairs Lax420092.PackagedInstances |
| 27 | |
| 28 | /-- The Chandra–Merlin theorem. -/ |
| 29 | axiom queryContained_iff_hom : ∀ (A : Type) [queryPair.Structure A], |
| 30 | QueryContained A ↔ CQHom (PairVar (A := A)) (RAtom (A := A)) (LAtom (A := A)) |
| 31 | |
| 32 | end Lax420092.ChandraMerlin |
| 33 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments