packages feed

phino-0.0.169: test-resources/evaluate-packs/takes-the-one-term-both-sides-of-a-join-come-to.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A join whose two sides come to the same normal form through 𝕄 has
# nothing to join (#1954): it mints no symbol and answers that one term.
symbolic: |
  - Ξ»: L_number_gt
    dataize:
      𝛿1: $.ρ
      𝛿2: $.x
    𝑛: Ξ¦.bool( Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ )
  - Ξ»: L_number_plus
    dataize:
      𝛿1: $.ρ
      𝛿2: $.x
    𝑛: Ξ¦.number( Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ )
  - Ξ»: L_fork
    dataize:
      𝛿1: $.ρ
    join:
      on: 𝛿1
      left: $.then
      right: $.else
location: 'Q.@'
input: >
  ⟦ bytes(Ο†) ↦ ⟦⟧,
    bool(Ο†) ↦ ⟦ if ↦ ⟦ ρ ↦ βˆ…, then ↦ βˆ…, else ↦ βˆ…, Ξ» ‍ L_fork ⟧ ⟧,
    number(Ο†) ↦ ⟦
      gt(ρ, x) ↦ ⟦ Ξ» ‍ L_number_gt ⟧,
      plus(ρ, x) ↦ ⟦ Ξ» ‍ L_number_plus ⟧ ⟧,
    Ο† ↦ 5.gt( x ↦ 0 ).if( then ↦ 1.plus( x ↦ 2 ), else ↦ 1.plus( x ↦ 2 ) ).Ο† ⟧
