Skip to content

Commit 00702bf

Browse files
author
Patrick Nicodemus
committed
rapply
1 parent b14f29a commit 00702bf

28 files changed

+71
-71
lines changed

theories/Algebra/AbGroups/AbHom.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ Proof.
150150
- exact (functor_ab_coeq a^-1$ b^-1$ (hinverse _ _ p) (hinverse _ _ q)).
151151
- nrefine (functor_ab_coeq_compose _ _ _ _ _ _ _ _
152152
$@ functor2_ab_coeq _ _ _ _ _ $@ functor_ab_coeq_id _ _).
153-
rapply cate_isretr.
153+
exact (cate_isretr _).
154154
- nrefine (functor_ab_coeq_compose _ _ _ _ _ _ _ _
155155
$@ functor2_ab_coeq _ _ _ _ _ $@ functor_ab_coeq_id _ _).
156-
rapply cate_issect.
156+
exact (cate_issect _).
157157
Defined.
158158

159159
(** ** The bifunctor [ab_hom] *)

theories/Algebra/AbGroups/TensorProduct.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ Proof.
695695
+ rapply (fmap01 ab_tensor_prod A).
696696
nrapply ab_coeq_in.
697697
+ refine (_^$ $@ fmap02 ab_tensor_prod _ _ $@ _).
698-
1,3: rapply fmap01_comp.
698+
1,3: exact (fmap01_comp _ _ _ _).
699699
nrapply ab_coeq_glue.
700700
- snrapply ab_tensor_prod_rec'.
701701
+ intros a.

theories/Algebra/AbSES/Core.v

