Skip to content

Typechecking errors in view when assigning to a constant with "role Simplify" annotation #554

@ComFreek

Description

@ComFreek

The reproducing example below can be found in LATIN2: https://gl.mathhub.info/MMT/LATIN2/-/blob/devel/source/playground.mmt.

@florian-rabe Do you have any idea what the error could be?

This typechecks fine:

theory RoleSimplifyBug =
  include ☞latin:?TypedEquality ❙
  include ☞latin:?Proofs ❙
  my_rule : {A,a: tm A} ⊦ a ≐ a ❙ // ❘ role Simplify ❙
❚
view RoleSimplifyBug_view : ?RoleSimplifyBug -> ?RoleSimplifyBug =
  include ☞latin:?TypedEquality ❙
  my_rule = ?RoleSimplifyBug?my_rule ❙
❚

When commenting in the role Simplify for my_rule, I get:

  1. the view's include errors with

    unknown error in declaration: general error: error while simplifying COMPOSE(composition)

  2. the view's constant assignment errors with

    error while adding successfully parsed element latin:/playground?RoleSimplifyBug_view?[latin:/playground?RoleSimplifyBug]/my_rule: general error: error while simplifying {A,a:tm A}⊦a≐a
    (Pi [A : tp, a : (apply tm A)] (apply ded (apply equal A a a)))

Metadata

Metadata

Assignees

Labels

bugtype checkerBugs related to the typechecker (incl. false positives and false negatives)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions