Summary
The rewrite tactic fails to match an equality proposition when both sides of the equality are lambda terms.
The minimal-example.zip demonstrates this:
Repro.lp: using two symbols l r : τ (a ⤳ o), Lambdapi fails to apply the rewrite tactic to the goal
(λ x : τ a, l x) = (λ x : τ a, r x)
with =_sym [(a ⤳ o)].
ReproExplicit.lp: the same example, but with =_sym fully instantiated with both lambda terms.
Both files fail to check. In the explicit version, Lambdapi reports that the selected equality does not match an identical-looking equality:
[ReproExplicit.lp:18:2-22:22] [(λ x, l x) = (λ x, r x)] doesn't match [(λ x, l x) = (λ x, r x)].
Note that this issue is not caused by the current limitation of the rewrite tactic that does not allow for it to be applied under binders, but instead it prevents the rewrite tactic to operate on lambda terms.
How to reproduce
cd minimal-example
lambdapi check Repro.lp
lambdapi check ReproExplicit.lp
Expected behavior
The rewrite should match the selected equality with lambda terms on both sides, and both files should check.
Actual behavior
Checking Repro.lp fails with:
[Repro.lp:18:2-40] [(λ x, l x) = (λ x, r x)] doesn't match [$x = $y].
Checking ReproExplicit.lp fails with:
[ReproExplicit.lp:18:2-22:22] [(λ x, l x) = (λ x, r x)] doesn't match [(λ x, l x) = (λ x, r x)].
Observed version
Observed with Lambdapi 3.0.0-145-g4ef4527.
Summary
The
rewritetactic fails to match an equality proposition when both sides of the equality are lambda terms.The minimal-example.zip demonstrates this:
Repro.lp: using two symbolsl r : τ (a ⤳ o), Lambdapi fails to apply the rewrite tactic to the goal=_sym [(a ⤳ o)].ReproExplicit.lp: the same example, but with=_symfully instantiated with both lambda terms.Both files fail to check. In the explicit version, Lambdapi reports that the selected equality does not match an identical-looking equality:
Note that this issue is not caused by the current limitation of the rewrite tactic that does not allow for it to be applied under binders, but instead it prevents the rewrite tactic to operate on lambda terms.
How to reproduce
cd minimal-example lambdapi check Repro.lp lambdapi check ReproExplicit.lpExpected behavior
The rewrite should match the selected equality with lambda terms on both sides, and both files should check.
Actual behavior
Checking
Repro.lpfails with:Checking
ReproExplicit.lpfails with:Observed version
Observed with Lambdapi
3.0.0-145-g4ef4527.