packages feed

phino-0.0.159: test-resources/evaluate-packs/tells-two-carried-symbols-apart-in-one-firing.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# Both operands of the firing are symbols the program came in with, and both
# dataize to the very same 42. Only the protocol tells them apart: it writes
# the symbol each datum was manufactured for, so 𝜎2 and 𝜎5 stay two unknowns
# and not one.
symbolic: |
  - λ: L_number_plus
    dataize:
      𝛿1: $.ρ
      𝛿2: $.x
    𝑛: Φ.number( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )
location: 'Q.@'
input: >
  ⟦ bytes(φ) ↦ ⟦⟧,
    number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,
    φ ↦ Φ.number( φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ).plus(
          Φ.number( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ) ).φ ⟧
result: '𝜎6:λ'
protocol: |
  𝕄(Φ.φ):
    𝑛·0·1 := Φ.number( φ ↦ 𝜎2:λ )
    𝑛·0·2 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧
    𝑛·0·3 := 𝑛·0·1.plus( x ↦ Φ.number( φ ↦ 𝜎5:λ ) )
    𝑛·0·4 := ⟦ x ↦ Φ.number( φ ↦ 𝜎5:λ ), λ ⤍ L_number_plus ⟧
    𝔼(L_number_plus):
      𝔻(ξ.ρ):
        𝕄(ξ.ρ):
          𝑛·1·1 := Φ.number( φ ↦ 𝜎2:λ )
          𝑛·1·2 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧
          morphed 𝑛·1·3 := 𝑛·1·2
        boxed 𝑛·1·4 := 𝑛·1·3.φ
        𝛿·1·1 := 𝔻(𝜎2:λ)
      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)
      𝔻(ξ.x):
        𝕄(ξ.x):
          𝑛·1·5 := Φ.number( φ ↦ 𝜎5:λ )
          𝑛·1·6 := ⟦ φ ↦ 𝜎5:λ, plus(x) ↦ L_number_plus:λ ⟧
          morphed 𝑛·1·7 := 𝑛·1·6
        boxed 𝑛·1·8 := 𝑛·1·7.φ
        𝛿·1·2 := 𝔻(𝜎5:λ)
      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)
      𝑛·1·9 := Φ.number( φ ↦ 𝜎6:λ )  # 𝑛
      𝕄(𝑛·1·9):
        𝑛·1·10 := Φ.number( φ ↦ 𝜎6:λ )
        𝑛·1·11 := ⟦ φ ↦ 𝜎6:λ, plus(x) ↦ L_number_plus:λ ⟧
        morphed 𝑛·1·12 := 𝑛·1·11
      𝑛·1·13 := 𝑛·1·12  # 𝕄(𝑛·1·9)
    morphed 𝑛·0·5 := 𝜎6:λ