ilyasergey / pnp

Lecture notes for a short course on proving/programming in Coq via SSReflect.
https://ilyasergey.net/pnp
BSD 2-Clause "Simplified" License
159 stars 16 forks source link

Array.v is not typechecking on Coq 8.9.1 and Mathcomp 1.9.0 #10

Closed clayrat closed 5 years ago

clayrat commented 5 years ago

The error is

File "./htt/array.v", line 151, characters 0-59:
Error:
In nested Ltac calls to "by (ssrhintarg)" and "done", last call failed.
No applicable tactic.

If I remove by on that line, the proof state is:

1 subgoal
I : finType
T : Type
a : {array I -> T}
f : {ffun I -> T}
V : valid (updi a (fgraph f))
______________________________________(1/1)
[/\ updi a [seq f i | i <- enum I] = updi a [seq f i | i <- enum I], true & #|I| + 0 = #|I|]
anton-trunov commented 5 years ago

Mathcomp 1.9 removed some arithmetic hints from the Coq standard library. You need to add addn0 manually:

by rewrite ptr0 V {3}fgraph_codom /= codomE size_map -cardE addn0.
anton-trunov commented 5 years ago

Fixed with aa0b0cb