@@ -191,7 +191,7 @@ theorem cantor_surjective {α} (f : α → Set α) : ¬ Function.surjective f
191
191
theorem cantor_injective {α : Type _} (f : (Set α) → α) :
192
192
¬ Function.injective f
193
193
| i => cantor_surjective (λ a b => ∀ U, a = f U → U b) $
194
- right_inverse .surjective
194
+ RightInverse .surjective
195
195
(λ U => funext $ λ a => propext ⟨λ h => h U rfl, λ h' U' e => i e ▸ h'⟩)
196
196
197
197
/-- `g` is a partial inverse to `f` (an injective but not necessarily
@@ -211,42 +211,42 @@ theorem injective_of_partial_inv_right {α β} {f : α → β} {g} (H : is_parti
211
211
(x y b) (h₁ : g x = some b) (h₂ : g y = some b) : x = y :=
212
212
((H _ _).1 h₁).symm.trans ((H _ _).1 h₂)
213
213
214
- theorem left_inverse .comp_eq_id {f : α → β} {g : β → α} (h : left_inverse f g) : f ∘ g = id :=
214
+ theorem LeftInverse .comp_eq_id {f : α → β} {g : β → α} (h : LeftInverse f g) : f ∘ g = id :=
215
215
funext h
216
216
217
- theorem left_inverse_iff_comp {f : α → β} {g : β → α} : left_inverse f g ↔ f ∘ g = id :=
218
- ⟨left_inverse .comp_eq_id, congr_fun⟩
217
+ theorem LeftInverse_iff_comp {f : α → β} {g : β → α} : LeftInverse f g ↔ f ∘ g = id :=
218
+ ⟨LeftInverse .comp_eq_id, congr_fun⟩
219
219
220
- theorem right_inverse .comp_eq_id {f : α → β} {g : β → α} (h : right_inverse f g) : g ∘ f = id :=
220
+ theorem RightInverse .comp_eq_id {f : α → β} {g : β → α} (h : RightInverse f g) : g ∘ f = id :=
221
221
funext h
222
222
223
- theorem right_inverse_iff_comp {f : α → β} {g : β → α} : right_inverse f g ↔ g ∘ f = id :=
224
- ⟨right_inverse .comp_eq_id, congr_fun⟩
223
+ theorem RightInverse_iff_comp {f : α → β} {g : β → α} : RightInverse f g ↔ g ∘ f = id :=
224
+ ⟨RightInverse .comp_eq_id, congr_fun⟩
225
225
226
- theorem left_inverse .comp {f : α → β} {g : β → α} {h : β → γ} {i : γ → β}
227
- (hf : left_inverse f g) (hh : left_inverse h i) : left_inverse (h ∘ f) (g ∘ i) :=
226
+ theorem LeftInverse .comp {f : α → β} {g : β → α} {h : β → γ} {i : γ → β}
227
+ (hf : LeftInverse f g) (hh : LeftInverse h i) : LeftInverse (h ∘ f) (g ∘ i) :=
228
228
λ a => show h (f (g (i a))) = a by rw [hf (i a), hh a]
229
229
230
- theorem right_inverse .comp {f : α → β} {g : β → α} {h : β → γ} {i : γ → β}
231
- (hf : right_inverse f g) (hh : right_inverse h i) : right_inverse (h ∘ f) (g ∘ i) :=
232
- left_inverse .comp hh hf
230
+ theorem RightInverse .comp {f : α → β} {g : β → α} {h : β → γ} {i : γ → β}
231
+ (hf : RightInverse f g) (hh : RightInverse h i) : RightInverse (h ∘ f) (g ∘ i) :=
232
+ LeftInverse .comp hh hf
233
233
234
- theorem left_inverse.right_inverse {f : α → β} {g : β → α} (h : left_inverse g f) :
235
- right_inverse f g := h
234
+ theorem LeftInverse.RightInverse {f : α → β} {g : β → α} (h : LeftInverse g f) :
235
+ RightInverse f g := h
236
236
237
- theorem right_inverse.left_inverse {f : α → β} {g : β → α} (h : right_inverse g f) :
238
- left_inverse f g := h
237
+ theorem RightInverse.LeftInverse {f : α → β} {g : β → α} (h : RightInverse g f) :
238
+ LeftInverse f g := h
239
239
240
- theorem left_inverse .surjective {f : α → β} {g : β → α} (h : left_inverse f g) :
240
+ theorem LeftInverse .surjective {f : α → β} {g : β → α} (h : LeftInverse f g) :
241
241
surjective f :=
242
- h.right_inverse .surjective
242
+ h.RightInverse .surjective
243
243
244
- theorem right_inverse .injective {f : α → β} {g : β → α} (h : right_inverse f g) :
244
+ theorem RightInverse .injective {f : α → β} {g : β → α} (h : RightInverse f g) :
245
245
injective f :=
246
- h.left_inverse .injective
246
+ h.LeftInverse .injective
247
247
248
- theorem left_inverse.eq_right_inverse {f : α → β} {g₁ g₂ : β → α} (h₁ : left_inverse g₁ f)
249
- (h₂ : Function.right_inverse g₂ f) :
248
+ theorem LeftInverse.eq_RightInverse {f : α → β} {g₁ g₂ : β → α} (h₁ : LeftInverse g₁ f)
249
+ (h₂ : Function.RightInverse g₂ f) :
250
250
g₁ = g₂ := by
251
251
have h₃ : g₁ = g₁ ∘ f ∘ g₂ := by rw [h₂.comp_eq_id, comp.right_id]
252
252
have h₄ : g₁ ∘ f ∘ g₂ = g₂ := by rw [← comp.assoc, h₁.comp_eq_id, comp.left_id]
@@ -318,33 +318,33 @@ inv_fun_on_eq $ let ⟨a, ha⟩ := h
318
318
lemma inv_fun_neg (h : ¬ ∃ a, f a = b) : inv_fun f b = Classical.choice n :=
319
319
by refine inv_fun_on_neg (mt ?_ h); exact λ ⟨a, _, ha⟩ => ⟨a, ha⟩
320
320
321
- theorem inv_fun_eq_of_injective_of_right_inverse {g : β → α}
322
- (hf : injective f) (hg : right_inverse g f) : inv_fun f = g :=
321
+ theorem inv_fun_eq_of_injective_of_RightInverse {g : β → α}
322
+ (hf : injective f) (hg : RightInverse g f) : inv_fun f = g :=
323
323
funext $ λ b => hf (by rw [hg b]
324
324
exact inv_fun_eq ⟨g b, hg b⟩)
325
325
326
- lemma right_inverse_inv_fun (hf : surjective f) : right_inverse (inv_fun f) f :=
326
+ lemma RightInverse_inv_fun (hf : surjective f) : RightInverse (inv_fun f) f :=
327
327
λ b => inv_fun_eq $ hf b
328
328
329
- lemma left_inverse_inv_fun (hf : injective f) : left_inverse (inv_fun f) f :=
329
+ lemma LeftInverse_inv_fun (hf : injective f) : LeftInverse (inv_fun f) f :=
330
330
λ b => have : f (inv_fun f (f b)) = f b := inv_fun_eq ⟨b, rfl⟩
331
331
hf this
332
332
333
333
lemma inv_fun_surjective (hf : injective f) : surjective (inv_fun f) :=
334
- (left_inverse_inv_fun hf).surjective
334
+ (LeftInverse_inv_fun hf).surjective
335
335
336
- lemma inv_fun_comp (hf : injective f) : inv_fun f ∘ f = id := funext $ left_inverse_inv_fun hf
336
+ lemma inv_fun_comp (hf : injective f) : inv_fun f ∘ f = id := funext $ LeftInverse_inv_fun hf
337
337
338
338
end inv_fun
339
339
340
340
section inv_fun
341
341
variable {α : Type u} [i : Nonempty α] {β : Sort v} {f : α → β}
342
342
343
- lemma injective.has_left_inverse (hf : injective f) : has_left_inverse f :=
344
- ⟨inv_fun f, left_inverse_inv_fun hf⟩
343
+ lemma injective.has_LeftInverse (hf : injective f) : has_LeftInverse f :=
344
+ ⟨inv_fun f, LeftInverse_inv_fun hf⟩
345
345
346
- lemma injective_iff_has_left_inverse : injective f ↔ has_left_inverse f :=
347
- ⟨injective.has_left_inverse, has_left_inverse .injective⟩
346
+ lemma injective_iff_has_LeftInverse : injective f ↔ has_LeftInverse f :=
347
+ ⟨injective.has_LeftInverse, has_LeftInverse .injective⟩
348
348
349
349
end inv_fun
350
350
@@ -357,24 +357,24 @@ noncomputable def surj_inv {f : α → β} (h : surjective f) (b : β) : α := C
357
357
358
358
lemma surj_inv_eq (h : surjective f) (b) : f (surj_inv h b) = b := Classical.choose_spec (h b)
359
359
360
- lemma right_inverse_surj_inv (hf : surjective f) : right_inverse (surj_inv hf) f :=
360
+ lemma RightInverse_surj_inv (hf : surjective f) : RightInverse (surj_inv hf) f :=
361
361
surj_inv_eq hf
362
362
363
- lemma left_inverse_surj_inv (hf : bijective f) : left_inverse (surj_inv hf.2 ) f :=
364
- right_inverse_of_injective_of_left_inverse hf.1 (right_inverse_surj_inv hf.2 )
363
+ lemma LeftInverse_surj_inv (hf : bijective f) : LeftInverse (surj_inv hf.2 ) f :=
364
+ RightInverse_of_injective_of_LeftInverse hf.1 (RightInverse_surj_inv hf.2 )
365
365
366
- lemma surjective.has_right_inverse (hf : surjective f) : has_right_inverse f :=
367
- ⟨_, right_inverse_surj_inv hf⟩
366
+ lemma surjective.has_RightInverse (hf : surjective f) : has_RightInverse f :=
367
+ ⟨_, RightInverse_surj_inv hf⟩
368
368
369
- lemma surjective_iff_has_right_inverse : surjective f ↔ has_right_inverse f :=
370
- ⟨surjective.has_right_inverse, has_right_inverse .surjective⟩
369
+ lemma surjective_iff_has_RightInverse : surjective f ↔ has_RightInverse f :=
370
+ ⟨surjective.has_RightInverse, has_RightInverse .surjective⟩
371
371
372
- lemma bijective_iff_has_inverse : bijective f ↔ ∃ g, left_inverse g f ∧ right_inverse g f :=
373
- ⟨λ hf => ⟨_, left_inverse_surj_inv hf, right_inverse_surj_inv hf.2 ⟩,
372
+ lemma bijective_iff_has_inverse : bijective f ↔ ∃ g, LeftInverse g f ∧ RightInverse g f :=
373
+ ⟨λ hf => ⟨_, LeftInverse_surj_inv hf, RightInverse_surj_inv hf.2 ⟩,
374
374
λ ⟨g, gl, gr⟩ => ⟨gl.injective, gr.surjective⟩⟩
375
375
376
376
lemma injective_surj_inv (h : surjective f) : injective (surj_inv h) :=
377
- (right_inverse_surj_inv h).injective
377
+ (RightInverse_surj_inv h).injective
378
378
379
379
lemma surjective_to_subsingleton [na : Nonempty α] [Subsingleton β] (f : α → β) :
380
380
surjective f :=
@@ -564,21 +564,20 @@ end bicomp
564
564
565
565
section uncurry
566
566
567
- variable {α β γ δ : Type _}
568
-
569
567
/-- Records a way to turn an element of `α` into a function from `β` to `γ`. The most generic use
570
568
is to recursively uncurry. For instance `f : α → β → γ → δ` will be turned into
571
569
`↿f : α × β × γ → δ`. One can also add instances for bundled maps. -/
572
- class has_uncurry (α : Type _) (β : outParam (Type _)) (γ : outParam (Type _)) := (uncurry : α → (β → γ))
570
+ class HasUncurry (α : Type u) (β : outParam (Type v)) (γ : outParam (Type w)) where
571
+ uncurry : α → (β → γ)
573
572
574
573
/- Uncurrying operator. The most generic use is to recursively uncurry. For instance
575
574
`f : α → β → γ → δ` will be turned into `↿f : α × β × γ → δ`. One can also add instances
576
575
for bundled maps. -/
577
- notation :max "↿" x:max => has_uncurry .uncurry x
576
+ notation :max "↿" x:max => HasUncurry .uncurry x
578
577
579
- instance has_uncurry_base : has_uncurry (α → β) α β := ⟨id⟩
578
+ instance HasUncurry_base : HasUncurry (α → β) α β := ⟨id⟩
580
579
581
- instance has_uncurry_induction [has_uncurry β γ δ] : has_uncurry (α → β) (α × γ) δ :=
580
+ instance HasUncurry_induction [HasUncurry β γ δ] : HasUncurry (α → β) (α × γ) δ :=
582
581
⟨λ f p => ↿(f p.1 ) p.2 ⟩
583
582
584
583
end uncurry
@@ -595,10 +594,10 @@ variable {α : Sort u} {f : α → α} (h : involutive f)
595
594
@[simp]
596
595
lemma comp_self : f ∘ f = id := funext h
597
596
598
- protected lemma left_inverse : left_inverse f f := h
599
- protected lemma right_inverse : right_inverse f f := h
597
+ protected lemma LeftInverse : LeftInverse f f := h
598
+ protected lemma RightInverse : RightInverse f f := h
600
599
601
- protected lemma injective : injective f := h.left_inverse .injective
600
+ protected lemma injective : injective f := h.LeftInverse .injective
602
601
protected lemma surjective : surjective f := λ x => ⟨f x, h x⟩
603
602
protected lemma bijective : bijective f := ⟨h.injective, h.surjective⟩
604
603
0 commit comments