Skip to content

Commit

Permalink
remove conditional completeness assumption in `IsCompact.exists_isMin…
Browse files Browse the repository at this point in the history
…On` (#5388)

Also rename 2 lemmas

- `IsCompact.exists_local_min_mem_open` -> `IsCompact.exists_isLocalMin_mem_open`;
- `Metric.exists_local_min_mem_ball` -> `Metric.exists_isLocal_min_mem_ball`.
  • Loading branch information
urkud committed Jun 23, 2023
1 parent 2a87032 commit fcb2f0f
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 183 deletions.
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Complex/OpenMapping.lean
Expand Up @@ -61,7 +61,7 @@ theorem DiffContOnCl.ball_subset_image_closedBall (h : DiffContOnCl ℂ f (ball
norm_sub_sub_norm_sub_le_norm_sub (f z) v (f z₀)]
have h5 : ‖f z₀ - v‖ < ε / 2 := by simpa [← dist_eq_norm, dist_comm] using mem_ball.mp hv
obtain ⟨z, hz1, hz2⟩ : ∃ z ∈ ball z₀ r, IsLocalMin (fun z => ‖f z - v‖) z
exact exists_local_min_mem_ball h2 (mem_closedBall_self hr.le) fun z hz => h5.trans_le (h4 z hz)
exact exists_isLocalMin_mem_ball h2 (mem_closedBall_self hr.le) fun z hz => h5.trans_le (h4 z hz)
refine ⟨z, ball_subset_closedBall hz1, sub_eq_zero.mp ?_⟩
have h6 := h1.differentiableOn.eventually_differentiableAt (isOpen_ball.mem_nhds hz1)
refine (eventually_eq_or_eq_zero_of_isLocalMin_norm h6 hz2).resolve_left fun key => ?_
Expand Down
10 changes: 7 additions & 3 deletions Mathlib/Order/Directed.lean
Expand Up @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
! This file was ported from Lean 3 source module order.directed
! leanprover-community/mathlib commit e8cf0cfec5fcab9baf46dc17d30c5e22048468be
! leanprover-community/mathlib commit 3efd324a3a31eaa40c9d5bfc669c4fafee5f9423
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
Expand Down Expand Up @@ -166,6 +166,10 @@ theorem directedOn_of_inf_mem [SemilatticeInf α] {S : Set α}
⟨a ⊓ b, H ha hb, inf_le_left, inf_le_right⟩
#align directed_on_of_inf_mem directedOn_of_inf_mem

theorem IsTotal.directed [IsTotal α r] (f : ι → α) : Directed r f := fun i j =>
Or.casesOn (total_of r (f i) (f j)) (fun h => ⟨j, h, refl _⟩) fun h => ⟨i, refl _, h⟩
#align is_total.directed IsTotal.directed

/-- `IsDirected α r` states that for any elements `a`, `b` there exists an element `c` such that
`r a c` and `r b c`. -/
class IsDirected (α : Type _) (r : α → α → Prop) : Prop where
Expand Down Expand Up @@ -199,8 +203,8 @@ theorem directedOn_univ_iff : DirectedOn r Set.univ ↔ IsDirected α r :=
#align directed_on_univ_iff directedOn_univ_iff

-- see Note [lower instance priority]
instance (priority := 100) IsTotal.to_isDirected [IsTotal α r] : IsDirected α r :=
fun a b => Or.casesOn (total_of r a b) (fun h => ⟨b, h, refl _⟩) fun h => ⟨a, refl _, h⟩⟩
instance (priority := 100) IsTotal.to_isDirected [IsTotal α r] : IsDirected α r := by
rw [← directed_id_iff]; exact IsTotal.directed _
#align is_total.to_is_directed IsTotal.to_isDirected

theorem isDirected_mono [IsDirected α r] (h : ∀ ⦃a b⦄, r a b → s a b) : IsDirected α s :=
Expand Down

0 comments on commit fcb2f0f

Please sign in to comment.