Zulip Chat Archive

Stream: lean4

Topic: Lean SQL initiatives


Arthur Paulino (Mar 07 2022 at 20:25):

Ah, just in case someone's wondering, @Florian Würmseer and I have a plan to deduplicate code. We're both exploring our own ideas to better understand their pros and cons and then we will extract common code to a separated Lean 4 package

Arthur Paulino (Mar 07 2022 at 21:58):

One difference between Florian's syntax and mine is that the former uses strings and the later uses identifiers. Example:

  • Florian's syntax accepts SELECT "c" FROM "t"
  • My syntax accepts SELECT c FROM t

What do you guys think? Which one is more appropriate?

Henrik Böving (Mar 07 2022 at 21:59):

Second

Sebastian Ullrich (Mar 07 2022 at 22:18):

Note that if you're planning to eventually move on to a statically-typed representation, there is a very good reason for why C# puts from in front of select: it is the correct order for auto completion

Arthur Paulino (Mar 08 2022 at 01:23):

Do you mean auto completing column names?

Martin Dvořák (Jun 22 2025 at 12:28):

Extremely minimalistic example:
https://github.com/madvorak/leanq/blob/c0c072ef94f6e8ed827841da158f0729420679e4/Main.lean#L5
If people are interested in LINQ for Lean 4, perhaps I could work on it in my free time.

Arthur Paulino (Jun 22 2025 at 12:31):

If I were gonna work on this these days, I would implement bindings to DuckDB or Polars. These systems scale remarkably well.

Max Nowak 🐉 (Jun 24 2025 at 17:32):

Just for completeness sake: For a Lean4 intro talk, I showed a simple example involving some SQL. I'd be potentially interested in expanding that into a whole thing.

Martin Dvořák (Jun 25 2025 at 07:54):

/poll What do you like better?
SQL
LINQ


Last updated: Dec 20 2025 at 21:32 UTC