A Relaxation of Üresin and Dubois’ Asynchronous Fixed-Point Theory in Agda

Üresin and Dubois’ paper “Parallel Asynchronous Algorithms for Discrete Data” shows how a class of synchronous iterative algorithms may be transformed into asynchronous iterative algorithms. They then prove that the correctness of the resulting asynchronous algorithm can be guaranteed by reasoning about the synchronous algorithm alone. These results have been used to prove the correctness of various distributed algorithms, including in the fields of routing, numerical analysis and peer-to-peer protocols. In this paper we demonstrate several ways in which the assumptions that underlie this theory may be relaxed. Amongst others, we (i) expand the set of schedules for which the asynchronous iterative algorithm is known to converge and (ii) weaken the conditions that users must prove to hold to guarantee convergence. Furthermore, we demonstrate that two of the auxiliary results in the original paper are incorrect, and explicitly construct a counter-example. Finally, we also relax the alternative convergence conditions proposed by Gurney based on ultrametrics. Many of these relaxations and errors were uncovered after formalising the work in the proof assistant Agda. This paper describes the Agda code and the library that has resulted from this work. It is hoped that the library will be of use to others wishing to formally verify the correctness of asynchronous iterative algorithms.


A Theory of Asynchronous Iterative Algorithms
Let S be a set. Iterative algorithms attempt to find a fixed point x * ∈ S for a function F : S → S by repeatedly applying the function to some initial starting point x ∈ S. The state after k such iterations, σ k (x), is defined as follows: The algorithm terminates when it reaches an iteration k * such that σ k * +1 (x) = σ k * (x) and so x * = σ k * (x) is the desired fixed point. Many iterative algorithms can be performed in parallel. Assume that the state space S and the function F are decomposable into n parts: where F i : S → S i takes in a state and calculates the ith component of the new state. It is now possible to assign the computation of each F i to a separate processor. The processors may be part of a single computer with shared memory or distributed across many networked computers. We would prefer our model to be agnostic to this choice, and so this paper will simply refer to the processors as nodes. Each node i continues to apply F i locally and propagate its updated state to the other nodes who incorporate it into their own computations. We will refer to an asynchronous implementation of this scheme as δ. A rigorous mathematical definition of δ will be presented in Sect. 2.2.
If the nodes' applications of F i are synchronised then the parallel computation δ will be identical to σ . However in many cases enforcing synchronisation may not be practical or even possible. For example in distributed routing, the overhead of synchronisation on a continental scale would be prohibitive to the operation of the protocol. However, when updates are performed asynchronously, the behaviour of δ depends on the exact sequence of node activations and the timings of update messages between nodes. Furthermore, δ may enter states unreachable by σ and hence δ may not converge even when σ is guaranteed to do so. This motivates the question: what properties of F are required to guarantee that the asynchronous computation δ always converges to a unique fixed point?
Depending on the properties of the state space S and the function F, there are multiple answers to this question-see the survey paper by Frommer and Szyld [12]. For example many of the approaches discussed in [12] rely on the rich structure of vector spaces over continuous domains. Üresin and Dubois [20] were the first to develop a theory that applied to both discrete and continuous domains. They prove that if F is an asynchronously contracting operator (ACO), then δ will always converge to a unique fixed point. Their model makes only very weak assumptions about inter-node communication and allows messages to be delayed, lost, duplicated and reordered. Henceforth we will refer to Üresin and Dubois [20] as UD.
Proving that F is an ACO is dramatically simpler than directly reasoning about the asynchronous behaviour of δ. However, in many cases it remains non-trivial and so UD also derive several alternative conditions that are easier to prove in special cases and that imply the ACO conditions. For example, they provide sufficient conditions when S is partially ordered and F is order preserving.
Many applications of these results can be found in the literature including in routing [6,9], programming language design [10], peer-to-peer protocols [16] and numerical simulation [7].

Contributions
This paper makes several contributions to UD's existing theory. The original intention was to formalise the work of UD in the proof assistant Agda [4] as part of a larger project to develop formal proofs of correctness for distributed routing protocols [8]. The proofs in UD are mathematically rigorous in the traditional sense, but their definitions are somewhat informal and they occasionally claim the existence of objects without providing an explicit construction. Given this and the breadth of fields these results have been applied to, in our opinion a formal verification of the results is a useful exercise.
During the process of formalisation, we discovered various relaxations of the theory. This includes: (i) enlarging the set of schedules for which it is possible to prove δ converges over, (ii) relaxing the ACO conditions and (iii) generalising the model to include fully distributed algorithms rather than just shared-memory models. Furthermore, it was found that two of UD's auxiliary sufficient conditions were incorrect, and we demonstrate a counter-example: an iteration which satisfies the conditions yet does not converge to a unique fixed point. Finally, we also formalise (and relax) a recently proposed alternative sufficient condition based on metric spaces by Gurney [13].
We have made the resulting library publicly available [1]. Its modular design should make it easy to apply the results to specific algorithms without understanding the technical details and we hope that it will be of use to others who are interested in developing formal proofs of correctness for asynchronous iterative algorithms. In this paper we have also included key definitions and proofs from the library alongside the standard mathematics. We do not provide an introduction to Agda, but have tried to mirror the mathematical notation as closely as possible to ensure that it is readable. Interested readers may find several excellent introductions to Agda online [3]. Any Agda types that are used but not explicitly referenced can be found in version 0.17 of the Agda standard library [2].
There have been efforts to formalise other asynchronous models and algorithms such as real-time systems [18] and distributed languages [14,15]. However, as far as we know our work is the first attempt to formalize the results of UD.
This paper is a revised version of our ITP 2018 conference paper [23]. In particular, the following contributions are new: (i) showing that it is possible to enlarge the set of schedules that the iteration converges over, (ii) relaxing the ACO conditions. As a result, the main proof has been simplified sufficiently to include its Agda formalisation within this paper.

Model
This section introduces UD's model for asynchronous iterations. There are three main components: (i) the schedule describing the sequence of node activations and the timings of the messages between the nodes, (ii) the asynchronous state function and (iii) what it means for the asynchronous iteration to converge. We explicitly note where our definitions diverge from that of UD and justify why the changes are desirable.

Schedules
Schedules determine the non-deterministic behaviour of the asynchronous environment in which the iteration takes place; they describe when nodes update their values and the timings of the messages to other nodes. Let V be the finite set of nodes participating in the asynchronous process. Time T is assumed to be a discrete, linearly ordered set (i.e. N).

Definition 1 A schedule is a pair of functions:
-The activation function α : T → P(V ).
-The data flow function β : where β satisfies: We formalise schedules in Agda as a dependent record. The number of nodes in the computation is passed as a parameter n and the nodes themselves are represented by the type Fin n, the type of finite sets with n elements.
record Schedule (n : N) : Set where field α It would be possible to implicitly capture causality by changing the return type of β to Fint instead of T. However, this would require converting the result of β to type T almost every time it wanted to be used. The simplification of the definition of Schedule is therefore not worth complicating the resulting proofs.

Generalisation 1
In the original paper UD propose a model where all nodes communicate via shared memory, and so their definition of β takes only a single node i. However, in distributed processes (e.g. internet routing) nodes communicate in a pairwise fashion. We have therefore augmented our definition of β to take two nodes, a source and destination. UD's original definition can be recovered by providing a data flow function β that is constant in its third argument.
Generalisation 2 UD's definition of a schedule also has two additional liveness assumptions: Assumption (S2) states that every node will always activate again at some point in the future and (S3) states that every message is only used for a finite amount of time. In practice they represent the assumption that every node and every link between pairs of nodes continue to function indefinitely.
Why have these assumptions been dropped from our definition of a schedule? We argue that unlike causality, (S2) and (S3) are not fundamental properties of a schedule but merely one possible set of constraints defining what it means for the schedule to be "well behaved". Any useful notion of the asynchronous iteration converging will require it to do so in a finite amount of time, yet (S2) and (S3) require the schedule to be well behaved for an infinite amount of time. This is hopefully an indication that (S2) and (S3) are unnecessarily strong Fig. 1 Behaviour of the data flow function β. Messages from node j to node i may be reordered, lost or even duplicated. The only constraint is that every message must arrive after it was sent assumptions. This is discussed further in Sect. 2.3 where we will incorporate relaxed versions of (S2) and (S3) into our definition of convergence, and in Sect. 3.1 we will show that there exist schedules which do not satisfy (S2) and (S3) and yet still allow the asynchronous iteration to converge.

Generalisation 3
Although not explicitly listed in their definition of a schedule, UD assume that all nodes activate at time 0, i.e. α(0) = V . Such synchronisation is difficult to achieve in a distributed context and fortunately this assumption turns out to be unnecessary.
We should explicitly highlight that one of the advantages of UD's theory is that there is no requirement for the data flow function to be monotonic, i.e. that messages arrive in the order they were sent: Although this assumption is natural in many settings, it does not hold for example if the nodes are communicating over a network and different messages take different routes through the network. Figure 1 demonstrates this and other artefacts of asynchronous communication that can be captured by β.

Asynchronous State Function
We now define the asynchronous state function δ. We formalise the state space S = S 1 × · · · × S n in Agda using a (Fin n)-indexed IndexedSetoid from the Agda standard library, i.e. n sets each equipped with some suitable notion of equality. Definition 2 Given a function F and a schedule (α, β) the asynchronous state function is defined as: where δ t i (x) is the state of node i at time t when the iteration starts from state x.
Initially node i adopts x i , the ith component of the initial state. At a subsequent point in time then if node i is inactive then it simply carries over its state from the previous time step. However if node i is in the set of active nodes then it applies F i to the state of the computation from node i's local perspective, e.g. the term δ β(t,i,1) 1 (x) is the contents of the most recent message node i received from node 1 at time t. This definition is formalised in Agda as follows: Those unfamiliar with Agda may wonder why the additional Acc argument is necessary. Agda requires that every program terminates, and its termination checker ensures this by verifying that the function's arguments get structurally smaller with each recursive call. While we can see that δ will terminate, in the case where i activates at time t, the time index of the recursive call β(t + 1, i, j) is only smaller than t + 1 because of causality, and so a naive implementation fails to pass the Agda termination checker. The Acc type helps the termination checker see that the function terminates by providing an argument that always becomes structurally smaller with each recursive call. The rec argument for the second case has the type: ∀s→s<t + 1→Acc_<_s. Therefore in order to generate the next Acc one must prove the time really does strictly decrease. For the second recursive case this is proved by This additional complexity can be hidden from the users of the library by defining a second function of the expected type: by using the proof <-wellFounded which shows the natural numbers are well-founded with respect to < and which has type ∀ t → Acc _<_ t Note that our revised definition of a schedule contains only what is necessary to define the asynchronous state function δ and nothing more. This provides circumstantial evidence that the decision to remove assumptions (S2) and (S3) from the definition was a reasonable one, as they are extraneous when defining the core iteration.

