Closed tom-huntington closed 4 months ago
I guess there are no 2y122
combinators.
You can get around this by explicitly adding a l
> 1 2 :: l add1 * r
ḷ ‘ × ṛ
ḷ 1 2 ➡️ 1
ḷ‘ 1 2 ➡️ 2
ḷ‘× 1 2 ➡️ 4
ḷ‘×ṛ 1 2 ➡️ 4
This is a 2-1-2-2 dyadic chain (B₁Φ₁)
└┬┘ ⋮
B₁ ⋮
└─┬──┘
Φ₁
Yea, what you did with the l
and r
is probably the best way to do that.
@codereport sorry for the confusion.
I mean the combinator tree is wrong: ΔΔ
is wrong
This is a 1-2-2 dyadic chain (ΔΔ)
└┬┘ ⋮
Δ ⋮
└┬─┘
Δ
Jelly is actually creating combinators that have no name. There is no spelling for the combinator representing the 1-2-2
dyadic chain.
fn Φ₁(f,g,h) = x,y -> g(f(x,y),h(x,y))
fn ??(f,g,h) = x,y -> g(f(x),h(x,y)
As I said it's easy to get a correct combinator tree because you can just rewrite with phi1 and C (i.e. Φ₁
and l
).
Ah I see, ok - I will take a look at this :+1:
If we look at the possible 2y122 / 2y221 combinators (which are specializations of Φ₁), we get:
g(f(x),h(x,y)) -- Φ.₂
g(f(y),h(x,y)) -- Φ.₄
g(f(x,y),h(x)) -- Φ.₆
g(f(x,y),h(y)) -- Φ.₈
So we will call this the Φ.₂
combinator. I have added it to Jello and now you get:
I was expecting Φ₁ (or some specialization
fn (f,g,h) = x,y -> g(f(x),h(x,y))
)Anyway thanks!