Zulip Chat Archive

Stream: lean4

Topic: pretty printing `Rat`


Kyle Miller (Mar 09 2024 at 17:43):

@Yaël Dillies You mentioned you have pretty printing issues with Rat. You you give an example?

Yaël Dillies (Mar 09 2024 at 18:06):

I am currently working on defining NNRat.cast in #11203 and as such I need to understand proofs like the one of docs#Rat.cast_mk_of_ne_zero. In there, you see a goal of ⊢ ↑{ num := n, den := d, den_nz := h, reduced := c } = ↑a / ↑b (at the -- Porting note: was symm) and the corresponding goal in the NNRat version (which is in #11203 but not master) is even worse because there an extra Subtype.mk on top.

Eric Wieser (Mar 09 2024 at 18:19):

I'm not sure I understand what you expect it to print as

Yaël Dillies (Mar 09 2024 at 18:27):

Anything less verbose. ⟨n, d, h, c⟩ would be great (maybe not as the default but at least as a set_option)

Eric Rodriguez (Mar 09 2024 at 20:58):

There is a set option for this, pp.structureInstances or something of the like iirc


Last updated: May 02 2025 at 03:31 UTC