This was actually done by ChatGPT
Question
Now please do the same thing, but for payment:
```python
pay = ixpayment(wallet, source, quantity + conciliation(wallet, source, target, quantity))
```
Answer
Sure, let's go through the derivation process with the new definition of `pay`:
We start with the equation:
```python
your_value_feign == your_value_honest
```
This can be transformed to:
```python
value(ix_feigned, honest_valuation) == value(ix_honest, honest_valuation)
```
Now, we substitute the `pay` function:
```python
value(pay(wallet, feigned_valuation, supplier_valuation, quantity), honest_valuation) == value(pay(wallet, honest_valuation, supplier_valuation, quantity), honest_valuation)
```
We're checking this particular payment function:
```python
pay = ixpayment(wallet, source, quantity + conciliation(wallet, source, target, quantity))
```
So, we substitute the `pay` function:
```python
value(ixpayment(wallet, feigned_valuation, quantity + conciliation(wallet, feigned_valuation, supplier_valuation, quantity)), honest_valuation) == value(ixpayment(wallet, honest_valuation, quantity + conciliation(wallet, honest_valuation, supplier_valuation, quantity)), honest_valuation)
```
In this context we're using this definition of `conciliation`:
```python
def conciliation(wallet, source, target, quantity):
return (quantity*wallet).dot(source - target)/wallet.dot(target)
```
So, we substitute the `conciliation` function:
```python
value(ixpayment(wallet, feigned_valuation, quantity + (quantity*wallet).dot(feigned_valuation - supplier_valuation)/wallet.dot(supplier_valuation)), honest_valuation) == value(ixpayment(wallet, honest_valuation, quantity + (quantity*wallet).dot(honest_valuation - supplier_valuation)/wallet.dot(supplier_valuation)), honest_valuation)
```
Now we might as well make some substitutions for `ixpayment`:
```python
def ixpayment(wallet, valuation, quantity):
return wallet * (quantity / value(wallet, valuation))
```
So, we substitute the `ixpayment` function:
```python
value(wallet * ((quantity + (quantity*wallet).dot(feigned_valuation - supplier_valuation)/wallet.dot(supplier_valuation)) / wallet.dot(feigned_valuation)), honest_valuation) == value(wallet * ((quantity + (quantity*wallet).dot(honest_valuation - supplier_valuation)/wallet.dot(supplier_valuation)) / wallet.dot(honest_valuation)), honest_valuation)
```
And now finally we replace `value`:
```python
def value(wallet, valuation):
return wallet.dot(valuation)
```
So, we substitute the `value` function:
```python
(wallet * ((quantity + (quantity*wallet).dot(feigned_valuation - supplier_valuation)/wallet.dot(supplier_valuation)) / wallet.dot(feigned_valuation))).dot(honest_valuation) == (wallet * ((quantity + (quantity*wallet).dot(honest_valuation - supplier_valuation)/wallet.dot(supplier_valuation)) / wallet.dot(honest_valuation))).dot(honest_valuation)
```
This is the final derived equation.
Then we convert to symbols:
(w * ((q + (q*w).(f -s)/w.s)/w.f)).h == (w * ((q + (q*w).(h - s)/w.s)/w.h)).h
And simplify using wolfram alpha:
(w ((q w).(h - s) + q w.s))/(w.h w.s).h = (w ((q w).(f - s) + q w.s))/(w.f w.s).h