Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(algebra/group/pi): Split into multiple files (#5280)
This allows files that appear before `ordered_group` to still use `pi.monoid` etc.
- Loading branch information
1 parent
b5ab2f7
commit 4c9499f
Showing
5 changed files
with
63 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/- | ||
Copyright (c) 2018 Simon Hudon. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Simon Hudon, Patrick Massot | ||
-/ | ||
import algebra.group.pi | ||
import algebra.ordered_group | ||
import tactic.pi_instances | ||
/-! | ||
# Pi instances for ordered groups and monoids | ||
This file defines instances for ordered group, monoid, and related structures on Pi types. | ||
-/ | ||
|
||
universes u v w | ||
variable {I : Type u} -- The indexing type | ||
variable {f : I → Type v} -- The family of types already equipped with instances | ||
variables (x y : Π i, f i) (i : I) | ||
|
||
namespace pi | ||
|
||
@[to_additive] | ||
instance ordered_cancel_comm_monoid [∀ i, ordered_cancel_comm_monoid $ f i] : | ||
ordered_cancel_comm_monoid (Π i : I, f i) := | ||
by refine_struct { mul := (*), one := (1 : Π i, f i), le := (≤), lt := (<), .. pi.partial_order }; | ||
tactic.pi_instance_derive_field | ||
|
||
@[to_additive] | ||
instance ordered_comm_group [∀ i, ordered_comm_group $ f i] : | ||
ordered_comm_group (Π i : I, f i) := | ||
{ mul_le_mul_left := λ x y hxy c i, mul_le_mul_left' (hxy i) _, | ||
..pi.comm_group, | ||
..pi.partial_order } | ||
|
||
end pi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters