Gross transfers and individual cash flows in the one actually offered interior-price corner. This does not compute a price from private cutoffs.
def
MindFormal.A595Trade.Ticket.executionCount
{N : ℕ}
{M : Fin N → ℕ}
(offers : List (Ticket M))
(h : Histories M)
:
Equations
- MindFormal.A595Trade.Ticket.executionCount [] h x✝ = 0
- MindFormal.A595Trade.Ticket.executionCount (o :: os) h x✝ = (if o.Legal h x✝ then 1 else 0) + MindFormal.A595Trade.Ticket.executionCount os h (o.settle h x✝)
Instances For
theorem
MindFormal.A595Trade.Ticket.common_price_completion
{N : ℕ}
{M : Fin N → ℕ}
(offers : List (Ticket M))
(h : Histories M)
(s : Ledger N)
(target : Finset ℕ)
(price : ℝ)
(hp : ∀ o ∈ offers, o.price = price)
(hdirect : ∀ o ∈ offers, ∀ (z : Ledger N), o.Legal h z → ↑o.seller ∉ target ∧ ↑o.buyer ∈ target)
(ht : (run offers h s).holders = target)
:
executionCount offers h s = missing target s.holders ∧ (∀ p ∈ paidPrices offers h s, p = price) ∧ ∀ (i : Fin N), (run offers h s).cash i - s.cash i = price * (unitHolding s.holders ↑i - unitHolding target ↑i)