Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect reuse of name in generated case #120

Open
south163 opened this issue May 4, 2019 · 1 comment
Open

incorrect reuse of name in generated case #120

south163 opened this issue May 4, 2019 · 1 comment

Comments

@south163
Copy link

south163 commented May 4, 2019

When you use names like n1 and n2 in a context relation definition case analysis on a hypotheses with an existing nominal constant dependency can end up missing a necessary renaming and confuse two separate names. When names such as x and y are used instead the bug does not arise.

The following is a small example which demonstrates the issue.

Kind lfobj type.
Kind lftype type.

Type tm lftype.
Type ty lftype.
Type of lfobj -> lfobj -> lftype.
Type hastype lftype -> lfobj -> o.

Define ctx : olist -> prop by
  ctx nil ;
  nabla n1 n2, ctx (hastype (of n1 T) n2 :: hastype tm n1 :: G) := ctx G.

Theorem t :
  forall G, nabla (x:lfobj), ctx (G x) -> ctx (G x).
induction on 1. intros. case H1 (keep).
  %%% G n1 = nil
  search.
  %%% G n1 = hastype (of n2 (T n1)) n3 :: hastype tm n2 :: G1 n1
  search.
  %%% G n1 = hastype (of n1 T) n1 :: hastype tm n1 :: G1
    % This case uses the name n1 for both items in context which is wrong.
  skip.
  %%% G n1 = hastype (of n1 T) n2 :: hastype tm n1 :: G1
  search.
@chaudhuri
Copy link
Member

chaudhuri commented May 4, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants