Zulip Chat Archive

Stream: new members

Topic: Semantics Update Syntax?


Andrew Elsey (Oct 22 2020 at 16:05):

Hi all,

I saw this syntax in a textbook:
image.png
I'm trying to figure out how to use it. Is this real syntax or just CS notation that's misleadingly placed? Do I need to implement a type class? Trying to update a N -> Some Type environment

Mario Carneiro (Oct 22 2020 at 16:06):

context is important

Mario Carneiro (Oct 22 2020 at 16:07):

but if I had to guess, it is probably a substitution operator

Mario Carneiro (Oct 22 2020 at 16:08):

what was the surrounding paragraph? The textbook's topic? Symbols are very overloaded in math

Jasmin Blanchette (Oct 22 2020 at 16:12):

Looks like the Hitchhiker's guide to me.

Andrew Elsey (Oct 22 2020 at 16:12):

This fella:
image.png
It's all over the chapter. I know this is common CS notation so I wasn't sure if the book is just confusing me into believing it's syntax

Jasmin Blanchette (Oct 22 2020 at 16:13):

It's real Lean syntax. We've defined it in LoVelib. That's what the text says (or tries to say).

Jasmin Blanchette (Oct 22 2020 at 16:14):

Which happens to also coincide more or less with traditional computer science syntax.

Jasmin Blanchette (Oct 22 2020 at 16:14):

Does this answer your question?

Reid Barton (Oct 22 2020 at 16:14):

So it's the just barely visible state (probably s) modified to map the variable x to the value a s which is as described at the start of that paragraph.

Andrew Elsey (Oct 22 2020 at 16:15):

Oh, I see now, I have to install a library to get it, cool, will check that out. Thank you folks very much

Jasmin Blanchette (Oct 22 2020 at 16:15):

Ah, that clarifies it.

Jasmin Blanchette (Oct 22 2020 at 16:15):

LoVelib is used throughout. See the preface. ;)

Andrew Elsey (Oct 22 2020 at 16:16):

Yep, just grepped and saw. Will check it out. Thanks!

Andrew Elsey (Oct 22 2020 at 16:16):

Great book BTW


Last updated: Dec 20 2023 at 11:08 UTC