packages feed

phino-0.0.172 / test-resources / evaluate-packs / morphs-two-branches-spelling-one-term-through-one-firing.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com# SPDX-License-Identifier: MIT---# yamllint disable rule:line-length# The memo of '--acyclic=plausible' serves the operands of a firing as much# as the walk: the two branches of this fork spell one term, so the sum the# second one starts from is the formation the first one fired, and the# second branch reaches the normal form the first reached, symbol and all,# through a firing that reduces nothing and answers what the first one did.# The branches are met as 'morph' operands of the fork and not as bindings# the deep walk went over first, since the fork is fired by the dispatch off# it (#1476).symbolic: |  - Ξ»: L_number_gt    dataize:      𝛿1: $.ρ      𝛿2: $.x    𝑛: Ξ¦.bool( Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ )  - Ξ»: L_number_plus    dataize:      𝛿1: $.ρ      𝛿2: $.x    𝑛: Ξ¦.number( Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ )  - Ξ»: L_fork    dataize:      𝛿1: $.ρ    morph:      𝑛1: $.then      𝑛2: $.else    𝑛: 𝑛1location: 'Q.@'acyclic: plausibleinput: >  ⟦ 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 ).plus( x ↦ 3 ), else ↦ 1.plus( x ↦ 2 ).plus( x ↦ 3 ) ).plus( x ↦ 9 ) ⟧result: '⟦ x ↦ 9, Ξ» ‍ L_number_plus ⟧'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)      memoized 𝑛·0Β·6 ⇛ 𝑛·1Β·27      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 ).plus( x ↦ 3.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 ⟧        𝔼(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)          memoized 𝑛·2Β·10 ⇛ 𝑛·3Β·25          evaluated 𝑛·3Β·26 ≔ 𝑛·3Β·25  # 𝑛·2Β·10        normalized 𝑛·2Β·11 ≔ ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·3Β·26.plus        𝑛·2Β·12 ≔ 𝑛·3Β·22.plus( x ↦ 3.0 )        𝑛·2Β·13 ≔ ⟦ x ↦ 3.0, Ξ» ‍ L_number_plus ⟧        morphed 𝑛·2Β·14 ≔ 𝑛·2Β·13      𝑛1Β·2 ≔ 𝑛·2Β·13  # 𝕄(ΞΎ.then)      𝕄(ΞΎ.else):        𝑛·2Β·15 ≔ Ξ¦.number( Ο† ↦ 𝑛·3Β·6 )        𝑛·2Β·16 ≔ ⟦ Ο† ↦ 𝑛·3Β·6, gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧        normalized 𝑛·2Β·17 ≔ ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·2Β·16.plus        𝑛·2Β·18 ≔ 𝑛·2Β·15.plus( x ↦ 𝑛·3Β·11 )        𝑛·2Β·19 ≔ ⟦ x ↦ 𝑛·3Β·11, Ξ» ‍ L_number_plus ⟧        𝔼(L_number_plus):          recalled 𝑛·2Β·10 β‡’ 𝑛·3Β·25          𝑛·4Β·1 ≔ 𝑛·3Β·22  # 𝑛 of L_number_plus          𝑛·4Β·2 ≔ 𝑛·3Β·25  # 𝕄(𝑛·4Β·1)          evaluated 𝑛·4Β·3 ≔ 𝑛·4Β·2  # 𝑛·2Β·19        normalized 𝑛·2Β·20 ≔ ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·4Β·3.plus        𝑛·2Β·21 ≔ 𝑛·3Β·22.plus( x ↦ 3.0 )        𝑛·2Β·22 ≔ ⟦ x ↦ 3.0, Ξ» ‍ L_number_plus ⟧        morphed 𝑛·2Β·23 ≔ 𝑛·2Β·22      𝑛2Β·2 ≔ 𝑛·2Β·22  # 𝕄(ΞΎ.else)      𝑛·2Β·24 ≔ 𝑛·2Β·22  # 𝑛 of L_fork      𝕄(𝑛·2Β·24):        morphed 𝑛·2Β·25 ≔ 𝑛·2Β·22      𝑛·2Β·26 ≔ 𝑛·2Β·22  # 𝕄(𝑛·2Β·24)      memoized 𝑛·0Β·11 ⇛ 𝑛·2Β·22      evaluated 𝑛·2Β·27 ≔ 𝑛·2Β·22  # 𝑛·0Β·11    𝔼(L_number_plus):      𝔻(ΞΎ.ρ):        𝕄(ΞΎ.ρ):          𝑛·5Β·1 ≔ Ξ¦.number( Ο† ↦ 𝜎2:Ξ» )          𝑛·5Β·2 ≔ ⟦ Ο† ↦ 𝜎2:Ξ», gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧          morphed 𝑛·5Β·3 ≔ 𝑛·4Β·2        boxed 𝑛·5Β·4 ≔ 𝑛·5Β·3.Ο†        normalized 𝑛·5Β·5 ≔ 𝜎2:Ξ»  # 𝑛·5Β·4        𝛿·5Β·1 ≔ 𝔻(𝜎2:Ξ»)      𝛿1Β·5 ≔ 𝛿·5Β·1  # 𝔻(ΞΎ.ρ)      𝔻(ΞΎ.x):        𝕄(ΞΎ.x):          𝑛·5Β·6 ≔ 3.0          𝑛·5Β·7 ≔ ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-08-00-00-00-00-00-00:Ξ” ), gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧          morphed 𝑛·5Β·8 ≔ 𝑛·5Β·7        boxed 𝑛·5Β·9 ≔ 𝑛·5Β·8.Ο†        normalized 𝑛·5Β·10 ≔ Ξ¦.bytes( Ο† ↦ 40-08-00-00-00-00-00-00:Ξ” )  # 𝑛·5Β·9        𝕄(𝑛·5Β·9):          𝑛·5Β·11 ≔ Ξ¦.bytes( Ο† ↦ 40-08-00-00-00-00-00-00:Ξ” )          𝑛·5Β·12 ≔ 40-08-00-00-00-00-00-00:Ξ”:Ο†          morphed 𝑛·5Β·13 ≔ 𝑛·5Β·12        boxed 𝑛·5Β·14 ≔ 𝑛·5Β·13.Ο†        normalized 𝑛·5Β·15 ≔ 40-08-00-00-00-00-00-00:Ξ”  # 𝑛·5Β·14        𝛿·5Β·2 ≔ 40-08-00-00-00-00-00-00  # 3.0      𝛿2Β·5 ≔ 𝛿·5Β·2  # 𝔻(ΞΎ.x)      𝑛·5Β·16 ≔ Ξ¦.number( Ο† ↦ 𝜎3:Ξ» )  # 𝑛 of L_number_plus      𝕄(𝑛·5Β·16):        𝑛·5Β·17 ≔ Ξ¦.number( Ο† ↦ 𝜎3:Ξ» )        𝑛·5Β·18 ≔ ⟦ Ο† ↦ 𝜎3:Ξ», gt(x) ↦ L_number_gt:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧        morphed 𝑛·5Β·19 ≔ 𝑛·5Β·18      𝑛·5Β·20 ≔ 𝑛·5Β·19  # 𝕄(𝑛·5Β·16)      memoized 𝑛·2Β·22 ⇛ 𝑛·5Β·20      evaluated 𝑛·5Β·21 ≔ 𝑛·5Β·20  # 𝑛·2Β·22    normalized 𝑛·0Β·12 ≔ ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·5Β·21.plus    𝑛·0Β·13 ≔ 𝑛·5Β·17.plus( x ↦ 9.0 )    𝑛·0Β·14 ≔ ⟦ x ↦ 9.0, Ξ» ‍ L_number_plus ⟧    morphed 𝑛·0Β·15 ≔ 𝑛·0Β·14