packages feed

phino-0.0.157: test-resources/evaluate-packs/joins-two-sides-a-stay-brought-to-one-shape.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The left side reads the ρ of a copy, the way 'as-number' of EO reads its
# 'data', so 𝕄 brings it to a number whose bytes carry the copy as an extra
# '( ρ ↦ ⟦ … ⟧ )' tail. The right side is a number made of no object and has
# no such tail. Both are numbers made of one symbol, yet the tail kept the
# join from making one term of them (#1967). A 'stay' line drops every ρ
# applied to a dispatch, which 'stay' or 'skip' of normalization drops anyway
# once the dispatch comes to a formation, so the two sides differ in their
# symbols alone. The join takes the metas the 'stay' lines bound as they are
# and makes one term of them with a fresh symbol.
# The protocol comments the line of '𝑛3', which dropped a tail, with
# 'stay(𝑛1)', and the line of '𝑛4', which dropped nothing, with '𝑛2' alone.
symbolic: |
  - Ξ»: L_fork
    dataize:
      𝛿1: $.c
    morph:
      𝑛1: $.a
      𝑛2: $.b
    stay:
      𝑛3: 𝑛1
      𝑛4: 𝑛2
    join:
      on: 𝛿1
      left: 𝑛3
      right: 𝑛4
location: 'Q.y'
hide-rho: false
input: '⟦ number ↦ ⟦ Ο† ↦ βˆ… ⟧, bytes ↦ ⟦ Ο† ↦ βˆ… ⟧, y ↦ ⟦ c ↦ ⟦ Ξ» ‍ 𝜎3 ⟧, a ↦ ⟦ Ο† ↦ Ξ¦.number( Ο† ↦ ⟦ ρ ↦ Ξ¦.bytes( Ο† ↦ ⟦ Ξ» ‍ 𝜎1 ⟧ ), x ↦ βˆ… ⟧.ρ ) ⟧, b ↦ ⟦ Ο† ↦ Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ ⟦ Ξ» ‍ 𝜎2 ⟧ ) ) ⟧, Ξ» ‍ L_fork ⟧.Ο† ⟧'
result: 'Ξ¦.bytes( Ο† ↦ 𝜎4:Ξ» ):Ο†'
protocol: |
  𝕄(Ξ¦.y):
    𝔼(L_fork):
      𝛿1Β·1 := 𝔻(𝜎3:Ξ»)  # 𝔻(ΞΎ.c)
      𝑛1Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎1:Ξ», ρ ↦ ⟦ ρ ↦ Ξ¦.bytes( Ο† ↦ 𝜎1:Ξ» ), x ↦ βˆ… ⟧ ) ):Ο†  # 𝕄(ΞΎ.a)
      𝑛2Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎2:Ξ» ) ):Ο†  # 𝕄(ΞΎ.b)
      𝑛3Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎1:Ξ» ) ):Ο†  # stay(𝑛1)
      𝑛4Β·1 := 𝑛2Β·1  # 𝑛2
      joined 𝜎4 := 𝛿1Β·1 ? 𝜎1 : 𝜎2
      𝑛·1Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎4:Ξ» ) ):Ο†  # 𝑛3, 𝑛4
    𝑛·0Β·1 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎4:Ξ» ) )