+8-8
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ Proof.
403403
induction p.
404404
refine (ap (ap f) (eisretr _ _) @ _).
405405
nrefine (_ @ ap equiv_path_abses_iso _).
406-
2: { rapply path_hom.
406+
2: { refine (path_hom _).
407407
srefine (_ $@ fmap2 _ _).
408408
2: exact (Id E).
409409
2: intro x; reflexivity.
@@ -426,7 +426,7 @@ Proof.
426426
2: apply (abses_ap_fmap g).
427427
nrefine (_ @ (abses_path_data_compose_beta _ _)^).
428428
nrapply (ap equiv_path_abses_iso).
429-
rapply path_hom.
429+
refine (path_hom _).
430430
reflexivity.
431431
Defined.
432432

@@ -575,7 +575,7 @@ Proof.
575575
apply path_sigma_hprop; cbn.
576576
apply grp_cancelL1.
577577
refine (ap (fun x => - s x) _ @ _).
578-
1: rapply cx_isexact.
578+
1: refine (cx_isexact _ ).
579579
exact (ap _ (grp_homo_unit _) @ grp_inv_unit).
580580
Defined.
581581

@@ -629,7 +629,7 @@ Proof.
629629
lhs nrapply ab_biprod_functor_beta.
630630
*)
631631
nrapply path_prod'.
632-
2: rapply cx_isexact.
632+
2: refine (cx_isexact _).
633633
(* The LHS of the remaining goal is definitionally equal to
634634
(grp_iso_inverse (grp_iso_cxfib (isexact_inclusion_projection E)) $o
635635
(projection_split_to_kernel E h $o inclusion E)) a
@@ -686,12 +686,12 @@ Lemma abses_kernel_iso `{Funext} {A E B : AbGroup} (i : A $-> E) (p : E $-> B)
686686
Proof.
687687
snrapply Build_GroupIsomorphism.
688688
- apply (grp_kernel_corec i).
689-
rapply cx_isexact.
689+
refine cx_isexact.
690690
- apply isequiv_surj_emb.
691-
2: rapply (cancelL_mapinO _ (grp_kernel_corec _ _) _).
691+
2: refine (cancelL_mapinO _ (grp_kernel_corec _ _) _ _ _).
692692
intros [y q].
693693
assert (a : Tr (-1) (hfiber i y)).
694-
1: by rapply isexact_preimage.
694+
1: by refine (isexact_preimage _ _ _ _ _).
695695
strip_truncations; destruct a as [a r].
696696
rapply contr_inhabited_hprop.
697697
refine (tr (a; _)); cbn.
@@ -732,7 +732,7 @@ Proof.
732732
- snrapply (quotient_abgroup_rec _ _ g).
733733
intros e; rapply Trunc_rec; intros [a p].
734734
refine (ap _ p^ @ _).
735-
rapply cx_isexact.
735+
refine (cx_isexact _).
736736
- apply isequiv_surj_emb.
737737
1: rapply cancelR_conn_map.
738738
apply isembedding_isinj_hset.

theories/Algebra/AbSES/Pullback.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ Proof.
460460
{ refine (ap _ (abses_path_data_V p) @ _).
461461
apply eissect. }
462462
refine (ap (fun x => x $@ _) _).
463-
rapply gpd_strong_1functor_V. }
463+
exact (gpd_strong_1functor_V _ _). }
464464
refine (equiv_path_sigma_hprop _ _ oE _).
465465
apply equiv_path_groupisomorphism.
466466
Defined.

theories/Algebra/AbSES/PullbackFiberSequence.v

+6-6
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ Proof.
105105
revert_opaque f; apply Trunc_rec; intros [f q0].
106106
(* Since [projection F f] is in the kernel of [projection E], we find a preimage in [B]. *)
107107
assert (b : merely (hfiber (inclusion E) (projection F f))).
108-
1: { rapply isexact_preimage.
108+
1: { refine (isexact_preimage _ _ _ _ _).
109109
exact (ap _ q0 @ q). }
110110
revert_opaque b; apply Trunc_rec; intros [b q1].
111111
(* The difference [f - b] in [F] is in the kernel of [projection F], hence lies in [A]. *)
112112
assert (a : merely (hfiber (inclusion F)
113113
(sg_op f (-(grp_pullback_pr1 _ _ (p^$.1 (ab_biprod_inr b))))))).
114-
1: { rapply isexact_preimage.
114+
1: { refine (isexact_preimage _ _ _ _ _).
115115
refine (grp_homo_op _ _ _ @ _).
116116
refine (ap (fun x => _ + x) (grp_homo_inv _ _) @ _).
117117
refine (ap (fun x => _ - x) (abses_pullback_inclusion_transpose_beta (inclusion E) F p b @ q1) @ _).
@@ -171,7 +171,7 @@ Proof.
171171
change (equiv_ptransformation_phomotopy (iscomplex_abses_pullback' _ _ (iscomplex_abses E)) U)
172172
with (equiv_path_abses_iso ((iscomplex_abses_pullback' _ _ (iscomplex_abses E)).1 U)).
173173
apply (ap equiv_path_abses_iso).
174-
rapply path_hom.
174+
refine (path_hom _ ).
175175
refine (_ $@R abses_pullback_compose' (inclusion E) (projection E) U);
176176
unfold trans_comp.
177177
refine (_ $@R abses_pullback_homotopic' (projection E $o inclusion E) grp_homo_const (iscomplex_abses E) U).
@@ -248,7 +248,7 @@ Proof.
248248
apply eissect. }
249249
refine (equiv_concat_l _ _ oE _).
250250
1: { refine (ap (fun x => (x $@ _).1) _).
251-
rapply gpd_strong_1functor_V. }
251+
exact (gpd_strong_1functor_V _ _). }
252252
apply equiv_path_groupisomorphism.
253253
Defined.
254254

@@ -366,8 +366,8 @@ Lemma hfiber_cxfib'_induced_path' `{Univalence} {A B C : AbGroup} (E : AbSES C B
366366
: path_hfiber_cxfib' (hfiber_cxfib'_inhabited E F p) Y.
367367
Proof.
368368
exists (hfiber_cxfib'_induced_path'0 E F p Y).
369-
rapply gpd_moveR_Vh.
370-
rapply gpd_moveL_hM.
369+
refine (gpd_moveR_Vh _).
370+
refine (gpd_moveL_hM _).
371371
rapply gpd_moveR_Vh.
372372
intro x.
373373
srapply equiv_path_pullback_hset; split.

theories/Algebra/ooGroup.v

+5-5
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Proof.
133133
rewrite <- p.
134134
rewrite !loops_functor_group.
135135
apply ap.
136-
symmetry; rapply (fmap_comp loops).
136+
symmetry; exact (fmap_comp loops _ _ _).
137137
Qed.
138138

139139
Definition grouphom_idmap (G : ooGroup) : ooGroupHom G G
@@ -285,13 +285,13 @@ Global Instance is0functor_group_to_oogroup : Is0Functor group_to_oogroup.
285285
Proof.
286286
snrapply Build_Is0Functor.
287287
intros G H f.
288-
by rapply (fmap pClassifyingSpace).
288+
by exact (fmap pClassifyingSpace f).
289289
Defined.
290290

291291
Global Instance is1functor_group_to_oogroup : Is1Functor group_to_oogroup.
292292
Proof.
293293
snrapply Build_Is1Functor; hnf; intros.
294-
1: by rapply (fmap2 pClassifyingSpace).
295-
1: by rapply (fmap_id pClassifyingSpace).
296-
by rapply (fmap_comp pClassifyingSpace).
294+
1: by exact (fmap2 pClassifyingSpace X).
295+
1: by exact (fmap_id pClassifyingSpace _).
296+
by exact (fmap_comp pClassifyingSpace _ _).
297297
Defined.

theories/Basics/Tactics.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ Tactic Notation "snrefine" uconstr(term) := simple notypeclasses refine term; gl
320320

321321
(** Note that the Coq standard library has a [rapply], but it is like our [rapply'] with many-holes first. We prefer fewer-holes first, for instance so that a theorem producing an equivalence will by preference be used to produce an equivalence rather than to apply the coercion of that equivalence to a function. *)
322322
Tactic Notation "rapply" uconstr(term)
323-
:= do_with_holes ltac:(fun x => refine x) term.
323+
:= do_with_holes ltac:(fun x => try (try (nrefine x || fail 2); fail); refine x) term.
324324
Tactic Notation "rapply'" uconstr(term)
325325
:= do_with_holes' ltac:(fun x => refine x) term.
326326

theories/Homotopy/Bouquet.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Section AssumeUnivalence.
8282
intros f.
8383
refine (_ @ @is1natural_equiv_pi1bouquet_rec S _ _ f grp_homo_id).
8484
simpl; f_ap; symmetry.
85-
rapply (cat_idr_strong f).
85+
exact (cat_idr_strong f).
8686
Defined.
8787

8888
End AssumeUnivalence.

theories/Homotopy/EMSpace.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Section EilenbergMacLane.
6262
: pTr n.+2 X <~>* pTr n.+2 (loops (psusp X)).
6363
Proof.
6464
snrapply Build_pEquiv.
65-
1: rapply (fmap (pTr _) (loop_susp_unit _)).
65+
1: exact (fmap (pTr _) (loop_susp_unit _)).
6666
nrapply O_inverts_conn_map.
6767
nrapply (isconnmap_pred_add n.-2).
6868
rewrite 2 trunc_index_add_succ.

theories/Homotopy/ExactSequence.v

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Definition iscomplex_ptr (n : trunc_index) {F X Y : pType}
4848
Proof.
4949
refine ((fmap_comp (pTr n) i f)^* @* _).
5050
refine (_ @* ptr_functor_pconst n).
51-
rapply (fmap2 (pTr _)); assumption.
51+
refine (fmap2 (pTr _) _); assumption.
5252
Defined.
5353

5454
(** Loop spaces preserve complexes. *)
@@ -57,7 +57,7 @@ Definition iscomplex_loops {F X Y : pType}
5757
: IsComplex (fmap loops i) (fmap loops f).
5858
Proof.
5959
refine ((fmap_comp loops i f)^$ $@ _ $@ fmap_zero_morphism _).
60-
rapply (fmap2 loops); assumption.
60+
refine (fmap2 loops _); assumption.
6161
Defined.
6262

6363
Definition iscomplex_iterated_loops {F X Y : pType}
@@ -387,7 +387,7 @@ Proof.
387387
(isexact_purely_fiberseq (fiberseq_loops (fiberseq_isexact_purely i f)))).
388388
transitivity (fmap loops (pfib f) o* fmap loops (cxfib cx_isexact)).
389389
- refine (_ @* fmap_comp loops _ _).
390-
rapply (fmap2 loops).
390+
refine (fmap2 loops _).
391391
symmetry; apply pfib_cxfib.
392392
- refine (_ @* pmap_compose_assoc _ _ _).
393393
refine (pmap_prewhisker (fmap loops (cxfib cx_isexact)) _).

theories/Homotopy/HSpace/Core.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ Proof.
151151
exact (fmap loops (pmap_hspace_left_op a o* (pequiv_hspace_left_op pt)^-1*)).
152152
- lazy beta.
153153
transitivity (fmap (b:=A) loops pmap_idmap).
154-
2: rapply (fmap_id loops).
155-
rapply (fmap2 loops).
154+
2: exact (fmap_id loops _).
155+
refine (fmap2 loops _).
156156
nrapply peisretr.
157157
Defined.
158158

theories/Homotopy/HomotopyGroup.v

+7-7
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ Proof.
122122
apply Build_Is0Functor.
123123
intros X Y f.
124124
snrapply Build_GroupHomomorphism.
125-
{ rapply (fmap (Tr 0)).
126-
rapply (fmap loops).
125+
{ refine (fmap (Tr 0) _).
126+
refine (fmap loops _).
127127
assumption. }
128128
(** Note: we don't have to be careful about which paths we choose here since we are trying to inhabit a proposition. *)
129129
intros x y.
@@ -197,7 +197,7 @@ Definition pi_loops n X : Pi n.+1 X <~>* Pi n (loops X).
197197
Proof.
198198
destruct n.
199199
1: reflexivity.
200-
rapply (emap (pTr 0 o loops)).
200+
refine (emap (pTr 0 o loops) _).
201201
apply unfold_iterated_loops'.
202202
Defined.
203203

@@ -289,7 +289,7 @@ Global Instance isequiv_pi_connmap `{Univalence} (n : nat) {X Y : pType} (f : X
289289
: IsEquiv (fmap (pPi n) f).
290290
Proof.
291291
(* For [n = 0] and [n] a successor, [fmap (pPi n) f] is definitionally equal to the map in the previous result as a map of types. *)
292-
destruct n; rapply isequiv_pi_connmap'.
292+
destruct n; exact (isequiv_pi_connmap' _ _).
293293
Defined.
294294

295295
Definition pequiv_pi_connmap `{Univalence} (n : nat) {X Y : pType} (f : X ->* Y)
@@ -340,10 +340,10 @@ Proposition isembedding_pi_psect {n : nat} {X Y : pType}
340340
: IsEmbedding (fmap (pPi n) s).
341341
Proof.
342342
apply isembedding_isinj_hset.
343-
rapply (isinj_section (r:=fmap (pPi n) r)).
343+
refine (isinj_section (r:=fmap (pPi n) r) _).
344344
intro x.
345-
lhs_V rapply (fmap_comp (pPi n) s r x).
346-
lhs rapply (fmap2 (pPi n) k x).
345+
lhs_V refine (fmap_comp (pPi n) s r x).
346+
lhs refine (fmap2 (pPi n) k x).
347347
exact (fmap_id (pPi n) X x).
348348
Defined.
349349

theories/Homotopy/Hopf.v

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Proof.
4242
snrapply equiv_functor_sigma_id.
4343
intros x.
4444
exact (Build_Equiv _ _ (.* x) _). }
45-
1,2: rapply (equiv_contr_sigma (Unit_ind (pointed_type X))).
45+
1,2: exact (equiv_contr_sigma (Unit_ind (pointed_type X))).
4646
1,2: reflexivity. }
4747
reflexivity.
4848
Defined.
@@ -183,9 +183,9 @@ Definition pequiv_ptr_psusp_loops `{Univalence} (X : pType) (n : nat) `{IsConnec
183183
: pTr n.+2 (psusp (loops X)) <~>* pTr n.+2 X.
184184
Proof.
185185
snrapply Build_pEquiv.
186-
1: rapply (fmap (pTr _) (loop_susp_counit _)).
186+
1: exact (fmap (pTr _) (loop_susp_counit _)).
187187
nrapply O_inverts_conn_map.
188188
nrapply (isconnmap_pred_add n.-2).
189189
rewrite 2 trunc_index_add_succ.
190-
rapply (conn_map_loop_susp_counit X).
190+
exact (conn_map_loop_susp_counit X).
191191
Defined.

theories/Homotopy/InjectiveTypes/TypeFamKanExt.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ Section UniverseStructure.
3131
(P : X -> Type@{w}) (j : X -> Y) (isem : IsEmbedding@{u v uv} j) (x : X)
3232
: Equiv@{uvw w} (LeftKanFam@{} P j (j x)) (P x).
3333
Proof.
34-
rapply (@equiv_contr_sigma (hfiber j (j x)) _ _).
34+
exact (@equiv_contr_sigma (hfiber j (j x)) _ _).
3535
Defined.
3636

3737
Definition isext_equiv_rightkanfam@{} `{Funext} {X : Type@{u}} {Y : Type@{v}}
3838
(P : X -> Type@{w}) (j : X -> Y) (isem : IsEmbedding@{u v uv} j) (x : X)
3939
: Equiv@{uvw w} (RightKanFam@{} P j (j x)) (P x).
4040
Proof.
41-
rapply (@equiv_contr_forall _ (hfiber j (j x)) _ _).
41+
exact (@equiv_contr_forall _ (hfiber j (j x)) _ _).
4242
Defined.
4343

4444
Definition isext_leftkanfam@{suvw | uvw < suvw} `{Univalence} {X : Type@{u}} {Y : Type@{v}}

theories/Homotopy/Join/Core.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ Section JoinSym.
691691
Definition equiv_join_sym' (A B : Type)
692692
: Join A B <~> Join B A.
693693
Proof.
694-
rapply (opyon_equiv_0gpd (A:=Type)).
694+
refine (opyon_equiv_0gpd (A:=Type) _).
695695
apply joinrecdata_fun_sym.
696696
Defined.
697697

@@ -725,7 +725,7 @@ Section JoinSym.
725725
Proof.
726726
symmetry.
727727
(** Both sides are [join_rec] applied to [JoinRecData]: *)
728-
rapply (fmap join_rec).
728+
refine (fmap join_rec _).
729729
bundle_joinrecpath; intros; cbn.
730730
refine (ap inverse _).
731731
apply ap_idmap.

theories/Homotopy/Join/JoinAssoc.v

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Definition trijoinrecdata_fun_twist (A B C : Type)
8080
Definition equiv_trijoin_twist' (A B C : Type)
8181
: TriJoin A B C <~> TriJoin B A C.
8282
Proof.
83-
rapply (opyon_equiv_0gpd (A:=Type)).
83+
refine (opyon_equiv_0gpd (A:=Type) _).
8484
apply trijoinrecdata_fun_twist.
8585
Defined.
8686

@@ -122,7 +122,7 @@ Definition trijoin_twist_homotopic (A B C : Type)
122122
Proof.
123123
symmetry.
124124
(** Both sides are [trijoin_rec] applied to [TriJoinRecData]: *)
125-
rapply (fmap trijoin_rec).
125+
refine (fmap trijoin_rec _).
126126
bundle_trijoinrecpath; intros; cbn.
127127
1: refine (ap inverse _).
128128
1, 2, 3: apply ap_idmap.
@@ -375,7 +375,7 @@ Definition hexagon_join_twist_sym A B C
375375
== trijoin_twist B C A o trijoin_id_sym B A C o trijoin_twist A B C.
376376
Proof.
377377
(* It's enough to show that both sides induces the same natural transformation under the covariant Yoneda embedding, i.e., after postcomposing with a general function [f]. *)
378-
rapply (opyon_faithful_0gpd (A:=Type)).
378+
refine (opyon_faithful_0gpd (A:=Type) _ _ _ _ _).
379379
intros P f.
380380
(* We replace [f] by [trijoin_rec t] for generic [t]. This will allow induction later. *)
381381
pose proof (p := issect_trijoin_rec_inv f).

theories/Homotopy/Join/TriJoin.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ Definition functor2_trijoin {A B C A' B' C'}
793793
: functor_trijoin f g h == functor_trijoin f' g' h'.
794794
Proof.
795795
unfold functor_trijoin.
796-
rapply (fmap trijoin_rec).
796+
refine (fmap trijoin_rec _).
797797
apply (trijoinrecdata_tricomp2 _ p q r).
798798
Defined.
799799

theories/Homotopy/WhiteheadsPrinciple.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Proof.
104104
intros y q. destruct q.
105105
snrefine (isequiv_homotopic _ _).
106106
1: exact (fmap (Pi k.+1) (fmap loops (pmap_from_point f x))).
107-
2:{ rapply (fmap2 (Pi k.+1)); srefine (Build_pHomotopy _ _).
107+
2:{ refine (fmap2 (Pi k.+1) _); srefine (Build_pHomotopy _ _).
108108
- intros p; cbn.
109109
refine (concat_1p _ @ concat_p1 _).
110110
- reflexivity. }

theories/Modalities/Topological.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ Proof.
119119
intros x; unfold composeD; cbn.
120120
apply equiv_path_arrow. }
121121
refine ((isconnected_elim (Nul D) (A := D (inl a)) _ _).1).
122-
{ rapply isconnected_acc_ngen. }
122+
{ exact (isconnected_acc_ngen _ _). }
123123
intros b; cbn in b. strip_truncations.
124124
assert (bc : IsConnMap (Nul D) (unit_name b)).
125125
{ intros x; unfold hfiber.
126126
apply (isconnected_equiv (Nul D) (b = x)
127127
(equiv_contr_sigma _)^-1).
128-
rapply (isconnected_acc_ngen (Nul D) (inr (a;(b,x)))). }
128+
exact (isconnected_acc_ngen (Nul D) (inr (a;(b,x)))). }
129129
pose (p := conn_map_elim (Nul D) (unit_name b)
130130
(fun u => f b = f u) (fun _ => 1)).
131131
apply (Build_Contr _ (f b ; p)); intros [x q].

0 commit comments

Comments
 (0)