---
title: Dependent Multiplicities in Dependent Linear Type Theory
url: https://www.emergentmind.com/topics/dependent-multiplicities
type: topic
---

# Dependent Multiplicities in Dependent Linear Type Theory

In dependent linear type theory, **dependent multiplicities** are resource annotations in which the multiplicity of some variable—namely, the number of times the variable can be used in a program—can depend on other variables, more specifically on earlier variables in a dependent type. The formulation developed in "Dependent Multiplicities in Dependent Linear Type Theory" gives precise resource annotations to many higher-order functions that cannot be adequately typed in any other system, does so by embedding linear logic into dependent type theory in a resource-sensitive way, uses a standard natural numbers type to obtain a quantitative typing system with dependent multiplicities, characterises the semantics as a combination of standard models of dependent type theory and linear logic, and is implemented in Agda [2507.08759].

## 1. Resource objects and dependent linear types

The core quantitative structure is the datatype `Supply`, which serves as the resource object of the theory. Its constructors are:

```agda
data Supply (ℓ : Level) : Type (ℓ-suc ℓ) where
  ⋆   : Supply ℓ
  ι   : {A : Type ℓ} (a : A) → Supply ℓ
  _⊗_ : Supply ℓ → Supply ℓ → Supply ℓ
  [_,_] : Supply ℓ → Supply ℓ → Supply ℓ
  Λ    : (A : Type ℓ) → (Δ : A → Supply ℓ) → Supply ℓ
  !    : Supply ℓ → Supply ℓ
```

Here `⋆` is the monoidal unit, `_⊗_` is tensor, `!` is the exponential of linear logic, `ι a` is a singleton supply focused at a value `a`, and `Λ A Δ` is a supply that depends on an index `A` and a family `Δ : A → Supply`. At the categorical level, `Supply` is described as a strictly symmetric monoidal category with additional structure for `!`. The type of linear maps between supplies is written `Δ₀ ▷ Δ₁`, and its constructors encode the laws of a symmetric monoidal closed category with a comonad `!` [2507.08759].

The resource discipline is attached to types through `LType`:

```agda
LType : (ℓ : Level) → Type (ℓ-suc ℓ)
LType ℓ = Σ[ A ∈ Type ℓ ] (A → Supply ℓ)
```

Thus an element of `LType` is a pair `(A , Θ)` where `A` is an underlying type and `Θ : A → Supply` assigns to each term `a : A` the supply associated with that term. This is the decisive step: the quantity or shape of resources associated with a term depends on the actual term value. The paper therefore treats an `LType` as a dependent linear type, and the function `Θ` as the dependent multiplicity assignment [2507.08759].

A plain type embeds into this setting through the shorthand

```agda
_． : Type ℓ → LType ℓ
A ． = (A , ι)
```

so an ordinary type is interpreted as a linear type whose supply at `a : A` is just the singleton supply `ι a`. This provides the trivial case from which more informative dependent multiplicities are built.

## 2. Judgments as terms equipped with resource proofs

Typing judgments are represented by pairing a term with a proof that the ambient supply can be transformed into the supply demanded by that term’s dependent linear type. The judgment form is

```agda
_⊙_ : Supply ℓ → LType ℓ → Type (ℓ-suc ℓ)
Δ ⊙ (A , Θ) = Σ[ a ∈ A ] (Δ ▷ Θ a)
```

An inhabitant of `Δ ⊙ (A , Θ)` is therefore a pair consisting of an element `a : A` and a morphism `Δ ▷ Θ a`. The intended reading is that the context supply `Δ` can be linearly transformed into the supply required by the value `a`, namely `Θ a`. The typing judgment is consequently not only a statement about term formation but also a witness of resource usage [2507.08759].

This formulation is the mechanism by which quantitative information is tracked. Multiplicities are not external annotations attached to variables in a context; rather, they are encoded inside supply terms and justified by morphisms in the `Supply` category. The paper explicitly notes that multiplicities are "not represented as explicit `m : ℕ` annotations on variables in a context, but as part of the supply term assigned to the whole context, composed with dependent functions `Θ : A → Supply`" [2507.08759].

There is also an auxiliary record `of A` and a coercion `_^Θ` packaging a term together with its focused resource supply. This isolates the canonical supply corresponding to a concrete term and provides the local resource object from which more complex quantitative derivations are assembled.

## 3. Dependent products and explicit multiplicity indices

Dependent multiplicities become operationally explicit in the definition of dependent products. For a linear type `(A , Θ₀)` and a dependent family `(B , Θ₁)`, the dependent product is

