#!/usr/bin/env python3 """Reproduce Cedar Trail's bounded contingency and debt schedules. Run with ``uv run python`` and this file's path. The script is dependency-free. It uses supplied accounting conclusions and does not decide probability, legal merit, range support, refinancing qualification, waiver sufficiency, recovery, materiality, or disclosure wording. """ def money(amount: float) -> str: """Format a number as accounting-style US dollars.""" return f"${amount:,.2f}" if amount >= 0 else f"(${abs(amount):,.2f})" def heading(title: str) -> None: print(f"\n{title}\n{'-' * len(title)}") heading("1. Product-claim range") range_low = 180_000.00 range_high = 420_000.00 better_estimate = None recognized_loss = better_estimate if better_estimate is not None else range_low additional_exposure = range_high - recognized_loss print(f"{'Supported range low':<42} {money(range_low):>18}") print(f"{'Supported range high':<42} {money(range_high):>18}") print(f"{'Recognized loss':<42} {money(recognized_loss):>18}") print(f"{'Additional possible exposure':<42} {money(additional_exposure):>18}") print("Reason: the loss is supplied as probable and estimable; no amount is a better estimate.") heading("2. Other legal and subsequent-event lanes") print(f"{'Supplier dispute recognized':<42} {money(0):>18}") print(f"{'Supplier dispute disclosed range':<42} {'$50,000–$140,000':>18}") print(f"{'January fire recognized in 2027':<42} {money(0):>18}") print(f"{'January fire disclosure input':<42} {money(300_000.00):>18}") print(f"{'Possible recovery recognized':<42} {money(0):>18}") print("The possible $150,000 recovery remains on a separate evidence track.") heading("3. Debt classification") maturing_note = 600_000.00 qualifying_refinance = 400_000.00 maturing_note_current = maturing_note - qualifying_refinance maturing_note_noncurrent = qualifying_refinance covenant_note = 900_000.00 covenant_note_current = covenant_note covenant_note_noncurrent = 0.00 current_debt = maturing_note_current + covenant_note_current noncurrent_debt = maturing_note_noncurrent + covenant_note_noncurrent debt_rows = [ ("March note — current", maturing_note_current), ("March note — noncurrent", maturing_note_noncurrent), ("Covenant note — current", covenant_note_current), ("Covenant note — noncurrent", covenant_note_noncurrent), ("Total current debt", current_debt), ("Total noncurrent debt", noncurrent_debt), ] for label, amount in debt_rows: print(f"{label:<42} {money(amount):>18}") heading("4. Recognized current-liability total") recognized_current_liabilities = current_debt + recognized_loss print(f"{'Current debt':<42} {money(current_debt):>18}") print(f"{'Recognized product-claim loss':<42} {money(recognized_loss):>18}") print(f"{'Bounded recognized current liabilities':<42} {money(recognized_current_liabilities):>18}") if abs(current_debt + noncurrent_debt - 1_500_000.00) > 0.005: raise SystemExit("FAIL: debt classification does not reconcile to carrying amount") if abs(recognized_current_liabilities - 1_280_000.00) > 0.005: raise SystemExit("FAIL: recognized current-liability total does not reconcile") print("\nPASS: debt and recognized loss reconcile to $1,280,000.00 current.") print("Boundary: PASS verifies supplied arithmetic; every judgment remains separately reviewable.")