result: '𝜎2:λ'
protocol: |
  𝕄(Ξ¦.Ο†):
    normalized 𝑛·0Β·1 ≔ ⟦ Ο† ↦ βˆ…, gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧  # Ξ¦.number
    𝑛·0Β·2 ≔ 5.0
    𝑛·0Β·3 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” ), gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
    normalized 𝑛·0Β·4 ≔ ⟦ x ↦ βˆ…, Ξ» ‍ L_number_gt ⟧  # 𝑛·0Β·3.gt
    𝑛·0Β·5 ≔ 𝑛·0Β·2.gt( x ↦ 0.0 )
    𝑛·0Β·6 ≔ ⟦ x ↦ 0.0, Ξ» ‍ L_number_gt ⟧
    𝔼(L_number_gt):
      𝔻(ΞΎ.ρ):
        𝕄(ΞΎ.ρ):
          𝑛·1Β·1 ≔ 5.0
          𝑛·1Β·2 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” ), gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
          morphed 𝑛·1Β·3 ≔ 𝑛·1Β·2
        boxed 𝑛·1Β·4 ≔ 𝑛·1Β·3.Ο†
        normalized 𝑛·1Β·5 ≔ Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” )  # 𝑛·1Β·4
        𝕄(𝑛·1Β·4):
          normalized 𝑛·1Β·6 ≔ βˆ…:Ο†  # Ξ¦.bytes
          𝑛·1Β·7 ≔ Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” )
          𝑛·1Β·8 ≔ 40-14-00-00-00-00-00-00:Ξ”:Ο†
          morphed 𝑛·1Β·9 ≔ 𝑛·1Β·8
        boxed 𝑛·1Β·10 ≔ 𝑛·1Β·9.Ο†
        normalized 𝑛·1Β·11 ≔ 40-14-00-00-00-00-00-00:Ξ”  # 𝑛·1Β·10
        𝛿·1Β·1 ≔ 40-14-00-00-00-00-00-00  # 5.0
      𝛿1Β·1 ≔ 𝛿·1Β·1  # 𝔻(ΞΎ.ρ)
      𝔻(ΞΎ.x):
        𝕄(ΞΎ.x):
          𝑛·1Β·12 ≔ 0.0
          𝑛·1Β·13 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 00-00-00-00-00-00-00-00:Ξ” ), gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
          morphed 𝑛·1Β·14 ≔ 𝑛·1Β·13
        boxed 𝑛·1Β·15 ≔ 𝑛·1Β·14.Ο†
        normalized 𝑛·1Β·16 ≔ Ξ¦.bytes( Ο† ↦ 00-00-00-00-00-00-00-00:Ξ” )  # 𝑛·1Β·15
        𝕄(𝑛·1Β·15):
          𝑛·1Β·17 ≔ Ξ¦.bytes( Ο† ↦ 00-00-00-00-00-00-00-00:Ξ” )
          𝑛·1Β·18 ≔ 00-00-00-00-00-00-00-00:Ξ”:Ο†
          morphed 𝑛·1Β·19 ≔ 𝑛·1Β·18
        boxed 𝑛·1Β·20 ≔ 𝑛·1Β·19.Ο†
        normalized 𝑛·1Β·21 ≔ 00-00-00-00-00-00-00-00:Ξ”  # 𝑛·1Β·20
        𝛿·1Β·2 ≔ 00-00-00-00-00-00-00-00  # 0.0
      𝛿2Β·1 ≔ 𝛿·1Β·2  # 𝔻(ΞΎ.x)
      𝑛·1Β·22 ≔ Ξ¦.bool( Ο† ↦ 𝜎1:Ξ» )  # 𝑛 of L_number_gt
      𝕄(𝑛·1Β·22):
        normalized 𝑛·1Β·23 ≔ ⟦ Ο† ↦ βˆ…, if(then, else) ↦ L_fork:Ξ» ⟧  # Ξ¦.bool
        𝑛·1Β·24 ≔ Ξ¦.bool( Ο† ↦ 𝜎1:Ξ» )
        𝑛·1Β·25 ≔ ⟦ Ο† ↦ 𝜎1:Ξ», if(then, else) ↦ L_fork:Ξ» ⟧
        morphed 𝑛·1Β·26 ≔ 𝑛·1Β·25
      𝑛·1Β·27 ≔ 𝑛·1Β·26  # 𝕄(𝑛·1Β·22)
      evaluated 𝑛·1Β·28 ≔ 𝑛·1Β·27  # 𝑛·0Β·6
    normalized 𝑛·0Β·7 ≔ ⟦ then ↦ βˆ…, else ↦ βˆ…, Ξ» ‍ L_fork ⟧  # 𝑛·1Β·28.if
    shared 𝑛·1 ≔ 1.0.plus( x ↦ 2.0 )
    𝑛·0Β·8 ≔ 𝑛·1Β·24.if( then ↦ 𝑛·1 )
    𝑛·0Β·9 ≔ ⟦ then ↦ 𝑛·1, else ↦ βˆ…, Ξ» ‍ L_fork ⟧
    𝑛·0Β·10 ≔ 𝑛·0Β·9( else ↦ 𝑛·1 )
    𝑛·0Β·11 ≔ ⟦ then ↦ 𝑛·1, else ↦ 𝑛·1, Ξ» ‍ L_fork ⟧
    𝔼(L_fork):
      𝔻(ΞΎ.ρ):
        𝕄(ΞΎ.ρ):
          𝑛·2Β·1 ≔ Ξ¦.bool( Ο† ↦ 𝜎1:Ξ» )
          𝑛·2Β·2 ≔ ⟦ Ο† ↦ 𝜎1:Ξ», if(then, else) ↦ L_fork:Ξ» ⟧
          morphed 𝑛·2Β·3 ≔ 𝑛·1Β·27
        boxed 𝑛·2Β·4 ≔ 𝑛·2Β·3.Ο†
        normalized 𝑛·2Β·5 ≔ 𝜎1:Ξ»  # 𝑛·2Β·4
        𝛿·2Β·1 ≔ 𝔻(𝜎1:Ξ»)
      𝛿1Β·2 ≔ 𝛿·2Β·1  # 𝔻(ΞΎ.ρ)
      𝕄(ΞΎ.then):
        𝑛·2Β·6 ≔ 1.0
        𝑛·2Β·7 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 3F-F0-00-00-00-00-00-00:Ξ” ), gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
        normalized 𝑛·2Β·8 ≔ ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·2Β·7.plus
        𝑛·2Β·9 ≔ 𝑛·2Β·6.plus( x ↦ 2.0 )
        𝑛·2Β·10 ≔ ⟦ x ↦ 2.0, Ξ» ‍ L_number_plus ⟧
        morphed 𝑛·2Β·11 ≔ 𝑛·2Β·10
      𝕄(ΞΎ.else):
        𝑛·2Β·12 ≔ 1.0
        𝑛·2Β·13 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 3F-F0-00-00-00-00-00-00:Ξ” ), gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
        normalized 𝑛·2Β·14 ≔ ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·2Β·13.plus
        𝑛·2Β·15 ≔ 𝑛·2Β·12.plus( x ↦ 2.0 )
        𝑛·2Β·16 ≔ ⟦ x ↦ 2.0, Ξ» ‍ L_number_plus ⟧
        morphed 𝑛·2Β·17 ≔ 𝑛·2Β·16
      𝑛·2Β·18 ≔ 𝑛·2Β·16
      evaluated 𝑛·2Β·19 ≔ 𝑛·2Β·16  # 𝑛·0Β·11
    𝔼(L_number_plus):
      𝔻(ΞΎ.ρ):
        𝕄(ΞΎ.ρ):
          𝑛·3Β·1 ≔ 1.0
          𝑛·3Β·2 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 3F-F0-00-00-00-00-00-00:Ξ” ), gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
          morphed 𝑛·3Β·3 ≔ 𝑛·3Β·2
        boxed 𝑛·3Β·4 ≔ 𝑛·3Β·3.Ο†
        normalized 𝑛·3Β·5 ≔ Ξ¦.bytes( Ο† ↦ 3F-F0-00-00-00-00-00-00:Ξ” )  # 𝑛·3Β·4
        𝕄(𝑛·3Β·4):
          𝑛·3Β·6 ≔ Ξ¦.bytes( Ο† ↦ 3F-F0-00-00-00-00-00-00:Ξ” )
          𝑛·3Β·7 ≔ 3F-F0-00-00-00-00-00-00:Ξ”:Ο†
          morphed 𝑛·3Β·8 ≔ 𝑛·3Β·7
        boxed 𝑛·3Β·9 ≔ 𝑛·3Β·8.Ο†
        normalized 𝑛·3Β·10 ≔ 3F-F0-00-00-00-00-00-00:Ξ”  # 𝑛·3Β·9
        𝛿·3Β·1 ≔ 3F-F0-00-00-00-00-00-00  # 1.0
      𝛿1Β·3 ≔ 𝛿·3Β·1  # 𝔻(ΞΎ.ρ)
      𝔻(ΞΎ.x):
        𝕄(ΞΎ.x):
          𝑛·3Β·11 ≔ 2.0
          𝑛·3Β·12 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-00-00-00-00-00-00-00:Ξ” ), gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
          morphed 𝑛·3Β·13 ≔ 𝑛·3Β·12
        boxed 𝑛·3Β·14 ≔ 𝑛·3Β·13.Ο†
        normalized 𝑛·3Β·15 ≔ Ξ¦.bytes( Ο† ↦ 40-00-00-00-00-00-00-00:Ξ” )  # 𝑛·3Β·14
        𝕄(𝑛·3Β·14):
          𝑛·3Β·16 ≔ Ξ¦.bytes( Ο† ↦ 40-00-00-00-00-00-00-00:Ξ” )
          𝑛·3Β·17 ≔ 40-00-00-00-00-00-00-00:Ξ”:Ο†
          morphed 𝑛·3Β·18 ≔ 𝑛·3Β·17
        boxed 𝑛·3Β·19 ≔ 𝑛·3Β·18.Ο†
        normalized 𝑛·3Β·20 ≔ 40-00-00-00-00-00-00-00:Ξ”  # 𝑛·3Β·19
        𝛿·3Β·2 ≔ 40-00-00-00-00-00-00-00  # 2.0
      𝛿2Β·3 ≔ 𝛿·3Β·2  # 𝔻(ΞΎ.x)
      𝑛·3Β·21 ≔ Ξ¦.number( Ο† ↦ 𝜎2:Ξ» )  # 𝑛 of L_number_plus
      𝕄(𝑛·3Β·21):
        𝑛·3Β·22 ≔ Ξ¦.number( Ο† ↦ 𝜎2:Ξ» )
        𝑛·3Β·23 ≔ ⟦ Ο† ↦ 𝜎2:Ξ», gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
        morphed 𝑛·3Β·24 ≔ 𝑛·3Β·23
      𝑛·3Β·25 ≔ 𝑛·3Β·24  # 𝕄(𝑛·3Β·21)
      evaluated 𝑛·3Β·26 ≔ 𝑛·3Β·25  # 𝑛·2Β·16
    normalized 𝑛·0Β·12 ≔ 𝜎2:Ξ»  # 𝑛·3Β·26.Ο†
    morphed 𝑛·0Β·13 ≔ 𝑛·0Β·12