Zulip Chat Archive
Stream: mathlib4
Topic: No `⟦x⟧` notation in infoview?
Kevin Buzzard (Oct 29 2023 at 16:47):
import Mathlib.Data.Quot -- ⟦_⟧ notation
instance X.setoid : Setoid Nat where
r := (. = .)
iseqv := sorry
abbrev Q := Quotient X.setoid
example (x : Nat) : (⟦x⟧ : Q) = ⟦x⟧ := by
/-
x : Nat
⊢ Quotient.mk X.setoid x = Quotient.mk X.setoid x
-/
sorry
I was expecting to see ⟦x⟧ = ⟦x⟧
. How do I get quotient notation in the infoview? I can't even seem to rewrite to the quotient notation.
Eric Wieser (Oct 29 2023 at 17:33):
I suspect there is no delaborator for it
Kevin Buzzard (Oct 29 2023 at 19:05):
@Kyle Miller do you know how to fix this?
Kyle Miller (Oct 29 2023 at 22:43):
#8022 Often it seems that when a notation
doesn't pretty print you can turn it into a notation3
, which has a more sophisticated delaborator generator.
Eric Wieser (Oct 29 2023 at 22:45):
My understanding is that notation3
was only intended as a crutch for porting. It sounds like this is not the case, and so we should either:
- Just rename it, if no part of the tactic is a porting crutch
- Split the tactic into a
notation_with_delab
(with no hacks) andnotation3
(which isnotation_with_delab
+ compatibility hacks), and slowly eradicate the latter
Kyle Miller (Oct 29 2023 at 22:48):
notation3
tries to do everything that the Lean 3 version did, and I think in principle it doesn't have any features we don't want. Renaming it seems sensible to me.
Kyle Miller (Oct 29 2023 at 22:49):
I hope eventually notation
itself becomes better at generating delaborators.
The main interesting feature of notation3
is that it has some scoping constructs for dealing with nested binders.
Last updated: Dec 20 2023 at 11:08 UTC