11institutetext: Centre for Blockchain Technologies, Department of Computer
Science, University College London 11email<EMAIL_ADDRESS>
http://www.cs.ucl.ac.uk/staff/C.Clack

# Temporal Aspects of Smart Contracts for Financial Derivatives

Christopher D. Clack  Gabriel Vanca

###### Abstract

Implementing smart contracts to automate the performance of high-value over-
the-counter (OTC) financial derivatives is a formidable challenge. Due to the
regulatory framework and the scale of financial risk if a contract were to go
wrong, the performance of these contracts must be enforceable in law and there
is an absolute requirement that the smart contract will be faithful to the
intentions of the parties as expressed in the original legal documentation.
Formal methods provide an attractive route for validation and assurance, and
here we present early results from an investigation of the semantics of
industry-standard legal documentation for OTC derivatives. We explain the need
for a formal representation that combines temporal, deontic and operational
aspects, and focus on the requirements for the temporal aspects as derived
from the legal text. The relevance of this work extends beyond OTC derivatives
and is applicable to understanding the temporal semantics of a wide range of
legal documentation.

###### Keywords:

Smart Contract Distributed Ledger Finance Semantics Temporal

##  1 Introduction

Current research on smart contracts includes a range of use cases, from
straightforward automation of relatively simple and relatively low-value
business processes to the automation of large and complex legal agreements
that have extremely high value and may last for decades. The automation of OTC
derivatives contracts lies at the latter end of that range, and substantial
research and development in this area has been occurring within universities,
investment banks, law firms and financial services trade associations for
several years.

Here we use the term smart legal contract to refer to a legal contract whose
performance is automated on distributed ledger technology, and the term smart
contract code to refer to the code that automates the legal contract [14]. In
some related research the term smart contract refers only to the code, yet
that definition is problematic in this context since the code itself may not
be a legal contract. There are many examples of problems with terminology when
computer scientists, lawyers and banking technologists work together [4] and
we therefore use a portmanteau definition of the term smart contract as
follows [3]:

> A smart contract is an automatable and enforceable agreement. Automatable by
> computer, although some parts may require human input and control.
> Enforceable either by legal enforcement of rights and obligations or via
> tamper-proof execution of computer code.

The above definition contains key elements for automating OTC derivatives:
first, the enforcement of rights and obligations by recourse to a court of law
is essential because of the regulatory framework (and the scale of financial
risk involved); second, the smart contract code may require human input and
control, for example where the code encounters a state that requires human
discretion to decide how to proceed or where it is necessary to pause and
modify or cancel the code due to changes in the law.

There is an absolute requirement that the smart contract will be faithful to
the intentions of the parties as expressed in the original legal
documentation; hence our interest in the use of formal methods to validate the
smart contract code. There is also a requirement that the processes involved
in automating OTC derivatives (including the production of smart contract code
and the validation of that code) align with current standardised workflow in
terms of how the legal documentation is structured and negotiated. The context
of our work is therefore the Smart Contract Templates project [2, 3, 6] which
focuses on alignment with standard practice, including greater standardisation
of smart contract code.

Our aim is to derive a formal semantic representation of the set of documents
that comprise the legal agreement underlying each individual OTC derivatives
transaction. Each transaction will be automated by a separate process (an
instance of the smart contract code). Our initial examination of the
documentation [4, 5] has demonstrated the need for a combined semantic
specification, including at least the temporal, deontic and operational
aspects of the legal agreement. Once this has been achieved, there are two
possible routes for validation: either (i) validation scenarios could be
generated from the formal specification and used during verification and
validation of the smart contract code;111For example, “what if?” scenarios
might posit a sequence of actions by the parties, or possible changes in the
law during running of the code, together with the required outcome. or (ii) a
semantic specification of the smart contract code could be checked against the
semantics of the legal documentation (perhaps achievable automatically, at
least in part).

Here we present early results from our investigation of the temporal semantics
of the legal documentation for OTC derivatives.

This paper aims to be accessible not only to academics but also to
practitioners such as banking techologists, lawyers, and regulators. Although
we present early results from a study of the semantics of legal documentation
for OTC derivatives, our observations have much broader implications for the
use of formal methods in representing the semantics of many types of legal
documentation.

###  1.1 Standardisation of OTC Derivatives Contracts

OTC derivatives are often purchased as a mechanism for risk management so that
the precise form of the purchased derivative will match the purchaser’s
financial exposures. These derivatives contracts can have substantial value,
complexity and longevity,222Derivatives contracts often last 5 years and can
last as long as 30 years. and a firm that purchases a bespoke derivative will
need legal clarity and protection relating to the terms of the agreement.

Negotiating the terms and conditions of bespoke derivatives contracts can
itself be a lengthy and costly process. This complexity and cost can be
improved by increasing standardisation of that process. The International
Swaps and Derivatives Association (ISDA) provides a set of legal templates
that are commonly used as a known basis for negotiation between
counterparties. The primary template is the ISDA Master Agreement, which
covers a range of derivatives from “vanilla” interest rate swaps to complex
options contracts and which can be used for multicurrency and cross-border
transactions.333There are two versions in common use: the 1992 ISDA Master
Agreement and the 2002 ISDA Master Agreement.

The Master Agreement contains standard clauses that are generally non-
contentious. However, there is a need for customised clauses to be added, and
this is achieved using a Schedule template which sets out those areas that are
typically customised (and additional clauses may be added). A Credit Support
Annex might also be added if the bank requires the firm to provide collateral
to reduce its credit risk to the bank.

After these documents have been agreed and signed by the
counterparties,444Derivatives contracts may involve more than two parties.
they constitute a single agreement and the counterparties may enter into one
or more derivatives transactions based on that agreement. Each such
transaction is specified using a written or electronic Confirmation document
setting out the economic terms for that individual transaction, and that
Confirmation document is considered to be part of the overall agreement.555It
may also be possible to attach additional terms and conditions, including
additional credit support, to individual transactions.

###  1.2 Smart Contract Templates

The Smart Contract Templates project [2, 3, 6] addresses the process of
writing, testing and debugging the smart contract code [3] that will perform a
complex OTC derivatives contract in an automated fashion on a suitable
technology platform, and how to align that process with the process of using
the ISDA document set. In this paper such legal agreements are called “smart
OTC derivatives”.

Smart Contract Templates provide standardised smart contract code “templates”
for the ISDA document set (the Master Agreement, Schedule, Credit Suport
Annex). The name “template” indicates that the code will leave some terms as
yet undefined (example values may be inserted for the purposes of testing and
debugging). These templates may be developed and comprehensively verified and
validated in advance, and this might include different versions of the code
designed to run on different technology platforms.

The workflow for Smart Contract Templates matches that for the institutional
workflow as follows:

  * •

A Smart Contract Template will have been developed, tested and debugged in
advance for the standard ISDA Master Agreement and Schedule.666For the rest of
this paper we assume the 2002 ISDA document set.

  * •

When two or more counterparties establish an agreement, they may negotiate
modifications to the Schedule. When the negotiation is complete, a copy will
be made of the existing Smart Contract Template and the smart contract code in
this copy will be modified — many of the undefined terms in the template will
be bound to appropriate values (e.g. the counterparty details), and depending
on the extent of the modifications to the legal text, this may require a more
or less substantial rewriting of the smart contract code. The overall
structure of the code should remain the same, but the code is likely to
require further verification and validation. This process should benefit from
the fact that the previous template had already been verified and validated.

The resulting modified smart contract code should accurately reflect the
intentions of the parties under the agreement, but it is not yet ready to run
since the parameters for individual transactions are not yet known. Hence,
this is still a “template” — here we call it the “agreement template”

  * •

For each new transaction under this agreement there will be a written or
electronic Confirmation document. In the simplest case this will do no more
than provide value bindings for variables (the “transaction parameters”) that
are currently undefined in the agreement template.

  * •

A copy of the agreement template is made for each new transaction, and the
transaction parameters for a transaction are passed as arguments to the code.
Additional parameters might also be passed, for example a unique identifier
that can be used to retrieve the original signed legal documents in the case
of dispute. The final version of the smart contract code is then instantiated
to run on a distributed ledger platform.

##  2 Validating Smart Contract Code for Smart OTC Derivatives

Many observers have pointed to the need for verification and validation of
smart contract code[1, 7, 9, 11]. In particular, [11] highlights five
categories of verification and validation for smart contracts. Here we focus
on just one of those categories, which we find to be especially problematic —
Category 2 “Does the computer program correctly encode the written natural
language contract?”

Validation may be substantially more difficult than verification. Whereas
verification of smart contract code may aim to eliminate error states when the
code is run, validation of smart contract code aims to align the semantics of
the legal documentation with the semantics of the code (e.g. does it correctly
track the rights and obligations of parties, the discharging of obligations,
the enforcement of prohibitions, the adherence to temporal aspects, and so
on). Understanding the semantics of the legal documentation is non-trivial,
since it requires specialist knowledge in the two fields of banking and law;
understanding the semantics of the code is similarly non-trivial, since it
requires specialist knowledge in computer science. The use of specialist
terminology (including cases where common words may have specialist meanings)
and implied (unspoken) knowledge has already led to misunderstandings between
experts and effective validation may require investment into the training of
new staff as hybrid experts in the three areas of banking, law and computer
science [4, 5].

We have previously stated that a formal semantic specification of the legal
documentation must include at least the temporal, deontic and operational
aspects of that documentation. Yet that formal specification must itself be
validated to determine whether it correctly captures the meaning of the
agreement. This will require an expert in law (for example to disambiguate
between temporal and non-temporal uses of the phrases such as “will”,
“pursuant to”, “after giving effect to” and “after taking into account”, or to
distinguish between discrete and continuous periods of time as explained
below), and also an expert in formal logic. This validation of the
specification will be facilitated if the formal specification is similar in
structure to the legal text. Three key issues arise:

  1. 1.

The separability problem — the temporal, deontic and operational logics are
closely intertwined and very difficult to separate, as explained in [4] and
demonstrated further in Section 2.2.

  2. 2.

The isomorphism problem — the structure of the semantic specification may be
substantially different to the structure of the legal documentation, making it
difficult for a specialist in law to understand and verify the
semantics.777For example, a single legal clause may be represented by more
than one expression in the formal semantics (perhaps distant from each other),
and vice versa two or more legal clauses might be represented by a single
expression in the formal semantics.

  3. 3.

The canonical form problem — there may be many different ways to structure the
semantic specification for a given legal agreement; specifically there may be
no unique normal form (“canonical form”), and this makes it difficult to
compare two specifications to see if they are the same.888The existence of a
unique canonical form (computable in reasonable time) will depend on the logic
employed, and the properties of its operators. Where many logics are combined
the existence of a unique canonical form may become problematic.

To achieve the aim of using formal methods to validate smart contract code for
a Smart OTC Derivative transaction it will be necessary to create a formal
represention of the whole agreement, including the Master Agreement, the
Schedule and the Confirmation. The Schedule and Confirmation may include
freshly drafted provisions; thus, it will be necessary not only to represent
the legal phrases that exist in the ISDA document set but also to anticipate
provisions and constuctions that might appear in freshly drafted legal text.

As a first step, we focus on the 2002 ISDA Master Agreement. To simplify
further, we start by exploring just the temporal aspects of the ISDA Master
Agreement (though, due to the separability problem, we expect also to touch on
deontic and operational aspects), resulting in the following structured
observations. These are then summarised in Section 3.2 as a set of
requirements to guide the selection or design of a suitable temporal logic.

###  2.1 Continuous and Discrete Time

In the 2002 ISDA Master Agreement time is sometimes a continuous quantity, and
sometimes discrete.

####  2.1.1 Continuous Time

is a time interval typically used for prohibitions (e.g. a party is prohibited
from doing something “at any time”), normally expressed as a range with a
start and an end date, and where such a range is not expressed it may be
possible to infer a range from the textual context — e.g. the term of the
Agreement. Typical relevent phrases in the legal text are:

  * •

“with effect from” may specify the start date of a continuous time range.

  * •

“at all times until X” specifies a continuous range with end date X.

  * •

“so long as” specifies a continuous range that persists for the duration of
some other defined time span.999Which might be the duration of an obligation —
see Clause 4.

  * •

“to maintain in full force and effect all X” refers to a continuous-time
obligation (which might alternatively be modelled as a continuous-time
prohibition against doing anything that would negate any X).

  * •

“in the future” generally refers to a time period encompassing all times after
the current (according to context, the end date might be the end of the
agreement or transaction, or there may be no end date)

  * •

“will survive” generally indicates a continuous time period that continues
after the end of the agreement or transaction (according to context).

####  2.1.2 Discrete Time

is by contrast typically measured in days and can be expressed as a single
value, an ordered set of values, or a bag of alternative values:

##### A Single Discrete Time Value

