packages feed

phino-0.0.165: 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: |
  𝕄(Φ.φ):
    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number
    𝑛·0·2 := Φ.number( φ ↦ 𝜎2:λ )
    𝑛·0·3 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧
    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus
    𝑛·0·5 := 𝑛·0·2.plus( x ↦ Φ.number( φ ↦ 𝜎5:λ ) )
    𝑛·0·6 := ⟦ 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.φ
        normalized 𝑛·1·5 := 𝜎2:λ  # 𝑛·1·4
        𝛿·1·1 := 𝔻(𝜎2:λ)
      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)
      𝔻(ξ.x):
        𝕄(ξ.x):
          𝑛·1·6 := Φ.number( φ ↦ 𝜎5:λ )
          𝑛·1·7 := ⟦ φ ↦ 𝜎5:λ, plus(x) ↦ L_number_plus:λ ⟧
          morphed 𝑛·1·8 := 𝑛·1·7
        boxed 𝑛·1·9 := 𝑛·1·8.φ
        normalized 𝑛·1·10 := 𝜎5:λ  # 𝑛·1·9
        𝛿·1·2 := 𝔻(𝜎5:λ)
      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)
      𝑛·1·11 := Φ.number( φ ↦ 𝜎6:λ )  # 𝑛
      𝕄(𝑛·1·11):
        𝑛·1·12 := Φ.number( φ ↦ 𝜎6:λ )
        𝑛·1·13 := ⟦ φ ↦ 𝜎6:λ, plus(x) ↦ L_number_plus:λ ⟧
        morphed 𝑛·1·14 := 𝑛·1·13
      𝑛·1·15 := 𝑛·1·14  # 𝕄(𝑛·1·11)
    normalized 𝑛·0·7 := 𝜎6:λ  # 𝑛·1·15.φ
    morphed 𝑛·0·8 := 𝑛·0·7