packages feed

phino-0.0.165: test-resources/evaluate-packs/fires-a-formation-once-however-often-it-is-met.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The memo of '--acyclic=plausible': 𝔼 is a function of the formation it
# fires, so two bindings spelling one term fire one formation twice, and a
# run firing it afresh each time mints two symbols for one value and fires
# everything under the second once more (#1476). The 'evaluate' lines of
# 'L_pair' fire 'a' and then 'b', which spell the very same sum. Under the
# mode the second firing takes what the first answered: it reduces nothing,
# mints nothing and lands 'b' on the very symbol 'a' came to. The protocol
# still writes the firing of 'b' at its own site, with the answer the firing
# of 'a' made, named after the line that made it, and with no operand line
# under it, since none was reduced (#1874).
symbolic: |
  - Ξ»: L_number_plus
    dataize:
      𝛿1: $.ρ
      𝛿2: $.x
    𝑛: Ξ¦.number( Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ )
  - Ξ»: L_pair
    morph:
      𝑛1: $.a
      𝑛2: $.b
    evaluate:
      𝑛3: 𝑛1
      𝑛4: 𝑛2
    𝑛: ⟦ Ο† ↦ ⟦ a ↦ 𝑛3, b ↦ 𝑛4 ⟧ ⟧
location: 'Q.p'
acyclic: plausible
input: >
  ⟦ bytes(Ο†) ↦ ⟦⟧,
    number(Ο†) ↦ ⟦ plus(ρ, x) ↦ ⟦ Ξ» ‍ L_number_plus ⟧ ⟧,
    p ↦ ⟦
      a ↦ 7.plus( 5.plus( 6 ) ),
      b ↦ 7.plus( 5.plus( 6 ) ),
      Ξ» ‍ L_pair ⟧.Ο† ⟧
result: >
  ⟦ a ↦ ⟦ Ο† ↦ 𝜎2:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧,
    b ↦ ⟦ Ο† ↦ 𝜎2:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧ ⟧