is a date representing a day (which might be before the effective date of the
agreement, during the term of the agreement, or after the termination of the
agreement). Dates may be named, may be referenced via name or context (e.g.
“on that date”, “on such date”, “the date so designated”, “the date
specified”, “the time specified”, “the date determined under Clause X”), may
be compared for time ordering (e.g. “prior to”, “the same day”, “after” and
“following”), may be counted (e.g. “X days”), that count may be given a lower
or upper bound (e.g. “at least X days”, “no more than Y days”), a date may be
defined in relation to another date (e.g. “at least 5 days after X”), a date
may be subtracted from another date to give a number of days, and a number of
days may be added to or subtracted from a date to give another date.

A named date may have a value that is provided dynamically during performance
of the agreement. For example, the Early Termination Date may be “designated”
during performance, and a date that is “otherwise agreed” permits a date to be
specifed by the parties in some other unspecified way which may be at the
start of or during performance of a transaction. A date value can be tested to
determine whether or not it was set in the legal text (e.g. using the phrases
“is specified in” and “is not specified in”), and whether it has been set
during performance of the contract (“has been designated”). Where a designated
value replaces a previous value, it is necessary to retain previous values and
the reason(s) for the designation(s) in order to support contractual phrases
such as “where an earlier Early Termination Date has been designated”, “Upon
the occurrence or effective designation of”, and “in the event of an Early
Termination Date which is designated as the result of a Termination Event”.

A discrete time value may have a number of associated properties. For example,
the property “General Business Day” refers to any day on which commercial
banks are open for business. The phrase “the first General Business Day after
X” therefore refers to the earliest date Y such that Y occurs after X and
where Y has the associated property “General Business Day”.101010The property
“General Business Day” is described in a generic way so that it could
potentially apply to an infinite number of dates, but a property could also be
described in a way that it could apply to only a finite number of dates.
Another example property could be “Designated Date” or “Designated Date Due to
a Termination Event” (since the text may state that a provision holds if a
date has such a property). The author is not aware of any specific discipline
relating to the setting and testing of properties of time values within legal
text, yet within a formal specification this would be an obvious area for
checking correctness (e.g. to ensure that if a property is checked it should
be set at some other point in the agreement).

In the legal text, a specified date “has occurred” if the current date (during
performance of the agreement) is the same day as or after the specified date.
By contrast, the legal phrase “there is” must be interpreted in context;
sometimes it refers to the existence of a thing (which is not a temporal
property) and at other times it may refer to the current time and may for
example establish a reference date for a condition.

##### A Set of Discrete Time Values

is a time-ordered set of discrete dates with a start date and an end date,
without duplicates:

  * •

A set may be named and may be specified with certain days missing from the set
(e.g. because they lack a given associated property).

  * •

A set may be defined in relation to a date (e.g. “all days within 5 days after
X”).

  * •

A set of date values may be specified using a constrained universal quantifier
(e.g. “all days after event X and before event Y”).

  * •

A set of specific date values may be specified using a formula representing
repeated dates (e.g. “every first Monday of every month”).

  * •

A set of date values may start at the end date of an event (see Section 2.2)
and continue until Y days later (e.g. “following event X, party A may
terminate the agreement with no more than Y days notice”).

  * •

“with effect from” may (according to context) specify the start date of a
discrete time period (i.e. of a set of discrete time values).

In the legal text, many phrases are used to introduce a set of discrete time
values. For example:

  * •

“notice requirement”, “applicable grace period” and “applicable waiting
period” generally refer to a span of days (a set of discrete time values)
where the start and end dates are normally expressly stated.

  * •

“on any day” may indicate a set of discrete dates (especially where it is
followed by a qualification of the start or end dates, or both), following
which each such day may be referred to using the phrase “on that day” and
certain days may be excluded from consideration using a phrase such as “(in
each case, other than $\ldots$)”.

  * •

“next succeeding Scheduled Settlement Date” refers to a set of possible dates
(Scheduled Settlement Dates), and selects that date which immediately follows
the current date.

  * •

“the time or times specified” is a reference either to an individual date
(which could be drawn from a representative bag of date values — see below) or
more commonly to a set of relevant specified dates.

##### A Bag of Alternative Discrete Time Values

is a collection of alternative dates, which may contain duplicates, and which
arises from phrases that permit a thing to occur on more than one date where
two or more of those dates (perhaps specified relative to different events)
may be the same. For example, consider the phrase “on or as soon as reasonably
practicable following X”, which permits an action to occur on date “X” or on
another date soon after “X” (see also Section 2.2 below for a discussion of
reasonableness).

A bag of alternative discrete time values represents a single date, but the
value of that date is generally only determined dynamically when the contract
is performed. This introduces some complexity, since (i) prior to (or after)
this date actually means prior to (or after) the date actually chosen rather
than prior to (or after) the earliest (or latest) of the alternative dates,
and (ii) it is not yet clear whether it might be possible to constuct nested
phrases ((prior to (X or Y)) OR (following (P or Q))) and so on. This needs
further attention.

###  2.2 Temporal Aspects of Events, Obligations and Rights

Events (an operational aspect of the agreement), obligations (a deontic aspect
of the agreement) and rights, powers or privileges (also deontic aspects) all
have associated temporal properties. Thus, it is extremely difficult to
separate temporal aspects from deontic and operational aspects (this is the
aforementioned separability problem).

####  2.2.1 Events

each have a start date and an end date (to support phrases such as “has
occurred”, “is continuing”, and “has ceased”, which can also appear in logical
conjunction such as “has occurred and is continuing”). The concept of an event
can be used quite generally and may include for example (i) actions, such as
the giving of notices; (ii) external events, such as the obtaining of
judgement on an aspect of the agreement; and (iii) contract states, such as a
party being in default, or a failure (e.g. to pay or to deliver). Thus, events
may be specified within the agreement, or may be created during the modelling
process in order to construct the formal specification.

Any action that has an associated time could be an event, including passive
actions such as becoming aware of a fact. For example the phrases “upon
becoming aware of” and “when the obligation is ascertained” indicate that
becoming aware and ascertaining are events with an associated time. The phrase
“the date of the information” may according to context refer to the date of
sending or receiving information, both of which are actions.111111Conceivably
this phrase might be used to refer to a date associated with a document, which
raises the further issue of associating objects with temporal values.

Defined events may or may not occur during the performance of the agreement.
Events also have other associated properties — e.g. “an event of default” —
and there may be a total or partial ordering relationship applicable to events
(though this is outside the scope of this paper).

In the legal text, a large number of phrases are used to link temporal
properties with events. For example:

  * •

“as of the time immediately preceding” or “immediately before” an event X
normally means the day before the start date of event X.

  * •

“immediately” normally means either the same day as, or the next day
following, the occurrence of an event.

  * •

If an event X “occurs prior to” event Y this is generally taken to mean that
the end date of X is prior to the start date of Y.

  * •

“in such event” generally refers to the immediately preceding named event.

  * •

“the occurrence of”, “the date as of” and “at such time of being” each refers
to an event and may according to context refer to the start date of an event
or end date of an event or to the existence of a start date or end date for an
event, and must be determined precisely from context.

  * •

“at such time of being” is the time at which an event occurs.

  * •

“upon reasonable demand” specifies the time of an event (a demand) with the
proviso that the demand must be reasonable (which may have a temporal aspect
such as occurring within or at a reasonable time).

  * •

A “potential event of X” is an event which might become an event with property
X (e.g. default) due to further events or the lapse of time.

  * •

An event “would occur” as a result of some action if the action (e.g.
performing an obligation, or entering into an agreement) would necessarily
lead to the occurrence of the event. This may be difficult to model, e.g.
where the action or event is external to the agreement and in one possible
future.121212In the context of the ISDA Master Agreement it might sometimes be
preferable to phrase this as a continuous prohibition to engage in an event
that generates a Potential Event of Default or Potential Termination Event.
Similar problems occur with phrases such as “would have been” or “would have
been $\ldots$ if it were not for $\ldots$”.

  * •

“has taken action X” could be represented by modelling that action as an event
(thus it would have a start date and an end date, which are set dynamically
during performance of the contract, and which may be the same). If the end
date of that event is before the current date (or other reference time
according to context) then “has taken action X” would be true.

  * •

“for so long as that is the case” and “for so long as the relevant event or
circumstance continues to exist” may both refer to an event, especially where
a circumstance or the duration of a conditional can be modelled as an event
(for example, given a phrase such as “for so long as the party is unable to
receive delivery” would imply that being unable to receive deliery should be
modelled as an event with start and end dates).

Applicable law and applicable corporate policies might also be modelled as
events in order to support phrases such as “any applicable law $\ldots$ then
in effect”, ”party’s policies in effect at that time” — however, since there
might be a very large number of such laws and policies, it might be better to
replace such a provision with a call for human input to establish whether the
stated condition (relating to law or policy) holds.

It is also important to note that sometimes the word “event” is not intended
to refer to a thing that happens during performance of the contract, but
rather to the specification of the contract itself and refers instead to the
over-riding of one provision by another. For example, the phrase “in the event
of any inconsistency” is generally used to refer to an inconsistency between
provisions of the agreement rather than a date during the performance of that
agreement, and is followed by an indication of which provision should prevail
over the other.

Less straightforward references to the temporal aspects of actions and events
include the adverbs “timely” and “promptly”. These phrases rely on a court of
law to apply a post-hoc test of reasonableness. Similar phrases include “as
soon as is reasonably practicable” and “as soon as practicable”. For the
purposes of validation, these adverbial phrases could be set to a global value
such as “within 1 day” or “within 2 Local Business Days” (i.e. a set of
discrete time values) during simulation of contract performance, to determine
the extent to which the agreement might be sensitive to variations in such
ambiguous time periods.

####  2.2.2 Obligations

have a start date when the obligation is incurred, a due date, and a
discharged date (if the discharged date is after the due date a sanction may
be applied). They also have (i) an optional end date at which point the
obligation is automatically discharged if not previously discharged, and (ii)
an ordered set of zero or more “revised due date(s)” (used when an obligation
has been deferred or accelerated). It is noted that the triggering of an
obligation might also itself constitute an event.

The specification of repeated obligations may require an action to occur “at
least X times”, “no more than Y times” or “at least X times but no more than Y
times” within a certain time interval. Whilst the time interval itself can be
expressed as a set, the specification of repeated occurrences is not really a
temporal matter. It is an example of how an obligation (deontic aspect) can be
linked to repeated actions (operational aspect) within a defined time interval
(temporal aspect).

In the legal text, example phrases that link temporal properties with
obligations include:

  * •

“the due date” and “when due” both refer to the due date of an obligation.

  * •

“the last payment date” or “the last exchange date” may according to context
refer to either (i) the most recent such discharged date (e.g. the date of the
most recently made payment), or (ii) from a set of due dates of such
obligations to pay or exchange, the date that is latest.

  * •

“satisfying a liability” is generally a synonym for “discharging an
obligation”. A party “has satisfied” some obligation (e.g. either to another
party or to pay tax to an external body) if the current time is after the time
that such obligation was discharged. Note that obligations to external bodies
may not be precisley expressed in the legal text and may need to be inferred
from a provision that refers to the discharge of such an obligation.

  * •

“will be deferred to, and will not be due until” means the dynamic update of
an obligation so that its revised due date is set to the stated value.

####  2.2.3 Rights, Powers and Privileges

may apply throughout continuous time, or might become activated by the
occurrence of a date or an event. On the occurrence of such a date or event it
will be necessary to record that the associated right, power or privilege has
been activated, and then also to record the date at which such right, power or
privilege was exercised in relation to that date or event. This supports
phrases that refer to a delay in exercising a right, power or privilege. Since
a triggering event might occur many times, the activation time and exercise
time should be recorded in each case.

##  3 Temporal Representation

Hvitved [8] provides a review of semantic techniques to support formal
representation of legal agreements. Our aim is to utilize a formal
representation that can combine at least the deontic, temporal and operational
aspects of standardised OTC derivatives contracts, and of those technques
surveyed by Hvitved the most attractive candidate is the technique developed
by Lee [10]. However Lee’s representation of temporal aspects needs to be
expanded to cover the complexity demonstrated above. Here we briefly discuss
Lee’s temporal framework and then set out an intial set of requirements for
extending the framework.

###  3.1 Temporal logic in Lee’s framework

The Rescher and Urquhart temporal logic system [13] is the basis for
representing temporal aspects in Lee’s framework. Lee calls this the “RU
calculus” and explores and extends the use of this system. Pithadia [12]
provides an initial critical assessment of Lee’s framework.

####  3.1.1 The Rescher and Urquhart system

is based on the temporal operator $R_{t}\Phi$ that denotes $\Phi$ (a formula
in conventional first order logic with identity) being realized at time $t$.
Lee rehearses the axioms for $R$, the total ordering relational operator $U$,
a function $f::Time\rightarrow{\rm I\\!R}$, and temporal addition $\oplus$, as
follows:

