Skip to content

Rewrite tactic fails to match equality when both sides are lambda terms #1487

Description

@melanie-taprogge

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions