Debian Codegraph @

test-suite/bugs/bug_2670.v

raw
1 (* Check that problems with several solutions are solved in 8.4 as in 8.2 and 8.3 *)
2
3 Inductive Fin: nat -> Set :=
4 | first k : Fin (S k)
5 | succ k: Fin k -> Fin (S k).
6
7 Lemma match_sym_eq_eq: forall (n1 n2: nat)(f: Fin n1)(e: n1 = n2),
8 f = match sym_eq e in (_ = l) return (Fin l) with refl_equal =>
9 match e in (_ = l) return (Fin l) with refl_equal => f end end.
10 Proof.
11 intros n1 n2 f e.
12 (* Next line has a dependent and a non dependent solution *)
13 (* 8.2 and 8.3 used to choose the dependent one which is the one to make *)
14 (* the goal progress *)
15 refine (match e return _ with refl_equal => _ end).
16 reflexivity.
17 Undo 2.
18 (** Check insensitivity to alphabetic order *)
19 refine (match e as a in _ = b return _ with refl_equal => _ end).
20 reflexivity.
21 Undo 2.
22 (** Check insensitivity to alphabetic order *)
23 refine (match e as z in _ = y return _ with refl_equal => _ end).
24 reflexivity.
25 Undo 2.
26 (* Next line similarly has a dependent and a non dependent solution *)
27 refine (match e with refl_equal => _ end).
28 reflexivity.
29 Qed.