Consider a positive valued measurable function $f$ over a measure space $(\mathcal{X},\mathcal{M},\mu).$
Let $S(\mathcal{F})$ denote the linear span of characteristic functions of sets in the sigma algebra $\mathcal{F}.$
Is it true that
$$\sup_{0\leq\phi\leq f,\ \phi\in S(\mathcal{M})} \int_{\mathcal{X}}\phi d\mu = \sup_{0\leq\phi\leq f,\ \phi\in S(\sigma(f))} \int_{\mathcal{X}}\phi d\mu$$
where $\sigma(f),$ the minimal $\sigma-$algebra over which $f$ is measurable.