protocol: |
  𝕄(Ξ¦.p):
    𝔼(L_pair):
      𝕄(ΞΎ.a):
        normalized 𝑛·1Β·1 := ⟦ Ο† ↦ βˆ…, plus(x) ↦ L_number_plus:Ξ» ⟧  # Ξ¦.number
        𝑛·1Β·2 := 7.0
        𝑛·1Β·3 := ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-1C-00-00-00-00-00-00:Ξ” ), plus(x) ↦ L_number_plus:Ξ» ⟧
        normalized 𝑛·1Β·4 := ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·1Β·3.plus
        𝑛·1Β·5 := 𝑛·1Β·2.plus( x ↦ 5.0.plus( 6.0 ) )
        𝑛·1Β·6 := ⟦ x ↦ 5.0.plus( 6.0 ), Ξ» ‍ L_number_plus ⟧
        morphed 𝑛·1Β·7 := 𝑛·1Β·6
      𝑛1Β·1 := 𝑛·1Β·6  # 𝕄(ΞΎ.a)
      𝕄(ΞΎ.b):
        𝑛·1Β·8 := 7.0
        𝑛·1Β·9 := ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-1C-00-00-00-00-00-00:Ξ” ), plus(x) ↦ L_number_plus:Ξ» ⟧
        normalized 𝑛·1Β·10 := ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·1Β·9.plus
        𝑛·1Β·11 := 𝑛·1Β·8.plus( x ↦ 5.0.plus( 6.0 ) )
        𝑛·1Β·12 := ⟦ x ↦ 5.0.plus( 6.0 ), Ξ» ‍ L_number_plus ⟧
        morphed 𝑛·1Β·13 := 𝑛·1Β·12
      𝑛2Β·1 := 𝑛·1Β·12  # 𝕄(ΞΎ.b)
      𝔼(L_number_plus):  # 𝔼(𝑛1)
        𝔻(ΞΎ.ρ):
          𝕄(ΞΎ.ρ):
            𝑛·2Β·1 := 7.0
            𝑛·2Β·2 := ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-1C-00-00-00-00-00-00:Ξ” ), plus(x) ↦ L_number_plus:Ξ» ⟧
            morphed 𝑛·2Β·3 := 𝑛·2Β·2
          boxed 𝑛·2Β·4 := 𝑛·2Β·3.Ο†
          normalized 𝑛·2Β·5 := Ξ¦.bytes( Ο† ↦ 40-1C-00-00-00-00-00-00:Ξ” )  # 𝑛·2Β·4
          𝕄(𝑛·2Β·4):
            normalized 𝑛·2Β·6 := βˆ…:Ο†  # Ξ¦.bytes
            𝑛·2Β·7 := Ξ¦.bytes( Ο† ↦ 40-1C-00-00-00-00-00-00:Ξ” )
            𝑛·2Β·8 := 40-1C-00-00-00-00-00-00:Ξ”:Ο†
            morphed 𝑛·2Β·9 := 𝑛·2Β·8
          boxed 𝑛·2Β·10 := 𝑛·2Β·9.Ο†
          normalized 𝑛·2Β·11 := 40-1C-00-00-00-00-00-00:Ξ”  # 𝑛·2Β·10
          𝛿·2Β·1 := 40-1C-00-00-00-00-00-00  # 7.0
        𝛿1Β·2 := 𝛿·2Β·1  # 𝔻(ΞΎ.ρ)
        𝔻(ΞΎ.x):
          𝕄(ΞΎ.x):
            𝑛·2Β·12 := 5.0
            𝑛·2Β·13 := ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” ), plus(x) ↦ L_number_plus:Ξ» ⟧
            normalized 𝑛·2Β·14 := ⟦ x ↦ βˆ…, Ξ» ‍ L_number_plus ⟧  # 𝑛·2Β·13.plus
            𝑛·2Β·15 := 𝑛·2Β·12.plus( x ↦ 6.0 )
            𝑛·2Β·16 := ⟦ x ↦ 6.0, Ξ» ‍ L_number_plus ⟧
            morphed 𝑛·2Β·17 := 𝑛·2Β·16
          𝔼(L_number_plus):
            𝔻(ΞΎ.ρ):
              𝕄(ΞΎ.ρ):
                𝑛·3Β·1 := 5.0
                𝑛·3Β·2 := ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” ), plus(x) ↦ L_number_plus:Ξ» ⟧
                morphed 𝑛·3Β·3 := 𝑛·3Β·2
              boxed 𝑛·3Β·4 := 𝑛·3Β·3.Ο†
              normalized 𝑛·3Β·5 := Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” )  # 𝑛·3Β·4
              𝕄(𝑛·3Β·4):
                𝑛·3Β·6 := Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” )
                𝑛·3Β·7 := 40-14-00-00-00-00-00-00:Ξ”:Ο†
                morphed 𝑛·3Β·8 := 𝑛·3Β·7
              boxed 𝑛·3Β·9 := 𝑛·3Β·8.Ο†
              normalized 𝑛·3Β·10 := 40-14-00-00-00-00-00-00:Ξ”  # 𝑛·3Β·9
              𝛿·3Β·1 := 40-14-00-00-00-00-00-00  # 5.0
            𝛿1Β·3 := 𝛿·3Β·1  # 𝔻(ΞΎ.ρ)
            𝔻(ΞΎ.x):
              𝕄(ΞΎ.x):
                𝑛·3Β·11 := 6.0
                𝑛·3Β·12 := ⟦ Ο† ↦ Ξ¦.bytes( Ο† ↦ 40-18-00-00-00-00-00-00:Ξ” ), plus(x) ↦ L_number_plus:Ξ» ⟧
                morphed 𝑛·3Β·13 := 𝑛·3Β·12
              boxed 𝑛·3Β·14 := 𝑛·3Β·13.Ο†
              normalized 𝑛·3Β·15 := Ξ¦.bytes( Ο† ↦ 40-18-00-00-00-00-00-00:Ξ” )  # 𝑛·3Β·14
              𝕄(𝑛·3Β·14):
                𝑛·3Β·16 := Ξ¦.bytes( Ο† ↦ 40-18-00-00-00-00-00-00:Ξ” )
                𝑛·3Β·17 := 40-18-00-00-00-00-00-00:Ξ”:Ο†
                morphed 𝑛·3Β·18 := 𝑛·3Β·17
              boxed 𝑛·3Β·19 := 𝑛·3Β·18.Ο†
              normalized 𝑛·3Β·20 := 40-18-00-00-00-00-00-00:Ξ”  # 𝑛·3Β·19
              𝛿·3Β·2 := 40-18-00-00-00-00-00-00  # 6.0
            𝛿2Β·3 := 𝛿·3Β·2  # 𝔻(ΞΎ.x)
            𝑛·3Β·21 := Ξ¦.number( Ο† ↦ 𝜎1:Ξ» )  # 𝑛
            𝕄(𝑛·3Β·21):
              𝑛·3Β·22 := Ξ¦.number( Ο† ↦ 𝜎1:Ξ» )
              𝑛·3Β·23 := ⟦ Ο† ↦ 𝜎1:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
              morphed 𝑛·3Β·24 := 𝑛·3Β·23
            𝑛·3Β·25 := 𝑛·3Β·24  # 𝕄(𝑛·3Β·21)
            memoized 𝑛·2Β·16 ⇛ 𝑛·3Β·25
          boxed 𝑛·2Β·18 := 𝑛·3Β·25.Ο†
          normalized 𝑛·2Β·19 := 𝜎1:Ξ»  # 𝑛·2Β·18
          𝛿·2Β·2 := 𝔻(𝜎1:Ξ»)
        𝛿2Β·2 := 𝛿·2Β·2  # 𝔻(ΞΎ.x)
        𝑛·2Β·20 := Ξ¦.number( Ο† ↦ 𝜎2:Ξ» )  # 𝑛
        𝕄(𝑛·2Β·20):
          𝑛·2Β·21 := Ξ¦.number( Ο† ↦ 𝜎2:Ξ» )
          𝑛·2Β·22 := ⟦ Ο† ↦ 𝜎2:Ξ», plus(x) ↦ L_number_plus:Ξ» ⟧
          morphed 𝑛·2Β·23 := 𝑛·2Β·22
        𝑛·2Β·24 := 𝑛·2Β·23  # 𝕄(𝑛·2Β·20)
        memoized 𝑛·1Β·12 ⇛ 𝑛·2Β·24
      𝑛3Β·1 := 𝑛·2Β·24  # 𝔼(𝑛1)
      𝔼(L_number_plus):  # 𝔼(𝑛2)
        recalled 𝑛·1Β·12 β‡’ 𝑛·2Β·24
        𝑛·4Β·1 := 𝑛·2Β·21  # 𝑛
        𝑛·4Β·2 := 𝑛3Β·1  # 𝕄(𝑛·4Β·1)
      𝑛4Β·1 := 𝑛·4Β·2  # 𝔼(𝑛2)
      𝑛·1Β·14 := ⟦ a ↦ 𝑛·4Β·2, b ↦ 𝑛·4Β·2 ⟧:Ο†  # 𝑛
      𝕄(𝑛·1Β·14):
        morphed 𝑛·1Β·15 := ⟦ a ↦ 𝑛·4Β·2, b ↦ 𝑛·4Β·2 ⟧:Ο†
      𝑛·1Β·16 := 𝑛·1Β·15  # 𝕄(𝑛·1Β·14)
      memoized 𝑛·1Β·17 ⇛ 𝑛·1Β·16  # ⟦ a ↦ 𝑛·2Β·1.plus( 𝑛·3Β·1.plus( 𝑛·3Β·11 ) ), b ↦ 𝑛·2Β·1.plus( 𝑛·3Β·1.plus( 𝑛·3Β·11 ) ), Ξ» ‍ L_pair ⟧
    normalized 𝑛·0Β·1 := ⟦ a ↦ 𝑛·4Β·2, b ↦ 𝑛·4Β·2 ⟧  # 𝑛·1Β·16.Ο†
    morphed 𝑛·0Β·2 := 𝑛·0Β·1