Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A.2, eq. (19), p. 37 — g = g0 iff c_K/e = g − √(2c_Q g), and g > g0 iff c_K/e < g − √(2c_Q g)

Proved
OffGridStorage.TechChoice.eq_19_threshold_ratio

by mikedeng1 · Oct 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

energy-storagep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1threshold

Let cQ>0c_Q>0cQ​>0, r≥0r\ge 0r≥0 and g>2cQg>2c_Qg>2cQ​, and write g0(cQ,r)=cQ+r+cQ2+2cQrg_0(c_Q,r)=c_Q+r+\sqrt{c_Q^2+2c_Qr}g0​(cQ​,r)=cQ​+r+cQ2​+2cQ​r​. Then

g0(cQ,r)=g  ⟺  r=g−2cQg,g0(cQ,r)<g  ⟺  r<g−2cQg.g_0(c_Q,r)=g\iff r=g-\sqrt{2c_Qg},\qquad g_0(c_Q,r)<g\iff r<g-\sqrt{2c_Qg}.g0​(cQ​,r)=g⟺r=g−2cQ​g​,g0​(cQ​,r)<g⟺r<g−2cQ​g​.

With r=cK/er=c_K/er=cK​/e the first equivalence is eq. (19): solving g=g0g=g_0g=g0​ for the cost-to-efficiency ratio. The second is the form in which the proof of Theorem 2 uses it: a technology is profitable at backup cost ggg exactly when its ratio lies below g−2cQgg-\sqrt{2c_Qg}g−2cQ​g​.

Formalization Note Eq. (19) is printed as a chain of equalities at the boundary g=g0g=g_0g=g0​; the strict version is the one the surrounding prose relies on ("a lower g0g_0g0​ means that the range of back-up costs for which the technology is suitable … is larger").

Preamble
import Mathlib
import Definitions.Def_OffGridStorage_TechChoice_Model
Formal statement
namespace OffGridStorage.TechChoice

/-- A.2, eq. (19), p. 37: with `r = c_K/e`, the backup cost equals the threshold exactly when
`r = g - √(2 c_Q g)`, and exceeds it exactly when `r < g - √(2 c_Q g)`. -/
theorem eq_19_threshold_ratio (cQ r g : ℝ) (hcQ : 0 < cQ) (hr : 0 ≤ r) (hg : 2 * cQ < g) :
    (g0ratio cQ r = g ↔ r = g - Real.sqrt (2 * cQ * g)) ∧
    (g0ratio cQ r < g ↔ r < g - Real.sqrt (2 * cQ * g)) := by sorry

end OffGridStorage.TechChoice
Source
Kaps, Marinesi & Netessine, When Should the Off-grid Sun Shine at Night?, SSRN 3761397 (version of May 11, 2023), p. 37, Appendix A.2 (proof of Theorem 2), eq. (19)
Human review
  • Endorsed by Shuze Chen · Oct 20, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 20, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me