$R_{t}(\neg\Phi)\leftrightarrow\neg R_{t}\Phi$
$R_{t}(\Phi\&\Psi)\leftrightarrow R_{t}\Phi\&R_{t}\Psi$
$R_{t^{\prime}}(\forall t\Phi)\leftrightarrow\forall tR_{t^{\prime}}\Phi$
$U_{tt^{\prime}}\;\;\textit{indicates that time t precedes time t'}$
$f(t\oplus t^{\prime})=f(t)+f(t^{\prime})$

Lee modifies the RU calculus by introducing the day as the basic unit of time
and by introducing the concept of time intervals where $SPAN(d,d^{\prime})$
defines a time span from the beginning of date $d$ to the end of date
$d^{\prime}$, $BEG(d)$ gives the beginning date of a time interval, and
$END(d)$ gives the end date of a time interval. Two operations are introduced
on time intervals (using Lee’s notation, where $d$ is a time interval):

$RD_{d}\Phi\leftrightarrow\exists t(t\in d)\&R_{t}\Phi$
$RT_{d}\Phi\leftrightarrow\forall t(t\in d)\Longrightarrow R_{t}\Phi$

Thus $RD_{d}\Phi$ indicates that $\Phi$ is realized at least once during the
time interval $d$ and $RT_{d}\Phi$ indicates that $\Phi$ is realized
throughout time interval $d$. A further operator $RB_{D}\Phi$ indicates that
$\Phi$ is realized before day $D$ and is defined in terms of the $RD$ operator
using an arbitrary undefined day in the past, which Lee denotes as “$\\_$” and
we interpret as a “bottom” element “$\bot$”:

$RB_{D}\Phi=RD_{SPAN(\bot,D)}\Phi$

Lee further observes that a calendar of dates is an interval scale with no
obvious value of “zero” and therefore addition is more complex than
represented in the RU calculus; he redefines the operator $\oplus$ to take a
date $d$ and a number of days $n$ and return the date that is $n$ days later
than $d$, as follows (where $D$ is the unit “days”):

$d\oplus nD$

####  3.1.2 Lee’s temporal framework

has a number of limitations in the context of smart OTC derivatives, In
overview, the most obvious shortcomings are (i) the inability to specify or
reason about continuous time; (ii) the inability to specify dates with
different properties (such as “Business Day”); and (iii) the inability to
specify concisely a set of times with subtle membership rules (such as “the
first Friday of every month”). Lee’s time intervals provide an implementation
of sets (and possibly bags, depending on context) but it is very difficult to
specify a time interval with specific dates missing. Whilst it is possible to
use a combination of RU calculus operators and Lee’s operators to represent
phrases such as “action X occurs Y days after event Z” (which could for
example be represented as $R_{t}Z\&(R_{t\oplus Y}X)$), it is difficult to
express a provision such as “payments made at a weekend will be processed on
the first Business Day of the following week”.

Lee’s temporal framework could be modified and extended, or could be replaced.
However, it is not sufficient to make such a decision based only on an
analysis of the temporal aspects. The great advantage of Lee’s framework is
the way that it combines deontic, operational and temporal aspects. We
therefore eschew construction of a formal temporal logic until analysis of the
deontic and operational aspects of the ISDA Master Agreement has been
conducted. Instead, we provide an initial outline of requirements in the
following section.

###  3.2 Initial Requirements for the Temporal Aspects of a Semantic Framework

Given the separability problem relating to the very close coupling between
temporal, deontic and operational aspects of legal documents, it is unlikely
that a separate temporal logic would be appropriate for formal modelling of
smart OTC derivatives. In most cases time is a property of deontic and
operational aspects (the current time is a notable exception to this
observation). However, we can summarise our investigation of the ISDA Master
Agreement by setting out some guideline requirements for the expressibility of
the temporal parts of the combined logic, as follows:

####  3.2.1 Requirements for Continuous Time Intervals.

It must be possible to express intervals of continuous time with a start and
end point denoted by a discrete time value. In general, we would wish to
support the following operations:

  * •

create a new continuous time interval with discrete time values for the start
and end points (if the end-points are defined to be outside the interval, this
would give a straightforward representation of an “empty” interval as being
one where the start and end points are the same, and it would not be an error
to request the start or end point of an empty interval);

  * •

bind a name to an interval;

  * •

create an aggregate collection of intervals (this is one way to implement a
union of non-overlapping intervals, since we cannot have an interval result
containing gaps);

  * •

get the start or end point of an interval;

  * •

get the intersection of two intervals (perhaps returning an “empty” interval);

  * •

test whether a discrete time value is before the start of such an interval;
and

  * •

test whether a discrete time value is after the end of such and interval.

Although in some legal prose a period of continuous time might have a start
point that is infinitely in the past (which we denote $T_{-\infty}$), or an
end point that is infinitely in the future (which we denote $T_{\infty}$), it
is not yet clear whether this is essential or merely lazy drafting. It is an
open question as to whether the temporal logic should support such “extreme”
values for start and end points of continuous time intervals (nor whether they
might be useful for other purposes).

####  3.2.2 Requirements for Single Discrete Time Values.

It must be possible to express single discrete time values, to associate
properties with a single discrete time value, to keep a history of updates to
the time value that is bound to a name, to calculate differences between two
dates as a number of days, and to create and use date expressions (including
the use of days as relative offset values).

In general, we would wish to support the following operations:

  * •

create a new single discrete time value;

  * •

provide the special single discrete time value that is the current time;

  * •

bind a name to a historical list of single discrete time values (and with each
such value record when it was bound, who by, why, whether it was bound in the
text or during performance, and perhaps some further properties);

  * •

perhaps provide the extreme values $T_{-\infty}$ and $T_{\infty}$ mentioned
above and to test whether a single discrete time value is one of these two
extreme values;

  * •

increment a discrete time value by one day;

  * •

decrement a discrete time value by one day;

  * •

get the difference in days between two discrete time values (though this
deserves more attention, since we may need to calculate the number of days
with a specified property - e.g. Business Days);

  * •

associate a set of properties with a discrete time value and test a discrete
time value to see if it has a stated property;

  * •

apply a predicate to a discrete time value to see if it passes or fails a
test;

  * •

provide equality and relational operators to use on two dates;

  * •

create and use date expressions combining any of the above operations.

####  3.2.3 Requirements for Sets or Bags of Discrete Time Values.

It must be possible to express a set or bag of discrete time values where a
set or bag has a start and end date and a (possibly discontinuous) collection
of valid dates between the start and end dates. It must also be possible to
define the members of the set or bag using a generator expression. As with
continuous time intervals, if the start and end dates are defined to be
outside the set or bag this would give a straightforward representation of an
“empty” set or bag as being one where the start and end points are the same,
and it would not be an error to request the start or end point of an empty set
or bag.

In general, we would wish to support the following operations:

  * •

create a new set or bag of discrete time values;

  * •

get the start date or end date of a set or bag;

  * •

test whether a given date is a member of the set or bag;

  * •

get the intersection of two sets or bags, returning a set or bag respectively
(which might be empty);

  * •

get the union of two sets or bags, returning a set or bag respectively;

  * •

test whether two sets or two bags are equal;

  * •

bind a name to a set or bag;

  * •

apply a filter to a set or bag, to produce a set or bag (respectively) that
may be smaller or equal in size;

###  3.3 Temporal Requirements Relating to Deontic and Operational Aspects.

Each event must have a start date and an end date. In the legal text, it is
possible that these dates might be specified in relation to some other dates
or as a set or bag of possible dates. However, once the event has started any
previous “possible” start time must be updated with the actual start time (and
similarly for the end time). Thus when using a temporal logic operator such as
$R_{t}\textit{E}$ (where E is an event) it is necessary to disambiguate
between the “realisation” of the possible and actual start of the event E and
the “realisation” of the possible and actual end of that event.

As explained in Section 2.2.2, each obligation has a start date, an optional
end date, a due date, and a discharged date. Thus when using a temporal logic
operator such as $R_{t}\Phi$ (where $\Phi$ is an obligation) it is necessary
to disambiguate between the realisation of the incurring of the obligation,
the passing of the end date, the passing of the due date without discharge, or
the realisation of the discharge of the obligation. Similarly, rights, powers
and privileges have activation times and (perhaps multiple) exercise times and
these must be disambiguated.

Where deontic or operational aspects may be repeated a set, minimum, or
maximum number of times, there must be a mechanism to express these
repetitions.

##  4 Summary and Conclusion

The legal language used to draft standardised contracts for OTC derivatives is
rich and complex. Yet it is essential to have a full and formal understanding
of the semantics of the legal documentation in order to validate the
associated smart contract code. Here we have presented initial results from an
analysis of the temporal language used in the 2002 ISDA Master Agreement for
OTC derivatives.

When a formal semantic description of the legal documentation is constructed,
it must specify not only the temporal semantics but also the semantics of (at
least) the deontic and operational aspects. The separability problem — the
fact that the temporal, deontic and operational logics are closely interwined
— requires a combined logical framework. The results of an analysis of the
temporal language used in legal documentation are therefore presented as a set
of initial requirements. More work is required to analyse the deontic and
operational language, each of which will lead to its own set of requirements.
Our final aim is to combine these into a single semantic framework. This is a
formidable challenge, yet we envisage that such a framework will be applicable
not only to the automation of OTC derivatives but also to the formal
understanding of a wide range of legal contracts and statutes.

###  4.1 Acknowledgements.

The authors are grateful to UCL students Justin Jude and Mengyang Wu who
assisted this work by reviewing logic frameworks and providing supporting
tools.

## References

  * [1] Al Khalil, F., Ceci, M., O Brien, L., Butler, T.: A solution for the problems of translation and transparency in smart contracts. Tech. rep., Government Risk and Compliance Technology Centre (2017), at: http://www.grctc.com/wp-content/uploads/2017/06/GRCTC-Smart-Contracts-White-Paper-2017.pdf (accessed 31st August, 2017)
  * [2] Braine, L.: Barclays’ Smart Contract Templates (2016), Barclays London Accelerator, https://vimeo.com/168844103/ and http://www.ibtimes.co.uk/barclays-smart-contract-templates-heralds-first-ever-public-demo-r3s-corda-platform-1555329/
  * [3] C. D. Clack, V. A. Bakshi, L. Braine: Smart Contract Templates: foundations, design landscape and research directions. The Computing Research Repository (CoRR) abs/1608.00771 (2016), also at arXiv.org: http://arxiv.org/abs/1608.00771/
  * [4] Clack, C.D.: Smart Contract Templates: The Semantics of Smart Legal Agreements. In: The Third R3 Smart Contract Templates Summit (2017), at: https://www.r3.com/slides/third-smart-contract-templates-summit-slides.pdf (accessed 29 March 2018)
  * [5] Clack, C.: Smart Contract Templates: The Semantics of Smart Legal Agreements. Journal of Digital Banking 2(4), 1–15 (2018)
  * [6] Clack, C.D., Bakshi, V.A., Braine, L.: Smart Contract Templates: essential requirements and design options (2016), at arXiv.org: https://arxiv.org/abs/1612.04496/
  * [7] Harley, B.: Are Smart Contracts Contracts? Tech. rep., Clifford Chance (2017), at: https://www.cliffordchance.com/briefings/2017/08/are_smart_contractscontracts.html (accessed 31st August 2017)
  * [8] Hvitved, T.: Contract Formalisation and Modular Implementation of Domain-Specific Languages. Ph.D. thesis, Department of Computer Science, University of Copenhagen (2012), http://www.diku.dk/hjemmesider/ansatte/hvitved/publications/hvitved12phd.pdf
  * [9] ISDA and Linklaters: Smart Contracts and Distributed Ledger — A Legal Perspective (2017), at: http://www2.isda.org/attachment/OTU3MQ==/Smart Contracts and Distributed Ledger A Legal Perspective.pdf (accessed 31st August 2017)
  * [10] Lee, R.M.: A logic model for electronic contracting. Decision support systems 4, 27–44 (1988)
  * [11] Magazzeni, D., McBurney, P., Nash, W.: Validation and verification of smart contracts: a research agenda. IEEE Computer Journal 50(9), 50–57 (2017), special Issue on Blockchain Technology for Finance
  * [12] Pithadia, H.J.: Capturing Language Semantics of Smart Contracts. Master’s thesis, Department of Computer Science, UCL (2016)
  * [13] Rescher, N., Urquhart, A.: Temporal logic. Springer Verlag (1971)
  * [14] Stark, J.: Making sense of blockchain smart contracts (2016), att: http://www.coindesk.com/makingsense-smart-contracts/ (accessed 20th June, 2016)


# Refined sheaf counting on local $K3$ surfaces

Richard P. Thomas

###### Abstract.

We compute all refined sheaf counting invariants —Vafa-Witten, reduced DT,
stable pairs and Gopakumar-Vafa — for all classes on local $K3$ surfaces.
Along the way we develop rank 0 Vafa-Witten theory on $K3$ surfaces.

An important feature of the calculation is that the “instanton contribution”—
of sheaves supported scheme theoretically on $S$ — to any of the invariants
depends only on the square of the class, not its divisibility.

## Introduction

We study the refined Vafa-Witten invariants
$\mathsf{VW}(t)\in\mathbb{Q}[t^{\pm 1/2}]$ of [Th] on a polarised $K3$ surface
$(S,\mathcal{O}_{S}(1))$. Equivalently — via the spectral construction
relating Vafa-Witten Higgs pairs on $S$ to compactly supported sheaves on the
local $K3$ surface $X=S\times\mathbb{C}$ [TT1] — these are the product of

$\frac{t^{1/2}}{(t-1)}\,,\ \text{ where $t$ is the standard weight 1
representation of $\mathbb{C}^{*}$,}$

and the _Nekrasov-Okounkov-twisted 111Defined by tensoring the virtual
structure sheaf of the moduli space $\mathcal{M}$ by
$K_{\operatorname{vir}}^{1/2}$ [NO]. $\mathbb{C}^{*}$-equivariant
$K$-theoretic reduced DT invariants_ counting _compactly supported sheaves_ on
$X$.

######  Theorem 1.

[Th, Conjecture 5.43] is true: for a Mukai vector $v\in H^{*}(S,\mathbb{Z})$,

$\mathsf{VW}_{v}(t)\ =\
\sum_{r|v}\frac{t^{\,v^{2}/2r-r}\chi_{-t^{r}}(\operatorname{Hilb}^{1-v^{2}/2r^{2}\\!}S)}{[r]_{t}^{2}}\,.$

Here $[r]_{t}$ is the quantum integer $(t^{r/2}-t^{-r/2})/(t^{1/2}-t^{-1/2})$
and the Hirzebruch genera $\chi_{-t}(\operatorname{Hilb}^{d}S)$ are, by
results of Göttsche-Soegel [GS], the coefficients of the unique Jacobi cusp
form of index 10 and weight 1,

(0.1) $\sum_{d=0}^{\infty}t^{-d}\chi_{-t}(\operatorname{Hilb}^{d}S)\hskip
0.6ptq^{d-1}\ =\
\frac{1}{q}\prod_{d=1}^{\infty}\frac{1}{(1-q^{d})^{20}(1-tq^{d})^{2}(1-t^{-1}q^{d})^{2}}\,.$

Theorem 1 is standard when the Mukai vector $v$ is primitive, so that any
$\mathbb{C}^{*}$-invariant compactly supported semistable sheaf on $X$ is the
push forward of a stable sheaf on $S$, for a generic choice of the
polarisation $\mathcal{O}_{S}(1)$. Then the sum collapses to
$t^{-d}\chi_{-t}(\operatorname{Hilb}^{d}S)$ where $v^{2}=2-2d$. But for
general $v$ it seems a minor miracle. It was conjectured in [Th, Conjecture
5.43] and even claimed in [Th, Theorem 5.44] when $v$ a prime multiple of a
primitive class. Martijn Kool pointed out a gap in its proof 222There was
basically no proof. which Theorem 1 plugs. It also proves [GK, Conjecture 4.6]
and the $K$-theoretic $SU(r)/PSU(r)$ S-duality of [JK, Equation 1] for prime
rank $r$ on the $K3$ surface $S$.

We will see Theorem 1 is basically equivalent to (refinements of) a number of
other remarkable results about curve and sheaf counting invariants on $K3$
surfaces depending only on the square of the curve class, _not its
divisibility_ :333An example of a more difficult conjecture of this sort is
[OP, Conjecture C2], proved in some cases in divisibility 2 in [BB] but
otherwise still open.

  * •

the stable pair invariants of $S$, computed in [KT2],

  * •

the reduced Gopakumar-Vafa invariants of $X$, computed in [PT3],

  * •

the DT invariants counting semistable dimension $1$ sheaves on $X$ (the
“$\chi$-independence conjecture” of Joyce and Toda) computed in [MT].

Specialising Theorem 1 at $t^{1/2}=1$ recovers the formulae of [MT, To1] for
the numerical invariants of local $K3$ surfaces. Ultimately the proof here is
simpler due to progress in wall crossing technology. Because [MT] was
underpinned by the Joyce-Song wall crossing formula used in [To1, To2] the
computations had to go via the _compact_ Calabi-Yau 3-fold $S\times E$, with
$E$ an elliptic curve. Then $E$ had to be degenerated to a rational elliptic
curve and normalised to $\mathbb{P}^{1}$, to which $\mathbb{C}^{*}$
localisation could be applied. Here we use the $K$-theoretic wall crossing
formula of Liu and Kuhn-Liu-Thimm [Liu, KLT] which, for local $K3$ surfaces,
has two simplifying advantages:

  * •

it applies in non-compact and equivariant settings, so we can work directly on
$X=S\times\mathbb{C}$, and

  * •

it uses virtual cycles (in fact virtual structure sheaves) instead of weighted
Euler characteristics, so nonvanishing $H^{2}(\mathcal{O}_{S})$ terms in the
obstruction theory for sheaves on $X$ lead to most terms in the wall crossing
formula vanishing.

Georg Oberdieck has derived related results by similar methods for local
Enriques surfaces [Ob3].

### Plan

Since refined Vafa-Witten theory on $S$ is only defined in positive rank in
[Th] we develop the rank 0 theory in Section 1. (As in [Th] we use Joyce-Song
pairs to handle strictly semistable sheaves.) Later, in Section 3, this allows
us to use autoequivalences of the derived category of $S$ to turn any sheaf
counting problem into one counting _dimension 1 sheaves_.

In Section 2 we explain (and slightly extend) a vanishing theorem and multiple
cover formula from [Th, PT3]. This reduces the computation to one that is
scheme theoretically supported on the zero section $S\subset X$. Some wall
crossing analysis in Section 3 changes it from a computation with Joyce-Song
pairs of dimension 1 sheaves to one with _stable pairs_ [PT1].

The upshot is that it is enough to compute all refined reduced stable pair
invariants of $S$. These have the advantage (over Joyce-Song pairs) that their
moduli space is naturally cut out of a smooth ambient space by a section of a
vector bundle [KT1], making direct calculation with the virtual cycle
possible. Indeed all the pieces for this computation were already in the
literature, as we review in Section 4. Results of [KT2] show the computation
is blind to the divisibility of the class we are working with. Thus we can
work with primitive irreducible classes, quickly reducing the computation to a
celebrated calculation of Kawai-Yoshioka [KY]. The final answer gives all
refined stable pairs invariants in equations (3.11) and (4.4):

$P_{\beta,\chi}(t)\ =\
\sum_{d|(\beta,\chi)}\frac{(-1)^{\chi-\chi/d}}{[d]_{t}}P^{\,h_{d}}_{\frac{\chi}{d}}(t^{d}),$

where $2h_{d}-2=\beta^{2}/d^{2}$ and the $P^{h}_{\chi}(t)$ are determined by
the product formula

$\big{(}q^{-1}+[2]_{t}+q\big{)}\ \sum_{h=0}^{\infty}\
\sum_{\chi=1-h}^{\infty}P^{h}_{\chi}(t)\,u^{h}q^{\chi}\ =\ \hskip
150.79959pt\vspace{-2mm}$

$\displaystyle{\prod_{n\geq
1}\frac{1}{\big{(}1+t^{-\frac{1}{2}}qu^{n}\big{)}\big{(}1+t^{\frac{1}{2}}q^{-1}u^{n}\big{)}\big{(}1+t^{\frac{1}{2}}qu^{n}\big{)}\big{(}1+t^{-\frac{1}{2}}q^{-1}u^{n}\big{)}(1-u^{n})^{18}(1-tu^{n})(1-t^{-1}u^{n})}\,.}$

######  Remark 0.2.

Cohomological DT theory gives yet more refined invariants, very roughly
modelled on the Hodge polynomial $\sum h^{i,j}u^{i}v^{j}$ of the moduli space
— as studied for $K3$ surfaces in [DHS], for instance. Specialising to
$u=-t,\,v=-1$ gives the $\chi_{-t}$ refinement of the DT invariant which — for
local Fano surfaces and local K3 surfaces — is expected to coincide with the
Nekrasov-Okounkov refinement considered in this paper.444This expectation has
been proved for local Fano surfaces in [Th, Theorem 5.15]. For local $K3$
surfaces it would be a refinement of the equality $\mathsf{vw=VW}$ of [MT,
Theorem 7.10]. (It is not true for general type surfaces [TT1, Section 1.11]
or Enriques surfaces [Ob2].) Note Descombes [De] has proved a general result
relating the $\chi_{-t}$ and Nekrasov-Okounkov refinements of _compact_ moduli
spaces. This is different from the $u=v=t^{1/2}$ refinement considered in
[KKP], and indeed the resulting product formulae (4.4) and [KKP, Equation
5.1], while formally similar, are certainly different.

Acknowledgements. I am most grateful to Martijn Kool for spotting the gap in
[Th] that lead to this paper, and for very useful correspondence. I thank
Henry Liu and Felix Thimm for $K$-theoretic wall crossing discussions, Pierre
Descombes, Ben Davison and Georg Oberdieck for refined DT discussions, and
Davesh Maulik and Rahul Pandharipande for years of discussions. The work was
supported by a Royal Society research professorship.

###### Contents

  1. 1 Vafa-Witten invariants in all ranks
    1. 1.1 Stable case
    2. 1.2 Semistable case
  2. 2 Vanishing and multiple cover formula
  3. 3 The instanton contribution
    1. 3.1 Wall crossing
    2. 3.2 Deformations, autoequivalences and wall crossing
  4. 4 Computation on $S$

##  1\. Vafa-Witten invariants in all ranks

The proof of Theorem 1 will pass through rank 0 VW invariants on $S$
(corresponding in DT language to sheaves on $X$ whose support has dimension
$<2$). We give a brief explanation of how these can be defined (on $K3$
surfaces only), since the definitions in [TT1, TT2, Th] assumed rank $\geq 1$.

###  1.1. Stable case

Fix a Chern character in $H^{*}_{c}(X,\mathbb{Q})$ of compactly supported
sheaves $E$ on $X$, or equivalently the Mukai vector $v\in
H^{*}(S,\mathbb{Z})$ of $p_{*}\hskip 0.6ptE$, where $p$ is the projection
$X=S\times\mathbb{C}\to S$. For simplicity we begin by defining the invariants
when $v$ is chosen so that semistability implies stability. We consider the
moduli space $\mathcal{M}_{v}$ of compactly supported stable sheaves on $X$
divided by the action of translation,

$\mathcal{M}_{v}/\mathbb{C}.$

Let $\mathcal{E}$ denote a (possibly twisted) universal sheaf on
$\mathcal{M}_{v}\times X$ and let $\pi$ be the projection
$\mathcal{M}_{v}\times X\to\mathcal{M}_{v}$. Then the Atiyah class map of [HT]

$\big{(}\tau^{[1,2]}R\curly
H\\!om_{\pi}(\mathcal{E},\mathcal{E})\big{)}^{\vee}[-1]\longrightarrow\mathbb{L}_{\mathcal{M}_{v}}$

defines a symmetric perfect obstruction theory on $\mathcal{M}_{v}$ with
virtual dimension zero and virtual tangent bundle $\tau^{[1,2]}R\curly
H\\!om_{\pi}(\mathcal{E},\mathcal{E})[1]$. The additive action of $\mathbb{C}$
defines a nonzero trivial tangent direction in this complex

(1.1) $\mathcal{O}_{\mathcal{M}_{v}}\otimes t\xrightarrow{\ \partial_{t}\
}\curly Ext^{1}_{\pi}(\mathcal{E},\mathcal{E})\xrightarrow{\ h^{0}\
}\tau^{[1,2]}R\curly H\\!om_{\pi}(\mathcal{E},\mathcal{E})[1].$

Applying Serre duality and tensoring by
$\omega_{X}^{-1}\cong\mathcal{O}_{X}\otimes t$ we also get a trivial cosection
of the obstruction sheaf,

(1.2) $\tau^{[1,2]}R\curly
H\\!om_{\pi}(\mathcal{E},\mathcal{E})[1]\longrightarrow\mathcal{O}_{\mathcal{M}_{v}}.$

Since the composition of (1.1) and (1.2) is zero we can remove both terms from
the virtual tangent bundle (taking the double cone on them) to produce a
perfect obstruction theory on $\mathcal{M}_{v}/\mathbb{C}$,

(1.3) $\big{(}R\curly
H\\!om_{\pi}(\mathcal{E},\mathcal{E})_{\perp}\big{)}^{\vee}[-1]\longrightarrow\mathbb{L}_{\mathcal{M}_{v}/\mathbb{C}}.$

See [Ob1, Section 3] for details (in the very similar situation where
$\mathbb{C}$ is replaced by an elliptic curve). We use the notation $\perp$
because, when the dimension of the sheaves is 2, the above virtual tangent
bundle is isomorphic to the one $R\curly
H\\!om_{\pi}(\mathcal{E},\mathcal{E})_{\perp}[1]$ constructed in [TT1] by a
different method using the central fibre of a centre of mass map
$\mathcal{M}_{v}\to\mathbb{C}$ in place of $\mathcal{M}_{v}/\mathbb{C}$.

The symmetric perfect obstruction theory (1.3) endows
$\mathcal{M}_{v}/\mathbb{C}$ with a virtual structure sheaf
$\mathcal{O}_{\mathcal{M}_{v}/\mathbb{C}}^{\operatorname{vir}}$ [CFK, FG].
Picking a square root of the virtual cotangent bundle555While such
“orientation data” has been shown to exist it is simpler to work in
$K\big{(}\mathcal{M}_{v},\mathbb{Z}\big{[}\frac{1}{2}\big{]}\big{)}$ where a
canonical square root $K_{\operatorname{vir}}^{1/2}$ exists [OT, Lemma 5.1].

$K_{\operatorname{vir}}\ :=\ \det\Big{(}\big{(}R\curly
H\\!om_{\pi}(\mathcal{E},\mathcal{E})_{\perp}\big{)}^{\vee}[-1]\Big{)}\ =\
\det\big{(}R\curly H\\!om_{\pi}(\mathcal{E},\mathcal{E})_{\perp}\big{)}$

and the refined VW invariants are then

(1.4) $\mathsf{VW}_{v}(t)\ :=\
\chi_{t}\Big{(}\mathcal{O}_{\mathcal{M}_{v}/\mathbb{C}}^{\operatorname{vir}}\otimes
K_{\operatorname{vir}}^{1/2}\Big{)}\ =\
\chi_{t}\\!\left(\frac{\mathcal{O}_{(\mathcal{M}_{v}/\mathbb{C})^{\mathbb{C}^{*}}}^{\operatorname{vir}}\otimes
K_{\operatorname{vir}}^{1/2}}{\Lambda^{\bullet}(N^{\operatorname{vir}})^{\vee}}\right).$

Here $\chi_{t}$ denotes the $\mathbb{C}^{*}$-equivariant index — the character
of the virtual representation
$H^{*}\big{(}\mathcal{O}_{\mathcal{M}_{v}/\mathbb{C}}^{\operatorname{vir}}\otimes
K_{\operatorname{vir}}^{1/2}\big{)}$ with its natural $\mathbb{C}^{*}$
action666The $\mathbb{C}^{*}$ action on $X$ induces one on $\mathcal{M}_{v}$
which commutes with the $\mathbb{C}$ action and so descends to
$\mathcal{M}_{v}/\mathbb{C}$. The obstruction theory (1.3) is also naturally
$\mathbb{C}^{*}$-equivariant. — and the right hand side is produced by the
localisation formula. The result is a rational function in $t^{1/2}$ invariant
under $t^{1/2}\leftarrow\to t^{-1/2}$ [Th, Proposition 2.27].

###  1.2. Semistable case

In general the possible presence of semistable sheaves makes $\mathcal{M}_{v}$
a stack, so we rigidify as in [Th] by using Joyce-Song pairs $(E,s)$. Here

  * •

$E$ is a compactly supported sheaf on $X$,

  * •

$s\in H^{0}(E(n))$

for some fixed $n\gg 0$, satisfying the stability conditions

  * •

$E$ is semistable,

  * •

$s$ factors through no semi-destabilising proper subsheaf $F\subset E$.

For fixed Mukai vector $v\in H^{*}(S,\mathbb{Z})$ of the sheaves $p_{*}\hskip
0.6ptE$, there is a fine moduli space $\mathcal{P}_{v,n}$ of these Joyce-Song
pairs. It is only quasi-projective but its $\mathbb{C}^{*}$ fixed locus is
projective. It also carries a commuting $\mathbb{C}$ action by translation.

A Joyce-Song pair determines a 2-term complex
$I^{\bullet}:=\\{\mathcal{O}(-n)\to E\\}$ whose trace-free self-Exts govern
the deformation-obstruction theory of $\mathcal{P}_{v,n}$. Over $\pi\colon
X\times\mathcal{P}_{v,n}\to\mathcal{P}_{v,n}$ there is a universal sheaf
$\mathcal{E}$ and universal pair
$\mathbb{I}^{\bullet}=\\{\mathcal{O}_{X\times\mathcal{P}_{v,n}}\to\mathcal{E}\\}$
whose Atiyah class defines a perfect obstruction theory

$R\curly
H\\!om_{\pi}(\mathbb{I}^{\bullet},\mathbb{I}^{\bullet})_{0}^{\vee}[-1]\longrightarrow\mathbb{L}_{\mathcal{P}_{v,n}}.$

It is symmetric of virtual dimension zero. The additive action of $\mathbb{C}$
defines a nonzero trivial tangent direction

$\mathcal{O}_{\mathcal{P}_{v,n}}\otimes t\xrightarrow{\ \partial_{t}\ }\curly
Ext^{1}_{\pi}(\mathbb{I}^{\bullet},\mathbb{I}^{\bullet})_{0}\xrightarrow{\
h^{0}\ }R\curly
H\\!om_{\pi}(\mathbb{I}^{\bullet},\mathbb{I}^{\bullet})_{0}[1].$

Applying Serre duality and tensoring by
$\omega_{X}^{-1}\cong\mathcal{O}_{X}\otimes t$ we also get a trivial cosection
of the obstruction sheaf,

(1.5) $R\curly
H\\!om_{\pi}(\mathbb{I}^{\bullet},\mathbb{I}^{\bullet})_{0}[1]\longrightarrow\mathcal{O}_{\mathcal{P}_{v,n}}.$

Removing both by double cone as before gives a perfect obstruction theory on
$\mathcal{P}_{v,n}/\mathbb{C}$,

$\big{(}R\curly
H\\!om_{\pi}(\mathbb{I}^{\bullet},\mathbb{I}^{\bullet})_{\perp}\big{)}^{\vee}[-1]\longrightarrow\mathbb{L}_{\mathcal{P}_{v,n}/\mathbb{C}}.$

When rank$\hskip 0.6pt(p_{*}\hskip 0.6ptE)\geq 1$ this agrees with the perfect
obstruction theory of [TT2] constructed using the central fibre of a centre-
of-mass map $\mathcal{P}_{v,n}\to\mathbb{C}$.

Just as above the perfect obstruction theory endows
$\mathcal{P}_{v,n}/\mathbb{C}$ with a virtual structure sheaf
$\mathcal{O}_{\mathcal{P}_{v,n}/\mathbb{C}}^{\operatorname{vir}}$, while
orientation data gives a square root of the virtual cotangent bundle

$K_{\operatorname{vir}}\ :=\ \det\big{(}R\curly
H\\!om_{\pi}(\mathbb{I}^{\bullet},\mathbb{I}^{\bullet})_{\perp}\big{)}.$

Thus we get refined pairs invariants

$P_{v}(n,t)\ :=\
\chi_{t}\Big{(}\mathcal{O}_{\mathcal{P}_{v,n}/\mathbb{C}}^{\operatorname{vir}}\otimes
K_{\operatorname{vir}}^{1/2}\Big{)}\ =\
\chi_{t}\left(\frac{\mathcal{O}_{(\mathcal{P}_{v,n}/\mathbb{C})^{\mathbb{C}^{*}}}^{\operatorname{vir}}\otimes
K_{\operatorname{vir}}^{1/2}}{\Lambda^{\bullet}(N^{\operatorname{vir}})^{\vee}}\right).$

It was conjectured in [Th] and proved in [Liu] that

(1.6) $P_{v}(n,t)\,/\,[\chi(v(n))]_{t}\ \text{ is independent of }n$

so that we may define the refined Vafa-Witten invariants by777The (much more
complicated) general formula simplifies here because
$H^{2}(\mathcal{O}_{S})\neq 0$: see Section 3.1 for an explanation.

(1.7) $P_{v}(n,t)\ =\
(-1)^{\chi(v(n))-1}\big{[}\chi(v(n))\big{]}_{t}\mathsf{VW}_{v}(t).$

When semistability and stability coincide this recovers the previous
definition (1.4) by [Th, Proposition 5.5].

##  2\. Vanishing and multiple cover formula

By [PT3, Corollary 1] and [Th, Theorem 5.34] the only $\mathbb{C}^{*}$-fixed
pairs which contribute to the invariants (1.4, 1.7) are “ _uniformly
thickened_ ” in the $\mathbb{C}$ direction: they are determined by a pair
$(E,s)$ on $S$ and a thickness $d$ defining the pair

(2.1) $\big{(}p^{*}E\otimes\mathcal{O}_{dS},\,(p^{*}s)|_{dS}\big{)}$

supported on $dS\subset X$ — the scheme-theoretic thickening of the zero
section $S\subset X$ defined by the $d$th power of its ideal.

######  Remark 2.2.

For all other pairs there is a nowhere vanishing vector field on
$\mathcal{P}_{v,n}/\mathbb{C}$ which, by Serre duality and the symmetry of the
obstructon theory, defines a nowhere zero cosection of the obstruction sheaf,
forcing the invariants to vanish. The vector field arises from a flow which
translates the “$d$th layer” of the underlying sheaf along the $\mathbb{C}$
direction while fixing $p^{*}E\otimes\mathcal{O}_{(d-1)S}$. The induced dual
cosection is proportional to (1.5) (and so zero on the double cone) precisely
on the uniformly thickened pairs. See [PT3, Section 5] or [Th, Section 5.2].

For each fixed $d$ the construction (2.1) makes the moduli space of $d$-times
uniformly thickened pairs isomorphic to the moduli space of Joyce-Song pairs
supported scheme-theoretically on $S$ with Mukai vector $v/d$,

(2.3)
$\left(\mathcal{P}_{(v/d)^{d},\,n}\,\big{/}\mathbb{C}\right)^{\\!\mathbb{C}^{*}}\
\cong\ \big{(}\mathcal{P}_{(v/d)^{1},\hskip
0.6ptn}/\mathbb{C}\big{)}^{\mathbb{C}^{*}}.$

Here we use the obvious partition notation $(v/d)^{d}=(v/d,v/d,\dots,v/d)$ of
[Th, Section 5.4] to specify how the charge $v$ is distributed over the layers
of the thickening $dS$. The $\mathbb{C}^{*}$-fixed perfect obstruction theory
on the left hand side of (2.3) is _not the same_ as the one on the right hand
side, but is determined by it by a simple formula [PT3, Proposition 4], [Th,
Section 5.4]. This quickly gives

(2.4) $(-1)^{\chi(v(n))-1}P_{(v/d)^{d}}(n,t)\ =\
\frac{(-1)^{\chi\big{(}\frac{1}{d}v(n)\big{)}-1}}{[d]_{t}}P_{(v/d)^{1}}\big{(}n,t^{d}\big{)}$

by [Th, Equation 5.37]. As in [Th, Theorem 5.38] this $1/[d]_{t}$ _multiple
cover formula for pairs_ (2.4) induces the following $1/[d]^{2}_{t}$ _multiple
cover formula for sheaves_ (2.8).

######  Theorem 2.5.

The summands of the decomposition by thickening type

(2.6) $P_{v}(n,t)\ =\ \sum_{d|v}P_{(v/d)^{d}}(n,t)$

each individually satisfy (1.6). Thus $\mathsf{VW}_{v}(t)\ =\
\sum_{d|v}\mathsf{VW}_{(v/d)^{d}}(t)$ similarly decomposes by thickening type
with the summands defined by

(2.7) $P_{(v/d)^{d}}(n,t)\ =\
(-1)^{\chi(v(n))-1}\big{[}\chi(v(n))\big{]}_{t}\mathsf{VW}_{(v/d)^{d}}(t)$

and satisfying the multiple cover formula

(2.8) $\mathsf{VW}_{(v/d)^{d}}(t)\ =\
\frac{1}{[d]_{t}^{2}}\mathsf{VW}_{(v/d)^{1}}(t^{d}).$

###### Proof.

We prove the result for multiples $rv_{0}$ of a primitive class $v_{0}$ by
induction on $r$. For $r=1$ the sum (2.6) collapses to the $d=1$ term for
which Liu’s proof [Liu] of (1.6) gives the result. So to prove the result for
$v=rv_{0}$ we may assume inductively that it has been proved for smaller
multiples.

We adopt the notation that $\pm$ denotes the sign $(-1)^{\chi(w(n))-1}$ when
it precedes a pairs invariant with total Mukai vector $w$. Using (2.4) we
rewrite (2.6) as

(2.9) $\displaystyle\pm P_{v}(n,t)$ $\displaystyle=$ $\displaystyle\pm
P_{(v)^{1}}(n,t)+\sum_{d|v,\,d\geq 2}\frac{\pm
P_{(v/d)^{1}}\big{(}n,t^{d}\big{)}}{[d]_{t}}$ $\displaystyle=$
$\displaystyle\pm P_{(v)^{1}}(n,t)+\sum_{d|v,\,d\geq
2}\frac{\big{[}\chi\big{(}\frac{1}{d}v(n)\big{)}\big{]}_{t^{d}}\,\mathsf{VW}_{(v/d)^{1}}(t^{d})}{[d]_{t}}$
$\displaystyle=$ $\displaystyle\pm P_{(v)^{1}}(n,t)+\sum_{d|v,\,d\geq
2}[\chi(v(n))]_{t}\,\frac{\mathsf{VW}_{(v/d)^{1}}(t^{d})}{[d]_{t}^{2}}\,,$

where in the second line we have used the induction assumption on
$P_{(v/d)}(n,t)$ and in the third line the identity
$[\chi]_{t^{d}}=[d\chi]_{t}/[d]_{t}$. Since, by [Liu], $P_{v}(n,t)$ satisfies
(1.6) we see that every summand in (2.9) has the same property. Thus every
summand in (2.6) does too, and the induction continues. Finally, substituting
(2.7) into (2.9) gives

$\mathsf{VW}_{v}(t)\ =\ \sum_{d|v}\mathsf{VW}_{(v/d)^{d}}(t),$

where

$\mathsf{VW}_{(v/d)^{d}}(t)\ =\
\frac{1}{[d]_{t}^{2}}\mathsf{VW}_{(v/d)^{1}}(t^{d}).\qed$

##  3\. The instanton contribution

By (2.8) the Vafa-Witten invariants $\mathsf{VW}_{v}(t)$ are determined by the
invariants $\mathsf{VW}_{(v)^{1}}(t)$ which count semistable sheaves supported
_scheme theoretically on $S$_ (the so-called “instanton contribution”) via the
formula (2.7) with $d=1$. So to prove Theorem 1 what remains to show is

(3.1) $\mathsf{VW}_{(v)^{1}}(t)\ =\ t^{\hskip 0.6ptv^{2}/2-1}\,\chi_{-t}\hskip
0.6pt(\operatorname{Hilb}^{1-v^{2}/2}S).$

This is standard if $v$ is primitive (so that semistability and stability
coincide for a generic polarisation and the moduli space of stable sheaves
supported scheme theoretically on $S$ is deformation equivalent to a Hilbert
scheme of points on $S$) but it is remarkable otherwise. It is equivalent,
notice, to the invariants depending only on the square of $v$, not its
divisibility.

###  3.1. Wall crossing

Before we use wall crossing formulae we make some vague remarks about their
general shape, beginning with Joyce-Song’s wall crossing formula [JS] for
numerical generalised DT invariants on projective Calabi-Yau 3-folds. For
simplicity we ignore the Behrend function and work with the “naive” DT
invariants $(-1)^{\dim M}e(M)$ of moduli spaces $M$ of stable objects
(generalised to the semistable case by taking the signed Euler characteristic
of Joyce’s Hall algebra logarithm). The resulting formulae also hold without
making these simplifying assumptions.

It is also important to us that the theory can be applied to moduli spaces of
(Joyce-Song or stable) pairs, where the DT invariants should be thought of as
counting stable complexes $I^{\bullet}\in D(\mathrm{coh}\,X)$.

Denote by $\mathsf{J}^{\pm}(v)$ the generalised DT invariants counting
semistable objects in class $v=v_{1}+v_{2}$ just above and below a wall in a
space of stability conditions over which the slopes or phases of
$v_{1},\,v_{2}$ cross.

Below the wall we have stable objects $E$ sitting in nontrivial extensions

(3.2) $0\longrightarrow E_{2}\longrightarrow E\longrightarrow
E_{1}\longrightarrow 0,$

with $E_{i}$ stable of class $v_{i}$. Above the wall these are unstable, but
nontrivial extensions in the opposite direction

(3.3) $0\longrightarrow E_{1}\longrightarrow E^{\prime}\longrightarrow
E_{2}\longrightarrow 0$

become stable. While we cannot control the Euler characteristics
$ext^{1}(E_{i},E_{j})$ of the spaces
$\mathbb{P}(\operatorname{Ext}^{1}(E_{i},E_{j}))$ of extensions (3.2, 3.3), we
do know their _difference_. Using stability
($\operatorname{Hom}(E_{1},E_{2})=0=\operatorname{Hom}(E_{2},E_{1})$), Serre
duality
($\operatorname{Ext}^{i}(E_{1},E_{2})=\operatorname{Ext}^{3-i}(E_{2},E_{1})^{*}$)
and Riemann-Roch,

$ext^{1}(E_{2},E_{1})-ext^{1}(E_{1},E_{2})\ =\ \chi(v_{1},v_{2}),$

where $\chi(\ ,\ )$ is the Mukai pairing. Integrating this difference (in the
sense of taking weighted Euler characteristic, and further inserting the
$(-1)^{\dim}$ sign) over the space of $E_{1}$s and $E_{2}\hskip 0.6pt$s then
gives the leading term in the wall crossing formula

(3.4) $\mathsf{J}^{+}(v)\ =\
\mathsf{J}^{-}(v)+\sum_{v_{1}+v_{2}=v}(-1)^{\chi(v_{1},v_{2})-1}\chi(v_{1},v_{2})\,\mathsf{J}^{-}(v_{1})\,\mathsf{J}^{-}(v_{2})+\dots$

The higher order terms $\dots$ are a finite sum of terms

$C(v_{1},\dots,v_{k})\,\mathsf{J}^{-}(v_{1})\cdots\mathsf{J}^{-}(v_{k}),\
\text{ where }\ v_{i}+\dots+v_{k}\,=\,v,$

and correspond to semi-destabilising filtrations with $k$ graded pieces in
classes $v_{i}$. So the $k=2$ case is what we described above, in the special
case that the $E_{1},\,E_{2}$ are stable on the wall (if they are only
semistable their destabilising filtrations will also give rise to longer
filtrations and so higher order terms).

There are now variants [Jo, Liu, KLT] of the wall crossing formula (3.4) using
virtual cycles — or virtual structure sheaves — in place of (Behrend-weighted)
Euler characteristics. (In fact the paper [Jo] does not work in the Calabi-Yau
threefold setting, but can be made to work there with heavy modification
[KLT].) For DT invariants on a compact Calabi-Yau 3-fold they give the same
result, but for _reduced_ DT theory on a compact Calabi-Yau 3-fold $X$ with
$H^{2}(\mathcal{O}_{X})\neq 0$ they simplify enormously.

The point is that the deformation-obstruction theory of the associated graded
of a length $k$ destabilising filtration ($E_{1}\oplus E_{2}$ in our $k=2$
example above) has $k$ copies of $H^{2}(\mathcal{O}_{X})\neq 0$ in its
obstruction space. Only 1 of these is removed by taking the reduced
obstruction theory, so for $k>1$ we end up with a nonzero trivial piece in the
obstruction theory, which makes the contribution of the associated graded to
the virtual cycle vanish. Ultimately this causes the $k>1$ terms in (3.4)
vanish, leaving the following trivial wall crossing formula for _reduced_ DT
invariants

(3.5) $\mathsf{J}^{+}_{\operatorname{red}}(v)\ =\
\mathsf{J}^{-}_{\operatorname{red}}(v).$

Our situation is a little different because the cosection (1.5) _vanishes_ in
one (and only one888In fact it vanishes precisely for (complexes of) sheaves
pulled back from $S$ to $X=S\times\mathbb{C}$, but these are not compactly
supported. The only one which features in our analysis is the line bundle
$\mathcal{O}_{X}(-n)$ used to make Joyce-Song pairs (or $\mathcal{O}_{X}$ for
stable pairs).) situation: when the complex $I^{\bullet}$ is just the line
bundle999This is for Joyce-Song pairs. For stable pairs we take $n=0$.
$\mathcal{O}_{X}(-n)$ (i.e. when $I^{\bullet}$ is the complex associated to
the zero pair $(E,s)=(0,0)$). So there is no reduced obstruction theory for
this line bundle.

Now Vafa-Witten theory uses a reduced obstruction theory for compactly
supported sheaves (with the $H^{2}(\mathcal{O}_{S})=\mathbb{C}$ piece (1.2)
removed from the $R\operatorname{Hom}(E,E)$ obstruction theory) and for non-
trivial Joyce-Song and stable pairs $I^{\bullet}$ (reduced by removing the
$H^{2}(\mathcal{O}_{S})=\mathbb{C}$ piece (1.5) from the
$R\operatorname{Hom}(I^{\bullet},I^{\bullet})_{0}$ obstruction theory). Thus
we get the trivial wall crossing formula (3.5) _except in one situation_ :
when $k=2$ and the line bundle $\mathcal{O}_{X}(-n)$ is one of the two factors
in the associated graded101010In fact $E_{2}$ will be the shift $F[-1]$ of a
compactly supported sheaf because the destabilising filtration will come from
the exact triangle $F[-1]\to I^{\bullet}\to\mathcal{O}_{X}(-n)$ given by
rotating the natural triangle $I^{\bullet}\to\mathcal{O}_{X}(-n)\to F$.

(3.6) $\mathcal{O}_{X}(-n)\oplus E_{2}.$

The reduced (or Vafa-Witten) obstruction theory of the sum (3.6) is made up of
the _unreduced_ trace-free obstruction theory

(3.7)
$R\operatorname{Hom}\big{(}\mathcal{O}_{X}(-n),\mathcal{O}_{X}(-n)\big{)}_{0}\
=\ 0$

of the first summand, the _reduced_ obstruction theory of the second, and the
cross terms $R\operatorname{Hom}(\mathcal{O}_{X}(-n),F)=H^{*}(F(n))$ and
$R\operatorname{Hom}(F,\mathcal{O}_{X}(-n))=H^{*}(F(n))^{\vee}[-3]$. By (3.7)
the first summand is rigid and contributes $+1$ to $\mathsf{J}^{-}(v_{1})$ in
the degree 2 term of (3.4), which becomes111111Doing wall crossing in more
general classes, some of which admit reduced obstruction theories and some of
which have no $H^{2}(\mathcal{O}_{X})$ terms in their obstruction theory, we
should expect a wall crossing formula of the shape
$\mathsf{J}^{+}_{\operatorname{red}}(v)\ =\
\mathsf{J}^{-}_{\operatorname{red}}(v)+\sum_{v_{1}+\dots+v_{n}=v}C(v_{1},\dots,v_{n})\,\mathsf{J}^{-}_{\operatorname{red}}(v_{1})\hskip
0.6pt\mathsf{J}^{-}(v_{2})\dots\mathsf{J}^{-}(v_{n})$ with universal constants
$C(v_{1},\dots,v_{n})$ and _precisely one reduced invariant_ in each product.

$\mathsf{J}^{+}_{\operatorname{red}}(v)\ =\
\mathsf{J}^{-}_{\operatorname{red}}(v)+(-1)^{\chi(v_{2}(n))-1}\hskip
0.6pt\chi\big{(}\mathcal{O}_{X}(-n),v_{2}\big{)}\,\mathsf{J}^{-}_{\operatorname{red}}(v_{2})$

when $v=[\mathcal{O}_{X}(-n)]+v_{2}$ and the slopes of $\mathcal{O}_{X}(-n)$
and $v_{2}$ cross over the wall. Working $\mathbb{C}^{*}$-equivariantly with
$K$-theoretic invariants refines this to

(3.8) $\mathsf{J}^{+}_{\operatorname{red}}(v,t)\ =\
\mathsf{J}^{-}_{\operatorname{red}}(v,t)+(-1)^{\chi(v_{2}(n))-1}\big{[}\chi(v_{2}(n))\big{]}_{t}\,\mathsf{J}_{\operatorname{red}}^{-}(v_{2},t),$

replacing the Euler characteristic $\chi(v_{2}(n))$ of
$\mathbb{P}\big{(}H^{0}(F_{2}(n))\big{)}$ with its $\chi_{-t}$ genus
$[\chi(v_{2}(n))]_{t}\hskip 0.6pt$. While most of this discussion has been
vague and purely motivational, versions of (3.8) are precisely what have been
proved in [Liu, KLT]. In particular the reader should recognise (1.7) as an
instance of (3.8).

###  3.2. Deformations, autoequivalences and wall crossing

We now follow [To1, Section 4.10] and [To1, proof of Equation (121)], applying
deformations of $S$ and autoequivalences of $D(\operatorname{coh}S)$ to turn
$v$ into the Mukai vector $(0,\beta,\chi)$ of a _1-dimensional sheaf_ with the
same square $v^{2}=\beta^{2}$ and divisibility.

A complication is that an autoequivalence $\Phi$ will not in general preserve
the line bundle $\mathcal{O}_{X}(-n)$, so will not preserve the Joyce-Song
pairs functor

$E\ \longmapsto\ F_{n}(E)\ :=\ \operatorname{Hom}(\mathcal{O}_{X}(-n),E).$

Instead we have the functor

$E\ \longmapsto\ G_{n}(E)\ :=\
\operatorname{Hom}\big{(}\Phi(\mathcal{O}_{X}(-n)),E\big{)}$

such that $G_{n}(\Phi(E))=F_{n}(E)$. While Liu’s wall crossing formalism is
phrased in terms of the $F_{n}$, it could equally use $G_{n}$ (as indeed Joyce
allows in his wall crossing formula for cohomological virtual cycles [Jo,
Section 5.1]) without changing the Vafa-Witten invariants or any of the
results; cf. [Jo, Remark 5.10(d)].

Such operations also change the stability condition for sheaves, but we can
then wall cross back121212After possibly applying derived duals to get back
into the same component of the space of stability conditions, as in the proof
of Corollary 4.30 in [To1]. to Gieseker stability using the [KLT] wall
crossing formula. Since $H^{2}(\mathcal{O}_{S})\neq 0$ this is very simple,
showing as in (3.5) that (equivariant $K$-theoretic) invariants are the same
on both sides of the wall.

The upshot is that $\mathsf{VW}_{v}(t)=\mathsf{VW}_{\Phi_{*}(v)}$ and to prove
(3.1) we may, and do, assume from now on that $v=(0,\beta,\chi)$. And since
(3.1) is true for primitive classes, we only need prove that the
$\mathsf{VW}_{(0,\beta,\chi)^{1}}(t)$ are independent of the divisibility of
the Mukai vector $(0,\beta,\chi)$. In fact a weaker statement will be enough
for us.

######  Proposition 3.9.

To prove Theorem 1 it is enough to show $\mathsf{VW}_{(0,\beta,\chi)^{1}}(t)$
depends only on $\beta^{2}$, not on $\chi$ nor the divisibility of
$\beta.\hfill\square$

To prove the $\mathsf{VW}_{(0,\beta,\chi)^{1}}(t)$ do indeed depend only on
$\beta^{2}$ we will calculate them. To do so we relate these sheaf counts to
counts of different types of pairs made from them —  _stable pairs_ [PT1]
rather than Joyce-Song pairs. That is we consider pairs $(F,s)$ on $X$ with
$s\in H^{0}(F)$ satisfying the stability condition

  * •

$F$ is a _pure_ $1$-dimensional sheaf, and

  * •

$\dim(\operatorname{coker}s)=0$.

There is a fine quasi-projective moduli space $P_{\chi}(X,\beta)$ of stable
pairs with $c_{1}(p_{*}\hskip 0.6ptF)=\beta$ and $\chi(F)=\chi$. It has a
projective $\mathbb{C}^{*}$-fixed locus. Associated to such a stable pair is
the 2-term complex $I^{\bullet}=\\{\mathcal{O}_{X}\xrightarrow{\ s\ }F\\}$.
Then the perfect obstruction theory and reduced $K$-theoretic stable pair
invariants $P_{\beta,\chi}(t)$ of $X$ are defined in the same way as the
Joyce-Song pair invariants in Section 1.2.

We use Toda’s wall crossing analysis [To2, Section 5.7] in moving from a weak
stability condition in which the complexes $I^{\bullet}\in P_{\chi}(X,\beta)$)
are stable to one in which their derived duals $(I^{\bullet})^{\vee}\in
P_{-\chi}(X,\beta)$ are stable [To2, Proposition 5.4]. This involves crossing
the wall $W_{\chi}$ over which the tautological exact triangle

