Codebase list coq / 7ee2dd2
Refresh patches Julien Puydt 1 year, 7 months ago
9 changed file(s) with 147 addition(s) and 1117 deletion(s). Raw diff Collapse all Expand all
00 coq (8.16.0+dfsg-1) UNRELEASED; urgency=medium
11
22 * New upstream release.
3 * Refresh patches.
34
45 -- Julien Puydt <jpuydt@debian.org> Mon, 05 Sep 2022 16:23:16 +0200
56
33
44 --- coq.orig/tools/CoqMakefile.in
55 +++ coq/tools/CoqMakefile.in
6 @@ -108,9 +108,9 @@
6 @@ -109,9 +109,9 @@
77 OCAMLLIBDEP ?= "$(COQBIN)ocamllibdep"
88
99 # Timing scripts
3434
3535 # ASSUMPTIONS:
3636 # - the OPAM packages, specified by the user, are topologically sorted wrt. to the dependency relationship.
37 --- coq.orig/dev/bench/render_results
38 +++ coq/dev/bench/render_results
39 @@ -1,4 +1,4 @@
40 -#! /usr/bin/env ocaml
41 +#! /usr/bin/ocaml
42
43 (* ASSUMPTIONS:
44 - the 1-st command line argument (working directory):
4537 --- coq.orig/dev/bench/sort-by-deps
4638 +++ coq/dev/bench/sort-by-deps
4739 @@ -1,4 +1,4 @@
519511 @@ -1,4 +1,4 @@
520512 -#!/usr/bin/env bash
521513 +#!/bin/bash
522
523514 # Run in a proper install dune env.
524 case $1 in
515
516 opts=()
525517 --- coq.orig/dev/lint-commits.sh
526518 +++ coq/dev/lint-commits.sh
527519 @@ -1,4 +1,4 @@
546538 (progn
547539 - (echo "#!/usr/bin/env bash\n")
548540 + (echo "#!/bin/bash\n")
549 (bash "echo '\"$(dirname \"$0\")\"/%{bin:coqtop} -coqlib \"$(dirname \"$0\")/%{project_root}\" \"$@\"'")
541 (bash "echo '\"$(dirname \"$0\")\"/%{bin:coqtop} -I \"$(dirname \"$0\")/%{project_root}/../install/default/lib\" -coqlib \"$(dirname \"$0\")/%{project_root}\" \"$@\"'")
550542 (run chmod +x %{targets})))))
551543
552544 @@ -18,7 +18,7 @@
555547 (progn
556548 - (echo "#!/usr/bin/env bash\n")
557549 + (echo "#!/bin/bash\n")
558 (bash "echo '\"$(dirname \"$0\")\"/%{bin:coqc} -coqlib \"$(dirname \"$0\")\"/%{project_root} \"$@\"'")
550 (bash "echo '\"$(dirname \"$0\")\"/%{bin:coqc} -I \"$(dirname \"$0\")/%{project_root}/../install/default/lib\" -coqlib \"$(dirname \"$0\")\"/%{project_root} \"$@\"'")
559551 (run chmod +x %{targets})))))
560552
561553 @@ -54,7 +54,7 @@
564556 (progn
565557 - (echo "#!/usr/bin/env bash\n")
566558 + (echo "#!/bin/bash\n")
567 (bash "echo '\"$(dirname \"$0\")\"/%{bin:coqtop.byte} -coqlib \"$(dirname \"$0\")\"/%{project_root} \"$@\"'")
559 (bash "echo '\"$(dirname \"$0\")\"/%{bin:coqtop.byte} -I \"$(dirname \"$0\")/%{project_root}/../install/default/lib\" -coqlib \"$(dirname \"$0\")\"/%{project_root} \"$@\"'")
568560 (run chmod +x %{targets})))))
569561
570562 @@ -75,6 +75,6 @@
573565 (progn
574566 - (echo "#!/usr/bin/env bash\n")
575567 + (echo "#!/bin/bash\n")
576 (bash "echo '\"$(dirname \"$0\")\"/%{bin:coqide} -coqlib \"$(dirname \"$0\")\"/%{project_root} \"$@\"'")
568 (bash "echo '\"$(dirname \"$0\")\"/%{bin:coqide} -I \"$(dirname \"$0\")/%{project_root}/../install/default/lib\" -coqlib \"$(dirname \"$0\")\"/%{project_root} \"$@\"'")
577569 (run chmod +x %{targets})))))
578570 --- coq.orig/dev/tools/backport-pr.sh
579571 +++ coq/dev/tools/backport-pr.sh
+0
-15
debian/patches/fix_typo.patch less more
0 Description: fix a trivial typo
1 Author: Julien Puydt
2 Forwarded: https://github.com/coq/coq/issues/16054
3
4 --- coq.orig/kernel/nativelib.ml
5 +++ coq/kernel/nativelib.ml
6 @@ -96,7 +96,7 @@
7 | Inl (Unix.WEXITED 127) -> Pp.(strbrk "The OCaml compiler was not found. Make sure it is installed, together with findlib.")
8 | Inl (Unix.WEXITED n) ->
9 Pp.(strbrk "Native compiler exited with status" ++ str" " ++ int n
10 - ++ strbrk (if n = 2 then " (in case of stack overflow, increasing stack size (typicaly with \"ulimit -s\") often helps)" else ""))
11 + ++ strbrk (if n = 2 then " (in case of stack overflow, increasing stack size (typically with \"ulimit -s\") often helps)" else ""))
12 | Inl (Unix.WSIGNALED n) -> Pp.(strbrk "Native compiler killed by signal" ++ str" " ++ int n)
13 | Inl (Unix.WSTOPPED n) -> Pp.(strbrk "Native compiler stopped by signal" ++ str" " ++ int n)
14 | Inr e -> Pp.(strbrk "Native compiler failed with error: " ++ strbrk (Unix.error_message e))
1818
1919 --- coq.orig/test-suite/Makefile
2020 +++ coq/test-suite/Makefile
21 @@ -144,7 +144,7 @@
21 @@ -143,7 +143,7 @@
2222 coqdoc ssr $(wildcard primitive/*) ltac2
2323
2424 # All subsystems
3434 -
3535 -. ../template/init.sh
3636 -mv src/test_plugin.mlpack src/test_plugin.mllib
37 -sed -i.old 's/coq-core.plugins.ltac/coq-core.plugins.ltac,foo/' src/META.coq-test-suite
3738 -
3839 -echo "let () = Foolib.foo ();;" >> src/test_aux.ml
39 -export OCAMLPATH=$OCAMLPATH:$PWD/findlib
4040 -if which cygpath 2>/dev/null; then
41 - # the only way I found to pass OCAMLPATH on win is to have it contain
42 - # only one entry
43 - OCAMLPATH=$(cygpath -w "$PWD"/findlib)
44 - export OCAMLPATH
41 - # separator is ; on windows
42 - OCAMLPATH=$OCAMLPATH;$(cygpath -m "$PWD"/findlib)
43 -else
44 - OCAMLPATH=$OCAMLPATH:$PWD/findlib
4545 -fi
4646 -make -C findlib/foo clean
4747 -coq_makefile -f _CoqProject -o Makefile
946946 -Lemma Z_rem_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> r = Z.rem a b. Proof. intros; nia. Qed.
947947 -Lemma Z_rem_wd : Morphisms.Proper (Morphisms.respectful Z.eq (Morphisms.respectful Z.eq Z.eq)) Z.rem. Proof. intros; nia. Qed.
948948 -*)
949 --- coq.orig/test-suite/bugs/closed/bug_4544.v
950 +++ /dev/null
951 @@ -1,1010 +0,0 @@
952 -(* -*- mode: coq; coq-prog-args: ("-nois" "-indices-matter" "-R" "." "Top" "-top" "bug_oog_looping_rewrite_01") -*- *)
953 -(* File reduced by coq-bug-finder from original input, then from 2553 lines to 1932 lines, then from 1946 lines to 1932 lines, then from 2467 lines to 1002 lines, then from 1016 lines to 1002 lines *)
954 -(* coqc version 8.5 (January 2016) compiled on Jan 23 2016 16:15:22 with OCaml 4.01.0
955 - coqtop version 8.5 (January 2016) *)
956 -Require Import Coq.Init.Ltac.
957 -Inductive False := .
958 -Axiom proof_admitted : False.
959 -Tactic Notation "admit" := case proof_admitted.
960 -Require Coq.Init.Datatypes.
961 -
962 -Import Coq.Init.Notations.
963 -
964 -Global Set Universe Polymorphism.
965 -
966 -Notation "A -> B" := (forall (_ : A), B) : type_scope.
967 -Global Set Primitive Projections.
968 -
969 -Inductive sum (A B : Type) : Type :=
970 - | inl : A -> sum A B
971 - | inr : B -> sum A B.
972 -Notation nat := Coq.Init.Datatypes.nat.
973 -Notation O := Coq.Init.Datatypes.O.
974 -Notation S := Coq.Init.Datatypes.S.
975 -Notation "x + y" := (sum x y) : type_scope.
976 -
977 -Record prod (A B : Type) := pair { fst : A ; snd : B }.
978 -
979 -Notation "x * y" := (prod x y) : type_scope.
980 -Module Export Specif.
981 -
982 -Set Implicit Arguments.
983 -
984 -Record sig {A} (P : A -> Type) := exist { proj1_sig : A ; proj2_sig : P proj1_sig }.
985 -Arguments proj1_sig {A P} _ / .
986 -
987 -Notation sigT := sig (only parsing).
988 -Notation existT := exist (only parsing).
989 -
990 -Notation "{ x : A & P }" := (sigT (fun x:A => P)) : type_scope.
991 -
992 -Notation projT1 := proj1_sig (only parsing).
993 -Notation projT2 := proj2_sig (only parsing).
994 -
995 -End Specif.
996 -Module Export HoTT_DOT_Basics_DOT_Overture.
997 -Module Export HoTT.
998 -Module Export Basics.
999 -Module Export Overture.
1000 -
1001 -Global Set Keyed Unification.
1002 -
1003 -Global Unset Strict Universe Declaration.
1004 -
1005 -Notation Type0 := Set.
1006 -
1007 -Definition Type1@{i} := Eval hnf in let gt := (Set : Type@{i}) in Type@{i}.
1008 -
1009 -Definition Type2@{i j} := Eval hnf in let gt := (Type1@{j} : Type@{i}) in Type@{i}.
1010 -
1011 -Definition Type2le@{i j} := Eval hnf in let gt := (Set : Type@{i}) in
1012 - let ge := ((fun x => x) : Type1@{j} -> Type@{i}) in Type@{i}.
1013 -
1014 -Notation idmap := (fun x => x).
1015 -Delimit Scope function_scope with function.
1016 -Delimit Scope path_scope with path.
1017 -Delimit Scope fibration_scope with fibration.
1018 -Delimit Scope trunc_scope with trunc.
1019 -
1020 -Open Scope trunc_scope.
1021 -Open Scope path_scope.
1022 -Open Scope fibration_scope.
1023 -Open Scope nat_scope.
1024 -Open Scope function_scope.
1025 -
1026 -Notation "( x ; y )" := (existT _ x y) : fibration_scope.
1027 -
1028 -Notation pr1 := projT1.
1029 -Notation pr2 := projT2.
1030 -
1031 -Notation "x .1" := (pr1 x) (at level 3, format "x '.1'") : fibration_scope.
1032 -Notation "x .2" := (pr2 x) (at level 3, format "x '.2'") : fibration_scope.
1033 -
1034 -Notation compose := (fun g f x => g (f x)).
1035 -
1036 -Notation "g 'o' f" := (compose g%function f%function) (at level 40, left associativity) : function_scope.
1037 -
1038 -Inductive paths {A : Type} (a : A) : A -> Type :=
1039 - idpath : paths a a.
1040 -
1041 -Arguments idpath {A a} , [A] a.
1042 -
1043 -Notation "x = y :> A" := (@paths A x y) : type_scope.
1044 -Notation "x = y" := (x = y :>_) : type_scope.
1045 -
1046 -Definition inverse {A : Type} {x y : A} (p : x = y) : y = x
1047 - := match p with idpath => idpath end.
1048 -
1049 -Definition concat {A : Type} {x y z : A} (p : x = y) (q : y = z) : x = z :=
1050 - match p, q with idpath, idpath => idpath end.
1051 -
1052 -Notation "1" := idpath : path_scope.
1053 -
1054 -Notation "p @ q" := (concat p%path q%path) (at level 20) : path_scope.
1055 -
1056 -Notation "p ^" := (inverse p%path) (at level 3, format "p '^'") : path_scope.
1057 -
1058 -Definition transport {A : Type} (P : A -> Type) {x y : A} (p : x = y) (u : P x) : P y :=
1059 - match p with idpath => u end.
1060 -
1061 -Notation "p # x" := (transport _ p x) (right associativity, at level 65, only parsing) : path_scope.
1062 -
1063 -Definition ap {A B:Type} (f:A -> B) {x y:A} (p:x = y) : f x = f y
1064 - := match p with idpath => idpath end.
1065 -
1066 -Definition pointwise_paths {A} {P:A->Type} (f g:forall x:A, P x)
1067 - := forall x:A, f x = g x.
1068 -
1069 -Notation "f == g" := (pointwise_paths f g) (at level 70, no associativity) : type_scope.
1070 -
1071 -Definition Sect {A B : Type} (s : A -> B) (r : B -> A) :=
1072 - forall x : A, r (s x) = x.
1073 -
1074 -Class IsEquiv {A B : Type} (f : A -> B) := BuildIsEquiv {
1075 - equiv_inv : B -> A ;
1076 - eisretr : Sect equiv_inv f;
1077 - eissect : Sect f equiv_inv;
1078 - eisadj : forall x : A, eisretr (f x) = ap f (eissect x)
1079 -}.
1080 -
1081 -Arguments eisretr {A B}%type_scope f%function_scope {_} _.
1082 -
1083 -Record Equiv A B := BuildEquiv {
1084 - equiv_fun : A -> B ;
1085 - equiv_isequiv : IsEquiv equiv_fun
1086 -}.
1087 -
1088 -Coercion equiv_fun : Equiv >-> Funclass.
1089 -
1090 -Global Existing Instance equiv_isequiv.
1091 -
1092 -Notation "A <~> B" := (Equiv A B) (at level 85) : type_scope.
1093 -
1094 -Notation "f ^-1" := (@equiv_inv _ _ f _) (at level 3, format "f '^-1'") : function_scope.
1095 -
1096 -Class Contr_internal (A : Type) := BuildContr {
1097 - center : A ;
1098 - contr : (forall y : A, center = y)
1099 -}.
1100 -
1101 -Arguments center A {_}.
1102 -
1103 -Inductive trunc_index : Type :=
1104 -| minus_two : trunc_index
1105 -| trunc_S : trunc_index -> trunc_index.
1106 -
1107 -Notation "n .+1" := (trunc_S n) (at level 2, left associativity, format "n .+1") : trunc_scope.
1108 -Notation "-2" := minus_two (at level 0) : trunc_scope.
1109 -Notation "-1" := (-2.+1) (at level 0) : trunc_scope.
1110 -Notation "0" := (-1.+1) : trunc_scope.
1111 -
1112 -Fixpoint IsTrunc_internal (n : trunc_index) (A : Type) : Type :=
1113 - match n with
1114 - | -2 => Contr_internal A
1115 - | n'.+1 => forall (x y : A), IsTrunc_internal n' (x = y)
1116 - end.
1117 -
1118 -Class IsTrunc (n : trunc_index) (A : Type) : Type :=
1119 - Trunc_is_trunc : IsTrunc_internal n A.
1120 -
1121 -Global Instance istrunc_paths (A : Type) n `{H : IsTrunc n.+1 A} (x y : A)
1122 -: IsTrunc n (x = y)
1123 - := H x y.
1124 -
1125 -Notation Contr := (IsTrunc -2).
1126 -Notation IsHProp := (IsTrunc -1).
1127 -
1128 -Hint Extern 0 => progress change Contr_internal with Contr in * : typeclass_instances.
1129 -
1130 -Monomorphic Axiom dummy_funext_type : Type0.
1131 -Monomorphic Class Funext := { dummy_funext_value : dummy_funext_type }.
1132 -
1133 -Inductive Unit : Type1 :=
1134 - tt : Unit.
1135 -
1136 -Class IsPointed (A : Type) := point : A.
1137 -
1138 -Arguments point A {_}.
1139 -
1140 -Record pType :=
1141 - { pointed_type : Type ;
1142 - ispointed_type : IsPointed pointed_type }.
1143 -
1144 -Coercion pointed_type : pType >-> Sortclass.
1145 -
1146 -Global Existing Instance ispointed_type.
1147 -
1148 -Definition hfiber {A B : Type} (f : A -> B) (y : B) := { x : A & f x = y }.
1149 -
1150 -Ltac revert_opaque x :=
1151 - revert x;
1152 - match goal with
1153 - | [ |- forall _, _ ] => idtac
1154 - | _ => fail 1 "Reverted constant is not an opaque variable"
1155 - end.
1156 -
1157 -End Overture.
1158 -
1159 -End Basics.
1160 -
1161 -End HoTT.
1162 -
1163 -End HoTT_DOT_Basics_DOT_Overture.
1164 -Module Export HoTT_DOT_Basics_DOT_PathGroupoids.
1165 -Module Export HoTT.
1166 -Module Export Basics.
1167 -Module Export PathGroupoids.
1168 -
1169 -Local Open Scope path_scope.
1170 -
1171 -Definition concat_p1 {A : Type} {x y : A} (p : x = y) :
1172 - p @ 1 = p
1173 - :=
1174 - match p with idpath => 1 end.
1175 -
1176 -Definition concat_1p {A : Type} {x y : A} (p : x = y) :
1177 - 1 @ p = p
1178 - :=
1179 - match p with idpath => 1 end.
1180 -
1181 -Definition concat_p_pp {A : Type} {x y z t : A} (p : x = y) (q : y = z) (r : z = t) :
1182 - p @ (q @ r) = (p @ q) @ r :=
1183 - match r with idpath =>
1184 - match q with idpath =>
1185 - match p with idpath => 1
1186 - end end end.
1187 -
1188 -Definition concat_pp_p {A : Type} {x y z t : A} (p : x = y) (q : y = z) (r : z = t) :
1189 - (p @ q) @ r = p @ (q @ r) :=
1190 - match r with idpath =>
1191 - match q with idpath =>
1192 - match p with idpath => 1
1193 - end end end.
1194 -
1195 -Definition concat_pV {A : Type} {x y : A} (p : x = y) :
1196 - p @ p^ = 1
1197 - :=
1198 - match p with idpath => 1 end.
1199 -
1200 -Definition moveR_Vp {A : Type} {x y z : A} (p : x = z) (q : y = z) (r : x = y) :
1201 - p = r @ q -> r^ @ p = q.
1202 -admit.
1203 -Defined.
1204 -
1205 -Definition moveL_Vp {A : Type} {x y z : A} (p : x = z) (q : y = z) (r : x = y) :
1206 - r @ q = p -> q = r^ @ p.
1207 -admit.
1208 -Defined.
1209 -
1210 -Definition moveR_M1 {A : Type} {x y : A} (p q : x = y) :
1211 - 1 = p^ @ q -> p = q.
1212 -admit.
1213 -Defined.
1214 -
1215 -Definition ap_pp {A B : Type} (f : A -> B) {x y z : A} (p : x = y) (q : y = z) :
1216 - ap f (p @ q) = (ap f p) @ (ap f q)
1217 - :=
1218 - match q with
1219 - idpath =>
1220 - match p with idpath => 1 end
1221 - end.
1222 -
1223 -Definition ap_V {A B : Type} (f : A -> B) {x y : A} (p : x = y) :
1224 - ap f (p^) = (ap f p)^
1225 - :=
1226 - match p with idpath => 1 end.
1227 -
1228 -Definition ap_compose {A B C : Type} (f : A -> B) (g : B -> C) {x y : A} (p : x = y) :
1229 - ap (g o f) p = ap g (ap f p)
1230 - :=
1231 - match p with idpath => 1 end.
1232 -
1233 -Definition concat_pA1 {A : Type} {f : A -> A} (p : forall x, x = f x) {x y : A} (q : x = y) :
1234 - (p x) @ (ap f q) = q @ (p y)
1235 - :=
1236 - match q as i in (_ = y) return (p x @ ap f i = i @ p y) with
1237 - | idpath => concat_p1 _ @ (concat_1p _)^
1238 - end.
1239 -
1240 -End PathGroupoids.
1241 -
1242 -End Basics.
1243 -
1244 -End HoTT.
1245 -
1246 -End HoTT_DOT_Basics_DOT_PathGroupoids.
1247 -Module Export HoTT_DOT_Basics_DOT_Equivalences.
1248 -Module Export HoTT.
1249 -Module Export Basics.
1250 -Module Export Equivalences.
1251 -
1252 -Definition isequiv_commsq {A B C D}
1253 - (f : A -> B) (g : C -> D) (h : A -> C) (k : B -> D)
1254 - (p : k o f == g o h)
1255 - `{IsEquiv _ _ f} `{IsEquiv _ _ h} `{IsEquiv _ _ k}
1256 -: IsEquiv g.
1257 -admit.
1258 -Defined.
1259 -
1260 -Section Adjointify.
1261 -
1262 - Context {A B : Type} (f : A -> B) (g : B -> A).
1263 - Context (isretr : Sect g f) (issect : Sect f g).
1264 -
1265 - Let issect' := fun x =>
1266 - ap g (ap f (issect x)^) @ ap g (isretr (f x)) @ issect x.
1267 -
1268 - Let is_adjoint' (a : A) : isretr (f a) = ap f (issect' a).
1269 - Proof.
1270 - unfold issect'.
1271 - apply moveR_M1.
1272 - repeat rewrite ap_pp, concat_p_pp; rewrite <- ap_compose.
1273 - rewrite (concat_pA1 (fun b => (isretr b)^) (ap f (issect a)^)).
1274 - repeat rewrite concat_pp_p; rewrite ap_V; apply moveL_Vp; rewrite concat_p1.
1275 - rewrite concat_p_pp, <- ap_compose.
1276 - rewrite (concat_pA1 (fun b => (isretr b)^) (isretr (f a))).
1277 - rewrite concat_pV, concat_1p; reflexivity.
1278 - Qed.
1279 -
1280 - Definition isequiv_adjointify : IsEquiv f
1281 - := BuildIsEquiv A B f g isretr issect' is_adjoint'.
1282 -
1283 -End Adjointify.
1284 -
1285 -End Equivalences.
1286 -
1287 -End Basics.
1288 -
1289 -End HoTT.
1290 -
1291 -End HoTT_DOT_Basics_DOT_Equivalences.
1292 -Module Export HoTT_DOT_Basics_DOT_Trunc.
1293 -Module Export HoTT.
1294 -Module Export Basics.
1295 -Module Export Trunc.
1296 -Generalizable Variables A B m n f.
1297 -
1298 -Definition trunc_equiv A {B} (f : A -> B)
1299 - `{IsTrunc n A} `{IsEquiv A B f}
1300 - : IsTrunc n B.
1301 -admit.
1302 -Defined.
1303 -
1304 -Record TruncType (n : trunc_index) := BuildTruncType {
1305 - trunctype_type : Type ;
1306 - istrunc_trunctype_type : IsTrunc n trunctype_type
1307 -}.
1308 -
1309 -Arguments BuildTruncType _ _ {_}.
1310 -
1311 -Coercion trunctype_type : TruncType >-> Sortclass.
1312 -
1313 -Notation "n -Type" := (TruncType n) (at level 1) : type_scope.
1314 -Notation hProp := (-1)-Type.
1315 -
1316 -Notation BuildhProp := (BuildTruncType -1).
1317 -
1318 -End Trunc.
1319 -
1320 -End Basics.
1321 -
1322 -End HoTT.
1323 -
1324 -End HoTT_DOT_Basics_DOT_Trunc.
1325 -Module Export HoTT_DOT_Types_DOT_Unit.
1326 -Module Export HoTT.
1327 -Module Export Types.
1328 -Module Export Unit.
1329 -
1330 -Notation unit_name x := (fun (_ : Unit) => x).
1331 -
1332 -End Unit.
1333 -
1334 -End Types.
1335 -
1336 -End HoTT.
1337 -
1338 -End HoTT_DOT_Types_DOT_Unit.
1339 -Module Export HoTT_DOT_Types_DOT_Sigma.
1340 -Module Export HoTT.
1341 -Module Export Types.
1342 -Module Export Sigma.
1343 -Local Open Scope path_scope.
1344 -
1345 -Definition path_sigma_uncurried {A : Type} (P : A -> Type) (u v : sigT P)
1346 - (pq : {p : u.1 = v.1 & p # u.2 = v.2})
1347 -: u = v
1348 - := match pq.2 in (_ = v2) return u = (v.1; v2) with
1349 - | 1 => match pq.1 as p in (_ = v1) return u = (v1; p # u.2) with
1350 - | 1 => 1
1351 - end
1352 - end.
1353 -
1354 -Definition path_sigma {A : Type} (P : A -> Type) (u v : sigT P)
1355 - (p : u.1 = v.1) (q : p # u.2 = v.2)
1356 -: u = v
1357 - := path_sigma_uncurried P u v (p;q).
1358 -
1359 -Definition path_sigma' {A : Type} (P : A -> Type) {x x' : A} {y : P x} {y' : P x'}
1360 - (p : x = x') (q : p # y = y')
1361 -: (x;y) = (x';y')
1362 - := path_sigma P (x;y) (x';y') p q.
1363 -
1364 -Global Instance isequiv_pr1_contr {A} {P : A -> Type}
1365 - `{forall a, Contr (P a)}
1366 -: IsEquiv (@pr1 A P) | 100.
1367 -Proof.
1368 - refine (isequiv_adjointify (@pr1 A P)
1369 - (fun a => (a ; center (P a))) _ _).
1370 - -
1371 - intros a; reflexivity.
1372 - -
1373 - intros [a p].
1374 - refine (path_sigma' P 1 (contr _)).
1375 -Defined.
1376 -
1377 -Definition path_sigma_hprop {A : Type} {P : A -> Type}
1378 - `{forall x, IsHProp (P x)}
1379 - (u v : sigT P)
1380 -: u.1 = v.1 -> u = v
1381 - := path_sigma_uncurried P u v o pr1^-1.
1382 -
1383 -End Sigma.
1384 -
1385 -End Types.
1386 -
1387 -End HoTT.
1388 -
1389 -End HoTT_DOT_Types_DOT_Sigma.
1390 -Module Export HoTT_DOT_Extensions.
1391 -Module Export HoTT.
1392 -Module Export Extensions.
1393 -
1394 -Section Extensions.
1395 -
1396 - Definition ExtensionAlong {A B : Type} (f : A -> B)
1397 - (P : B -> Type) (d : forall x:A, P (f x))
1398 - := { s : forall y:B, P y & forall x:A, s (f x) = d x }.
1399 -
1400 - Fixpoint ExtendableAlong@{i j k l}
1401 - (n : nat) {A : Type@{i}} {B : Type@{j}}
1402 - (f : A -> B) (C : B -> Type@{k}) : Type@{l}
1403 - := match n with
1404 - | O => Unit@{l}
1405 - | S n => (forall (g : forall a, C (f a)),
1406 - ExtensionAlong@{i j k l l} f C g) *
1407 - forall (h k : forall b, C b),
1408 - ExtendableAlong n f (fun b => h b = k b)
1409 - end.
1410 -
1411 - Definition ooExtendableAlong@{i j k l}
1412 - {A : Type@{i}} {B : Type@{j}}
1413 - (f : A -> B) (C : B -> Type@{k}) : Type@{l}
1414 - := forall n, ExtendableAlong@{i j k l} n f C.
1415 -
1416 -End Extensions.
1417 -
1418 -End Extensions.
1419 -
1420 -End HoTT.
1421 -
1422 -End HoTT_DOT_Extensions.
1423 -Module Export HoTT.
1424 -Module Export Modalities.
1425 -Module Export ReflectiveSubuniverse.
1426 -
1427 -Module Type ReflectiveSubuniverses.
1428 -
1429 - Parameter ReflectiveSubuniverse@{u a} : Type2@{u a}.
1430 -
1431 - Parameter O_reflector@{u a i} : forall (O : ReflectiveSubuniverse@{u a}),
1432 - Type2le@{i a} -> Type2le@{i a}.
1433 -
1434 - Parameter In@{u a i} : forall (O : ReflectiveSubuniverse@{u a}),
1435 - Type2le@{i a} -> Type2le@{i a}.
1436 -
1437 - Parameter O_inO@{u a i} : forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}),
1438 - In@{u a i} O (O_reflector@{u a i} O T).
1439 -
1440 - Parameter to@{u a i} : forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}),
1441 - T -> O_reflector@{u a i} O T.
1442 -
1443 - Parameter inO_equiv_inO@{u a i j k} :
1444 - forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}) (U : Type@{j})
1445 - (T_inO : In@{u a i} O T) (f : T -> U) (feq : IsEquiv f),
1446 -
1447 - let gei := ((fun x => x) : Type@{i} -> Type@{k}) in
1448 - let gej := ((fun x => x) : Type@{j} -> Type@{k}) in
1449 - In@{u a j} O U.
1450 -
1451 - Parameter hprop_inO@{u a i}
1452 - : Funext -> forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}),
1453 - IsHProp (In@{u a i} O T).
1454 -
1455 - Parameter extendable_to_O@{u a i j k}
1456 - : forall (O : ReflectiveSubuniverse@{u a}) {P : Type2le@{i a}} {Q : Type2le@{j a}} {Q_inO : In@{u a j} O Q},
1457 - ooExtendableAlong@{i i j k} (to O P) (fun _ => Q).
1458 -
1459 -End ReflectiveSubuniverses.
1460 -
1461 -Module ReflectiveSubuniverses_Theory (Os : ReflectiveSubuniverses).
1462 -Export Os.
1463 -
1464 -Module Export Coercions.
1465 -
1466 - Coercion O_reflector : ReflectiveSubuniverse >-> Funclass.
1467 -
1468 -End Coercions.
1469 -
1470 -End ReflectiveSubuniverses_Theory.
1471 -
1472 -Module Type ReflectiveSubuniverses_Restriction_Data (Os : ReflectiveSubuniverses).
1473 -
1474 - Parameter New_ReflectiveSubuniverse@{u a} : Type2@{u a}.
1475 -
1476 - Parameter ReflectiveSubuniverses_restriction@{u a}
1477 - : New_ReflectiveSubuniverse@{u a} -> Os.ReflectiveSubuniverse@{u a}.
1478 -
1479 -End ReflectiveSubuniverses_Restriction_Data.
1480 -
1481 -Module ReflectiveSubuniverses_Restriction
1482 - (Os : ReflectiveSubuniverses)
1483 - (Res : ReflectiveSubuniverses_Restriction_Data Os)
1484 -<: ReflectiveSubuniverses.
1485 -
1486 - Definition ReflectiveSubuniverse := Res.New_ReflectiveSubuniverse.
1487 -
1488 - Definition O_reflector@{u a i} (O : ReflectiveSubuniverse@{u a})
1489 - := Os.O_reflector@{u a i} (Res.ReflectiveSubuniverses_restriction O).
1490 - Definition In@{u a i} (O : ReflectiveSubuniverse@{u a})
1491 - := Os.In@{u a i} (Res.ReflectiveSubuniverses_restriction O).
1492 - Definition O_inO@{u a i} (O : ReflectiveSubuniverse@{u a})
1493 - := Os.O_inO@{u a i} (Res.ReflectiveSubuniverses_restriction O).
1494 - Definition to@{u a i} (O : ReflectiveSubuniverse@{u a})
1495 - := Os.to@{u a i} (Res.ReflectiveSubuniverses_restriction O).
1496 - Definition inO_equiv_inO@{u a i j k} (O : ReflectiveSubuniverse@{u a})
1497 - := Os.inO_equiv_inO@{u a i j k} (Res.ReflectiveSubuniverses_restriction O).
1498 - Definition hprop_inO@{u a i} (H : Funext) (O : ReflectiveSubuniverse@{u a})
1499 - := Os.hprop_inO@{u a i} H (Res.ReflectiveSubuniverses_restriction O).
1500 - Definition extendable_to_O@{u a i j k} (O : ReflectiveSubuniverse@{u a})
1501 - := @Os.extendable_to_O@{u a i j k} (Res.ReflectiveSubuniverses_restriction@{u a} O).
1502 -
1503 -End ReflectiveSubuniverses_Restriction.
1504 -
1505 -Module ReflectiveSubuniverses_FamUnion
1506 - (Os1 Os2 : ReflectiveSubuniverses)
1507 -<: ReflectiveSubuniverses.
1508 -
1509 - Definition ReflectiveSubuniverse@{u a} : Type2@{u a}
1510 - := Os1.ReflectiveSubuniverse@{u a} + Os2.ReflectiveSubuniverse@{u a}.
1511 -
1512 - Definition O_reflector@{u a i} : forall (O : ReflectiveSubuniverse@{u a}),
1513 - Type2le@{i a} -> Type2le@{i a}.
1514 -admit.
1515 -Defined.
1516 -
1517 - Definition In@{u a i} : forall (O : ReflectiveSubuniverse@{u a}),
1518 - Type2le@{i a} -> Type2le@{i a}.
1519 - Proof.
1520 - intros [O|O]; [ exact (Os1.In@{u a i} O)
1521 - | exact (Os2.In@{u a i} O) ].
1522 - Defined.
1523 -
1524 - Definition O_inO@{u a i}
1525 - : forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}),
1526 - In@{u a i} O (O_reflector@{u a i} O T).
1527 -admit.
1528 -Defined.
1529 -
1530 - Definition to@{u a i} : forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}),
1531 - T -> O_reflector@{u a i} O T.
1532 -admit.
1533 -Defined.
1534 -
1535 - Definition inO_equiv_inO@{u a i j k} :
1536 - forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}) (U : Type@{j})
1537 - (T_inO : In@{u a i} O T) (f : T -> U) (feq : IsEquiv f),
1538 - In@{u a j} O U.
1539 - Proof.
1540 - intros [O|O]; [ exact (Os1.inO_equiv_inO@{u a i j k} O)
1541 - | exact (Os2.inO_equiv_inO@{u a i j k} O) ].
1542 - Defined.
1543 -
1544 - Definition hprop_inO@{u a i}
1545 - : Funext -> forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}),
1546 - IsHProp (In@{u a i} O T).
1547 -admit.
1548 -Defined.
1549 -
1550 - Definition extendable_to_O@{u a i j k}
1551 - : forall (O : ReflectiveSubuniverse@{u a}) {P : Type2le@{i a}} {Q : Type2le@{j a}} {Q_inO : In@{u a j} O Q},
1552 - ooExtendableAlong@{i i j k} (to O P) (fun _ => Q).
1553 -admit.
1554 -Defined.
1555 -
1556 -End ReflectiveSubuniverses_FamUnion.
1557 -
1558 -End ReflectiveSubuniverse.
1559 -
1560 -End Modalities.
1561 -
1562 -End HoTT.
1563 -
1564 -Module Type Modalities.
1565 -
1566 - Parameter Modality@{u a} : Type2@{u a}.
1567 -
1568 - Parameter O_reflector@{u a i} : forall (O : Modality@{u a}),
1569 - Type2le@{i a} -> Type2le@{i a}.
1570 -
1571 - Parameter In@{u a i} : forall (O : Modality@{u a}),
1572 - Type2le@{i a} -> Type2le@{i a}.
1573 -
1574 - Parameter O_inO@{u a i} : forall (O : Modality@{u a}) (T : Type@{i}),
1575 - In@{u a i} O (O_reflector@{u a i} O T).
1576 -
1577 - Parameter to@{u a i} : forall (O : Modality@{u a}) (T : Type@{i}),
1578 - T -> O_reflector@{u a i} O T.
1579 -
1580 - Parameter inO_equiv_inO@{u a i j k} :
1581 - forall (O : Modality@{u a}) (T : Type@{i}) (U : Type@{j})
1582 - (T_inO : In@{u a i} O T) (f : T -> U) (feq : IsEquiv f),
1583 -
1584 - let gei := ((fun x => x) : Type@{i} -> Type@{k}) in
1585 - let gej := ((fun x => x) : Type@{j} -> Type@{k}) in
1586 - In@{u a j} O U.
1587 -
1588 - Parameter hprop_inO@{u a i}
1589 - : Funext -> forall (O : Modality@{u a}) (T : Type@{i}),
1590 - IsHProp (In@{u a i} O T).
1591 -
1592 -End Modalities.
1593 -
1594 -Module Modalities_to_ReflectiveSubuniverses
1595 - (Os : Modalities) <: ReflectiveSubuniverses.
1596 -
1597 - Import Os.
1598 -
1599 - Fixpoint O_extendable@{u a i j k} (O : Modality@{u a})
1600 - (A : Type@{i}) (B : O_reflector O A -> Type@{j})
1601 - (B_inO : forall a, In@{u a j} O (B a)) (n : nat)
1602 - : ExtendableAlong@{i i j k} n (to O A) B.
1603 -admit.
1604 -Defined.
1605 -
1606 - Definition ReflectiveSubuniverse := Modality.
1607 -
1608 - Definition O_reflector@{u a i} := O_reflector@{u a i}.
1609 -
1610 - Definition In@{u a i} : forall (O : ReflectiveSubuniverse@{u a}),
1611 - Type2le@{i a} -> Type2le@{i a}
1612 - := In@{u a i}.
1613 - Definition O_inO@{u a i} : forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}),
1614 - In@{u a i} O (O_reflector@{u a i} O T)
1615 - := O_inO@{u a i}.
1616 - Definition to@{u a i} := to@{u a i}.
1617 - Definition inO_equiv_inO@{u a i j k} :
1618 - forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}) (U : Type@{j})
1619 - (T_inO : In@{u a i} O T) (f : T -> U) (feq : IsEquiv f),
1620 - In@{u a j} O U
1621 - := inO_equiv_inO@{u a i j k}.
1622 - Definition hprop_inO@{u a i}
1623 - : Funext -> forall (O : ReflectiveSubuniverse@{u a}) (T : Type@{i}),
1624 - IsHProp (In@{u a i} O T)
1625 - := hprop_inO@{u a i}.
1626 -
1627 - Definition extendable_to_O@{u a i j k} (O : ReflectiveSubuniverse@{u a})
1628 - {P : Type2le@{i a}} {Q : Type2le@{j a}} {Q_inO : In@{u a j} O Q}
1629 - : ooExtendableAlong@{i i j k} (to O P) (fun _ => Q)
1630 - := fun n => O_extendable O P (fun _ => Q) (fun _ => Q_inO) n.
1631 -
1632 -End Modalities_to_ReflectiveSubuniverses.
1633 -
1634 -Module Type EasyModalities.
1635 -
1636 - Parameter Modality@{u a} : Type2@{u a}.
1637 -
1638 - Parameter O_reflector@{u a i} : forall (O : Modality@{u a}),
1639 - Type2le@{i a} -> Type2le@{i a}.
1640 -
1641 - Parameter to@{u a i} : forall (O : Modality@{u a}) (T : Type@{i}),
1642 - T -> O_reflector@{u a i} O T.
1643 -
1644 - Parameter minO_pathsO@{u a i}
1645 - : forall (O : Modality@{u a}) (A : Type@{i})
1646 - (z z' : O_reflector@{u a i} O A),
1647 - IsEquiv (to@{u a i} O (z = z')).
1648 -
1649 -End EasyModalities.
1650 -
1651 -Module EasyModalities_to_Modalities (Os : EasyModalities)
1652 -<: Modalities.
1653 -
1654 - Import Os.
1655 -
1656 - Definition Modality := Modality.
1657 -
1658 - Definition O_reflector@{u a i} := O_reflector@{u a i}.
1659 - Definition to@{u a i} := to@{u a i}.
1660 -
1661 - Definition In@{u a i}
1662 - : forall (O : Modality@{u a}), Type@{i} -> Type@{i}
1663 - := fun O A => IsEquiv@{i i} (to O A).
1664 -
1665 - Definition hprop_inO@{u a i} `{Funext} (O : Modality@{u a})
1666 - (T : Type@{i})
1667 - : IsHProp (In@{u a i} O T).
1668 -admit.
1669 -Defined.
1670 -
1671 - Definition O_ind_internal@{u a i j k} (O : Modality@{u a})
1672 - (A : Type@{i}) (B : O_reflector@{u a i} O A -> Type@{j})
1673 - (B_inO : forall oa, In@{u a j} O (B oa))
1674 - : let gei := ((fun x => x) : Type@{i} -> Type@{k}) in
1675 - let gej := ((fun x => x) : Type@{j} -> Type@{k}) in
1676 - (forall a, B (to O A a)) -> forall oa, B oa.
1677 -admit.
1678 -Defined.
1679 -
1680 - Definition O_ind_beta_internal@{u a i j k} (O : Modality@{u a})
1681 - (A : Type@{i}) (B : O_reflector@{u a i} O A -> Type@{j})
1682 - (B_inO : forall oa, In@{u a j} O (B oa))
1683 - (f : forall a : A, B (to O A a)) (a:A)
1684 - : O_ind_internal@{u a i j k} O A B B_inO f (to O A a) = f a.
1685 -admit.
1686 -Defined.
1687 -
1688 - Definition O_inO@{u a i} (O : Modality@{u a}) (A : Type@{i})
1689 - : In@{u a i} O (O_reflector@{u a i} O A).
1690 -admit.
1691 -Defined.
1692 -
1693 - Definition inO_equiv_inO@{u a i j k} (O : Modality@{u a}) (A : Type@{i}) (B : Type@{j})
1694 - (A_inO : In@{u a i} O A) (f : A -> B) (feq : IsEquiv f)
1695 - : In@{u a j} O B.
1696 - Proof.
1697 - simple refine (isequiv_commsq (to O A) (to O B) f
1698 - (O_ind_internal O A (fun _ => O_reflector O B) _ (fun a => to O B (f a))) _).
1699 - -
1700 - intros; apply O_inO.
1701 - -
1702 - intros a; refine (O_ind_beta_internal@{u a i j k} O A (fun _ => O_reflector O B) _ _ a).
1703 - -
1704 - apply A_inO.
1705 - -
1706 - simple refine (isequiv_adjointify _
1707 - (O_ind_internal O B (fun _ => O_reflector O A) _ (fun b => to O A (f^-1 b))) _ _);
1708 - intros x.
1709 - +
1710 - apply O_inO.
1711 - +
1712 - pattern x; refine (O_ind_internal O B _ _ _ x); intros.
1713 - *
1714 - apply minO_pathsO.
1715 - *
1716 - simpl; admit.
1717 - +
1718 - pattern x; refine (O_ind_internal O A _ _ _ x); intros.
1719 - *
1720 - apply minO_pathsO.
1721 - *
1722 - simpl; admit.
1723 - Defined.
1724 -
1725 -End EasyModalities_to_Modalities.
1726 -
1727 -Module Modalities_Theory (Os : Modalities).
1728 -
1729 -Export Os.
1730 -Module Export Os_ReflectiveSubuniverses
1731 - := Modalities_to_ReflectiveSubuniverses Os.
1732 -Module Export RSU
1733 - := ReflectiveSubuniverses_Theory Os_ReflectiveSubuniverses.
1734 -
1735 -Module Export Coercions.
1736 - Coercion modality_to_reflective_subuniverse
1737 - := idmap : Modality -> ReflectiveSubuniverse.
1738 -End Coercions.
1739 -
1740 -Class IsConnected (O : Modality@{u a}) (A : Type@{i})
1741 -
1742 - := isconnected_contr_O : IsTrunc@{i} -2 (O A).
1743 -
1744 -Class IsConnMap (O : Modality@{u a})
1745 - {A : Type@{i}} {B : Type@{j}} (f : A -> B)
1746 - := isconnected_hfiber_conn_map
1747 -
1748 - : forall b:B, IsConnected@{u a k} O (hfiber@{i j} f b).
1749 -
1750 -End Modalities_Theory.
1751 -
1752 -Private Inductive Trunc (n : trunc_index) (A :Type) : Type :=
1753 - tr : A -> Trunc n A.
1754 -Arguments tr {n A} a.
1755 -
1756 -Global Instance istrunc_truncation (n : trunc_index) (A : Type@{i})
1757 -: IsTrunc@{j} n (Trunc@{i} n A).
1758 -Admitted.
1759 -
1760 -Definition Trunc_ind {n A}
1761 - (P : Trunc n A -> Type) {Pt : forall aa, IsTrunc n (P aa)}
1762 - : (forall a, P (tr a)) -> (forall aa, P aa)
1763 -:= (fun f aa => match aa with tr a => fun _ => f a end Pt).
1764 -
1765 -Definition Truncation_Modality := trunc_index.
1766 -
1767 -Module Truncation_Modalities <: Modalities.
1768 -
1769 - Definition Modality : Type2@{u a} := Truncation_Modality.
1770 -
1771 - Definition O_reflector (n : Modality@{u u'}) A := Trunc n A.
1772 -
1773 - Definition In (n : Modality@{u u'}) A := IsTrunc n A.
1774 -
1775 - Definition O_inO (n : Modality@{u u'}) A : In n (O_reflector n A).
1776 -admit.
1777 -Defined.
1778 -
1779 - Definition to (n : Modality@{u u'}) A := @tr n A.
1780 -
1781 - Definition inO_equiv_inO (n : Modality@{u u'})
1782 - (A : Type@{i}) (B : Type@{j}) Atr f feq
1783 - : let gei := ((fun x => x) : Type@{i} -> Type@{k}) in
1784 - let gej := ((fun x => x) : Type@{j} -> Type@{k}) in
1785 - In n B
1786 - := @trunc_equiv A B f n Atr feq.
1787 -
1788 - Definition hprop_inO `{Funext} (n : Modality@{u u'}) A
1789 - : IsHProp (In n A).
1790 -admit.
1791 -Defined.
1792 -
1793 -End Truncation_Modalities.
1794 -
1795 -Module Import TrM := Modalities_Theory Truncation_Modalities.
1796 -
1797 -Definition merely (A : Type@{i}) : hProp := BuildhProp (Trunc -1 A).
1798 -
1799 -Notation IsSurjection := (IsConnMap -1).
1800 -
1801 -Definition BuildIsSurjection {A B} (f : A -> B) :
1802 - (forall b, merely (hfiber f b)) -> IsSurjection f.
1803 -admit.
1804 -Defined.
1805 -
1806 -Ltac strip_truncations :=
1807 -
1808 - progress repeat match goal with
1809 - | [ T : _ |- _ ]
1810 - => revert_opaque T;
1811 - refine (@Trunc_ind _ _ _ _ _);
1812 -
1813 - [];
1814 - intro T
1815 - end.
1816 -Local Open Scope trunc_scope.
1817 -
1818 -Global Instance conn_pointed_type {n : trunc_index} {A : Type} (a0:A)
1819 - `{IsConnMap n _ _ (unit_name a0)} : IsConnected n.+1 A | 1000.
1820 -admit.
1821 -Defined.
1822 -
1823 -Definition loops (A : pType) : pType :=
1824 - Build_pType (point A = point A) idpath.
1825 -
1826 -Record pMap (A B : pType) :=
1827 - { pointed_fun : A -> B ;
1828 - point_eq : pointed_fun (point A) = point B }.
1829 -
1830 -Arguments point_eq {A B} f : rename.
1831 -Coercion pointed_fun : pMap >-> Funclass.
1832 -
1833 -Infix "->*" := pMap (at level 99) : pointed_scope.
1834 -Local Open Scope pointed_scope.
1835 -
1836 -Definition pmap_compose {A B C : pType}
1837 - (g : B ->* C) (f : A ->* B)
1838 -: A ->* C
1839 - := Build_pMap A C (g o f)
1840 - (ap g (point_eq f) @ point_eq g).
1841 -
1842 -Record pHomotopy {A B : pType} (f g : pMap A B) :=
1843 - { pointed_htpy : f == g ;
1844 - point_htpy : pointed_htpy (point A) @ point_eq g = point_eq f }.
1845 -Arguments pointed_htpy {A B f g} p x.
1846 -
1847 -Infix "==*" := pHomotopy (at level 70, no associativity) : pointed_scope.
1848 -
1849 -Definition loops_functor {A B : pType} (f : A ->* B)
1850 -: (loops A) ->* (loops B).
1851 -Proof.
1852 - refine (Build_pMap (loops A) (loops B)
1853 - (fun p => (point_eq f)^ @ (ap f p @ point_eq f)) _).
1854 - apply moveR_Vp; simpl.
1855 - refine (concat_1p _ @ (concat_p1 _)^).
1856 -Defined.
1857 -
1858 -Definition loops_functor_compose {A B C : pType}
1859 - (g : B ->* C) (f : A ->* B)
1860 -: (loops_functor (pmap_compose g f))
1861 - ==* (pmap_compose (loops_functor g) (loops_functor f)).
1862 -admit.
1863 -Defined.
1864 -
1865 -Local Open Scope path_scope.
1866 -
1867 -Record ooGroup :=
1868 - { classifying_space : pType@{i} ;
1869 - isconn_classifying_space : IsConnected@{u a i} 0 classifying_space
1870 - }.
1871 -
1872 -Local Notation B := classifying_space.
1873 -
1874 -Definition group_type (G : ooGroup) : Type
1875 - := point (B G) = point (B G).
1876 -
1877 -Coercion group_type : ooGroup >-> Sortclass.
1878 -
1879 -Definition group_loops (X : pType)
1880 -: ooGroup.
1881 -Proof.
1882 -
1883 - pose (x0 := point X);
1884 - pose (BG := (Build_pType
1885 - { x:X & merely (x = point X) }
1886 - (existT (fun x:X => merely (x = point X)) x0 (tr 1)))).
1887 -
1888 - cut (IsConnected 0 BG).
1889 - {
1890 - exact (Build_ooGroup BG).
1891 -}
1892 - cut (IsSurjection (unit_name (point BG))).
1893 - {
1894 - intros; refine (conn_pointed_type (point _)).
1895 -}
1896 - apply BuildIsSurjection; simpl; intros [x p].
1897 - strip_truncations; apply tr; exists tt.
1898 - apply path_sigma_hprop; simpl.
1899 - exact (p^).
1900 -Defined.
1901 -
1902 -Definition loops_group (X : pType)
1903 -: loops X <~> group_loops X.
1904 -admit.
1905 -Defined.
1906 -
1907 -Definition ooGroupHom (G H : ooGroup)
1908 - := pMap (B G) (B H).
1909 -
1910 -Definition grouphom_fun {G H} (phi : ooGroupHom G H) : G -> H
1911 - := loops_functor phi.
1912 -
1913 -Coercion grouphom_fun : ooGroupHom >-> Funclass.
1914 -
1915 -Definition group_loops_functor
1916 - {X Y : pType} (f : pMap X Y)
1917 -: ooGroupHom (group_loops X) (group_loops Y).
1918 -Proof.
1919 - simple refine (Build_pMap _ _ _ _); simpl.
1920 - -
1921 - intros [x p].
1922 - exists (f x).
1923 - strip_truncations; apply tr.
1924 - exact (ap f p @ point_eq f).
1925 - -
1926 - apply path_sigma_hprop; simpl.
1927 - apply point_eq.
1928 -Defined.
1929 -
1930 -Definition loops_functor_group
1931 - {X Y : pType} (f : pMap X Y)
1932 -: loops_functor (group_loops_functor f) o loops_group X
1933 - == loops_group Y o loops_functor f.
1934 -admit.
1935 -Defined.
1936 -
1937 -Definition grouphom_compose {G H K : ooGroup}
1938 - (psi : ooGroupHom H K) (phi : ooGroupHom G H)
1939 -: ooGroupHom G K
1940 - := pmap_compose psi phi.
1941 -
1942 -Definition group_loops_functor_compose
1943 - {X Y Z : pType}
1944 - (psi : pMap Y Z) (phi : pMap X Y)
1945 -: grouphom_compose (group_loops_functor psi) (group_loops_functor phi)
1946 - == group_loops_functor (pmap_compose psi phi).
1947 -Proof.
1948 - intros g.
1949 - unfold grouphom_fun, grouphom_compose.
1950 - refine (pointed_htpy (loops_functor_compose _ _) g @ _).
1951 - pose (p := eisretr (loops_group X) g).
1952 - change (loops_functor (group_loops_functor psi)
1953 - (loops_functor (group_loops_functor phi) g)
1954 - = loops_functor (group_loops_functor
1955 - (pmap_compose psi phi)) g).
1956 - rewrite <- p.
1957 - Timeout 1 Time rewrite !loops_functor_group.
1958 - Undo.
1959 - (* 0.004 s in 8.5rc1, 8.677 s in 8.5 *)
1960 - Timeout 1 do 3 rewrite loops_functor_group.
1961 -Abort.
6767 -make
6868 --- coq.orig/test-suite/coq-makefile/coqdoc1/run.sh
6969 +++ /dev/null
70 @@ -1,68 +0,0 @@
70 @@ -1,76 +0,0 @@
7171 -#!/usr/bin/env bash
7272 -
7373 -. ../template/init.sh
9595 -./test/.coq-native/Ntest_test.cmi
9696 -./test/.coq-native/Ntest_test.cmx
9797 -./test/.coq-native/Ntest_test.cmxs
98 -./test/test_plugin.cmi
99 -./test/test_plugin.cmx
100 -./test/test_plugin.cmxa
101 -./test/test_plugin.cmxs
10298 -./test/test.glob
10399 -./test/test.v
104100 -./test/test.vo
101 -./test/test_plugin.cmxs
105102 -./test/sub
106103 -./test/sub/.coq-native
107104 -./test/sub/.coq-native/Ntest_sub_testsub.cmi
135132 -./test/html/test.test.html
136133 -EOT
137134 -(coqc -config | grep -q "NATIVE_COMPILER_DEFAULT=yes") || sed -i.bak '/\.coq-native/d' desired
138 -exec diff -u desired actual
135 -diff -u desired actual
136 -
137 -(cd "$(find tmp -name coq-test-suite)" && find .) | sort > actual
138 -sort > desired <<EOT
139 -.
140 -./META
141 -./test_plugin.cmi
142 -./test_plugin.cmx
143 -./test_plugin.cmxa
144 -./test_plugin.cmxs
145 -EOT
146 -diff -u desired actual
139147 --- coq.orig/test-suite/coq-makefile/coqdoc2/run.sh
140148 +++ /dev/null
141 @@ -1,66 +0,0 @@
149 @@ -1,74 +0,0 @@
142150 -#!/usr/bin/env bash
143151 -
144152 -. ../template/init.sh
164172 -./test/.coq-native/Ntest_test.cmi
165173 -./test/.coq-native/Ntest_test.cmx
166174 -./test/.coq-native/Ntest_test.cmxs
167 -./test/test_plugin.cmi
168 -./test/test_plugin.cmx
169 -./test/test_plugin.cmxa
170 -./test/test_plugin.cmxs
171175 -./test/test.glob
172176 -./test/test.v
173177 -./test/test.vo
178 -./test/test_plugin.cmxs
174179 -./test/sub
175180 -./test/sub/.coq-native
176181 -./test/sub/.coq-native/Ntest_sub_testsub.cmi
204209 -./test/html/test.test.html
205210 -EOT
206211 -(coqc -config | grep -q "NATIVE_COMPILER_DEFAULT=yes") || sed -i.bak '/\.coq-native/d' desired
207 -exec diff -u desired actual
212 -diff -u desired actual
213 -
214 -(cd "$(find tmp -name coq-test-suite)" && find .) | sort > actual
215 -sort > desired <<EOT
216 -.
217 -./META
218 -./test_plugin.cmi
219 -./test_plugin.cmx
220 -./test_plugin.cmxa
221 -./test_plugin.cmxs
222 -EOT
223 -diff -u desired actual
208224 --- coq.orig/test-suite/coq-makefile/emptyprefix/run.sh
209225 +++ /dev/null
210226 @@ -1,17 +0,0 @@
238254 -exec test -f "subdir/done"
239255 --- coq.orig/test-suite/coq-makefile/findlib-package/run.sh
240256 +++ /dev/null
241 @@ -1,19 +0,0 @@
242 -#!/usr/bin/env bash
243 -
244 -. ../template/init.sh
257 @@ -1,21 +0,0 @@
258 -#!/usr/bin/env bash
259 -
260 -. ../template/init.sh
261 -
262 -sed -i.old 's/coq-core.plugins.ltac/coq-core.plugins.ltac,foo/' src/META.coq-test-suite
245263 -
246264 -echo "let () = Foolib.foo ();;" >> src/test_aux.ml
247 -export OCAMLPATH=$OCAMLPATH:$PWD/findlib
248265 -if which cygpath 2>/dev/null; then
249 - # the only way I found to pass OCAMLPATH on win is to have it contain
250 - # only one entry
251 - OCAMLPATH=$(cygpath -w "$PWD"/findlib)
252 - export OCAMLPATH
266 - # separator is ; on windows
267 - OCAMLPATH=$OCAMLPATH;$(cygpath -m "$PWD"/findlib)
268 -else
269 - OCAMLPATH=$OCAMLPATH:$PWD/findlib
253270 -fi
271 -export OCAMLPATH
254272 -make -C findlib/foo clean
255273 -coq_makefile -f _CoqProject -o Makefile
256274 -cat Makefile.conf
292310 -exec diff -u desired actual
293311 --- coq.orig/test-suite/coq-makefile/mlpack1/run.sh
294312 +++ /dev/null
295 @@ -1,28 +0,0 @@
313 @@ -1,36 +0,0 @@
296314 -#!/usr/bin/env bash
297315 -
298316 -. ../template/init.sh
312330 -./test/.coq-native/Ntest_test.cmx
313331 -./test/.coq-native/Ntest_test.cmxs
314332 -./test/test.glob
315 -./test/test_plugin.cmi
316 -./test/test_plugin.cmx
317 -./test/test_plugin.cmxa
318 -./test/test_plugin.cmxs
319333 -./test/test.v
320334 -./test/test.vo
335 -./test/test_plugin.cmxs
321336 -EOT
322337 -(coqc -config | grep -q "NATIVE_COMPILER_DEFAULT=yes") || sed -i.bak '/\.coq-native/d' desired
323 -exec diff -u desired actual
338 -diff -u desired actual
339 -
340 -(cd "$(find tmp -name coq-test-suite)" && find .) | sort > actual
341 -sort > desired <<EOT
342 -.
343 -./META
344 -./test_plugin.cmi
345 -./test_plugin.cmx
346 -./test_plugin.cmxa
347 -./test_plugin.cmxs
348 -EOT
349 -diff -u desired actual
324350 --- coq.orig/test-suite/coq-makefile/mlpack2/run.sh
325351 +++ /dev/null
326 @@ -1,28 +0,0 @@
352 @@ -1,36 +0,0 @@
327353 -#!/usr/bin/env bash
328354 -
329355 -. ../template/init.sh
343369 -./test/.coq-native/Ntest_test.cmx
344370 -./test/.coq-native/Ntest_test.cmxs
345371 -./test/test.glob
346 -./test/test_plugin.cmi
347 -./test/test_plugin.cmx
348 -./test/test_plugin.cmxa
349 -./test/test_plugin.cmxs
350372 -./test/test.v
351373 -./test/test.vo
374 -./test/test_plugin.cmxs
352375 -EOT
353376 -(coqc -config | grep -q "NATIVE_COMPILER_DEFAULT=yes") || sed -i.bak '/\.coq-native/d' desired
354 -exec diff -u desired actual
377 -diff -u desired actual
378 -
379 -(cd "$(find tmp -name coq-test-suite)" && find .) | sort > actual
380 -sort > desired <<EOT
381 -.
382 -./META
383 -./test_plugin.cmi
384 -./test_plugin.cmx
385 -./test_plugin.cmxa
386 -./test_plugin.cmxs
387 -EOT
388 -diff -u desired actual
355389 --- coq.orig/test-suite/coq-makefile/multiroot/run.sh
356390 +++ /dev/null
357 @@ -1,70 +0,0 @@
391 @@ -1,78 +0,0 @@
358392 -#!/usr/bin/env bash
359393 -
360394 -. ../template/init.sh
382416 -./test/.coq-native/Ntest_test.cmx
383417 -./test/.coq-native/Ntest_test.cmxs
384418 -./test/test.glob
385 -./test/test.cmi
386 -./test/test.cmx
387 -./test/test_aux.cmi
388 -./test/test_aux.cmx
389 -./test/test_plugin.cmxa
390 -./test/test_plugin.cmxs
391419 -./test/test.v
392420 -./test/test.vo
421 -./test/test_plugin.cmxs
393422 -./test2
394423 -./test2/.coq-native
395424 -./test2/.coq-native/Ntest2_test.cmi
424453 -./orphan_test_test2_test/mlihtml/type_Test.html
425454 -EOT
426455 -(coqc -config | grep -q "NATIVE_COMPILER_DEFAULT=yes") || sed -i.bak '/\.coq-native/d' desired
427 -exec diff -u desired actual
456 -diff -u desired actual
457 -
458 -(cd "$(find tmp -name coq-test-suite)" && find .) | sort > actual
459 -sort > desired <<EOT
460 -.
461 -./META
462 -./test.cmi
463 -./test.cmx
464 -./test_aux.cmi
465 -./test_aux.cmx
466 -./test_plugin.cmxa
467 -./test_plugin.cmxs
468 -EOT
469 -diff -u desired actual
428470 --- coq.orig/test-suite/coq-makefile/only/run.sh
429471 +++ /dev/null
430472 @@ -1,10 +0,0 @@
440482 -! test -f src/test.cmo
441483 --- coq.orig/test-suite/coq-makefile/plugin1/run.sh
442484 +++ /dev/null
443 @@ -1,31 +0,0 @@
485 @@ -1,39 +0,0 @@
444486 -#!/usr/bin/env bash
445487 -
446488 -. ../template/init.sh
461503 -./test/.coq-native/Ntest_test.cmx
462504 -./test/.coq-native/Ntest_test.cmxs
463505 -./test/test.glob
464 -./test/test.cmi
465 -./test/test.cmx
466 -./test/test_aux.cmi
467 -./test/test_aux.cmx
468 -./test/test_plugin.cmxa
469 -./test/test_plugin.cmxs
470506 -./test/test.v
471507 -./test/test.vo
508 -./test/test_plugin.cmxs
472509 -EOT
473510 -(coqc -config | grep -q "NATIVE_COMPILER_DEFAULT=yes") || sed -i.bak '/\.coq-native/d' desired
474 -exec diff -u desired actual
511 -diff -u desired actual
512 -
513 -(cd "$(find tmp -name coq-test-suite)" && find .) | sort > actual
514 -sort > desired <<EOT
515 -.
516 -./META
517 -./test.cmi
518 -./test.cmx
519 -./test_aux.cmi
520 -./test_aux.cmx
521 -./test_plugin.cmxa
522 -./test_plugin.cmxs
523 -EOT
524 -diff -u desired actual
475525 --- coq.orig/test-suite/coq-makefile/plugin2/run.sh
476526 +++ /dev/null
477 @@ -1,31 +0,0 @@
527 @@ -1,39 +0,0 @@
478528 -#!/usr/bin/env bash
479529 -
480530 -. ../template/init.sh
495545 -./test/.coq-native/Ntest_test.cmx
496546 -./test/.coq-native/Ntest_test.cmxs
497547 -./test/test.glob
498 -./test/test.cmi
499 -./test/test.cmx
500 -./test/test_aux.cmi
501 -./test/test_aux.cmx
502 -./test/test_plugin.cmxa
503 -./test/test_plugin.cmxs
504548 -./test/test.v
505549 -./test/test.vo
550 -./test/test_plugin.cmxs
506551 -EOT
507552 -(coqc -config | grep -q "NATIVE_COMPILER_DEFAULT=yes") || sed -i.bak '/\.coq-native/d' desired
508 -exec diff -u desired actual
553 -diff -u desired actual
554 -
555 -(cd "$(find tmp -name coq-test-suite)" && find .) | sort > actual
556 -sort > desired <<EOT
557 -.
558 -./META
559 -./test.cmi
560 -./test.cmx
561 -./test_aux.cmi
562 -./test_aux.cmx
563 -./test_plugin.cmxa
564 -./test_plugin.cmxs
565 -EOT
566 -diff -u desired actual
509567 --- coq.orig/test-suite/coq-makefile/plugin3/run.sh
510568 +++ /dev/null
511 @@ -1,31 +0,0 @@
569 @@ -1,39 +0,0 @@
512570 -#!/usr/bin/env bash
513571 -
514572 -. ../template/init.sh
529587 -./test/.coq-native/Ntest_test.cmx
530588 -./test/.coq-native/Ntest_test.cmxs
531589 -./test/test.glob
532 -./test/test.cmi
533 -./test/test.cmx
534 -./test/test_aux.cmi
535 -./test/test_aux.cmx
536 -./test/test_plugin.cmxa
537 -./test/test_plugin.cmxs
538590 -./test/test.v
539591 -./test/test.vo
592 -./test/test_plugin.cmxs
540593 -EOT
541594 -(coqc -config | grep -q "NATIVE_COMPILER_DEFAULT=yes") || sed -i.bak '/\.coq-native/d' desired
542 -exec diff -u desired actual
595 -diff -u desired actual
596 -
597 -(cd "$(find tmp -name coq-test-suite)" && find .) | sort > actual
598 -sort > desired <<EOT
599 -.
600 -./META
601 -./test.cmi
602 -./test.cmx
603 -./test_aux.cmi
604 -./test_aux.cmx
605 -./test_plugin.cmxa
606 -./test_plugin.cmxs
607 -EOT
608 -diff -u desired actual
543609 --- coq.orig/test-suite/coq-makefile/quick2vo/run.sh
544610 +++ /dev/null
545611 @@ -1,12 +0,0 @@
575641 - while IFS= read -r -d '' d
576642 - do
577643 - pushd "$d" >/dev/null && find . && popd >/dev/null
578 - done < <(find tmp -name user-contrib -print0)
644 - done < <(find tmp \( -name user-contrib -o -name coq-test-suite \) -print0)
579645 -) | sort -u > actual
580646 -sort -u > desired <<EOT
581647 -.
33 remove-tests-that-need-coqlib.patch
44 remove-bytecode-failing-tests.patch
55 find_timing_scripts.patch
6 fix_typo.patch
44
55 --- coq.orig/Makefile.build
66 +++ coq/Makefile.build
7 @@ -269,7 +269,7 @@
7 @@ -272,7 +272,7 @@
88
99 test-suite: world
1010 $(MAKE) $(MAKE_TSOPTS) clean