Skip to content

Commit ecd2fdb

Browse files
committed
chore(Algebra/Notation/Pi): improve variable names (#25040)
Stick to using `ι` for the domain of the functions, `M`, `G` for the codomains equipped with a monoid-like or group-like structure, `f`, `g` for the functions themselves, `α`, `β` for the auxiliary types with no particular structure.
1 parent c5f4c4c commit ecd2fdb

File tree

23 files changed

+135
-138
lines changed

23 files changed

+135
-138
lines changed

Mathlib/Algebra/FreeMonoid/Count.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ theorem count_apply [DecidableEq α] (x : α) (l : FreeAddMonoid α) :
5454
count x l = Multiplicative.ofAdd (l.toList.count x) := rfl
5555

5656
theorem count_of [DecidableEq α] (x y : α) :
57-
count x (of y) = Pi.mulSingle (f := fun _ => Multiplicative ℕ) x (Multiplicative.ofAdd 1) y :=
57+
count x (of y) = Pi.mulSingle (M := fun _ => Multiplicative ℕ) x (Multiplicative.ofAdd 1) y :=
5858
by simp only [count, eq_comm, countP_of, ofAdd_zero, Pi.mulSingle_apply]
5959

6060
end FreeMonoid

Mathlib/Algebra/Group/Pi/Basic.lean

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -140,94 +140,92 @@ instance cancelCommMonoid [∀ i, CancelCommMonoid (f i)] : CancelCommMonoid (
140140
{ leftCancelMonoid, commMonoid with }
141141

142142
section
143-
144-
variable [DecidableEq I]
145-
variable [∀ i, One (f i)] [∀ i, One (g i)] [∀ i, One (h i)]
143+
variable {ι : Type*} {M N O : ι → Type*}
144+
variable [DecidableEq ι]
145+
variable [∀ i, One (M i)] [∀ i, One (N i)] [∀ i, One (O i)]
146146

147147
/-- The function supported at `i`, with value `x` there, and `1` elsewhere. -/
148148
@[to_additive "The function supported at `i`, with value `x` there, and `0` elsewhere."]
149-
def mulSingle (i : I) (x : f i) : ∀ (j : I), f j :=
149+
def mulSingle (i : ι) (x : M i) : ∀ j, M j :=
150150
Function.update 1 i x
151151

152152
@[to_additive (attr := simp)]
153-
theorem mulSingle_eq_same (i : I) (x : f i) : mulSingle i x i = x :=
153+
theorem mulSingle_eq_same (i : ι) (x : M i) : mulSingle i x i = x :=
154154
Function.update_self i x _
155155

156156
@[to_additive (attr := simp)]
157-
theorem mulSingle_eq_of_ne {i i' : I} (h : i' ≠ i) (x : f i) : mulSingle i x i' = 1 :=
157+
theorem mulSingle_eq_of_ne {i i' : ι} (h : i' ≠ i) (x : M i) : mulSingle i x i' = 1 :=
158158
Function.update_of_ne h x _
159159

160160
/-- Abbreviation for `mulSingle_eq_of_ne h.symm`, for ease of use by `simp`. -/
161161
@[to_additive (attr := simp)
162162
"Abbreviation for `single_eq_of_ne h.symm`, for ease of use by `simp`."]
163-
theorem mulSingle_eq_of_ne' {i i' : I} (h : i ≠ i') (x : f i) : mulSingle i x i' = 1 :=
163+
theorem mulSingle_eq_of_ne' {i i' : ι} (h : i ≠ i') (x : M i) : mulSingle i x i' = 1 :=
164164
mulSingle_eq_of_ne h.symm x
165165

166166
@[to_additive (attr := simp)]
167-
theorem mulSingle_one (i : I) : mulSingle i (1 : f i) = 1 :=
167+
theorem mulSingle_one (i : ι) : mulSingle i (1 : M i) = 1 :=
168168
Function.update_eq_self _ _
169169

170170
@[to_additive (attr := simp)]
171-
theorem mulSingle_eq_one_iff {i : I} {x : f i} : mulSingle i x = 1 ↔ x = 1 := by
171+
theorem mulSingle_eq_one_iff {i : ι} {x : M i} : mulSingle i x = 1 ↔ x = 1 := by
172172
refine ⟨fun h => ?_, fun h => h.symm ▸ mulSingle_one i⟩
173173
rw [← mulSingle_eq_same i x, h, one_apply]
174174

175175
@[to_additive]
176-
theorem mulSingle_ne_one_iff {i : I} {x : f i} : mulSingle i x ≠ 1 ↔ x ≠ 1 :=
176+
theorem mulSingle_ne_one_iff {i : ι} {x : M i} : mulSingle i x ≠ 1 ↔ x ≠ 1 :=
177177
mulSingle_eq_one_iff.ne
178178

179-
-- Porting note:
180-
-- 1) Why do I have to specify the type of `mulSingle i x` explicitly?
181-
-- 2) Why do I have to specify the type of `(1 : I → β)`?
182-
-- 3) Removed `{β : Sort*}` as `[One β]` converts it to a type anyways.
183-
/-- On non-dependent functions, `Pi.mulSingle` can be expressed as an `ite` -/
184-
@[to_additive "On non-dependent functions, `Pi.single` can be expressed as an `ite`"]
185-
theorem mulSingle_apply [One β] (i : I) (x : β) (i' : I) :
186-
(mulSingle i x : I → β) i' = if i' = i then x else 1 :=
187-
Function.update_apply (1 : I → β) i x i'
188-
189-
-- Porting note: Same as above.
190-
/-- On non-dependent functions, `Pi.mulSingle` is symmetric in the two indices. -/
191-
@[to_additive "On non-dependent functions, `Pi.single` is symmetric in the two indices."]
192-
theorem mulSingle_comm [One β] (i : I) (x : β) (i' : I) :
193-
(mulSingle i x : I → β) i' = (mulSingle i' x : I → β) i := by
194-
simp [mulSingle_apply, eq_comm]
195-
196179
@[to_additive]
197-
theorem apply_mulSingle (f' : ∀ i, f i → g i) (hf' : ∀ i, f' i 1 = 1) (i : I) (x : f i) (j : I) :
180+
theorem apply_mulSingle (f' : ∀ i, M i → N i) (hf' : ∀ i, f' i 1 = 1) (i : ι) (x : M i) (j : ι) :
198181
f' j (mulSingle i x j) = mulSingle i (f' i x) j := by
199182
simpa only [Pi.one_apply, hf', mulSingle] using Function.apply_update f' 1 i x j
200183

201184
@[to_additive apply_single₂]
202-
theorem apply_mulSingle₂ (f' : ∀ i, f i → g i → h i) (hf' : ∀ i, f' i 1 1 = 1) (i : I)
203-
(x : f i) (y : g i) (j : I) :
185+
theorem apply_mulSingle₂ (f' : ∀ i, M i → N i → O i) (hf' : ∀ i, f' i 1 1 = 1) (i : ι)
186+
(x : M i) (y : N i) (j : ι) :
204187
f' j (mulSingle i x j) (mulSingle i y j) = mulSingle i (f' i x y) j := by
205188
by_cases h : j = i
206189
· subst h
207190
simp only [mulSingle_eq_same]
208191
· simp only [mulSingle_eq_of_ne h, hf']
209192

210193
@[to_additive]
211-
theorem mulSingle_op {g : I → Type*} [∀ i, One (g i)] (op : ∀ i, f i → g i)
212-
(h : ∀ i, op i 1 = 1) (i : I) (x : f i) :
194+
theorem mulSingle_op (op : ∀ i, M i → N i) (h : ∀ i, op i 1 = 1) (i : ι) (x : M i) :
213195
mulSingle i (op i x) = fun j => op j (mulSingle i x j) :=
214196
Eq.symm <| funext <| apply_mulSingle op h i x
215197

216198
@[to_additive]
217-
theorem mulSingle_op₂ {g₁ g₂ : I → Type*} [∀ i, One (g₁ i)] [∀ i, One (g₂ i)]
218-
(op : ∀ i, g₁ i → g₂ i → f i) (h : ∀ i, op i 1 1 = 1) (i : I) (x₁ : g₁ i) (x₂ : g₂ i) :
199+
theorem mulSingle_op₂ (op : ∀ i, M i → N i → O i) (h : ∀ i, op i 1 1 = 1) (i : ι) (x₁ : M i)
200+
(x₂ : N i) :
219201
mulSingle i (op i x₁ x₂) = fun j => op j (mulSingle i x₁ j) (mulSingle i x₂ j) :=
220202
Eq.symm <| funext <| apply_mulSingle₂ op h i x₁ x₂
221203

222204
variable (f)
223205

224206
@[to_additive]
225-
theorem mulSingle_injective (i : I) : Function.Injective (mulSingle i : f i → ∀ i, f i) :=
207+
theorem mulSingle_injective (i : ι) : Function.Injective (mulSingle i : M i → ∀ i, M i) :=
226208
Function.update_injective _ i
227209

228210
@[to_additive (attr := simp)]
229-
theorem mulSingle_inj (i : I) {x y : f i} : mulSingle i x = mulSingle i y ↔ x = y :=
230-
(Pi.mulSingle_injective _ _).eq_iff
211+
theorem mulSingle_inj (i : ι) {x y : M i} : mulSingle i x = mulSingle i y ↔ x = y :=
212+
(Pi.mulSingle_injective _).eq_iff
213+
214+
variable {M : Type*} [One M]
215+
216+
-- Porting note: added `(_ : ι → M)`
217+
/-- On non-dependent functions, `Pi.mulSingle` can be expressed as an `ite` -/
218+
@[to_additive "On non-dependent functions, `Pi.single` can be expressed as an `ite`"]
219+
lemma mulSingle_apply (i : ι) (x : M) (i' : ι) :
220+
(mulSingle i x : ι → M) i' = if i' = i then x else 1 :=
221+
Function.update_apply _ i x i'
222+
223+
-- Porting note: added `(_ : ι → M)`
224+
/-- On non-dependent functions, `Pi.mulSingle` is symmetric in the two indices. -/
225+
@[to_additive "On non-dependent functions, `Pi.single` is symmetric in the two indices."]
226+
lemma mulSingle_comm (i : ι) (x : M) (i' : ι) :
227+
(mulSingle i x : ι → M) i' = (mulSingle i' x : ι → M) i := by
228+
simp [mulSingle_apply, eq_comm]
231229

232230
end
233231

Mathlib/Algebra/Group/TypeTags/Basic.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,15 @@ instance Multiplicative.coeToFun {α : Type*} {β : α → Sort*} [CoeFun α β]
458458

459459
lemma Pi.mulSingle_multiplicativeOfAdd_eq {ι : Type*} [DecidableEq ι] {M : ι → Type*}
460460
[(i : ι) → AddMonoid (M i)] (i : ι) (a : M i) (j : ι) :
461-
Pi.mulSingle (f := fun i ↦ Multiplicative (M i)) i (Multiplicative.ofAdd a) j =
462-
Multiplicative.ofAdd ((Pi.single i a) j) := by
461+
Pi.mulSingle (M := fun i ↦ Multiplicative (M i)) i (.ofAdd a) j = .ofAdd (Pi.single i a j) := by
463462
rcases eq_or_ne j i with rfl | h
464463
· simp only [mulSingle_eq_same, single_eq_same]
465464
· simp only [mulSingle, ne_eq, h, not_false_eq_true, Function.update_of_ne, one_apply, single,
466465
zero_apply, ofAdd_zero]
467466

468467
lemma Pi.single_additiveOfMul_eq {ι : Type*} [DecidableEq ι] {M : ι → Type*}
469468
[(i : ι) → Monoid (M i)] (i : ι) (a : M i) (j : ι) :
470-
Pi.single (f := fun i ↦ Additive (M i)) i (Additive.ofMul a) j =
471-
Additive.ofMul ((Pi.mulSingle i a) j) := by
469+
Pi.single (M := fun i ↦ Additive (M i)) i (.ofMul a) j = .ofMul (Pi.mulSingle i a j) := by
472470
rcases eq_or_ne j i with rfl | h
473471
· simp only [mulSingle_eq_same, single_eq_same]
474472
· simp only [single, ne_eq, h, not_false_eq_true, Function.update_of_ne, zero_apply, mulSingle,

Mathlib/Algebra/GroupWithZero/Action/Pi.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ theorem single_smul {α} [Monoid α] [∀ i, AddMonoid <| f i] [∀ i, DistribMu
6767
/-- A version of `Pi.single_smul` for non-dependent functions. It is useful in cases where Lean
6868
fails to apply `Pi.single_smul`. -/
6969
theorem single_smul' {α β} [Monoid α] [AddMonoid β] [DistribMulAction α β] [DecidableEq I] (i : I)
70-
(r : α) (x : β) : single (f := fun _ => β) i (r • x) = r • single (f := fun _ => β) i x :=
70+
(r : α) (x : β) : single (M := fun _ => β) i (r • x) = r • single (M := fun _ => β) i x :=
7171
single_smul (f := fun _ => β) i r x
7272

7373
theorem single_smul₀ {g : I → Type*} [∀ i, MonoidWithZero (f i)] [∀ i, AddMonoid (g i)]

Mathlib/Algebra/MvPolynomial/PDeriv.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ theorem pderiv_one {i : σ} : pderiv i (1 : MvPolynomial σ R) = 0 := pderiv_C
8686

8787
@[simp]
8888
theorem pderiv_X [DecidableEq σ] (i j : σ) :
89-
pderiv i (X j : MvPolynomial σ R) = Pi.single (f := fun _ => _) i 1 j := by
89+
pderiv i (X j : MvPolynomial σ R) = Pi.single (M := fun _ => _) i 1 j := by
9090
rw [pderiv_def, mkDerivation_X]
9191

9292
@[simp]

Mathlib/Algebra/Notation/Pi.lean

Lines changed: 70 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -17,120 +17,121 @@ assert_not_exists Set.range Monoid DenselyOrdered
1717

1818
open Function
1919

20-
universe u v₁ v₂ v₃
21-
22-
variable {I : Type u}
23-
24-
-- The indexing type
25-
variable {α β γ : Type*}
26-
27-
-- The families of types already equipped with instances
28-
variable {f : I → Type v₁} (x y : ∀ i, f i) (i : I)
20+
variable {ι α β : Type*} {G M : ι → Type*}
2921

3022
namespace Pi
3123

3224
/-! `1`, `0`, `+`, `*`, `+ᵥ`, `•`, `^`, `-`, `⁻¹`, and `/` are defined pointwise. -/
3325

26+
section One
27+
variable [∀ i, One (M i)]
28+
3429
@[to_additive]
35-
instance instOne [∀ i, One <| f i] : One (∀ i : I, f i) :=
36-
fun _ => 1
30+
instance instOne : One (∀ i, M i) where one _ := 1
3731

3832
@[to_additive (attr := simp high)]
39-
theorem one_apply [∀ i, One <| f i] : (1 : ∀ i, f i) i = 1 :=
40-
rfl
33+
lemma one_apply (i : ι) : (1 : ∀ i, M i) i = 1 := rfl
4134

4235
@[to_additive]
43-
theorem one_def [∀ i, One <| f i] : (1 : ∀ i, f i) = fun _ => 1 :=
44-
rfl
36+
lemma one_def : (1 : ∀ i, M i) = fun _ ↦ 1 := rfl
4537

46-
@[to_additive (attr := simp)] lemma _root_.Function.const_one [One β] : const α (1 : β) = 1 := rfl
38+
variable {M : Type*} [One M]
4739

48-
@[to_additive (attr := simp)]
49-
theorem one_comp [One γ] (x : α → β) : (1 : β → γ) ∘ x = 1 :=
50-
rfl
40+
@[to_additive (attr := simp)] lemma _root_.Function.const_one : const α (1 : M) = 1 := rfl
5141

52-
@[to_additive (attr := simp)]
53-
theorem comp_one [One β] (x : β → γ) : x ∘ (1 : α → β) = const α (x 1) :=
54-
rfl
42+
@[to_additive (attr := simp)] lemma one_comp (f : α → β) : (1 : β → M) ∘ f = 1 := rfl
43+
@[to_additive (attr := simp)] lemma comp_one (f : M → β) : f ∘ (1 : α → M) = const α (f 1) := rfl
5544

56-
@[to_additive]
57-
instance instMul [∀ i, Mul <| f i] : Mul (∀ i : I, f i) :=
58-
fun f g i => f i * g i⟩
45+
end One
5946

60-
@[to_additive (attr := simp)]
61-
theorem mul_apply [∀ i, Mul <| f i] : (x * y) i = x i * y i :=
62-
rfl
47+
section Mul
48+
variable [∀ i, Mul (M i)]
6349

6450
@[to_additive]
65-
theorem mul_def [∀ i, Mul <| f i] : x * y = fun i => x i * y i :=
66-
rfl
51+
instance instMul : Mul (∀ i, M i) where mul f g i := f i * g i
6752

6853
@[to_additive (attr := simp)]
69-
lemma _root_.Function.const_mul [Mul β] (a b : β) : const α a * const α b = const α (a * b) := rfl
70-
71-
@[to_additive]
72-
theorem mul_comp [Mul γ] (x y : β → γ) (z : α → β) : (x * y) ∘ z = x ∘ z * y ∘ z :=
73-
rfl
54+
lemma mul_apply (f g : ∀ i, M i) (i : ι) : (f * g) i = f i * g i := rfl
7455

7556
@[to_additive]
76-
instance instSMul [∀ i, SMul α <| f i] : SMul α (∀ i : I, f i) :=
77-
fun s x => fun i => s • x i⟩
57+
lemma mul_def (f g : ∀ i, M i) : f * g = fun i ↦ f i * g i := rfl
7858

79-
@[to_additive existing instSMul]
80-
instance instPow [∀ i, Pow (f i) β] : Pow (∀ i, f i) β :=
81-
fun x b i => x i ^ b⟩
59+
variable {M : Type*} [Mul M]
8260

83-
@[to_additive (attr := simp, to_additive) (reorder := 5 6) smul_apply]
84-
theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b :=
85-
rfl
61+
@[to_additive (attr := simp)]
62+
lemma _root_.Function.const_mul (a b : M) : const ι a * const ι b = const ι (a * b) := rfl
8663

87-
@[to_additive (attr := to_additive) (reorder := 5 6) smul_def]
88-
theorem pow_def [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) : x ^ b = fun i => x i ^ b :=
89-
rfl
64+
@[to_additive]
65+
lemma mul_comp (f g : β → M) (z : α → β) : (f * g) ∘ z = f ∘ z * g ∘ z := rfl
9066

91-
@[to_additive (attr := simp, to_additive) (reorder := 2 3, 5 6) smul_const]
92-
lemma _root_.Function.const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b) := rfl
67+
end Mul
9368

94-
@[to_additive (attr := to_additive) (reorder := 6 7) smul_comp]
95-
theorem pow_comp [Pow γ α] (x : β → γ) (a : α) (y : I → β) : (x ^ a) ∘ y = x ∘ y ^ a :=
96-
rfl
69+
section Inv
70+
variable [∀ i, Inv (G i)]
9771

9872
@[to_additive]
99-
instance instInv [∀ i, Inv <| f i] : Inv (∀ i : I, f i) :=
100-
fun f i => (f i)⁻¹⟩
73+
instance instInv : Inv (∀ i, G i) where inv f i := (f i)⁻¹
10174

10275
@[to_additive (attr := simp)]
103-
theorem inv_apply [∀ i, Inv <| f i] : x⁻¹ i = (x i)⁻¹ :=
104-
rfl
76+
lemma inv_apply (f : ∀ i, G i) (i : ι) : f⁻¹ i = (f i)⁻¹ := rfl
10577

10678
@[to_additive]
107-
theorem inv_def [∀ i, Inv <| f i] : x⁻¹ = fun i => (x i)⁻¹ :=
108-
rfl
79+
lemma inv_def (f : ∀ i, G i) : f⁻¹ = fun i ↦ (f i)⁻¹ := rfl
80+
81+
variable {G : Type*} [Inv G]
10982

11083
@[to_additive]
111-
lemma _root_.Function.const_inv [Inv β] (a : β) : (const α a)⁻¹ = const α a⁻¹ := rfl
84+
lemma _root_.Function.const_inv (a : G) : (const ι a)⁻¹ = const ι a⁻¹ := rfl
11285

11386
@[to_additive]
114-
theorem inv_comp [Inv γ] (x : β → γ) (y : α → β) : x⁻¹ ∘ y = (x ∘ y)⁻¹ :=
115-
rfl
87+
lemma inv_comp (f : β → G) (g : α → β) : f⁻¹ ∘ g = (f ∘ g)⁻¹ := rfl
88+
end Inv
89+
90+
section Div
91+
variable [∀ i, Div (G i)]
11692

11793
@[to_additive]
118-
instance instDiv [∀ i, Div <| f i] : Div (∀ i : I, f i) :=
119-
fun f g i => f i / g i⟩
94+
instance instDiv : Div (∀ i, G i) where div f g i := f i / g i
12095

12196
@[to_additive (attr := simp)]
122-
theorem div_apply [∀ i, Div <| f i] : (x / y) i = x i / y i :=
123-
rfl
97+
lemma div_apply (f g : ∀ i, G i) (i : ι) : (f / g) i = f i / g i :=rfl
12498

12599
@[to_additive]
126-
theorem div_def [∀ i, Div <| f i] : x / y = fun i => x i / y i :=
127-
rfl
100+
lemma div_def (f g : ∀ i, G i) : f / g = fun i ↦ f i / g i := rfl
101+
102+
variable {G : Type*} [Div G]
128103

129104
@[to_additive]
130-
theorem div_comp [Div γ] (x y : β → γ) (z : α → β) : (x / y) ∘ z = x ∘ z / y ∘ z :=
131-
rfl
105+
lemma div_comp (f g : β → G) (z : α → β) : (f / g) ∘ z = f ∘ z / g ∘ z := rfl
132106

133107
@[to_additive (attr := simp)]
134-
lemma _root_.Function.const_div [Div β] (a b : β) : const α a / const α b = const α (a / b) := rfl
108+
lemma _root_.Function.const_div (a b : G) : const ι a / const ι b = const ι (a / b) := rfl
109+
110+
end Div
111+
112+
section Pow
113+
114+
@[to_additive]
115+
instance instSMul [∀ i, SMul α (M i)] : SMul α (∀ i, M i) where smul a f i := a • f i
116+
117+
variable [∀ i, Pow (M i) α]
118+
119+
@[to_additive existing instSMul]
120+
instance instPow : Pow (∀ i, M i) α where pow f a i := f i ^ a
121+
122+
@[to_additive (attr := simp, to_additive) (reorder := 5 6) smul_apply]
123+
lemma pow_apply (f : ∀ i, M i) (a : α) (i : ι) : (f ^ a) i = f i ^ a := rfl
124+
125+
@[to_additive (attr := to_additive) (reorder := 5 6) smul_def]
126+
lemma pow_def (f : ∀ i, M i) (a : α) : f ^ a = fun i ↦ f i ^ a := rfl
127+
128+
variable {M : Type*} [Pow M α]
129+
130+
@[to_additive (attr := simp, to_additive) (reorder := 2 3, 5 6) smul_const]
131+
lemma _root_.Function.const_pow (a : M) (b : α) : const ι a ^ b = const ι (a ^ b) := rfl
132+
133+
@[to_additive (attr := to_additive) (reorder := 6 7) smul_comp]
134+
lemma pow_comp (f : β → M) (a : α) (g : ι → β) : (f ^ a) ∘ g = f ∘ g ^ a := rfl
135135

136+
end Pow
136137
end Pi

Mathlib/AlgebraicTopology/SingularSet.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def TopCat.toSSetIsoConst (X : TopCat) [TotallyDisconnectedSpace X] :
7171
TopCat.toSSet.obj X ≅ (Functor.const _).obj X :=
7272
.symm <|
7373
NatIso.ofComponents (fun i ↦
74-
{ inv v := v.1 ⟨Pi.single (I := Fin _) 0 1, (show ∑ _, _ = _ by simp)
74+
{ inv v := v.1 ⟨Pi.single 0 1, show ∑ _, _ = _ by simp⟩
7575
hom x := TopCat.ofHom ⟨fun _ ↦ x, continuous_const⟩
7676
inv_hom_id := types_ext _ _ fun f ↦ TopCat.hom_ext (ContinuousMap.ext
7777
fun j ↦ TotallyDisconnectedSpace.eq_of_continuous (α := i.unop.toTopObj) _ f.1.2 _ _)

Mathlib/AlgebraicTopology/TopologicalSimplex.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ lemma toTopObj_one_coe_add_coe_eq_one (f : ⦋1⦌.toTopObj) : (f 0 : ℝ) + f 1
4646
rw [toTopObj_one_add_eq_one]
4747

4848
instance (x : SimplexCategory) : Nonempty x.toTopObj :=
49-
⟨⟨Pi.single (I := Fin _) 0 1, (show ∑ _, _ = _ by simp)⟩⟩
49+
⟨⟨Pi.single 0 1, (show ∑ _, _ = _ by simp)⟩⟩
5050

5151
instance : Unique ⦋0⦌.toTopObj :=
5252
⟨⟨1, show ∑ _, _ = _ by simp [toType_apply]⟩, fun f ↦ by ext i; fin_cases i; simp⟩

Mathlib/Analysis/Analytic/OfScalars.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ theorem ofScalars_series_eq_iff [Nontrivial E] (c' : ℕ → 𝕜) :
7878
fun e => ofScalars_series_injective 𝕜 E e, _root_.congrArg _⟩
7979

8080
theorem ofScalars_apply_zero (n : ℕ) :
81-
(ofScalars E c n fun _ => 0) = Pi.single (f := fun _ => E) 0 (c 01) n := by
81+
ofScalars E c n (fun _ => 0) = Pi.single (M := fun _ => E) 0 (c 01) n := by
8282
rw [ofScalars]
8383
cases n <;> simp
8484

0 commit comments

Comments
 (0)