nomeata / loogle

Mathlib search tool
https://loogle.lean-lang.org/
Apache License 2.0
61 stars 6 forks source link

Improved type rendering #7

Open nomeata opened 10 months ago

nomeata commented 10 months ago

The current way Loogle renders types can become very verbose. What would be a better way?

Unfortunately, the signature syntax before : doesn’t allow unnamed arguments (Nat), and the syntax after : doesn’t allow binders without types (R).

Also, should #check use the same syntax? The documentation generator?

Ideally, the code that does all this is not loogle-specific and lives in Lean or Std.

Shreyas4991 commented 10 months ago

I think the first change is definitely welcome. For the second one, the closer it is to the way we write defs, the easier it might be. Just to get it on record for this issue: Removing implicit arguments would be nice.

Overall, whatever changes are made, I propose that at least in the backend at the API level, each hit could have multiple variants of type signatures. On the front end, some safe default can be used and we can provide users options on how they wish to see the type signatures.