lean icon indicating copy to clipboard operation
lean copied to clipboard

leanchecker should print french quotes

Open fpvandoorn opened this issue 5 years ago • 5 comments

... if a component of a name contains a period. See maxhaslbeck/proving-contest-backends#27

fpvandoorn avatar Feb 17 '20 22:02 fpvandoorn

Ideally the code snippet in https://github.com/maxhaslbeck/proving-contest-backends/issues/27#issue-566490388 should result in

«quot.sound» : ∀ {α : Sort u} {r : α → α → Prop} {a b : α}, r a b → «quot.mk» r a = «quot.mk» r b

with French quotes both around the name and around the type.

Note that #print and #print axioms in Lean put french quotes around ambiguous names in the type, but not around the name of the declaration you're printing. That could be improved, too.

fpvandoorn avatar Feb 17 '20 22:02 fpvandoorn

Having no clue about any of the Lean cpp infrastructure, is this something that should be fixed globally in declaration.cpp or locally in checker.cpp?

kappelmann avatar Feb 19 '20 09:02 kappelmann

Locally in pp_name -- compare with https://github.com/leanprover/lean/blob/master/src/util/name.cpp#L58

Kha avatar Feb 19 '20 09:02 Kha

@gebner Thanks for dealing with this. I just wanted to adapt our proving contest backend and think that there is still some issue. The program

axiom «quot.sound : a» : false
theorem my_proof : false := «quot.sound : a»

and

axiom «quot.sound» : false
theorem my_proof : false := «quot.sound»

return the same warning, i.e. "WARNING: Unknown axiom '«quot.sound»' used to prove theorem.... Seems like : <string> will be chopped off from quoted names?

kappelmann avatar Jun 18 '20 12:06 kappelmann

Seems like : <string> will be chopped off from quoted names?

This is a bug in the text export parser of leanchecker.

gebner avatar Jun 18 '20 13:06 gebner