Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit a057441

Browse files
committed
feat(order/basic): Notation for order_dual (#13798)
Define `αᵒᵈ` as notation for `order_dual α` and replace current uses. [Zulip poll](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Notation.20for.20order_dual/near/280629129)
1 parent 402e564 commit a057441

File tree

133 files changed

+909
-1096
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+909
-1096
lines changed

src/algebra/big_operators/multiset.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ prod_le_prod_of_rel_le $ rel_map_left.2 $ rel_refl_of_refl_on h
318318

319319
@[to_additive]
320320
lemma prod_le_sum_prod (f : α → α) (h : ∀ x, x ∈ s → x ≤ f x) : s.prod ≤ (s.map f).prod :=
321-
@prod_map_le_prod (order_dual α) _ _ f h
321+
@prod_map_le_prod αᵒᵈ _ _ f h
322322

323323
@[to_additive card_nsmul_le_sum]
324324
lemma pow_card_le_prod (h : ∀ x ∈ s, a ≤ x) : a ^ s.card ≤ s.prod :=

src/algebra/big_operators/order.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ end
161161

162162
@[to_additive sum_eq_zero_iff_of_nonneg]
163163
lemma prod_eq_one_iff_of_le_one' : (∀ i ∈ s, f i ≤ 1) → (∏ i in s, f i = 1 ↔ ∀ i ∈ s, f i = 1) :=
164-
@prod_eq_one_iff_of_one_le' _ (order_dual N) _ _ _
164+
@prod_eq_one_iff_of_one_le' _ Nᵒᵈ _ _ _
165165

166166
@[to_additive single_le_sum]
167167
lemma single_le_prod' (hf : ∀ i ∈ s, 1 ≤ f i) {a} (h : a ∈ s) : f a ≤ (∏ x in s, f x) :=
@@ -181,7 +181,7 @@ end
181181
@[to_additive card_nsmul_le_sum]
182182
lemma pow_card_le_prod (s : finset ι) (f : ι → N) (n : N) (h : ∀ x ∈ s, n ≤ f x) :
183183
n ^ s.card ≤ s.prod f :=
184-
@finset.prod_le_pow_card _ (order_dual N) _ _ _ _ h
184+
@finset.prod_le_pow_card _ Nᵒᵈ _ _ _ _ h
185185

186186
lemma card_bUnion_le_card_mul [decidable_eq β] (s : finset ι) (f : ι → finset β) (n : ℕ)
187187
(h : ∀ a ∈ s, (f a).card ≤ n) :
@@ -204,7 +204,7 @@ calc (∏ y in t, ∏ x in s.filter (λ x, g x = y), f x) ≤
204204
lemma prod_le_prod_fiberwise_of_prod_fiber_le_one' {t : finset ι'}
205205
{g : ι → ι'} {f : ι → N} (h : ∀ y ∉ t, (∏ x in s.filter (λ x, g x = y), f x) ≤ 1) :
206206
(∏ x in s, f x) ≤ ∏ y in t, ∏ x in s.filter (λ x, g x = y), f x :=
207-
@prod_fiberwise_le_prod_of_one_le_prod_fiber' _ (order_dual N) _ _ _ _ _ _ _ h
207+
@prod_fiberwise_le_prod_of_one_le_prod_fiber' _ Nᵒᵈ _ _ _ _ _ _ _ h
208208

209209
end ordered_comm_monoid
210210

src/algebra/bounds.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ image2_subset_iff.2 $ λ x hx y hy, mul_mem_upper_bounds_mul hx hy
6969

7070
@[to_additive] lemma mul_mem_lower_bounds_mul {s t : set M} {a b : M} (ha : a ∈ lower_bounds s)
7171
(hb : b ∈ lower_bounds t) : a * b ∈ lower_bounds (s * t) :=
72-
@mul_mem_upper_bounds_mul (order_dual M) _ _ _ _ _ _ _ _ ha hb
72+
@mul_mem_upper_bounds_mul Mᵒᵈ _ _ _ _ _ _ _ _ ha hb
7373

7474
@[to_additive] lemma subset_lower_bounds_mul (s t : set M) :
7575
lower_bounds s * lower_bounds t ⊆ lower_bounds (s * t) :=
76-
@subset_upper_bounds_mul (order_dual M) _ _ _ _ _ _
76+
@subset_upper_bounds_mul Mᵒᵈ _ _ _ _ _ _
7777

7878
@[to_additive] lemma bdd_above.mul {s t : set M} (hs : bdd_above s) (ht : bdd_above t) :
7979
bdd_above (s * t) :=

src/algebra/group_power/order.lean

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ theorem one_le_pow_of_one_le' {a : M} (H : 1 ≤ a) : ∀ n : ℕ, 1 ≤ a ^ n
3434
| (k + 1) := by { rw pow_succ, exact one_le_mul H (one_le_pow_of_one_le' k) }
3535

3636
@[to_additive nsmul_nonpos]
37-
theorem pow_le_one' {a : M} (H : a ≤ 1) (n : ℕ) : a ^ n ≤ 1 :=
38-
@one_le_pow_of_one_le' (order_dual M) _ _ _ _ H n
37+
lemma pow_le_one' {a : M} (H : a ≤ 1) (n : ℕ) : a ^ n ≤ 1 := @one_le_pow_of_one_le' Mᵒᵈ _ _ _ _ H n
3938

4039
@[to_additive nsmul_le_nsmul]
4140
theorem pow_le_pow' {a : M} {n m : ℕ} (ha : 1 ≤ a) (h : n ≤ m) : a ^ n ≤ a ^ m :=
@@ -45,7 +44,7 @@ calc a ^ n ≤ a ^ n * a ^ k : le_mul_of_one_le_right' (one_le_pow_of_one_le' ha
4544

4645
@[to_additive nsmul_le_nsmul_of_nonpos]
4746
theorem pow_le_pow_of_le_one' {a : M} {n m : ℕ} (ha : a ≤ 1) (h : n ≤ m) : a ^ m ≤ a ^ n :=
48-
@pow_le_pow' (order_dual M) _ _ _ _ _ _ ha h
47+
@pow_le_pow' Mᵒᵈ _ _ _ _ _ _ ha h
4948

5049
@[to_additive nsmul_pos]
5150
theorem one_lt_pow' {a : M} (ha : 1 < a) {k : ℕ} (hk : k ≠ 0) : 1 < a ^ k :=
@@ -59,8 +58,8 @@ begin
5958
end
6059

6160
@[to_additive nsmul_neg]
62-
theorem pow_lt_one' {a : M} (ha : a < 1) {k : ℕ} (hk : k ≠ 0) : a ^ k < 1 :=
63-
@one_lt_pow' (order_dual M) _ _ _ _ ha k hk
61+
lemma pow_lt_one' {a : M} (ha : a < 1) {k : ℕ} (hk : k ≠ 0) : a ^ k < 1 :=
62+
@one_lt_pow' Mᵒᵈ _ _ _ _ ha k hk
6463

6564
@[to_additive nsmul_lt_nsmul]
6665
theorem pow_lt_pow' [covariant_class M M (*) (<)] {a : M} {n m : ℕ} (ha : 1 < a) (h : n < m) :
@@ -88,7 +87,7 @@ lemma one_le_pow_iff {x : M} {n : ℕ} (hn : n ≠ 0) : 1 ≤ x ^ n ↔ 1 ≤ x
8887

8988
@[to_additive]
9089
lemma pow_le_one_iff {x : M} {n : ℕ} (hn : n ≠ 0) : x ^ n ≤ 1 ↔ x ≤ 1 :=
91-
@one_le_pow_iff (order_dual M) _ _ _ _ _ hn
90+
@one_le_pow_iff Mᵒᵈ _ _ _ _ _ hn
9291

9392
@[to_additive nsmul_pos_iff]
9493
lemma one_lt_pow_iff {x : M} {n : ℕ} (hn : n ≠ 0) : 1 < x ^ n ↔ 1 < x :=

src/algebra/indicator_function.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ end
482482

483483
@[to_additive] lemma le_mul_indicator_apply {y} (hfg : a ∈ s → y ≤ g a) (hf : a ∉ s → y ≤ 1) :
484484
y ≤ mul_indicator s g a :=
485-
@mul_indicator_apply_le' α (order_dual M) ‹_› _ _ _ _ _ hfg hf
485+
@mul_indicator_apply_le' α Mᵒᵈ ‹_› _ _ _ _ _ hfg hf
486486

487487
@[to_additive] lemma le_mul_indicator (hfg : ∀ a ∈ s, f a ≤ g a) (hf : ∀ a ∉ s, f a ≤ 1) :
488488
f ≤ mul_indicator s g :=
@@ -573,7 +573,7 @@ end
573573

574574
lemma indicator_nonpos_le_indicator {β} [linear_order β] [has_zero β] (s : set α) (f : α → β) :
575575
{x | f x ≤ 0}.indicator f ≤ s.indicator f :=
576-
@indicator_le_indicator_nonneg α (order_dual β) _ _ s f
576+
@indicator_le_indicator_nonneg α βᵒᵈ _ _ s f
577577

578578
end set
579579

src/algebra/order/archimedean.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ such that `0 < y` there exists a natural number `n` such that `x ≤ n • y`. -
3737
class archimedean (α) [ordered_add_comm_monoid α] : Prop :=
3838
(arch : ∀ (x : α) {y}, 0 < y → ∃ n : ℕ, x ≤ n • y)
3939

40-
instance order_dual.archimedean [ordered_add_comm_group α] [archimedean α] :
41-
archimedean (order_dual α) :=
40+
instance order_dual.archimedean [ordered_add_comm_group α] [archimedean α] : archimedean αᵒᵈ :=
4241
⟨λ x y hy, let ⟨n, hn⟩ := archimedean.arch (-x : α) (neg_pos.2 hy) in
4342
⟨n, by rwa [neg_nsmul, neg_le_neg_iff] at hn⟩⟩
4443

src/algebra/order/field.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,11 +706,11 @@ eq.symm $ monotone.map_max (λ x y, div_le_div_of_le hc)
706706

707707
lemma min_div_div_right_of_nonpos {c : α} (hc : c ≤ 0) (a b : α) :
708708
min (a / c) (b / c) = (max a b) / c :=
709-
eq.symm $ @monotone.map_max α (order_dual α) _ _ _ _ _ (λ x y, div_le_div_of_nonpos_of_le hc)
709+
eq.symm $ @monotone.map_max α αᵒᵈ _ _ _ _ _ (λ x y, div_le_div_of_nonpos_of_le hc)
710710

711711
lemma max_div_div_right_of_nonpos {c : α} (hc : c ≤ 0) (a b : α) :
712712
max (a / c) (b / c) = (min a b) / c :=
713-
eq.symm $ @monotone.map_min α (order_dual α) _ _ _ _ _ (λ x y, div_le_div_of_nonpos_of_le hc)
713+
eq.symm $ @monotone.map_min α αᵒᵈ _ _ _ _ _ (λ x y, div_le_div_of_nonpos_of_le hc)
714714

715715
lemma abs_div (a b : α) : |a / b| = |a| / |b| := (abs_hom : α →*₀ α).map_div a b
716716

src/algebra/order/group.lean

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ instance ordered_comm_group.has_exists_mul_of_le (α : Type u)
9191
has_exists_mul_of_le α :=
9292
⟨λ a b hab, ⟨b * a⁻¹, (mul_inv_cancel_comm_assoc a b).symm⟩⟩
9393

94-
@[to_additive] instance [h : has_inv α] : has_inv (order_dual α) := h
95-
@[to_additive] instance [h : has_div α] : has_div (order_dual α) := h
96-
@[to_additive] instance [h : has_involutive_inv α] : has_involutive_inv (order_dual α) := h
97-
@[to_additive] instance [h : div_inv_monoid α] : div_inv_monoid (order_dual α) := h
98-
@[to_additive] instance [h : group α] : group (order_dual α) := h
99-
@[to_additive] instance [h : comm_group α] : comm_group (order_dual α) := h
100-
101-
@[to_additive] instance [ordered_comm_group α] : ordered_comm_group (order_dual α) :=
94+
@[to_additive] instance [h : has_inv α] : has_inv αᵒᵈ := h
95+
@[to_additive] instance [h : has_div α] : has_div αᵒᵈ := h
96+
@[to_additive] instance [h : has_involutive_inv α] : has_involutive_inv αᵒᵈ := h
97+
@[to_additive] instance [h : div_inv_monoid α] : div_inv_monoid αᵒᵈ := h
98+
@[to_additive] instance [h : group α] : group αᵒᵈ := h
99+
@[to_additive] instance [h : comm_group α] : comm_group αᵒᵈ := h
100+
101+
@[to_additive] instance [ordered_comm_group α] : ordered_comm_group αᵒᵈ :=
102102
{ .. order_dual.ordered_comm_monoid, .. order_dual.group }
103103

104104
section group
@@ -292,7 +292,7 @@ variable (α)
292292

293293
/-- `x ↦ x⁻¹` as an order-reversing equivalence. -/
294294
@[to_additive "`x ↦ -x` as an order-reversing equivalence.", simps]
295-
def order_iso.inv : α ≃o order_dual α :=
295+
def order_iso.inv : α ≃o αᵒᵈ :=
296296
{ to_equiv := (equiv.inv α).trans order_dual.to_dual,
297297
map_rel_iff' := λ a b, @inv_le_inv_iff α _ _ _ _ _ _ }
298298

@@ -853,7 +853,7 @@ calc a ≤ b * (b⁻¹ * c) : h _ (lt_inv_mul_iff_lt.mpr hc)
853853

854854
@[to_additive]
855855
lemma le_of_forall_lt_one_mul_le (h : ∀ ε < 1, a * ε ≤ b) : a ≤ b :=
856-
@le_of_forall_one_lt_le_mul (order_dual α) _ _ _ _ _ _ h
856+
@le_of_forall_one_lt_le_mul αᵒᵈ _ _ _ _ _ _ h
857857

858858
@[to_additive]
859859
lemma le_of_forall_one_lt_div_le (h : ∀ ε : α, 1 < ε → a / ε ≤ b) : a ≤ b :=
@@ -866,7 +866,7 @@ lemma le_iff_forall_one_lt_le_mul : a ≤ b ↔ ∀ ε, 1 < ε → a ≤ b * ε
866866

867867
@[to_additive]
868868
lemma le_iff_forall_lt_one_mul_le : a ≤ b ↔ ∀ ε < 1, a * ε ≤ b :=
869-
@le_iff_forall_one_lt_le_mul (order_dual α) _ _ _ _ _ _
869+
@le_iff_forall_one_lt_le_mul αᵒᵈ _ _ _ _ _ _
870870

871871
end densely_ordered
872872

@@ -897,7 +897,7 @@ multiplication is monotone. -/
897897
class linear_ordered_comm_group (α : Type u) extends ordered_comm_group α, linear_order α
898898

899899
@[to_additive] instance [linear_ordered_comm_group α] :
900-
linear_ordered_comm_group (order_dual α) :=
900+
linear_ordered_comm_group αᵒᵈ :=
901901
{ .. order_dual.ordered_comm_group, .. order_dual.linear_order α }
902902

903903
section linear_ordered_comm_group
@@ -933,11 +933,11 @@ mul_lt_mul_left' h c
933933

934934
@[to_additive min_neg_neg]
935935
lemma min_inv_inv' (a b : α) : min (a⁻¹) (b⁻¹) = (max a b)⁻¹ :=
936-
eq.symm $ @monotone.map_max α (order_dual α) _ _ has_inv.inv a b $ λ a b, inv_le_inv_iff.mpr
936+
eq.symm $ @monotone.map_max α αᵒᵈ _ _ has_inv.inv a b $ λ a b, inv_le_inv_iff.mpr
937937

938938
@[to_additive max_neg_neg]
939939
lemma max_inv_inv' (a b : α) : max (a⁻¹) (b⁻¹) = (min a b)⁻¹ :=
940-
eq.symm $ @monotone.map_min α (order_dual α) _ _ has_inv.inv a b $ λ a b, inv_le_inv_iff.mpr
940+
eq.symm $ @monotone.map_min α αᵒᵈ _ _ has_inv.inv a b $ λ a b, inv_le_inv_iff.mpr
941941

942942
@[to_additive min_sub_sub_right]
943943
lemma min_div_div_right' (a b c : α) : min (a / c) (b / c) = min a b / c :=

src/algebra/order/module.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variables {k M N : Type*}
2929

3030
namespace order_dual
3131

32-
instance [semiring k] [ordered_add_comm_monoid M] [module k M] : module k (order_dual M) :=
32+
instance [semiring k] [ordered_add_comm_monoid M] [module k M] : module k Mᵒᵈ :=
3333
{ add_smul := λ r s x, order_dual.rec (add_smul _ _) x,
3434
zero_smul := λ m, order_dual.rec (zero_smul _) m }
3535

@@ -110,7 +110,7 @@ calc
110110
... = 0 : smul_zero' M c
111111

112112
lemma smul_nonneg_of_nonpos_of_nonpos (hc : c ≤ 0) (ha : a ≤ 0) : 0 ≤ c • a :=
113-
@smul_nonpos_of_nonpos_of_nonneg k (order_dual M) _ _ _ _ _ _ hc ha
113+
@smul_nonpos_of_nonpos_of_nonneg k Mᵒᵈ _ _ _ _ _ _ hc ha
114114

115115
alias smul_pos_iff_of_neg ↔ _ smul_pos_of_neg_of_neg
116116
alias smul_neg_iff_of_pos ↔ _ smul_neg_of_pos_of_neg
@@ -149,7 +149,7 @@ end
149149
variables (M)
150150

151151
/-- Left scalar multiplication as an order isomorphism. -/
152-
@[simps] def order_iso.smul_left_dual {c : k} (hc : c < 0) : M ≃o order_dual M :=
152+
@[simps] def order_iso.smul_left_dual {c : k} (hc : c < 0) : M ≃o Mᵒᵈ :=
153153
{ to_fun := λ b, order_dual.to_dual (c • b),
154154
inv_fun := λ b, c⁻¹ • (order_dual.of_dual b),
155155
left_inv := inv_smul_smul₀ hc.ne,

0 commit comments

Comments
 (0)