packages feed

phino-0.0.169: test-resources/evaluate-packs/joins-a-number-with-a-formation-an-undress-took-the-number-out-of.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The left side is a number and the right side a formation binding that number
# in Ο† alone, so 𝕄 brings the left side to a number and stops at the right side
# one Ο† short of it, and the join could never make one term of the two (#2174).
# An operand of 'undress' morphs a path from '$' where it stands, as an operand
# of 'morph' does, and then, while the term is a formation binding Ο† alone
# beside its ρ, dispatches Ο† off it and morphs that, so both sides come to a
# number. The protocol writes each such pass as an 'undressed' line naming the
# Ο† it took and the 𝕄 block named after it, and comments the line of the meta
# with 'undress' only where a pass took place.
symbolic: |
  - Ξ»: L_fork
    dataize:
      𝛿1: $.on🌡
    undress:
      𝑛1: $.left🌡
      𝑛2: $.right🌡
    symbolize:
      𝑛3: 𝑛1
      𝑛4: 𝑛2
    join:
      on: 𝛿1
      left: 𝑛3
      right: 𝑛4
location: 'Q.y'
input: '⟦ bytes(Ο†) ↦ ⟦⟧, number(Ο†) ↦ ⟦ neg ↦ ⟦ Ο† ↦ ρ ⟧ ⟧, y ↦ ⟦ Ξ» ‍ L_fork, on🌡 ↦ ⟦ Ξ» ‍ 𝜎1 ⟧, left🌡 ↦ 42, right🌡 ↦ ⟦ Ο† ↦ 7 ⟧ ⟧.Ο† ⟧'
result: '𝜎4:Ξ»:Ο†'
protocol: |
  𝕄(Ξ¦.y):
    𝔼(L_fork):
      𝔻(ΞΎ.on🌡):
        𝛿·1Β·1 ≔ 𝔻(𝜎1:Ξ»)
      𝛿1Β·1 ≔ 𝛿·1Β·1  # 𝔻(ΞΎ.on🌡)
      𝕄(ΞΎ.left🌡):
        normalized 𝑛·1Β·1 ≔ ⟦ Ο† ↦ βˆ…, neg ↦ ρ:Ο† ⟧  # Ξ¦.number
        𝑛·1Β·2 ≔ 42.0
        𝑛·1Β·3 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-45-00-00-00-00-00-00:Ξ” ), neg ↦ ρ:Ο† ⟧
        morphed 𝑛·1Β·4 ≔ 𝑛·1Β·3
      𝑛1Β·1 ≔ 𝑛·1Β·4  # 𝕄(ΞΎ.left🌡)
      𝕄(ΞΎ.right🌡):
        morphed 𝑛·1Β·5 ≔ 7.0:Ο†
      undressed 𝑛·1Β·6 ≔ 𝑛·1Β·5.Ο†
      𝕄(𝑛·1Β·6):
        𝑛·1Β·7 ≔ 7.0
        𝑛·1Β·8 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-1C-00-00-00-00-00-00:Ξ” ), neg ↦ ρ:Ο† ⟧
        morphed 𝑛·1Β·9 ≔ 𝑛·1Β·8
      𝑛2Β·1 ≔ 𝑛·1Β·9  # undress(ΞΎ.right🌡)
      symbolized 𝜎2 ≔ 40-45-00-00-00-00-00-00  # 42.0
      𝑛3Β·1 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎2:Ξ» ), neg ↦ ρ:Ο† ⟧  # symbolize(𝑛1 of L_fork)
      symbolized 𝜎3 ≔ 40-1C-00-00-00-00-00-00  # 7.0
      𝑛4Β·1 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎3:Ξ» ), neg ↦ ρ:Ο† ⟧  # symbolize(𝑛2 of L_fork)
      joined 𝜎4 ≔ 𝛿1Β·1 ? 𝜎2 : 𝜎3
      𝑛·1Β·10 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎4:Ξ» ), neg ↦ ρ:Ο† ⟧
      evaluated 𝑛·1Β·11 ≔ 𝑛·1Β·10  # ⟦ Ξ» ‍ L_fork, on🌡 ↦ 𝜎1:Ξ», left🌡 ↦ 𝑛·1Β·2, right🌡 ↦ 𝑛·1Β·5 ⟧
    normalized 𝑛·0Β·1 ≔ Ξ¦.bytes( Ο† ↦ 𝜎4:Ξ» )  # 𝑛·1Β·11.Ο†
    normalized 𝑛·0Β·2 ≔ βˆ…:Ο†  # Ξ¦.bytes
    𝑛·0Β·3 ≔ Ξ¦.bytes( Ο† ↦ 𝜎4:Ξ» )
    𝑛·0Β·4 ≔ 𝜎4:Ξ»:Ο†
    morphed 𝑛·0Β·5 ≔ 𝑛·0Β·4