Skip to content

Commit

Permalink
more idiomatic naming
Browse files Browse the repository at this point in the history
  • Loading branch information
zstone1 committed Nov 9, 2024
1 parent 492465a commit 49d896b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@
+ lemma `cvgr_dnbhsP`
+ new definitions `left_assoc_prod`, and `right_assoc_prod`.
+ new lemmas `left_assoc_prodK`, `right_assoc_prodK`, and `swapK`.
+ new definitions `prodA`, and `prodAr`.
+ new lemmas `prodAK`, `prodArK`, and `swapK`.
- in file `product_topology.v`,
+ new lemmas `swap_continuous`, `left_assoc_prod_continuous`, and
`right_assoc_prod_continuous`.
+ new lemmas `swap_continuous`, `prodA_continuous`, and
`prodAr_continuous`.

### Changed

Expand Down
12 changes: 6 additions & 6 deletions classical/mathcomp_extra.v
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ From mathcomp Require Import finset interval.
(* {in A &, {mono f : x y /~ x <= y}} *)
(* sigT_fun f := lifts a family of functions f into a function on *)
(* the dependent sum *)
(* left_assoc_prod x := sends (X * Y) * Z to X * (Y * Z) *)
(* right_assoc_prod x := sends X * (Y * Z) to (X * Y) * Z *)
(* prodA x := sends (X * Y) * Z to X * (Y * Z) *)
(* prodAr x := sends X * (Y * Z) to (X * Y) * Z *)
(* ``` *)
(* *)
(******************************************************************************)
Expand Down Expand Up @@ -380,16 +380,16 @@ 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) :=
Definition prodA (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 :=
Definition prodAr (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.
Lemma prodAK : cancel prodA prodAr.
Proof. by case; case. Qed.

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

End reassociate_products.
Expand Down
4 changes: 2 additions & 2 deletions theories/topology_theory/product_topology.v
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Qed.
Section reassociate_continuous.
Context {X Y Z : topologicalType}.

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

Lemma right_assoc_prod_continuous : continuous (@right_assoc_prod X Y Z).
Lemma prodAr_continuous : continuous (@prodAr X Y Z).
Proof.
case=> a [b c] U [[V R]] [/= [[P Q /=]]] [Pa Qb] PQV Rc VRU.
exists (P, (Q `*` R)); first split => //.
Expand Down

0 comments on commit 49d896b

Please sign in to comment.