packages feed

phino-0.0.158: test-resources/evaluate-packs/joins-two-numbers-into-one-symbol-keeping-the-constant-a-method-holds.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# Both sides are copies of 'number', so both carry its method 'neg', and 'neg'
# holds the library constant '-1'. The left side is the literal '42', the
# right one a number some firing computed. A 'symbolize' line turning every
# datum of a term into a symbol turned the '-1' of each side into a symbol of
# its own, and the join joined the two into one more symbol, though both sides
# hold the same '-1' there (#2131). The line leaves a method of a formation
# holding no λ alone, so the '42' alone becomes a symbol, 𝜎4, the '-1' stays a
# datum on both sides, and the join makes one symbol, 𝜎5, of 𝜎4 and 𝜎2.
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 ↦ ⟦ Ο† ↦ βˆ…, neg ↦ ⟦ Ο† ↦ ΞΎ.ρ.times( x ↦ Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ ⟦ Ξ” ‍ BF-F0-00-00-00-00-00-00 ⟧ ) ) ) ⟧ ⟧, bytes ↦ ⟦ Ο† ↦ βˆ… ⟧, y ↦ ⟦ c ↦ ⟦ Ξ» ‍ 𝜎3 ⟧, a ↦ Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ ⟦ Ξ” ‍ 40-45-00-00-00-00-00-00 ⟧ ) ), b ↦ Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ ⟦ Ξ» ‍ 𝜎2 ⟧ ) ), Ξ» ‍ L_fork ⟧.Ο† ⟧'
result: '𝜎5:Ξ»:Ο†'
protocol: |
  𝕄(Ξ¦.y):
    𝔼(L_fork):
      𝔻(ΞΎ.c):
        𝛿·1Β·1 := 𝔻(𝜎3:Ξ»)
      𝛿1Β·1 := 𝛿·1Β·1  # 𝔻(ΞΎ.c)
      𝕄(ΞΎ.a):
        𝑛·1Β·1 := 42.0
        morphed 𝑛·1Β·2 := 𝑛·1Β·1
      𝑛1Β·1 := 𝑛·1Β·2  # 𝕄(ΞΎ.a)
      𝕄(ΞΎ.b):
        𝑛·1Β·3 := Ξ¦.number( Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎2:Ξ» ) )
        morphed 𝑛·1Β·4 := 𝑛·1Β·3
      𝑛2Β·1 := 𝑛·1Β·4  # 𝕄(ΞΎ.b)
      symbolized 𝜎4 := 40-45-00-00-00-00-00-00  # 42.0
      𝑛3Β·1 := ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎4:Ξ» ), neg ↦ ρ.times( x ↦ -1.0 ):Ο† ⟧  # symbolize(𝑛1)
      𝑛4Β·1 := 𝑛2Β·1  # 𝑛2
      joined 𝜎5 := 𝛿1Β·1 ? 𝜎4 : 𝜎2
      𝑛·1Β·5 := ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 𝜎5:Ξ» ), neg ↦ ρ.times( x ↦ -1.0 ):Ο† ⟧  # 𝑛3, 𝑛4
    𝑛·0Β·1 := Ξ¦.bytes( Ο† ↦ 𝜎5:Ξ» )
    morphed 𝑛·0Β·2 := 𝑛·0Β·1