Throughout we use the criterion recorded with the definition of measurability: a map v:X→R is measurable if and only if {x∈X:v(x)>c}∈F for every real number c.
Claim 1. Fix x∈X. The set {fn(x):n∈N} is nonempty and bounded above by K and below by −K, so by the least upper bound property of the real numbers it has a real supremum g(x) and a real infimum h(x), and ∣g(x)∣≤K, ∣h(x)∣≤K.
Fix a real number c. If g(x)>c then c is not an upper bound of {fn(x):n∈N}, so fn(x)>c for some n; conversely, if fn(x)>c for some n then g(x)≥fn(x)>c. Therefore
{x∈X:g(x)>c}=n∈N⋃{x∈X:fn(x)>c},
a countable union of members of F, which lies in F because F is a σ-algebra. Hence g is measurable.
Next, each −fn is measurable: for a real number c,
{x∈X:−fn(x)>c}={x∈X:fn(x)<−c}=k∈N⋃(X∖{x∈X:fn(x)>−c−k1}),
since fn(x)<−c holds if and only if fn(x)≤−c−k1 for some natural number k; each set on the right lies in F, and F is closed under complements and countable unions. The maps −fn are bounded in absolute value by K, so by the paragraph above supn(−fn) is measurable. For any nonempty set of real numbers bounded above and below, the infimum of the set equals the negative of the supremum of the set of negatives, so h=−supn(−fn); applying the negation argument once more, h is measurable.
Claim 2. For each natural number n put gn(x)=supk≥nfk(x). Claim 1, applied to the family (fn+j)j∈N, which is measurable and bounded in absolute value by K, shows that gn is real-valued and measurable with ∣gn∣≤K.
Fix x∈X. Since gn(x)≥fk(x) for every k≥n, and fk(x)→f(x), passing to the limit in k gives gn(x)≥f(x) for every n. Let ε>0 and choose N with ∣fk(x)−f(x)∣<ε for all k≥N; then fk(x)≤f(x)+ε for k≥N, so gN(x)≤f(x)+ε. Consequently f(x)≤infngn(x)≤f(x)+ε for every ε>0, whence f(x)=infngn(x). By Claim 1 applied to the sequence (gn), the map f=infngn is measurable.
Claim 3. Fix a real number c and set E={t∈[a,b]:u(t)>c}. If t∈E and t≤t′≤b, then u(t′)≥u(t)>c, so t′∈E. If E is empty it is a Borel subset of [a,b]. Otherwise E is nonempty and bounded below by a, so it has a real infimum s∈[a,b], and the implication just proved gives
(s,b]⊆E⊆[s,b].
Indeed, if s<t′≤b then t′ is not a lower bound of E, so some t∈E satisfies t<t′, and hence t′∈E; and every element of E is at least s and at most b. Therefore E equals (s,b] or [s,b], and in either case E is the intersection of [a,b] with an interval of the real line, hence a member of the trace Borel σ-algebra on [a,b]. By the criterion recalled at the start, u is measurable.
Claim 4. Let u:[a,b]→R be continuous, let c be a real number, and set U={t∈[a,b]:u(t)>c}. Let t0∈U. By continuity at t0 there is δ>0 such that ∣u(t)−u(t0)∣<u(t0)−c, and hence u(t)>c, for every t∈[a,b] with ∣t−t0∣<δ. Choosing rational numbers p,q with t0−δ<p<t0<q<t0+δ gives t0∈(p,q)∩[a,b]⊆U. Therefore
U=⋃{(p,q)∩[a,b] : p,q rational, (p,q)∩[a,b]⊆U},
a union of a countable collection of members of the trace Borel σ-algebra, hence itself a member. By the criterion recalled at the start, u is measurable. ■