Skip to content
This repository was archived by the owner on Oct 14, 2023. It is now read-only.
This repository was archived by the owner on Oct 14, 2023. It is now read-only.

assertion violation when using rfl to define instance #1952

Closed
@kbuzzard

Description

@kbuzzard

Prerequisites

  • [X ] Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.

Description

Assertion violation in Lean

Steps to Reproduce

Run the one-liner

instance foo (α : Type) : group α := { mul_assoc := λ x y z, rfl }

Expected behavior: [What you expect to happen]

invalid structure value { ... }, field 'mul' was not provided (etc etc)

Actual behavior: [What actually happens]

LEAN ASSERTION VIOLATION
File: /home/travis/build/leanprover/lean/src/frontends/lean/elaborator.cpp
Line: 3167
Task: /home/buzzard/test.lean: foo
m_ctx.match(e, *val2)

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

Lean (version 3.3.1, commit 28f4143be31b, Release) (on Ubuntu 16.04)

Additional Information

I have seen this issue several times now, which is why I'm reporting it. I usually trigger it with an over-optimistic rfl when attempting to define fields of an instance of a structure.

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