Correctness
Before exploring UD's conditions for the asynchronous iteration δ to behave correctly, we must first establish what "behave correctly" means. An intuitive and informal definition might be as follows: The asynchronous iteration, δ, behaves correctly if for a given starting state x and all well-behaved schedules (α, β) there exists a time after which the iteration will have converged to the fixed point x * .
What is a "well-behaved" schedule? As in many cases, it is initially easier to describe when a schedule is not well-behaved. For example, if a node i never activates then the iteration cannot be expected to converge to a fixed point. Equally, if node i never succeeds in sending a message to node j then a fixed point is unlikely to be reached.
UD incorporated their notion of well-behavedness into the definition of the schedule itself in the form of assumptions (S2) and (S3). These state that nodes continue to activate indefinitely and links will never fail entirely. As discussed previously in Sect. 2.1, this guarantees that the schedule is well-behaved forever. However, intuitively they are unnecessarily strong assumptions as both the definition of correctness above and the definition used by UD require that δ converges in a finite amount of time.
We now explore how to relax (S2) and (S3), so that the schedule is only required to be well-behaved for a finite amount of time. Unfortunately this is not as simple as requiring "every node must activate at least n times" and "every pair of nodes must exchange at least m messages", because the interleaving of node activations and message arrivals is important. For example node 1 activating n times followed by node 2 activating n times is unlikely to allow convergence as there is no opportunity for feedback from node 2 to node 1.
The right notion of a suitable interleaving of messages and activations turns out to be that of a pseudoperiodic schedule, as used by UD in their proof of convergence.
Note that UD refer to such schedules simply as pseudoperiodic. We have renamed it infinitely pseudoperiodic for reasons that will hopefully become apparent as we unpick the components of the definition.
First of all we define a period of time as a pair of times: record TimePeriod : Set where field start : T end : T We do not include that start ≤ end as in turns out that it will always be inferrable from the context and hence including the proof in the record only leads to duplication. Assumption (P1) for an infinitely pseudoperiodic schedule simply says that the initial time of interest is time 0. This turns out to be unnecessary and any starting point will do and hence we leave it unformalised. Assumptions (P2) and (P3) guarantee that every node activates at least once between times ϕ(k) and ϕ(k + 1). We will call such a period an activation period.
is an activation period for node i if i activates at least once during that time period. constructor mk ai open TimePeriod period field t a : T s<t a : start < t a t a ≤e : t a ≤ end i∈α[t a ]: i ∈ α t a Fig. 2 A sequence of activation periods and expiry periods. Section 3.1 will show that convergence occurs at the end of an activation period. One consequence of UD's definition of pseudocycle is that convergence occurs after "n and a half" pseudocycles. By redefining a pseudocycle it is possible to align the end of a pseudocycle with the end of the activation period. The realignment requires an additional expiry period at the start of the sequence, however this is fulfilled by the trivial expiry period at time 0 of 0 length. Realigning the pseudocycles in this way consequently simplifies both the definition and the proof of convergence Assumption (P4) says that any message that arrives after ϕ(k + 1) must have been sent after τ i (k), i.e. ϕ(k + 1) is long enough in the future that all messages sent before node i activated have either arrived or been lost. This motivates the following definition: is an expiry period for node i if every message that arrives at i after t 2 was sent after time t 1 .
record MessagesTo_ExpireIn_ (i : Fin n) (period : TimePeriod) : Set where constructor mk e open TimePeriod period field start≤end : start ≤ end UD call the period of time between ϕ(k) and ϕ(k + 1) a pseudocycle. In such a period of time every node activates and subsequently all the messages sent before its activation time expire. The sequence ϕ(k) therefore forms an infinite sequence of pseudocycles.
We argue that a pseudocycle is more naturally defined the other way round, i.e. all messages sent to node i before the start of the pseudoperiod should expire and then the node should activate. As shown in Fig. 2 and proved in Sect. 3.1, this alteration aligns the end of the pseudocycle with the moment the iteration converges. This has the consequence of simplifying the definition of what it means for the asynchronous iteration to converge in a finite time as well as the subsequent proofs that the iteration converges.
The notion of a pseudocycle is related to the iteration converging, as during a pseudocycle the asynchronous iteration will make at least as much progress as that of a single synchronous iteration. This will be shown rigorously in Sect. 3.1.
We define a schedule to be k-pseudoperiodic if it contains k pseudocycles. UD show that a schedule satisfies (S2) and (S3) if and only if the schedule is ∞-pseudoperiodic. Therefore UD's definition of convergence implicitly assumes that all schedules are ∞-pseudoperiodic. By removing (S2) and (S3) from the definition of a schedule we can relax our definition to say that the schedule only needs to be k * -pseudoperiodic for some finite k * . Our definition of what it means for δ to converge therefore runs as follows:

