Zulip Chat Archive

Stream: mathlib4

Topic: mathport issues in data.int.least_greatest


Arien Malec (Dec 14 2022 at 04:52):

I have an initial port in mathlib4#1003 that's all green (modulo some docu cleanup) but the mathlib3port file that it's based on has a bunch of PrettyPrinter.parenthesize stack trace dumps in it. It looks like the resulting file has all the input from mathlib.data.int.least_greatest but it would be good for someone to look at the porting stack trace to see if there are any issues I need to be aware of.

Arien Malec (Dec 14 2022 at 16:07):

the PR was merged, but did anyone look at the mathlib3port file to see if the PrettyPrinter.parenthesize garbage there was indicative of anything?

Kevin Buzzard (Dec 14 2022 at 16:36):

Yikes! @Mario Carneiro do you know what's going on here? here is the mathlib3port opinion of this mathlib3 lemma [edit : fixed link]. Remark: the docstring contains P : ℤ → Prop and {m : P m} and [decidable_pred P] , all quoted with ` in the docstring. Could this be anything to do with it?

Mario Carneiro (Dec 14 2022 at 16:40):

parenthesize errors in mathport are bugs in mathport, usually because some mathlib4 syntax has changed and mathport is generating ill formed syntax objects

Mario Carneiro (Dec 14 2022 at 16:41):

the main question is, what bit of unusual syntax is used in this file? Usually this kind of error appears in every use of the bad syntax construction

Mario Carneiro (Dec 14 2022 at 16:44):

looks like (Mathlib.Tactic.tacticClassical_ (Tactic.skip "skip")) is the culprit, this is ill formed

Arien Malec (Dec 14 2022 at 16:46):

Good to hear, wasn't necessary to the proof.

Mario Carneiro (Dec 14 2022 at 16:47):

to be clear, the issue is not in least_of_bdd but in the declaration after that, exists_least_of_bdd

Mario Carneiro (Dec 14 2022 at 16:48):

the problem is classical; exact, which has to be translated in a complicated way because classical is now a tactic combinator like try and it seems that it isn't handling the case classical <;> tac => classical tac correctly

Kevin Buzzard (Dec 14 2022 at 16:51):

Mario Carneiro said:

to be clear, the issue is not in least_of_bdd but in the declaration after that, exists_least_of_bdd

yeah sorry, I fixed the link.

Kevin Buzzard (Dec 14 2022 at 16:52):

But is the long and short of it that if Arien managed to get a mathlib4 proof working then we don't have to worry about anything in this file in mathlib4, and it's just a bug in mathport?

Mario Carneiro (Dec 14 2022 at 16:53):

well, it should hopefully be a similar proof as the lean 3 one

Mario Carneiro (Dec 14 2022 at 16:53):

you will have to do the mathporting manually in this case

Mario Carneiro (Dec 14 2022 at 16:53):

at least until the bug is fixed

Kevin Buzzard (Dec 14 2022 at 16:54):

OK that's great, indeed that was what was done in this case. Thanks!


Last updated: Dec 20 2023 at 11:08 UTC