Debian Codegraph @

test-suite/bugs/bug_18865.v

raw
1 #[universes(polymorphic)]
2 Inductive sig@{s s' s''|u v| } {A:Type@{s|u}} (P:A -> Type@{s'|v}) : Type@{s''|max(u,v)} :=
3 exist : forall x:A, P x -> sig P.
4
5 Notation "{ x : A & P }" := (sig (A:=A) (fun x => P)) (at level 0, x at level 99) : type_scope.
6
7 #[universes(polymorphic)]
8 Definition proj1_sig@{s s'|u v| } {A:Type@{s|u}} {P:A -> Type@{s'|v}} (e:sig@{_ _ s|_ _} P) :=
9 match e with
10 | exist _ a b => a
11 end.
12
13 Notation "x .1" := (proj1_sig x) (at level 1, left associativity, format "x .1").
14
15 Definition projT1_eq {A} {P : A -> Type} {u v : { a : A & P a }} (p : u = v) : u.1 = v.1
16 := match p with eq_refl => eq_refl end.
17
18 Parameters (A : Type) (P : A -> Type) (u : { a : A & P a }) (b : P u.1).
19
20 Set Definitional UIP.
21
22 Inductive SEq (A : Type) (a : A) : forall (B : Type), B -> SProp := Seq_refl : SEq A a A a.
23
24 Check
25 @eq_refl _
26 ((fun (A : Type) (a : A) (B: Type) (b : B) (e : SEq A a B b) =>
27 match e with Seq_refl _ _ => tt end) _ (P u.1) _ (P u.1)
28 ((fun x : SEq _ (P u.1) _ (P u.1) => x) (Seq_refl _ _))).
29
30 Check @eq_refl _
31 ((fun (A : Type) (a : A) (B: Type) (b : B) (e : SEq A a B b) =>
32 match e with Seq_refl _ _ => tt end) _ (P u.1) _ (P u.1)
33 ((fun x : SEq _ (P u.1) _ (P u.1) => x) (Seq_refl _ _)))
34 : tt = tt.