packages feed

phino-0.0.157: test-resources/evaluate-packs/joins-a-side-holding-a-datum-a-symbolize-turned-into-a-symbol.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The left side is a number written as a literal, so 𝕄 brings it to a number
# whose bytes hold a datum. The right side is a number some firing computed,
# so its bytes hold a symbol. Both are numbers of one shape and differ in the
# value alone, yet no join makes one term of a datum and a symbol (#1968). A
# 'symbolize' line turns every datum of a term into a fresh symbol, so '𝑛3'
# holds 𝜎4 where '𝑛1' held the datum, and the protocol writes that 𝜎4 stands
# for that datum. The line of '𝑛4', whose term holds no datum, is commented
# with '𝑛2' alone. The join takes the metas the 'symbolize' lines bound and
# joins 𝜎4 with 𝜎2 into one fresh symbol 𝜎5.
symbolic: |
  - Ξ»: L_fork
    dataize:
      𝛿1: $.c
    morph:
      𝑛1: $.a
      𝑛2: $.b
    symbolize:
      𝑛3: 𝑛1
      𝑛4: 𝑛2
    join:
      on: 𝛿1
      left: 𝑛3
      right: 𝑛4
location: 'Q.y'
input: '⟦ number ↦ ⟦ Ο† ↦ βˆ… ⟧, bytes ↦ ⟦ Ο† ↦ βˆ… ⟧, y ↦ ⟦ c ↦ ⟦ Ξ» ‍ 𝜎3 ⟧, a ↦ ⟦ Ο† ↦ Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ ⟦ Ξ” ‍ 3F-F0-00-00-00-00-00-00 ⟧ ) ) ⟧, b ↦ ⟦ Ο† ↦ Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ ⟦ Ξ» ‍ 𝜎2 ⟧ ) ) ⟧, Ξ» ‍ L_fork ⟧.Ο† ⟧'
result: 'Ξ¦.bytes( Ο† ↦ 𝜎5:Ξ» ):Ο†'
protocol: |
  𝕄(Ξ¦.y):
    𝔼(L_fork):
      𝛿1Β·1 := 𝔻(𝜎3:Ξ»)  # 𝔻(ΞΎ.c)
      𝑛1Β·1 := 1:Ο†  # 𝕄(ΞΎ.a)
      𝑛2Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎2:Ξ» ) ):Ο†  # 𝕄(ΞΎ.b)
      symbolized 𝜎4 := 3F-F0-00-00-00-00-00-00  # 1.0
      𝑛3Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎4:Ξ» ) ):Ο†  # symbolize(𝑛1)
      𝑛4Β·1 := 𝑛2Β·1  # 𝑛2
      joined 𝜎5 := 𝛿1Β·1 ? 𝜎4 : 𝜎2
      𝑛·1Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎5:Ξ» ) ):Ο†  # 𝑛3, 𝑛4
    𝑛·0Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎5:Ξ» ) )