I E

Nominal Sets: Appendix A (Proofs)

Here are the proofs for my Nominal Sets article. This was a personal exercise to improve my mathematical reasoning; I don’t expect anyone to read it. That said, if you do find any mistakes then please let me know!

Proof 1

Every finite permutation can be decomposed into a sequence of swaps. ↩︎

∀π.π=(a1π(a1))∘...∘(anπ(an)) where ai≠π(ai)≠π(aj)≠aj \forall \pi. \; \pi = (a_1 \; \pi(a_1)) \circ ... \circ (a_n \; \pi(a_n)) \text{ where } a_i \neq \pi(a_i) \neq \pi(a_j) \neq a_j

Induction on {x|π(x)≠x}:case {x|π(x)≠x}=∅trivialcase {x|π(x)≠x}=S∪{a} where a∉Sassume ∀π′.π′(a)=a∧{π′(b)=π(b)|b∈S}⟹π′=(a1π(a1))∘...∘(anπ(an))π=(aπ(a))∘(aπ(a))∘ππ′=(aπ(a))∘ππ′(a)=((aπ(a))∘π)(a)=(aπ(a))(π(a))=aπ′(b)=((aπ(a))∘π)(b)=(aπ(a))(π(b))=π(b) for b≠a=(aπ(a))∘(a1π(a1))∘...∘(anπ(an))(inductive hypothesis) \begin{array}{l} \text{Induction on } \{ \; x \; | \; \pi(x) \neq x \; \} \text{:} \\ \text{case } \{ \; x \; | \; \pi(x) \neq x \; \} = \emptyset \\ \; \; \; \; \text{trivial} \\ \text{case } \{ \; x \; | \; \pi(x) \neq x \; \} = S \cup \{a\} \text{ where } a \notin S \\ \; \; \; \; \text{assume } \forall \pi'. \; \pi'(a) = a \land \{ \; \pi'(b) = \pi(b) \; | \; b \in S \; \} \; \implies \; \pi' = (a_1 \; \pi(a_1)) \circ ... \circ (a_n \; \pi(a_n)) \\ \; \; \; \; \pi \\ \; \; \; \; = (a \; \pi(a)) \circ (a \; \pi(a)) \circ \pi \\ \; \; \; \; \; \; \; \; \pi' = (a \; \pi(a)) \circ \pi \\ \; \; \; \; \; \; \; \; \; \; \; \; \pi'(a) = ((a \; \pi(a)) \circ \pi)(a) = (a \; \pi(a))(\pi(a)) = a \\ \; \; \; \; \; \; \; \; \; \; \; \; \pi'(b) = ((a \; \pi(a)) \circ \pi)(b) = (a \; \pi(a))(\pi(b)) = \pi(b) \text{ for } b \neq a \\ \; \; \; \; = (a \; \pi(a)) \circ (a_1 \; \pi(a_1)) \circ ... \circ (a_n \; \pi(a_n)) \; (\text{inductive hypothesis}) \end{array}

Proof 2

Every name must support itself: {a}supportsa\{a\} \; \text{supports} \; a. ↩︎

∀π.(∀a∈{a}.π(a)=a)⟹π⋅a=a=∀π.π(a)=a⟹π⋅a=a(singleton set)=∀π.π(a)=a⟹π(a)=a(definition of ⋅)∀π.π(a)=a⟹π(a)=atrivial \begin{array}{c} \begin{array}{lll} & \forall \pi. \; (\forall a \in \{a\}. \; \pi(a) = a) \implies \pi \cdot a = a \\ = & \forall \pi. \; \pi(a) = a \implies \pi \cdot a = a & (\text{singleton set}) \\ = & \forall \pi. \; \pi(a) = a \implies \pi(a) = a & (\text{definition of } \cdot) \end{array} \\ \; \\ \forall \pi. \; \pi(a) = a \implies \pi(a) = a \;\;\;\; \text{trivial} \end{array}

Proof 3

∃b.b≠a∧{b}supportsa\exists b. \; b \neq a \; \land \; \{b\} \; \text{supports} \; a is false. ↩︎

∃b.b≠a∧{b}supportsa=∃b.b≠a∧(∀π.(∀a∈{b}.π(a)=a)⟹π⋅a=a)=∃b.b≠a∧(∀π.π(b)=b⟹π⋅a=a)assume ∃b.b≠a∧(∀π.π(b)=b⟹π⋅a=a)counterexample: π=(ac)(a≠b≠c)(ac)(b)=b⟹(ac)(a)=abut (ac)(a)=c — contradiction \begin{array}{c} \begin{array}{lll} & \exists b. \; b \neq a \; \land \; \{b\} \; \text{supports} \; a \\ = & \exists b. \; b \neq a \; \land (\forall \pi. \; (\forall a \in \{b\}. \; \pi(a) = a) \implies \pi \cdot a = a) \\ = & \exists b. \; b \neq a \; \land (\forall \pi. \; \pi(b) = b \implies \pi \cdot a = a) \\ \end{array} \\ \begin{array}{l} \text{assume } \exists b. \; b \neq a \; \land (\forall \pi. \; \pi(b) = b \implies \pi \cdot a = a) \\ \text{counterexample: } \pi = (a \; c) \; (a \neq b \neq c) \\ \; \; \; \; (a \; c)(b) = b \implies (a \; c)(a) = a \\ \; \; \; \; \text{but } (a \; c)(a) = c \text{ --- contradiction} \end{array} \end{array}

Proof 4

For names aa and bb, {a,b}supportsa\{a,b\} \; \text{supports} \; a. ↩︎

∀π.(∀a∈{a,b}.π(a)=a)⟹π⋅a=a=∀π.π(a)=a∧π(b)=b⟹π⋅a=a(expand set)=∀π.π(a)=a∧π(b)=b⟹π(a)=a(definition of ⋅)∀π.π(a)=a∧π(b)=b⟹π(a)=atrivial \begin{array}{l} \begin{array}{lll} & \forall \pi. \; (\forall a \in \{a, b\}. \; \pi(a) = a) \implies \pi \cdot a = a \\ = & \forall \pi. \; \pi(a) = a \land \pi(b) = b \implies \pi \cdot a = a & (\text{expand set}) \\ = & \forall \pi. \; \pi(a) = a \land \pi(b) = b \implies \pi(a) = a & (\text{definition of } \cdot) \end{array} \\ \; \\ \forall \pi. \; \pi(a) = a \land \pi(b) = b \implies \pi(a) = a \;\;\;\; \text{trivial} \end{array}

Proof 5

Uniqueness of minimal supports. ↩︎

a‾supportsminx∧b‾supportsminx⟹a‾=b‾a‾supportsminx∧b‾supportsminx=(a‾,x)∈{(a‾,x)|a‾∈𝒫(𝔸),x∈X,a‾supportsx,∀x‾.x‾supportsx⟹a‾⊆x‾}∧(b‾,x)∈{(a‾,x)|a‾∈𝒫(𝔸),x∈X,a‾supportsx,∀x‾.x‾supportsx⟹a‾⊆x‾}=a‾supportsx∧(∀x‾.x‾supportsx⟹a‾⊆x‾)∧b‾supportsx∧(∀x‾.x‾supportsx⟹b‾⊆x‾)a‾supportsx∧(∀x‾.x‾supportsx⟹b‾⊆x‾)⟹b‾⊆a‾b‾supportsx∧(∀x‾.x‾supportsx⟹a‾⊆x‾)⟹a‾⊆b‾a‾⊆b‾∧b‾⊆a‾⟹a=b \begin{array}{l} \bar{a} \; \text{supports}_{min} \; x \land \bar{b} \; \text{supports}_{min} \; x \implies \bar{a} = \bar{b} \\ \; \\ \begin{array}{ll} & \bar{a} \; \text{supports}_{min} \; x \land \bar{b} \; \text{supports}_{min} \; x \\ = & (\bar{a}, x) \in \{ (\bar{a}, x) \; | \; \bar{a} \in \mathcal{P}(\mathbb{A}), \; x \in X, \; \bar{a} \; \text{supports} \; x, \; \forall \bar{x}. \; \bar{x} \; \text{supports} \; x \implies \bar{a} \subseteq \bar{x} \} \; \land \\ & (\bar{b}, x) \in \{ (\bar{a}, x) \; | \; \bar{a} \in \mathcal{P}(\mathbb{A}), \; x \in X, \; \bar{a} \; \text{supports} \; x, \; \forall \bar{x}. \; \bar{x} \; \text{supports} \; x \implies \bar{a} \subseteq \bar{x} \} \\ = & \bar{a} \; \text{supports} \; x \; \land \; (\forall \bar{x}. \; \bar{x} \; \text{supports} \; x \implies \bar{a} \subseteq \bar{x}) \; \land \; \\ & \bar{b} \; \text{supports} \; x \; \land \; (\forall \bar{x}. \; \bar{x} \; \text{supports} \; x \implies \bar{b} \subseteq \bar{x}) \\ \; \\ & \bar{a} \; \text{supports} \; x \; \land \; (\forall \bar{x}. \; \bar{x} \; \text{supports} \; x \implies \bar{b} \subseteq \bar{x}) \implies \bar{b} \subseteq \bar{a} \\ & \bar{b} \; \text{supports} \; x \; \land \; (\forall \bar{x}. \; \bar{x} \; \text{supports} \; x \implies \bar{a} \subseteq \bar{x}) \implies \bar{a} \subseteq \bar{b} \\ \; \\ & \bar{a} \subseteq \bar{b} \land \bar{b} \subseteq \bar{a} \implies a = b \end{array} \end{array}

Proof 6

The identity function is supported by the empty set. ↩︎

∀π.(∀a∈{}.π(a)=a)⟹∀x.π⋅id(π−1⋅x)=id(x)⇔∀π.∀x.π⋅id(π−1⋅x)=xπ⋅id(π−1⋅x)=π⋅π1⋅x=x \begin{array}{l} \forall \pi. \; (\forall a \in \{\}. \; \pi(a) = a) \implies \forall x. \; \pi \cdot id(\pi^{-1} \cdot x) = id(x) \\ \iff \; \forall \pi. \; \forall x. \; \pi \cdot id(\pi^{-1} \cdot x) = x \\ \; \\ \pi \cdot id(\pi^{-1} \cdot x) = \pi \cdot \pi^{1} \cdot x = x \end{array}

Proof 7

cmp(a,b)=a=?b\text{cmp}(a, b) = a \stackrel{?}{=} b is supported by the empty set. ↩︎

∀π.(∀a∈{}.π(a)=a)⟹∀x,y.π⋅cmp(π−1⋅(x,y))=cmp(x,y)⇔∀π.(∀a∈{}.π(a)=a)⟹∀x,y.π⋅cmp(π−1⋅x,π−1⋅y)=cmp(x,y)⇔∀π.(∀a∈{}.π(a)=a)⟹∀x,y.π⋅((π−1⋅x)=?(π−1⋅y))=(x=?y)⇔∀π.(∀a∈{}.π(a)=a)⟹∀x,y.((π−1⋅x)=?(π−1⋅y))=(x=?y)(booleans contain no names)⇔∀π.∀x,y.((π−1⋅x)=?(π−1⋅y))=(x=?y)case x=y⇔((π−1⋅x)=?(π−1⋅y))=true(π−1⋅x)=?(π−1⋅y)=(π−1⋅x)=?(π−1⋅x)(x=y)=truecase x≠y⇔((π−1⋅x)=?(π−1⋅y))=false(π−1⋅x)=?(π−1⋅y)=x′=?y′ where x′≠y′(injectivity of π−1)=false \begin{array}{l} \forall \pi. \; (\forall a \in \{\}. \; \pi(a) = a) \implies \forall x, y. \; \pi \cdot \text{cmp}(\pi^{-1} \cdot (x, y)) = \text{cmp}(x, y) \\ \iff \forall \pi. \; (\forall a \in \{\}. \; \pi(a) = a) \implies \forall x, y. \; \pi \cdot \text{cmp}(\pi^{-1} \cdot x, \pi^{-1} \cdot y) = \text{cmp}(x, y) \\ \iff \forall \pi. \; (\forall a \in \{\}. \; \pi(a) = a) \implies \forall x, y. \; \pi \cdot ((\pi^{-1} \cdot x) \stackrel{?}{=} (\pi^{-1} \cdot y)) = (x \stackrel{?}{=} y) \\ \iff \forall \pi. \; (\forall a \in \{\}. \; \pi(a) = a) \implies \forall x, y. \; ((\pi^{-1} \cdot x) \stackrel{?}{=} (\pi^{-1} \cdot y)) = (x \stackrel{?}{=} y) \;\;\;\; (\text{booleans contain no names}) \\ \iff \forall \pi. \; \forall x, y. \; ((\pi^{-1} \cdot x) \stackrel{?}{=} (\pi^{-1} \cdot y)) = (x \stackrel{?}{=} y) \\ \; \\ \text{case } x = y \\ \; \; \; \; \iff ((\pi^{-1} \cdot x) \stackrel{?}{=} (\pi^{-1} \cdot y)) = \text{true} \\ \; \; \; \; (\pi^{-1} \cdot x) \stackrel{?}{=} (\pi^{-1} \cdot y) \\ \; \; \; \; = (\pi^{-1} \cdot x) \stackrel{?}{=} (\pi^{-1} \cdot x) \; (x = y) \\ \; \; \; \; = \text{true} \\ \; \\ \text{case } x \neq y \\ \; \; \; \; \iff ((\pi^{-1} \cdot x) \stackrel{?}{=} (\pi^{-1} \cdot y)) = \text{false} \\ \; \; \; \; (\pi^{-1} \cdot x) \stackrel{?}{=} (\pi^{-1} \cdot y) \\ \; \; \; \; = x' \stackrel{?}{=} y' \text{ where } x' \neq y' \;\;\;\; (\text{injectivity of } \pi^{-1}) \\ \; \; \; \; = \text{false} \end{array}

Proof 8

aa and bb must be in the support of iffy(x)=if a=?x then b else x\text{iffy}(x) = \text{if } a \stackrel{?}{=} x \text{ then } b \text{ else } x. ↩︎

When aa is missing

∀π.(∀a∈{b}.π(a)=a)⟹∀x.π⋅iffy(π−1⋅x)=iffy(x)=∀π.π(b)=b⟹∀x.π⋅iffy(π−1⋅x)=iffy(x)can’t prove for all π,x. counterexample: π=(an),x=a(an)⋅iffy((an)⋅a)=(an)⋅iffy(n)=(an)⋅n=aiffy(a)=b \begin{array}{l} \forall \pi. \; (\forall a \in \{ b \}. \; \pi(a) = a) \implies \forall x. \; \pi \cdot \text{iffy}(\pi^{-1} \cdot x) = \text{iffy}(x) \\ = \forall \pi. \; \pi(b) = b \implies \forall x. \; \pi \cdot \text{iffy}(\pi^{-1} \cdot x) = \text{iffy}(x) \\ \; \\ \text{can't prove for all } \pi, x \text{. counterexample: } \pi = (a \; n), \; x = a \\ \begin{array}{ll} (a \; n) \cdot \text{iffy}((a \; n) \cdot a) & = (a \; n) \cdot \text{iffy}(n) = (a \; n) \cdot n = a \\ \text{iffy}(a) & = b \end{array} \end{array}

When bb is missing

∀π.(∀x∈{a}.π(x)=x)⟹∀x.π⋅iffy(π−1⋅x)=iffy(x)=∀π.π(a)=a⟹∀x.π⋅iffy(π−1⋅x)=iffy(x)can’t prove for all π,x. counterexample: π=(bn),x=a(bn)⋅iffy((bn)⋅a)=(bn)⋅iffy(a)=(bn)⋅b=niffy(a)=b \begin{array}{l} \forall \pi. \; (\forall x \in \{ a \}. \; \pi(x) = x) \implies \forall x. \; \pi \cdot \text{iffy}(\pi^{-1} \cdot x) = \text{iffy}(x) \\ = \forall \pi. \; \pi(a) = a \implies \forall x. \; \pi \cdot \text{iffy}(\pi^{-1} \cdot x) = \text{iffy}(x) \\ \; \\ \text{can't prove for all } \pi, x \text{. counterexample: } \pi = (b \; n), \; x = a \\ \begin{array}{ll} (b \; n) \cdot \text{iffy}((b \; n) \cdot a) & = (b \; n) \cdot \text{iffy}(a) = (b \; n) \cdot b = n \\ \text{iffy}(a) & = b \end{array} \end{array}

Proof 9

Swapping fresh names does nothing. ↩︎

a#x∧b#x⟹(ab)⋅x=xa#x∧b#x⇔a∉supportmin(x)∧b∉supportmin(x)⇔a∉x‾∧b∉x‾ for some x‾ where x‾supportsx∧(∀y‾.y‾supportsx⟹x‾⊆y‾)x‾supportsx⇔∀π.(∀a∈x‾.π(a)=a)⟹π⋅x=xπ=(ab)∀c∈x‾.(ab)(c)=c(a∉x‾∧b∉x‾⟹∀c∈x‾.a≠c∧b≠c)∴(ab)⋅x=x \begin{array}{l} a \; \# \; x \land b \; \# \; x \implies (a \; b) \cdot x = x \\ \; \\ a \; \# \; x \land b \; \# \; x \\ \iff a \notin \text{support}_{min}(x) \land b \notin \text{support}_{min}(x) \\ \iff a \notin \bar{x} \land b \notin \bar{x} \text{ for some } \bar{x} \text{ where } \bar{x} \; \text{supports} \; x \land (\forall \bar{y}. \; \bar{y} \; \text{supports} \; x \implies \bar{x} \subseteq \bar{y}) \\ \; \\ \bar{x} \; \text{supports} \; x \\ \iff \forall \pi. \; (\forall a \in \bar{x}. \; \pi(a) = a) \implies \pi \cdot x = x \\ \; \\ \pi = (a \; b) \\ \forall c \in \bar{x}. \; (a \; b)(c) = c \; (a \notin \bar{x} \land b \notin \bar{x} \implies \forall c \in \bar{x}. \; a \neq c \land b \neq c) \\ \therefore \; (a \; b) \cdot x = x \end{array}

Proof 10

Freshness “distributes” across functions. ↩︎

a#f∧a#x⟹a#f(x)a#f⇔a∉supportmin(f)⇔a∉a‾ for some a‾ where a‾supportsf∧(∀b‾.b‾supportsf⟹a‾⊆b‾)a‾supportsf⇔∀π.(∀a∈a‾.π(a)=a)⟹π⋅f=fa#x⇔a∉supportmin(x)⇔a∉b‾ for some b‾ where b‾supportsx∧(∀a‾.a‾supportsx⟹b‾⊆a‾)a‾supportsx⇔∀π.(∀a∈b‾.π(a)=a)⟹π⋅x=x(a‾∪b‾)supportsf(x)⇔∀π.(∀a∈(a‾∪b‾).π(a)=a)⟹π⋅f(x)=f(x)π⋅f(x)=(π⋅f)(π⋅x)=f(π⋅x)((∀a∈(a‾∪b‾).π(a)=a)⟹(∀a∈a‾.π(a)=a), a‾supportsf)=f(x)((∀a∈(a‾∪b‾).π(a)=a)⟹(∀a∈b‾.π(a)=a), b‾supportsx)a∉(a‾∪b‾)(a∉a‾∧a∉b‾)given c‾ where c‾supportsf(x)∧(∀b‾.b‾supportsf(x)⟹c‾⊆b‾)(a‾∪b‾)supportsf(x)∧a∉(a‾∪b‾)⟹c‾⊆(a‾∪b‾)∧a∉(a‾∪b‾)(c‾ minimal)⟹a∉c‾⇔a#f(x) \begin{array}{l} a \; \# \; f \land a \; \# \; x \implies a \; \# \; f(x) \\ \; \\ a \; \# \; f \\ \iff a \notin \text{support}_{min}(f) \\ \iff a \notin \bar{a} \text{ for some } \bar{a} \text{ where } \bar{a} \; \text{supports} \; f \land (\forall \bar{b}. \; \bar{b} \; \text{supports} \; f \implies \bar{a} \subseteq \bar{b}) \\ \; \\ \bar{a} \; \text{supports} \; f \\ \iff \forall \pi. \; (\forall a \in \bar{a}. \; \pi(a) = a) \implies \pi \cdot f = f \\ \; \\ a \; \# \; x \\ \iff a \notin \text{support}_{min}(x) \\ \iff a \notin \bar{b} \text{ for some } \bar{b} \text{ where } \bar{b} \; \text{supports} \; x \land (\forall \bar{a}. \; \bar{a} \; \text{supports} \; x \implies \bar{b} \subseteq \bar{a}) \\ \; \\ \bar{a} \; \text{supports} \; x \\ \iff \forall \pi. \; (\forall a \in \bar{b}. \; \pi(a) = a) \implies \pi \cdot x = x \\ \; \\ (\bar{a} \cup \bar{b}) \; \text{supports} \; f(x) \\ \iff \forall \pi. \; (\forall a \in (\bar{a} \cup \bar{b}). \; \pi(a) = a) \implies \pi \cdot f(x) = f(x) \\ \pi \cdot f(x) \\ = (\pi \cdot f)(\pi \cdot x) \\ = f(\pi \cdot x) \; ((\forall a \in (\bar{a} \cup \bar{b}). \; \pi(a) = a) \implies (\forall a \in \bar{a}. \; \pi(a) = a) \text{, } \bar{a} \; \text{supports} \; f) \\ = f(x) \; ((\forall a \in (\bar{a} \cup \bar{b}). \; \pi(a) = a) \implies (\forall a \in \bar{b}. \; \pi(a) = a) \text{, } \bar{b} \; \text{supports} \; x) \\ \; \\ a \notin (\bar{a} \cup \bar{b}) \; (a \notin \bar{a} \land a \notin \bar{b}) \\ \; \\ \text{given } \bar{c} \text{ where } \bar{c} \; \text{supports} \; f(x) \land (\forall \bar{b}. \; \bar{b} \; \text{supports} \; f(x) \implies \bar{c} \subseteq \bar{b}) \\ (\bar{a} \cup \bar{b}) \; \text{supports} \; f(x) \land a \notin (\bar{a} \cup \bar{b}) \\ \implies \bar{c} \subseteq (\bar{a} \cup \bar{b}) \land a \notin (\bar{a} \cup \bar{b}) \; (\bar{c} \text{ minimal}) \\ \implies a \notin \bar{c} \\ \iff a \; \# \; f(x) \end{array}

Proof 11

The support of name binding: support(⟨a⟩x)=support(x)−{a}\text{support}(\langle a \rangle x) = \text{support}(x) - \{ a \}. ↩︎

(support(x)−{a})supportsmin⟨a⟩x⇔((support(x)−{a})supports⟨a⟩x)∧(∀b‾.b‾supports⟨a⟩x⟹(support(x)−{a})⊆b‾) \begin{array}{l} (\text{support}(x) - \{ a \}) \; \text{supports}_{min} \; \langle a \rangle x \\ \iff ((\text{support}(x) - \{ a \}) \; \text{supports} \; \langle a \rangle x) \land (\forall \bar{b}. \; \bar{b} \; \text{supports} \; \langle a \rangle x \implies (\text{support}(x) - \{ a \}) \subseteq \bar{b}) \end{array}

Support

(support(x)−{a})supports⟨a⟩x⇔∀π.(∀b∈(support(x)−{a}).π(b)=b)⟹π⋅(⟨a⟩x)=⟨a⟩xπ⋅(⟨a⟩x)=⟨π(a)⟩π⋅x∀b.b#(a,x,π(a),π⋅x)⟹(ab)⋅x=(π(a)b)⋅(π⋅x)(π(a)b)⋅π⋅xcase π(a)=a=(ab)⋅π⋅x=(ab)⋅x(π(a)=a∧(∀b∈(support(x)−{a}).π(b)=b)⟹∀b∈support(x).π(b)=b)case π(a)≠aπ=(aπ(a))∘(b1π(b1))∘...∘(bnπ(bn))(A.1) for all bi∈𝔸−support(x)−{a} where π(bi)∉support(x)∧π(bi)≠π(bj)≠bj≠bi≠a≠π(a)=(π(a)b)⋅(aπ(a))⋅x(bi#x∧π(bi)#xA.9)=((π(a)b)∘(aπ(a)))⋅x=((ab)∘(π(a)b))⋅x(A.21)=(ab)⋅(π(a)b)⋅xassume π(a)∈support(x)⟹π(π(a))=π(a)((π(a)≠a⟹π(a)∈(support(x)−{a}))∧∀b∈(support(x)−{a}).π(b)=b)⟹π(a)=a — contradiction∴π(a)#x=(ab)⋅x(π(a)#x∧b#x⟹(π(a)b)⋅x=x — A.9)=⟨a⟩x \begin{array}{l} (\text{support}(x) - \{ a \}) \; \text{supports} \; \langle a \rangle x \\ \iff \forall \pi. \; (\forall b \in (\text{support}(x) - \{ a \}). \; \pi(b) = b) \implies \pi \cdot (\langle a \rangle x) = \langle a \rangle x \\ \; \\ \pi \cdot (\langle a \rangle x) \\ = \langle \pi(a) \rangle \pi \cdot x \\ \; \; \; \; \forall b. \; b \; \# \; (a, x, \pi(a), \pi \cdot x) \implies (a \; b) \cdot x = (\pi(a) \; b) \cdot (\pi \cdot x) \\ \; \; \; \; (\pi(a) \; b) \cdot \pi \cdot x \\ \; \; \; \; \text{case } \pi(a) = a \\ \; \; \; \; \; \; \; \; = (a \; b) \cdot \pi \cdot x \\ \; \; \; \; \; \; \; \; = (a \; b) \cdot x \; (\pi(a) = a \land (\forall b \in (\text{support}(x) - \{a\}). \; \pi(b) = b) \implies \forall b \in \text{support}(x). \; \pi(b) = b) \\ \; \; \; \; \text{case } \pi(a) \neq a \\ \; \; \; \; \; \; \; \; \; \; \; \; \pi = (a \; \pi(a)) \circ (b_1 \; \pi(b_1)) \circ ... \circ (b_n \; \pi(b_n)) \; (\text{A.1}) \\ \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \text{ for all } b_i \in \mathbb{A} - \text{support}(x) - \{a\} \text{ where } \pi(b_i) \notin \text{support}(x) \land \pi(b_i) \neq \pi(b_j) \neq b_j \neq b_i \neq a \neq \pi(a) \\ \; \; \; \; \; \; \; \; = (\pi(a) \; b) \cdot (a \; \pi(a)) \cdot x \; (b_i \; \# \; x \land \pi(b_i) \; \# \; x \text{A.9}) \\ \; \; \; \; \; \; \; \; = ((\pi(a) \; b) \circ (a \; \pi(a))) \cdot x \\ \; \; \; \; \; \; \; \; = ((a \; b) \circ (\pi(a) \; b)) \cdot x \; (\text{A.21}) \\ \; \; \; \; \; \; \; \; = (a \; b) \cdot (\pi(a) \; b) \cdot x \\ \; \; \; \; \; \; \; \; \; \; \; \; \text{assume } \pi(a) \in \text{support}(x) \\ \; \; \; \; \; \; \; \; \; \; \; \; \implies \pi(\pi(a)) = \pi(a) \; ((\pi(a) \neq a \implies \pi(a) \in (\text{support}(x) - \{a\})) \land \forall b \in (\text{support}(x) - \{a\}). \; \pi(b) = b) \\ \; \; \; \; \; \; \; \; \; \; \; \; \implies \pi(a) = a \text{ --- contradiction} \\ \; \; \; \; \; \; \; \; \; \; \; \; \therefore \pi(a) \; \# \; x \\ \; \; \; \; \; \; \; \; = (a \; b) \cdot x \; (\pi(a) \; \# \; x \land b \; \# \; x \implies (\pi(a) \; b) \cdot x = x \text{ --- A.9}) \\ = \langle a \rangle x \end{array}

Minimality

∀b‾.b‾supports⟨a⟩x⟹support(x)−{a}⊆b‾b‾supports⟨a⟩x⟹b‾∪{a}supportsxassume ∀π.(∀b∈b‾.π(b)=b)⟹π⋅⟨a⟩x=⟨a⟩x⇔∀π.(∀b∈b‾.π(b)=b)⟹⟨π⋅a⟩π⋅x=⟨a⟩xassume ∀b∈(b‾∪{a}).π(b)=b⇔(∀b∈b‾.π(b)=b)∧π(a)=a⟨π⋅a⟩π⋅x=⟨a⟩x(via assumptions 1 and 2)⇔⟨a⟩π⋅x=⟨a⟩x(π(a)=a)⇔∃b.(ab)⋅π⋅x=(ab)⋅x⇔(ab)⋅(ab)⋅π⋅x=(ab)⋅(ab)⋅x⇔π⋅x=x(swapping involutive)b‾supports⟨a⟩x⟹b‾∪{a}supportsx⟹support(x)⊆b‾∪{a}(support(x) minimal)⟹support(x)−{a}⊆b‾ \begin{array}{l} \forall \bar{b}. \; \bar{b} \; \text{supports} \; \langle a \rangle x \implies \text{support}(x) - \{a\} \subseteq \bar{b} \\ \; \\ \bar{b} \; \text{supports} \; \langle a \rangle x \implies \bar{b} \cup \{a\} \; \text{supports} \; x \\ \text{assume } \forall \pi. \; (\forall b \in \bar{b}. \; \pi(b) = b) \implies \pi \cdot \langle a \rangle x = \langle a \rangle x \\ \; \; \; \; \; \; \iff \forall \pi. \; (\forall b \in \bar{b}. \; \pi(b) = b) \implies \langle \pi \cdot a \rangle \pi \cdot x = \langle a \rangle x \\ \text{assume } \forall b \in (\bar{b} \cup \{a\}). \; \pi(b) = b \\ \; \; \; \; \; \; \iff (\forall b \in \bar{b}. \; \pi(b) = b) \land \pi(a) = a \\ \langle \pi \cdot a \rangle \pi \cdot x = \langle a \rangle x \; \; (\text{via assumptions 1 and 2}) \\ \iff \langle a \rangle \pi \cdot x = \langle a \rangle x \; \; (\pi(a) = a) \\ \iff \exists b. \; (a \; b) \cdot \pi \cdot x = (a \; b) \cdot x \\ \iff (a \; b) \cdot (a \; b) \cdot \pi \cdot x = (a \; b) \cdot (a \; b) \cdot x \\ \iff \pi \cdot x = x \; \; (\text{swapping involutive}) \\ \; \\ \bar{b} \; \text{supports} \; \langle a \rangle x \\ \implies \bar{b} \cup \{a\} \; \text{supports} \; x \\ \implies \text{support}(x) \subseteq \bar{b} \cup \{a\} \; (\text{support}(x) \text{ minimal}) \\ \implies \text{support}(x) - \{a\} \subseteq \bar{b} \end{array}

Proof 12

a#⟨b⟩x⇔a=b∨a#xa \; \# \; \langle b \rangle x \iff a = b \lor a \; \# \; x   ↩︎

Forward

assume a#⟨b⟩xcase a=ba=bcase a≠ba#⟨b⟩x⇔a∉support(x)−{b}⟹a∉support(x)⇔a#x \begin{array}{l} \text{assume } a \; \# \; \langle b \rangle x \\ \text{case } a = b \\ \; \; \; \; a = b \\ \text{case } a \neq b \\ \; \; \; \; a \; \# \; \langle b \rangle x \\ \; \; \; \; \iff a \notin \text{support}(x) - \{b\} \\ \; \; \; \; \implies a \notin \text{support}(x) \\ \; \; \; \; \iff a \; \# \; x \end{array}

Backward

assume a=b∨a#xcase a=bsupport(⟨b⟩x)=support(x)−{b}=support(x)−{a}a∉support(x)−{a}⇔a#⟨b⟩xcase a#xsupport(⟨b⟩x)=support(x)−{b}a#x⇔a∉support(x)⟹a∉support(x)−{b}⇔a#⟨b⟩x \begin{array}{l} \text{assume } a = b \lor a \; \# \; x \\ \text{case } a = b \\ \; \; \; \; \text{support}(\langle b \rangle x) \\ \; \; \; \; = \text{support}(x) - \{b\} \\ \; \; \; \; = \text{support}(x) - \{a\} \\ \; \; \; \; a \notin \text{support}(x) - \{a\} \\ \; \; \; \; \iff a \; \# \; \langle b \rangle x \\ \text{case } a \; \# \; x \\ \; \; \; \; \text{support}(\langle b \rangle x) \\ \; \; \; \; = \text{support}(x) - \{b\} \\ \; \; \; \; a \; \# \; x \\ \; \; \; \; \iff a \notin \text{support}(x) \\ \; \; \; \; \implies a \notin \text{support}(x) - \{b\} \\ \; \; \; \; \iff a \; \# \; \langle b \rangle x \end{array}

Proof 13

The interchangeability of “some fresh” and “any fresh”. ↩︎

∃b.b#(a,x,a′,x′)∧(ab)⋅x=(a′b)⋅x′⇔∀b.b#(a,x,a′,x′)⟹(ab)⋅x=(a′b)⋅x′ \begin{array}{c} \exists b. \; b \; \# \; (a, x, a', x') \land (a \; b) \cdot x = (a' \; b) \cdot x' \\ \iff \\ \forall b. \; b \; \# \; (a, x, a', x') \implies (a \; b) \cdot x = (a' \; b) \cdot x' \end{array}

Forward

assume ∃b.b#(a,x,a′,x′)∧(ab)⋅x=(a′b)⋅x′assume ∀b′.b′#(a,x,a′x′)(ab)⋅x=(a′b)⋅x′⇔(bb′)⋅(ab)⋅x=(bb′)⋅(a′b)⋅x′⇔((bb′)∘(ab))⋅x=((bb′)∘(a′b))⋅x′⇔((ab′)∘(bb′))⋅x=((a′b′)∘(bb′))⋅x′(A.21)⇔(ab′)⋅(bb′)⋅x=(a′b′)⋅(bb′)⋅x′⇔(ab′)⋅x=(a′b′)⋅x′(b#x′∧b′#x′ — A.9) \begin{array}{l} \text{assume } \exists b. \; b \; \# \; (a, x, a', x') \land (a \; b) \cdot x = (a' \; b) \cdot x' \\ \text{assume } \forall b'. \; b' \; \# \; (a, x, a' x') \\ (a \; b) \cdot x = (a' \; b) \cdot x' \\ \iff (b \; b') \cdot (a \; b) \cdot x = (b \; b') \cdot (a' \; b) \cdot x' \\ \iff ((b \; b') \circ (a \; b)) \cdot x = ((b \; b') \circ (a' \; b)) \cdot x' \\ \iff ((a \; b') \circ (b \; b')) \cdot x = ((a' \; b') \circ (b \; b')) \cdot x' \; (\text{A.21}) \\ \iff (a \; b') \cdot (b \; b') \cdot x = (a' \; b') \cdot (b \; b') \cdot x' \\ \iff (a \; b') \cdot x = (a' \; b') \cdot x' \; (b \; \# \; x' \land b' \; \# \; x' \text{ --- A.9}) \end{array}

Backward

assume ∀b.b#(a,x,a′,x′)⟹(ab)⋅x=(a′b)⋅x′∃b′.b′#(a,x,a′,x′)("choose-a-fresh-name")∧(ab′)⋅x=(a′b′)⋅x′(original assumption) \begin{array}{l} \text{assume } \forall b. \; b \; \# \; (a, x, a', x') \implies (a \; b) \cdot x = (a' \; b) \cdot x' \\ \exists b'. \; b' \; \# \; (a, x, a', x') \; (\text{"choose-a-fresh-name"}) \\ \land \\ (a \; b') \cdot x = (a' \; b') \cdot x' \; (\text{original assumption}) \end{array}

Proof 14

Equivariant functions are supported by the empty set. ↩︎

(∀π,x.f(π⋅x)=π⋅f(x))⟹{}supportsminf{}supportsminf⇔{}supportsf∧(∀x‾.x‾supportsx⟹{}⊆x‾)⇔{}supportsf(∀x‾.{}⊆x‾ trivial){}supportsf⇔∀π.(∀a∈{}.π(a)=a)⟹π⋅f=f∀x.(π⋅f)(x)=π⋅f(π−1⋅x)=π⋅π−1f(x)(f equivariant)=f(x) \begin{array}{l} (\forall \pi, x. \; f (\pi \cdot x) = \pi \cdot f(x)) \implies \{\} \; \text{supports}_{min} \; f \\ \; \\ \{\} \; \text{supports}_{min} \; f \\ \iff \{\} \; \text{supports} \; f \land (\forall \bar{x}. \; \bar{x} \; \text{supports} \; x \implies \{\} \subseteq \bar{x}) \\ \iff \{\} \; \text{supports} \; f \; (\forall \bar{x}. \; \{\} \subseteq \bar{x} \text{ trivial}) \\ \; \\ \{\} \; \text{supports} \; f \\ \iff \forall \pi. \; (\forall a \in \{\}. \; \pi(a) = a) \implies \pi \cdot f = f \\ \forall x. \; (\pi \cdot f)(x) \\ = \pi \cdot f(\pi^{-1} \cdot x) \\ = \pi \cdot \pi^{-1} f(x) \; (f \text{ equivariant}) \\ = f(x) \end{array}

Proof 15

The identity function is equivariant. ↩︎

id(π⋅x)=π⋅x=π⋅id(x) \text{id}(\pi \cdot x) = \pi \cdot x = \pi \cdot \text{id}(x)

Proof 16

The composition of two equivariant functions is equivariant. ↩︎

f(g(π⋅x))=f(π⋅g(x))(equivariance of g)=π⋅f(g(x))(equivariance of f) \begin{array}{lll} & f(g(\pi \cdot x)) \\ = & f(\pi \cdot g(x)) & (\text{equivariance of } g) \\ = & \pi \cdot f(g(x)) & (\text{equivariance of } f) \end{array}

Proof 17

Nom\text{Nom} has a terminal object, which is the singleton set. ↩︎

The singleton set {*}\{*\} has the trivial permutation action π⋅*=*\pi \cdot * = *.

For every nominal set XX, there is a single function 𝟙X:X→{*}\mathbb{1}_X \; : \; X \rightarrow \{*\}:

𝟙X:X→{*}𝟙X(x)=* \begin{array}{l} \mathbb{1}_X \; : \; X \rightarrow \{*\} \\ \mathbb{1}_X(x) = * \end{array}

𝟙X\mathbb{1}_X is equivariant:

𝟙X(π⋅x)=*=π⋅*=π⋅𝟙X(x) \begin{array}{l} \mathbb{1}_X(\pi \cdot x) \\ = * \\ = \pi \cdot * \\ = \pi \cdot \mathbb{1}_X(x) \end{array}

Proof 18

Introduction and elimination of pairs is equivariant. ↩︎

fst:X×Y→Xfst(x,y)=xfst(π⋅(x,y))=fst(π⋅x,π⋅y)=π⋅x=π⋅fst(x,y)snd:X×Y→Ysnd(x,y)=ysnd(π⋅(x,y))=snd(π⋅x,π⋅y)=π⋅y=π⋅snd(x,y)pair:(Z→X)×(Z→Y)→(Z→X×Y)pair(f,g)=λx.(f(x),g(x))pair(π⋅(f,g))=pair(π⋅f,π⋅g)=λx.((π⋅f)(x),(π⋅g)(x))=λx.(π⋅f(π−1⋅x),π⋅g(π−1⋅x))=λx.π⋅(f(π−1⋅x),g(π−1⋅x))=λx.π⋅(λy.(f(y),g(y)))(π−1⋅x)=λx.π⋅pair(f,g)(π−1⋅x)=π⋅pair(f,g) \begin{array}{l} \text{fst} \; : \; X \times Y \rightarrow X \\ \text{fst}(x, y) = x \\ \; \\ \text{fst}(\pi \cdot (x, y)) = \text{fst}(\pi \cdot x, \pi \cdot y) = \pi \cdot x = \pi \cdot \text{fst}(x, y) \\ \; \\ \text{snd} \; : \; X \times Y \rightarrow Y \\ \text{snd}(x, y) = y \\ \; \\ \text{snd}(\pi \cdot (x, y)) = \text{snd}(\pi \cdot x, \pi \cdot y) = \pi \cdot y = \pi \cdot \text{snd}(x, y) \\ \; \\ \text{pair} \; : \; (Z \rightarrow X) \times (Z \rightarrow Y) \rightarrow (Z \rightarrow X \times Y) \\ \text{pair}(f, g) = \lambda x. \; (f(x), g(x)) \\ \; \\ \text{pair}(\pi \cdot (f, g)) \\ = \text{pair}(\pi \cdot f, \pi \cdot g) \\ = \lambda x. \; ((\pi \cdot f)(x), (\pi \cdot g)(x)) \\ = \lambda x. \; (\pi \cdot f(\pi^{-1} \cdot x), \pi \cdot g(\pi^{-1} \cdot x)) \\ = \lambda x. \; \pi \cdot (f(\pi^{-1} \cdot x), g(\pi^{-1} \cdot x)) \\ = \lambda x. \; \pi \cdot (\lambda y. \; (f(y), g(y))) (\pi^{-1} \cdot x) \\ = \lambda x. \; \pi \cdot \text{pair}(f, g) (\pi^{-1} \cdot x) \\ = \pi \cdot \text{pair}(f, g) \end{array}

Proof 19

Introduction and elimination of coproducts is equivariant. ↩︎

inL:X→X+YinL(x)=(L,x)inL(π⋅x)=(L,π⋅x)=π⋅(L,x)=π⋅inL(x)inR:Y→X+YinR(y)=(R,y)inR(π⋅y)=(R,π⋅y)=π⋅(R,y)=π⋅inR(y)match:(X→Z)×(Y→Z)→X+Y→Zmatch(f,g)=(λ(L,x).f(x))|(λ(R,x).g(x))match(π⋅(f,g))=match(π⋅f,π⋅g)=(λ(L,x).(π⋅f)(x))|(λ(R,x).(π⋅g)(x))=(λ(L,x).π⋅f(π−1⋅x))|(λ(R,x).π⋅g(π−1⋅x))=λy.((λ(L,x).π⋅f(π−1⋅x))|(λ(R,x).π⋅g(π−1⋅x)))(y)=λy.((λ(L,x).π⋅f(x))|(λ(R,x).π⋅g(x)))(π−1⋅y)=λy.π⋅((λ(L,x).f(x))|(λ(R,x).g(x)))(π−1⋅y)=λy.π⋅match(f,g)(π−1⋅y)=π⋅match(f,g) \begin{array}{l} \text{in}_L \; : \; X \rightarrow X + Y \\ \text{in}_L(x) = (\text{L}, x) \\ \; \\ \text{in}_L(\pi \cdot x) = (\text{L}, \pi \cdot x) = \pi \cdot (\text{L}, x) = \pi \cdot \text{in}_L(x) \\ \; \\ \text{in}_R : Y \rightarrow X + Y \\ \text{in}_R(y) = (\text{R}, y) \\ \; \\ \text{in}_R(\pi \cdot y) = (\text{R}, \pi \cdot y) = \pi \cdot (\text{R}, y) = \pi \cdot \text{in}_R(y) \\ \; \\ \text{match} \; : \; (X \rightarrow Z) \times (Y \rightarrow Z) \rightarrow X + Y \rightarrow Z \\ \text{match}(f, g) = (\lambda (\text{L}, x). \; f(x)) \; | \; (\lambda (\text{R}, x). \; g(x)) \\ \; \\ \text{match}(\pi \cdot (f, g)) \\ = \text{match}(\pi \cdot f, \pi \cdot g) \\ = (\lambda (\text{L}, x). \; (\pi \cdot f)(x)) \; | \; (\lambda (\text{R}, x). \; (\pi \cdot g)(x)) \\ = (\lambda (\text{L}, x). \; \pi \cdot f(\pi^{-1} \cdot x)) \; | \; (\lambda (\text{R}, x). \; \pi \cdot g(\pi^{-1} \cdot x)) \\ = \lambda y. \; ((\lambda (\text{L}, x). \; \pi \cdot f(\pi^{-1} \cdot x)) \; | \; (\lambda (\text{R}, x). \; \pi \cdot g(\pi^{-1} \cdot x)))(y) \\ = \lambda y. \; ((\lambda (\text{L}, x). \; \pi \cdot f(x)) \; | \; (\lambda (\text{R}, x). \; \pi \cdot g(x)))(\pi^{-1} \cdot y) \\ = \lambda y. \; \pi \cdot ((\lambda (\text{L}, x). \; f(x)) \; | \; (\lambda (\text{R}, x). \; g(x)))(\pi^{-1} \cdot y) \\ = \lambda y. \; \pi \cdot \text{match}(f,g)(\pi^{-1} \cdot y) \\ = \pi \cdot \text{match}(f,g) \end{array}

Proof 20

Finitely supported functions between nominal sets are exponential objects in NomNom. ↩︎

Firstly, not all functions are finitely supported, which means that in general A→BA \rightarrow B (for nominal sets AA and BB) is not itself a nominal set. The set of finitely supported functions A→fsBA \rightarrow_{\text{fs}} B is a nominal set.

BA=A→fsBeval:BA×A→NomBeval(f,x)=f(x)λf:X→NomBAλf(x)=fx′wherefx′:A→fsBfx′(a)=f(x,a) \begin{array}{l} B^A = A \rightarrow_{\text{fs}} B \\ \; \\ \text{eval} \; : \; B^A \times A \rightarrow_{Nom} B \\ \text{eval}(f, x) = f(x) \\ \; \\ \lambda f \; : \; X \rightarrow_{Nom} B^A \\ \lambda f(x) = f'_x \\ \; \; \text{where} \\ \; \; \; \; f'_x \; : \; A \rightarrow_{\text{fs}} B \\ \; \; \; \; f'_x(a) = f(x, a) \end{array}

eval\text{eval} is equivariant:

eval(π⋅(f,x))=eval(π⋅f,π⋅x)=(π⋅f)(π⋅x)=π⋅f(π−1⋅π⋅x)=π⋅f(x)=π⋅eval(f,x) \begin{array}{l} \text{eval}(\pi \cdot (f, x)) \\ = \text{eval}(\pi \cdot f, \pi \cdot x) \\ = (\pi \cdot f)(\pi \cdot x) \\ = \pi \cdot f(\pi^{-1} \cdot \pi \cdot x) \\ = \pi \cdot f(x) \\ = \pi \cdot \text{eval}(f, x) \end{array}

λf\lambda f is equivariant:

λf(π⋅x)=f(π⋅x)′∀a.f(π⋅x,a)=f(π⋅x,π⋅π−1⋅a)=π⋅f(x,π−1⋅a)=π⋅fx′=π⋅λf(x) \begin{array}{l} \lambda f(\pi \cdot x) \\ = f'_{(\pi \cdot x)} \\ \; \; \; \; \forall a. \; f(\pi \cdot x, a) \\ \; \; \; \; = f(\pi \cdot x, \pi \cdot \pi^{-1} \cdot a) \\ \; \; \; \; = \pi \cdot f(x, \pi^{-1} \cdot a) \\ = \pi \cdot f'_x \\ = \pi \cdot \lambda f(x) \end{array}

Universal property:

∀(f∈X×A→NomB).∃!(λf∈X→NomBA).eval∘(λf×id)=fgiven f:X×A→NomB(eval∘(λf×id))(x,a)=eval((λf×id)(x,a))=eval(λf(x),id(a))=eval(λf(x),a)=λf(x)(a)=f(x,a) \begin{array}{l} \forall (f \in X \times A \rightarrow_{Nom} B). \; \exists ! (\lambda f \in X \rightarrow_{Nom} B^A). \; \text{eval} \circ (\lambda f \times \text{id}) = f \\ \; \\ \text{given } f \; : \; X \times A \rightarrow_{Nom} B \\ \; \\ (\text{eval} \circ (\lambda f \times \text{id}))(x, a) \\ = \text{eval}((\lambda f \times \text{id})(x, a)) \\ = \text{eval}(\lambda f(x), \text{id}(a)) \\ = \text{eval}(\lambda f(x), a) \\ = \lambda f(x)(a) \\ = f(x, a) \end{array}

Proof 21

Swapping can “commute” with a permutation. (Used in A.22)

π∘(ab)=(π(a)π(b))∘π(π∘(ab))(x)=π((ab)(x))case x=a=π((ab)(a))=π(b)=(π(a)π(b))(π(a))=(π(a)π(b))(π(x))=((π(a)π(b))∘π)(x)case x=b=π((ab)(b))=π(a)=(π(a)π(b))(π(b))=(π(a)π(b))(π(x))=((π(a)π(b))∘π)(x)case x≠a∧x≠b=π((ab)(x))=π(x)=(π(a)π(b))(π(x))(x≠a∧x≠b⟹π(x)≠π(a)∧π(x)≠π(b) — π injective)=((π(a)π(b))∘π)(x) \begin{array}{c} \pi \circ (a \; b) = (\pi(a) \; \pi(b)) \circ \pi \\ \; \\ (\pi \circ (a \; b))(x) \\ = \pi((a \; b)(x)) \\ \; \\ \begin{aligned} & \text{case } x = a \\ & = \pi((a \; b)(a)) \\ & = \pi(b) \\ & = (\pi(a) \; \pi(b))(\pi(a)) \\ & = (\pi(a) \; \pi(b))(\pi(x)) \\ & = ((\pi(a) \; \pi(b)) \circ \pi)(x) \end{aligned} \begin{aligned} & \text{case } x = b \\ & = \pi((a \; b)(b)) \\ & = \pi(a) \\ & = (\pi(a) \; \pi(b))(\pi(b)) \\ & = (\pi(a) \; \pi(b))(\pi(x)) \\ & = ((\pi(a) \; \pi(b)) \circ \pi)(x) \end{aligned} \\ \begin{aligned} & \text{case } x \neq a \land x \neq b \\ & = \pi((a \; b)(x)) \\ & = \pi(x) \\ & = (\pi(a) \; \pi(b))(\pi(x)) \; (x \neq a \land x \neq b \implies \pi(x) \neq \pi(a) \land \pi(x) \neq \pi(b) \text{ --- } \pi \text{ injective}) \\ & = ((\pi(a) \; \pi(b)) \circ \pi)(x) \end{aligned} \end{array}

Proof 22

[𝔸](−)[\mathbb{A}]({-}) is right adjoint to the functor −*𝔸{}- * \; \mathbb{A} arising from the following nominal set: X*𝔸={(x,a)|x∈X,a#x}X * \mathbb{A} = \{ \; (x, a) \; | \; x \in X, a \; \# \; x \;\}. ↩︎

−*𝔸⊣[𝔸](−)bind:(X*𝔸→NomY)→X→Nom[𝔸](Y)bind(f)(x)=⟨a⟩f(x,a) for some a#xbind−1:(X→Nom[𝔸](Y))→X*𝔸→NomYbind−1(f)(x,a)=f(x)@awhere−@−:[𝔸]X*𝔸→X@(⟨a⟩x,a′)=(aa′)⋅x \begin{array}{l} {}- * \; \mathbb{A} \dashv [\mathbb{A}]({-}) \\ \; \\ \text{bind} \; : \; (X * \; \mathbb{A} \rightarrow_{Nom} Y) \rightarrow X \rightarrow_{Nom} [\mathbb{A}](Y) \\ \text{bind}(f)(x) = \langle a \rangle f(x, a) \text{ for some } a \; \# \; x \\ \; \\ \text{bind}^{-1} \; : \; (X \rightarrow_{Nom} [\mathbb{A}](Y)) \rightarrow X * \; \mathbb{A} \rightarrow_{Nom} Y \\ \text{bind}^{-1}(f)(x, a) = f(x) \; @ \; a \\ \; \; \text{where} \\ \; \; \; \; -{} \; @ -{} \; : \; [\mathbb{A}]X * \mathbb{A} \rightarrow X \\ \; \; \; \; @(\langle a \rangle x, a') = (a \; a') \cdot x \end{array}


bind(bind−1(f))(x)=⟨a⟩bind−1(f)(x,a) for some a#x=⟨a⟩(f(x)@a)f(x)@a requires a#f(x)a#x∧a#f(f equivariant – A.14)⟹a#f(x)(A.10)let ⟨a′⟩x′=f(x)=⟨a⟩(⟨a′⟩x′@a)=⟨a⟩(a′a)⋅x′a#f(x)⇔a#⟨a′⟩x′⇔a=a′∨a#x′case a=a′⟨a⟩(a′a)⋅x′=⟨a′⟩(a′a′)⋅x′=⟨a′⟩x′=f(x)case a#x′∀b.b#(a,(a′a)⋅x′,a′,x′)⟹(ab)⋅(a′a)⋅x′=(a′b)⋅x′⇔∀b.b#(a,(a′a)⋅x′,a′,x′)⟹((ab)∘(a′a))⋅x′=(a′b)⋅x′⇔∀b.b#(a,(a′a)⋅x′,a′,x′)⟹((a′b)∘(ab))⋅x′=(a′b)⋅x′(π∘(ab)=(π(a)π(b))∘π — A.21)⇔∀b.b#(a,(a′a)⋅x′,a′,x′)⟹(a′b)⋅(ab)⋅x′=(a′b)⋅x′⇔∀b.b#(a,(a′a)⋅x′,a′,x′)⟹(a′b)⋅x′=(a′b)⋅x′(a#x′∧b#x′⟹(ab)⋅x′=x′ — A.9)⇔∃b.b#(a,(a′a)⋅x′,a′,x′)∧(a′b)⋅x′=(a′b)⋅x′(a#x′∧b#x′⟹(ab)⋅x′=x′(A.13)⟨a⟩(a′a)⋅x′=⟨a′⟩x′=f(x) \begin{array}{l} \text{bind}(\text{bind}^{-1}(f))(x) \\ = \langle a \rangle \; \text{bind}^{-1}(f)(x, a) \text{ for some } a \; \# \; x \\ = \langle a \rangle \; (f(x) \; @ \; a) \\ \; \; \; \; f(x) \; @ \; a \text{ requires } a \; \# \; f(x) \\ \; \; \; \; \; \; \; \; a \; \# \; x \land a \; \# \; f \; (f \text{ equivariant -- A.14}) \implies a \; \# \; f(x) \; (\text{A.10}) \\ \; \; \; \; \text{let } \langle a' \rangle x' = f(x) \\ = \langle a \rangle (\langle a' \rangle x' \; @ \; a) \\ = \langle a \rangle \; (a' \; a) \cdot x' \\ \; \\ \; \; \; \; a \; \# f(x) \\ \; \; \; \; \iff a \; \# \; \langle a' \rangle x' \\ \; \; \; \; \iff a = a' \lor a \; \# \; x' \\ \; \\ \; \; \; \; \text{case } a = a' \\ \; \; \; \; \; \; \; \; \langle a \rangle \; (a' \; a) \cdot x' \\ \; \; \; \; \; \; \; \; = \langle a' \rangle \; (a' \; a') \cdot x' \\ \; \; \; \; \; \; \; \; = \langle a' \rangle x' \\ \; \; \; \; \; \; \; \; = f(x) \\ \; \\ \; \; \; \; \text{case } a \; \# \; x' \\ \; \; \; \; \; \; \; \; \forall b. \; b \; \# \; (a, (a' \; a) \cdot x', a', x') \implies (a \; b) \cdot (a' \; a) \cdot x' = (a' \; b) \cdot x' \\ \; \; \; \; \; \; \; \; \iff \forall b. \; b \; \# \; (a, (a' \; a) \cdot x', a', x') \implies ((a \; b) \circ (a' \; a)) \cdot x' = (a' \; b) \cdot x' \\ \; \; \; \; \; \; \; \; \iff \forall b. \; b \; \# \; (a, (a' \; a) \cdot x', a', x') \implies ((a' \; b) \circ (a \; b)) \cdot x' = (a' \; b) \cdot x' \; (\pi \circ (a \; b) = (\pi(a) \; \pi(b)) \circ \pi \text{ --- A.21}) \\ \; \; \; \; \; \; \; \; \iff \forall b. \; b \; \# \; (a, (a' \; a) \cdot x', a', x') \implies (a' \; b) \cdot (a \; b) \cdot x' = (a' \; b) \cdot x' \\ \; \; \; \; \; \; \; \; \iff \forall b. \; b \; \# \; (a, (a' \; a) \cdot x', a', x') \implies (a' \; b) \cdot x' = (a' \; b) \cdot x' \; (a \; \# \; x' \land b \; \# \; x' \implies (a \; b) \cdot x' = x' \text{ --- A.9}) \\ \; \; \; \; \; \; \; \; \iff \exists b. \; b \; \# \; (a, (a' \; a) \cdot x', a', x') \land (a' \; b) \cdot x' = (a' \; b) \cdot x' \; (a \; \# \; x' \land b \; \# \; x' \implies (a \; b) \cdot x' = x' \; (\text{A.13}) \\ \; \\ \; \; \; \; \; \; \; \; \langle a \rangle \; (a' \; a) \cdot x' \\ \; \; \; \; \; \; \; \; = \langle a' \rangle x' \\ \; \; \; \; \; \; \; \; = f(x) \end{array}


bind−1(bind(f))(x,a) where a#x=bind(f)(x)@abind(f)(x)@a requires a#bind(f)(x)a#x∧a#bind(f)(bind(f) equivariant – A.14)⟹a#bind(f)(x)(A.10)=(⟨a′⟩f(x,a′) for some a′#x)@a=(a′a)⋅f(x,a′)=f((a′a)⋅x,(a′a)⋅a′)(fequivariant)=f((a′a)⋅x,a)=f(x,a)(a′#x∧a#x⟹(a′a)⋅x=x — A.9) \begin{array}{l} \text{bind}^{-1}(\text{bind}(f))(x, a) \text{ where } a \; \# \; x \\ = \text{bind}(f)(x) \; @ \; a \\ \; \; \; \; \text{bind}(f)(x) \; @ \; a \text{ requires } a \; \# \; \text{bind}(f)(x) \\ \; \; \; \; a \; \# \; x \land a \; \# \; \text{bind}(f) \; (\text{bind(f)} \text{ equivariant -- A.14}) \implies a \; \# \; \text{bind}(f)(x) \; (\text{A.10}) \\ = (\langle a' \rangle f(x, a') \text{ for some } a' \; \# \; x) \; @ \; a \\ = (a' \; a) \cdot f(x, a') \\ = f((a' \; a) \cdot x, (a' \; a) \cdot a') \; (f \; \text{equivariant}) \\ = f((a' \; a) \cdot x, a) \\ = f(x, a) \; (a' \; \# \; x \land a \; \# \; x \implies (a' \; a) \cdot x = x \text{ --- A.9}) \end{array}

Proof 23

[𝔸](−)[\mathbb{A}]({-}) is left adjoint to this functor: R(Y)={f|f∈Y𝔸,∀a.a#f(a)}R(Y) = \{ \; f \; | \; f \in Y^{\mathbb{A}}, \; \forall a. \; a \; \# \; f(a) \; \}. ↩︎

[𝔸](−)⊣Runbind:(X→NomR(Y))→[𝔸]X→NomYunbind(f)(⟨a⟩x)=f(x)(a)unbind−1:([𝔸]X→NomY)→X→NomR(Y)unbind−1(f)(x)=λa.f(⟨a⟩x) \begin{array}{l} [\mathbb{A}](-{}) \dashv R \\ \; \\ \text{unbind} \; : \; (X \rightarrow_{Nom} R(Y)) \rightarrow [\mathbb{A}] X \rightarrow_{Nom} Y \\ \text{unbind}(f)(\langle a \rangle x) = f(x)(a) \\ \; \\ \text{unbind}^{-1} \; : \; ([\mathbb{A}] X \rightarrow_{Nom} Y) \rightarrow X \rightarrow_{Nom} R(Y) \\ \text{unbind}^{-1}(f)(x) = \lambda a. \; f(\langle a \rangle x) \end{array}


unbind−1 requires ∀a.a#(λa′.f(⟨a′⟩x))(a)∀a.a#(λa′.f(⟨a′⟩x))(a)⇔∀a.a#f(⟨a⟩x)a#f(f equivariant – A.14)∧a#⟨a⟩x(a=b⟹a#⟨b⟩x — A.12)⟹a#f(⟨a⟩x)(A.10) \begin{array}{l} \text{unbind}^{-1} \text{ requires } \forall a. \; a \; \# \; (\lambda a'. \; f(\langle a' \rangle x))(a) \\ \; \\ \forall a. \; a \; \# \; (\lambda a'. \; f(\langle a' \rangle x))(a) \\ \iff \forall a. \; a \; \# \; f(\langle a \rangle x) \\ a \; \# \; f \; (f \text{ equivariant -- A.14}) \land a \; \# \; \langle a \rangle x \; (a = b \implies a \; \# \; \langle b \rangle x \text{ --- A.12}) \implies a \; \# \; f(\langle a \rangle x) \; (\text{A.10}) \end{array}


unbind(unbind−1(f))(⟨a⟩x)=unbind−1(f)(x)(a)=(λa′.f(⟨a′⟩x))(a)=f(⟨a⟩x)(β-equivalence) \begin{array}{l} \text{unbind}(\text{unbind}^{-1}(f))(\langle a \rangle x) \\ = \text{unbind}^{-1}(f)(x)(a) \\ = (\lambda a'. \; f(\langle a' \rangle x))(a) \\ = f(\langle a \rangle x) \; (\beta \text{-equivalence}) \end{array}

unbind−1(unbind(f))(x)=λa.unbind(f)(⟨a⟩x)=λa.f(x)(a)=f(x)(η-equivalence) \begin{array}{l} \text{unbind}^{-1}(\text{unbind}(f))(x) \\ = \lambda a. \; \text{unbind}(f)(\langle a \rangle x) \\ = \lambda a. f(x)(a) \\ = f(x) \; (\eta \text{-equivalence}) \end{array}

← Gear Acquisition Syndrome Nominal Sets →