Debian Codegraph @

test-suite/bugs/bug_16140.v

raw
1 (* Test regression https://github.com/rocq-prover/rocq/issues/16140
2 where congruence produces ill-typed terms *)
3
4 Inductive wrap1 : Type :=
5 wrap1I (u : unit) : match u with tt => bool end -> wrap1.
6
7 Goal (wrap1I tt false) = (wrap1I tt true) -> False.
8 Proof.
9 Fail congruence. (* expected to fail *)
10 Abort.
11
12 Inductive wrap2 : unit -> Type :=
13 wrap2I (u : unit) : match u with tt => bool end -> wrap2 u.
14
15 Goal (wrap2I tt false) = (wrap2I tt true) -> False.
16 Proof.
17 Fail congruence. (* expected to fail *)
18 Abort.
19
20 Inductive wrap3 (u : unit) : Type :=
21 wrap3I : match u with tt => bool end -> wrap3 u.
22
23 Goal (wrap3I tt false) = (wrap3I tt true) -> False.
24 Proof.
25 congruence.
26 Qed.