phino-0.0.156: test-resources/evaluate-packs/joins-a-branch-it-unfolded-whose-phi-reads-its-own-object.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A fork whose one branch is an ordinary object: a formation with no Ξ», whose
# value sits in a Ο that reads an attribute of the object itself. π stops at
# that formation, so the branch and a bare symbol differ in shape and depth,
# and the join alone cannot pair them. An 'unfold' line takes the step the
# join used to hide (#1921): it morphs the Ο of that branch, fires what it
# comes to through πΌ, the way an 'evaluate' line does, and binds the answer,
# so the 'join' line pairs two bare symbols (#1885).
symbolic: |
- Ξ»: L_eq
π: β¦ Ο β¦ β¦ Ξ» β€ π β§ β§
- Ξ»: L_fork
morph:
π1: $.a
π2: $.b
unfold:
π3: π1
join:
π4: [π3, π2]
π: π4
location: 'Q.y'
input: 'β¦ y β¦ β¦ a β¦ β¦ Ο β¦ ΞΎ.eq, eq β¦ β¦ Ξ» β€ L_eq β§ β§, b β¦ β¦ Ο β¦ β¦ Ξ» β€ π1 β§ β§, Ξ» β€ L_fork β§.Ο β§'
result: 'π3:Ξ»'
protocol: |
π(Ξ¦.y):
πΌ(L_fork):
π1Β·1 := β¦ Ο β¦ eq, eq β¦ L_eq:Ξ» β§ # π(ΞΎ.a)
π2Β·1 := π1:Ξ»:Ο # π(ΞΎ.b)
π3Β·1 := L_eq:Ξ» # π(π1.Ο)
πΌ(L_eq): # πΌ(π1)
πΒ·2Β·1 := π2:Ξ»:Ο # π
πΒ·2Β·2 := π2:Ξ»:Ο # π(πΒ·2Β·1)
π3Β·1 := πΒ·2Β·2 # πΌ(π1)
π»(π3:Ξ») β { π»(π2:Ξ»), π»(π1:Ξ») }
π4Β·1 := π3:Ξ»:Ο # [π3, π2]
πΒ·1Β·1 := π4Β·1 # π
πΒ·1Β·2 := π4Β·1 # π(πΒ·1Β·1)