$F[-1]\longrightarrow I^{\bullet}\longrightarrow\mathcal{O}_{X}\xrightarrow{\
s\ }F$

destabilises $I^{\bullet}\in P_{\chi}(X,\beta)$, then crossing $W_{-\chi}$
where the derived dual

$\mathcal{O}_{X}\longrightarrow(I^{\bullet})^{\vee}\longrightarrow\curly
Ext^{2}(F,\mathcal{O}_{X})[-1]$

in $P_{-\chi}(X,\beta)$ becomes stable. The associated gradeds for these
filtrations are of the form (3.6). The walls in between have associated
gradeds which are not of this form so all their pieces have nonzero cosection
(1.2) or (1.5). Thus by (3.5, 3.8) the upshot is that the difference between
the invariants $P_{\beta,\chi}(t)$ counting stable objects above $W_{\chi}$
and those $P_{\beta,-\chi}(t)$ counting stable objects below $W_{-\chi}$ is

(3.10) $P_{\beta,\chi}(t)-P_{\beta,-\chi}(t)\ =\ (-1)^{\chi-1}[\chi]_{t}\hskip
0.6pt\mathsf{VW}_{(0,\beta,\chi)}(t).$

Because $H^{2}(\mathcal{O}_{S})\neq 0$ this is much simpler than Toda’s wall
crossing formula [To2, Theorem 5.7] deduced from Joyce-Song.

