**Puzzle 77**

**Claim** If \\( f(x) \otimes_Y f(x') = f( x \otimes_X x')\\) then the relation \\(\leq_X\\) induced by \\(f\\) makes \\( (X, \otimes_X, 1_X, \leq_X) \\) a monoidal preorder.

(In the second example below I show that this is actually too strong of a condition on \\(f\\) but it's a starting place! )

*Proof:* Suppose that \\(x \leq_X x'\\) and \\(y \leq_X y' \\). Then \\(f(x) \leq_Y f(x')\\) and \\(f(y) \leq_Y f(y' )\\). Since \\((Y, \otimes_Y, 1_Y, \leq_Y)\\) is a monoidal preorder this means that \\[f(x) \otimes_Y f(y) \leq_Y f(x') \otimes_Y f(y'). \\] \\(f\\) exactly preserves the tensor structure so, \\[f(x \otimes_X y) \leq_Y f(x' \otimes_X y') \\] which implies that \\(x \otimes_X y \leq_X x' \otimes_X y'\\) by the definition of \\( \leq_X\\).

**Example** I started thinking about some examples inspired by John's grocery example and the H20 example from Lecture 22 .

Let \\(X\\) represent collections of groceries that can be bought at the "Eggs and Milk" store. Since the "Eggs and Milk" store only sells eggs and milk, every element of \\(X\\) can be represented by a pair \\((a,b) \in \mathbb N^2\\) where \\(a\\) is the number of eggs bought and \\(b\\) is the number of milks bought. \\(X\\) can be turned into a monoid by defining \\[(a,b) \otimes_X (c,d) = (a + c, b + d) \\] and where \\(1_X = (0,0) \\). Suppose that eggs cost \$1 and milk costs \$2. This means we should define a cost map \\(f: X \to \mathbb R\\) by \(f ((a,b)) = a + 2b\\). \\(f\\) preserves the \\(\otimes\\) structure because \\[f((a,b)) \otimes_{\mathbb R} f((c,d)) = (a + 2b) + (c + 2d) = (a + c) + 2(b + d) = f((a+c, b + d)) = f((a,b) \otimes_X (c,d)).\\] Another way of saying this is "The cost of buying two sets of groceries separately is the same as the cost of buying them together". This means that we have turned the groceries into a monoidal preorder!

**Example**

Suppose that the "Eggs and Milk" store now charges \$0.10 for a bag with each purchase. This means that the cost function now looks like \\[g((a,b)) = a + 2b + 0.10\\] \\(g\\) doesn't exactly preserve the \\(\otimes\\) structure because now the bag charge means that: "the cost of buying two sets of groceries separately is *more* than the cost of buying them together". In math words, \\[g((a,b)) \otimes g((c,d)) \geq g((a \otimes c, b \otimes d)) .\\] I was interested that this is the opposite condition from what Marius proposed.

My next question was whether \\(g\\) induced a monoidal preorder on the groceries anyway. It does, essentially because the bag charges cancel out. Here is the math: Suppose that \\[(a,b) \leq (c,d) \text{ and }(a',b') \leq (c',d')\\] Therefore \\[g(a,b) \leq g(c,d) \text{ and }g(a',b') \leq g(c',d')\\]

\\[ \implies a+ 2b + 0.10 \leq c + 2d + 0.10 \text{ and }a' + 2b' + 0.10 \leq c' + 2d' + 0.10\\]

\\[ \implies a+ 2b \leq c + 2d \text{ and }a' + 2b' \leq c' + 2d'\\]

\\[ \implies (a + a') + 2(b + b') \leq (c + c') + 2(d + d') \\]

\\[ \implies (a + a') + 2(b + b') + 0.10 \leq (c + c') + 2(d + d') + 0.10 \\]

\\[ \implies g((a,b) \otimes (a', b')) \leq g((c,d) \otimes (c',d')) \\]

\\[ \implies (a,b) \otimes (a', b') \leq (c,d) \otimes (c',d') \\]

This lead me to a new claim...

**New Claim** If \\( f(x) \otimes_Y f(x') \geq f( x \otimes_X x')\\) then the relation \\(\leq_X\\) induced by \\(f\\) makes \\( (X, \otimes_X, 1_X, \leq_X) \\) a monoidal preorder.

But I have yet to prove it! I'm also wondering about Marius's suggestion that \\( f\\) should satisfy

> \\(1_Y\leq_Y f(1_X)\\)

This is true in both my examples, since buying zero items costs more than or equal to \$0.

Phew that was a lot! Interested to hear what others think!

**Claim** If \\( f(x) \otimes_Y f(x') = f( x \otimes_X x')\\) then the relation \\(\leq_X\\) induced by \\(f\\) makes \\( (X, \otimes_X, 1_X, \leq_X) \\) a monoidal preorder.

(In the second example below I show that this is actually too strong of a condition on \\(f\\) but it's a starting place! )

*Proof:* Suppose that \\(x \leq_X x'\\) and \\(y \leq_X y' \\). Then \\(f(x) \leq_Y f(x')\\) and \\(f(y) \leq_Y f(y' )\\). Since \\((Y, \otimes_Y, 1_Y, \leq_Y)\\) is a monoidal preorder this means that \\[f(x) \otimes_Y f(y) \leq_Y f(x') \otimes_Y f(y'). \\] \\(f\\) exactly preserves the tensor structure so, \\[f(x \otimes_X y) \leq_Y f(x' \otimes_X y') \\] which implies that \\(x \otimes_X y \leq_X x' \otimes_X y'\\) by the definition of \\( \leq_X\\).

**Example** I started thinking about some examples inspired by John's grocery example and the H20 example from Lecture 22 .

Let \\(X\\) represent collections of groceries that can be bought at the "Eggs and Milk" store. Since the "Eggs and Milk" store only sells eggs and milk, every element of \\(X\\) can be represented by a pair \\((a,b) \in \mathbb N^2\\) where \\(a\\) is the number of eggs bought and \\(b\\) is the number of milks bought. \\(X\\) can be turned into a monoid by defining \\[(a,b) \otimes_X (c,d) = (a + c, b + d) \\] and where \\(1_X = (0,0) \\). Suppose that eggs cost \$1 and milk costs \$2. This means we should define a cost map \\(f: X \to \mathbb R\\) by \(f ((a,b)) = a + 2b\\). \\(f\\) preserves the \\(\otimes\\) structure because \\[f((a,b)) \otimes_{\mathbb R} f((c,d)) = (a + 2b) + (c + 2d) = (a + c) + 2(b + d) = f((a+c, b + d)) = f((a,b) \otimes_X (c,d)).\\] Another way of saying this is "The cost of buying two sets of groceries separately is the same as the cost of buying them together". This means that we have turned the groceries into a monoidal preorder!

**Example**

Suppose that the "Eggs and Milk" store now charges \$0.10 for a bag with each purchase. This means that the cost function now looks like \\[g((a,b)) = a + 2b + 0.10\\] \\(g\\) doesn't exactly preserve the \\(\otimes\\) structure because now the bag charge means that: "the cost of buying two sets of groceries separately is *more* than the cost of buying them together". In math words, \\[g((a,b)) \otimes g((c,d)) \geq g((a \otimes c, b \otimes d)) .\\] I was interested that this is the opposite condition from what Marius proposed.

My next question was whether \\(g\\) induced a monoidal preorder on the groceries anyway. It does, essentially because the bag charges cancel out. Here is the math: Suppose that \\[(a,b) \leq (c,d) \text{ and }(a',b') \leq (c',d')\\] Therefore \\[g(a,b) \leq g(c,d) \text{ and }g(a',b') \leq g(c',d')\\]

\\[ \implies a+ 2b + 0.10 \leq c + 2d + 0.10 \text{ and }a' + 2b' + 0.10 \leq c' + 2d' + 0.10\\]

\\[ \implies a+ 2b \leq c + 2d \text{ and }a' + 2b' \leq c' + 2d'\\]

\\[ \implies (a + a') + 2(b + b') \leq (c + c') + 2(d + d') \\]

\\[ \implies (a + a') + 2(b + b') + 0.10 \leq (c + c') + 2(d + d') + 0.10 \\]

\\[ \implies g((a,b) \otimes (a', b')) \leq g((c,d) \otimes (c',d')) \\]

\\[ \implies (a,b) \otimes (a', b') \leq (c,d) \otimes (c',d') \\]

This lead me to a new claim...

**New Claim** If \\( f(x) \otimes_Y f(x') \geq f( x \otimes_X x')\\) then the relation \\(\leq_X\\) induced by \\(f\\) makes \\( (X, \otimes_X, 1_X, \leq_X) \\) a monoidal preorder.

But I have yet to prove it! I'm also wondering about Marius's suggestion that \\( f\\) should satisfy

> \\(1_Y\leq_Y f(1_X)\\)

This is true in both my examples, since buying zero items costs more than or equal to \$0.

Phew that was a lot! Interested to hear what others think!