scrambled
Concept

Alpha equivalence

Modified just now

Then, =_\\alpha is the strongest Congruence on $\mathcal{A}$that contains the followings:

  • Formal definition according to Practical foundations for programming languages

    Consider:

    • A fixed set of Sort S\mathcal{S}, which categorize ASTs into Syntactic category.

    • A sort-indexed family of Variables X={Xs}\mathcal{X} = \{ \mathcal{X}_s \}, where Xs\mathcal{X}_s is the set of variables with sort S\mathcal{S}. A sequence of variable is written as x\vec{x}.

    • A sort-indexed family of Abstract syntax tree (AST)s A={As}\mathcal{A} = \{\mathcal{A}_s \}, where As\mathcal{A}_s is the set of ASTs with sort S\mathcal{S}.

    • An Arity-indexed family of Operator O={Oα}\mathcal{O}= \{\mathcal{O}_\alpha\}, where Oα\mathcal{O}_\alpha is the set of operators with the given arity α\alpha.

    • A fresh renaming with respect to X\mathcal{X} is a bijection ρ:xy\rho : \vec{x} \leftrightarrow \vec{y} such that y\vec{y} is fresh in X\mathcal{X}.

      Then, =α=_\alpha is the strongest Congruence on $\mathcal{A}$that contains the followings:

    • For xXx \in \mathcal{X}, then x=αxx =_\alpha x.

    • For oOo \in \mathcal{O}, then o(x1.a1;;xn.an)=αo(x1.a1;;xn.an)o(\vec{x}_1.a_1; \dots; \vec{x}_n.a_n) =_\alpha o(\vec{x}'_1.a'_1; \dots; \vec{x}'_n.a'_n) if for every 1in1 \leq i \leq n, ρ^i(ai)=αρ^i(ai)\hat{\rho}_i(a_i) =_\alpha \hat{\rho}'_i(a'_i) for all fresh renamings ρi:xizi\rho_i : \vec{x}_i \leftrightarrow \vec{z}_i and ρi:xizi\rho'_i : \vec{x}'_i \leftrightarrow \vec{z}_i.