Analogously to (2.4) we also have a multiple cover formula for stable pairs.
In fact the first step — the equality (2.3) of moduli spaces of Joyce-Song
pairs of type $(v)^{1}$ and of uniform type $(v/d)^{d}$ was actually proved
first in the stable pair setting in [PT3, Lemma 1], as was the comparison of
the two resulting perfect obstruction theories [PT3, Proposition 4]. Using
these the comparison of the refined invariants of [Th, Section 5.4] proceeds
in exactly the same way to give the following analogue of (2.4),

(3.11) $(-1)^{\chi-1}P_{(\beta/d,\,\chi/d)^{d}}(t)\ =\
\frac{(-1)^{\chi/d-1}}{[d]_{t}}P_{(\beta/d,\,\chi/d)^{1}}\big{(}t^{d}\big{)},$

using the same partition notation as before. So we can rerun the proof of
Theorem 2.5 for $P_{\beta,\chi}(t)-P_{\beta,-\chi}(t)$ and (3.10, 3.11) in
place of $P_{v}(n,t)$ and (1.7, 2.4) to show the wall crossing formula (3.10)
also holds for the $(\ )^{1}$-contributions to $P_{\beta,\chi}(t)$ supported
scheme theoretically on $S$.

######  Proposition 3.12.

(3.13) $P_{(\chi,\beta)^{1}}(t)-P_{(-\chi,\beta)^{1}}(t)\ =\
(-1)^{\chi-1}[\chi]_{t}\hskip 0.6pt\mathsf{VW}_{(0,\beta,\chi)^{1}}(t).$

