@@ -38,6 +38,8 @@ instance has_mul [∀ i, has_mul $ f i] :
38
38
⟨λ f g i, f i * g i⟩
39
39
@[simp, to_additive] lemma mul_apply [∀ i, has_mul $ f i] : (x * y) i = x i * y i := rfl
40
40
41
+ @[to_additive] lemma mul_def [Π i, has_mul $ f i] : x * y = λ i, x i * y i := rfl
42
+
41
43
@[to_additive] instance has_inv [∀ i, has_inv $ f i] :
42
44
has_inv (Π i : I, f i) :=
43
45
⟨λ f i, (f i)⁻¹⟩
@@ -58,14 +60,15 @@ variables [Π i, has_zero (f i)] [Π i, has_zero (g i)] [Π i, has_zero (h i)]
58
60
def single (i : I) (x : f i) : Π i, f i :=
59
61
function.update 0 i x
60
62
61
- @[simp]
62
- lemma single_eq_same (i : I) (x : f i) : single i x i = x :=
63
+ @[simp] lemma single_eq_same (i : I) (x : f i) : single i x i = x :=
63
64
function.update_same i x _
64
65
65
- @[simp]
66
- lemma single_eq_of_ne {i i' : I} (h : i' ≠ i) (x : f i) : single i x i' = 0 :=
66
+ @[simp] lemma single_eq_of_ne {i i' : I} (h : i' ≠ i) (x : f i) : single i x i' = 0 :=
67
67
function.update_noteq h x _
68
68
69
+ @[simp] lemma single_zero (i : I) : single i (0 : f i) = 0 :=
70
+ function.update_eq_self _ _
71
+
69
72
lemma apply_single (f' : Π i, f i → g i) (hf' : ∀ i, f' i 0 = 0 ) (i : I) (x : f i) (j : I):
70
73
f' j (single i x j) = single i (f' i x) j :=
71
74
by simpa only [pi.zero_apply, hf', single] using function.apply_update f' 0 i x j
@@ -75,10 +78,20 @@ lemma apply_single₂ (f' : Π i, f i → g i → h i) (hf' : ∀ i, f' i 0 0 =
75
78
f' j (single i x j) (single i y j) = single i (f' i x y) j :=
76
79
begin
77
80
by_cases h : j = i,
78
- { subst h, simp only [single_eq_same], },
79
- { simp only [h, single_eq_of_ne, ne.def, not_false_iff, hf'], },
81
+ { subst h, simp only [single_eq_same] },
82
+ { simp only [single_eq_of_ne h, hf'] },
80
83
end
81
84
85
+ lemma single_op {g : I → Type *} [Π i, has_zero (g i)] (op : Π i, f i → g i) (h : ∀ i, op i 0 = 0 )
86
+ (i : I) (x : f i) :
87
+ single i (op i x) = λ j, op j (single i x j) :=
88
+ eq.symm $ funext $ apply_single op h i x
89
+
90
+ lemma single_op₂ {g₁ g₂ : I → Type *} [Π i, has_zero (g₁ i)] [Π i, has_zero (g₂ i)]
91
+ (op : Π i, g₁ i → g₂ i → f i) (h : ∀ i, op i 0 0 = 0 ) (i : I) (x₁ : g₁ i) (x₂ : g₂ i) :
92
+ single i (op i x₁ x₂) = λ j, op j (single i x₁ j) (single i x₂ j) :=
93
+ eq.symm $ funext $ apply_single₂ op h i x₁ x₂
94
+
82
95
variables (f)
83
96
84
97
lemma single_injective (i : I) : function.injective (single i : f i → Π i, f i) :=
0 commit comments