Operators

2020 James B. Wilson

Colorado State University

 

Objective

  • Uniformly define operators in algebra as connectives that make polynomial formulas.

 

Notation

A function of type \[A\to (B\to C)\] expects two inputs, the first of type \(A\) the second of type \(B\).

 

This is nearly identical to functions of type \[A\times B\to C\] given how \(A\times B\) was defined in our class discussion.

 

These are essentially interchangeable.

Notation

"Currying" means swapping \(A\times B\to C\) with \(A\to (B\to C)\).

"Uncurrying" swaps \(A\to (B\to C)\) with \(A\times B\to C\).

 

Many authors abbreviate \(A\to B\to C\) for \(A\to (B\to C)\).

 

In algebra that gets confused with a later concept called "exact sequences".   So we mostly avoid that shortcut.

Why does \(x^3+5x=x^2\) make sense?

What allows for \(x+x\)?

As a function \(+\) must take in data on the left that is the same as on the right.

Formally, we have this implied function

\[x\mapsto (y\mapsto (x+y))\quad \equiv \quad (x,y)\mapsto x+y.\]

In general this could have type

\[A\to (B\to C) \quad\equiv \quad A\times B\to C.\]

But to permit \(x+x\) requires \(A=B\); so,

\[A\to (A\to C)\quad \equiv\quad A\times A\to C.\]

What allows for \(x+x=x\)?

As a function \(+\) must produce a type of data equal to the input type.

Form before, we still consider

\[x\mapsto (y\mapsto (x+y))\quad \equiv \quad (x,y)\mapsto x+y\]

of type \(A\to (B\to C)\), equivalently \(A\times B\to C\).

\(x+x\) forced \(A=B\), and now \(x+x=x\) forces \(A=C\); so,

\[A\to (A\to A)\quad \equiv\quad A\times A\to A.\]

General polynomials

  • If you write \(x^2\), meaning \(x\cdot x\) then again multiplication must involve the same type on the left and right.
  • If you write \(x^2+3x\) to mean \(x\cdot x+(x+(x+x))\), then both multiplication and addition start and end in all the same type.
  • Consider when this goes wrong.  If \(X\) is a \((2\times 3)\)-matrix, is there such a thing as \(X^2+3X\)?

Observation

Polynomial equations requires that all the operations start and end with the same type of data.

Operators by induction.

Given a set or type \(A\),

  1. A nullary operator is a constant \(a:A\), also written as a (set/typed) function \(A^0\to A\) where \(A^0\) is a set of size 1.
  2. A unary operator is a function \(A\to A\).
  3. A binary operator is a function \(A\to (A\to A)\).
  4. A ternary operator is a function \(A\to (A\to (A\to A))\).
  5. ...
  6. A \(n+1\)-arity operator is a function from \(A\) to a type of \(n\)-arity operators.

With \(\Pi\)-types

Given a set or type \(A\), an \(n\)-operator

  1. If \(n=0\) then a nullary operator is a constant \(a:A\), also written as a (set/typed) function \(A^0\to A\) where \(A^0\) is a set of size 1.
  2. If \(n\) is a successor to some natural number \(k\), an \(n\)-arity operator \[A^n\to A\] where \(A^n=A\times A^k\).

Recall our type \(A\times B\) in our assignment.

The technically imprecise, we often write \(A^n=\overbrace{A\times \cdots\times A}^n\)

Operator Quiz

Operator?

\(7\in \mathbb{N}\)

Yes.

We may interpret this as an operator, i.e. let \(\mathbb{N}^0=\{\bot\}\) be a set of size 1.  Then we can type this as a function

\[\bot\mapsto 7\]

which can be typed as \(\mathbb{N}^0\to \mathbb{N}\), i.e.: a \(0\)-operator.

Operator?

\(m+n\) where \(m,n\in \mathbb{N}\)

Yes.

Formally we have the following compound anonymous function

\[m\mapsto (n\mapsto (m+n))\]

which can be typed as \[\mathbb{N}\to (\mathbb{N}\to \mathbb{N}).\]

Operator?

\(m-n\) where \(m,n\in \mathbb{N}\)

No.

Formally we have the following compound anonymous function

\[m\mapsto (n\mapsto (m-n))\]

but \(m-n\) may be negative so this is \[\mathbb{N}\to (\mathbb{N}\to \mathbb{Z}).\]

These are not all the same type, so not an operator.

Operator?

\(m/n\) where \(m,n\in \mathbb{N}\)

No. Formally we have the following compound anonymous function

