phino-0.0.162: test-resources/evaluate-packs/cuts-a-recursion-that-differs-by-symbols-only.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A recursion over a symbolic argument, under '--acyclic=proven'. 'L_down'
# answers a call of 'down' over a fresh symbol, and 'ml' dispatches 'Ο' off
# that answer, which fires 'down' again: the first round fires it with x β¦ π1,
# the second with x β¦ π2, and no two rounds are ever the same term. They are
# the same formation up to a renaming of symbols, which is what the guard
# compares by (#1420), and 'ml' enters the formation it fires, so the second
# firing is cut before it opens and writes a 'looped' line where its block
# would have stood, carrying the term of the round that was kept (#1434). The
# cut answers the whole dispatch of 'Ο' with a fresh symbol, named after the
# call the facts trace with 'Ο' on top (#2307). The budget is generous here,
# so what ends the run is the cut and not the limit.
symbolic: |
- Ξ»: L_down
dataize:
πΏ1: $.x
π: Ξ¦.down( x β¦ β¦ Ξ» β€ π β§ )
location: 'Q.y'
acyclic: proven
steps: 250
input: 'β¦ down β¦ β¦ x β¦ β
, Ξ» β€ L_down β§, y β¦ Ξ¦.down( x β¦ β¦ Ξ» β€ π1 β§ ).Ο β§'
result: 'π3:Ξ»'
protocol: |
π(Ξ¦.y):
remembered πΒ·0Β·1 β‘ Ξ¦.down # β¦ x β¦ β
, Ξ» β€ L_down β§
πΒ·0Β·2 := Ξ¦.down( x β¦ π1:Ξ» )
πΒ·0Β·3 := β¦ x β¦ π1:Ξ», Ξ» β€ L_down β§
remembered πΒ·0Β·3 β‘ πΒ·0Β·1( x β¦ π1:Ξ» )
πΌ(L_down):
π»(ΞΎ.x):
πΏΒ·1Β·1 := π»(π1:Ξ»)
πΏ1Β·1 := πΏΒ·1Β·1 # π»(ΞΎ.x)
πΒ·1Β·1 := Ξ¦.down( x β¦ π2:Ξ» ) # π
π(πΒ·1Β·1):
πΒ·1Β·2 := Ξ¦.down( x β¦ π2:Ξ» )
πΒ·1Β·3 := β¦ x β¦ π2:Ξ», Ξ» β€ L_down β§
remembered πΒ·1Β·3 β‘ πΒ·0Β·1( x β¦ π2:Ξ» )
morphed πΒ·1Β·4 := πΒ·1Β·3
πΒ·1Β·5 := πΒ·1Β·3 # π(πΒ·1Β·1)
remembered πΒ·1Β·3 β‘ πΒ·0Β·3
recalled πΒ·1Β·3 β πΒ·0Β·3
recalled πΒ·0Β·3 β πΒ·0Β·1( x β¦ π1:Ξ» )
recalled πΒ·0Β·1 β Ξ¦.down
looped π3 := πΒ·0Β·2.Ο # proven, repeats πΒ·0Β·3
morphed πΒ·0Β·4 := π3:Ξ»