phino-0.0.169: test-resources/evaluate-packs/joins-a-bare-symbol-a-cast-brought-into-the-shape-of-a-decorator.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The right side is a bare symbol, a branch that already reached its data,
# while the left side wraps its data in Ο and holds 'k' beside it, a branch
# one step short of its data. As they are, the two differ at .k, the right
# side has Ξ», and the join diverges, even under 'otherwise' (#2187). A 'cast'
# block reads its two metas as one pair and casts the bare symbol into a copy
# of the left side with π3 in place of π2 at the end of its Ο chain, so the
# two sides differ in their symbols alone and the join makes one term of them.
# The cast mints no symbol. The protocol writes the line of 'π20', which took
# the cast, as 'cast π20Β·1 β β¦' with the meta it read and the meta whose
# shape it took. The line of 'π19' binds its term as it is and writes
# nothing (#2192).
symbolic: |
- Ξ»: L_fork
dataize:
πΏ1: $.onπ΅
morph:
π13: $.leftπ΅
π14: $.rightπ΅
cast:
π19: π13
π20: π14
join:
on: πΏ1
left: π19
right: π20
otherwise: L_fork
location: 'Q.e1'
input: 'β¦ e1 β¦ β¦ Ξ» β€ L_fork, onπ΅ β¦ β¦ Ξ» β€ π1 β§, leftπ΅ β¦ β¦ k β¦ β¦β§, Ο β¦ β¦ Ξ» β€ π2 β§ β§, rightπ΅ β¦ β¦ Ξ» β€ π3 β§ β§.Ο β§'
result: 'π4:Ξ»'
protocol: |
π(Ξ¦.e1):
πΌ(L_fork):
π»(ΞΎ.onπ΅):
πΏΒ·1Β·1 β π»(π1:Ξ»)
πΏ1Β·1 β πΏΒ·1Β·1 # π»(ΞΎ.onπ΅)
π(ΞΎ.leftπ΅):
morphed πΒ·1Β·1 β β¦ k β¦ β¦β§, Ο β¦ π2:Ξ» β§
π13Β·1 β πΒ·1Β·1 # π(ΞΎ.leftπ΅)
π(ΞΎ.rightπ΅):
morphed πΒ·1Β·2 β π3:Ξ»
π14Β·1 β πΒ·1Β·2 # π(ΞΎ.rightπ΅)
cast π20Β·1 β β¦ k β¦ β¦β§, Ο β¦ π3:Ξ» β§ # π14Β·1 up to π13Β·1
joined π4 β πΏ1Β·1 ? π2 : π3
πΒ·1Β·3 β β¦ k β¦ β¦β§, Ο β¦ π4:Ξ» β§
evaluated πΒ·1Β·4 β πΒ·1Β·3 # β¦ Ξ» β€ L_fork, onπ΅ β¦ π1:Ξ», leftπ΅ β¦ πΒ·1Β·1, rightπ΅ β¦ π3:Ξ» β§
normalized πΒ·0Β·1 β π4:Ξ» # πΒ·1Β·4.Ο
morphed πΒ·0Β·2 β πΒ·0Β·1