packages feed

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)