Zulip Chat Archive

Stream: new members

Topic: Forward type proofs using fix-assume-show layout


Ayush Agrawal (Oct 05 2021 at 20:55):

Hi guys! I was trying out this 'Structured' proof from hitchhikers_guide_Lean book.

lemma fst_of_two_props : a b : Prop, a  b  a :=
fix a b : Prop,
assume ha : a,
assume hb : b,
show a, from
ha

But it is not able to recognize fix. Which library should I import to make it work? Thanks in advance!

Kevin Buzzard (Oct 05 2021 at 20:56):

fix is not a thing in Lean AFAIK. Maybe it's something specific to the Hitchhiker's guide book?

Kevin Buzzard (Oct 05 2021 at 20:57):

Just change it to assume or λ

Ayush Agrawal (Oct 05 2021 at 20:58):

Thanks @Kevin Buzzard for the info! I thought that the book is purely based on Lean.

Reid Barton (Oct 05 2021 at 20:59):

https://raw.githubusercontent.com/blanchette/logical_verification_2020/master/hitchhikers_guide.pdf page 33 (43)

Reid Barton (Oct 05 2021 at 20:59):

aha https://raw.githubusercontent.com/blanchette/logical_verification_2020/master/lean/lovelib.lean

Reid Barton (Oct 05 2021 at 21:01):

So basically fix is a lambda--I guess they wanted a better name than "lambda" without the propositional connotations of "assume"

Ayush Agrawal (Oct 05 2021 at 21:03):

Oh! now getting it. Thanks @Reid Barton

Anne Baanen (Oct 06 2021 at 08:03):

See also this discussion on introducing fix


Last updated: Dec 20 2023 at 11:08 UTC