This PR fixes a non-termination bug that occurred when generating the match-expression equation theorems. The bug was triggered when the proof automation for the equation theorem repeatedly applied `injection(` to the same local declaration, as it could not be removed due to forward dependencies. See issue #6067 for an example that reproduces this issue. closes #6067
26 lines
576 B
Text
26 lines
576 B
Text
inductive Impl where
|
|
| inner (l r : Impl)
|
|
| leaf
|
|
|
|
namespace Impl
|
|
|
|
inductive Balanced : Impl → Prop where
|
|
| leaf : Balanced leaf
|
|
|
|
@[inline]
|
|
def balanceLErase (r : Impl) (hrb : Balanced r) : Impl :=
|
|
match r with
|
|
| leaf => .leaf
|
|
| l@(inner _ _) =>
|
|
match l with
|
|
| leaf => .leaf
|
|
| r@(inner ll lr) =>
|
|
if true then
|
|
match ll, lr with
|
|
| inner _ _, inner _ _ => .leaf
|
|
| _, _ => .leaf
|
|
else .leaf
|
|
|
|
theorem size_balanceLErase {r : Impl} {hrb} : (balanceLErase r hrb) = .leaf := by
|
|
simp only [balanceLErase]
|
|
sorry
|