Skip to content

Commit e379772

Browse files
author
Patrick Nicodemus
committed
rapply
1 parent 1387118 commit e379772

29 files changed

+110
-84
lines changed

STYLE.md

+39-12
Original file line numberDiff line numberDiff line change
@@ -1197,27 +1197,54 @@ They are described more fully, usually with examples, in the files
11971197
where they are defined.
11981198

11991199
- `nrefine`, `srefine`, `snrefine`:
1200-
Defined in `Basics/Overture`, these are shorthands for
1200+
Defined in `Basics/Tactics`, these are shorthands for
12011201
`notypeclasses refine`, `simple refine`, and `simple notypeclasses refine`.
12021202
It's good to avoid typeclass search if it isn't needed.
12031203

1204-
- `rapply`, `nrapply`, `srapply`, `snrapply`:
1205-
Defined in `Basics/Overture`, these tactics use `refine`,
1206-
`nrefine`, `srefine` and `snrefine`, except that additional holes
1207-
are added to the function so they behave like `apply` does.
1208-
The unification algorithm used by `apply` is different and often
1209-
less powerful than the one used by `refine`, though it is
1210-
occasionally better at pattern matching.
1204+
- `nrapply`, `rapply`, `tapply`:
1205+
Defined in `Basics/Tactics`, each of these is similar to `apply`,
1206+
except that they use the unification engine of `refine`, which
1207+
is different and often stronger than that of `apply`.
1208+
`nrapply t` computes the type of `t`
1209+
(possibly with holes, if `t` has holes) and tries to unify the type
1210+
of `t` with the goal; if this succeeds, it generates goals for each
1211+
hole in `t` not solved by unification; otherwise, it repeats this
1212+
process with `t _`, `t _ _ `, and so on until it has the correct
1213+
number of arguments to unify with the goal.
1214+
`rapply` is like `nrapply`, (`rapply` succeeds iff
1215+
`nrapply` does) except that after it succeeds in unifying with the
1216+
goal, it solves all typeclass goals it can. `tapply` is stronger
1217+
than `rapply`: if Coq cannot compute a type for `t` or successfully
1218+
unify the type of `t` with the goal, it will elaborate all typeclass
1219+
holes in `t` that it can, and then try again to compute the type of
1220+
`t` and unify it with the goal. (Like `rapply`, `tapply` also
1221+
instantiates typeclass goals after successful unification with the
1222+
goal as well: if `rapply` succeeds, so does `tapply` and their
1223+
outcomes are equivalent.)
1224+
1225+
- `snrapply`, `srapply`, `stapply`: Sibling tactics to `nrapply`,
1226+
`rapply` and `tapply`, except that they use `simple refine` instead
1227+
of `refine` (beta reduction is not attempted when unifying with the
1228+
goal, and no new goals are shelved)
12111229

12121230
Here are some tips:
12131231
- If `apply` fails with a unification error you think it shouldn't
1214-
have, try `nrapply`.
1215-
- If you want to use type class resolution as well, try `rapply`.
1232+
have, try `nrapply`, and then `rapply` if `nrapply` generates
1233+
typeclass goals.
1234+
- If you want to use type class resolution as well, try `tapply`.
12161235
But it's better to use `nrapply` if it works.
12171236
- You could add a prime to the tactic, to try with many arguments
12181237
first, decreasing the number on each try.
1219-
- If you don't want Coq to create evars for certain subgoals,
1220-
add an `s` to the tactic name to make it use `simple refine`.
1238+
- If you are trying to construct an element of a sum type `sig (A :
1239+
Type) (P: A->Type)` (or something equivalent, such as a `NatTrans`
1240+
record consisting of a `Transformation` and a proof that it
1241+
`Is1Natural`) and you want to manually construct `t : A` first and
1242+
then prove that `P t` holds for the given `t`, then use the
1243+
`simple` version of the tactic, like `srapply exist` or `srapply
1244+
Build_Record`, so that the first goal generated is `A`. If it's
1245+
more convenient to instantiate `a : A` while proving `P`, then use
1246+
`rapply exist` - for example, `Goal { x & x = 0 }. rapply exist;
1247+
reflexivity. Qed.`
12211248