\[m\mapsto (n\mapsto (m/n))\]

but, we cannot type this as \[\mathbb{N}\to (\mathbb{N}\to \mathbb{N}).\]

Instead we might type this as 

\[\mathbb{N}\to (\mathbb{N}\to \mathbb{Q}).\]

So it is not an operator on \(\mathbb{N}\).

Operator?

\(m+0=m\) where \(m,0\in \mathbb{N}\)

No. This is an equation, not an "traditional" function.

(Preview) Constructive Math.

We could say \(m+0=m\) is a type---the type of all evidence for the equation.  E.g. the reflexive law is evidence \[refl_m:(m+0=m).\]

Hence we have

\[m\mapsto refl_m\]

with type \[\prod_{m\in \mathbb{N}} (m+0=m).\]

Still not an operator on \(\mathbb{N}\), i.e., not of type \(\mathbb{N}^n\to \mathbb{N}\).

Operator?

\(X+Y\) where \(X,Y\) are real matrices.

No/Yes. The subtle point is we are imprecise, e.g. this is nonsense

\[\begin{bmatrix} 1 & 2 \end{bmatrix}+\begin{bmatrix} 1 & 0 \\ -1 & 1\end{bmatrix}\]

However, if we narrow focus to \((m\times n)\)-matrices then the implied map is

\[X\mapsto (Y\mapsto (X+Y))\]

and can be typed

\[\mathbb{M}_{m\times n}(\mathbb{R})\to (\mathbb{M}_{m\times n}(\mathbb{R})\to \mathbb{M}_{m\times n}(\mathbb{R})).\]

So this is a binary operator.

Operator?

\(XY\) where \(X,Y\) are real matrices.

No.

As before \(XY\) is not everywhere defined as a matrix, so we cannot force \(X\mapsto (Y\mapsto XY))\) to always have a type \(A\to (A\to A)\).

No.

Even when when it is defined the general type is

\[\mathbb{M}_{a\times b}(\mathbb{R})\to (\mathbb{M}_{b\times c}(\mathbb{R})\to \mathbb{M}_{a\times c}(\mathbb{R})).\]

 

Yes.

Finally only if \(a=b=c\), i.e. square matrices, do we get an actual operator on one type \(\mathbb{M}_{a}(\mathbb{R})=\mathbb{M}_{a\times a}(\mathbb{R})\).

Essential Operators

The following operators will be used throughout this course with all their usual qualities.

  1. \(\mathbb{N}\) with \(0,+,1,\times\)
  2. \(\mathbb{Z}\) with \(0,+,x\mapsto -x,1,\times\), We wrote \(x\mapsto -x\) to emphasis \(-\) as unary.  The binary \(x-y:=x+(-y)\) is short hand and while it can be an operator in algebra we assume \(-\) is unary most of the time.
  3. \(\mathbb{Q},\mathbb{R},\mathbb{C},\mathbb{M}_n(\mathbb{R})\) with \(0,+,\times,x\mapsto -x,\)
  4. Polynomials \(a(x)=a_0+a_1 x+\cdots+a_n x^n\in \mathbb{R}[x]\) have \(+,-,0,1,\times\).

One hold out

Is the reciprocal an operator on \(\mathbb{Q}\)?

Consider the function.

\[x\mapsto 1/x\]

Consider its type

\[(\mathbb{Q}-\{0\})\to \mathbb{Q}\]

Technically no, the domain is different from the codomain, this is not a unary operator on \(\mathbb{Q}\).

Some like to call these partial-operators.

Preview To 467

Operators like general rectangular matrix multiplication are not operators in the sense here.

 

Functions of type

\[A\to (B\to C)\quad\equiv\quad A\times B\to C\]

can still be part of algebra.

 

In those cases, we must have operators  on one of \(A\), \(B\) or \(C\) and we study the interaction.

Actions/Representations

Vector spaces \(V\) have a scalar multiplication:

\[\cdot:\mathbb{R}\to (V\to V)\quad\equiv\quad \mathbb{R}\times V\to V.\]

  • Scalar product is not an operator.
  • \(\mathbb{R}\) has an actual multiplication operator \(*:\mathbb{R}\to (\mathbb{R}\to \mathbb{R})\).
  • Scalar products are part of algebra because of the interplay of a real operator with this "action" operator, i.e.:\[\alpha*(\beta\cdot v)=(\alpha*\beta)\cdot v\] where \(\alpha,\beta\in \mathbb{R}\) and \(v\in V\).

Operators

By James Wilson

Operators

  • 454