# nLab affine logic

Contents

foundations

## Removing axioms

#### Monoidal categories

monoidal categories

With braiding

With duals for objects

With duals for morphisms

With traces

Closed structure

Special sorts of products

Semisimplicity

Morphisms

Internal monoids

Examples

Theorems

In higher category theory

# Contents

## Idea

In formal logic, affine logic refers to substructural logics which omit the contraction rule but retain the weakening rule. Conversely, affine logic is linear logic adjoined with the weakening rule.

In terms of categorical semantics, affine logic is modeled by (symmetric) monoidal categories whose tensor unit $I$ is terminal, also known as semicartesian monoidal categories, an example of which is the category of affine spaces, whence the name.

(In contrast, the category of linear spaces, ie. vector spaces, serves as categorical semantics for the multiplicative fragment of linear logic [eg. Murfet 2014], where also the weakening rule is dropped.)

## Categorical semantics

One might imagine that a more general notion of categorical semantics would be given by monoidal categories equipped with a natural (in $A$) family $A\to I$ of morphisms implementing weakening for each object. However, such an interpretation is in general badly behaved, unless one additionally requires these natural transformations to be monoidal, but it can be shown that this additional requirement already forces the tensor unit to be terminal (specifically, this follows from the component at $I$ being the identity).

An example of the badly behaved case – where the transformation is not monoidal, and the tensorial unit is not terminal – is given by the category Rel of relations, with cartesian product as tensor product (i.e., with $Rel$ as cartesian bicategory). Here a natural family of relations $A\to I$ is given by picking empty relations everywhere. In the corresponding interpretation of affine logic, any weakening yields an empty relation, which contradicts intuitive principles like for example that “adding a dummy variable to a proof and then substituting a closed term” should not change the semantics.

## Examples

###### Example

The substructural part of many forms of bunched logic are affine instead of linear, sometimes inadvertently, ultimately due to former technical problems with formulating dependent linear types (see review in Riley 2022 §1.7.2).