Skip to content

Commit c443888

Browse files
committed
avoid opaqueness of have in Coq 8.20 and later for transparent definitions
1 parent f047a60 commit c443888

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

theories/core/finmap_plus.v

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ Proof.
219219
if x is Some z then Sub (val (f z)) (fset1Ur (valP (f z))) else Sub e fset1U1.
220220
pose g_inv (x : e |` E) : option T :=
221221
match fsetULVR (valP x) with inl _ => None | inr p => Some (f^-1 (Sub (val x) p)) end.
222-
have can_g : cancel g g_inv.
222+
have @can_g : cancel g g_inv.
223223
{ move => [x|]; rewrite /g/g_inv/=; case: (fsetULVR _) => [|p] //=.
224224
- by rewrite inE fsval_eqF.
225225
- by rewrite valK' bijK.
226226
- exfalso. by rewrite p in He. }
227-
have can_g_inv : cancel g_inv g.
227+
have @can_g_inv : cancel g_inv g.
228228
{ move => [x Hx]; rewrite /g/g_inv/=. case: (fsetULVR _) => [|p] //=.
229229
- rewrite !inE => A. apply: val_inj => /=. by rewrite (eqP A).
230230
- apply: val_inj => //=. by rewrite bijK'. }
@@ -243,12 +243,12 @@ Proof.
243243
if x is inl z then Sub (val (f z)) (fset1Ur (valP (f z))) else Sub e fset1U1.
244244
pose g_inv (x : e |` E) : T + unit :=
245245
match fsetULVR (valP x) with inl _ => inr tt | inr p => inl (f^-1 (Sub (val x) p)) end.
246-
have can_g : cancel g g_inv.
246+
have @can_g : cancel g g_inv.
247247
{ move => [x|[]]; rewrite /g/g_inv/=; case: (fsetULVR _) => [|p] //=.
248248
- by rewrite inE fsval_eqF.
249249
- by rewrite valK' bijK.
250250
- exfalso. by rewrite p in He. }
251-
have can_g_inv : cancel g_inv g.
251+
have @can_g_inv : cancel g_inv g.
252252
{ move => [x Hx]; rewrite /g/g_inv/=. case: (fsetULVR _) => [|p] //=.
253253
- rewrite !inE => A. apply: val_inj => /=. by rewrite (eqP A).
254254
- apply: val_inj => //=. by rewrite bijK'. }
@@ -265,18 +265,18 @@ Definition bij_setD (aT : finType) (C : choiceType) (rT : {fset C}) (A : {set aT
265265
bij { x | x \in ~: A} (rT `\` [fset val (f x) | x in A]).
266266
Proof.
267267
set aT' := ({ x | _ }). set rT' := _ `\` _.
268-
have g_proof (x : aT') : val (f (val x)) \in rT'.
268+
have @g_proof (x : aT') : val (f (val x)) \in rT'.
269269
{ rewrite !inE (valP (f (val x))) andbT. apply: contraTN (valP x).
270270
case/imfsetP => /= x0 inA /val_inj /(@bij_injective _ _ f) ->. by rewrite inE negbK. }
271271
pose g (x : aT') : rT' := Sub (val (f (val x))) (g_proof x).
272-
have g_inv_proof (x : rT') : f^-1 (Sub (fsval x) (fsetDEl x)) \in ~: A.
272+
have @g_inv_proof (x : rT') : f^-1 (Sub (fsval x) (fsetDEl x)) \in ~: A.
273273
{ rewrite inE. case/fsetDP: (valP x) => ?. apply: contraNN => X. apply/imfsetP.
274274
exists (f^-1 (Sub (fsval x) (fsetDEl x))) => //. by rewrite bijK'. }
275275
pose g_inv (x : rT') : aT' := Sub (f^-1 (Sub (val x) (fsetDEl x))) (g_inv_proof x).
276-
have can1 : cancel g g_inv.
276+
have @can1 : cancel g g_inv.
277277
{ move => [x Hx]. rewrite /g/g_inv. apply: val_inj => /=. apply: (@bij_injective _ _ f).
278278
rewrite bijK'. exact: val_inj. }
279-
have can2 : cancel g_inv g.
279+
have @can2 : cancel g_inv g.
280280
{ move => [x Hx]. rewrite /g/g_inv. apply: val_inj => /=. by rewrite bijK'. }
281281
apply: Bij can1 can2.
282282
Defined.

theories/core/sgraph.v

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,24 +144,24 @@ End InducedSubgraph.
144144
Lemma induced_isubgraph (G : sgraph) (A : {set G}) : induced A ⇀ G.
145145
Proof.
146146
pose f (x : induced A) : G := val x.
147-
have : {mono f : x y / x -- y} by abstract by move => x y; rewrite induced_edge.
148-
apply: ISubgraph; exact: val_inj.
147+
have @H : {mono f : x y / x -- y} by abstract by move => x y; rewrite induced_edge.
148+
move: H; apply: ISubgraph; exact: val_inj.
149149
Defined.
150150

151151
Lemma isubgraph_induced (F G : sgraph) (i : F ⇀ G) :
152152
F ≃ induced [set x in codom i].
153153
Proof.
154154
set A := [set _ in _].
155-
have jP (x : induced A) : val x \in codom i.
155+
have @jP (x : induced A) : val x \in codom i.
156156
abstract by move: (valP x); rewrite inE.
157157
pose j (x : induced A) : F := iinv (jP x).
158-
have iP (x : F) : i x \in A by abstract by rewrite inE codom_f.
158+
have @iP (x : F) : i x \in A by abstract by rewrite inE codom_f.
159159
pose i' (x : F) : induced A := Sub (i x) (iP x).
160-
have can_i : cancel i' j.
160+
have @can_i : cancel i' j.
161161
abstract by move=> x; apply: (isubgraph_inj i); rewrite f_iinv.
162-
have can_j : cancel j i'.
162+
have @can_j : cancel j i'.
163163
abstract by move => [x xA]; apply: val_inj; rewrite /j/=f_iinv.
164-
apply: Diso' can_i can_j _.
164+
apply: Diso' can_i can_j _.
165165
abstract by move => x y; rewrite induced_edge /= isubgraph_mono.
166166
Defined.
167167

@@ -1443,7 +1443,7 @@ Qed.
14431443

14441444
Lemma isubgraph_complLR (F G : sgraph) (i : compl F ⇀ G) : F ⇀ compl G.
14451445
Proof.
1446-
have I := isubgraph_inj i; apply: (@ISubgraph F (compl G) i) => // x y.
1446+
have @I := isubgraph_inj i; apply: (@ISubgraph F (compl G) i) => // x y.
14471447
exact: isubgraph_compLR_mono.
14481448
Defined.
14491449

theories/core/transfer.v

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ Qed.
574574
Lemma open_add_edge (x y : G) u :
575575
open (G ∔ [x, u, y]) ⩭2 open G ∔ [inj_v x, u, inj_v y].
576576
Proof.
577-
have X : is_graph (add_edge (open G) (inj_v x) u (inj_v y)).
577+
have @X : is_graph (add_edge (open G) (inj_v x) u (inj_v y)).
578578
{ exact: add_edge_graph. }
579579
econstructor.
580580
apply: iso2_comp (iso2_sym _) _. apply: openK.
@@ -651,21 +651,21 @@ Proof.
651651
move: j => [isF isG i] Vz IOz /=.
652652
unshelve econstructor.
653653
{ apply remove_vertex_graph => //; constructor. rewrite (oiso2_pIO (OIso2 i)) // in IOz. }
654-
have E1 : [fset vfun_body i z] = [fset val (i x) | x : vset F & val x \in [fset z]]. (* : / in?? *)
654+
have @E1 : [fset vfun_body i z] = [fset val (i x) | x : vset F & val x \in [fset z]]. (* : / in?? *)
655655
{ apply/fsetP => k. rewrite inE vfun_bodyE. apply/eqP/imfsetP => /= [->|[x] /= ].
656656
- exists (Sub z Vz) => //. by rewrite !inE.
657657
- rewrite !inE => /eqP X ->. move: Vz. rewrite -X => Vz. by rewrite fsvalK. }
658-
have E2 : edges_at G (vfun_body i z) = [fset val (i.e x) | x : eset F & val x \in edges_at F z].
658+
have @E2 : edges_at G (vfun_body i z) = [fset val (i.e x) | x : eset F & val x \in edges_at F z].
659659
{ rewrite (@oiso2_edges_at _ _ (OIso2 i)) //=. apply/fsetP => k. apply/imfsetP/imfsetP.
660660
- case => /= x Ix ->.
661-
have Hx : x \in eset F. move: Ix. rewrite edges_atE. by case: (_ \in _).
661+
have @Hx : x \in eset F. move: Ix. rewrite edges_atE. by case: (_ \in _).
662662
exists (Sub x Hx) => //. by rewrite efun_bodyE.
663663
- case => /= x. rewrite inE => Hx ->. exists (fsval x) => //. by rewrite efun_bodyE fsvalK. }
664-
- have P e (p : e \in eset (F \ z)) : val (i.e (Sub e (fsetDl p))) \in eset G `\` edges_at G (vfun_body i z).
664+
- have @P e (p : e \in eset (F \ z)) : val (i.e (Sub e (fsetDl p))) \in eset G `\` edges_at G (vfun_body i z).
665665
{ rewrite inE [_ \in eset G]valP andbT E2. apply: contraTN (p).
666666
case/imfsetP => /= e0. rewrite inE => A. move/val_inj. move/(@bij_injective _ _ i.e) => ?; subst.
667667
by rewrite inE A. }
668-
have Q v (p : v \in vset (F \ z)) : val (i (Sub v (fsetDl p))) \in vset G `\ vfun_body i z.
668+
have @Q v (p : v \in vset (F \ z)) : val (i (Sub v (fsetDl p))) \in vset G `\ vfun_body i z.
669669
{ rewrite inE [_ \in vset G]valP andbT E1. apply: contraTN (p).
670670
case/imfsetP => /= v0. rewrite inE => A. move/val_inj. move/(@bij_injective _ _ i) => ?; subst.
671671
by rewrite inE A. }
@@ -713,8 +713,8 @@ Lemma oiso2_add_edge (F G : pre_graph) (i : F ⩭2 G) e1 e2 x y u v :
713713
F ∔ [e1,x,u,y] ⩭2 G ∔ [e2,i x,v,i y].
714714
Proof.
715715
case: i => isF isG i fresh_e1 fresh_e2 Vx Vy uv /=.
716-
have isF' : is_graph (F ∔ [e1, x, u, y]) by abstract exact: add_edge_graph'.
717-
have isG' : is_graph (G ∔ [e2, vfun_body i x, v, vfun_body i y]).
716+
have @isF' : is_graph (F ∔ [e1, x, u, y]) by abstract exact: add_edge_graph'.
717+
have @isG' : is_graph (G ∔ [e2, vfun_body i x, v, vfun_body i y]).
718718
by abstract (apply: add_edge_graph'; exact: (oiso2_vset (OIso2 i))).
719719
econstructor.
720720
apply: iso2_comp. apply: pack_add_edge'. assumption.
@@ -728,13 +728,13 @@ Lemma oiso2_remove_edges (F G : pre_graph) (i : F ⩭2 G) E E':
728728
E' = [fset efun_of i e | e in E] -> (F - E) ⩭2 (G - E').
729729
Proof.
730730
case: i => isF isG i /= S EE'. econstructor.
731-
have X : E' = [fset val (i.e x) | x : eset F & val x \in E].
731+
have @X : E' = [fset val (i.e x) | x : eset F & val x \in E].
732732
{ subst. apply/fsetP => k. apply/imfsetP/imfsetP.
733733
- case => /= x Ix ->.
734-
have Hx : x \in eset F. move: Ix. apply: (fsubsetP S).
734+
have @Hx : x \in eset F. move: Ix. apply: (fsubsetP S).
735735
exists (Sub x Hx) => //. by rewrite efun_bodyE.
736736
- case => /= x. rewrite inE => Hx ->. exists (fsval x) => //. by rewrite efun_bodyE fsvalK. }
737-
have P e (p : e \in eset (F - E)) : val (i.e (Sub e (fsetDl p))) \in eset G `\` E'.
737+
have @P e (p : e \in eset (F - E)) : val (i.e (Sub e (fsetDl p))) \in eset G `\` E'.
738738
{ rewrite inE [_ \in eset G]valP andbT X. apply: contraTN (p).
739739
case/imfsetP => /= e0. rewrite inE => A. move/val_inj. move/(@bij_injective _ _ i.e) => ?; subst.
740740
by rewrite inE A. }
@@ -775,8 +775,8 @@ Lemma oiso2_add_edge' (F G : pre_graph) (i : F ⩭2 G)
775775
Proof with eauto with typeclass_instances.
776776
case: i => isF isG i.
777777
move => E1 E2 Vx Vy Vx' Vy' Ix Iy uv.
778-
have isF' : is_graph ( F ∔ [e1, x, u, y] ). apply add_edge_graph'...
779-
have isG' : is_graph ( G ∔ [e2, x', v, y']). apply add_edge_graph'...
778+
have @isF' : is_graph ( F ∔ [e1, x, u, y] ). apply add_edge_graph'...
779+
have @isG' : is_graph ( G ∔ [e2, x', v, y']). apply add_edge_graph'...
780780
econstructor.
781781
apply: iso2_comp. apply: pack_add_edge'. assumption.
782782
apply: iso2_comp (iso2_sym _). 2: apply: pack_add_edge'; try assumption.

0 commit comments

Comments
 (0)