packages feed

phino-0.0.169: 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(
          x ↦ Ξ¦.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:Ξ» )  # 𝑛 of L_number_plus
      𝕄(𝑛·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)
      evaluated 𝑛·1Β·16 ≔ 𝑛·1Β·15  # 𝑛·0Β·6
    normalized 𝑛·0Β·7 ≔ 𝜎6:Ξ»  # 𝑛·1Β·16.Ο†
    morphed 𝑛·0Β·8 ≔ 𝑛·0Β·7