Images of a set under a relation

Direct Image

R(A):={ā€…ā€ŠyāˆˆB:āˆƒ(xāˆˆA::(x,y)āˆˆR)ā€…ā€Š}R(A) := \{\; y \in B : \exists(x \in A :: (x,y) \in R) \; \}

Relationā€…ā€ŠXā€…ā€ŠYā€…ā€ŠR\textbf{Relation} \; X \; Y \; R

Includesā€…ā€ŠAā€…ā€ŠX\textbf{Includes} \; A \; X


Alloy provides syntax for the direct image. R(A)R(A) is written in Alloy as A.R

Images according to De Baets and Kerre

Typing

All images have the same basic type requirements, the details of which I will place in a predicate called BKType\textbf{BKType}.

BKTypeā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠAā€…ā€Šy\textbf{BKType} \; X \; Y \; R \; A \; y

Relationā€…ā€ŠXā€…ā€ŠYā€…ā€ŠR\textbf{Relation} \; X \; Y \; R

AāŠ†XA \subseteq X

yāˆˆYy \in Y


pred BKType(X,Y: set univ, R: univ->univ, A: set univ, y: univ) {
  R in X->Y
  A in X
  y in Y
}

Furthermore, I have chosen to extract the range of each set comprehension to its own (characteristic) predicate.

Sub-direct Image

SubDIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA:={ā€…ā€ŠyāˆˆY:āˆ…āŠ‚AāŠ†Ryā€…ā€Š}\textbf{SubDI} \; X \; Y \; R \; A := \{\; y \in Y : \empty \subset A \subseteq Ry \; \}

Notation.

  1. SubDIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA\textbf{SubDI} \; X \; Y \; R \; A can be written SubDIā€…ā€ŠRā€…ā€ŠA\textbf{SubDI} \; R \; A when XX and YY are clear from the context.

  2. SubDIā€…ā€ŠRā€…ā€ŠA\textbf{SubDI} \; R \; A is written in symbols as RāŠ²(A)R^{\vartriangleleft}(A)


fun SubDI(X,Y: set univ, R: univ->univ, A: set univ) : set univ {
  { y: Y | SubDI[X,Y,R,A,y] }
}

pred SubDI(X,Y: set univ, R: univ->univ, A: set univ, y: univ) {
  BKType[X,Y,R,A,y]

  some A
  A in R.y
}

Super-direct Image

SupDIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA={ā€…ā€ŠyāˆˆY:āˆ…āŠ‚RyāŠ†Aā€…ā€Š}\textbf{SupDI} \; X \; Y \; R \; A = \{\; y \in Y : \empty \subset Ry \subseteq A \; \}

Notation.

  1. SupDIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA\textbf{SupDI} \; X \; Y \; R \; A can be written SupDIā€…ā€ŠRā€…ā€ŠA\textbf{SupDI} \; R \; A when XX and YY are clear from the context.

  2. SupDIā€…ā€ŠRā€…ā€ŠA\textbf{SupDI} \; R \; A is written in symbols as RāŠ³(A)R^{\vartriangleright}(A)


fun SupDI(X,Y: set univ, R: univ->univ, A: set univ) : set univ {
  { y: Y | SupDI[X,Y,R,A,y] }
}

pred SupDI(X,Y: set univ, R: univ->univ, A: set univ, y: univ) {
  BKType[X,Y,R,A,y]

  some R.y
  R.y in A
}

Square Image

SqrIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA={ā€…ā€ŠyāˆˆY:āˆ…āŠ‚A=Ryā€…ā€Š}\textbf{SqrI} \; X \; Y \; R \; A = \{\; y \in Y : \empty \subset A = Ry \; \}

Notation.

  1. SqrIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA\textbf{SqrI} \; X \; Y \; R \; A can be written SqrIā€…ā€ŠRā€…ā€ŠA\textbf{SqrI} \; R \; A when XX and YY are clear from the context.

  2. SqrIā€…ā€ŠRā€…ā€ŠA\textbf{SqrI} \; R \; A is written in symbols as Rā‹„(A)R^{\diamond}(A)


fun SqrI(X,Y: set univ, R: univ->univ, A: set univ) : set univ {
  { y: Y | SqrI[X,Y,R,A,y] }
}

pred SqrI(X,Y: set univ, R: univ->univ, A: set univ, y: univ) {
  BKType[X,Y,R,A,y]

  some A
  A = R.y
}

Images according to Bandler and Kohout

Sub-direct Image

SubDIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA:={ā€…ā€ŠyāˆˆY:AāŠ†Ryā€…ā€Š}\textbf{SubDI} \; X \; Y \; R \; A := \{\; y \in Y : A \subseteq Ry \; \}

Notation.

  1. SubDIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA\textbf{SubDI} \; X \; Y \; R \; A can be written SubDIā€…ā€ŠRā€…ā€ŠA\textbf{SubDI} \; R \; A when XX and YY are clear from the context.

  2. SubDIā€…ā€ŠRā€…ā€ŠA\textbf{SubDI} \; R \; A is written in symbols as RāŠ²(A)R^{\vartriangleleft}(A)


fun SubDI(X,Y: set univ, R: X->Y, A: set X) : set univ {
  { y: Y | A in R.y }
}

Super-direct Image

SupDIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA={ā€…ā€ŠyāˆˆY:AāŠ‡Ryā€…ā€Š}\textbf{SupDI} \; X \; Y \; R \; A = \{\; y \in Y : A \supseteq Ry \; \}

Notation.

  1. SupDIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA\textbf{SupDI} \; X \; Y \; R \; A can be written SupDIā€…ā€ŠRā€…ā€ŠA\textbf{SupDI} \; R \; A when XX and YY are clear from the context.

  2. SupDIā€…ā€ŠRā€…ā€ŠA\textbf{SupDI} \; R \; A is written in symbols as RāŠ³(A)R^{\vartriangleright}(A)


fun SupDI(X,Y: set univ, R: X->Y, A: set X) : set univ {
  { y: Y | R.y in A }
}

Square Image

SqrIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA={ā€…ā€ŠyāˆˆY:A=Ryā€…ā€Š}\textbf{SqrI} \; X \; Y \; R \; A = \{\; y \in Y : A = Ry \; \}

Notation.

  1. SqrIā€…ā€ŠXā€…ā€ŠYā€…ā€ŠRā€…ā€ŠA\textbf{SqrI} \; X \; Y \; R \; A can be written SqrIā€…ā€ŠRā€…ā€ŠA\textbf{SqrI} \; R \; A when XX and YY are clear from the context.

  2. SqrIā€…ā€ŠRā€…ā€ŠA\textbf{SqrI} \; R \; A is written in symbols as Rā‹„(A)R^{\diamond}(A)


fun SqrI(X,Y: set univ, R: X->Y, A: set X) : set univ {
  { y: Y | A = R.y }
}

Last updated