Zulip Chat Archive

Stream: maths

Topic: equality of lambda-abstractions in HoTT


Matt Yan (Feb 06 2022 at 14:30):

(deleted)

Matt Yan (Feb 06 2022 at 14:30):

11BD39D9-8178-4A77-A17E-C56FBD72DD74.jpg

Adam Topaz (Feb 06 2022 at 14:37):

I don't know what the question was, but we have docs#funext which IIRC is proved via the existence of quotients in lean.

Matt Yan (Feb 06 2022 at 14:38):

typing on my phone and can't really embed an image nicely in text sorry :)

Matt Yan (Feb 06 2022 at 14:44):

It's more of a HoTT question, I'm at the early chapters of HoTT, I find it a huge jump from this definition to "it shows that f is uniquely determined by its values".
In order to reach the conclusion, it seems that this is implied (correct me if I'm wrong) $$ \lamda x: A. \Phi \equiv \lamda x: B. \Theta $$ as long as A=B A = B and that for every xA x \in A subsititution in Φ,Θ \Phi , \Theta result in equal values...additionally changing the temporary variable doesn't produce a new lamda-abstraction.

Reid Barton (Feb 06 2022 at 14:49):

Is this the HoTT book?

Matt Yan (Feb 06 2022 at 14:49):

the equality of lamda expressions seems to be meta-HoTT but I think definitely worth mentioning

Reid Barton (Feb 06 2022 at 14:51):

I just want to know the context of what you're reading so I can know what kind of answer is sensible.

Matt Yan (Feb 06 2022 at 14:51):

@Reid Barton yes, section 1.2 on functions

Reid Barton (Feb 06 2022 at 14:53):

So this is a kind of "definitional" (maybe the HoTT book says "judgmental") version of "a function is determined by its values".

Reid Barton (Feb 06 2022 at 14:55):

More specifically, suppose that x:Af[x]g[x]:Bx : A \vdash f[x] \equiv g[x] : B. (Here f[x]f[x] and g[x]g[x] are terms with free variable xx, i.e., x:Af[x]:Bx : A \vdash f[x] : B and x:Ag[x]:Bx : A \vdash g[x] : B. Also, we could allow BB to depend on xx but let's not for simplicity.)

Reid Barton (Feb 06 2022 at 14:55):

Then we have f(λx.f[x])(λx.g[x])g:AB\vdash f \equiv (\lambda x. f[x]) \equiv (\lambda x. g[x]) \equiv g : A \to B.

Reid Barton (Feb 06 2022 at 14:56):

Actually now I realize this is a confusing way to present it.

Reid Barton (Feb 06 2022 at 14:57):

Instead of saying f[x]f[x] and g[x]g[x] are terms with free variable xx, let me instead say that ff and gg were terms of type ABA \to B.

Reid Barton (Feb 06 2022 at 14:58):

Then if x:Af(x)g(x):Bx : A \vdash f(x) \equiv g(x) : B, then we have fg:AB\vdash f \equiv g : A \to B by that argument.

Reid Barton (Feb 06 2022 at 14:59):

I think this is what they mean by saying "a function is determined [up to judgmental equality] by its values [up to judgmental equality]". At this point they probably haven't introduced any other notion of equality yet.

Reid Barton (Feb 06 2022 at 15:01):

What does not follow is that for the typal equality/path type/what we normally think of as equality ==, a function is determined (up to ==) by its values (up to ==)

Matt Yan (Feb 06 2022 at 15:08):

Thanks! I understand your idea now, and it seems to me you are suggesting that lamda-abstraction like λx:A.f(x) \lambda x : A. f(x) is just syntactic sugar of something like x:Af(x):B x: A \vdash f(x): B

Matt Yan (Feb 06 2022 at 15:15):

Then if x:Af(x)g(x):Bx : A \vdash f(x) \equiv g(x) : B, then we have fg:AB\vdash f \equiv g : A \to B by that argument.

This is exactly what I think is missing in the book.

Matt Yan (Feb 06 2022 at 15:40):

I think it can be expressed using only the lambda-abstraction language, could be something along the lines of:
"for functions ff and gg, λx.f(x)=λx.g(x) \lambda x. f(x) = \lambda x. g(x) if and only if a:A a: A implies λx.f(x)(a)=λx.g(x)(a) \lambda x. f(x) (a) = \lambda x. g(x) (a)

Matt Yan (Feb 06 2022 at 15:51):

noting that a function has two kinds of constructors, with certain lambda-abstractions being one of them and the other being construction by definiton (named functions). the above is really just a propositional uniqueness of functions contructed by lambda-abstructions. And the definitional equality in the screenshot serves as the bridge between the uniqueness of named functions and the uniqueness of lambda functions


Last updated: Dec 20 2023 at 11:08 UTC