Zulip Chat Archive

Stream: new members

Topic: suggestion to enhance error message (calc failed)


rzeta0 (Dec 24 2024 at 01:45):

Earlier I got the following error message:

'calc' tactic failed, has type
  3 ^ (k + 1) ≥ 2 ^ (k + 1) + 100
but it is expected to have type
  3 ^ (k + 1) ≥ 2 ^ (k + 1) + 100

This was puzzling until I later found the 3 needed to be `(3:ℤ).

Could the error message be enhanced?


The source was an MoP exercise which I'll include as a spoiler :

Eric Wieser (Dec 24 2024 at 01:51):

set_option pp.numeralTypes true or similar would help here

Jason Rute (Dec 24 2024 at 01:51):

Yeah, maybe there needs to be a way to take two different types and pretty print them in a way where they are different, or to underline the differing terms. (Maybe with definitional equality this would be challenging to do reliably.)

Eric Wieser (Dec 24 2024 at 01:52):

There is already (underused) infrastructure for red/green diffs


Last updated: May 02 2025 at 03:31 UTC