Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qvermande committed Nov 2, 2023
1 parent c70c0e2 commit 9f0c6cc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions apps/coercion/tests/test_coercion.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,20 @@ Check natmul R n : ringType_sort R.
Check n : ringType_sort R.

End TestNatMul.

Elpi Accumulate coercion.db lp:{{

coercion _ V T E {{ Nat.mul lp:V }} :-
coq.unify-eq T {{ nat }} ok,
coq.unify-eq E {{ nat -> nat }} ok.

coercion _ V T E {{ { m : nat | m < lp:V } }} :-
coq.unify-eq T {{ nat }} ok,
coq.unify-eq E {{ Type }} ok.

}}.
Elpi Typecheck coercion.

Check 3 2.
Check forall (x : 3), proj1_sig x < 3.

0 comments on commit 9f0c6cc

Please sign in to comment.