Debian Codegraph @

test-suite/ssr/nonPropType.v

raw
1 Require Import ssreflect.
2
3 (** Test the nonPropType interface and its application to prevent unwanted
4 instantiations in views. **)
5
6 Lemma raw_flip {T} (x y : T) : x = y -> y = x. Proof. by []. Qed.
7 Lemma flip {T : nonPropType} (x y : T) : x = y -> y = x. Proof. by []. Qed.
8
9 Lemma testSet : true = false -> True.
10 Proof.
11 Fail move/raw_flip.
12 have flip_true := @flip _ true.
13 (* flip_true : forall y : notProp bool, x = y -> y = x *)
14 simpl in flip_true.
15 (* flip_true : forall y : bool, x = y -> y = x *)
16 by move/flip.
17 Qed.
18
19 Lemma override (t1 t2 : True) : t1 = t2 -> True.
20 Proof.
21 Fail move/flip.
22 by move/(@flip (notProp True)).
23 Qed.