import TinyVault.Proofs

/-!
# The proof that gets stuck (`scratch/NaiveAttempt.lean`)

This file is EXPECTED TO FAIL and is not part of `lake build`. It is the Step 4
attempt to prove that the naive (floor-rounded) capacity preserves solvency.
Reproduce the stuck goal with:

    lake env lean scratch/NaiveAttempt.lean
-/

namespace TinyVault

theorem naiveCap_preserves_solvency_attempt {A S F U delta : Nat}
    (hF : F > 0) (hU : U > 0)
    (hinit : S * F ≤ A * U)
    (hdelta : delta ≤ mulDivFloorNat (A - mulDivFloorNat S F U) U F) :
    (S + delta) * F ≤ A * U := by
  have hreq := (mulDivFloorNat_spec S F U hU).1
  have hfloor := (mulDivFloorNat_spec (A - mulDivFloorNat S F U) U F hF).1
  have hmul : delta * F ≤ mulDivFloorNat (A - mulDivFloorNat S F U) U F * F :=
    Nat.mul_le_mul_right F hdelta
  rw [Nat.sub_mul] at hfloor
  rw [Nat.add_mul]
  omega

end TinyVault
