Debian Codegraph @

test-suite/bugs/bug_8432.v

raw
1 Require Import Program.Tactics.
2
3 Obligation Tactic := idtac.
4 Set Universe Polymorphism.
5
6 Inductive paths {A : Type} (a : A) : A -> Type :=
7 idpath : paths a a.
8
9 Inductive Empty : Type :=.
10 Inductive Unit : Type := tt.
11 Definition not (A : Type) := A -> Empty.
12
13 Lemma nat_path_O_S (n : nat) (H : paths O (S n)) : Empty.
14 Proof. refine (
15 match H in paths _ i return
16 match i with
17 | O => Unit
18 | S _ => Empty
19 end
20 with
21 | idpath _ => tt
22 end
23 ). Defined.
24 Lemma symmetry {A} (x y : A) (p : paths x y) : paths y x.
25 Proof.
26 destruct p. apply idpath.
27 Defined.
28 Lemma nat_path_S_O (n : nat) (H : paths (S n) O) : Empty.
29 Proof. eapply nat_path_O_S. exact (symmetry _ _ H). Defined.
30 Set Printing Universes.
31 Program Fixpoint succ_not_zero (n:nat) : not (paths (S n) 0) :=
32 match n as n return not (paths (S n) 0) with
33 | 0 => nat_path_S_O _
34 | S n' => let dummy := succ_not_zero n' in _
35 end.
36 Next Obligation.
37 intros f _ n dummy H. exact (nat_path_S_O _ H).
38 Show Universes.
39 Defined.