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

Commit 4715d99

Browse files
committed
chore(data/set/function): add 3 trivial lemmas (#5127)
1 parent c1edbdd commit 4715d99

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/data/set/function.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ theorem maps_to.mem_iff (h : maps_to f s t) (hc : maps_to f sᶜ tᶜ) {x} : f x
198198
theorem inj_on_empty (f : α → β) : inj_on f ∅ :=
199199
λ _ h₁, false.elim h₁
200200

201+
theorem inj_on.eq_iff {x y} (h : inj_on f s) (hx : x ∈ s) (hy : y ∈ s) :
202+
f x = f y ↔ x = y :=
203+
⟨h hx hy, λ h, h ▸ rfl⟩
204+
201205
theorem inj_on.congr (h₁ : inj_on f₁ s) (h : eq_on f₁ f₂ s) :
202206
inj_on f₂ s :=
203207
λ x hx y hy, h hx ▸ h hy ▸ h₁ hx hy
@@ -625,6 +629,18 @@ lemma strict_mono_decr_on.inj_on [linear_order α] [preorder β] {f : α → β}
625629
s.inj_on f :=
626630
@strict_mono_incr_on.inj_on α (order_dual β) _ _ f s H
627631

632+
lemma strict_mono_incr_on.comp [preorder α] [preorder β] [preorder γ]
633+
{g : β → γ} {f : α → β} {s : set α} {t : set β} (hg : strict_mono_incr_on g t)
634+
(hf : strict_mono_incr_on f s) (hs : set.maps_to f s t) :
635+
strict_mono_incr_on (g ∘ f) s :=
636+
λ x hx y hy hxy, hg (hs hx) (hs hy) $ hf hx hy hxy
637+
638+
lemma strict_mono.comp_strict_mono_incr_on [preorder α] [preorder β] [preorder γ]
639+
{g : β → γ} {f : α → β} {s : set α} (hg : strict_mono g)
640+
(hf : strict_mono_incr_on f s) :
641+
strict_mono_incr_on (g ∘ f) s :=
642+
λ x hx y hy hxy, hg $ hf hx hy hxy
643+
628644
namespace function
629645

630646
open set

0 commit comments

Comments
 (0)