Definition 8
The iteration converges over a set of states X 0 if there exist a state x * and a number k * such that for all starting states x ∈ X 0 and schedules then if the schedule is k * pseudoperiodic in some time period [s, e] then for any time t ≥ e then δ t (x) = x * .
record Converges { } (X 0 : IPred S i ) : Set _ where field x* : S k* : Note that prior to this, the definitions of δ and pseudocycles etc. have been implicitly parameterised by some schedule ψ (omitted in the Agda via module parameters). As the definition of Converges quantifies over all schedules, this dependency must now be made explicit.
Another point that Agda forces us to make explicit, and which is perhaps not immediately obvious in the mathematical definition above due to the overloading of ∈, is that when we write x ∈ X 0 we really mean ∀i : x i ∈ (X 0 ) i . The latter is represented in the Agda code by the indexed membership relation _∈ i _.
What are the practical advantages of this new definition of convergence? -It is strictly weaker than UD definition, as it allows a strictly larger set of schedules to be used. For example the following schedule: which is synchronous until time k * after which all nodes and links cease to activate, is k * -pseudoperiodic but not ∞-pseudoperiodic.

Convergence
This section discusses sufficient conditions for the asynchronous iteration δ to converge. The most important feature of the conditions is that they require properties of the function F rather than the iteration δ. This means that the full asynchronous algorithm, δ, can be proved correct without having to directly reason about unreliable communication between nodes or the exponential number of possible interleavings of messages and activations. The section is split up into 3 parts. In the first we discuss the original ACO conditions proposed by UD. We show that they can be relaxed and then prove that they imply our new stronger notion of convergence defined in Sect. 2.3. In the second part we show that two further sufficient conditions proposed by UD are in fact insufficient to guarantee that δ converges to a unique fixed point, and we provide a counter-example. In the final section we formalise and relax the alternative ultrametric conditions proposed by Gurney [13] and his proof that they reduce to the ACO conditions.

ACO Conditions
UD define a class of functions called Asynchronously Contracting Operators (ACO). They then prove that if the function F is an ACO, then δ will converge to a unique fixed point for all possible ∞-pseudoperiodic schedules.

Definition 9 An operator F is an asynchronously contracting operator (ACO) iff there exists a sequence of sets D(k)
The ACO conditions state that the space S can be divided into a series of boxes D(k). Every application of F moves the state into the next box, and eventually a box containing only Fig. 3 Highlighting our change to the definition of the ACO conditions. Whereas UD's definition required each set to be contained within the previous set (left), our definition do not make this assumption (right). Note that this figure is a simplification, as each set D(k) is decomposable into D 1 (k) × · · · × D n (k) and so in reality the diagram should be n-dimensional a single element is reached. Intuitively, the reason why it is possible to show that these conditions guarantee asynchronous convergence, instead of just synchronous convergence, is that each box is to be decomposable over each of the n nodes. Therefore, F remains contracting even if every node has not activated the same number of times. The definition of an ACO is formalised in Agda as follows: The variable is necessary to keep track of the universe level the family of sets D reside in. The sets themselves are implemented as a (Fin n)-indexed family of predicates. The code ∃ 2 λk*x*→ can be read as "there exists two objects k * and x * such that".

Generalisation 4
The definition of an ACO in UD has the stronger assumption: whilst other related work in the literature [12] use: As shown in Fig. 3 assumption (A1*/A1**) implies that the sets D(k) are nested. For any particular D, the assumption (A1) is strictly weaker than (A1*/A1**) as (A1*/A1**) + (A2) implies (A1) but (A1) + (A2) does not imply (A1*/A1**). However in general the two definitions of an ACO are equivalent because if the function F satisfies our definition of an ACO then the set of boxes defined by satisfy UD definition of an ACO. See our Agda library for a proof of this. However we argue that the relaxation is still useful as in practice (A1) is significantly easier to prove than (A1*/A1**) for users of the theorems.

