@@ -68,11 +68,11 @@ theorem mk.inj_iff {a₁ a₂ : α} {b₁ b₂ : β} : (a₁, b₁) = (a₂, b
68
68
by intro hab; rw [hab.left, hab.right]⟩
69
69
70
70
lemma mk.inj_left {α β : Type _} (a : α) :
71
- Function.injective (Prod.mk a : β → α × β) :=
71
+ Function.Injective (Prod.mk a : β → α × β) :=
72
72
fun _ _ h => (Prod.mk.inj h).right
73
73
74
74
lemma mk.inj_right {α β : Type _} (b : β) :
75
- Function.injective (λ a => Prod.mk a b : α → α × β) :=
75
+ Function.Injective (λ a => Prod.mk a b : α → α × β) :=
76
76
fun _ _ h => (Prod.mk.inj h).left
77
77
78
78
-- Port note: this lemma comes from lean3/library/init/data/prod.lean.
@@ -94,16 +94,16 @@ by ext <;> simp
94
94
lemma id_prod : (λ (p : α × α) => (p.1 , p.2 )) = id :=
95
95
funext $ λ ⟨_, _⟩ => rfl
96
96
97
- lemma fst_surjective [h : Nonempty β] : Function.surjective (@fst α β) :=
97
+ lemma fst_surjective [h : Nonempty β] : Function.Surjective (@fst α β) :=
98
98
λ x => h.elim $ λ y => ⟨⟨x, y⟩, rfl⟩
99
99
100
- lemma snd_surjective [h : Nonempty α] : Function.surjective (@snd α β) :=
100
+ lemma snd_surjective [h : Nonempty α] : Function.Surjective (@snd α β) :=
101
101
λ y => h.elim $ λ x => ⟨⟨x, y⟩, rfl⟩
102
102
103
- lemma fst_injective [Subsingleton β] : Function.injective (@fst α β) :=
103
+ lemma fst_injective [Subsingleton β] : Function.Injective (@fst α β) :=
104
104
λ x y h => ext' h (Subsingleton.elim x.snd y.snd)
105
105
106
- lemma snd_injective [Subsingleton α] : Function.injective (@snd α β) :=
106
+ lemma snd_injective [Subsingleton α] : Function.Injective (@snd α β) :=
107
107
λ _ _ h => ext' (Subsingleton.elim _ _) h
108
108
109
109
/-- Swap the factors of a product. `swap (a, b) = (b, a)` -/
@@ -127,13 +127,13 @@ swap_swap
127
127
lemma swap_RightInverse : Function.RightInverse (@swap α β) swap :=
128
128
swap_swap
129
129
130
- lemma swap_injective : Function.injective (@swap α β) :=
130
+ lemma swap_injective : Function.Injective (@swap α β) :=
131
131
swap_LeftInverse.injective
132
132
133
- lemma swap_surjective : Function.surjective (@swap α β) :=
133
+ lemma swap_surjective : Function.Surjective (@swap α β) :=
134
134
Function.RightInverse.surjective swap_LeftInverse
135
135
136
- lemma swap_bijective : Function.bijective (@swap α β) :=
136
+ lemma swap_bijective : Function.Bijective (@swap α β) :=
137
137
⟨swap_injective, swap_surjective⟩
138
138
139
139
@[simp] lemma swap_inj {p q : α × β} : swap p = swap q ↔ p = q :=
@@ -167,17 +167,17 @@ end Prod
167
167
168
168
open Function
169
169
170
- lemma Function.injective .prod_map {f : α → γ} {g : β → δ} (hf : injective f) (hg : injective g) :
171
- injective (Prod.map f g) :=
170
+ lemma Function.Injective .prod_map {f : α → γ} {g : β → δ} (hf : Injective f) (hg : Injective g) :
171
+ Injective (Prod.map f g) :=
172
172
by intros x y h
173
173
have h1 := (Prod.ext_iff.1 h).1
174
174
rw [Prod.map_fst, Prod.map_fst] at h1
175
175
have h2 := (Prod.ext_iff.1 h).2
176
176
rw [Prod.map_snd, Prod.map_snd] at h2
177
177
exact Prod.ext' (hf h1) (hg h2)
178
178
179
- lemma Function.surjective .prod_map {f : α → γ} {g : β → δ} (hf : surjective f) (hg : surjective g) :
180
- surjective (Prod.map f g) :=
179
+ lemma Function.Surjective .prod_map {f : α → γ} {g : β → δ} (hf : Surjective f) (hg : Surjective g) :
180
+ Surjective (Prod.map f g) :=
181
181
λ p => let ⟨x, hx⟩ := hf p.1
182
182
let ⟨y, hy⟩ := hg p.2
183
183
⟨(x, y), Prod.ext' hx hy⟩
0 commit comments