Skip to content

Commit

Permalink
trailing spaces, nitpicks
Browse files Browse the repository at this point in the history
  • Loading branch information
affeldt-aist committed Nov 9, 2024
1 parent 283d192 commit 89fb92d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
12 changes: 7 additions & 5 deletions classical/mathcomp_extra.v
Original file line number Diff line number Diff line change
Expand Up @@ -375,17 +375,19 @@ Definition swap {T1 T2 : Type} (x : T1 * T2) := (x.2, x.1).

Section reassociate_products.
Context {X Y Z : Type}.
Definition left_assoc_prod (xyz : (X * Y) * Z) : X * (Y * Z) :=
(xyz.1.1,(xyz.1.2,xyz.2)).

Definition right_assoc_prod (xyz : X * (Y * Z)) : (X * Y) * Z :=
((xyz.1,xyz.2.1),xyz.2.2).
Definition left_assoc_prod (xyz : (X * Y) * Z) : X * (Y * Z) :=
(xyz.1.1, (xyz.1.2, xyz.2)).

Definition right_assoc_prod (xyz : X * (Y * Z)) : (X * Y) * Z :=
((xyz.1, xyz.2.1), xyz.2.2).

Lemma left_assoc_prodK : cancel left_assoc_prod right_assoc_prod.
Proof. by case;case. Qed.
Proof. by case; case. Qed.

Lemma right_assoc_prodK : cancel right_assoc_prod left_assoc_prod.
Proof. by case => ? []. Qed.

End reassociate_products.

Lemma swapK {T1 T2 : Type} : cancel (@swap T1 T2) (@swap T2 T1).
Expand Down
31 changes: 13 additions & 18 deletions theories/topology_theory/product_topology.v
Original file line number Diff line number Diff line change
Expand Up @@ -234,35 +234,30 @@ Notation compact_setM := compact_setX (only parsing).

Lemma swap_continuous {X Y : topologicalType} : continuous (@swap X Y).
Proof.
case=> a b W /=[[U V]][] /= Ua Vb UVW; exists (V, U); first by split.
by case => //= ? ? [] ? ?; apply: UVW.
case=> a b W /= [[U V]][] /= Ub Va UVW; exists (V, U); first by split.
by case => //= ? ? [] ? ?; exact: UVW.
Qed.

Section reassociate_continuous.
Context {X Y Z : topologicalType}.

Lemma left_assoc_prod_continuous : continuous (@left_assoc_prod X Y Z).
Lemma left_assoc_prod_continuous : continuous (@left_assoc_prod X Y Z).
Proof.
case;case=> a b c U [[/= P V]] [Pa] [][/= Q R][ Qb Rc] QRV PVU.
move=> [] [a b] c U [[/= P V]] [Pa] [][/= Q R][ Qb Rc] QRV PVU.
exists ((P `*` Q), R); first split.
- exists (P, Q); first split => //=.
by case=> x y /= [Px Qy]; split => //.
- done.
- case; case=> x y z /= [][] ? ? ?; apply: PVU; split => //.
exact: QRV.
- exists (P, Q); first by [].
by case=> x y /= [Px Qy].
- by [].
- by move=> [[x y] z] [] [] ? ? ?; apply: PVU; split => //; exact: QRV.
Qed.

Lemma right_assoc_prod_continuous : continuous (@right_assoc_prod X Y Z).
Lemma right_assoc_prod_continuous : continuous (@right_assoc_prod X Y Z).
Proof.
case=> a [b c] U [[V R]] [/= [[P Q /=]]] [Pa Qb] PQV Rc VRU.
exists (P, (Q `*` R)); first split.
- done.
- exists (Q, R); first split => //=.
by case=> ? ? /= [? ?]; split.
- case=> x [y z] [? [? ?]]; apply: VRU; split => //.
exact: PQV.
exists (P, (Q `*` R)); first split => //.
- exists (Q, R); first by [].
by case=> ? ? /= [].
- by case=> x [y z] [? [? ?]]; apply: VRU; split => //; exact: PQV.
Qed.

End reassociate_continuous.


0 comments on commit 89fb92d

Please sign in to comment.