phino-0.0.152: test-resources/evaluate-packs/joins-the-two-branches-of-a-fork.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A fork answers neither of its branches: nobody has picked between the two, so
# handing one of them through would say that the branch point is not there at
# all. What it answers with is the join of the two β the shape both of them
# have, with a fresh symbol wherever they carry two different unknowns β and
# what that fresh symbol stands for stands on a line of its own, since a π is
# the name of a Ξ» function and nothing is assigned to it. The branches differ
# under Ο, that being where the value of a branch is reached and so the only
# place the join looks at all (#1293).
symbolic: |
- Ξ»: L_fork
morph:
π1: $.a
π2: $.b
join:
π3: [π1, π2]
π: π3
location: 'Q.y'
input: 'β¦ y β¦ β¦ a β¦ β¦ Ο β¦ β¦ Ξ» β€ π1 β§ β§, b β¦ β¦ Ο β¦ β¦ Ξ» β€ π2 β§ β§, Ξ» β€ L_fork β§.Ο β§'
result: 'π3:Ξ»'
protocol: |
π(Ξ¦.y):
πΌ(L_fork):
π1Β·1 := π1:Ξ»:Ο # π(ΞΎ.a)
π2Β·1 := π2:Ξ»:Ο # π(ΞΎ.b)
π»(π3:Ξ») β { π»(π1:Ξ»), π»(π2:Ξ») }
π3Β·1 := π3:Ξ»:Ο # [π1, π2]
πΒ·1Β·1 := π3Β·1 # π
πΒ·1Β·2 := π3Β·1 # π(πΒ·1Β·1)