Use the Kuratowski ordered pair
The axiom of pairing first constructs and , then constructs the displayed pair of those sets, proving that it is a set.
For any , the intersection of the members of this pair is , and their union is . Thus equality of two ordered pairs first gives , hence , and then . If , this latter set is a singleton and forces . If , its unique member distinct from is , forcing . Hence equality of ordered pairs gives equality of both coordinates.
For a set of ordered pairs, both coordinates of every pair belong to
which is a set by two applications of the Axiom of union. Axiom of separation inside gives
These are sets, including when is empty.
The Axiom of foundation asserts that every nonempty set has an element with . If a descending membership sequence existed, replacement would give the nonempty range set . Foundation would give some disjoint from . But and , contradicting that disjointness. Thus foundation rules out every such sequence.
Conversely suppose there is no descending membership sequence, but foundation fails. There is then a nonempty set such that for every . The axiom of choice selects a function on with . Choose and use recursion to define
Every value remains in , and for every . This is the forbidden sequence. Therefore, with the stated choice assumption, foundation is equivalent to the absence of descending membership sequences. The selection step explains exactly where choice is used; dependent choice would suffice.
Independence here is a relative consistency assertion: from a ground first-order model satisfying ZFC, construct a first-order model of each remaining theory in which the omitted axiom fails. The ground axiom of choice is a tool for constructing these countermodels, not an extra axiom imposed on the theories being tested. The constructible universe supplies the usual relative-consistency implication from ZF to ZFC, so this ground choice assumption requires no additional consistency strength. These constructions can be formalized inside an arbitrary ground model; they do not require the stronger assumption that a transitive model exists.
Union. Put and use the hereditarily locally small membership model
The ground cardinal is a strong limit cardinal of countable cofinality. This transitive class contains the empty set and . Pairing preserves the bound, as does taking a subset, so separation holds for every formula relativized to this class. If an internally definable function has domain , ground replacement collects its range . Since and every descendant of an element of already has fewer than members, . Thus the full functional Axiom schema of replacement holds. For , every actual subset of belongs to the class and
Consequently its entire power set belongs to the class. Extensionality and foundation are inherited from the ground membership relation; witnesses infinity. However belongs to , while its only possible union is , which does not. All the other ZF axioms hold, and union fails. Bounding the entire transitive closure by instead would give the wrong model: functional ranges at this singular bound need not be hereditarily small.
Power set. Use the transitive class of hereditarily countable sets. Pairing, union and separation preserve hereditary countability. A functional image of a countable domain is countable, and its members have countable transitive closures; their countable union is countable in the ground ZFC model. This proves replacement. The remaining structural axioms and infinity are inherited. Every actual subset of belongs to , but a putative internal power set of would contain all these subsets and hence be uncountable by Cantor's theorem. Power set fails in , with every other ZF axiom intact.
Replacement. Use in the cumulative hierarchy. At a limit ordinal cutoff, pairing, union, power set and every instance of separation remain below the cutoff; foundation, extensionality and infinity hold as well. With parameter , define by finite iterations of power set. The finite iteration witnesses and each value are inside , so this is an internally definable total function on . Its range has rank of a set and is absent from the model. This instance of replacement fails.
Extensionality. Build well-founded coded sets over one urelement , retaining a distinct ordinary empty set . Membership of an atom is always false, and membership of a set code is its coded extension. Thus but they have identical empty extensions. Pairing, union, separation and replacement are performed on set codes; pure witnesses infinity, and the well-founded construction gives foundation. There is a small point concerning the unmodified, untyped Axiom of power set: the atom is vacuously a subset of every object. Therefore the internal power-set object for contains all ordinary set-subsets of and the atom. It has exactly the required extension. All remaining ZF axioms hold, but extensionality fails. In the usual typed atom theory, the power-set axiom instead quantifies only over set-subsets.
Foundation. In the ground universe let exchange and and fix all other objects. On the same domain define the Rieger-Bernays permutation model
Since is a bijection, two objects with the same -members are equal, so extensionality holds. Any ground collection of desired members is represented by the object . In particular, an -pair is and the -union of is
An -subset of is an object with , so its -power-set object is
Translate every formula by replacing membership with ; ground separation and replacement collect the required extensions and the same representation supplies their internal witnesses. The -empty object is , and its -successor operation is . Ground well-founded recursion and replacement collect the iterates of from ; representing this collection gives an -inductive object. Thus infinity holds. But for , , whence and has precisely itself as its -member. Foundation fails.
Infinity. The hereditarily finite sets satisfy extensionality, foundation, pairing, union, power set and separation. Each internal domain is externally finite, so every internally definable functional image is finite and belongs to , proving replacement. No finite object can contain the empty set and all its successive Finite von Neumann ordinals. Infinity fails, and all other ZF axioms hold.
Choice with atoms. For the negative model use the Basic Fraenkel permutation model. Let be an infinite set of urelements and let every permutation of act recursively on sets. Keep precisely the hereditarily finitely supported objects: an object has a finite support if every permutation fixing pointwise fixes the object, and every object occurring in its membership ancestry must also have such a support. The class of these objects contains the pure universe and itself.
Supports for a pair are united; union preserves a support; a formula defining a subset uses the finite union of the supports of its domain and parameters. An internally definable functional range has the same support, since its values are uniquely specified, and its elements are already hereditarily supported. This proves the full separation and replacement schemas. All hereditarily supported set-subsets of a fixed set form its symmetric internal power set; this collection is invariant under the pointwise stabilizer of a support of the original set. For the untyped version add all the atoms, as above. Pure , ground well-foundedness and set-extensionality give the remaining axioms.
The family of unordered pairs of atoms is hereditarily supported. If it had a choice function , let be a finite support of . Choose distinct . The transposition exchanging fixes and , but exchanges its two possible chosen elements. Invariance of would imply is fixed by that transposition, a contradiction. Conversely, the full well-founded universe over the atoms, before restricting to finite supports, satisfies choice when the ground universe does. Both choice and its negation are relatively consistent with the stated weakening of extensionality.
If contains no , every pair of vertices has at most two common neighbours. Double-counting a vertex together with an unordered pair of its neighbours gives
Consequently
By Cauchy--Schwarz,
This quadratic inequality implies for an absolute constant ; for example works for every . Thus
Use a programming closure whose private variable holds the next Fibonacci number. Use arbitrary-precision integers to enumerate all terms exactly:
def fibonacci(): Iter[BigInt] = {
  var following = BigInt(1)
  val step: BigInt => BigInt = (current: BigInt) => {
    val result = following
    following = current + following
    result
  }
  new FunIter[BigInt](BigInt(0), step)
}
At the cell containing , the private state immediately before computing its successor is following = F_(i+1). The successor returns that value and sets following to , preserving the recursion invariant. The resulting sequence starts
Each successor is computed once by the memoized implementation in part (c); interleaved copies see the same already generated successor instead of independently advancing shared programming closure state. Replacing BigInt by Int and the two initial values by 0,1 gives exactly the hinted Int => Int implementation, but eventually incurs integer overflow, so it does not enumerate all mathematical Fibonacci numbers.
An alternative avoiding mutable programming closure state represents the current and next Fibonacci numbers by a pair and uses the pure function with initial state ; a projecting iterator returns the first component. The closure construction above meets the suggested one-number interface directly.
Use merge sort, then project the second component of each pair. Under the ordinary Haskell Ord class instance for pairs, “ascending” means lexicographic order, requiring both component types to be ordered:
sort :: (Ord a, Ord b) => [(a,b)] -> [b]
sort = map snd . mergeSort

mergeSort :: Ord a => [a] -> [a]
mergeSort [] = []
mergeSort [x] = [x]
mergeSort xs = merge (mergeSort left) (mergeSort right)
  where (left,right) = splitAt (length xs `div` 2) xs

merge :: Ord a => [a] -> [a] -> [a]
merge [] ys = ys
merge xs [] = xs
merge (x:xs) (y:ys)
  | x <= y    = x : merge xs (y:ys)
  | otherwise = y : merge (x:xs) ys
If the intended convention is to sort only by the first component as a sort key, replace x <= y by fst x <= fst y and specialize the merge routines to pairs. The weaker signature is then sort :: Ord a => [(a,b)] -> [b], and equal keys keep their original order. These conventions differ when first components tie; the question does not explicitly specify that tie rule.