packages feed

phino-0.0.153 / test-resources / evaluate-packs / joins-a-fork-whose-branches-a-rewrite-brought-to-one-shape.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com# SPDX-License-Identifier: MIT---# yamllint disable rule:line-length# The very fork that does not join, with a 'rewrite' block in front of the# join: the second branch carries an 'x' the first does not, and a rule of the# entry drops it, so the two have one shape once they are compared and the# fork answers their join. Each 'rewrite' line binds a meta of its own, which# the protocol writes like a 'symbolize' one, commented with the meta it was# rewritten from; a branch no rule matches is bound as it was (#1409).symbolic: |  - Ξ»: L_fork    morph:      𝑛1: $.a      𝑛2: $.b    rewrite:      𝑛3:        of: 𝑛1        rules: &shape          - name: no-x            pattern: ⟦ !B1, x ↦ ⟦⟧, !B2 ⟧            result: ⟦ !B1, !B2 ⟧      𝑛4:        of: 𝑛2        rules: *shape    join:      𝑛5: [𝑛3, 𝑛4]    𝑛: 𝑛5location: 'Q.y'input: '⟦ y ↦ ⟦ a ↦ ⟦ Ο† ↦ ⟦ Ξ» ‍ 𝜎1 ⟧ ⟧, b ↦ ⟦ Ο† ↦ ⟦ Ξ» ‍ 𝜎2 ⟧, x ↦ ⟦⟧ ⟧, Ξ» ‍ L_fork ⟧.Ο† ⟧'result: '𝜎3:Ξ»'protocol: |  𝕄(Ξ¦.y):    𝔼(L_fork):      𝑛1Β·1 := 𝜎1:Ξ»:Ο†  # 𝕄(ΞΎ.a)      𝑛2Β·1 := ⟦ Ο† ↦ 𝜎2:Ξ», x ↦ ⟦⟧ ⟧  # 𝕄(ΞΎ.b)      𝑛3Β·1 := 𝑛1Β·1  # 𝑛1      𝑛4Β·1 := 𝜎2:Ξ»:Ο†  # 𝑛2      𝔻(𝜎3:Ξ») ∈ { 𝔻(𝜎1:Ξ»), 𝔻(𝜎2:Ξ») }      𝑛5Β·1 := 𝜎3:Ξ»:Ο†  # [𝑛3, 𝑛4]      𝑛·1Β·1 := 𝑛5Β·1  # 𝑛      𝑛·1Β·2 := 𝑛5Β·1  # 𝕄(𝑛·1Β·1)