phino-0.0.156: test-resources/evaluate-packs/remints-a-call-as-the-symbol-its-firing-answers.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# Morphing is lazy, so the tail of the pair below is still the call of 'L_inc'
# as the code spells it. A 'remint' step works such a term out the way an
# argument of a deferred copy is worked out since #1916: it morphs the term,
# fires what it comes to and writes every step, and the answer of 'L_inc' is
# a copy of 'Ξ¦.num' whose Ο is the fresh symbol 'π2', so the tail is 'π2'
# (#1923).
symbolic: |
- Ξ»: L_shrink
morph:
π1: $.x
rewrite:
π2:
of: π1
rules:
- name: small-pair
pattern: β¦ !B1, head β¦ π1, tail β¦ π2, !B2 β§
result: β¦ !B1, head β¦ π3, tail β¦ π4, !B2 β§
where:
- meta: π3
function: remint
args: [π1]
- meta: π4
function: remint
args: [π2]
π: π2
- Ξ»: L_inc
dataize:
πΏ1: $.x
π: Ξ¦.num( Ο β¦ β¦ Ξ» β€ π β§ )
location: 'Q.y'
input: 'β¦ num(Ο) β¦ β¦β§, inc(x) β¦ β¦ Ξ» β€ L_inc β§, y β¦ β¦ x β¦ β¦ head β¦ β¦ Ξ» β€ π1 β§, tail β¦ Ξ¦.inc( β¦ Ξ β€ 2A- β§ ) β§, Ξ» β€ L_shrink β§.tail β§'
result: 'π2:Ξ»'
protocol: |
π(Ξ¦.y):
πΌ(L_shrink):
π1Β·1 := β¦ head β¦ π1:Ξ», tail β¦ Ξ¦.inc( 2A-:Ξ ) β§ # π(ΞΎ.x)
π(Ξ¦.inc( 2A-:Ξ )):
πΒ·1Β·1 := Ξ¦.inc( x β¦ 2A-:Ξ )
πΌ(L_inc): # πΌ(Ξ¦.inc( 2A-:Ξ ))
π»(Ξ¦.aπ΅1):
πΏΒ·2Β·1 := 2A-
πΏ1Β·2 := πΏΒ·2Β·1 # π»(ΞΎ.x)
πΒ·2Β·1 := Ξ¦.num( Ο β¦ π2:Ξ» ) # π
π(πΒ·2Β·1):
πΒ·2Β·2 := Ξ¦.num( Ο β¦ π2:Ξ» )
πΒ·2Β·3 := πΒ·2Β·2 # π(πΒ·2Β·1)
π2Β·1 := β¦ head β¦ π1:Ξ», tail β¦ π2:Ξ» β§ # π1
πΒ·1Β·2 := β¦ head β¦ π1:Ξ», tail β¦ π2:Ξ» β§ # π
πΒ·1Β·3 := β¦ head β¦ π1:Ξ», tail β¦ π2:Ξ» β§ # π(πΒ·1Β·2)