I'd like to formalize formal languages and their semantics in MMT and define a general notion of semantics equivalence of two semantics wrt. one syntax. Precisely, encoding the latter turns out to be an identification/glueing that I have no idea on how to do in MMT. Let me elaborate on my concrete formalization setup next.
Below is a simplified formalization showing my approach. Based on a theory Meta aggregating both the logical framework LF and some logic, I start in Syntax defining a general notion of expressions and typings. Then, in Semantics I define on top a semantics, here for simplicity, only a deductive semantics, i.e. a derivability relation.
theory Meta : http://cds.omdoc.org/urtheories?LF=
// some logic giving us a type `prop` of propositions,
// a notion of derivability ⊦, biimplication ⇔ etc. ❙
include ?Logic ❙
❙
theory Syntax : ?Meta =
// type for expressions ❙
expr: type ❙
// a typing relation
typing_rel: expr ⟶ expr ⟶ prop ❙
// ... ❙
❚
theory Semantics : ?Meta=
include ?Syntax ❙
// a deductive semantics: "derivable e" says e is a theorem ❙
derivable: expr ⟶ prop ❙
❚
Given this, I want to define the equivalence of two such semantics wrt. to one syntax. Encoding the first part is easy, see below; but I am having trouble encoding the latter requirement.
theory SemanticsEquivalence : ?Meta =
structure syn : ?Syntax ❚
// how can I force sem1|?Syntax = sem2|?Syntax = syn ❙
structure sem1 : ?Semantics = ❚
structure sem2 : ?Semantics = ❚
is_equivalent: {e: syn/expr} ⊦ (sem1/derivable e) ⇔ (sem2/derivable e) ❙
❚
How do I glue/identify the inclusions of Syntax in both sem1 and sem2?