Theorem 1 (Theorem 1 in UD ) If F is an ACO then δ converges over D(0).
Proof Assume that F is an ACO, and consider an arbitrary schedule (α, β) and starting state x ∈ D(0). We initially describe some additional definitions in order to help structure the Agda proofs and increase their readability. The first definition is what it means for the current state of the iteration to be in D(k): We define the messages sent to node i to be in box k at time t if every message that arrives at node i after t is in box k.
Finally, the computation is in box k at time t if for every node i its messages are in box k − 1 and its state is in box k.
The proof is then split into three main steps: Step 1 The computation is always in D(0). It is relatively easy to prove that the state is always in D(0) by induction over the time t. The initial state x was assumed to be in D(0), and assumption (A1) F-resp-D 0 ensures that the ith component remains in D i (0) whenever node i activates.
Therefore the computation is always in D(0).
Step 2 Once the computation has entered D(k) then it remains in D(k). Suppose the state of node i is in D(k) and the messages to i are in D(k − 1) at time s then we will show that the state remains in D(k) for any later time e.
The proof proceeds by induction over e and k. If e = 0 then s = e as s ≤ e, and so the proof holds trivially. If k = 0 then we already know that the state is always in D(0) by Step 1. For k + 1 and e + 1, if s = e + 1 then again the proof holds trivially. Therefore s < e + 1 otherwise we would contradict the assumption that time e + 1 is after time s. If i is inactive at time e + 1 then the result holds by the inductive hypothesis. Otherwise if i is active at time e + 1 then assumption (A2) F-mono-D ensures that the result of applying F to node i's current view of the global state, is in D(k + 1) as we know from our initial assumption that all messages arriving at i are in D(k). The corresponding lemma for messages is easy to prove as the definition requires that all future messages that arrive after time s at node i will be in box k and hence as s ≤ e so are all messages that arrive after time e.

message-stability :∀ {k s e i} → s ≤ e →
MessagesToNode i InBox k AtTime s → MessagesToNode i InBox k AtTime e message-stability s≤e m∈b e<t = m∈b (<-trans r s≤e e<t) It is then possible to prove the corresponding lemma for the entire computation.

computation-stability :∀ {k s e} → s ≤ e →
ComputationInBox k AtTime s → ComputationInBox k AtTime e computation-stability s≤e c∈D k i =message-stability s≤e (proj 1 (c∈D k i)) , state-stability s≤e (c∈D k i) Step 3 After a pseudocycle the computation will advance from D(k) to D(k + 1). Suppose all messages to node i are in D(k) at time s and i activates at some point after s and before time e then the state of node i is in D(k + 1) at e. This can be shown by induction over e. We know that e = 0 as node i must activate strictly after s. If i activates at time e + 1 then the state of node i after applying F must be in D(k + 1) by (A2) F-mono-D as all the messages it receives are in D(k). If i does not activate at time e + 1 then [s, e] must still be an activation period for i and so it is possible to apply the inductive hypothesis to prove that node i is in D(k + 1) at time e and therefore also at e + 1. Using these lemmas, it is now possible to show that during a pseudocycle the whole computation advances from D(k) to D(k + 1). More concretely, after the expiry period messages to node i have moved from D(k − 1) to D(k). After the subsequent activation period the state of node i has moved from D(k) to D(k + 1) whilst the messages remain in D(k). It is therefore a trivial proof by induction to show that after n pseudocycles then the computation will have advanced from D(k) to D(k + n). AtTime m $ advance-computation n mpp ∴ ComputationInBox (suc k + n)AtTime e $ subst _ (sym (+-suc k n)) ∴ ComputationInBox (k + suc n)AtTime e

advance-computation
The notation A $ A⇒B ∴ B is an attempt to emulate standard mathematical logical reasoning that we have a proof of A, and a proof that A implies B and hence we have a proof of B.
Finally, the main result may be proved as follows. Initially the computation is in D(0). Subsequently at time e after the end of the k * pseudocycles the computation must be in D(k * ). This implies that at any subsequent time t then the state of the computation must be in D(k * ) and hence that δ t (x) ∈ D(k * ). Therefore δ t (x) = x * by (A3) B-finish.

Synchronous and Finite Conditions
Even after relaxing (A1*) to (A1), the ACO sets D(k) are not always intuitive or simple to construct. UD recognised this and provided several alternative sufficient conditions which are applicable in special cases. They then claim that these new conditions are sufficient for convergence by showing that they imply that F is an ACO.
The first set of sufficient conditions apply when there exists a partial order ≤ i over each S i . These are then lifted to form the order ≤ over S where x ≤ y means ∀i : x i ≤ y i . UD then make the following claim, where σ is the synchronous state function:

Claim 1 (Proposition 3 in UD)
The asynchronous iteration δ converges over some set D = D 1 × D 2 · · · × D n if: x ∈ D ⇒ σ converges starting at x UD attempt to prove this by first showing a reduction from these conditions to an ACO and then applying Theorem 1 to obtain the required result. However this claim is not true. While the asynchronous iteration does converge from every starting state in D under these assumptions, it does not necessarily converge to the same fixed point. The flaw in the original proof is that UD tacitly assume that the set D(0) for the ACO they construct is the same as the original D specified in the conditions above. However the only elements that are provably in the ACO's D(0) is the set {σ k (x) | k ∈ N}. We now present a counter-example to the claim.
Counterexample 1 Consider the degenerate asynchronous environment in which |V | = 1 and let F be the identity function (i. e. F(a) = a). Let D = {x, y} where the only relationships in the partial order are x ≤ x and y ≤ y. Clearly (i), (ii), (iii) and (iv) all trivially hold as F is the identity function. However x and y are both fixed points, and which fixed point is reached depends on whether the iteration starts at x or y. Hence Claim 1 cannot be true.
It is possible to "fix" this claim by strengthening (iv) to "the synchronous iteration always converges to the same fixed point". Additionally it also turns out that the reduction to the ACO requires D to be non-empty so that there exists an initial state from which to begin iterating. The modified conditions are formalised in Agda as follows:

Theorem 2 If F obeys the synchronous conditions above, F is an ACO.
Proof The sequence of sets D(k) required by the definition of an ACO are defined as follows, where x 0 is some initial state in D: For a full proof that these sets satisfy the ACO conditions please consult our Agda library [1].
One point of interest is that the sets defined above depend on the initial state x 0 , and that D(0) as defined only contains the synchronous iterates from x 0 , and hence D(0) is only a subset of D. It is still possible to show convergence for all states in D by constructing an ACO for each initial element and proving that D(k * ) contains the same final element (which is possible due to the modification that σ now converges to a unique fixed point). However, even with our updated assumptions we have been unable to construct a single "unified" ACO for which D(0) = D. Whether or not it is possible to do so is an interesting open question.

Finite Conditions
UD also provide a set of sufficient conditions that are applicable for convergence over a finite set of values. Like Claim 1, they require that S is equipped with some indexed order.

Claim 2 (Proposition 4 in UD)
The asynchronous iteration δ converges over D if: UD's attempted proof for Claim 2 is a reduction to the conditions for Claim 1. Therefore like Claim 1, the conditions guarantee convergence but not to a unique solution. Similarly, the counterexample for Claim 1 is also a counterexample for Claim 2.
Unlike Claim 1, we do not have a proposed strengthening of Claim 2 which guarantees the uniqueness of the fixed point. This is because the finiteness of D does not help to ensure the uniqueness of the fixed point. Instead much stronger assumptions would be required to guarantee uniqueness (for example the existence of a metric space over the computation as discussed in the next section) and any such stronger conditions have the tendency to make the finiteness assumption redundant.

AMCO Conditions
Many classical convergence results for synchronous iterations rely on the notion of distance, and in suitable metric spaces the iteration can be proved to converge by showing that every application of the operator F moves the state closer (in non-negligible steps) to some fixed point x * . There already exist several results of this type for asynchronous iterations. El Tarazi [11] shows that δ converges if each S i is a normed linear space and there exists a fixed point x * and a γ ∈ (0, 1] such that for all x ∈ S: However, this is a strong requirement as the use of the norm implies the existence of an additive operator over S and in many applications such an operator may not exist. Recently Gurney [13] proposed a new, more general set of conditions based on ultrametrics [19]. Gurney does not name these conditions himself but for convenience we will call an F that satisfies them an asynchronously metrically contracting operator (AMCO). He then proves that F being an AMCO is equivalent to F being an ACO. We are primarily concerned with applying the results to prove correctness and so we only formalise the forwards direction of the proof here. Before doing so, we define some terminology for different types of metrics.