###### Proof.

Expanding both sides of (3.10) as a sum over uniform partitions and
substituting in the stable pairs multiple cover formulae (3.11) on the left
and the sheaf multiple cover formula (2.8) on the right gives

$\displaystyle{\sum_{d|(\beta,\chi)}\\!\\!\frac{P_{(\beta/d,\,\chi/d)^{1}}\big{(}t^{d}\big{)}-P_{(\beta/d,-\chi/d)^{1}}\big{(}t^{d}\big{)}}{[d]_{t}}\\\
\ =\
(-1)^{\frac{\chi}{d}-1}\\!\\!\sum_{d|(\beta,\chi)}\\!\left[\frac{\chi}{d}\right]_{t^{d}}\\!\frac{\mathsf{VW}_{(0,\beta/d,\,\chi/d)^{1}}\big{(}t^{d}\big{)}}{[d]_{t}}}$

by the identity $[\chi/d]_{t^{d}}=[\chi]_{t}/[d]_{t}$. Then (3.13) follows
from equating the individual terms in the sum by a descending induction on
$d$: the base case of primitive $(\beta/d,\,\chi/d)$ follows already from
(3.10). ∎

##  4\. Computation on $S$

So, combining (2.8) and (3.13), everything is now determined by the invariants
$P_{(\chi,\beta)^{1}}(t)$ counting stable pairs _supported on $S$_. By [Th,
Proposition 2.31] these are

