packages feed

phino-0.0.159: test-resources/evaluate-packs/writes-no-joined-line-for-a-join-the-memo-answered.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A join the memo of 'plausible' answered writes no 'joined' line (#2011). The
# program reads 'f' twice, so the join of 'L_fork' fires twice over the same
# formation. The first firing brings its condition down to '𝛿1·2', mints 𝜎4
# and writes 'joined 𝜎4 := 𝛿1·2 ? 𝜎2 : 𝜎3'. The second one takes that answer
# from the memo and brings nothing down, so no meta of its own holds the
# condition, and it writes the answer alone, the way a firing the memo
# answered writes no symbol it minted.
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.@'
acyclic: plausible
input: >
  ⟦ bytes(φ) ↦ ⟦⟧,
    bool(φ) ↦ ⟦ if ↦ ⟦ ρ ↦ ∅, then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧ ⟧,
    number(φ) ↦ ⟦
      gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧,
      plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,
    f ↦ 5.gt( 0 ).if( 1.plus( 2 ).plus( 0 ), 3.plus( 4 ).plus( 0 ) ),
    φ ↦ Φ.f.plus( Φ.f ).φ ⟧
result: '𝜎6:λ'
protocol: |
  𝕄(Φ.φ):
    𝑛·0·1 := 5.0
    𝑛·0·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
    𝑛·0·3 := 𝑛·0·1.gt( x ↦ 0.0 )
    𝑛·0·4 := ⟦ 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.φ
        𝕄(𝑛·1·4):
          𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )
          𝑛·1·6 := 40-14-00-00-00-00-00-00:Δ:φ
          morphed 𝑛·1·7 := 𝑛·1·6
        boxed 𝑛·1·8 := 𝑛·1·7.φ
        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0
      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)
      𝔻(ξ.x):
        𝕄(ξ.x):
          𝑛·1·9 := 0.0
          𝑛·1·10 := ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
          morphed 𝑛·1·11 := 𝑛·1·10
        boxed 𝑛·1·12 := 𝑛·1·11.φ
        𝕄(𝑛·1·12):
          𝑛·1·13 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )
          𝑛·1·14 := 00-00-00-00-00-00-00-00:Δ:φ
          morphed 𝑛·1·15 := 𝑛·1·14
        boxed 𝑛·1·16 := 𝑛·1·15.φ
        𝛿·1·2 := 00-00-00-00-00-00-00-00  # 0.0
      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)
      𝑛·1·17 := Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛
      𝕄(𝑛·1·17):
        𝑛·1·18 := Φ.bool( φ ↦ 𝜎1:λ )
        𝑛·1·19 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧
        morphed 𝑛·1·20 := 𝑛·1·19
      𝑛·1·21 := 𝑛·1·20  # 𝕄(𝑛·1·17)
    𝑛·0·5 := 𝑛·1·18.if( then ↦ 1.0.plus( 2.0 ).plus( 𝑛·1·9 ) )
    𝑛·0·6 := ⟦ then ↦ 1.0.plus( 2.0 ).plus( 𝑛·1·9 ), else ↦ ∅, λ ⤍ L_fork ⟧
    𝑛·0·7 := 𝑛·0·5( else ↦ 3.0.plus( 4.0 ).plus( 𝑛·1·9 ) )
    𝑛·0·8 := ⟦ then ↦ 1.0.plus( 2.0 ).plus( 𝑛·1·9 ), else ↦ 3.0.plus( 4.0 ).plus( 𝑛·1·9 ), λ ⤍ L_fork ⟧
    𝔼(L_fork):
      𝔻(ξ.ρ):
        𝕄(ξ.ρ):
          𝑛·2·1 := Φ.bool( φ ↦ 𝜎1:λ )
          𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧
          morphed 𝑛·2·3 := 𝑛·1·21
        boxed 𝑛·2·4 := 𝑛·2·3.φ
        𝛿·2·1 := 𝔻(𝜎1:λ)
      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)
      𝕄(ξ.then):
        𝑛·2·5 := 1.0
        𝑛·2·6 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
        𝑛·2·7 := 𝑛·2·5.plus( x ↦ 2.0 )
        𝑛·2·8 := ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧
        𝔼(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.φ
            𝕄(𝑛·3·4):
              𝑛·3·5 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )
              𝑛·3·6 := 3F-F0-00-00-00-00-00-00:Δ:φ
              morphed 𝑛·3·7 := 𝑛·3·6
            boxed 𝑛·3·8 := 𝑛·3·7.φ
            𝛿·3·1 := 3F-F0-00-00-00-00-00-00  # 1.0
          𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.ρ)
          𝔻(ξ.x):
            𝕄(ξ.x):
              𝑛·3·9 := 2.0
              𝑛·3·10 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
              morphed 𝑛·3·11 := 𝑛·3·10
            boxed 𝑛·3·12 := 𝑛·3·11.φ
            𝕄(𝑛·3·12):
              𝑛·3·13 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )
              𝑛·3·14 := 40-00-00-00-00-00-00-00:Δ:φ
              morphed 𝑛·3·15 := 𝑛·3·14
            boxed 𝑛·3·16 := 𝑛·3·15.φ
            𝛿·3·2 := 40-00-00-00-00-00-00-00  # 2.0
          𝛿2·3 := 𝛿·3·2  # 𝔻(ξ.x)
          𝑛·3·17 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛
          𝕄(𝑛·3·17):
            𝑛·3·18 := Φ.number( φ ↦ 𝜎2:λ )
            𝑛·3·19 := ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
            morphed 𝑛·3·20 := 𝑛·3·19
          𝑛·3·21 := 𝑛·3·20  # 𝕄(𝑛·3·17)
        𝑛·2·9 := 𝑛·3·18.plus( x ↦ 𝑛·1·9 )
        𝑛·2·10 := ⟦ x ↦ 𝑛·1·9, λ ⤍ L_number_plus ⟧
        morphed 𝑛·2·11 := 𝑛·2·10
      𝕄(ξ.else):
        𝑛·2·12 := 3.0
        𝑛·2·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
        𝑛·2·14 := 𝑛·2·12.plus( x ↦ 4.0 )
        𝑛·2·15 := ⟦ x ↦ 4.0, λ ⤍ L_number_plus ⟧
        𝔼(L_number_plus):
          𝔻(ξ.ρ):
            𝕄(ξ.ρ):
              𝑛·4·1 := 3.0
              𝑛·4·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
              morphed 𝑛·4·3 := 𝑛·4·2
            boxed 𝑛·4·4 := 𝑛·4·3.φ
            𝕄(𝑛·4·4):
              𝑛·4·5 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )
              𝑛·4·6 := 40-08-00-00-00-00-00-00:Δ:φ
              morphed 𝑛·4·7 := 𝑛·4·6
            boxed 𝑛·4·8 := 𝑛·4·7.φ
            𝛿·4·1 := 40-08-00-00-00-00-00-00  # 3.0
          𝛿1·4 := 𝛿·4·1  # 𝔻(ξ.ρ)
          𝔻(ξ.x):
            𝕄(ξ.x):
              𝑛·4·9 := 4.0
              𝑛·4·10 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
              morphed 𝑛·4·11 := 𝑛·4·10
            boxed 𝑛·4·12 := 𝑛·4·11.φ
            𝕄(𝑛·4·12):
              𝑛·4·13 := Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )
              𝑛·4·14 := 40-10-00-00-00-00-00-00:Δ:φ
              morphed 𝑛·4·15 := 𝑛·4·14
            boxed 𝑛·4·16 := 𝑛·4·15.φ
            𝛿·4·2 := 40-10-00-00-00-00-00-00  # 4.0
          𝛿2·4 := 𝛿·4·2  # 𝔻(ξ.x)
          𝑛·4·17 := Φ.number( φ ↦ 𝜎3:λ )  # 𝑛
          𝕄(𝑛·4·17):
            𝑛·4·18 := Φ.number( φ ↦ 𝜎3:λ )
            𝑛·4·19 := ⟦ φ ↦ 𝜎3:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
            morphed 𝑛·4·20 := 𝑛·4·19
          𝑛·4·21 := 𝑛·4·20  # 𝕄(𝑛·4·17)
        𝑛·2·16 := 𝑛·4·18.plus( x ↦ 𝑛·1·9 )
        𝑛·2·17 := ⟦ x ↦ 𝑛·1·9, λ ⤍ L_number_plus ⟧
        morphed 𝑛·2·18 := 𝑛·2·17
      joined 𝜎4 := 𝛿1·2 ? 𝜎2 : 𝜎3
      𝑛·2·19 := ⟦ x ↦ 𝑛·1·9, λ ⤍ L_number_plus ⟧  # 𝕄(ξ.then), 𝕄(ξ.else)
    𝔼(L_number_plus):
      𝔻(ξ.ρ):
        𝕄(ξ.ρ):
          𝑛·5·1 := Φ.number( φ ↦ 𝜎4:λ )
          𝑛·5·2 := ⟦ φ ↦ 𝜎4:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
          morphed 𝑛·5·3 := 𝑛·5·2
        boxed 𝑛·5·4 := 𝑛·5·3.φ
        𝛿·5·1 := 𝔻(𝜎4:λ)
      𝛿1·5 := 𝛿·5·1  # 𝔻(ξ.ρ)
      𝔻(ξ.x):
        𝕄(ξ.x):
          𝑛·5·5 := Φ.number( φ ↦ 𝑛·1·13 )
          𝑛·5·6 := ⟦ φ ↦ 𝑛·1·13, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
          morphed 𝑛·5·7 := 𝑛·5·6
        boxed 𝑛·5·8 := 𝑛·5·7.φ
        𝕄(𝑛·5·8):
          𝑛·5·9 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )
          𝑛·5·10 := 00-00-00-00-00-00-00-00:Δ:φ
          morphed 𝑛·5·11 := 𝑛·5·10
        boxed 𝑛·5·12 := 𝑛·5·11.φ
        𝛿·5·2 := 00-00-00-00-00-00-00-00  # 0.0
      𝛿2·5 := 𝛿·5·2  # 𝔻(ξ.x)
      𝑛·5·13 := Φ.number( φ ↦ 𝜎5:λ )  # 𝑛
      𝕄(𝑛·5·13):
        𝑛·5·14 := Φ.number( φ ↦ 𝜎5:λ )
        𝑛·5·15 := ⟦ φ ↦ 𝜎5:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
        morphed 𝑛·5·16 := 𝑛·5·15
      𝑛·5·17 := 𝑛·5·16  # 𝕄(𝑛·5·13)
    𝑛·0·9 := 𝑛·5·14.plus( x ↦ Φ.f )
    𝑛·0·10 := ⟦ x ↦ Φ.f, λ ⤍ L_number_plus ⟧
    𝔼(L_number_plus):
      𝔻(ξ.ρ):
        𝕄(ξ.ρ):
          𝑛·6·1 := Φ.number( φ ↦ 𝜎5:λ )
          𝑛·6·2 := ⟦ φ ↦ 𝜎5:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
          morphed 𝑛·6·3 := 𝑛·5·17
        boxed 𝑛·6·4 := 𝑛·6·3.φ
        𝛿·6·1 := 𝔻(𝜎5:λ)
      𝛿1·6 := 𝛿·6·1  # 𝔻(ξ.ρ)
      𝔻(ξ.x):
        𝕄(ξ.x):
          𝑛·6·5 := Φ.number( φ ↦ 𝑛·1·5 )
          𝑛·6·6 := ⟦ φ ↦ 𝑛·1·5, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
          𝑛·6·7 := 𝑛·6·5.gt( x ↦ 𝑛·5·5 )
          𝑛·6·8 := ⟦ x ↦ 𝑛·5·5, λ ⤍ L_number_gt ⟧
          𝔼(L_number_gt):
            𝑛·7·1 := 𝑛·2·1  # 𝑛
            𝑛·7·2 := 𝑛·1·21  # 𝕄(𝑛·7·1)
          𝑛·6·9 := 𝑛·2·1.if( then ↦ 𝑛·3·1.plus( 𝑛·3·9 ).plus( 𝑛·5·5 ) )
          𝑛·6·10 := ⟦ then ↦ 𝑛·3·1.plus( 𝑛·3·9 ).plus( 𝑛·5·5 ), else ↦ ∅, λ ⤍ L_fork ⟧
          𝑛·6·11 := 𝑛·6·9( else ↦ 𝑛·4·1.plus( 𝑛·4·9 ).plus( 𝑛·5·5 ) )
          𝑛·6·12 := ⟦ then ↦ 𝑛·3·1.plus( 𝑛·3·9 ).plus( 𝑛·5·5 ), else ↦ 𝑛·4·1.plus( 𝑛·4·9 ).plus( 𝑛·5·5 ), λ ⤍ L_fork ⟧
          morphed 𝑛·6·13 := 𝑛·6·12
        𝔼(L_fork):
          𝑛·8·1 := ⟦ x ↦ 𝑛·5·5, λ ⤍ L_number_plus ⟧  # 𝕄(ξ.then), 𝕄(ξ.else)
        𝔼(L_number_plus):
          𝑛·9·1 := 𝑛·6·1  # 𝑛
          𝑛·9·2 := 𝑛·5·17  # 𝕄(𝑛·9·1)
        boxed 𝑛·6·14 := 𝑛·9·2.φ
        𝛿·6·2 := 𝔻(𝜎5:λ)
      𝛿2·6 := 𝛿·6·2  # 𝔻(ξ.x)
      𝑛·6·15 := Φ.number( φ ↦ 𝜎6:λ )  # 𝑛
      𝕄(𝑛·6·15):
        𝑛·6·16 := Φ.number( φ ↦ 𝜎6:λ )
        𝑛·6·17 := ⟦ φ ↦ 𝜎6:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧
        morphed 𝑛·6·18 := 𝑛·6·17
      𝑛·6·19 := 𝑛·6·18  # 𝕄(𝑛·6·15)
    morphed 𝑛·0·11 := 𝜎6:λ