phino-0.0.170 / test-resources / evaluate-packs / joins-a-bool-literal-a-rewrite-line-brought-into-the-shape-of-the-other-side.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com# SPDX-License-Identifier: MIT---# yamllint disable rule:line-length# The left side holds the literal 'Φ.true', the way 'bool.not' of EO comes# down, while the right side holds the bool a computation answers, a 'Φ.bool'# applied to its datum. The two are shapes apart, so the join could never make# one term of them (#2005). A 'rewrite' line rewrites 'Φ.true' wherever it# stands in the left side into the shape of the right one, and leaves the right# side as it is, since none of its rules matches anything there. The two sides# then differ in their symbols alone, and the join makes one term of them.# The protocol writes the line of '𝑛3', which a rule changed, commented with# the block and the meta it read. The line of '𝑛4', which changed nothing,# writes nothing (#2192).symbolic: | - λ: L_fork dataize: 𝛿1: $.c morph: 𝑛1: $.a 𝑛2: $.b rewrite: 𝑛3: of: 𝑛1 rules: &bool - name: true-literal pattern: Φ.true result: Φ.bool( if ↦ ⟦ Δ ⤍ 01- ⟧ ) - name: false-literal pattern: Φ.false result: Φ.bool( if ↦ ⟦ Δ ⤍ 00- ⟧ ) 𝑛4: of: 𝑛2 rules: *bool join: on: 𝛿1 left: 𝑛3 right: 𝑛4location: 'Q.y'hide-rho: falseinput: '⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧, kq ↦ Φ.true ⟧, b ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎3 ⟧, kq ↦ Φ.bool( if ↦ ⟦ Δ ⤍ 01- ⟧ ) ⟧, λ ⤍ L_fork ⟧.φ ⟧'result: '𝜎4:λ'protocol: | 𝕄(Φ.y): 𝔼(L_fork): 𝔻(ξ.c): 𝛿·1·1 ≔ 𝔻(𝜎1:λ) 𝛿1·1 ≔ 𝛿·1·1 # 𝔻(ξ.c) 𝕄(ξ.a): morphed 𝑛·1·1 ≔ ⟦ φ ↦ 𝜎2:λ, kq ↦ Φ.true ⟧ 𝑛1·1 ≔ 𝑛·1·1 # 𝕄(ξ.a) 𝕄(ξ.b): morphed 𝑛·1·2 ≔ ⟦ φ ↦ 𝜎3:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧ 𝑛2·1 ≔ 𝑛·1·2 # 𝕄(ξ.b) 𝑛3·1 ≔ ⟦ φ ↦ 𝜎2:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧ # rewrite(𝑛1 of L_fork) joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3 𝑛·1·3 ≔ ⟦ φ ↦ 𝜎4:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧ evaluated 𝑛·1·4 ≔ 𝑛·1·3 # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧ normalized 𝑛·0·1 ≔ 𝜎4:λ # 𝑛·1·4.φ morphed 𝑛·0·2 ≔ 𝑛·0·1