```agda
Π : (A : LType ℓ) → (A ⇒ LType ℓ) → LType ℓ
Π (A , Θ₀) (B , Θ₁) =
  ( (x : A) → B x
  , λ f → Λ[ x : A ] [ Θ₀ x , Θ₁ (f x) ]
  )
```

The supply of a function `f` is therefore indexed by `x : A`, with payload `[Θ₀ x , Θ₁ (f x)]`. In the paper’s reading, the supply required by the function at argument `x` is `Θ₀ x ⊗ Θ₁ (f x)`. Both the argument usage and the result usage may depend on the actual argument `x` and the value `f x` [2507.08759].

Quantitative dependent products are then introduced by an explicit natural-number multiplicity parameter. Supply powers are defined by repeated tensor:

```agda
_^_ : Supply ℓ → ℕ → Supply ℓ
Δ ^ zero    = ⋆
Δ ^ suc m   = Δ ⊗ (Δ ^ m)
```

and used in the multiplicity-indexed product

```agda
Π^ : (A : LType ℓ) → ℕ → (A ⇒ LType ℓ) → LType ℓ
Π^ (A , Θ₀) m (B , Θ₁) =
  ( (x : A) → B x
  , λ f → Λ[ x : A ] [ Θ₀ x ^ m , Θ₁ (f x) ]
  )
```

The notation

```agda
syntax Π^' A m (λ x → B) = ⟨ x : A ⟩^m ⊸ B
```

makes the intended interpretation explicit: the function uses its argument `m` times. Standard `Π` is recovered as the case `m = 1` [2507.08759].

Application realizes a quantitative substitution principle:

```agda
Π^App :
  Δ₀ ⊙ ⟨ x : A , Θ₀ ⟩^m ⊸ B x , Θ₁ →
  (a , δ₁) : Δ₁ ⊙ (A , Θ₀) →
  (Δ₀ ⊗ Δ₁ ^ m) ⊙ B a , Θ₁
```

with notation `f ≻ m ⇓ a`. If `f` has multiplicity `m` in its argument and `a` is supplied by `Δ₁`, then applying `f` to `a` consumes `Δ₀ ⊗ Δ₁^m`. The paper summarizes this as: if `f : \Pi_x^m B(x)` and `a : A`, then the resource consumption is `Δ_f ⊗ Δ_a^m`, so `a` is used exactly `m` times [2507.08759].

## 4. Arithmetic of multiplicities and higher-order computation

The system’s dependent multiplicities are not limited to literal constants. Arithmetic on multiplicities is internalised through proofs in the `Supply` category. The module `NatMul` establishes, among others, the morphisms

```agda
lemma2 :
  (m : ℕ) →
  X ^ m ⊗ Y ^ m ▷ (X ⊗ Y) ^ m

lemma3 :
  (m n : ℕ) →
  X ^ (m + n) ▷ X ^ n ⊗ X ^ m

lemma1 :
  (m n : ℕ) →
  Y ^ (m * n) ▷ (Y ^ n) ^ m
```

and the distributivity law

```agda
⊗^‑distr :
  (m n : ℕ) →
  Δ₀ ^ m ⊗ Δ₁ ^ (m * n) ▷ (Δ₀ ⊗ Δ₁ ^ n) ^ m
```

These are the resource-algebraic counterparts of addition, multiplication, and distributivity of natural numbers. The paper states that this is what makes the multiplicities genuinely dependent: the required supply for a function or term can be an arbitrary polynomial, or a more complex function, in natural indices [2507.08759].

The canonical higher-order example is `copy` and its iteration:

```agda
copyJ : (x : A) → (ι x ^ 2) ⊙ (A × A)．
copy  : ⋆ ⊙ ⟨ A． ⟩^2 ⊸ (A × A)．

copytwice : ⋆ ⊙ ⟨ x : A． ⟩^4 ⊸ ((A × A) × (A × A))．
copytwice = λ x → copy ≻ 2 ⇓ (copy ≻ 2 ⇓ x)
```

`copy` uses its argument twice, while `copytwice` uses the original argument four times. Typing `copytwice` requires `⊗^‑distr` to establish that two uses of a function of multiplicity `2` yield multiplicity `4`. The paper explicitly states that this is something not available in standard linear logic, nor in non-dependent quantitative systems that only have fixed grades; here the multiplicity is computed by a higher-order program in `ℕ` and verified in the supply algebra [2507.08759].