12221249
- `lhs`, `lhs_V`, `rhs`, `rhs_V`: Defined in `Basics/Tactics`.
12231250
These are tacticals that apply a specified tactic to one side

theories/Algebra/AbGroups/AbHom.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ Proof.
151151
- exact (functor_ab_coeq a^-1$ b^-1$ (hinverse _ _ p) (hinverse _ _ q)).
152152
- nrefine (functor_ab_coeq_compose _ _ _ _ _ _ _ _
153153
$@ functor2_ab_coeq _ _ _ _ _ $@ functor_ab_coeq_id _ _).
154-
exact (cate_isretr _).
154+
tapply cate_isretr.
155155
- nrefine (functor_ab_coeq_compose _ _ _ _ _ _ _ _
156156
$@ functor2_ab_coeq _ _ _ _ _ $@ functor_ab_coeq_id _ _).
157-
exact (cate_issect _).
157+
tapply cate_issect.
158158
Defined.
159159

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

theories/Algebra/AbGroups/TensorProduct.v

+2-2
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: exact (fmap01_comp _ _ _ _).
698+
1,3: tapply fmap01_comp.
699699
nrapply ab_coeq_glue.
700700
- snrapply ab_tensor_prod_rec'.
701701
+ intros a.
@@ -811,7 +811,7 @@ Definition ab_tensor_prod_dist_l {A B C : AbGroup}
811811
: ab_tensor_prod A (ab_biprod B C)
812812
$<~> ab_biprod (ab_tensor_prod A B) (ab_tensor_prod A C).
813813
Proof.
814-
srapply (let f := _ in let g := _ in cate_adjointify (A:=AbGroup) f g _ _).
814+
stapply (let f := _ in let g := _ in cate_adjointify f g _ _).
815815
- snrapply ab_tensor_prod_rec.
816816
+ intros a bc.
817817
exact (tensor a (fst bc), tensor a (snd bc)).

theories/Algebra/AbSES/Core.v

