Module docstring
{"# Monotone functions over sets ","### Congruence lemmas for monotonicity and antitonicity ","### Monotonicity lemmas ","### Monotone "}
{"# Monotone functions over sets ","### Congruence lemmas for monotonicity and antitonicity ","### Monotonicity lemmas ","### Monotone "}
MonotoneOn.congr
theorem
(h₁ : MonotoneOn f₁ s) (h : s.EqOn f₁ f₂) : MonotoneOn f₂ s
theorem _root_.MonotoneOn.congr (h₁ : MonotoneOn f₁ s) (h : s.EqOn f₁ f₂) : MonotoneOn f₂ s := by
intro a ha b hb hab
rw [← h ha, ← h hb]
exact h₁ ha hb hab
AntitoneOn.congr
theorem
(h₁ : AntitoneOn f₁ s) (h : s.EqOn f₁ f₂) : AntitoneOn f₂ s
theorem _root_.AntitoneOn.congr (h₁ : AntitoneOn f₁ s) (h : s.EqOn f₁ f₂) : AntitoneOn f₂ s :=
h₁.dual_right.congr h
StrictMonoOn.congr
theorem
(h₁ : StrictMonoOn f₁ s) (h : s.EqOn f₁ f₂) : StrictMonoOn f₂ s
theorem _root_.StrictMonoOn.congr (h₁ : StrictMonoOn f₁ s) (h : s.EqOn f₁ f₂) :
StrictMonoOn f₂ s := by
intro a ha b hb hab
rw [← h ha, ← h hb]
exact h₁ ha hb hab
StrictAntiOn.congr
theorem
(h₁ : StrictAntiOn f₁ s) (h : s.EqOn f₁ f₂) : StrictAntiOn f₂ s
theorem _root_.StrictAntiOn.congr (h₁ : StrictAntiOn f₁ s) (h : s.EqOn f₁ f₂) : StrictAntiOn f₂ s :=
h₁.dual_right.congr h
Set.EqOn.congr_monotoneOn
theorem
(h : s.EqOn f₁ f₂) : MonotoneOn f₁ s ↔ MonotoneOn f₂ s
theorem EqOn.congr_monotoneOn (h : s.EqOn f₁ f₂) : MonotoneOnMonotoneOn f₁ s ↔ MonotoneOn f₂ s :=
⟨fun h₁ => h₁.congr h, fun h₂ => h₂.congr h.symm⟩
Set.EqOn.congr_antitoneOn
theorem
(h : s.EqOn f₁ f₂) : AntitoneOn f₁ s ↔ AntitoneOn f₂ s
theorem EqOn.congr_antitoneOn (h : s.EqOn f₁ f₂) : AntitoneOnAntitoneOn f₁ s ↔ AntitoneOn f₂ s :=
⟨fun h₁ => h₁.congr h, fun h₂ => h₂.congr h.symm⟩
Set.EqOn.congr_strictMonoOn
theorem
(h : s.EqOn f₁ f₂) : StrictMonoOn f₁ s ↔ StrictMonoOn f₂ s
theorem EqOn.congr_strictMonoOn (h : s.EqOn f₁ f₂) : StrictMonoOnStrictMonoOn f₁ s ↔ StrictMonoOn f₂ s :=
⟨fun h₁ => h₁.congr h, fun h₂ => h₂.congr h.symm⟩
Set.EqOn.congr_strictAntiOn
theorem
(h : s.EqOn f₁ f₂) : StrictAntiOn f₁ s ↔ StrictAntiOn f₂ s
theorem EqOn.congr_strictAntiOn (h : s.EqOn f₁ f₂) : StrictAntiOnStrictAntiOn f₁ s ↔ StrictAntiOn f₂ s :=
⟨fun h₁ => h₁.congr h, fun h₂ => h₂.congr h.symm⟩
MonotoneOn.mono
theorem
(h : MonotoneOn f s) (h' : s₂ ⊆ s) : MonotoneOn f s₂
theorem _root_.MonotoneOn.mono (h : MonotoneOn f s) (h' : s₂ ⊆ s) : MonotoneOn f s₂ :=
fun _ hx _ hy => h (h' hx) (h' hy)
AntitoneOn.mono
theorem
(h : AntitoneOn f s) (h' : s₂ ⊆ s) : AntitoneOn f s₂
theorem _root_.AntitoneOn.mono (h : AntitoneOn f s) (h' : s₂ ⊆ s) : AntitoneOn f s₂ :=
fun _ hx _ hy => h (h' hx) (h' hy)
StrictMonoOn.mono
theorem
(h : StrictMonoOn f s) (h' : s₂ ⊆ s) : StrictMonoOn f s₂
theorem _root_.StrictMonoOn.mono (h : StrictMonoOn f s) (h' : s₂ ⊆ s) : StrictMonoOn f s₂ :=
fun _ hx _ hy => h (h' hx) (h' hy)
StrictAntiOn.mono
theorem
(h : StrictAntiOn f s) (h' : s₂ ⊆ s) : StrictAntiOn f s₂
theorem _root_.StrictAntiOn.mono (h : StrictAntiOn f s) (h' : s₂ ⊆ s) : StrictAntiOn f s₂ :=
fun _ hx _ hy => h (h' hx) (h' hy)
MonotoneOn.monotone
theorem
(h : MonotoneOn f s) : Monotone (f ∘ Subtype.val : s → β)
protected theorem _root_.MonotoneOn.monotone (h : MonotoneOn f s) :
Monotone (f ∘ Subtype.val : s → β) :=
fun x y hle => h x.coe_prop y.coe_prop hle
AntitoneOn.monotone
theorem
(h : AntitoneOn f s) : Antitone (f ∘ Subtype.val : s → β)
protected theorem _root_.AntitoneOn.monotone (h : AntitoneOn f s) :
Antitone (f ∘ Subtype.val : s → β) :=
fun x y hle => h x.coe_prop y.coe_prop hle
StrictMonoOn.strictMono
theorem
(h : StrictMonoOn f s) : StrictMono (f ∘ Subtype.val : s → β)
protected theorem _root_.StrictMonoOn.strictMono (h : StrictMonoOn f s) :
StrictMono (f ∘ Subtype.val : s → β) :=
fun x y hlt => h x.coe_prop y.coe_prop hlt
StrictAntiOn.strictAnti
theorem
(h : StrictAntiOn f s) : StrictAnti (f ∘ Subtype.val : s → β)
protected theorem _root_.StrictAntiOn.strictAnti (h : StrictAntiOn f s) :
StrictAnti (f ∘ Subtype.val : s → β) :=
fun x y hlt => h x.coe_prop y.coe_prop hlt
Set.MonotoneOn_insert_iff
theorem
{a : α} : MonotoneOn f (insert a s) ↔ (∀ b ∈ s, b ≤ a → f b ≤ f a) ∧ (∀ b ∈ s, a ≤ b → f a ≤ f b) ∧ MonotoneOn f s
lemma MonotoneOn_insert_iff {a : α} :
MonotoneOnMonotoneOn f (insert a s) ↔
(∀ b ∈ s, b ≤ a → f b ≤ f a) ∧ (∀ b ∈ s, a ≤ b → f a ≤ f b) ∧ MonotoneOn f s := by
simp [MonotoneOn, forall_and]
Set.AntitoneOn_insert_iff
theorem
{a : α} : AntitoneOn f (insert a s) ↔ (∀ b ∈ s, b ≤ a → f a ≤ f b) ∧ (∀ b ∈ s, a ≤ b → f b ≤ f a) ∧ AntitoneOn f s
lemma AntitoneOn_insert_iff {a : α} :
AntitoneOnAntitoneOn f (insert a s) ↔
(∀ b ∈ s, b ≤ a → f a ≤ f b) ∧ (∀ b ∈ s, a ≤ b → f b ≤ f a) ∧ AntitoneOn f s :=
@MonotoneOn_insert_iff α βᵒᵈ _ _ _ _ _
Monotone.restrict
theorem
(h : Monotone f) (s : Set α) : Monotone (s.restrict f)
Monotone.codRestrict
theorem
(h : Monotone f) {s : Set β} (hs : ∀ x, f x ∈ s) : Monotone (s.codRestrict f hs)
protected theorem codRestrict (h : Monotone f) {s : Set β} (hs : ∀ x, f x ∈ s) :
Monotone (s.codRestrict f hs) :=
h
Monotone.rangeFactorization
theorem
(h : Monotone f) : Monotone (Set.rangeFactorization f)
protected theorem rangeFactorization (h : Monotone f) : Monotone (Set.rangeFactorization f) :=
h
StrictMonoOn.injOn
theorem
[LinearOrder α] [Preorder β] {f : α → β} {s : Set α} (H : StrictMonoOn f s) : s.InjOn f
theorem StrictMonoOn.injOn [LinearOrder α] [Preorder β] {f : α → β} {s : Set α}
(H : StrictMonoOn f s) : s.InjOn f := fun x hx y hy hxy =>
show Ordering.eq.Compares x y from (H.compares hx hy).1 hxy
StrictAntiOn.injOn
theorem
[LinearOrder α] [Preorder β] {f : α → β} {s : Set α} (H : StrictAntiOn f s) : s.InjOn f
theorem StrictAntiOn.injOn [LinearOrder α] [Preorder β] {f : α → β} {s : Set α}
(H : StrictAntiOn f s) : s.InjOn f :=
@StrictMonoOn.injOn α βᵒᵈ _ _ f s H
StrictMonoOn.comp
theorem
[Preorder α] [Preorder β] [Preorder γ] {g : β → γ} {f : α → β} {s : Set α} {t : Set β} (hg : StrictMonoOn g t)
(hf : StrictMonoOn f s) (hs : Set.MapsTo f s t) : StrictMonoOn (g ∘ f) s
theorem StrictMonoOn.comp [Preorder α] [Preorder β] [Preorder γ] {g : β → γ} {f : α → β} {s : Set α}
{t : Set β} (hg : StrictMonoOn g t) (hf : StrictMonoOn f s) (hs : Set.MapsTo f s t) :
StrictMonoOn (g ∘ f) s := fun _x hx _y hy hxy => hg (hs hx) (hs hy) <| hf hx hy hxy
StrictMonoOn.comp_strictAntiOn
theorem
[Preorder α] [Preorder β] [Preorder γ] {g : β → γ} {f : α → β} {s : Set α} {t : Set β} (hg : StrictMonoOn g t)
(hf : StrictAntiOn f s) (hs : Set.MapsTo f s t) : StrictAntiOn (g ∘ f) s
theorem StrictMonoOn.comp_strictAntiOn [Preorder α] [Preorder β] [Preorder γ] {g : β → γ}
{f : α → β} {s : Set α} {t : Set β} (hg : StrictMonoOn g t) (hf : StrictAntiOn f s)
(hs : Set.MapsTo f s t) : StrictAntiOn (g ∘ f) s := fun _x hx _y hy hxy =>
hg (hs hy) (hs hx) <| hf hx hy hxy
StrictAntiOn.comp
theorem
[Preorder α] [Preorder β] [Preorder γ] {g : β → γ} {f : α → β} {s : Set α} {t : Set β} (hg : StrictAntiOn g t)
(hf : StrictAntiOn f s) (hs : Set.MapsTo f s t) : StrictMonoOn (g ∘ f) s
theorem StrictAntiOn.comp [Preorder α] [Preorder β] [Preorder γ] {g : β → γ} {f : α → β} {s : Set α}
{t : Set β} (hg : StrictAntiOn g t) (hf : StrictAntiOn f s) (hs : Set.MapsTo f s t) :
StrictMonoOn (g ∘ f) s := fun _x hx _y hy hxy => hg (hs hy) (hs hx) <| hf hx hy hxy
StrictAntiOn.comp_strictMonoOn
theorem
[Preorder α] [Preorder β] [Preorder γ] {g : β → γ} {f : α → β} {s : Set α} {t : Set β} (hg : StrictAntiOn g t)
(hf : StrictMonoOn f s) (hs : Set.MapsTo f s t) : StrictAntiOn (g ∘ f) s
theorem StrictAntiOn.comp_strictMonoOn [Preorder α] [Preorder β] [Preorder γ] {g : β → γ}
{f : α → β} {s : Set α} {t : Set β} (hg : StrictAntiOn g t) (hf : StrictMonoOn f s)
(hs : Set.MapsTo f s t) : StrictAntiOn (g ∘ f) s := fun _x hx _y hy hxy =>
hg (hs hx) (hs hy) <| hf hx hy hxy
strictMono_restrict
theorem
[Preorder α] [Preorder β] {f : α → β} {s : Set α} : StrictMono (s.restrict f) ↔ StrictMonoOn f s
@[simp]
theorem strictMono_restrict [Preorder α] [Preorder β] {f : α → β} {s : Set α} :
StrictMonoStrictMono (s.restrict f) ↔ StrictMonoOn f s := by simp [Set.restrict, StrictMono, StrictMonoOn]
StrictMono.codRestrict
theorem
[Preorder α] [Preorder β] {f : α → β} (hf : StrictMono f) {s : Set β} (hs : ∀ x, f x ∈ s) :
StrictMono (Set.codRestrict f s hs)
theorem StrictMono.codRestrict [Preorder α] [Preorder β] {f : α → β} (hf : StrictMono f)
{s : Set β} (hs : ∀ x, f x ∈ s) : StrictMono (Set.codRestrict f s hs) :=
hf
strictMonoOn_insert_iff
theorem
[Preorder α] [Preorder β] {f : α → β} {s : Set α} {a : α} :
StrictMonoOn f (insert a s) ↔ (∀ b ∈ s, b < a → f b < f a) ∧ (∀ b ∈ s, a < b → f a < f b) ∧ StrictMonoOn f s
lemma strictMonoOn_insert_iff [Preorder α] [Preorder β] {f : α → β} {s : Set α} {a : α} :
StrictMonoOnStrictMonoOn f (insert a s) ↔
(∀ b ∈ s, b < a → f b < f a) ∧ (∀ b ∈ s, a < b → f a < f b) ∧ StrictMonoOn f s := by
simp [StrictMonoOn, forall_and]
strictAntiOn_insert_iff
theorem
[Preorder α] [Preorder β] {f : α → β} {s : Set α} {a : α} :
StrictAntiOn f (insert a s) ↔ (∀ b ∈ s, b < a → f a < f b) ∧ (∀ b ∈ s, a < b → f b < f a) ∧ StrictAntiOn f s
lemma strictAntiOn_insert_iff [Preorder α] [Preorder β] {f : α → β} {s : Set α} {a : α} :
StrictAntiOnStrictAntiOn f (insert a s) ↔
(∀ b ∈ s, b < a → f a < f b) ∧ (∀ b ∈ s, a < b → f b < f a) ∧ StrictAntiOn f s :=
@strictMonoOn_insert_iff α βᵒᵈ _ _ _ _ _
Function.monotoneOn_of_rightInvOn_of_mapsTo
theorem
{α β : Type*} [PartialOrder α] [LinearOrder β] {φ : β → α} {ψ : α → β} {t : Set β} {s : Set α} (hφ : MonotoneOn φ t)
(φψs : Set.RightInvOn ψ φ s) (ψts : Set.MapsTo ψ s t) : MonotoneOn ψ s
theorem monotoneOn_of_rightInvOn_of_mapsTo {α β : Type*} [PartialOrder α] [LinearOrder β]
{φ : β → α} {ψ : α → β} {t : Set β} {s : Set α} (hφ : MonotoneOn φ t)
(φψs : Set.RightInvOn ψ φ s) (ψts : Set.MapsTo ψ s t) : MonotoneOn ψ s := by
rintro x xs y ys l
rcases le_total (ψ x) (ψ y) with (ψxy|ψyx)
· exact ψxy
· have := hφ (ψts ys) (ψts xs) ψyx
rw [φψs.eq ys, φψs.eq xs] at this
induction le_antisymm l this
exact le_refl _
Function.antitoneOn_of_rightInvOn_of_mapsTo
theorem
[PartialOrder α] [LinearOrder β] {φ : β → α} {ψ : α → β} {t : Set β} {s : Set α} (hφ : AntitoneOn φ t)
(φψs : Set.RightInvOn ψ φ s) (ψts : Set.MapsTo ψ s t) : AntitoneOn ψ s
theorem antitoneOn_of_rightInvOn_of_mapsTo [PartialOrder α] [LinearOrder β]
{φ : β → α} {ψ : α → β} {t : Set β} {s : Set α} (hφ : AntitoneOn φ t)
(φψs : Set.RightInvOn ψ φ s) (ψts : Set.MapsTo ψ s t) : AntitoneOn ψ s :=
(monotoneOn_of_rightInvOn_of_mapsTo hφ.dual_left φψs ψts).dual_right