Relationalization of a language: the graph language and its structures (Craig Layer 3, Unit 1) #
The first gated unit of the functions→relations relationalization (audit §9b): the relationalized
language graphLanguage L — no function symbols, each n-ary function f replaced by an
(n+1)-ary graph relation G_f with intended meaning G_f(xs, y) ↔ f(xs) = y — its graph
expansion of an L-structure, and the σ-level embeddings of the original symbols into the graph
language's relation symbols.
The disjoint indexed constructors of GraphRelation keep base relations and function graphs apart
definitionally, which is exactly what makes the shared-vocabulary identity
relSym L F₁ R₁ ∩ relSym L F₂ R₂ = relSym L (F₁ ∩ F₂) (R₁ ∩ R₂)
(the early correctness gate for the eventual sharp occurrence bound) a clean image/injectivity computation.
Contents #
GraphRelation,graphLanguage,graphLanguage_isRelational;graphExpansion(theG_f(xs,y) ↔ f(xs)=ystructure) withrelMap_base/relMap_graphsimp lemmas;baseRelSym/graphRelSymσ-embeddings, their injectivity and cross-disjointness;relSymand the intersection identityrelSym_inter.
The relationalized language #
Relation symbols of the relationalization of L: every base relation is kept at its arity,
and every n-ary function symbol becomes an (n+1)-ary graph relation. The two constructors are
disjoint by construction.
- base {L : Language} {n : ℕ} : L.Relations n → L.GraphRelation n
- graph {L : Language} {n : ℕ} : L.Functions n → L.GraphRelation (n + 1)
Instances For
The relationalization of L: no function symbols, relation symbols GraphRelation L.
Marked @[reducible] so that (graphLanguage L).Relations n unfolds to GraphRelation L n at
implicit transparency. The whole relationalization tower already treats the two as
interchangeable — baseRelSym/graphRelSym below take their codomain in GraphRelation L n
precisely so the constructors' injectivity and no-confusion lemmas apply directly, and the
companion graphExpansion is @[reducible] for the same reason. Since Lean 4.34 requires goals
to be type-correct at implicit transparency before rw/simp will act, that pre-existing
identification has to hold there too; otherwise every generic lemma about graphLanguage
formulas needs a specialized copy with the symbol spelled GraphRelation.base/.graph. This is
a direct structure literal with no proof content, so reducibility costs nothing.
Equations
- L.graphLanguage = { Functions := fun (x : ℕ) => Empty, Relations := fun (n : ℕ) => L.GraphRelation n }
Instances For
The graph expansion of an L-structure #
The graph expansion of an L-structure to a graphLanguage L-structure:
G_f(xs, y) ↔ f(xs) = y, base relations preserved, and no function symbols to interpret.
Equations
- L.graphExpansion M = { funMap := fun {n : ℕ} (f : L.graphLanguage.Functions n) (x : Fin n → M) => nomatch f, RelMap := fun {n : ℕ} => FirstOrder.Language.graphRelMap✝ M }
Instances For
σ-level embeddings of the original symbols #
Embed an original relation symbol as a base graph-language relation symbol. (Codomain uses
GraphRelation L n, definitionally (graphLanguage L).Relations n, so the constructor's
injectivity/no-confusion lemmas apply directly.)
Equations
Instances For
Embed an original n-ary function symbol as its (n+1)-ary graph relation symbol.
Equations
- L.graphRelSym p = ⟨p.fst + 1, FirstOrder.Language.GraphRelation.graph p.snd⟩
Instances For
Singleton preimages of the two embeddings — the Sigma-free interface the back-translation occurrence calculus computes with.
The relation-symbol set of the relationalization, and its intersection identity #
The relation symbols of the relationalization coming from a function-symbol set F and a
relation-symbol set R: base relations from R, graph relations from F.
Equations
- L.relSym F R = L.baseRelSym '' R ∪ L.graphRelSym '' F
Instances For
The shared-vocabulary identity (Unit 1 correctness gate): the relation-symbol sets of two relationalizations meet exactly in the relationalization of the shared symbols.