+7-7
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: { refine (path_hom _).
406+
2: { tapply 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-
refine (path_hom _).
429+
tapply 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: refine (cx_isexact _ ).
578+
1: tapply 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: refine (cx_isexact _).
632+
2: tapply 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
@@ -688,10 +688,10 @@ Proof.
688688
- apply (grp_kernel_corec i).
689689
exact cx_isexact.
690690
- apply isequiv_surj_emb.
691-
2: refine (cancelL_mapinO _ (grp_kernel_corec _ _) _ _ _).
691+
2: tapply (cancelL_mapinO _ (grp_kernel_corec _ _) _).
692692
intros [y q].
693693
assert (a : Tr (-1) (hfiber i y)).
694-
1: by refine (isexact_preimage _ _ _ _ _).
694+
1: by tapply 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-
refine (cx_isexact _).
735+
tapply 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-
exact (gpd_strong_1functor_V _ _). }
463+
tapply 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: { refine (isexact_preimage _ _ _ _ _).
108+
1: { tapply 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: { refine (isexact_preimage _ _ _ _ _).
114+
1: { tapply 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-
refine (path_hom _ ).
174+
tapply 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-
exact (gpd_strong_1functor_V _ _). }
251+
tapply 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-
refine (gpd_moveR_Vh _).
370-
refine (gpd_moveL_hM _).
369+
tapply gpd_moveR_Vh.
370+
tapply gpd_moveL_hM.
371371
rapply gpd_moveR_Vh.
372372
intro x.
373373
srapply equiv_path_pullback_hset; split.

theories/Algebra/AbSES/SixTerm.v

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ Proof.
3737
apply isexact_inclusion_projection. }
3838
hnf. intros [f q]; rapply contr_inhabited_hprop.
3939
srefine (tr (_; _)).
40-
{ refine (grp_homo_compose _
41-
(abses_cokernel_iso (inclusion E) (projection E))^-1$).
40+
{ refine (grp_homo_compose _ (abses_cokernel_iso (inclusion E) (projection E))^-1$).
4241
apply (quotient_abgroup_rec _ _ f).
4342
intros e; rapply Trunc_ind.
4443
intros [b r].

theories/Algebra/Categorical/MonoidObject.v

-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ End MonoidEnriched.
278278

279279
(** ** Preservation of monoid objects by lax monoidal functors *)
280280

281-
Local Set Typeclasses Depth 2.
282281
Definition mo_preserved {A B : Type}
283282
{tensorA : A -> A -> A} {tensorB : B -> B -> B} {IA : A} {IB : B}
284283
(F : A -> B) `{IsMonoidalFunctor A B tensorA tensorB IA IB F} (x : A)

theories/Algebra/Universal/Homomorphism.v

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ Defined.
6969
Instance hset_homomorphism `{Funext} {σ} (A B : Algebra σ)
7070
: IsHSet (A $-> B).
7171
Proof.
72-
Search (IsHSet (SigHomomorphism _ _)).
7372
apply (istrunc_equiv_istrunc _ (issig_homomorphism A B)).
7473
Qed.
7574

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; exact (fmap_comp loops _ _ _).
136+
symmetry; tapply (fmap_comp loops).
137137
Qed.
138138

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

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

theories/Basics/Tactics.v

+8-3
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,14 @@ Tactic Notation "nrefine" uconstr(term) := notypeclasses refine term; global_axi
319319
Tactic Notation "snrefine" uconstr(term) := simple notypeclasses refine term; global_axiom.
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. *)
322-
(** This tactic is weaker than tapply, and equivalent in strength to nrapply, i.e., it should succeed iff nrapply succeeds, but it solves all possible typeclasses afterward. The implementation is: try nrefine t, t _, t _ _, ... until success; upon success, revert the last (successful) application of nrefine and call refine (t _ _ _). *)
322+
(** This tactic is weaker than [tapply], and equivalent in strength to [nrapply], i.e., it should succeed iff [nrapply] succeeds, but it solves all possible typeclasses afterward. The implementation is: try [nrefine t, t _, t _ _], ... until success; upon success, revert the last (successful) application of [nrefine] and call [refine (t _ _ _)]. *)
323323
(** TODO: Find a nicer implementation of this tactic. *)
324324
Tactic Notation "rapply" uconstr(term)
325325
:= do_with_holes ltac:(fun x => try (try (nrefine x || fail 2); fail); refine x) term.
326326
Tactic Notation "rapply'" uconstr(term)
327327
:= do_with_holes' ltac:(fun x => try (try (nrefine x || fail 2); fail); refine x) term.
328328

329-
(** See comment for rapply. This cannot be simplified to snrefine x because we don't want the global_axiom tactic to run here. *)
329+
(** See comment for [rapply]. This cannot be simplified to [snrefine x] because we don't want the [global_axiom] tactic to run here. *)
330330
Tactic Notation "srapply" uconstr(term)
331331
:= do_with_holes ltac:(fun x => try (try (simple notypeclasses refine x || fail 2); fail); srefine x) term.
332332
Tactic Notation "srapply'" uconstr(term)
@@ -342,12 +342,17 @@ Tactic Notation "snrapply" uconstr(term)
342342
Tactic Notation "snrapply'" uconstr(term)
343343
:= do_with_holes' ltac:(fun x => snrefine x) term.
344344

345-
(** This tactic is strictly stronger than rapply, because if the type of the argument term t (with holes) cannot be unified with the goal type, it calls typeclass search on all typeclass holes within t (independently of the goal) and then tries to unify with the goal again. Our implementation of rapply requires that the type (with holes) of the argument term unifies with the goal directly, without any help from typeclass search to fill in the holes in the type. The typeclass search after unification is more robust than the typeclass search before unification, because there is more information available to guide the typeclass search. *)
345+
(** This tactic is strictly stronger than [rapply], because if the type of the argument term [t] (with holes) cannot be unified with the goal type, it calls typeclass search on all typeclass holes within [t] (independently of the goal) and then tries to unify with the goal again. Our implementation of [rapply] requires that the type (with holes) of the argument term unifies with the goal directly, without any help from typeclass search to fill in the holes in the type. The typeclass search after unification is more robust than the typeclass search before unification, because there is more information available to guide the typeclass search. *)
346346
Tactic Notation "tapply" uconstr(term)
347347
:= do_with_holes ltac:(fun x => refine x) term.
348348
Tactic Notation "tapply'" uconstr(term)
349349
:= do_with_holes' ltac:(fun x => refine x) term.
350350

351+
Tactic Notation "stapply" uconstr(term)
352+
:= do_with_holes ltac:(fun x => srefine x) term.
353+
Tactic Notation "stapply'" uconstr(term)
354+
:= do_with_holes' ltac:(fun x => srefine x) term.
355+
351356
(** Apply a tactic to one side of an equation. For example, [lhs rapply lemma]. [tac] should produce a path. *)
352357

353358
Tactic Notation "lhs" tactic3(tac) := nrefine (ltac:(tac) @ _).

theories/Homotopy/CayleyDickson.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Defined.
155155
Global Instance cdi_conjugate_susp_right_inverse {A} `(CayleyDicksonImaginaroid A)
156156
: RightInverse hspace_op (conjugate_susp A cdi_negate) mon_unit.
157157
Proof.
158-
exact (cds_conjug_right_inv _).
158+
stapply cds_conjug_right_inv.
159159
Defined.
160160

161161
Global Instance cdi_susp_left_identity {A} `(CayleyDicksonImaginaroid A)
@@ -169,7 +169,7 @@ Global Instance cdi_susp_right_identity {A} `(CayleyDicksonImaginaroid A)
169169
Global Instance cdi_negate_susp_factornegleft {A} `(CayleyDicksonImaginaroid A)
170170
: FactorNegLeft (negate_susp A cdi_negate) hspace_op.
171171
Proof.
172-
exact (cds_factorneg_l _).
172+
stapply cds_factorneg_l.
173173
Defined.
174174

175175
(** A Cayley-Dickson imaginaroid [A] whose multiplciation on the suspension is associative gives rise to an H-space structure on the join of the suspension of [A] with itself. *)

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-
refine (fmap2 (pTr _) _); assumption.
51+
tapply (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-
refine (fmap2 loops _); assumption.
60+
tapply (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-
refine (fmap2 loops _).
390+
tapply (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: exact (fmap_id loops _).
155-
refine (fmap2 loops _).
154+
2: tapply (fmap_id loops).
155+
tapply (fmap2 loops).
156156
nrapply peisretr.
157157
Defined.
158158

theories/Homotopy/HomotopyGroup.v

+5-5
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-
{ refine (fmap (Tr 0) _).
126-
refine (fmap loops _).
125+
{ tapply (fmap (Tr 0)).
126+
tapply (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-
refine (emap (pTr 0 o loops) _).
200+
tapply (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; exact (isequiv_pi_connmap' _ _).
292+
destruct n; tapply isequiv_pi_connmap'.
293293
Defined.
294294

295295
Definition pequiv_pi_connmap `{Univalence} (n : nat) {X Y : pType} (f : X ->* Y)
@@ -340,7 +340,7 @@ Proposition isembedding_pi_psect {n : nat} {X Y : pType}
340340
: IsEmbedding (fmap (pPi n) s).
341341
Proof.
342342
apply isembedding_isinj_hset.
343-
refine (isinj_section (r:=fmap (pPi n) r) _).
343+
tapply (isinj_section (r:=fmap (pPi n) r)).
344344
intro x.
345345
lhs_V refine (fmap_comp (pPi n) s r x).
346346
lhs refine (fmap2 (pPi n) k x).

0 commit comments

Comments
 (0)