I have a bug in the egg tactic which I am absolutely mystified by. The detailed reproducible version is that the following MWE 1 works, while MWE 2 fails.
importEggclassMagma(α:Type_)whereop:α→α→αinfix:65" ◇ "=>Magma.opvariable(G:Type)[MagmaG]abbrevEquation387:=∀(xy:G),x◇y=(y◇y)◇xabbrevEquation43:=∀(xy:G),x◇y=y◇xtheoremEquation387_implies_Equation43_calc(h:Equation387G):Equation43G:=byintroxyeggcalc[*]x◇y_=(y◇y)◇x_=(x◇x)◇(y◇y)_=((y◇y)◇(y◇y))◇(x◇x)_=((y◇y)◇y)◇(x◇x)_=(y◇y)◇(x◇x)_=(x◇x)◇y_=y◇xset_optionegg.explosiontrueintheoremEquation1571_implies_Equation40'(h:∀(xyz:G),x=(y◇z)◇(y◇(x◇z))):∀(xy:G),x◇x=y◇y:=byegg[*]-- never completes
The more high-level description of the problem is the following: I have two theorems, T1 and T2, which I want to solve using a tactic t. When I state and prove the theorems in the following order
theoremT1...:=byt...theoremT2...:=byt...
... everything works as expected. But if I reverse the order to
theoremT2...:=byt...theoremT1...:=byt...
... then the call to t in T1 behaves differently and fails to prove the theorem. How is this possible - that is, which kinds of contexts can lead to this difference in behavior?