(4.1) $P_{(\chi,\beta)^{1}}(t)\ =\ (-1)^{\chi-1}\hskip 0.6ptt^{\hskip
0.6pt-(\beta^{2}+\chi+1)/2}\hskip
0.6pt\chi^{\operatorname{vir}}_{-t}\big{(}P_{\chi}(S,\beta)\big{)}$

and can be computed using the results of [KT1, KT2, KY]. Fix the notation

  * •

$|\beta|:=\mathbb{P}(H^{0}(L))$ is the complete linear system of the unique
line bundle $L$ with $c_{1}(L)=\beta$,

  * •

$s\in H^{0}\big{(}S\times|\beta|,\,L\boxtimes\mathcal{O}(1)\big{)}$ cuts out
the universal curve,

  * •

$Z\subset S\times\operatorname{Hilb}^{n}(S)$ is the universal subscheme, and

  * •

$\textstyle{S\times\operatorname{Hilb}^{n}(S)\times|\beta|\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\rho_{n}}$$\scriptstyle{\rho}$$\textstyle{\operatorname{Hilb}^{n}(S)\times|\beta|}$$\textstyle{S\times|\beta|}$are
the projections.

By [PT2, Proposition B.8] $P_{\chi}(S,\beta)$ is the relative Hilbert scheme
of $\chi+\beta^{2}/2$ points on the universal curve over $|\beta|$. In [KT1]
it is shown that131313Since $H^{1}(\mathcal{O}_{S})=0$ the Hilbert scheme of
divisors of a fixed topological type is just a linear system, making the
analysis in [KT1] much simpler.

$P_{\chi}(S,\beta)\ \subset\ \operatorname{Hilb}^{n}(S)\times|\beta|,\quad
n\,=\,\chi+\beta^{2}/2,$

is cut out by the section
$s^{[n]}:=\rho_{n*}\big{(}\rho^{*}s|_{Z\times|\beta|}\big{)}$ of the vector
bundle

$E\ :=\ \big{(}L\boxtimes\mathcal{O}(1)\big{)}^{[n]}\ :=\
\rho_{n*}\\!\left(\rho^{*}(L\boxtimes\mathcal{O}(1))\big{|}_{Z\times|\beta|}\right)$

and that this description induces the correct perfect obstruction theory on
$P_{\chi}(S,\beta)$. Thus the pushforward of
$[P_{\chi}(S,\beta)]^{\operatorname{vir}}$ to
$\operatorname{Hilb}^{n}S\times|\beta|$ is the Euler class of $E$, so we can
compute integrals against cohomology classes $\sigma$ restricted from
$\operatorname{Hilb}^{n}(S)\times|\beta|$ by

(4.2) $\int_{[P_{\chi}(S,\beta)]^{\operatorname{vir}}}\sigma\ =\
\int_{\operatorname{Hilb}^{n}(S)\times|\beta|}\sigma\cup e(E).$

In our case (4.1) we let $\sigma$ be the Hirzebruch genus of the $K$-theory
class

$T_{\operatorname{Hilb}^{n}(S)\times|\beta|}-E,$

whose restriction to $P_{\chi}(S,\beta)$ is
$T^{\operatorname{vir}}_{P_{\chi}(S,\beta)}$. The right hand side of (4.2) is
computed in [KT2] by pushing down to an integral of tautological classes on
$\operatorname{Hilb}^{n}(S)$ which are then converted to integrals over
$S^{n}$ by the method of [EGL]. Expressing the result in terms of integrals
over $S$ writes the invariants (4.1) as formulae of $\chi$ and $\beta^{2}$ but
_not on the divisibility of_ $\beta$, as in [KT2, Theorem 1.1].

Thus, to compute (4.1), we may assume $\beta$ is primitive. Then
$P_{\chi}(S,\beta)$ is smooth [PT2, Proposition C.2] and its $\chi_{-t}$ genus
was computed by Kawai-Yoshioka in [KY]. Set $\beta^{2}=2h-2$ and let

(4.3) $P^{h}_{\chi}(t)\ :=\ (-1)^{\chi-1\hskip 0.6pt}t^{\hskip
0.6pt(1-2h-\chi)/2}\chi_{-t}(P_{\chi}(S,\beta))\ =\ P_{(\chi,\beta)^{1}}(t)$

be the invariants (4.1). Then substituting $\tilde{t}=1,\,q=u$ and
$y=-qt^{-1/2}$ into [KY, Equation 5.159] gives

