Debian Codegraph @

test-suite/success/boundvars.v

raw
1 (* An example showing a bug in the detection of free variables *)
2 (* "x" is not free in the common type of "x" and "y" *)
3
4 Check forall (x z:unit) (x y : match z as x return x=x with tt => eq_refl end = eq_refl), x=x.
5
6 (* An example showing a bug in the detection of bound variables *)
7
8 Goal forall x, match x return x = x with 0 => eq_refl | _ => eq_refl end = eq_refl.
9 intro.
10 match goal with
11 |- (match x as y in nat return y = y with O => _ | S n => _ end) = _ => assert (forall y, y = 0) end.
12 intro.
13 Check x0. (* Check that "y" has been bound to "x0" while matching "match x as x0 return x0=x0 with ... end" *)
14 Abort.