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

Automatic principal arguments in eqchk #539

Open
anjapetkovic opened this issue Aug 24, 2020 · 0 comments
Open

Automatic principal arguments in eqchk #539

anjapetkovic opened this issue Aug 24, 2020 · 0 comments

Comments

@anjapetkovic
Copy link
Collaborator

Principal (normalizing) arguments of constructors are determined automatically, when computational rules are installed. But if more than one rule in installed for some constructor S, only the principal arguments from the last rule are normalized, so previous rules may not even apply?

Here is an example, that illustrates the problem:

require eq ;;

rule A type ;;
rule S (X type) (Y type) type ;;
rule H (X type) type ;;
rule H1 (X type) type ;;

rule H1_eq_H (X type) : H1 X ≡ H X ;;
eq.add_rule H1_eq_H ;;

rule S_eq1 (X type) (Y type) : (S Y (H X)) ≡ Y ;;

rule S_eq2 (X type) (Y type) : (S (H X) Y) ≡ Y ;;

eq.add_rule S_eq1 ;;

eq.normalize (S (H A) A) ;;
eq.normalize (S A (H A)) ;;

eq.normalize (S (H1 A) A) ;;
eq.normalize (S A (H1 A)) ;;

eq.add_rule S_eq2 ;;

eq.normalize (S (H A) A) ;;
eq.normalize (S A (H A)) ;;
(* Both get normalized to A *)

eq.normalize (S (H1 A) A) ;;
eq.normalize (S A (H1 A)) ;;
(* The last one does not get normalized to A,
   because S_eq2 does not declare the second
   argument to be principal argument *)
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

1 participant