| 1 |
(* File reduced by coq-bug-finder from original input, then from 7372 lines to 539 lines, then from 531 lines to 107 lines, then from 76 lines to 46 lines *) |
| 2 |
Module First. |
| 3 |
Set Asymmetric Patterns. |
| 4 |
Reserved Notation "x -> y" (at level 99, right associativity, y at level 200). |
| 5 |
Notation "A -> B" := (forall (_ : A), B). |
| 6 |
Set Universe Polymorphism. |
| 7 |
|
| 8 |
|
| 9 |
Notation "x → y" := (x -> y) |
| 10 |
(at level 99, y at level 200, right associativity): type_scope. |
| 11 |
Record sigT A (P : A -> Type) := |
| 12 |
{ projT1 : A ; projT2 : P projT1 }. |
| 13 |
Arguments projT1 {A P} s. |
| 14 |
Arguments projT2 {A P} s. |
| 15 |
Definition compose {A B C : Type} (g : B -> C) (f : A -> B) := fun x => g (f x). |
| 16 |
Reserved Notation "x = y" (at level 70, no associativity). |
| 17 |
Inductive paths {A : Type} (a : A) : A -> Type := idpath : paths a a where "x = y" := (@paths _ x y). |
| 18 |
Notation " x = y " := (paths x y) : type_scope. |
| 19 |
Definition transport {A : Type} (P : A -> Type) {x y : A} (p : x = y) (u : P x) : P y := match p with idpath => u end. |
| 20 |
Reserved Notation "{ x : A & P }" (at level 0, x at level 99). |
| 21 |
Notation "{ x : A & P }" := (sigT A (fun x => P)) : type_scope. |
| 22 |
|
| 23 |
|
| 24 |
Axiom path_sigma_uncurried : forall {A : Type} (P : A -> Type) (u v : sigT A P) (pq : {p : projT1 u = projT1 v & transport _ p (projT2 u) = projT2 v}), u = v. |
| 25 |
Axiom isequiv_pr1_contr : forall {A} {P : A -> Type}, (A -> {x : A & P x}). |
| 26 |
|
| 27 |
Definition path_sigma_hprop {A : Type} {P : A -> Type} (u v : sigT _ P) := |
| 28 |
@compose _ _ _ (path_sigma_uncurried P u v) (@isequiv_pr1_contr _ _). |
| 29 |
End First. |
| 30 |
|
| 31 |
Set Asymmetric Patterns. |
| 32 |
Set Universe Polymorphism. |
| 33 |
Arguments projT1 {_ _} _. |
| 34 |
Notation "( x ; y )" := (existT _ x y). |
| 35 |
Notation pr1 := projT1. |
| 36 |
Notation "x .1" := (projT1 x). |
| 37 |
Notation "x .2" := (projT2 x). |
| 38 |
Definition compose {A B C : Type} (g : B -> C) (f : A -> B) := fun x => g (f x). |
| 39 |
Notation "g 'o' f" := (compose g f) (at level 40, left associativity). |
| 40 |
Inductive paths {A : Type} (a : A) : A -> Type := idpath : paths a a where "x = y" := (@paths _ x y) : type_scope. |
| 41 |
Arguments idpath {A a} , [A] a. |
| 42 |
Definition transport {A : Type} (P : A -> Type) {x y : A} (p : x = y) (u : P x) : P y := match p with idpath => u end. |
| 43 |
Notation "p # x" := (transport _ p x) (right associativity, at level 65, only parsing). |
| 44 |
Class IsEquiv {A B : Type} (f : A -> B) := { equiv_inv : B -> A }. |
| 45 |
Notation "f ^-1" := (@equiv_inv _ _ f _) (at level 3). |
| 46 |
Axiom path_sigma_uncurried : forall {A : Type} (P : A -> Type) (u v : sigT P) (pq : {p : u.1 = v.1 & p # u.2 = v.2}), u = v. |
| 47 |
#[export] Instance isequiv_pr1_contr {A} {P : A -> Type} : IsEquiv (@pr1 A P) | 100. |
| 48 |
Admitted. |
| 49 |
|
| 50 |
Definition path_sigma_hprop {A : Type} {P : A -> Type} (u v : sigT P) : u.1 = v.1 -> u = v := |
| 51 |
path_sigma_uncurried P u v o pr1^-1. |