Definition 10
A quasi-semi-metric is a distance function d : S → S → N such that: d(x, y) = 0 ⇔ x = y Definition 11 An ultrametric is a distance function d : S → S → N such that: It should be noted that in these definitions the image of d is N rather than R + . This is important as it later allows us to prove that the distance between consecutive states in the iteration must reduce to 0 by the well-foundedness of the natural numbers over <.

Definition 12
An operator F is an asynchronously metrically contracting operator (AMCO) if for every node i there exists a distance function d i and: Assumption (M1) is not listed in Gurney [13] but was found to be required during formalisation as proofs in Agda are constructive. It should be noted that if (M1) does not hold (i.e. there are no states) then convergence is trivial to prove. Assumption (M2) says that two states are equal if and only if they occupy the same point in space. Assumption (M3) says that there exists a maximum distance between pairs of states. Assumption (M4) says that the distance between consecutive iterations must strictly decrease, and assumption (M5) says that for any fixed point x * then applying F must move any state closer to that fixed point. These conditions are formalised in Agda as follows: Generalisation 5 Gurney's definition of an AMCO makes the stronger assumption: -(M2*) d i is an ultrametric Users of the new modified conditions therefore no longer need to prove that their distance functions are symmetric or that they obey the max triangle inequality. This relaxation is a direct consequence of Generalisation 4 and reinforces our argument that Generalisation 4 truly is a relaxation.
Theorem 3 (Lemma 6 in [13]) If F is an AMCO then F is an ACO.
Proof Let x be an element in S by (M1). Then the fixed point k * can be found by repeatedly applying (M4) to form the chain: This is a decreasing in chain in N and there must exist a time k at which (M4) can no longer be applied. Hence F k (x) = F k+1 (x) and so x * = F k (x) is our desired fixed point. Let k * = max i∈V d max i by (M3). The required sets D(k) are then defined as follows: ≤ max(k * − k, 0)} Due to space constraints we will not prove here that the sets D(k) fulfil the required ACO properties. Interested readers may find the full proofs in our Agda library [1].

The Library
A library containing all of these proofs, as well as several others, is available publicly online [1]. It is arranged in such a way that hides the implementation details of the theorems from users. For example, among the most useful definitions contained in the main interface file for users are the following: where F is simply a wrapped version of the function F that ensures that it is decomposable in the correct way. The same file also exports the definition of ACO, AMCO etc., which allows users to easily pick their conditions and theorem as desired.

Achievements
In this paper we have formalised the asynchronous fixed point theory of Üresin and Dubois' in Agda. Along the way we have proposed various relaxations by: 1. extending the model to incorporate iterations in a fully distributed environment as well as the original shared memory model.

2.
showing how the ACO conditions can be tweaked to reduce the burden of proof on users of the theory. 3. reworking the theory to allow users to prove that the iteration still converges even when the schedule is only well behaved for a finite rather than an infinite length of time.
We have also described how an accordingly relaxed version of UD's main theorem was successfully formalised. However our efforts to formalise Propositions 3 and 4 as stated in UD's paper revealed that they are false. We hope that this finding alone justifies the formalisation process. We have proposed a fix for Proposition 3 but have been unable to come up with a similar practical alteration for Proposition 4. Finally, we have also relaxed and formalised the set of AMCO conditions based on the work by Gurney.
Our formalisation efforts have resulted in a library of proofs for general asynchronous iterations. The library is publicly available [1] and we hope that it will be a valuable resource for those wanting to formally verify the correctness of a wide range of asynchronous iterations. We ourselves have used the library to verify a proof about the largest possible set of distributed vector-based routing protocols that are always guaranteed to converge over any network [8].

Further Work
We are primarily interested in proving correctness and therefore we have only formalised that the F being an ACO is sufficient to guarantee that the asynchronous iteration converges. However Üresin and Dubois also show that if F converges then F is necessarily an ACO whenever the state space S is finite. The accompanying proof is significantly more complex and technical than the forwards direction and so would be an interesting extension to our formalisation.
Additionally it would be instructive to see if other related work such as [17,21,22], using different models, could be integrated into our formalisation.