# Is the \`index\` of a \`MemOp\` always a single witness index?

**URL:** https://forum.aztec.network/t/is-the-index-of-a-memop-always-a-single-witness-index/7649
**Category:** Noir
**Created:** [April 4, 2025, 4:53pm UTC](https://forum.aztec.network/t/is-the-index-of-a-memop-always-a-single-witness-index/7649 "2025-04-04T16:53:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![atonable-strobe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.aztec.network/atonable-strobe/32/2425_2.png) [@atonable-strobe](https://forum.aztec.network/u/atonable-strobe)
#### Post date: [April 4, 2025, 4:53pm UTC](https://forum.aztec.network/t/is-the-index-of-a-memop-always-a-single-witness-index/7649/1 "2025-04-04T16:53:15Z")

</div>

The ACVM code allows the `index` field to be an Expression involving of multiple witness indices (see below). However, in all the Noir code that I’ve compiled, the index Expression is always a single witness index. Can this be taken as guaranteed, or should downstream code be written to handle the general case?

```auto
pub struct MemOp<F> {
    /// A constant expression that can be 0 (read) or 1 (write)
    pub operation: Expression<F>,
    /// array index, it must be less than the array length
    pub index: Expression<F>,
    /// the value we are reading, when operation is 0, or the value we write at
    /// the specified index, when operation is 1
    pub value: Expression<F>,
}

```
