"""Readable acquisition, consolidation, and XBRL identity bridge.""" def money(amount: float) -> str: """Format dollars with commas and parentheses.""" number = f"{abs(amount):,.0f}" return "$(" + number + ")" if amount < 0 else "$" + number consideration_and_nci = 650_000.0 + 150_000.0 + 120_000.0 identifiable_net_assets = 1_200_000.0 - 350_000.0 goodwill = consideration_and_nci - identifiable_net_assets consolidated_assets = 4_000_000.0 + 1_200_000.0 - 800_000.0 - 60_000.0 + 100_000.0 facts = [ ("Revenue", "Cedar Trail", "Year 5", "USD", ()), ("Revenue", "Cedar Trail", "Year 5", "USD", (("ProductAxis", "Trail"),)), ("Revenue", "Cedar Trail", "Year 5", "USD", ()), ] duplicate_count = len(facts) - len(set(facts)) print("Cedar Trail — acquisition and consolidation") for label, value in [ ("Consideration and NCI", consideration_and_nci), ("Identifiable net assets", identifiable_net_assets), ("Goodwill", goodwill), ("Consolidated assets", consolidated_assets), ]: print(f"{label:<34} {money(value):>14}") print(f"{'Complete facts inspected':<34} {len(facts):>14,d}") print(f"{'Complete-key duplicates':<34} {duplicate_count:>14,d}") ok = (goodwill, consolidated_assets, duplicate_count) == (70_000, 4_440_000, 1) print("\nControls:", "PASS" if ok else "FAIL") print("Boundary: no tag selection, valuation, or control conclusion is performed.")