This is the point at which the phrase **dependent multiplicities** acquires its strongest meaning. The multiplicity annotation is not merely attached to a binder; it can be computed, transported through higher-order composition, and justified by internal proofs of resource equalities.

## 5. Interaction with other type formers, semantics, and mechanisation

The same `Supply`/`LType` architecture extends to other dependent type formers. The paper defines linear versions of dependent sums, coproducts, identity, and fixed points. For dependent sums, pairing is linearised using morphisms such as

```agda
opl, : ι (a , b) ▷ ι a ⊗ ι b
lax, : ι a ⊗ ι b ▷ ι (a , b)
```

and analogous constructions are given for `tt`, `inl`, `inr`, and inductive types `μ F`. Because `LType` is `Σ A. A → Supply`, every dependent type in the sense of MLTT is extended with a resource component [2507.08759].

The exponential `!` is integrated through a dependent function space

```agda
!Π :
  (A , Θ₀) → (A ⇒ LType) → LType
!Π (A , Θ₀) (B , Θ₁) =
  ( (x : A) → B x
  , λ f → Λ[ x : A ] [ ! (Θ₀ x) , Θ₁ (f x) ]
  )
```

with notation `!⟨ x : A ⟩ ⊸ B`. Here the argument supply is `! (Θ₀ x)` rather than `Θ₀ x ^ m`. The paper describes this as the linear-logic rule under which one can duplicate or erase arbitrarily; the relevant equations are mediated by the comonad maps `use`, `mult`, `dupl`, and `erase` [2507.08759].

Semantically, the intended interpretation is standard. `Supply` with `_⊗_`, `⋆`, and `_▷_` is a symmetric monoidal closed category; `!` is a monoidal comonad; and

\[
LType\,\ell = \Sigma\, A : Type.\,(A \to Supply)
\]

is the category of families of supplies over sets, described in the paper as basically a fibration over `Type` with fibres `A → Supply`. Judgments are interpreted as

\[
\Delta \,\odot\, (A,\Theta) \;=\; \Sigma\, a : A.\, \Delta \triangleright \Theta(a).
\]

The system is implemented in Agda. The paper also notes a practical consequence of the internalised resource algebra: type checking can require solving large equalities in `Supply`, often by explicit proofs such as `lemma1`, `lemma2`, and related constructions, and in practice Agda automation or custom tactics in modules such as `ProductionSolver` are used to build these morphisms [2507.08759].

## 6. Distinctive features and broader usage of the term

The paper isolates four aspects as novel. First, multiplicities are **fully dependent**: the supply function `Θ : A → Supply` can depend on any term `a : A`, not only on numeric indices. Second, the resource algebra is **internalised**: instead of annotations like `x : A [m]`, the discipline is expressed inside the linear category `Supply` and its morphisms. Third, the system gives **precise quantitative typing of higher-order functions**, including examples such as `copy : ⟨ A． ⟩^2 ⊸ (A × A)．` and `copytwice : ⟨ A． ⟩^4 ⊸ ((A × A) × (A × A))．`, where exact usage rather than upper bounds is tracked. Fourth, bounded graded usage via `^ m` and unbounded usage via `!` are combined in one framework [2507.08759].

The expression **dependent multiplicities** is not uniform across the literature. In semi-inclusive deep inelastic scattering, the central observable is the **transverse-momentum-dependent hadron multiplicity**, differential in \(x\), \(Q^2\), \(z\), and \(P_{hT}^2\) [1709.07374]. In symbolic dynamics, multiplicity of an ergodic measure under a factor code depends on the factor code \(\pi\) and the base measure \(\nu\), and degree or class degree decomposes as a sum of such multiplicities [1501.01751]. In multiplicity estimates for algebraically dependent analytic functions, the dependent case replaces the exponent \(n\) by the transcendence degree \(t_f\) in the optimal order-of-vanishing bound [1211.0639]. These uses concern different mathematical objects and different notions of dependence.

Within dependent linear type theory, however, the term has a precise technical meaning. A dependent multiplicity is the resource demand encoded by `Θ : A → Supply`, and the paper’s central claim is that such demands can be manipulated compositionally, expressed through natural-number-indexed supply powers, and verified by proofs in the supply algebra. In that sense, dependent multiplicities are a quantitative refinement of dependent typing itself: resource use is indexed by values, transported through higher-order structure, and made part of the semantics of the type theory [2507.08759].

Source: https://www.emergentmind.com/topics/dependent-multiplicities