| 1 |
Set Implicit Arguments. |
| 2 |
Require Import Logic. |
| 3 |
|
| 4 |
(*Global Set Universe Polymorphism.*) |
| 5 |
Global Set Asymmetric Patterns. |
| 6 |
Local Set Primitive Projections. |
| 7 |
|
| 8 |
Local Open Scope type_scope. |
| 9 |
|
| 10 |
Record prod (A B : Type) : Type := |
| 11 |
pair { fst : A; snd : B }. |
| 12 |
|
| 13 |
Arguments pair {A B} _ _. |
| 14 |
|
| 15 |
Notation "x * y" := (prod x y) : type_scope. |
| 16 |
Notation "( x , y , .. , z )" := (pair .. (pair x y) .. z) : core_scope. |
| 17 |
|
| 18 |
Generalizable Variables X A B f g n. |
| 19 |
|
| 20 |
Inductive paths {A : Type} (a : A) : A -> Type := |
| 21 |
idpath : paths a a. |
| 22 |
|
| 23 |
Arguments idpath {A a} , [A] a. |
| 24 |
|
| 25 |
Notation "x = y :> A" := (@paths A x y) : type_scope. |
| 26 |
Notation "x = y" := (x = y :>_) : type_scope. |
| 27 |
|
| 28 |
Definition transport {A : Type} (P : A -> Type) {x y : A} (p : x = y) (u : P x) : P y := |
| 29 |
match p with idpath => u end. |
| 30 |
|
| 31 |
Definition transport_prod' {A : Type} {P Q : A -> Type} {a a' : A} (p : a = a') |
| 32 |
(z : P a * Q a) |
| 33 |
: transport (fun a => P a * Q a) p z = (transport _ p (fst z), transport _ p (snd z)) |
| 34 |
:= match p as p' return transport (fun a0 => P a0 * Q a0) p' z = (transport P p' (fst z), transport Q p' (snd z)) with |
| 35 |
| idpath => idpath |
| 36 |
end. (* success *) |
| 37 |
|
| 38 |
Definition transport_prod {A : Type} {P Q : A -> Type} {a a' : A} (p : a = a') |
| 39 |
(z : P a * Q a) |
| 40 |
: transport (fun a => P a * Q a) p z = (transport _ p (fst z), transport _ p (snd z)) |
| 41 |
:= match p with |
| 42 |
| idpath => idpath |
| 43 |
end. |