Thanks! You’re right. I wasn’t thinking of formally deriving the Atom specification from the Haskell, but yours is closer. By the way, in terms of efficiency, your version or even

`fib :: Int -> Int`

fib n = fibs !! n

fibs = 1 : 1 : [ x + y | (x,y) <- zip fibs (tail fibs) ]

is more efficient (but yours is a better specification for the Atom implementation).

]]> fib n = fst $ fibHlp n (1,1)

where

fibHlp :: Int -> (Int,Int) -> (Int,Int)

fibHlp 0 p = p

fibHlp n (a,b) = fibHlp (n-1) (b, a+b)