math-comp icon indicating copy to clipboard operation
math-comp copied to clipboard

"elim E: x / t" should equate "x" not "t"

Open gares opened this issue 10 years ago • 9 comments

The E name is for the closes term on the RHS of colon, not the eliminated one.

gares avatar Jul 29 '15 16:07 gares

@gares I do not understand the statement of the problem. Is it solved?

CohenCyril avatar Apr 04 '19 18:04 CohenCyril

Still open :-(

gares avatar Apr 04 '19 20:04 gares

It is broken since day one. elim e: a b c/ d. The equation e should talk about a, that is the leftmost term among a b c d.

gares avatar Apr 04 '19 20:04 gares

Today it is always about d.

gares avatar Apr 04 '19 20:04 gares

Shouldn't it be about all the indices?

CohenCyril avatar Apr 04 '19 21:04 CohenCyril

@gares "day one" is a bit of an overstatement - this did use to work as intended in the original version of the code...

ggonthier avatar Apr 05 '19 08:04 ggonthier

Yea, I mean "day 1 of the implementation of elim I wrote" ;-)

gares avatar Apr 05 '19 10:04 gares

While we are at it:

  • in case: I agree that the equation should be abut the leftmost term
  • in elim: I've always thought it was a debug feature to see the constructor that generated the current goal; having the equation talk about the eliminated term fits this use case.

@ggonthier do you have a reason for elim (other than consistency)?

gares avatar Apr 05 '19 10:04 gares

I think the debug value is just as good for indexes as it is for main terms, so there's no compelling reason for introducing an inconsistency here. It's not unlikely that the eliminated with dependent indices will not occur at all in the goal, but the indices will, and in that case only the equation on the indices will be useful.

ggonthier avatar Apr 05 '19 11:04 ggonthier