(4.4) $\big{(}q^{-1}+[2]_{t}+q\big{)}\ \sum_{h=0}^{\infty}\
\sum_{\chi=1-h}^{\infty}P^{h}_{\chi}(t)\,u^{h}q^{\chi}\ =\ \hskip
113.81102pt\vspace{-1mm}$

$\displaystyle{\prod_{n\geq
1}\frac{1}{\big{(}1+t^{-\frac{1}{2}}qu^{n}\big{)}\big{(}1+t^{\frac{1}{2}}q^{-1}u^{n}\big{)}\big{(}1+t^{\frac{1}{2}}qu^{n}\big{)}\big{(}1+t^{-\frac{1}{2}}q^{-1}u^{n}\big{)}(1-u^{n})^{18}(1-tu^{n})(1-t^{-1}u^{n})}\,.}$

######  Lemma 4.5.

The infinite product (4.4) can be written as a sum

(4.6) $\sum_{h=0}^{\infty}\
\sum_{g=0}^{h}\,n^{h}_{g}(t)\Big{(}q^{-1}+[2]_{t}+q\Big{)}^{g}u^{h},$

where $n^{h}_{g}(t)\in\mathbb{Q}\big{[}t^{\pm\frac{1}{2}}\big{]}$ is a
palindromic 141414 I.e. invariant under $\tau\leftarrow\to\tau^{-1}$. The
$n_{g}^{h}(t)$ are the Nekrasov-Okounkov refinement of the reduced Gopakumar-
Vafa invariants of $X$. Laurent polynomial in $\tau:=t^{1/2}$.

###### Proof.

Expanding the product in powers of $u$ we see the coefficient of $u^{h}$ is a
palindromic Laurent polynomial in $q$ of degree $\leq h$ (with coefficients
which are palindromic Laurent polynomials in $\tau$ of degree $\leq h$). The
result then follows from the observation that the
$\big{(}q^{-1}+[2]_{t}+q\big{)}^{g}$ form a $\mathbb{C}[\tau^{\pm 1}]$-basis
for the space of these polynomials.

More explicitly, set $n^{h}_{h}(t)$ to be the coefficient of $q^{h}$; this is
a palindromic Laurent polynomial in $\tau$. Now subtract

$n^{h}_{h}(t)\big{(}q^{-1}+[2]_{t}+q\big{)}^{h}$

from the product to get a new palindromic Laurent polynomial in $q$ of degree
$\leq h-1$. Next we let $n^{h}_{h-1}(t)$ be its $q^{h-1}$ coefficient and
subtract $n^{h}_{h-1}(t)\big{(}q+[2]_{t}+q^{-1}\big{)}^{h-1}$. Repeating until
we reach $n^{h}_{0}(t)$ gives the formula claimed. ∎

Thus we find

$\sum_{\chi=1-h}^{\infty}P^{h}_{\chi}(t)\,q^{\chi}\ =\
\sum_{g=0}^{h}\,n^{h}_{g}(t)\big{(}q^{-1}+[2]_{t}+q\big{)}^{g-1}.$

The bracketed terms on the right are palindromic Laurent polynomials in $q$
for $g\geq 1$. Therefore replacing $P^{h}_{\chi}(t)$ by
$P^{h}_{\chi}(t)-P^{h}_{-\chi}(t)$ on the left hand side (thus replacing the
coefficient of $q^{\chi}$ by the difference between the cofficients of
$q^{\chi}$ and $q^{-\chi}$) kills these terms, leaving only the $g=0$ term

$\displaystyle\sum_{\chi\geq
1}\big{(}P^{h}_{\chi}(t)-P^{h}_{-\chi}(t)\big{)}q^{\chi}$ $\displaystyle=$
$\displaystyle n^{h}_{0}(t)\,q\big{(}1+[2]_{t}q+q^{2}\big{)}^{-1}$
$\displaystyle=$ $\displaystyle n^{h}_{0}(t)\sum_{\chi\geq
1}(-1)^{\chi-1}[\chi]_{t}\hskip 0.6ptq^{\chi}.$

Recalling the definition (4.3) of $P^{h}_{\chi}(t)$ and comparing the above
formula to (3.13) gives

$\mathsf{VW}_{(0,\beta,\chi)^{1}}(t)\ =\ n_{0}^{h}(t),$

dependent only on $\beta^{2}=2h-2$. By Proposition 3.9 this proves Theorem 1.

######  Remark 4.7.

Finally notice that substituting $q=-t^{1/2}$ into (4.6) also kills all but
the $g=0$ term, so the same substitution in the infinite product recovers the
generating series (0.1) for these invariants
$\mathsf{VW}_{(0,\beta,\chi)^{1}}(t)$,

(4.8) $\sum_{h=0}^{\infty}n_{0}^{h}(t)u^{h}\ =\ \prod_{n\geq
1}\frac{1}{(1-u^{n})^{20}(1-tu^{n})^{2}(1-t^{-1}u^{n})^{2}}\,.$

By the KKV formula [KKV], proved in [PT3], the integer Gopakumar-Vafa
invariants $n_{g}(\beta)$ — counting curves in an algebraic class $\beta$ in
$S$ with $\lambda_{g}$-insertion, or on $X$ with the reduced obstruction
theory — are governed by the exact same product formula. Since $n_{g}(\beta)$
also depends on $\beta$ only through its square $\beta^{2}=2h-2$ we write
$n_{g}^{h}:=n_{g}(\beta)\in\mathbb{Z}$. Then it follows from (4.8) that

$\mathsf{VW}_{(0,\beta,\chi)^{1}}(t)\ =\ n_{0}^{h}(t)\ =\
\sum\nolimits_{g=0}^{h}(-1)^{g}\,n^{h}_{g}\,\big{(}t^{-1}-[2]_{t}+t\big{)}^{g}.$

I imagine this is _not_ a direct relationship, but is due to some duality
(such as hyperkähler rotation, P$\,=\,$W, mirror symmetry, or even
coincidence) special to (local) $K3$ surfaces. In general one would expect the
$\chi_{-t}$ (or Nekrasov-Okounkov) refinement of genus 0 BPS invariants to
precisely _not_ govern higher genus numerical BPS invariants, since
$\chi_{-t}$ annihilates the Jacobian of a geometric genus $g>0$ curve.

## References

  * [BB] Y. Bae and T. Buelles, _Curves on K3 surfaces in divisibility 2_ , Forum of math. Sigma. 9 (2021), e9. arXiv:2006.00862.
  * [CFK] I. Ciocan-Fontanine and M. Kapranov, Virtual fundamental classes via dg-manifolds, Geom & Top 13 (2009), 1779–1804. math.AG/0703214.
  * [DHS] B. Davison, L. Hennecart and S. Schlegel Mejia, _BPS algebras and generalised Kac-Moody algebras from 2-Calabi-Yau categories_ , arXiv:2303.12592.
  * [De] P. Descombes, _Cohomological and $K$-theoretic DT invariants_, in preparation.
  * [EGL] G. Ellingsrud, L. Göttsche, M. Lehn, On the cobordism class of the Hilbert scheme of a surface, Jour. Alg. Geom. 10 (2001), 81–100. math.AG/9904095.
  * [FG] B. Fantechi and L. Göttsche, Riemann-Roch theorems and elliptic genus for virtually smooth schemes, Geom & Top 14 (2010), 83–115. arXiv:0706.0988.
  * [GK] L. Göttsche and M. Kool, _Refined $SU(3)$ Vafa-Witten invariants and modularity_, Pure and Applied Math. Quart. 14 (2018), 467–513. arXiv:1808.03245.
  * [GS] L. Göttsche and W. Soergel, _Perverse sheaves and the cohomology of Hilbert schemes of smooth algebraic surfaces_ , Math. Ann. 296 (1993), 235–245.
  * [HT] D. Huybrechts and R. P. Thomas, Deformation-obstruction theory for complexes via Atiyah and Kodaira-Spencer classes, Math. Ann. 346 (2010), 545–569. arXiv:0805.3527.
  * [JK] Y. Jiang and M. Kool, _Twisted sheaves and $SU(r)/\mathbb{Z}_{r}$ Vafa–Witten theory_, Math. Annalen 382 (2022), 719–743. arXiv:2006.10368.
  * [Jo] D. Joyce, _Enumerative invariants and wall-crossing formulae in abelian categories_ , arXiv:2111.04694.
  * [JS] D. Joyce and Y. Song, A theory of generalized Donaldson-Thomas invariants, Memoirs of the AMS 217, no. 1020 (2012). arXiv:0810.5645.
  * [KKV] S. Katz, A. Klemm, C Vafa, M-theory, topological strings, and spinning black holes, Adv. Theor. Math. Phys. 3 (1999), 1445–1537. hep-th/9910181.
  * [KKP] S. Katz, A. Klemm and R. Pandharipande, with an Appendix by R. P. Thomas, On the motivic stable pairs invariants of $K3$ surfaces, in “$K3$ surfaces and their moduli”, eds. C. Faber, G. Farkas and G. van der Geer, Prog. in Math. 315 (2016), 111–146. arXiv:1407.3181.
  * [KY] T. Kawai and K Yoshioka, String partition functions and infinite products, Adv. Theor. Math. Phys. 4 (2000), 397–485. hep-th/0002169.
  * [KT1] M. Kool and R. P. Thomas, Reduced classes and curve counting on surfaces I: calculations, Alg. Geom. 1 (2014), 334–383. arXiv:1112.3069.
  * [KT2] M. Kool and R. P. Thomas, Reduced classes and curve counting on surfaces II: calculations, Alg. Geom. 1 (2014), 384–399. arXiv:1112.3070.
  * [Liu] H. Liu, _Semistable refined Vafa-Witten invariants_ , arXiv:2309.03673.
  * [KLT] N. Kuhn, H. Liu and F. Thimm, _Wall-crossing for invariants of equivariant CY3 categories_ , in preparation.
  * [MT] D. Maulik and R. P. Thomas, _Sheaf counting on local $K3$ surfaces_, Pure Appl. Math. Quart. 14 (2018), 419–441. arXiv:1806.02657.
  * [NO] N. Nekrasov and A. Okounkov, _Membranes and Sheaves_ , Algebraic Geometry 3 (2016), 320–369. arXiv:1404.2323.
  * [Ob1] G. Oberdieck, On reduced stable pair invariants, Math. Zeitschrift 289 (2018), 323–353. arXiv:1605.04631.
  * [Ob2] G. Oberdieck, Curve counting on the Enriques surface and the Klemm-Mariño formula, arXiv:2305.11115.
  * [Ob3] G. Oberdieck, Refined curve counting on the local Enriques surface, in preparation.
  * [OP] G. Oberdieck and R. Pandharipande, _Curve counting on $K3\times E$, the Igusa cusp form $\chi_{10}$, and descendent integration_, in “$K3$ surfaces and their moduli”, eds. C. Faber, G. Farkas and G. van der Geer, Prog. in Math. 315 (2016), 245–278. arXiv:1411.1514.
  * [OT] J. Oh and R. P. Thomas, Counting sheaves on Calabi-Yau 4-folds, I, Duke Math Jour. 172 (2023), 1333–1409. arXiv:2009.05542.
  * [PT1] R. Pandharipande and R. P. Thomas,  Curve counting via stable pairs in the derived category, Invent. Math. 178 (2009), 407–447. arXiv:0707.2348.
  * [PT2] R. Pandharipande and R. P. Thomas, _Stable pairs and BPS invariants_ , Jour. AMS. 23 (2010), 267–297. arXiv:0711.3899.
  * [PT3] R. Pandharipande and R. P. Thomas, _The Katz-Klemm-Vafa conjecture for $K3$ surfaces_, Forum of Math, Pi 4 (2016), 1–111. arXiv:1404.6698.
  * [TT1] Y. Tanaka and R. P. Thomas, _Vafa-Witten invariants for projective surfaces I: stable case_ , to appear in Jour. Alg. Geom. arXiv:1702.08487.
  * [TT2] Y. Tanaka and R. P. Thomas, _Vafa-Witten invariants for projective surfaces II: semistable case_ , Pure Appl. Math. Quart. 13 (2017), 517–562. Volume in honour of the 60th birthday of Simon Donaldson. arXiv:1702.08488.
  * [Th] R. P. Thomas, _Equivariant $K$-theory and refined Vafa-Witten invariants_, Comm. Math. Phys. 378 (2020), 1451–1500. arXiv:1810.00078.
  * [To1] Y. Toda, Stable pairs on local $K3$ surfaces, J. Diff. Geom. 92 (2012), 285–370. arXiv:1103.4230.
  * [To2] Y. Toda, _Stability conditions and curve counting invariants on Calabi-Yau 3-folds_ , Kyoto J. Math. 52 (2012), 1–50. arXiv:1103.4229.

<EMAIL_ADDRESS>
Department of Mathematics
Imperial College London
London SW7 2AZ
United Kingdom