Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
num_lines
int64
1
150
complexity_score
float64
2.72
139,370,958,066,637,970,000,000,000,000,000,000,000,000,000,000,000,000,000B
diff_level
int64
0
2
file_diff_level
float64
0
2
theorem_same_file
int64
1
32
rank_file
int64
0
2.51k
import Mathlib.CategoryTheory.Sites.Sheaf #align_import category_theory.sites.canonical from "leanprover-community/mathlib"@"9e7c80f638149bfb3504ba8ff48dfdbfc949fb1a" universe v u namespace CategoryTheory open scoped Classical open CategoryTheory Category Limits Sieve variable {C : Type u} [Category.{v} C] namespace Sheaf variable {P : Cᵒᵖ ⥤ Type v} variable {X Y : C} {S : Sieve X} {R : Presieve X} variable (J J₂ : GrothendieckTopology C) theorem isSheafFor_bind (P : Cᵒᵖ ⥤ Type v) (U : Sieve X) (B : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, U f → Sieve Y) (hU : Presieve.IsSheafFor P (U : Presieve X)) (hB : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (hf : U f), Presieve.IsSheafFor P (B hf : Presieve Y)) (hB' : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (h : U f) ⦃Z⦄ (g : Z ⟶ Y), Presieve.IsSeparatedFor P (((B h).pullback g) : Presieve Z)) : Presieve.IsSheafFor P (Sieve.bind (U : Presieve X) B : Presieve X) := by intro s hs let y : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (hf : U f), Presieve.FamilyOfElements P (B hf : Presieve Y) := fun Y f hf Z g hg => s _ (Presieve.bind_comp _ _ hg) have hy : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (hf : U f), (y hf).Compatible := by intro Y f H Y₁ Y₂ Z g₁ g₂ f₁ f₂ hf₁ hf₂ comm apply hs apply reassoc_of% comm let t : Presieve.FamilyOfElements P (U : Presieve X) := fun Y f hf => (hB hf).amalgamate (y hf) (hy hf) have ht : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (hf : U f), (y hf).IsAmalgamation (t f hf) := fun Y f hf => (hB hf).isAmalgamation _ have hT : t.Compatible := by rw [Presieve.compatible_iff_sieveCompatible] intro Z W f h hf apply (hB (U.downward_closed hf h)).isSeparatedFor.ext intro Y l hl apply (hB' hf (l ≫ h)).ext intro M m hm have : bind U B (m ≫ l ≫ h ≫ f) := by -- Porting note: had to make explicit the parameter `((m ≫ l ≫ h) ≫ f)` and -- using `by exact` have : bind U B ((m ≫ l ≫ h) ≫ f) := by exact Presieve.bind_comp f hf hm simpa using this trans s (m ≫ l ≫ h ≫ f) this · have := ht (U.downward_closed hf h) _ ((B _).downward_closed hl m) rw [op_comp, FunctorToTypes.map_comp_apply] at this rw [this] change s _ _ = s _ _ -- Porting note: the proof was `by simp` congr 1 simp only [assoc] · have h : s _ _ = _ := (ht hf _ hm).symm -- Porting note: this was done by `simp only [assoc] at` conv_lhs at h => congr; rw [assoc, assoc] rw [h] simp only [op_comp, assoc, FunctorToTypes.map_comp_apply] refine ⟨hU.amalgamate t hT, ?_, ?_⟩ · rintro Z _ ⟨Y, f, g, hg, hf, rfl⟩ rw [op_comp, FunctorToTypes.map_comp_apply, Presieve.IsSheafFor.valid_glue _ _ _ hg] apply ht hg _ hf · intro y hy apply hU.isSeparatedFor.ext intro Y f hf apply (hB hf).isSeparatedFor.ext intro Z g hg rw [← FunctorToTypes.map_comp_apply, ← op_comp, hy _ (Presieve.bind_comp _ _ hg), hU.valid_glue _ _ hf, ht hf _ hg] #align category_theory.sheaf.is_sheaf_for_bind CategoryTheory.Sheaf.isSheafFor_bind
Mathlib/CategoryTheory/Sites/Canonical.lean
125
150
theorem isSheafFor_trans (P : Cᵒᵖ ⥤ Type v) (R S : Sieve X) (hR : Presieve.IsSheafFor P (R : Presieve X)) (hR' : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (_ : S f), Presieve.IsSeparatedFor P (R.pullback f : Presieve Y)) (hS : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (_ : R f), Presieve.IsSheafFor P (S.pullback f : Presieve Y)) : Presieve.IsSheafFor P (S : Presieve X) := by
have : (bind R fun Y f _ => S.pullback f : Presieve X) ≤ S := by rintro Z f ⟨W, f, g, hg, hf : S _, rfl⟩ apply hf apply Presieve.isSheafFor_subsieve_aux P this · apply isSheafFor_bind _ _ _ hR hS intro Y f hf Z g rw [← pullback_comp] apply (hS (R.downward_closed hf _)).isSeparatedFor · intro Y f hf have : Sieve.pullback f (bind R fun T (k : T ⟶ X) (_ : R k) => pullback k S) = R.pullback f := by ext Z g constructor · rintro ⟨W, k, l, hl, _, comm⟩ rw [pullback_apply, ← comm] simp [hl] · intro a refine ⟨Z, 𝟙 Z, _, a, ?_⟩ simp [hf] rw [this] apply hR' hf
21
1,318,815,734.483215
2
2
2
1,965
import Mathlib.Analysis.Fourier.Inversion open Real Complex Set MeasureTheory variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] open scoped FourierTransform private theorem rexp_neg_deriv_aux : ∀ x ∈ univ, HasDerivWithinAt (rexp ∘ Neg.neg) (-rexp (-x)) univ x := fun x _ ↦ mul_neg_one (rexp (-x)) ▸ ((Real.hasDerivAt_exp (-x)).comp x (hasDerivAt_neg x)).hasDerivWithinAt private theorem rexp_neg_image_aux : rexp ∘ Neg.neg '' univ = Ioi 0 := by rw [Set.image_comp, Set.image_univ_of_surjective neg_surjective, Set.image_univ, Real.range_exp] private theorem rexp_neg_injOn_aux : univ.InjOn (rexp ∘ Neg.neg) := Real.exp_injective.injOn.comp neg_injective.injOn (univ.mapsTo_univ _) private theorem rexp_cexp_aux (x : ℝ) (s : ℂ) (f : E) : rexp (-x) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f := by show (rexp (-x) : ℂ) • _ = _ • f rw [← smul_assoc, smul_eq_mul] push_cast conv in cexp _ * _ => lhs; rw [← cpow_one (cexp _)] rw [← cpow_add _ _ (Complex.exp_ne_zero _), cpow_def_of_ne_zero (Complex.exp_ne_zero _), Complex.log_exp (by norm_num; exact pi_pos) (by simpa using pi_nonneg)] ring_nf
Mathlib/Analysis/MellinInversion.lean
44
67
theorem mellin_eq_fourierIntegral (f : ℝ → E) {s : ℂ} : mellin f s = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π)) := calc mellin f s = ∫ (u : ℝ), Complex.exp (-s * u) • f (Real.exp (-u)) := by
rw [mellin, ← rexp_neg_image_aux, integral_image_eq_integral_abs_deriv_smul MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] simp [rexp_cexp_aux] _ = ∫ (u : ℝ), Complex.exp (↑(-2 * π * (u * (s.im / (2 * π)))) * I) • (Real.exp (-s.re * u) • f (Real.exp (-u))) := by congr ext u trans Complex.exp (-s.im * u * I) • (Real.exp (-s.re * u) • f (Real.exp (-u))) · conv => lhs; rw [← re_add_im s] rw [neg_add, add_mul, Complex.exp_add, mul_comm, ← smul_eq_mul, smul_assoc] norm_cast push_cast ring_nf congr rw [mul_comm (-s.im : ℂ) (u : ℂ), mul_comm (-2 * π)] have : 2 * (π : ℂ) ≠ 0 := by norm_num; exact pi_ne_zero field_simp _ = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π)) := by simp [fourierIntegral_eq']
19
178,482,300.963187
2
2
3
1,966
import Mathlib.Analysis.Fourier.Inversion open Real Complex Set MeasureTheory variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] open scoped FourierTransform private theorem rexp_neg_deriv_aux : ∀ x ∈ univ, HasDerivWithinAt (rexp ∘ Neg.neg) (-rexp (-x)) univ x := fun x _ ↦ mul_neg_one (rexp (-x)) ▸ ((Real.hasDerivAt_exp (-x)).comp x (hasDerivAt_neg x)).hasDerivWithinAt private theorem rexp_neg_image_aux : rexp ∘ Neg.neg '' univ = Ioi 0 := by rw [Set.image_comp, Set.image_univ_of_surjective neg_surjective, Set.image_univ, Real.range_exp] private theorem rexp_neg_injOn_aux : univ.InjOn (rexp ∘ Neg.neg) := Real.exp_injective.injOn.comp neg_injective.injOn (univ.mapsTo_univ _) private theorem rexp_cexp_aux (x : ℝ) (s : ℂ) (f : E) : rexp (-x) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f := by show (rexp (-x) : ℂ) • _ = _ • f rw [← smul_assoc, smul_eq_mul] push_cast conv in cexp _ * _ => lhs; rw [← cpow_one (cexp _)] rw [← cpow_add _ _ (Complex.exp_ne_zero _), cpow_def_of_ne_zero (Complex.exp_ne_zero _), Complex.log_exp (by norm_num; exact pi_pos) (by simpa using pi_nonneg)] ring_nf theorem mellin_eq_fourierIntegral (f : ℝ → E) {s : ℂ} : mellin f s = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π)) := calc mellin f s = ∫ (u : ℝ), Complex.exp (-s * u) • f (Real.exp (-u)) := by rw [mellin, ← rexp_neg_image_aux, integral_image_eq_integral_abs_deriv_smul MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] simp [rexp_cexp_aux] _ = ∫ (u : ℝ), Complex.exp (↑(-2 * π * (u * (s.im / (2 * π)))) * I) • (Real.exp (-s.re * u) • f (Real.exp (-u))) := by congr ext u trans Complex.exp (-s.im * u * I) • (Real.exp (-s.re * u) • f (Real.exp (-u))) · conv => lhs; rw [← re_add_im s] rw [neg_add, add_mul, Complex.exp_add, mul_comm, ← smul_eq_mul, smul_assoc] norm_cast push_cast ring_nf congr rw [mul_comm (-s.im : ℂ) (u : ℂ), mul_comm (-2 * π)] have : 2 * (π : ℂ) ≠ 0 := by norm_num; exact pi_ne_zero field_simp _ = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π)) := by simp [fourierIntegral_eq']
Mathlib/Analysis/MellinInversion.lean
69
84
theorem mellinInv_eq_fourierIntegralInv (σ : ℝ) (f : ℂ → E) {x : ℝ} (hx : 0 < x) : mellinInv σ f x = (x : ℂ) ^ (-σ : ℂ) • 𝓕⁻ (fun (y : ℝ) ↦ f (σ + 2 * π * y * I)) (-Real.log x) := calc mellinInv σ f x = (x : ℂ) ^ (-σ : ℂ) • (∫ (y : ℝ), Complex.exp (2 * π * (y * (-Real.log x)) * I) • f (σ + 2 * π * y * I)) := by
rw [mellinInv, one_div, ← abs_of_pos (show 0 < (2 * π)⁻¹ by norm_num; exact pi_pos)] have hx0 : (x : ℂ) ≠ 0 := ofReal_ne_zero.mpr (ne_of_gt hx) simp_rw [neg_add, cpow_add _ _ hx0, mul_smul, integral_smul] rw [smul_comm, ← Measure.integral_comp_mul_left] congr! 3 rw [cpow_def_of_ne_zero hx0, ← Complex.ofReal_log hx.le] push_cast ring_nf _ = (x : ℂ) ^ (-σ : ℂ) • 𝓕⁻ (fun (y : ℝ) ↦ f (σ + 2 * π * y * I)) (-Real.log x) := by simp [fourierIntegralInv_eq']
10
22,026.465795
2
2
3
1,966
import Mathlib.Analysis.Fourier.Inversion open Real Complex Set MeasureTheory variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] open scoped FourierTransform private theorem rexp_neg_deriv_aux : ∀ x ∈ univ, HasDerivWithinAt (rexp ∘ Neg.neg) (-rexp (-x)) univ x := fun x _ ↦ mul_neg_one (rexp (-x)) ▸ ((Real.hasDerivAt_exp (-x)).comp x (hasDerivAt_neg x)).hasDerivWithinAt private theorem rexp_neg_image_aux : rexp ∘ Neg.neg '' univ = Ioi 0 := by rw [Set.image_comp, Set.image_univ_of_surjective neg_surjective, Set.image_univ, Real.range_exp] private theorem rexp_neg_injOn_aux : univ.InjOn (rexp ∘ Neg.neg) := Real.exp_injective.injOn.comp neg_injective.injOn (univ.mapsTo_univ _) private theorem rexp_cexp_aux (x : ℝ) (s : ℂ) (f : E) : rexp (-x) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f := by show (rexp (-x) : ℂ) • _ = _ • f rw [← smul_assoc, smul_eq_mul] push_cast conv in cexp _ * _ => lhs; rw [← cpow_one (cexp _)] rw [← cpow_add _ _ (Complex.exp_ne_zero _), cpow_def_of_ne_zero (Complex.exp_ne_zero _), Complex.log_exp (by norm_num; exact pi_pos) (by simpa using pi_nonneg)] ring_nf theorem mellin_eq_fourierIntegral (f : ℝ → E) {s : ℂ} : mellin f s = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π)) := calc mellin f s = ∫ (u : ℝ), Complex.exp (-s * u) • f (Real.exp (-u)) := by rw [mellin, ← rexp_neg_image_aux, integral_image_eq_integral_abs_deriv_smul MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] simp [rexp_cexp_aux] _ = ∫ (u : ℝ), Complex.exp (↑(-2 * π * (u * (s.im / (2 * π)))) * I) • (Real.exp (-s.re * u) • f (Real.exp (-u))) := by congr ext u trans Complex.exp (-s.im * u * I) • (Real.exp (-s.re * u) • f (Real.exp (-u))) · conv => lhs; rw [← re_add_im s] rw [neg_add, add_mul, Complex.exp_add, mul_comm, ← smul_eq_mul, smul_assoc] norm_cast push_cast ring_nf congr rw [mul_comm (-s.im : ℂ) (u : ℂ), mul_comm (-2 * π)] have : 2 * (π : ℂ) ≠ 0 := by norm_num; exact pi_ne_zero field_simp _ = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π)) := by simp [fourierIntegral_eq'] theorem mellinInv_eq_fourierIntegralInv (σ : ℝ) (f : ℂ → E) {x : ℝ} (hx : 0 < x) : mellinInv σ f x = (x : ℂ) ^ (-σ : ℂ) • 𝓕⁻ (fun (y : ℝ) ↦ f (σ + 2 * π * y * I)) (-Real.log x) := calc mellinInv σ f x = (x : ℂ) ^ (-σ : ℂ) • (∫ (y : ℝ), Complex.exp (2 * π * (y * (-Real.log x)) * I) • f (σ + 2 * π * y * I)) := by rw [mellinInv, one_div, ← abs_of_pos (show 0 < (2 * π)⁻¹ by norm_num; exact pi_pos)] have hx0 : (x : ℂ) ≠ 0 := ofReal_ne_zero.mpr (ne_of_gt hx) simp_rw [neg_add, cpow_add _ _ hx0, mul_smul, integral_smul] rw [smul_comm, ← Measure.integral_comp_mul_left] congr! 3 rw [cpow_def_of_ne_zero hx0, ← Complex.ofReal_log hx.le] push_cast ring_nf _ = (x : ℂ) ^ (-σ : ℂ) • 𝓕⁻ (fun (y : ℝ) ↦ f (σ + 2 * π * y * I)) (-Real.log x) := by simp [fourierIntegralInv_eq'] variable [CompleteSpace E]
Mathlib/Analysis/MellinInversion.lean
89
121
theorem mellin_inversion (σ : ℝ) (f : ℝ → E) {x : ℝ} (hx : 0 < x) (hf : MellinConvergent f σ) (hFf : VerticalIntegrable (mellin f) σ) (hfx : ContinuousAt f x) : mellinInv σ (mellin f) x = f x := by
let g := fun (u : ℝ) => Real.exp (-σ * u) • f (Real.exp (-u)) replace hf : Integrable g := by rw [MellinConvergent, ← rexp_neg_image_aux, integrableOn_image_iff_integrableOn_abs_deriv_smul MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] at hf replace hf : Integrable fun (x : ℝ) ↦ cexp (-↑σ * ↑x) • f (rexp (-x)) := by simpa [rexp_cexp_aux] using hf norm_cast at hf replace hFf : Integrable (𝓕 g) := by have h2π : 2 * π ≠ 0 := by norm_num; exact pi_ne_zero have : Integrable (𝓕 (fun u ↦ rexp (-(σ * u)) • f (rexp (-u)))) := by simpa [mellin_eq_fourierIntegral, mul_div_cancel_right₀ _ h2π] using hFf.comp_mul_right' h2π simp_rw [neg_mul_eq_neg_mul] at this exact this replace hfx : ContinuousAt g (-Real.log x) := by refine ContinuousAt.smul (by fun_prop) (ContinuousAt.comp ?_ (by fun_prop)) simpa [Real.exp_log hx] using hfx calc mellinInv σ (mellin f) x = mellinInv σ (fun s ↦ 𝓕 g (s.im / (2 * π))) x := by simp [g, mellinInv, mellin_eq_fourierIntegral] _ = (x : ℂ) ^ (-σ : ℂ) • g (-Real.log x) := by rw [mellinInv_eq_fourierIntegralInv _ _ hx, ← hf.fourier_inversion hFf hfx] simp [mul_div_cancel_left₀ _ (show 2 * π ≠ 0 by norm_num; exact pi_ne_zero)] _ = (x : ℂ) ^ (-σ : ℂ) • rexp (σ * Real.log x) • f (rexp (Real.log x)) := by simp [g] _ = f x := by norm_cast rw [mul_comm σ, ← rpow_def_of_pos hx, Real.exp_log hx, ← Complex.ofReal_cpow hx.le] norm_cast rw [← smul_assoc, smul_eq_mul, Real.rpow_neg hx.le, inv_mul_cancel (ne_of_gt (rpow_pos_of_pos hx σ)), one_smul]
30
10,686,474,581,524.463
2
2
3
1,966
import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.MeasureTheory.Integral.FundThmCalculus #align_import analysis.special_functions.non_integrable from "leanprover-community/mathlib"@"55ec6e9af7d3e0043f57e394cb06a72f6275273e" open scoped MeasureTheory Topology Interval NNReal ENNReal open MeasureTheory TopologicalSpace Set Filter Asymptotics intervalIntegral variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F]
Mathlib/Analysis/SpecialFunctions/NonIntegrable.lean
52
96
theorem not_integrableOn_of_tendsto_norm_atTop_of_deriv_isBigO_filter_aux [CompleteSpace E] {f : ℝ → E} {g : ℝ → F} {k : Set ℝ} (l : Filter ℝ) [NeBot l] [TendstoIxxClass Icc l l] (hl : k ∈ l) (hd : ∀ᶠ x in l, DifferentiableAt ℝ f x) (hf : Tendsto (fun x => ‖f x‖) l atTop) (hfg : deriv f =O[l] g) : ¬IntegrableOn g k := by
intro hgi obtain ⟨C, hC₀, s, hsl, hsub, hfd, hg⟩ : ∃ (C : ℝ) (_ : 0 ≤ C), ∃ s ∈ l, (∀ x ∈ s, ∀ y ∈ s, [[x, y]] ⊆ k) ∧ (∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], DifferentiableAt ℝ f z) ∧ ∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], ‖deriv f z‖ ≤ C * ‖g z‖ := by rcases hfg.exists_nonneg with ⟨C, C₀, hC⟩ have h : ∀ᶠ x : ℝ × ℝ in l.prod l, ∀ y ∈ [[x.1, x.2]], (DifferentiableAt ℝ f y ∧ ‖deriv f y‖ ≤ C * ‖g y‖) ∧ y ∈ k := (tendsto_fst.uIcc tendsto_snd).eventually ((hd.and hC.bound).and hl).smallSets rcases mem_prod_self_iff.1 h with ⟨s, hsl, hs⟩ simp only [prod_subset_iff, mem_setOf_eq] at hs exact ⟨C, C₀, s, hsl, fun x hx y hy z hz => (hs x hx y hy z hz).2, fun x hx y hy z hz => (hs x hx y hy z hz).1.1, fun x hx y hy z hz => (hs x hx y hy z hz).1.2⟩ replace hgi : IntegrableOn (fun x ↦ C * ‖g x‖) k := by exact hgi.norm.smul C obtain ⟨c, hc, d, hd, hlt⟩ : ∃ c ∈ s, ∃ d ∈ s, (‖f c‖ + ∫ y in k, C * ‖g y‖) < ‖f d‖ := by rcases Filter.nonempty_of_mem hsl with ⟨c, hc⟩ have : ∀ᶠ x in l, (‖f c‖ + ∫ y in k, C * ‖g y‖) < ‖f x‖ := hf.eventually (eventually_gt_atTop _) exact ⟨c, hc, (this.and hsl).exists.imp fun d hd => ⟨hd.2, hd.1⟩⟩ specialize hsub c hc d hd; specialize hfd c hc d hd replace hg : ∀ x ∈ Ι c d, ‖deriv f x‖ ≤ C * ‖g x‖ := fun z hz => hg c hc d hd z ⟨hz.1.le, hz.2⟩ have hg_ae : ∀ᵐ x ∂volume.restrict (Ι c d), ‖deriv f x‖ ≤ C * ‖g x‖ := (ae_restrict_mem measurableSet_uIoc).mono hg have hsub' : Ι c d ⊆ k := Subset.trans Ioc_subset_Icc_self hsub have hfi : IntervalIntegrable (deriv f) volume c d := by rw [intervalIntegrable_iff] have : IntegrableOn (fun x ↦ C * ‖g x‖) (Ι c d) := IntegrableOn.mono hgi hsub' le_rfl exact Integrable.mono' this (aestronglyMeasurable_deriv _ _) hg_ae refine hlt.not_le (sub_le_iff_le_add'.1 ?_) calc ‖f d‖ - ‖f c‖ ≤ ‖f d - f c‖ := norm_sub_norm_le _ _ _ = ‖∫ x in c..d, deriv f x‖ := congr_arg _ (integral_deriv_eq_sub hfd hfi).symm _ = ‖∫ x in Ι c d, deriv f x‖ := norm_integral_eq_norm_integral_Ioc _ _ ≤ ∫ x in Ι c d, ‖deriv f x‖ := norm_integral_le_integral_norm _ _ ≤ ∫ x in Ι c d, C * ‖g x‖ := setIntegral_mono_on hfi.norm.def' (hgi.mono_set hsub') measurableSet_uIoc hg _ ≤ ∫ x in k, C * ‖g x‖ := by apply setIntegral_mono_set hgi (ae_of_all _ fun x => mul_nonneg hC₀ (norm_nonneg _)) hsub'.eventuallyLE
40
235,385,266,837,019,970
2
2
2
1,967
import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.MeasureTheory.Integral.FundThmCalculus #align_import analysis.special_functions.non_integrable from "leanprover-community/mathlib"@"55ec6e9af7d3e0043f57e394cb06a72f6275273e" open scoped MeasureTheory Topology Interval NNReal ENNReal open MeasureTheory TopologicalSpace Set Filter Asymptotics intervalIntegral variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] theorem not_integrableOn_of_tendsto_norm_atTop_of_deriv_isBigO_filter_aux [CompleteSpace E] {f : ℝ → E} {g : ℝ → F} {k : Set ℝ} (l : Filter ℝ) [NeBot l] [TendstoIxxClass Icc l l] (hl : k ∈ l) (hd : ∀ᶠ x in l, DifferentiableAt ℝ f x) (hf : Tendsto (fun x => ‖f x‖) l atTop) (hfg : deriv f =O[l] g) : ¬IntegrableOn g k := by intro hgi obtain ⟨C, hC₀, s, hsl, hsub, hfd, hg⟩ : ∃ (C : ℝ) (_ : 0 ≤ C), ∃ s ∈ l, (∀ x ∈ s, ∀ y ∈ s, [[x, y]] ⊆ k) ∧ (∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], DifferentiableAt ℝ f z) ∧ ∀ x ∈ s, ∀ y ∈ s, ∀ z ∈ [[x, y]], ‖deriv f z‖ ≤ C * ‖g z‖ := by rcases hfg.exists_nonneg with ⟨C, C₀, hC⟩ have h : ∀ᶠ x : ℝ × ℝ in l.prod l, ∀ y ∈ [[x.1, x.2]], (DifferentiableAt ℝ f y ∧ ‖deriv f y‖ ≤ C * ‖g y‖) ∧ y ∈ k := (tendsto_fst.uIcc tendsto_snd).eventually ((hd.and hC.bound).and hl).smallSets rcases mem_prod_self_iff.1 h with ⟨s, hsl, hs⟩ simp only [prod_subset_iff, mem_setOf_eq] at hs exact ⟨C, C₀, s, hsl, fun x hx y hy z hz => (hs x hx y hy z hz).2, fun x hx y hy z hz => (hs x hx y hy z hz).1.1, fun x hx y hy z hz => (hs x hx y hy z hz).1.2⟩ replace hgi : IntegrableOn (fun x ↦ C * ‖g x‖) k := by exact hgi.norm.smul C obtain ⟨c, hc, d, hd, hlt⟩ : ∃ c ∈ s, ∃ d ∈ s, (‖f c‖ + ∫ y in k, C * ‖g y‖) < ‖f d‖ := by rcases Filter.nonempty_of_mem hsl with ⟨c, hc⟩ have : ∀ᶠ x in l, (‖f c‖ + ∫ y in k, C * ‖g y‖) < ‖f x‖ := hf.eventually (eventually_gt_atTop _) exact ⟨c, hc, (this.and hsl).exists.imp fun d hd => ⟨hd.2, hd.1⟩⟩ specialize hsub c hc d hd; specialize hfd c hc d hd replace hg : ∀ x ∈ Ι c d, ‖deriv f x‖ ≤ C * ‖g x‖ := fun z hz => hg c hc d hd z ⟨hz.1.le, hz.2⟩ have hg_ae : ∀ᵐ x ∂volume.restrict (Ι c d), ‖deriv f x‖ ≤ C * ‖g x‖ := (ae_restrict_mem measurableSet_uIoc).mono hg have hsub' : Ι c d ⊆ k := Subset.trans Ioc_subset_Icc_self hsub have hfi : IntervalIntegrable (deriv f) volume c d := by rw [intervalIntegrable_iff] have : IntegrableOn (fun x ↦ C * ‖g x‖) (Ι c d) := IntegrableOn.mono hgi hsub' le_rfl exact Integrable.mono' this (aestronglyMeasurable_deriv _ _) hg_ae refine hlt.not_le (sub_le_iff_le_add'.1 ?_) calc ‖f d‖ - ‖f c‖ ≤ ‖f d - f c‖ := norm_sub_norm_le _ _ _ = ‖∫ x in c..d, deriv f x‖ := congr_arg _ (integral_deriv_eq_sub hfd hfi).symm _ = ‖∫ x in Ι c d, deriv f x‖ := norm_integral_eq_norm_integral_Ioc _ _ ≤ ∫ x in Ι c d, ‖deriv f x‖ := norm_integral_le_integral_norm _ _ ≤ ∫ x in Ι c d, C * ‖g x‖ := setIntegral_mono_on hfi.norm.def' (hgi.mono_set hsub') measurableSet_uIoc hg _ ≤ ∫ x in k, C * ‖g x‖ := by apply setIntegral_mono_set hgi (ae_of_all _ fun x => mul_nonneg hC₀ (norm_nonneg _)) hsub'.eventuallyLE
Mathlib/Analysis/SpecialFunctions/NonIntegrable.lean
98
121
theorem not_integrableOn_of_tendsto_norm_atTop_of_deriv_isBigO_filter {f : ℝ → E} {g : ℝ → F} {k : Set ℝ} (l : Filter ℝ) [NeBot l] [TendstoIxxClass Icc l l] (hl : k ∈ l) (hd : ∀ᶠ x in l, DifferentiableAt ℝ f x) (hf : Tendsto (fun x => ‖f x‖) l atTop) (hfg : deriv f =O[l] g) : ¬IntegrableOn g k := by
let a : E →ₗᵢ[ℝ] UniformSpace.Completion E := UniformSpace.Completion.toComplₗᵢ let f' := a ∘ f have h'd : ∀ᶠ x in l, DifferentiableAt ℝ f' x := by filter_upwards [hd] with x hx using a.toContinuousLinearMap.differentiableAt.comp x hx have h'f : Tendsto (fun x => ‖f' x‖) l atTop := hf.congr (fun x ↦ by simp [f']) have h'fg : deriv f' =O[l] g := by apply IsBigO.trans _ hfg rw [← isBigO_norm_norm] suffices (fun x ↦ ‖deriv f' x‖) =ᶠ[l] (fun x ↦ ‖deriv f x‖) by exact this.isBigO filter_upwards [hd] with x hx have : deriv f' x = a (deriv f x) := by rw [fderiv.comp_deriv x _ hx] · have : fderiv ℝ a (f x) = a.toContinuousLinearMap := a.toContinuousLinearMap.fderiv simp only [this] rfl · exact a.toContinuousLinearMap.differentiableAt simp only [this] simp exact not_integrableOn_of_tendsto_norm_atTop_of_deriv_isBigO_filter_aux l hl h'd h'f h'fg
19
178,482,300.963187
2
2
2
1,967
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.NormedSpace.Dual import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.ae_eq_of_integral from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4" open MeasureTheory TopologicalSpace NormedSpace Filter open scoped ENNReal NNReal MeasureTheory Topology namespace MeasureTheory section AeEqOfForall variable {α E 𝕜 : Type*} {m : MeasurableSpace α} {μ : Measure α} [RCLike 𝕜]
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
57
67
theorem ae_eq_zero_of_forall_inner [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [SecondCountableTopology E] {f : α → E} (hf : ∀ c : E, (fun x => (inner c (f x) : 𝕜)) =ᵐ[μ] 0) : f =ᵐ[μ] 0 := by
let s := denseSeq E have hs : DenseRange s := denseRange_denseSeq E have hf' : ∀ᵐ x ∂μ, ∀ n : ℕ, inner (s n) (f x) = (0 : 𝕜) := ae_all_iff.mpr fun n => hf (s n) refine hf'.mono fun x hx => ?_ rw [Pi.zero_apply, ← @inner_self_eq_zero 𝕜] have h_closed : IsClosed {c : E | inner c (f x) = (0 : 𝕜)} := isClosed_eq (continuous_id.inner continuous_const) continuous_const exact @isClosed_property ℕ E _ s (fun c => inner c (f x) = (0 : 𝕜)) hs h_closed (fun n => hx n) _
8
2,980.957987
2
2
6
1,968
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.NormedSpace.Dual import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.ae_eq_of_integral from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4" open MeasureTheory TopologicalSpace NormedSpace Filter open scoped ENNReal NNReal MeasureTheory Topology namespace MeasureTheory section AeEqOfForall variable {α E 𝕜 : Type*} {m : MeasurableSpace α} {μ : Measure α} [RCLike 𝕜] theorem ae_eq_zero_of_forall_inner [NormedAddCommGroup E] [InnerProductSpace 𝕜 E] [SecondCountableTopology E] {f : α → E} (hf : ∀ c : E, (fun x => (inner c (f x) : 𝕜)) =ᵐ[μ] 0) : f =ᵐ[μ] 0 := by let s := denseSeq E have hs : DenseRange s := denseRange_denseSeq E have hf' : ∀ᵐ x ∂μ, ∀ n : ℕ, inner (s n) (f x) = (0 : 𝕜) := ae_all_iff.mpr fun n => hf (s n) refine hf'.mono fun x hx => ?_ rw [Pi.zero_apply, ← @inner_self_eq_zero 𝕜] have h_closed : IsClosed {c : E | inner c (f x) = (0 : 𝕜)} := isClosed_eq (continuous_id.inner continuous_const) continuous_const exact @isClosed_property ℕ E _ s (fun c => inner c (f x) = (0 : 𝕜)) hs h_closed (fun n => hx n) _ #align measure_theory.ae_eq_zero_of_forall_inner MeasureTheory.ae_eq_zero_of_forall_inner local notation "⟪" x ", " y "⟫" => y x variable (𝕜)
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
74
106
theorem ae_eq_zero_of_forall_dual_of_isSeparable [NormedAddCommGroup E] [NormedSpace 𝕜 E] {t : Set E} (ht : TopologicalSpace.IsSeparable t) {f : α → E} (hf : ∀ c : Dual 𝕜 E, (fun x => ⟪f x, c⟫) =ᵐ[μ] 0) (h't : ∀ᵐ x ∂μ, f x ∈ t) : f =ᵐ[μ] 0 := by
rcases ht with ⟨d, d_count, hd⟩ haveI : Encodable d := d_count.toEncodable have : ∀ x : d, ∃ g : E →L[𝕜] 𝕜, ‖g‖ ≤ 1 ∧ g x = ‖(x : E)‖ := fun x => exists_dual_vector'' 𝕜 (x : E) choose s hs using this have A : ∀ a : E, a ∈ t → (∀ x, ⟪a, s x⟫ = (0 : 𝕜)) → a = 0 := by intro a hat ha contrapose! ha have a_pos : 0 < ‖a‖ := by simp only [ha, norm_pos_iff, Ne, not_false_iff] have a_mem : a ∈ closure d := hd hat obtain ⟨x, hx⟩ : ∃ x : d, dist a x < ‖a‖ / 2 := by rcases Metric.mem_closure_iff.1 a_mem (‖a‖ / 2) (half_pos a_pos) with ⟨x, h'x, hx⟩ exact ⟨⟨x, h'x⟩, hx⟩ use x have I : ‖a‖ / 2 < ‖(x : E)‖ := by have : ‖a‖ ≤ ‖(x : E)‖ + ‖a - x‖ := norm_le_insert' _ _ have : ‖a - x‖ < ‖a‖ / 2 := by rwa [dist_eq_norm] at hx linarith intro h apply lt_irrefl ‖s x x‖ calc ‖s x x‖ = ‖s x (x - a)‖ := by simp only [h, sub_zero, ContinuousLinearMap.map_sub] _ ≤ 1 * ‖(x : E) - a‖ := ContinuousLinearMap.le_of_opNorm_le _ (hs x).1 _ _ < ‖a‖ / 2 := by rw [one_mul]; rwa [dist_eq_norm'] at hx _ < ‖(x : E)‖ := I _ = ‖s x x‖ := by rw [(hs x).2, RCLike.norm_coe_norm] have hfs : ∀ y : d, ∀ᵐ x ∂μ, ⟪f x, s y⟫ = (0 : 𝕜) := fun y => hf (s y) have hf' : ∀ᵐ x ∂μ, ∀ y : d, ⟪f x, s y⟫ = (0 : 𝕜) := by rwa [ae_all_iff] filter_upwards [hf', h't] with x hx h'x exact A (f x) h'x hx
30
10,686,474,581,524.463
2
2
6
1,968
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.NormedSpace.Dual import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.ae_eq_of_integral from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4" open MeasureTheory TopologicalSpace NormedSpace Filter open scoped ENNReal NNReal MeasureTheory Topology namespace MeasureTheory variable {α E : Type*} {m m0 : MeasurableSpace α} {μ : Measure α} {s t : Set α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {p : ℝ≥0∞} section AeEqOfForallSetIntegralEq
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
125
157
theorem ae_const_le_iff_forall_lt_measure_zero {β} [LinearOrder β] [TopologicalSpace β] [OrderTopology β] [FirstCountableTopology β] (f : α → β) (c : β) : (∀ᵐ x ∂μ, c ≤ f x) ↔ ∀ b < c, μ {x | f x ≤ b} = 0 := by
rw [ae_iff] push_neg constructor · intro h b hb exact measure_mono_null (fun y hy => (lt_of_le_of_lt hy hb : _)) h intro hc by_cases h : ∀ b, c ≤ b · have : {a : α | f a < c} = ∅ := by apply Set.eq_empty_iff_forall_not_mem.2 fun x hx => ?_ exact (lt_irrefl _ (lt_of_lt_of_le hx (h (f x)))).elim simp [this] by_cases H : ¬IsLUB (Set.Iio c) c · have : c ∈ upperBounds (Set.Iio c) := fun y hy => le_of_lt hy obtain ⟨b, b_up, bc⟩ : ∃ b : β, b ∈ upperBounds (Set.Iio c) ∧ b < c := by simpa [IsLUB, IsLeast, this, lowerBounds] using H exact measure_mono_null (fun x hx => b_up hx) (hc b bc) push_neg at H h obtain ⟨u, _, u_lt, u_lim, -⟩ : ∃ u : ℕ → β, StrictMono u ∧ (∀ n : ℕ, u n < c) ∧ Tendsto u atTop (𝓝 c) ∧ ∀ n : ℕ, u n ∈ Set.Iio c := H.exists_seq_strictMono_tendsto_of_not_mem (lt_irrefl c) h have h_Union : {x | f x < c} = ⋃ n : ℕ, {x | f x ≤ u n} := by ext1 x simp_rw [Set.mem_iUnion, Set.mem_setOf_eq] constructor <;> intro h · obtain ⟨n, hn⟩ := ((tendsto_order.1 u_lim).1 _ h).exists; exact ⟨n, hn.le⟩ · obtain ⟨n, hn⟩ := h; exact hn.trans_lt (u_lt _) rw [h_Union, measure_iUnion_null_iff] intro n exact hc _ (u_lt n)
30
10,686,474,581,524.463
2
2
6
1,968
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.NormedSpace.Dual import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.ae_eq_of_integral from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4" open MeasureTheory TopologicalSpace NormedSpace Filter open scoped ENNReal NNReal MeasureTheory Topology namespace MeasureTheory variable {α E : Type*} {m m0 : MeasurableSpace α} {μ : Measure α} {s t : Set α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {p : ℝ≥0∞} section AeEqOfForallSetIntegralEq theorem ae_const_le_iff_forall_lt_measure_zero {β} [LinearOrder β] [TopologicalSpace β] [OrderTopology β] [FirstCountableTopology β] (f : α → β) (c : β) : (∀ᵐ x ∂μ, c ≤ f x) ↔ ∀ b < c, μ {x | f x ≤ b} = 0 := by rw [ae_iff] push_neg constructor · intro h b hb exact measure_mono_null (fun y hy => (lt_of_le_of_lt hy hb : _)) h intro hc by_cases h : ∀ b, c ≤ b · have : {a : α | f a < c} = ∅ := by apply Set.eq_empty_iff_forall_not_mem.2 fun x hx => ?_ exact (lt_irrefl _ (lt_of_lt_of_le hx (h (f x)))).elim simp [this] by_cases H : ¬IsLUB (Set.Iio c) c · have : c ∈ upperBounds (Set.Iio c) := fun y hy => le_of_lt hy obtain ⟨b, b_up, bc⟩ : ∃ b : β, b ∈ upperBounds (Set.Iio c) ∧ b < c := by simpa [IsLUB, IsLeast, this, lowerBounds] using H exact measure_mono_null (fun x hx => b_up hx) (hc b bc) push_neg at H h obtain ⟨u, _, u_lt, u_lim, -⟩ : ∃ u : ℕ → β, StrictMono u ∧ (∀ n : ℕ, u n < c) ∧ Tendsto u atTop (𝓝 c) ∧ ∀ n : ℕ, u n ∈ Set.Iio c := H.exists_seq_strictMono_tendsto_of_not_mem (lt_irrefl c) h have h_Union : {x | f x < c} = ⋃ n : ℕ, {x | f x ≤ u n} := by ext1 x simp_rw [Set.mem_iUnion, Set.mem_setOf_eq] constructor <;> intro h · obtain ⟨n, hn⟩ := ((tendsto_order.1 u_lim).1 _ h).exists; exact ⟨n, hn.le⟩ · obtain ⟨n, hn⟩ := h; exact hn.trans_lt (u_lt _) rw [h_Union, measure_iUnion_null_iff] intro n exact hc _ (u_lt n) #align measure_theory.ae_const_le_iff_forall_lt_measure_zero MeasureTheory.ae_const_le_iff_forall_lt_measure_zero section ENNReal open scoped Topology
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
164
221
theorem ae_le_of_forall_set_lintegral_le_of_sigmaFinite [SigmaFinite μ] {f g : α → ℝ≥0∞} (hf : Measurable f) (hg : Measurable g) (h : ∀ s, MeasurableSet s → μ s < ∞ → (∫⁻ x in s, f x ∂μ) ≤ ∫⁻ x in s, g x ∂μ) : f ≤ᵐ[μ] g := by
have A : ∀ (ε N : ℝ≥0) (p : ℕ), 0 < ε → μ ({x | g x + ε ≤ f x ∧ g x ≤ N} ∩ spanningSets μ p) = 0 := by intro ε N p εpos let s := {x | g x + ε ≤ f x ∧ g x ≤ N} ∩ spanningSets μ p have s_meas : MeasurableSet s := by have A : MeasurableSet {x | g x + ε ≤ f x} := measurableSet_le (hg.add measurable_const) hf have B : MeasurableSet {x | g x ≤ N} := measurableSet_le hg measurable_const exact (A.inter B).inter (measurable_spanningSets μ p) have s_lt_top : μ s < ∞ := (measure_mono (Set.inter_subset_right)).trans_lt (measure_spanningSets_lt_top μ p) have A : (∫⁻ x in s, g x ∂μ) + ε * μ s ≤ (∫⁻ x in s, g x ∂μ) + 0 := calc (∫⁻ x in s, g x ∂μ) + ε * μ s = (∫⁻ x in s, g x ∂μ) + ∫⁻ _ in s, ε ∂μ := by simp only [lintegral_const, Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] _ = ∫⁻ x in s, g x + ε ∂μ := (lintegral_add_right _ measurable_const).symm _ ≤ ∫⁻ x in s, f x ∂μ := (set_lintegral_mono (hg.add measurable_const) hf fun x hx => hx.1.1) _ ≤ (∫⁻ x in s, g x ∂μ) + 0 := by rw [add_zero]; exact h s s_meas s_lt_top have B : (∫⁻ x in s, g x ∂μ) ≠ ∞ := by apply ne_of_lt calc (∫⁻ x in s, g x ∂μ) ≤ ∫⁻ _ in s, N ∂μ := set_lintegral_mono hg measurable_const fun x hx => hx.1.2 _ = N * μ s := by simp only [lintegral_const, Set.univ_inter, MeasurableSet.univ, Measure.restrict_apply] _ < ∞ := by simp only [lt_top_iff_ne_top, s_lt_top.ne, and_false_iff, ENNReal.coe_ne_top, ENNReal.mul_eq_top, Ne, not_false_iff, false_and_iff, or_self_iff] have : (ε : ℝ≥0∞) * μ s ≤ 0 := ENNReal.le_of_add_le_add_left B A simpa only [ENNReal.coe_eq_zero, nonpos_iff_eq_zero, mul_eq_zero, εpos.ne', false_or_iff] obtain ⟨u, _, u_pos, u_lim⟩ : ∃ u : ℕ → ℝ≥0, StrictAnti u ∧ (∀ n, 0 < u n) ∧ Tendsto u atTop (𝓝 0) := exists_seq_strictAnti_tendsto (0 : ℝ≥0) let s := fun n : ℕ => {x | g x + u n ≤ f x ∧ g x ≤ (n : ℝ≥0)} ∩ spanningSets μ n have μs : ∀ n, μ (s n) = 0 := fun n => A _ _ _ (u_pos n) have B : {x | f x ≤ g x}ᶜ ⊆ ⋃ n, s n := by intro x hx simp only [Set.mem_compl_iff, Set.mem_setOf, not_le] at hx have L1 : ∀ᶠ n in atTop, g x + u n ≤ f x := by have : Tendsto (fun n => g x + u n) atTop (𝓝 (g x + (0 : ℝ≥0))) := tendsto_const_nhds.add (ENNReal.tendsto_coe.2 u_lim) simp only [ENNReal.coe_zero, add_zero] at this exact eventually_le_of_tendsto_lt hx this have L2 : ∀ᶠ n : ℕ in (atTop : Filter ℕ), g x ≤ (n : ℝ≥0) := haveI : Tendsto (fun n : ℕ => ((n : ℝ≥0) : ℝ≥0∞)) atTop (𝓝 ∞) := by simp only [ENNReal.coe_natCast] exact ENNReal.tendsto_nat_nhds_top eventually_ge_of_tendsto_gt (hx.trans_le le_top) this apply Set.mem_iUnion.2 exact ((L1.and L2).and (eventually_mem_spanningSets μ x)).exists refine le_antisymm ?_ bot_le calc μ {x : α | (fun x : α => f x ≤ g x) x}ᶜ ≤ μ (⋃ n, s n) := measure_mono B _ ≤ ∑' n, μ (s n) := measure_iUnion_le _ _ = 0 := by simp only [μs, tsum_zero]
55
769,478,526,514,201,800,000,000
2
2
6
1,968
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.NormedSpace.Dual import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.ae_eq_of_integral from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4" open MeasureTheory TopologicalSpace NormedSpace Filter open scoped ENNReal NNReal MeasureTheory Topology namespace MeasureTheory variable {α E : Type*} {m m0 : MeasurableSpace α} {μ : Measure α} {s t : Set α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {p : ℝ≥0∞} section AeEqOfForallSetIntegralEq theorem ae_const_le_iff_forall_lt_measure_zero {β} [LinearOrder β] [TopologicalSpace β] [OrderTopology β] [FirstCountableTopology β] (f : α → β) (c : β) : (∀ᵐ x ∂μ, c ≤ f x) ↔ ∀ b < c, μ {x | f x ≤ b} = 0 := by rw [ae_iff] push_neg constructor · intro h b hb exact measure_mono_null (fun y hy => (lt_of_le_of_lt hy hb : _)) h intro hc by_cases h : ∀ b, c ≤ b · have : {a : α | f a < c} = ∅ := by apply Set.eq_empty_iff_forall_not_mem.2 fun x hx => ?_ exact (lt_irrefl _ (lt_of_lt_of_le hx (h (f x)))).elim simp [this] by_cases H : ¬IsLUB (Set.Iio c) c · have : c ∈ upperBounds (Set.Iio c) := fun y hy => le_of_lt hy obtain ⟨b, b_up, bc⟩ : ∃ b : β, b ∈ upperBounds (Set.Iio c) ∧ b < c := by simpa [IsLUB, IsLeast, this, lowerBounds] using H exact measure_mono_null (fun x hx => b_up hx) (hc b bc) push_neg at H h obtain ⟨u, _, u_lt, u_lim, -⟩ : ∃ u : ℕ → β, StrictMono u ∧ (∀ n : ℕ, u n < c) ∧ Tendsto u atTop (𝓝 c) ∧ ∀ n : ℕ, u n ∈ Set.Iio c := H.exists_seq_strictMono_tendsto_of_not_mem (lt_irrefl c) h have h_Union : {x | f x < c} = ⋃ n : ℕ, {x | f x ≤ u n} := by ext1 x simp_rw [Set.mem_iUnion, Set.mem_setOf_eq] constructor <;> intro h · obtain ⟨n, hn⟩ := ((tendsto_order.1 u_lim).1 _ h).exists; exact ⟨n, hn.le⟩ · obtain ⟨n, hn⟩ := h; exact hn.trans_lt (u_lt _) rw [h_Union, measure_iUnion_null_iff] intro n exact hc _ (u_lt n) #align measure_theory.ae_const_le_iff_forall_lt_measure_zero MeasureTheory.ae_const_le_iff_forall_lt_measure_zero section Real variable {f : α → ℝ}
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
260
284
theorem ae_nonneg_of_forall_setIntegral_nonneg_of_stronglyMeasurable (hfm : StronglyMeasurable f) (hf : Integrable f μ) (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
simp_rw [EventuallyLE, Pi.zero_apply] rw [ae_const_le_iff_forall_lt_measure_zero] intro b hb_neg let s := {x | f x ≤ b} have hs : MeasurableSet s := hfm.measurableSet_le stronglyMeasurable_const have mus : μ s < ∞ := Integrable.measure_le_lt_top hf hb_neg have h_int_gt : (∫ x in s, f x ∂μ) ≤ b * (μ s).toReal := by have h_const_le : (∫ x in s, f x ∂μ) ≤ ∫ _ in s, b ∂μ := by refine setIntegral_mono_ae_restrict hf.integrableOn (integrableOn_const.mpr (Or.inr mus)) ?_ rw [EventuallyLE, ae_restrict_iff hs] exact eventually_of_forall fun x hxs => hxs rwa [setIntegral_const, smul_eq_mul, mul_comm] at h_const_le by_contra h refine (lt_self_iff_false (∫ x in s, f x ∂μ)).mp (h_int_gt.trans_lt ?_) refine (mul_neg_iff.mpr (Or.inr ⟨hb_neg, ?_⟩)).trans_le ?_ swap · exact hf_zero s hs mus refine ENNReal.toReal_nonneg.lt_of_ne fun h_eq => h ?_ cases' (ENNReal.toReal_eq_zero_iff _).mp h_eq.symm with hμs_eq_zero hμs_eq_top · exact hμs_eq_zero · exact absurd hμs_eq_top mus.ne
22
3,584,912,846.131591
2
2
6
1,968
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.NormedSpace.Dual import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lp import Mathlib.MeasureTheory.Integral.SetIntegral #align_import measure_theory.function.ae_eq_of_integral from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4" open MeasureTheory TopologicalSpace NormedSpace Filter open scoped ENNReal NNReal MeasureTheory Topology namespace MeasureTheory variable {α E : Type*} {m m0 : MeasurableSpace α} {μ : Measure α} {s t : Set α} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {p : ℝ≥0∞} section AeEqOfForallSetIntegralEq theorem ae_const_le_iff_forall_lt_measure_zero {β} [LinearOrder β] [TopologicalSpace β] [OrderTopology β] [FirstCountableTopology β] (f : α → β) (c : β) : (∀ᵐ x ∂μ, c ≤ f x) ↔ ∀ b < c, μ {x | f x ≤ b} = 0 := by rw [ae_iff] push_neg constructor · intro h b hb exact measure_mono_null (fun y hy => (lt_of_le_of_lt hy hb : _)) h intro hc by_cases h : ∀ b, c ≤ b · have : {a : α | f a < c} = ∅ := by apply Set.eq_empty_iff_forall_not_mem.2 fun x hx => ?_ exact (lt_irrefl _ (lt_of_lt_of_le hx (h (f x)))).elim simp [this] by_cases H : ¬IsLUB (Set.Iio c) c · have : c ∈ upperBounds (Set.Iio c) := fun y hy => le_of_lt hy obtain ⟨b, b_up, bc⟩ : ∃ b : β, b ∈ upperBounds (Set.Iio c) ∧ b < c := by simpa [IsLUB, IsLeast, this, lowerBounds] using H exact measure_mono_null (fun x hx => b_up hx) (hc b bc) push_neg at H h obtain ⟨u, _, u_lt, u_lim, -⟩ : ∃ u : ℕ → β, StrictMono u ∧ (∀ n : ℕ, u n < c) ∧ Tendsto u atTop (𝓝 c) ∧ ∀ n : ℕ, u n ∈ Set.Iio c := H.exists_seq_strictMono_tendsto_of_not_mem (lt_irrefl c) h have h_Union : {x | f x < c} = ⋃ n : ℕ, {x | f x ≤ u n} := by ext1 x simp_rw [Set.mem_iUnion, Set.mem_setOf_eq] constructor <;> intro h · obtain ⟨n, hn⟩ := ((tendsto_order.1 u_lim).1 _ h).exists; exact ⟨n, hn.le⟩ · obtain ⟨n, hn⟩ := h; exact hn.trans_lt (u_lt _) rw [h_Union, measure_iUnion_null_iff] intro n exact hc _ (u_lt n) #align measure_theory.ae_const_le_iff_forall_lt_measure_zero MeasureTheory.ae_const_le_iff_forall_lt_measure_zero section Real variable {f : α → ℝ} theorem ae_nonneg_of_forall_setIntegral_nonneg_of_stronglyMeasurable (hfm : StronglyMeasurable f) (hf : Integrable f μ) (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by simp_rw [EventuallyLE, Pi.zero_apply] rw [ae_const_le_iff_forall_lt_measure_zero] intro b hb_neg let s := {x | f x ≤ b} have hs : MeasurableSet s := hfm.measurableSet_le stronglyMeasurable_const have mus : μ s < ∞ := Integrable.measure_le_lt_top hf hb_neg have h_int_gt : (∫ x in s, f x ∂μ) ≤ b * (μ s).toReal := by have h_const_le : (∫ x in s, f x ∂μ) ≤ ∫ _ in s, b ∂μ := by refine setIntegral_mono_ae_restrict hf.integrableOn (integrableOn_const.mpr (Or.inr mus)) ?_ rw [EventuallyLE, ae_restrict_iff hs] exact eventually_of_forall fun x hxs => hxs rwa [setIntegral_const, smul_eq_mul, mul_comm] at h_const_le by_contra h refine (lt_self_iff_false (∫ x in s, f x ∂μ)).mp (h_int_gt.trans_lt ?_) refine (mul_neg_iff.mpr (Or.inr ⟨hb_neg, ?_⟩)).trans_le ?_ swap · exact hf_zero s hs mus refine ENNReal.toReal_nonneg.lt_of_ne fun h_eq => h ?_ cases' (ENNReal.toReal_eq_zero_iff _).mp h_eq.symm with hμs_eq_zero hμs_eq_top · exact hμs_eq_zero · exact absurd hμs_eq_top mus.ne #align measure_theory.ae_nonneg_of_forall_set_integral_nonneg_of_strongly_measurable MeasureTheory.ae_nonneg_of_forall_setIntegral_nonneg_of_stronglyMeasurable @[deprecated (since := "2024-04-17")] alias ae_nonneg_of_forall_set_integral_nonneg_of_stronglyMeasurable := ae_nonneg_of_forall_setIntegral_nonneg_of_stronglyMeasurable
Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
291
302
theorem ae_nonneg_of_forall_setIntegral_nonneg (hf : Integrable f μ) (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
rcases hf.1 with ⟨f', hf'_meas, hf_ae⟩ have hf'_integrable : Integrable f' μ := Integrable.congr hf hf_ae have hf'_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f' x ∂μ := by intro s hs h's rw [setIntegral_congr_ae hs (hf_ae.mono fun x hx _ => hx.symm)] exact hf_zero s hs h's exact (ae_nonneg_of_forall_setIntegral_nonneg_of_stronglyMeasurable hf'_meas hf'_integrable hf'_zero).trans hf_ae.symm.le
10
22,026.465795
2
2
6
1,968
import Mathlib.LinearAlgebra.CliffordAlgebra.Fold import Mathlib.LinearAlgebra.CliffordAlgebra.Grading #align_import linear_algebra.clifford_algebra.even from "leanprover-community/mathlib"@"9264b15ee696b7ca83f13c8ad67c83d6eb70b730" namespace CliffordAlgebra -- Porting note: explicit universes universe uR uM uA uB variable {R : Type uR} {M : Type uM} [CommRing R] [AddCommGroup M] [Module R M] variable {Q : QuadraticForm R M} -- put this after `Q` since we want to talk about morphisms from `CliffordAlgebra Q` to `A` and -- that order is more natural variable {A : Type uA} {B : Type uB} [Ring A] [Ring B] [Algebra R A] [Algebra R B] open scoped DirectSum variable (Q) def even : Subalgebra R (CliffordAlgebra Q) := (evenOdd Q 0).toSubalgebra (SetLike.one_mem_graded _) fun _x _y hx hy => add_zero (0 : ZMod 2) ▸ SetLike.mul_mem_graded hx hy #align clifford_algebra.even CliffordAlgebra.even -- Porting note: added, otherwise Lean can't find this when it needs it instance : AddCommMonoid (even Q) := AddSubmonoidClass.toAddCommMonoid _ @[simp] theorem even_toSubmodule : Subalgebra.toSubmodule (even Q) = evenOdd Q 0 := rfl #align clifford_algebra.even_to_submodule CliffordAlgebra.even_toSubmodule variable (A) @[ext] structure EvenHom : Type max uA uM where bilin : M →ₗ[R] M →ₗ[R] A contract (m : M) : bilin m m = algebraMap R A (Q m) contract_mid (m₁ m₂ m₃ : M) : bilin m₁ m₂ * bilin m₂ m₃ = Q m₂ • bilin m₁ m₃ #align clifford_algebra.even_hom CliffordAlgebra.EvenHom variable {A Q} @[simps] def EvenHom.compr₂ (g : EvenHom Q A) (f : A →ₐ[R] B) : EvenHom Q B where bilin := g.bilin.compr₂ f.toLinearMap contract _m := (f.congr_arg <| g.contract _).trans <| f.commutes _ contract_mid _m₁ _m₂ _m₃ := (f.map_mul _ _).symm.trans <| (f.congr_arg <| g.contract_mid _ _ _).trans <| f.map_smul _ _ #align clifford_algebra.even_hom.compr₂ CliffordAlgebra.EvenHom.compr₂ variable (Q) nonrec def even.ι : EvenHom Q (even Q) where bilin := LinearMap.mk₂ R (fun m₁ m₂ => ⟨ι Q m₁ * ι Q m₂, ι_mul_ι_mem_evenOdd_zero Q _ _⟩) (fun _ _ _ => by simp only [LinearMap.map_add, add_mul]; rfl) (fun _ _ _ => by simp only [LinearMap.map_smul, smul_mul_assoc]; rfl) (fun _ _ _ => by simp only [LinearMap.map_add, mul_add]; rfl) fun _ _ _ => by simp only [LinearMap.map_smul, mul_smul_comm]; rfl contract m := Subtype.ext <| ι_sq_scalar Q m contract_mid m₁ m₂ m₃ := Subtype.ext <| calc ι Q m₁ * ι Q m₂ * (ι Q m₂ * ι Q m₃) = ι Q m₁ * (ι Q m₂ * ι Q m₂ * ι Q m₃) := by simp only [mul_assoc] _ = Q m₂ • (ι Q m₁ * ι Q m₃) := by rw [Algebra.smul_def, ι_sq_scalar, Algebra.left_comm] #align clifford_algebra.even.ι CliffordAlgebra.even.ι instance : Inhabited (EvenHom Q (even Q)) := ⟨even.ι Q⟩ variable (f : EvenHom Q A) @[ext high]
Mathlib/LinearAlgebra/CliffordAlgebra/Even.lean
116
128
theorem even.algHom_ext ⦃f g : even Q →ₐ[R] A⦄ (h : (even.ι Q).compr₂ f = (even.ι Q).compr₂ g) : f = g := by
rw [EvenHom.ext_iff] at h ext ⟨x, hx⟩ induction x, hx using even_induction with | algebraMap r => exact (f.commutes r).trans (g.commutes r).symm | add x y hx hy ihx ihy => have := congr_arg₂ (· + ·) ihx ihy exact (f.map_add _ _).trans (this.trans <| (g.map_add _ _).symm) | ι_mul_ι_mul m₁ m₂ x hx ih => have := congr_arg₂ (· * ·) (LinearMap.congr_fun (LinearMap.congr_fun h m₁) m₂) ih exact (f.map_mul _ _).trans (this.trans <| (g.map_mul _ _).symm)
11
59,874.141715
2
2
1
1,969
import Mathlib.Init.Align import Mathlib.Data.Fintype.Order import Mathlib.Algebra.DirectLimit import Mathlib.ModelTheory.Quotients import Mathlib.ModelTheory.FinitelyGenerated #align_import model_theory.direct_limit from "leanprover-community/mathlib"@"f53b23994ac4c13afa38d31195c588a1121d1860" universe v w w' u₁ u₂ open FirstOrder namespace FirstOrder namespace Language open Structure Set variable {L : Language} {ι : Type v} [Preorder ι] variable {G : ι → Type w} [∀ i, L.Structure (G i)] variable (f : ∀ i j, i ≤ j → G i ↪[L] G j) namespace DirectedSystem nonrec theorem map_self [DirectedSystem G fun i j h => f i j h] (i x h) : f i i h x = x := DirectedSystem.map_self (fun i j h => f i j h) i x h #align first_order.language.directed_system.map_self FirstOrder.Language.DirectedSystem.map_self nonrec theorem map_map [DirectedSystem G fun i j h => f i j h] {i j k} (hij hjk x) : f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x := DirectedSystem.map_map (fun i j h => f i j h) hij hjk x #align first_order.language.directed_system.map_map FirstOrder.Language.DirectedSystem.map_map variable {G' : ℕ → Type w} [∀ i, L.Structure (G' i)] (f' : ∀ n : ℕ, G' n ↪[L] G' (n + 1)) def natLERec (m n : ℕ) (h : m ≤ n) : G' m ↪[L] G' n := Nat.leRecOn h (@fun k g => (f' k).comp g) (Embedding.refl L _) #align first_order.language.directed_system.nat_le_rec FirstOrder.Language.DirectedSystem.natLERec @[simp]
Mathlib/ModelTheory/DirectLimit.lean
67
76
theorem coe_natLERec (m n : ℕ) (h : m ≤ n) : (natLERec f' m n h : G' m → G' n) = Nat.leRecOn h (@fun k => f' k) := by
obtain ⟨k, rfl⟩ := Nat.exists_eq_add_of_le h ext x induction' k with k ih · -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644 erw [natLERec, Nat.leRecOn_self, Embedding.refl_apply, Nat.leRecOn_self] · -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644 erw [Nat.leRecOn_succ le_self_add, natLERec, Nat.leRecOn_succ le_self_add, ← natLERec, Embedding.comp_apply, ih]
8
2,980.957987
2
2
1
1,970
import Mathlib.AlgebraicTopology.DoldKan.Normalized #align_import algebraic_topology.dold_kan.homotopy_equivalence from "leanprover-community/mathlib"@"f951e201d416fb50cc7826171d80aa510ec20747" open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Preadditive Simplicial DoldKan noncomputable section namespace AlgebraicTopology namespace DoldKan variable {C : Type*} [Category C] [Preadditive C] (X : SimplicialObject C) noncomputable def homotopyPToId : ∀ q : ℕ, Homotopy (P q : K[X] ⟶ _) (𝟙 _) | 0 => Homotopy.refl _ | q + 1 => by refine Homotopy.trans (Homotopy.ofEq ?_) (Homotopy.trans (Homotopy.add (homotopyPToId q) (Homotopy.compLeft (homotopyHσToZero q) (P q))) (Homotopy.ofEq ?_)) · simp only [P_succ, comp_add, comp_id] · simp only [add_zero, comp_zero] set_option linter.uppercaseLean3 false in #align algebraic_topology.dold_kan.homotopy_P_to_id AlgebraicTopology.DoldKan.homotopyPToId def homotopyQToZero (q : ℕ) : Homotopy (Q q : K[X] ⟶ _) 0 := Homotopy.equivSubZero.toFun (homotopyPToId X q).symm set_option linter.uppercaseLean3 false in #align algebraic_topology.dold_kan.homotopy_Q_to_zero AlgebraicTopology.DoldKan.homotopyQToZero
Mathlib/AlgebraicTopology/DoldKan/HomotopyEquivalence.lean
52
58
theorem homotopyPToId_eventually_constant {q n : ℕ} (hqn : n < q) : ((homotopyPToId X (q + 1)).hom n (n + 1) : X _[n] ⟶ X _[n + 1]) = (homotopyPToId X q).hom n (n + 1) := by
simp only [homotopyHσToZero, AlternatingFaceMapComplex.obj_X, Nat.add_eq, Homotopy.trans_hom, Homotopy.ofEq_hom, Pi.zero_apply, Homotopy.add_hom, Homotopy.compLeft_hom, add_zero, Homotopy.nullHomotopy'_hom, ComplexShape.down_Rel, hσ'_eq_zero hqn (c_mk (n + 1) n rfl), dite_eq_ite, ite_self, comp_zero, zero_add, homotopyPToId]
4
54.59815
2
2
1
1,971
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.SpecialFunctions.Complex.Arg #align_import analysis.complex.arg from "leanprover-community/mathlib"@"45a46f4f03f8ae41491bf3605e8e0e363ba192fd" variable {x y : ℂ} namespace Complex
Mathlib/Analysis/Complex/Arg.lean
31
38
theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by
rcases eq_or_ne x 0 with (rfl | hx) · simp rcases eq_or_ne y 0 with (rfl | hy) · simp simp only [hx, hy, false_or_iff, sameRay_iff_norm_smul_eq, arg_eq_arg_iff hx hy] field_simp [hx, hy] rw [mul_comm, eq_comm]
7
1,096.633158
2
2
2
1,972
import Mathlib.Analysis.InnerProductSpace.Basic import Mathlib.Analysis.SpecialFunctions.Complex.Arg #align_import analysis.complex.arg from "leanprover-community/mathlib"@"45a46f4f03f8ae41491bf3605e8e0e363ba192fd" variable {x y : ℂ} namespace Complex theorem sameRay_iff : SameRay ℝ x y ↔ x = 0 ∨ y = 0 ∨ x.arg = y.arg := by rcases eq_or_ne x 0 with (rfl | hx) · simp rcases eq_or_ne y 0 with (rfl | hy) · simp simp only [hx, hy, false_or_iff, sameRay_iff_norm_smul_eq, arg_eq_arg_iff hx hy] field_simp [hx, hy] rw [mul_comm, eq_comm] #align complex.same_ray_iff Complex.sameRay_iff
Mathlib/Analysis/Complex/Arg.lean
41
45
theorem sameRay_iff_arg_div_eq_zero : SameRay ℝ x y ↔ arg (x / y) = 0 := by
rw [← Real.Angle.toReal_zero, ← arg_coe_angle_eq_iff_eq_toReal, sameRay_iff] by_cases hx : x = 0; · simp [hx] by_cases hy : y = 0; · simp [hy] simp [hx, hy, arg_div_coe_angle, sub_eq_zero]
4
54.59815
2
2
2
1,972
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {𝕜 : Type u} [NontriviallyNormedField 𝕜] variable {E : Type v} [NormedAddCommGroup E] [NormedSpace 𝕜 E] variable {x : 𝕜} variable {s : Set 𝕜} variable {m : ℤ}
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
39
58
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by lift m to ℕ using hm.le simp only [zpow_natCast, Int.cast_natCast] convert hasStrictDerivAt_pow m x using 2 rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast] norm_cast at hm rcases lt_trichotomy m 0 with (hm | hm | hm) · have hx : x ≠ 0 := h.resolve_right hm.not_le have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;> [skip; exact zpow_ne_zero _ hx] simp only [(· ∘ ·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this convert this using 1 rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_add₀ hx, mul_assoc, ← zpow_add₀ hx] congr abel · simp only [hm, zpow_zero, Int.cast_zero, zero_mul, hasStrictDerivAt_const] · exact this m hm
18
65,659,969.137331
2
2
4
1,973
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {𝕜 : Type u} [NontriviallyNormedField 𝕜] variable {E : Type v} [NormedAddCommGroup E] [NormedSpace 𝕜 E] variable {x : 𝕜} variable {s : Set 𝕜} variable {m : ℤ} theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by lift m to ℕ using hm.le simp only [zpow_natCast, Int.cast_natCast] convert hasStrictDerivAt_pow m x using 2 rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast] norm_cast at hm rcases lt_trichotomy m 0 with (hm | hm | hm) · have hx : x ≠ 0 := h.resolve_right hm.not_le have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;> [skip; exact zpow_ne_zero _ hx] simp only [(· ∘ ·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this convert this using 1 rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_add₀ hx, mul_assoc, ← zpow_add₀ hx] congr abel · simp only [hm, zpow_zero, Int.cast_zero, zero_mul, hasStrictDerivAt_const] · exact this m hm #align has_strict_deriv_at_zpow hasStrictDerivAt_zpow theorem hasDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : HasDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := (hasStrictDerivAt_zpow m x h).hasDerivAt #align has_deriv_at_zpow hasDerivAt_zpow theorem hasDerivWithinAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) (s : Set 𝕜) : HasDerivWithinAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) s x := (hasDerivAt_zpow m x h).hasDerivWithinAt #align has_deriv_within_at_zpow hasDerivWithinAt_zpow theorem differentiableAt_zpow : DifferentiableAt 𝕜 (fun x => x ^ m) x ↔ x ≠ 0 ∨ 0 ≤ m := ⟨fun H => NormedField.continuousAt_zpow.1 H.continuousAt, fun H => (hasDerivAt_zpow m x H).differentiableAt⟩ #align differentiable_at_zpow differentiableAt_zpow theorem differentiableWithinAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : DifferentiableWithinAt 𝕜 (fun x => x ^ m) s x := (differentiableAt_zpow.mpr h).differentiableWithinAt #align differentiable_within_at_zpow differentiableWithinAt_zpow theorem differentiableOn_zpow (m : ℤ) (s : Set 𝕜) (h : (0 : 𝕜) ∉ s ∨ 0 ≤ m) : DifferentiableOn 𝕜 (fun x => x ^ m) s := fun x hxs => differentiableWithinAt_zpow m x <| h.imp_left <| ne_of_mem_of_not_mem hxs #align differentiable_on_zpow differentiableOn_zpow
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
86
92
theorem deriv_zpow (m : ℤ) (x : 𝕜) : deriv (fun x => x ^ m) x = m * x ^ (m - 1) := by
by_cases H : x ≠ 0 ∨ 0 ≤ m · exact (hasDerivAt_zpow m x H).deriv · rw [deriv_zero_of_not_differentiableAt (mt differentiableAt_zpow.1 H)] push_neg at H rcases H with ⟨rfl, hm⟩ rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, mul_zero]
6
403.428793
2
2
4
1,973
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {𝕜 : Type u} [NontriviallyNormedField 𝕜] variable {E : Type v} [NormedAddCommGroup E] [NormedSpace 𝕜 E] variable {x : 𝕜} variable {s : Set 𝕜} variable {m : ℤ} theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by lift m to ℕ using hm.le simp only [zpow_natCast, Int.cast_natCast] convert hasStrictDerivAt_pow m x using 2 rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast] norm_cast at hm rcases lt_trichotomy m 0 with (hm | hm | hm) · have hx : x ≠ 0 := h.resolve_right hm.not_le have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;> [skip; exact zpow_ne_zero _ hx] simp only [(· ∘ ·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this convert this using 1 rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_add₀ hx, mul_assoc, ← zpow_add₀ hx] congr abel · simp only [hm, zpow_zero, Int.cast_zero, zero_mul, hasStrictDerivAt_const] · exact this m hm #align has_strict_deriv_at_zpow hasStrictDerivAt_zpow theorem hasDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : HasDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := (hasStrictDerivAt_zpow m x h).hasDerivAt #align has_deriv_at_zpow hasDerivAt_zpow theorem hasDerivWithinAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) (s : Set 𝕜) : HasDerivWithinAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) s x := (hasDerivAt_zpow m x h).hasDerivWithinAt #align has_deriv_within_at_zpow hasDerivWithinAt_zpow theorem differentiableAt_zpow : DifferentiableAt 𝕜 (fun x => x ^ m) x ↔ x ≠ 0 ∨ 0 ≤ m := ⟨fun H => NormedField.continuousAt_zpow.1 H.continuousAt, fun H => (hasDerivAt_zpow m x H).differentiableAt⟩ #align differentiable_at_zpow differentiableAt_zpow theorem differentiableWithinAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : DifferentiableWithinAt 𝕜 (fun x => x ^ m) s x := (differentiableAt_zpow.mpr h).differentiableWithinAt #align differentiable_within_at_zpow differentiableWithinAt_zpow theorem differentiableOn_zpow (m : ℤ) (s : Set 𝕜) (h : (0 : 𝕜) ∉ s ∨ 0 ≤ m) : DifferentiableOn 𝕜 (fun x => x ^ m) s := fun x hxs => differentiableWithinAt_zpow m x <| h.imp_left <| ne_of_mem_of_not_mem hxs #align differentiable_on_zpow differentiableOn_zpow theorem deriv_zpow (m : ℤ) (x : 𝕜) : deriv (fun x => x ^ m) x = m * x ^ (m - 1) := by by_cases H : x ≠ 0 ∨ 0 ≤ m · exact (hasDerivAt_zpow m x H).deriv · rw [deriv_zero_of_not_differentiableAt (mt differentiableAt_zpow.1 H)] push_neg at H rcases H with ⟨rfl, hm⟩ rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, mul_zero] #align deriv_zpow deriv_zpow @[simp] theorem deriv_zpow' (m : ℤ) : (deriv fun x : 𝕜 => x ^ m) = fun x => (m : 𝕜) * x ^ (m - 1) := funext <| deriv_zpow m #align deriv_zpow' deriv_zpow' theorem derivWithin_zpow (hxs : UniqueDiffWithinAt 𝕜 s x) (h : x ≠ 0 ∨ 0 ≤ m) : derivWithin (fun x => x ^ m) s x = (m : 𝕜) * x ^ (m - 1) := (hasDerivWithinAt_zpow m x h s).derivWithin hxs #align deriv_within_zpow derivWithin_zpow @[simp]
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
106
113
theorem iter_deriv_zpow' (m : ℤ) (k : ℕ) : (deriv^[k] fun x : 𝕜 => x ^ m) = fun x => (∏ i ∈ Finset.range k, ((m : 𝕜) - i)) * x ^ (m - k) := by
induction' k with k ihk · simp only [Nat.zero_eq, one_mul, Int.ofNat_zero, id, sub_zero, Finset.prod_range_zero, Function.iterate_zero] · simp only [Function.iterate_succ_apply', ihk, deriv_const_mul_field', deriv_zpow', Finset.prod_range_succ, Int.ofNat_succ, ← sub_sub, Int.cast_sub, Int.cast_natCast, mul_assoc]
5
148.413159
2
2
4
1,973
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.deriv.zpow from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter open Filter Asymptotics Set variable {𝕜 : Type u} [NontriviallyNormedField 𝕜] variable {E : Type v} [NormedAddCommGroup E] [NormedSpace 𝕜 E] variable {x : 𝕜} variable {s : Set 𝕜} variable {m : ℤ} theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by lift m to ℕ using hm.le simp only [zpow_natCast, Int.cast_natCast] convert hasStrictDerivAt_pow m x using 2 rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_natCast] norm_cast at hm rcases lt_trichotomy m 0 with (hm | hm | hm) · have hx : x ≠ 0 := h.resolve_right hm.not_le have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;> [skip; exact zpow_ne_zero _ hx] simp only [(· ∘ ·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this convert this using 1 rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_add₀ hx, mul_assoc, ← zpow_add₀ hx] congr abel · simp only [hm, zpow_zero, Int.cast_zero, zero_mul, hasStrictDerivAt_const] · exact this m hm #align has_strict_deriv_at_zpow hasStrictDerivAt_zpow theorem hasDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : HasDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := (hasStrictDerivAt_zpow m x h).hasDerivAt #align has_deriv_at_zpow hasDerivAt_zpow theorem hasDerivWithinAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) (s : Set 𝕜) : HasDerivWithinAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) s x := (hasDerivAt_zpow m x h).hasDerivWithinAt #align has_deriv_within_at_zpow hasDerivWithinAt_zpow theorem differentiableAt_zpow : DifferentiableAt 𝕜 (fun x => x ^ m) x ↔ x ≠ 0 ∨ 0 ≤ m := ⟨fun H => NormedField.continuousAt_zpow.1 H.continuousAt, fun H => (hasDerivAt_zpow m x H).differentiableAt⟩ #align differentiable_at_zpow differentiableAt_zpow theorem differentiableWithinAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) : DifferentiableWithinAt 𝕜 (fun x => x ^ m) s x := (differentiableAt_zpow.mpr h).differentiableWithinAt #align differentiable_within_at_zpow differentiableWithinAt_zpow theorem differentiableOn_zpow (m : ℤ) (s : Set 𝕜) (h : (0 : 𝕜) ∉ s ∨ 0 ≤ m) : DifferentiableOn 𝕜 (fun x => x ^ m) s := fun x hxs => differentiableWithinAt_zpow m x <| h.imp_left <| ne_of_mem_of_not_mem hxs #align differentiable_on_zpow differentiableOn_zpow theorem deriv_zpow (m : ℤ) (x : 𝕜) : deriv (fun x => x ^ m) x = m * x ^ (m - 1) := by by_cases H : x ≠ 0 ∨ 0 ≤ m · exact (hasDerivAt_zpow m x H).deriv · rw [deriv_zero_of_not_differentiableAt (mt differentiableAt_zpow.1 H)] push_neg at H rcases H with ⟨rfl, hm⟩ rw [zero_zpow _ ((sub_one_lt _).trans hm).ne, mul_zero] #align deriv_zpow deriv_zpow @[simp] theorem deriv_zpow' (m : ℤ) : (deriv fun x : 𝕜 => x ^ m) = fun x => (m : 𝕜) * x ^ (m - 1) := funext <| deriv_zpow m #align deriv_zpow' deriv_zpow' theorem derivWithin_zpow (hxs : UniqueDiffWithinAt 𝕜 s x) (h : x ≠ 0 ∨ 0 ≤ m) : derivWithin (fun x => x ^ m) s x = (m : 𝕜) * x ^ (m - 1) := (hasDerivWithinAt_zpow m x h s).derivWithin hxs #align deriv_within_zpow derivWithin_zpow @[simp] theorem iter_deriv_zpow' (m : ℤ) (k : ℕ) : (deriv^[k] fun x : 𝕜 => x ^ m) = fun x => (∏ i ∈ Finset.range k, ((m : 𝕜) - i)) * x ^ (m - k) := by induction' k with k ihk · simp only [Nat.zero_eq, one_mul, Int.ofNat_zero, id, sub_zero, Finset.prod_range_zero, Function.iterate_zero] · simp only [Function.iterate_succ_apply', ihk, deriv_const_mul_field', deriv_zpow', Finset.prod_range_succ, Int.ofNat_succ, ← sub_sub, Int.cast_sub, Int.cast_natCast, mul_assoc] #align iter_deriv_zpow' iter_deriv_zpow' theorem iter_deriv_zpow (m : ℤ) (x : 𝕜) (k : ℕ) : deriv^[k] (fun y => y ^ m) x = (∏ i ∈ Finset.range k, ((m : 𝕜) - i)) * x ^ (m - k) := congr_fun (iter_deriv_zpow' m k) x #align iter_deriv_zpow iter_deriv_zpow
Mathlib/Analysis/Calculus/Deriv/ZPow.lean
121
128
theorem iter_deriv_pow (n : ℕ) (x : 𝕜) (k : ℕ) : deriv^[k] (fun x : 𝕜 => x ^ n) x = (∏ i ∈ Finset.range k, ((n : 𝕜) - i)) * x ^ (n - k) := by
simp only [← zpow_natCast, iter_deriv_zpow, Int.cast_natCast] rcases le_or_lt k n with hkn | hnk · rw [Int.ofNat_sub hkn] · have : (∏ i ∈ Finset.range k, (n - i : 𝕜)) = 0 := Finset.prod_eq_zero (Finset.mem_range.2 hnk) (sub_self _) simp only [this, zero_mul]
6
403.428793
2
2
4
1,973
import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic -- Porting note: added to make the syntax work below. open scoped TensorProduct universe u namespace Algebra section variable (R : Type u) [CommSemiring R] variable (A : Type u) [Semiring A] [Algebra R A] @[mk_iff] class FormallyUnramified : Prop where comp_injective : ∀ ⦃B : Type u⦄ [CommRing B], ∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥), Function.Injective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I) #align algebra.formally_unramified Algebra.FormallyUnramified end namespace FormallyUnramified section variable {R : Type u} [CommSemiring R] variable {A : Type u} [Semiring A] [Algebra R A] variable {B : Type u} [CommRing B] [Algebra R B] (I : Ideal B)
Mathlib/RingTheory/Unramified/Basic.lean
69
83
theorem lift_unique {B : Type u} [CommRing B] [_RB : Algebra R B] [FormallyUnramified R A] (I : Ideal B) (hI : IsNilpotent I) (g₁ g₂ : A →ₐ[R] B) (h : (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂) : g₁ = g₂ := by
revert g₁ g₂ change Function.Injective (Ideal.Quotient.mkₐ R I).comp revert _RB apply Ideal.IsNilpotent.induction_on (R := B) I hI · intro B _ I hI _; exact FormallyUnramified.comp_injective I hI · intro B _ I J hIJ h₁ h₂ _ g₁ g₂ e apply h₁ apply h₂ ext x replace e := AlgHom.congr_fun e x dsimp only [AlgHom.comp_apply, Ideal.Quotient.mkₐ_eq_mk] at e ⊢ rwa [Ideal.Quotient.eq, ← map_sub, Ideal.mem_quotient_iff_mem hIJ, ← Ideal.Quotient.eq]
12
162,754.791419
2
2
5
1,974
import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic -- Porting note: added to make the syntax work below. open scoped TensorProduct universe u namespace Algebra section variable (R : Type u) [CommSemiring R] variable (A : Type u) [Semiring A] [Algebra R A] @[mk_iff] class FormallyUnramified : Prop where comp_injective : ∀ ⦃B : Type u⦄ [CommRing B], ∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥), Function.Injective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I) #align algebra.formally_unramified Algebra.FormallyUnramified end namespace FormallyUnramified section variable {R : Type u} [CommSemiring R] variable {A : Type u} [Semiring A] [Algebra R A] variable {B : Type u} [CommRing B] [Algebra R B] (I : Ideal B) theorem lift_unique {B : Type u} [CommRing B] [_RB : Algebra R B] [FormallyUnramified R A] (I : Ideal B) (hI : IsNilpotent I) (g₁ g₂ : A →ₐ[R] B) (h : (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂) : g₁ = g₂ := by revert g₁ g₂ change Function.Injective (Ideal.Quotient.mkₐ R I).comp revert _RB apply Ideal.IsNilpotent.induction_on (R := B) I hI · intro B _ I hI _; exact FormallyUnramified.comp_injective I hI · intro B _ I J hIJ h₁ h₂ _ g₁ g₂ e apply h₁ apply h₂ ext x replace e := AlgHom.congr_fun e x dsimp only [AlgHom.comp_apply, Ideal.Quotient.mkₐ_eq_mk] at e ⊢ rwa [Ideal.Quotient.eq, ← map_sub, Ideal.mem_quotient_iff_mem hIJ, ← Ideal.Quotient.eq] #align algebra.formally_unramified.lift_unique Algebra.FormallyUnramified.lift_unique theorem ext [FormallyUnramified R A] (hI : IsNilpotent I) {g₁ g₂ : A →ₐ[R] B} (H : ∀ x, Ideal.Quotient.mk I (g₁ x) = Ideal.Quotient.mk I (g₂ x)) : g₁ = g₂ := FormallyUnramified.lift_unique I hI g₁ g₂ (AlgHom.ext H) #align algebra.formally_unramified.ext Algebra.FormallyUnramified.ext theorem lift_unique_of_ringHom [FormallyUnramified R A] {C : Type u} [CommRing C] (f : B →+* C) (hf : IsNilpotent <| RingHom.ker f) (g₁ g₂ : A →ₐ[R] B) (h : f.comp ↑g₁ = f.comp (g₂ : A →+* B)) : g₁ = g₂ := FormallyUnramified.lift_unique _ hf _ _ (by ext x have := RingHom.congr_fun h x simpa only [Ideal.Quotient.eq, Function.comp_apply, AlgHom.coe_comp, Ideal.Quotient.mkₐ_eq_mk, RingHom.mem_ker, map_sub, sub_eq_zero]) #align algebra.formally_unramified.lift_unique_of_ring_hom Algebra.FormallyUnramified.lift_unique_of_ringHom theorem ext' [FormallyUnramified R A] {C : Type u} [CommRing C] (f : B →+* C) (hf : IsNilpotent <| RingHom.ker f) (g₁ g₂ : A →ₐ[R] B) (h : ∀ x, f (g₁ x) = f (g₂ x)) : g₁ = g₂ := FormallyUnramified.lift_unique_of_ringHom f hf g₁ g₂ (RingHom.ext h) #align algebra.formally_unramified.ext' Algebra.FormallyUnramified.ext' theorem lift_unique' [FormallyUnramified R A] {C : Type u} [CommRing C] [Algebra R C] (f : B →ₐ[R] C) (hf : IsNilpotent <| RingHom.ker (f : B →+* C)) (g₁ g₂ : A →ₐ[R] B) (h : f.comp g₁ = f.comp g₂) : g₁ = g₂ := FormallyUnramified.ext' _ hf g₁ g₂ (AlgHom.congr_fun h) #align algebra.formally_unramified.lift_unique' Algebra.FormallyUnramified.lift_unique' end section OfEquiv variable {R : Type u} [CommSemiring R] variable {A B : Type u} [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]
Mathlib/RingTheory/Unramified/Basic.lean
121
128
theorem of_equiv [FormallyUnramified R A] (e : A ≃ₐ[R] B) : FormallyUnramified R B := by
constructor intro C _ _ I hI f₁ f₂ e' rw [← f₁.comp_id, ← f₂.comp_id, ← e.comp_symm, ← AlgHom.comp_assoc, ← AlgHom.comp_assoc] congr 1 refine FormallyUnramified.comp_injective I hI ?_ rw [← AlgHom.comp_assoc, e', AlgHom.comp_assoc]
6
403.428793
2
2
5
1,974
import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic -- Porting note: added to make the syntax work below. open scoped TensorProduct universe u namespace Algebra section variable (R : Type u) [CommSemiring R] variable (A : Type u) [Semiring A] [Algebra R A] @[mk_iff] class FormallyUnramified : Prop where comp_injective : ∀ ⦃B : Type u⦄ [CommRing B], ∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥), Function.Injective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I) #align algebra.formally_unramified Algebra.FormallyUnramified end namespace FormallyUnramified section variable {R : Type u} [CommSemiring R] variable {A : Type u} [Semiring A] [Algebra R A] variable {B : Type u} [CommRing B] [Algebra R B] (I : Ideal B) theorem lift_unique {B : Type u} [CommRing B] [_RB : Algebra R B] [FormallyUnramified R A] (I : Ideal B) (hI : IsNilpotent I) (g₁ g₂ : A →ₐ[R] B) (h : (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂) : g₁ = g₂ := by revert g₁ g₂ change Function.Injective (Ideal.Quotient.mkₐ R I).comp revert _RB apply Ideal.IsNilpotent.induction_on (R := B) I hI · intro B _ I hI _; exact FormallyUnramified.comp_injective I hI · intro B _ I J hIJ h₁ h₂ _ g₁ g₂ e apply h₁ apply h₂ ext x replace e := AlgHom.congr_fun e x dsimp only [AlgHom.comp_apply, Ideal.Quotient.mkₐ_eq_mk] at e ⊢ rwa [Ideal.Quotient.eq, ← map_sub, Ideal.mem_quotient_iff_mem hIJ, ← Ideal.Quotient.eq] #align algebra.formally_unramified.lift_unique Algebra.FormallyUnramified.lift_unique theorem ext [FormallyUnramified R A] (hI : IsNilpotent I) {g₁ g₂ : A →ₐ[R] B} (H : ∀ x, Ideal.Quotient.mk I (g₁ x) = Ideal.Quotient.mk I (g₂ x)) : g₁ = g₂ := FormallyUnramified.lift_unique I hI g₁ g₂ (AlgHom.ext H) #align algebra.formally_unramified.ext Algebra.FormallyUnramified.ext theorem lift_unique_of_ringHom [FormallyUnramified R A] {C : Type u} [CommRing C] (f : B →+* C) (hf : IsNilpotent <| RingHom.ker f) (g₁ g₂ : A →ₐ[R] B) (h : f.comp ↑g₁ = f.comp (g₂ : A →+* B)) : g₁ = g₂ := FormallyUnramified.lift_unique _ hf _ _ (by ext x have := RingHom.congr_fun h x simpa only [Ideal.Quotient.eq, Function.comp_apply, AlgHom.coe_comp, Ideal.Quotient.mkₐ_eq_mk, RingHom.mem_ker, map_sub, sub_eq_zero]) #align algebra.formally_unramified.lift_unique_of_ring_hom Algebra.FormallyUnramified.lift_unique_of_ringHom theorem ext' [FormallyUnramified R A] {C : Type u} [CommRing C] (f : B →+* C) (hf : IsNilpotent <| RingHom.ker f) (g₁ g₂ : A →ₐ[R] B) (h : ∀ x, f (g₁ x) = f (g₂ x)) : g₁ = g₂ := FormallyUnramified.lift_unique_of_ringHom f hf g₁ g₂ (RingHom.ext h) #align algebra.formally_unramified.ext' Algebra.FormallyUnramified.ext' theorem lift_unique' [FormallyUnramified R A] {C : Type u} [CommRing C] [Algebra R C] (f : B →ₐ[R] C) (hf : IsNilpotent <| RingHom.ker (f : B →+* C)) (g₁ g₂ : A →ₐ[R] B) (h : f.comp g₁ = f.comp g₂) : g₁ = g₂ := FormallyUnramified.ext' _ hf g₁ g₂ (AlgHom.congr_fun h) #align algebra.formally_unramified.lift_unique' Algebra.FormallyUnramified.lift_unique' end section Comp variable (R : Type u) [CommSemiring R] variable (A : Type u) [CommSemiring A] [Algebra R A] variable (B : Type u) [Semiring B] [Algebra R B] [Algebra A B] [IsScalarTower R A B]
Mathlib/RingTheory/Unramified/Basic.lean
139
152
theorem comp [FormallyUnramified R A] [FormallyUnramified A B] : FormallyUnramified R B := by
constructor intro C _ _ I hI f₁ f₂ e have e' := FormallyUnramified.lift_unique I ⟨2, hI⟩ (f₁.comp <| IsScalarTower.toAlgHom R A B) (f₂.comp <| IsScalarTower.toAlgHom R A B) (by rw [← AlgHom.comp_assoc, e, AlgHom.comp_assoc]) letI := (f₁.comp (IsScalarTower.toAlgHom R A B)).toRingHom.toAlgebra let F₁ : B →ₐ[A] C := { f₁ with commutes' := fun r => rfl } let F₂ : B →ₐ[A] C := { f₂ with commutes' := AlgHom.congr_fun e'.symm } ext1 x change F₁ x = F₂ x congr exact FormallyUnramified.ext I ⟨2, hI⟩ (AlgHom.congr_fun e)
12
162,754.791419
2
2
5
1,974
import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic -- Porting note: added to make the syntax work below. open scoped TensorProduct universe u namespace Algebra section variable (R : Type u) [CommSemiring R] variable (A : Type u) [Semiring A] [Algebra R A] @[mk_iff] class FormallyUnramified : Prop where comp_injective : ∀ ⦃B : Type u⦄ [CommRing B], ∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥), Function.Injective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I) #align algebra.formally_unramified Algebra.FormallyUnramified end namespace FormallyUnramified section variable {R : Type u} [CommSemiring R] variable {A : Type u} [Semiring A] [Algebra R A] variable {B : Type u} [CommRing B] [Algebra R B] (I : Ideal B) theorem lift_unique {B : Type u} [CommRing B] [_RB : Algebra R B] [FormallyUnramified R A] (I : Ideal B) (hI : IsNilpotent I) (g₁ g₂ : A →ₐ[R] B) (h : (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂) : g₁ = g₂ := by revert g₁ g₂ change Function.Injective (Ideal.Quotient.mkₐ R I).comp revert _RB apply Ideal.IsNilpotent.induction_on (R := B) I hI · intro B _ I hI _; exact FormallyUnramified.comp_injective I hI · intro B _ I J hIJ h₁ h₂ _ g₁ g₂ e apply h₁ apply h₂ ext x replace e := AlgHom.congr_fun e x dsimp only [AlgHom.comp_apply, Ideal.Quotient.mkₐ_eq_mk] at e ⊢ rwa [Ideal.Quotient.eq, ← map_sub, Ideal.mem_quotient_iff_mem hIJ, ← Ideal.Quotient.eq] #align algebra.formally_unramified.lift_unique Algebra.FormallyUnramified.lift_unique theorem ext [FormallyUnramified R A] (hI : IsNilpotent I) {g₁ g₂ : A →ₐ[R] B} (H : ∀ x, Ideal.Quotient.mk I (g₁ x) = Ideal.Quotient.mk I (g₂ x)) : g₁ = g₂ := FormallyUnramified.lift_unique I hI g₁ g₂ (AlgHom.ext H) #align algebra.formally_unramified.ext Algebra.FormallyUnramified.ext theorem lift_unique_of_ringHom [FormallyUnramified R A] {C : Type u} [CommRing C] (f : B →+* C) (hf : IsNilpotent <| RingHom.ker f) (g₁ g₂ : A →ₐ[R] B) (h : f.comp ↑g₁ = f.comp (g₂ : A →+* B)) : g₁ = g₂ := FormallyUnramified.lift_unique _ hf _ _ (by ext x have := RingHom.congr_fun h x simpa only [Ideal.Quotient.eq, Function.comp_apply, AlgHom.coe_comp, Ideal.Quotient.mkₐ_eq_mk, RingHom.mem_ker, map_sub, sub_eq_zero]) #align algebra.formally_unramified.lift_unique_of_ring_hom Algebra.FormallyUnramified.lift_unique_of_ringHom theorem ext' [FormallyUnramified R A] {C : Type u} [CommRing C] (f : B →+* C) (hf : IsNilpotent <| RingHom.ker f) (g₁ g₂ : A →ₐ[R] B) (h : ∀ x, f (g₁ x) = f (g₂ x)) : g₁ = g₂ := FormallyUnramified.lift_unique_of_ringHom f hf g₁ g₂ (RingHom.ext h) #align algebra.formally_unramified.ext' Algebra.FormallyUnramified.ext' theorem lift_unique' [FormallyUnramified R A] {C : Type u} [CommRing C] [Algebra R C] (f : B →ₐ[R] C) (hf : IsNilpotent <| RingHom.ker (f : B →+* C)) (g₁ g₂ : A →ₐ[R] B) (h : f.comp g₁ = f.comp g₂) : g₁ = g₂ := FormallyUnramified.ext' _ hf g₁ g₂ (AlgHom.congr_fun h) #align algebra.formally_unramified.lift_unique' Algebra.FormallyUnramified.lift_unique' end section Comp variable (R : Type u) [CommSemiring R] variable (A : Type u) [CommSemiring A] [Algebra R A] variable (B : Type u) [Semiring B] [Algebra R B] [Algebra A B] [IsScalarTower R A B] theorem comp [FormallyUnramified R A] [FormallyUnramified A B] : FormallyUnramified R B := by constructor intro C _ _ I hI f₁ f₂ e have e' := FormallyUnramified.lift_unique I ⟨2, hI⟩ (f₁.comp <| IsScalarTower.toAlgHom R A B) (f₂.comp <| IsScalarTower.toAlgHom R A B) (by rw [← AlgHom.comp_assoc, e, AlgHom.comp_assoc]) letI := (f₁.comp (IsScalarTower.toAlgHom R A B)).toRingHom.toAlgebra let F₁ : B →ₐ[A] C := { f₁ with commutes' := fun r => rfl } let F₂ : B →ₐ[A] C := { f₂ with commutes' := AlgHom.congr_fun e'.symm } ext1 x change F₁ x = F₂ x congr exact FormallyUnramified.ext I ⟨2, hI⟩ (AlgHom.congr_fun e) #align algebra.formally_unramified.comp Algebra.FormallyUnramified.comp
Mathlib/RingTheory/Unramified/Basic.lean
155
163
theorem of_comp [FormallyUnramified R B] : FormallyUnramified A B := by
constructor intro Q _ _ I e f₁ f₂ e' letI := ((algebraMap A Q).comp (algebraMap R A)).toAlgebra letI : IsScalarTower R A Q := IsScalarTower.of_algebraMap_eq' rfl refine AlgHom.restrictScalars_injective R ?_ refine FormallyUnramified.ext I ⟨2, e⟩ ?_ intro x exact AlgHom.congr_fun e' x
8
2,980.957987
2
2
5
1,974
import Mathlib.RingTheory.FinitePresentation import Mathlib.RingTheory.Localization.Away.Basic import Mathlib.RingTheory.Localization.Away.AdjoinRoot import Mathlib.RingTheory.QuotientNilpotent import Mathlib.RingTheory.TensorProduct.Basic -- Porting note: added to make the syntax work below. open scoped TensorProduct universe u namespace Algebra section variable (R : Type u) [CommSemiring R] variable (A : Type u) [Semiring A] [Algebra R A] @[mk_iff] class FormallyUnramified : Prop where comp_injective : ∀ ⦃B : Type u⦄ [CommRing B], ∀ [Algebra R B] (I : Ideal B) (_ : I ^ 2 = ⊥), Function.Injective ((Ideal.Quotient.mkₐ R I).comp : (A →ₐ[R] B) → A →ₐ[R] B ⧸ I) #align algebra.formally_unramified Algebra.FormallyUnramified end namespace FormallyUnramified section variable {R : Type u} [CommSemiring R] variable {A : Type u} [Semiring A] [Algebra R A] variable {B : Type u} [CommRing B] [Algebra R B] (I : Ideal B) theorem lift_unique {B : Type u} [CommRing B] [_RB : Algebra R B] [FormallyUnramified R A] (I : Ideal B) (hI : IsNilpotent I) (g₁ g₂ : A →ₐ[R] B) (h : (Ideal.Quotient.mkₐ R I).comp g₁ = (Ideal.Quotient.mkₐ R I).comp g₂) : g₁ = g₂ := by revert g₁ g₂ change Function.Injective (Ideal.Quotient.mkₐ R I).comp revert _RB apply Ideal.IsNilpotent.induction_on (R := B) I hI · intro B _ I hI _; exact FormallyUnramified.comp_injective I hI · intro B _ I J hIJ h₁ h₂ _ g₁ g₂ e apply h₁ apply h₂ ext x replace e := AlgHom.congr_fun e x dsimp only [AlgHom.comp_apply, Ideal.Quotient.mkₐ_eq_mk] at e ⊢ rwa [Ideal.Quotient.eq, ← map_sub, Ideal.mem_quotient_iff_mem hIJ, ← Ideal.Quotient.eq] #align algebra.formally_unramified.lift_unique Algebra.FormallyUnramified.lift_unique theorem ext [FormallyUnramified R A] (hI : IsNilpotent I) {g₁ g₂ : A →ₐ[R] B} (H : ∀ x, Ideal.Quotient.mk I (g₁ x) = Ideal.Quotient.mk I (g₂ x)) : g₁ = g₂ := FormallyUnramified.lift_unique I hI g₁ g₂ (AlgHom.ext H) #align algebra.formally_unramified.ext Algebra.FormallyUnramified.ext theorem lift_unique_of_ringHom [FormallyUnramified R A] {C : Type u} [CommRing C] (f : B →+* C) (hf : IsNilpotent <| RingHom.ker f) (g₁ g₂ : A →ₐ[R] B) (h : f.comp ↑g₁ = f.comp (g₂ : A →+* B)) : g₁ = g₂ := FormallyUnramified.lift_unique _ hf _ _ (by ext x have := RingHom.congr_fun h x simpa only [Ideal.Quotient.eq, Function.comp_apply, AlgHom.coe_comp, Ideal.Quotient.mkₐ_eq_mk, RingHom.mem_ker, map_sub, sub_eq_zero]) #align algebra.formally_unramified.lift_unique_of_ring_hom Algebra.FormallyUnramified.lift_unique_of_ringHom theorem ext' [FormallyUnramified R A] {C : Type u} [CommRing C] (f : B →+* C) (hf : IsNilpotent <| RingHom.ker f) (g₁ g₂ : A →ₐ[R] B) (h : ∀ x, f (g₁ x) = f (g₂ x)) : g₁ = g₂ := FormallyUnramified.lift_unique_of_ringHom f hf g₁ g₂ (RingHom.ext h) #align algebra.formally_unramified.ext' Algebra.FormallyUnramified.ext' theorem lift_unique' [FormallyUnramified R A] {C : Type u} [CommRing C] [Algebra R C] (f : B →ₐ[R] C) (hf : IsNilpotent <| RingHom.ker (f : B →+* C)) (g₁ g₂ : A →ₐ[R] B) (h : f.comp g₁ = f.comp g₂) : g₁ = g₂ := FormallyUnramified.ext' _ hf g₁ g₂ (AlgHom.congr_fun h) #align algebra.formally_unramified.lift_unique' Algebra.FormallyUnramified.lift_unique' end section Localization variable {R S Rₘ Sₘ : Type u} [CommRing R] [CommRing S] [CommRing Rₘ] [CommRing Sₘ] variable (M : Submonoid R) variable [Algebra R S] [Algebra R Sₘ] [Algebra S Sₘ] [Algebra R Rₘ] [Algebra Rₘ Sₘ] variable [IsScalarTower R Rₘ Sₘ] [IsScalarTower R S Sₘ] variable [IsLocalization M Rₘ] [IsLocalization (M.map (algebraMap R S)) Sₘ] -- Porting note: no longer supported -- attribute [local elab_as_elim] Ideal.IsNilpotent.induction_on
Mathlib/RingTheory/Unramified/Basic.lean
201
207
theorem of_isLocalization : FormallyUnramified R Rₘ := by
constructor intro Q _ _ I _ f₁ f₂ _ apply AlgHom.coe_ringHom_injective refine IsLocalization.ringHom_ext M ?_ ext simp
6
403.428793
2
2
5
1,974
import Mathlib.LinearAlgebra.Charpoly.Basic import Mathlib.LinearAlgebra.Matrix.Basis #align_import linear_algebra.charpoly.to_matrix from "leanprover-community/mathlib"@"baab5d3091555838751562e6caad33c844bea15e" universe u v w variable {R M M₁ M₂ : Type*} [CommRing R] [Nontrivial R] variable [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] variable [AddCommGroup M₁] [Module R M₁] [Module.Finite R M₁] [Module.Free R M₁] variable [AddCommGroup M₂] [Module R M₂] [Module.Finite R M₂] [Module.Free R M₂] variable (f : M →ₗ[R] M) open Matrix noncomputable section open Module.Free Polynomial Matrix namespace LinearMap section Basic attribute [-instance] instCoeOutOfCoeSort attribute [local instance 2000] RingHomClass.toNonUnitalRingHomClass attribute [local instance 2000] NonUnitalRingHomClass.toMulHomClass @[simp]
Mathlib/LinearAlgebra/Charpoly/ToMatrix.lean
48
87
theorem charpoly_toMatrix {ι : Type w} [DecidableEq ι] [Fintype ι] (b : Basis ι R M) : (toMatrix b b f).charpoly = f.charpoly := by
let A := toMatrix b b f let b' := chooseBasis R M let ι' := ChooseBasisIndex R M let A' := toMatrix b' b' f let e := Basis.indexEquiv b b' let φ := reindexLinearEquiv R R e e let φ₁ := reindexLinearEquiv R R e (Equiv.refl ι') let φ₂ := reindexLinearEquiv R R (Equiv.refl ι') (Equiv.refl ι') let φ₃ := reindexLinearEquiv R R (Equiv.refl ι') e let P := b.toMatrix b' let Q := b'.toMatrix b have hPQ : C.mapMatrix (φ₁ P) * C.mapMatrix (φ₃ Q) = 1 := by rw [RingHom.mapMatrix_apply, RingHom.mapMatrix_apply, ← Matrix.map_mul, reindexLinearEquiv_mul R R, Basis.toMatrix_mul_toMatrix_flip, reindexLinearEquiv_one, ← RingHom.mapMatrix_apply, RingHom.map_one] calc A.charpoly = (reindex e e A).charpoly := (charpoly_reindex _ _).symm _ = det (scalar ι' X - C.mapMatrix (φ A)) := rfl _ = det (scalar ι' X - C.mapMatrix (φ (P * A' * Q))) := by rw [basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix] _ = det (scalar ι' X - C.mapMatrix (φ₁ P * φ₂ A' * φ₃ Q)) := by rw [reindexLinearEquiv_mul, reindexLinearEquiv_mul] _ = det (scalar ι' X - C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) := by simp [φ₂] _ = det (scalar ι' X * C.mapMatrix (φ₁ P) * C.mapMatrix (φ₃ Q) - C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) := by rw [Matrix.mul_assoc ((scalar ι') X), hPQ, Matrix.mul_one] _ = det (C.mapMatrix (φ₁ P) * scalar ι' X * C.mapMatrix (φ₃ Q) - C.mapMatrix (φ₁ P) * C.mapMatrix A' * C.mapMatrix (φ₃ Q)) := by rw [scalar_commute _ commute_X] _ = det (C.mapMatrix (φ₁ P) * (scalar ι' X - C.mapMatrix A') * C.mapMatrix (φ₃ Q)) := by rw [← Matrix.sub_mul, ← Matrix.mul_sub] _ = det (C.mapMatrix (φ₁ P)) * det (scalar ι' X - C.mapMatrix A') * det (C.mapMatrix (φ₃ Q)) := by rw [det_mul, det_mul] _ = det (C.mapMatrix (φ₁ P)) * det (C.mapMatrix (φ₃ Q)) * det (scalar ι' X - C.mapMatrix A') := by ring _ = det (scalar ι' X - C.mapMatrix A') := by rw [← det_mul, hPQ, det_one, one_mul] _ = f.charpoly := rfl
38
31,855,931,757,113,756
2
2
1
1,975
import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Topology.LocallyConstant.Basic import Mathlib.Topology.DiscreteQuotient import Mathlib.Topology.Category.TopCat.Limits.Cofiltered import Mathlib.Topology.Category.TopCat.Limits.Konig #align_import topology.category.Profinite.cofiltered_limit from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1" namespace Profinite open scoped Classical open CategoryTheory open CategoryTheory.Limits -- This was a global instance prior to #13170. We may experiment with removing it. attribute [local instance] ConcreteCategory.instFunLike universe u v variable {J : Type v} [SmallCategory J] [IsCofiltered J] {F : J ⥤ Profinite.{max u v}} (C : Cone F)
Mathlib/Topology/Category/Profinite/CofilteredLimit.lean
45
112
theorem exists_isClopen_of_cofiltered {U : Set C.pt} (hC : IsLimit C) (hU : IsClopen U) : ∃ (j : J) (V : Set (F.obj j)), IsClopen V ∧ U = C.π.app j ⁻¹' V := by
-- First, we have the topological basis of the cofiltered limit obtained by pulling back -- clopen sets from the factors in the limit. By continuity, all such sets are again clopen. have hB := TopCat.isTopologicalBasis_cofiltered_limit.{u, v} (F ⋙ Profinite.toTopCat) (Profinite.toTopCat.mapCone C) (isLimitOfPreserves _ hC) (fun j => {W | IsClopen W}) ?_ (fun i => isClopen_univ) (fun i U1 U2 hU1 hU2 => hU1.inter hU2) ?_ rotate_left · intro i change TopologicalSpace.IsTopologicalBasis {W : Set (F.obj i) | IsClopen W} apply isTopologicalBasis_isClopen · rintro i j f V (hV : IsClopen _) exact ⟨hV.1.preimage ((F ⋙ toTopCat).map f).continuous, hV.2.preimage ((F ⋙ toTopCat).map f).continuous⟩ -- Porting note: `<;> continuity` fails -- Using this, since `U` is open, we can write `U` as a union of clopen sets all of which -- are preimages of clopens from the factors in the limit. obtain ⟨S, hS, h⟩ := hB.open_eq_sUnion hU.2 clear hB let j : S → J := fun s => (hS s.2).choose let V : ∀ s : S, Set (F.obj (j s)) := fun s => (hS s.2).choose_spec.choose have hV : ∀ s : S, IsClopen (V s) ∧ s.1 = C.π.app (j s) ⁻¹' V s := fun s => (hS s.2).choose_spec.choose_spec -- Since `U` is also closed, hence compact, it is covered by finitely many of the -- clopens constructed in the previous step. have hUo : ∀ (i : ↑S), IsOpen ((fun s ↦ (forget Profinite).map (C.π.app (j s)) ⁻¹' V s) i) := by intro s exact (hV s).1.2.preimage (C.π.app (j s)).continuous have hsU : U ⊆ ⋃ (i : ↑S), (fun s ↦ (forget Profinite).map (C.π.app (j s)) ⁻¹' V s) i := by dsimp only rw [h] rintro x ⟨T, hT, hx⟩ refine ⟨_, ⟨⟨T, hT⟩, rfl⟩, ?_⟩ dsimp only [forget_map_eq_coe] rwa [← (hV ⟨T, hT⟩).2] have := hU.1.isCompact.elim_finite_subcover (fun s : S => C.π.app (j s) ⁻¹' V s) hUo hsU -- Porting note: same remark as after `hB` -- We thus obtain a finite set `G : Finset J` and a clopen set of `F.obj j` for each -- `j ∈ G` such that `U` is the union of the preimages of these clopen sets. obtain ⟨G, hG⟩ := this -- Since `J` is cofiltered, we can find a single `j0` dominating all the `j ∈ G`. -- Pulling back all of the sets from the previous step to `F.obj j0` and taking a union, -- we obtain a clopen set in `F.obj j0` which works. obtain ⟨j0, hj0⟩ := IsCofiltered.inf_objs_exists (G.image j) let f : ∀ s ∈ G, j0 ⟶ j s := fun s hs => (hj0 (Finset.mem_image.mpr ⟨s, hs, rfl⟩)).some let W : S → Set (F.obj j0) := fun s => if hs : s ∈ G then F.map (f s hs) ⁻¹' V s else Set.univ -- Conclude, using the `j0` and the clopen set of `F.obj j0` obtained above. refine ⟨j0, ⋃ (s : S) (_ : s ∈ G), W s, ?_, ?_⟩ · apply isClopen_biUnion_finset intro s hs dsimp [W] rw [dif_pos hs] exact ⟨(hV s).1.1.preimage (F.map _).continuous, (hV s).1.2.preimage (F.map _).continuous⟩ · ext x constructor · intro hx simp_rw [W, Set.preimage_iUnion, Set.mem_iUnion] obtain ⟨_, ⟨s, rfl⟩, _, ⟨hs, rfl⟩, hh⟩ := hG hx refine ⟨s, hs, ?_⟩ rwa [dif_pos hs, ← Set.preimage_comp, ← Profinite.coe_comp, ← Functor.map_comp, C.w] · intro hx simp_rw [W, Set.preimage_iUnion, Set.mem_iUnion] at hx obtain ⟨s, hs, hx⟩ := hx rw [h] refine ⟨s.1, s.2, ?_⟩ rw [(hV s).2] rwa [dif_pos hs, ← Set.preimage_comp, ← Profinite.coe_comp, ← Functor.map_comp, C.w] at hx
65
16,948,892,444,103,336,000,000,000,000
2
2
2
1,976
import Mathlib.Topology.Category.Profinite.Basic import Mathlib.Topology.LocallyConstant.Basic import Mathlib.Topology.DiscreteQuotient import Mathlib.Topology.Category.TopCat.Limits.Cofiltered import Mathlib.Topology.Category.TopCat.Limits.Konig #align_import topology.category.Profinite.cofiltered_limit from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1" namespace Profinite open scoped Classical open CategoryTheory open CategoryTheory.Limits -- This was a global instance prior to #13170. We may experiment with removing it. attribute [local instance] ConcreteCategory.instFunLike universe u v variable {J : Type v} [SmallCategory J] [IsCofiltered J] {F : J ⥤ Profinite.{max u v}} (C : Cone F) theorem exists_isClopen_of_cofiltered {U : Set C.pt} (hC : IsLimit C) (hU : IsClopen U) : ∃ (j : J) (V : Set (F.obj j)), IsClopen V ∧ U = C.π.app j ⁻¹' V := by -- First, we have the topological basis of the cofiltered limit obtained by pulling back -- clopen sets from the factors in the limit. By continuity, all such sets are again clopen. have hB := TopCat.isTopologicalBasis_cofiltered_limit.{u, v} (F ⋙ Profinite.toTopCat) (Profinite.toTopCat.mapCone C) (isLimitOfPreserves _ hC) (fun j => {W | IsClopen W}) ?_ (fun i => isClopen_univ) (fun i U1 U2 hU1 hU2 => hU1.inter hU2) ?_ rotate_left · intro i change TopologicalSpace.IsTopologicalBasis {W : Set (F.obj i) | IsClopen W} apply isTopologicalBasis_isClopen · rintro i j f V (hV : IsClopen _) exact ⟨hV.1.preimage ((F ⋙ toTopCat).map f).continuous, hV.2.preimage ((F ⋙ toTopCat).map f).continuous⟩ -- Porting note: `<;> continuity` fails -- Using this, since `U` is open, we can write `U` as a union of clopen sets all of which -- are preimages of clopens from the factors in the limit. obtain ⟨S, hS, h⟩ := hB.open_eq_sUnion hU.2 clear hB let j : S → J := fun s => (hS s.2).choose let V : ∀ s : S, Set (F.obj (j s)) := fun s => (hS s.2).choose_spec.choose have hV : ∀ s : S, IsClopen (V s) ∧ s.1 = C.π.app (j s) ⁻¹' V s := fun s => (hS s.2).choose_spec.choose_spec -- Since `U` is also closed, hence compact, it is covered by finitely many of the -- clopens constructed in the previous step. have hUo : ∀ (i : ↑S), IsOpen ((fun s ↦ (forget Profinite).map (C.π.app (j s)) ⁻¹' V s) i) := by intro s exact (hV s).1.2.preimage (C.π.app (j s)).continuous have hsU : U ⊆ ⋃ (i : ↑S), (fun s ↦ (forget Profinite).map (C.π.app (j s)) ⁻¹' V s) i := by dsimp only rw [h] rintro x ⟨T, hT, hx⟩ refine ⟨_, ⟨⟨T, hT⟩, rfl⟩, ?_⟩ dsimp only [forget_map_eq_coe] rwa [← (hV ⟨T, hT⟩).2] have := hU.1.isCompact.elim_finite_subcover (fun s : S => C.π.app (j s) ⁻¹' V s) hUo hsU -- Porting note: same remark as after `hB` -- We thus obtain a finite set `G : Finset J` and a clopen set of `F.obj j` for each -- `j ∈ G` such that `U` is the union of the preimages of these clopen sets. obtain ⟨G, hG⟩ := this -- Since `J` is cofiltered, we can find a single `j0` dominating all the `j ∈ G`. -- Pulling back all of the sets from the previous step to `F.obj j0` and taking a union, -- we obtain a clopen set in `F.obj j0` which works. obtain ⟨j0, hj0⟩ := IsCofiltered.inf_objs_exists (G.image j) let f : ∀ s ∈ G, j0 ⟶ j s := fun s hs => (hj0 (Finset.mem_image.mpr ⟨s, hs, rfl⟩)).some let W : S → Set (F.obj j0) := fun s => if hs : s ∈ G then F.map (f s hs) ⁻¹' V s else Set.univ -- Conclude, using the `j0` and the clopen set of `F.obj j0` obtained above. refine ⟨j0, ⋃ (s : S) (_ : s ∈ G), W s, ?_, ?_⟩ · apply isClopen_biUnion_finset intro s hs dsimp [W] rw [dif_pos hs] exact ⟨(hV s).1.1.preimage (F.map _).continuous, (hV s).1.2.preimage (F.map _).continuous⟩ · ext x constructor · intro hx simp_rw [W, Set.preimage_iUnion, Set.mem_iUnion] obtain ⟨_, ⟨s, rfl⟩, _, ⟨hs, rfl⟩, hh⟩ := hG hx refine ⟨s, hs, ?_⟩ rwa [dif_pos hs, ← Set.preimage_comp, ← Profinite.coe_comp, ← Functor.map_comp, C.w] · intro hx simp_rw [W, Set.preimage_iUnion, Set.mem_iUnion] at hx obtain ⟨s, hs, hx⟩ := hx rw [h] refine ⟨s.1, s.2, ?_⟩ rw [(hV s).2] rwa [dif_pos hs, ← Set.preimage_comp, ← Profinite.coe_comp, ← Functor.map_comp, C.w] at hx set_option linter.uppercaseLean3 false in #align Profinite.exists_clopen_of_cofiltered Profinite.exists_isClopen_of_cofiltered
Mathlib/Topology/Category/Profinite/CofilteredLimit.lean
116
126
theorem exists_locallyConstant_fin_two (hC : IsLimit C) (f : LocallyConstant C.pt (Fin 2)) : ∃ (j : J) (g : LocallyConstant (F.obj j) (Fin 2)), f = g.comap (C.π.app _) := by
let U := f ⁻¹' {0} have hU : IsClopen U := f.isLocallyConstant.isClopen_fiber _ obtain ⟨j, V, hV, h⟩ := exists_isClopen_of_cofiltered C hC hU use j, LocallyConstant.ofIsClopen hV apply LocallyConstant.locallyConstant_eq_of_fiber_zero_eq simp only [Fin.isValue, Functor.const_obj_obj, LocallyConstant.coe_comap, Set.preimage_comp, LocallyConstant.ofIsClopen_fiber_zero] -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644 erw [← h]
9
8,103.083928
2
2
2
1,976
import Mathlib.Data.Fin.Basic import Mathlib.Order.Chain import Mathlib.Order.Cover import Mathlib.Order.Fin open Set variable {α : Type*} [PartialOrder α] [BoundedOrder α] {n : ℕ} {f : Fin (n + 1) → α}
Mathlib/Data/Fin/FlagRange.lean
32
44
theorem IsMaxChain.range_fin_of_covBy (h0 : f 0 = ⊥) (hlast : f (.last n) = ⊤) (hcovBy : ∀ k : Fin n, f k.castSucc ⩿ f k.succ) : IsMaxChain (· ≤ ·) (range f) := by
have hmono : Monotone f := Fin.monotone_iff_le_succ.2 fun k ↦ (hcovBy k).1 refine ⟨hmono.isChain_range, fun t htc hbt ↦ hbt.antisymm fun x hx ↦ ?_⟩ rw [mem_range]; by_contra! h suffices ∀ k, f k < x by simpa [hlast] using this (.last _) intro k induction k using Fin.induction with | zero => simpa [h0, bot_lt_iff_ne_bot] using (h 0).symm | succ k ihk => rw [range_subset_iff] at hbt exact (htc.lt_of_le (hbt k.succ) hx (h _)).resolve_right ((hcovBy k).2 ihk)
10
22,026.465795
2
2
1
1,977
import Mathlib.Probability.Process.HittingTime import Mathlib.Probability.Martingale.Basic #align_import probability.martingale.optional_stopping from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open scoped NNReal ENNReal MeasureTheory ProbabilityTheory namespace MeasureTheory variable {Ω : Type*} {m0 : MeasurableSpace Ω} {μ : Measure Ω} {𝒢 : Filtration ℕ m0} {f : ℕ → Ω → ℝ} {τ π : Ω → ℕ} -- We may generalize the below lemma to functions taking value in a `NormedLatticeAddCommGroup`. -- Similarly, generalize `(Super/Sub)martingale.setIntegral_le`.
Mathlib/Probability/Martingale/OptionalStopping.lean
42
63
theorem Submartingale.expected_stoppedValue_mono [SigmaFiniteFiltration μ 𝒢] (hf : Submartingale f 𝒢 μ) (hτ : IsStoppingTime 𝒢 τ) (hπ : IsStoppingTime 𝒢 π) (hle : τ ≤ π) {N : ℕ} (hbdd : ∀ ω, π ω ≤ N) : μ[stoppedValue f τ] ≤ μ[stoppedValue f π] := by
rw [← sub_nonneg, ← integral_sub', stoppedValue_sub_eq_sum' hle hbdd] · simp only [Finset.sum_apply] have : ∀ i, MeasurableSet[𝒢 i] {ω : Ω | τ ω ≤ i ∧ i < π ω} := by intro i refine (hτ i).inter ?_ convert (hπ i).compl using 1 ext x simp; rfl rw [integral_finset_sum] · refine Finset.sum_nonneg fun i _ => ?_ rw [integral_indicator (𝒢.le _ _ (this _)), integral_sub', sub_nonneg] · exact hf.setIntegral_le (Nat.le_succ i) (this _) · exact (hf.integrable _).integrableOn · exact (hf.integrable _).integrableOn intro i _ exact Integrable.indicator (Integrable.sub (hf.integrable _) (hf.integrable _)) (𝒢.le _ _ (this _)) · exact hf.integrable_stoppedValue hπ hbdd · exact hf.integrable_stoppedValue hτ fun ω => le_trans (hle ω) (hbdd ω)
19
178,482,300.963187
2
2
3
1,978
import Mathlib.Probability.Process.HittingTime import Mathlib.Probability.Martingale.Basic #align_import probability.martingale.optional_stopping from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open scoped NNReal ENNReal MeasureTheory ProbabilityTheory namespace MeasureTheory variable {Ω : Type*} {m0 : MeasurableSpace Ω} {μ : Measure Ω} {𝒢 : Filtration ℕ m0} {f : ℕ → Ω → ℝ} {τ π : Ω → ℕ} -- We may generalize the below lemma to functions taking value in a `NormedLatticeAddCommGroup`. -- Similarly, generalize `(Super/Sub)martingale.setIntegral_le`. theorem Submartingale.expected_stoppedValue_mono [SigmaFiniteFiltration μ 𝒢] (hf : Submartingale f 𝒢 μ) (hτ : IsStoppingTime 𝒢 τ) (hπ : IsStoppingTime 𝒢 π) (hle : τ ≤ π) {N : ℕ} (hbdd : ∀ ω, π ω ≤ N) : μ[stoppedValue f τ] ≤ μ[stoppedValue f π] := by rw [← sub_nonneg, ← integral_sub', stoppedValue_sub_eq_sum' hle hbdd] · simp only [Finset.sum_apply] have : ∀ i, MeasurableSet[𝒢 i] {ω : Ω | τ ω ≤ i ∧ i < π ω} := by intro i refine (hτ i).inter ?_ convert (hπ i).compl using 1 ext x simp; rfl rw [integral_finset_sum] · refine Finset.sum_nonneg fun i _ => ?_ rw [integral_indicator (𝒢.le _ _ (this _)), integral_sub', sub_nonneg] · exact hf.setIntegral_le (Nat.le_succ i) (this _) · exact (hf.integrable _).integrableOn · exact (hf.integrable _).integrableOn intro i _ exact Integrable.indicator (Integrable.sub (hf.integrable _) (hf.integrable _)) (𝒢.le _ _ (this _)) · exact hf.integrable_stoppedValue hπ hbdd · exact hf.integrable_stoppedValue hτ fun ω => le_trans (hle ω) (hbdd ω) #align measure_theory.submartingale.expected_stopped_value_mono MeasureTheory.Submartingale.expected_stoppedValue_mono
Mathlib/Probability/Martingale/OptionalStopping.lean
69
80
theorem submartingale_of_expected_stoppedValue_mono [IsFiniteMeasure μ] (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ) (hf : ∀ τ π : Ω → ℕ, IsStoppingTime 𝒢 τ → IsStoppingTime 𝒢 π → τ ≤ π → (∃ N, ∀ ω, π ω ≤ N) → μ[stoppedValue f τ] ≤ μ[stoppedValue f π]) : Submartingale f 𝒢 μ := by
refine submartingale_of_setIntegral_le hadp hint fun i j hij s hs => ?_ classical specialize hf (s.piecewise (fun _ => i) fun _ => j) _ (isStoppingTime_piecewise_const hij hs) (isStoppingTime_const 𝒢 j) (fun x => (ite_le_sup _ _ (x ∈ s)).trans (max_eq_right hij).le) ⟨j, fun _ => le_rfl⟩ rwa [stoppedValue_const, stoppedValue_piecewise_const, integral_piecewise (𝒢.le _ _ hs) (hint _).integrableOn (hint _).integrableOn, ← integral_add_compl (𝒢.le _ _ hs) (hint j), add_le_add_iff_right] at hf
8
2,980.957987
2
2
3
1,978
import Mathlib.Probability.Process.HittingTime import Mathlib.Probability.Martingale.Basic #align_import probability.martingale.optional_stopping from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" open scoped NNReal ENNReal MeasureTheory ProbabilityTheory namespace MeasureTheory variable {Ω : Type*} {m0 : MeasurableSpace Ω} {μ : Measure Ω} {𝒢 : Filtration ℕ m0} {f : ℕ → Ω → ℝ} {τ π : Ω → ℕ} -- We may generalize the below lemma to functions taking value in a `NormedLatticeAddCommGroup`. -- Similarly, generalize `(Super/Sub)martingale.setIntegral_le`. theorem Submartingale.expected_stoppedValue_mono [SigmaFiniteFiltration μ 𝒢] (hf : Submartingale f 𝒢 μ) (hτ : IsStoppingTime 𝒢 τ) (hπ : IsStoppingTime 𝒢 π) (hle : τ ≤ π) {N : ℕ} (hbdd : ∀ ω, π ω ≤ N) : μ[stoppedValue f τ] ≤ μ[stoppedValue f π] := by rw [← sub_nonneg, ← integral_sub', stoppedValue_sub_eq_sum' hle hbdd] · simp only [Finset.sum_apply] have : ∀ i, MeasurableSet[𝒢 i] {ω : Ω | τ ω ≤ i ∧ i < π ω} := by intro i refine (hτ i).inter ?_ convert (hπ i).compl using 1 ext x simp; rfl rw [integral_finset_sum] · refine Finset.sum_nonneg fun i _ => ?_ rw [integral_indicator (𝒢.le _ _ (this _)), integral_sub', sub_nonneg] · exact hf.setIntegral_le (Nat.le_succ i) (this _) · exact (hf.integrable _).integrableOn · exact (hf.integrable _).integrableOn intro i _ exact Integrable.indicator (Integrable.sub (hf.integrable _) (hf.integrable _)) (𝒢.le _ _ (this _)) · exact hf.integrable_stoppedValue hπ hbdd · exact hf.integrable_stoppedValue hτ fun ω => le_trans (hle ω) (hbdd ω) #align measure_theory.submartingale.expected_stopped_value_mono MeasureTheory.Submartingale.expected_stoppedValue_mono theorem submartingale_of_expected_stoppedValue_mono [IsFiniteMeasure μ] (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ) (hf : ∀ τ π : Ω → ℕ, IsStoppingTime 𝒢 τ → IsStoppingTime 𝒢 π → τ ≤ π → (∃ N, ∀ ω, π ω ≤ N) → μ[stoppedValue f τ] ≤ μ[stoppedValue f π]) : Submartingale f 𝒢 μ := by refine submartingale_of_setIntegral_le hadp hint fun i j hij s hs => ?_ classical specialize hf (s.piecewise (fun _ => i) fun _ => j) _ (isStoppingTime_piecewise_const hij hs) (isStoppingTime_const 𝒢 j) (fun x => (ite_le_sup _ _ (x ∈ s)).trans (max_eq_right hij).le) ⟨j, fun _ => le_rfl⟩ rwa [stoppedValue_const, stoppedValue_piecewise_const, integral_piecewise (𝒢.le _ _ hs) (hint _).integrableOn (hint _).integrableOn, ← integral_add_compl (𝒢.le _ _ hs) (hint j), add_le_add_iff_right] at hf #align measure_theory.submartingale_of_expected_stopped_value_mono MeasureTheory.submartingale_of_expected_stoppedValue_mono theorem submartingale_iff_expected_stoppedValue_mono [IsFiniteMeasure μ] (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ) : Submartingale f 𝒢 μ ↔ ∀ τ π : Ω → ℕ, IsStoppingTime 𝒢 τ → IsStoppingTime 𝒢 π → τ ≤ π → (∃ N, ∀ x, π x ≤ N) → μ[stoppedValue f τ] ≤ μ[stoppedValue f π] := ⟨fun hf _ _ hτ hπ hle ⟨_, hN⟩ => hf.expected_stoppedValue_mono hτ hπ hle hN, submartingale_of_expected_stoppedValue_mono hadp hint⟩ #align measure_theory.submartingale_iff_expected_stopped_value_mono MeasureTheory.submartingale_iff_expected_stoppedValue_mono protected theorem Submartingale.stoppedProcess [IsFiniteMeasure μ] (h : Submartingale f 𝒢 μ) (hτ : IsStoppingTime 𝒢 τ) : Submartingale (stoppedProcess f τ) 𝒢 μ := by rw [submartingale_iff_expected_stoppedValue_mono] · intro σ π hσ hπ hσ_le_π hπ_bdd simp_rw [stoppedValue_stoppedProcess] obtain ⟨n, hπ_le_n⟩ := hπ_bdd exact h.expected_stoppedValue_mono (hσ.min hτ) (hπ.min hτ) (fun ω => min_le_min (hσ_le_π ω) le_rfl) fun ω => (min_le_left _ _).trans (hπ_le_n ω) · exact Adapted.stoppedProcess_of_discrete h.adapted hτ · exact fun i => h.integrable_stoppedValue ((isStoppingTime_const _ i).min hτ) fun ω => min_le_left _ _ #align measure_theory.submartingale.stopped_process MeasureTheory.Submartingale.stoppedProcess section Maximal open Finset
Mathlib/Probability/Martingale/OptionalStopping.lean
112
133
theorem smul_le_stoppedValue_hitting [IsFiniteMeasure μ] (hsub : Submartingale f 𝒢 μ) {ε : ℝ≥0} (n : ℕ) : ε • μ {ω | (ε : ℝ) ≤ (range (n + 1)).sup' nonempty_range_succ fun k => f k ω} ≤ ENNReal.ofReal (∫ ω in {ω | (ε : ℝ) ≤ (range (n + 1)).sup' nonempty_range_succ fun k => f k ω}, stoppedValue f (hitting f {y : ℝ | ↑ε ≤ y} 0 n) ω ∂μ) := by
have hn : Set.Icc 0 n = {k | k ≤ n} := by ext x; simp have : ∀ ω, ((ε : ℝ) ≤ (range (n + 1)).sup' nonempty_range_succ fun k => f k ω) → (ε : ℝ) ≤ stoppedValue f (hitting f {y : ℝ | ↑ε ≤ y} 0 n) ω := by intro x hx simp_rw [le_sup'_iff, mem_range, Nat.lt_succ_iff] at hx refine stoppedValue_hitting_mem ?_ simp only [Set.mem_setOf_eq, exists_prop, hn] exact let ⟨j, hj₁, hj₂⟩ := hx ⟨j, hj₁, hj₂⟩ have h := setIntegral_ge_of_const_le (measurableSet_le measurable_const (Finset.measurable_range_sup'' fun n _ => (hsub.stronglyMeasurable n).measurable.le (𝒢.le n))) (measure_ne_top _ _) this (Integrable.integrableOn (hsub.integrable_stoppedValue (hitting_isStoppingTime hsub.adapted measurableSet_Ici) hitting_le)) rw [ENNReal.le_ofReal_iff_toReal_le, ENNReal.toReal_smul] · exact h · exact ENNReal.mul_ne_top (by simp) (measure_ne_top _ _) · exact le_trans (mul_nonneg ε.coe_nonneg ENNReal.toReal_nonneg) h
18
65,659,969.137331
2
2
3
1,978
import Mathlib.Algebra.Ring.Idempotents import Mathlib.RingTheory.Finiteness import Mathlib.Order.Basic #align_import ring_theory.ideal.idempotent_fg from "leanprover-community/mathlib"@"25cf7631da8ddc2d5f957c388bf5e4b25a77d8dc" namespace Ideal
Mathlib/RingTheory/Ideal/IdempotentFG.lean
20
35
theorem isIdempotentElem_iff_of_fg {R : Type*} [CommRing R] (I : Ideal R) (h : I.FG) : IsIdempotentElem I ↔ ∃ e : R, IsIdempotentElem e ∧ I = R ∙ e := by
constructor · intro e obtain ⟨r, hr, hr'⟩ := Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I I h (by rw [smul_eq_mul] exact e.ge) simp_rw [smul_eq_mul] at hr' refine ⟨r, hr' r hr, antisymm ?_ ((Submodule.span_singleton_le_iff_mem _ _).mpr hr)⟩ intro x hx rw [← hr' x hx] exact Ideal.mem_span_singleton'.mpr ⟨_, mul_comm _ _⟩ · rintro ⟨e, he, rfl⟩ simp [IsIdempotentElem, Ideal.span_singleton_mul_span_singleton, he.eq]
14
1,202,604.284165
2
2
2
1,979
import Mathlib.Algebra.Ring.Idempotents import Mathlib.RingTheory.Finiteness import Mathlib.Order.Basic #align_import ring_theory.ideal.idempotent_fg from "leanprover-community/mathlib"@"25cf7631da8ddc2d5f957c388bf5e4b25a77d8dc" namespace Ideal theorem isIdempotentElem_iff_of_fg {R : Type*} [CommRing R] (I : Ideal R) (h : I.FG) : IsIdempotentElem I ↔ ∃ e : R, IsIdempotentElem e ∧ I = R ∙ e := by constructor · intro e obtain ⟨r, hr, hr'⟩ := Submodule.exists_mem_and_smul_eq_self_of_fg_of_le_smul I I h (by rw [smul_eq_mul] exact e.ge) simp_rw [smul_eq_mul] at hr' refine ⟨r, hr' r hr, antisymm ?_ ((Submodule.span_singleton_le_iff_mem _ _).mpr hr)⟩ intro x hx rw [← hr' x hx] exact Ideal.mem_span_singleton'.mpr ⟨_, mul_comm _ _⟩ · rintro ⟨e, he, rfl⟩ simp [IsIdempotentElem, Ideal.span_singleton_mul_span_singleton, he.eq] #align ideal.is_idempotent_elem_iff_of_fg Ideal.isIdempotentElem_iff_of_fg
Mathlib/RingTheory/Ideal/IdempotentFG.lean
38
47
theorem isIdempotentElem_iff_eq_bot_or_top {R : Type*} [CommRing R] [IsDomain R] (I : Ideal R) (h : I.FG) : IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤ := by
constructor · intro H obtain ⟨e, he, rfl⟩ := (I.isIdempotentElem_iff_of_fg h).mp H simp only [Ideal.submodule_span_eq, Ideal.span_singleton_eq_bot] apply Or.imp id _ (IsIdempotentElem.iff_eq_zero_or_one.mp he) rintro rfl simp · rintro (rfl | rfl) <;> simp [IsIdempotentElem]
8
2,980.957987
2
2
2
1,979
import Mathlib.Analysis.NormedSpace.Units import Mathlib.Algebra.Algebra.Spectrum import Mathlib.Topology.ContinuousFunction.Algebra #align_import topology.continuous_function.units from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" variable {X M R 𝕜 : Type*} [TopologicalSpace X] namespace ContinuousMap section NormedRing variable [NormedRing R] [CompleteSpace R]
Mathlib/Topology/ContinuousFunction/Units.lean
70
79
theorem continuous_isUnit_unit {f : C(X, R)} (h : ∀ x, IsUnit (f x)) : Continuous fun x => (h x).unit := by
refine continuous_induced_rng.2 (Continuous.prod_mk f.continuous (MulOpposite.continuous_op.comp (continuous_iff_continuousAt.mpr fun x => ?_))) have := NormedRing.inverse_continuousAt (h x).unit simp only simp only [← Ring.inverse_unit, IsUnit.unit_spec] at this ⊢ exact this.comp (f.continuousAt x)
8
2,980.957987
2
2
1
1,980
import Mathlib.CategoryTheory.Monoidal.Category import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts import Mathlib.CategoryTheory.PEmpty #align_import category_theory.monoidal.of_chosen_finite_products.basic from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4" universe v u namespace CategoryTheory variable (C : Type u) [Category.{v} C] {X Y : C} open CategoryTheory.Limits section -- Porting note: no tidy -- attribute [local tidy] tactic.case_bash variable {C} variable (𝒯 : LimitCone (Functor.empty.{0} C)) variable (ℬ : ∀ X Y : C, LimitCone (pair X Y)) namespace MonoidalOfChosenFiniteProducts abbrev tensorObj (X Y : C) : C := (ℬ X Y).cone.pt #align category_theory.monoidal_of_chosen_finite_products.tensor_obj CategoryTheory.MonoidalOfChosenFiniteProducts.tensorObj abbrev tensorHom {W X Y Z : C} (f : W ⟶ X) (g : Y ⟶ Z) : tensorObj ℬ W Y ⟶ tensorObj ℬ X Z := (BinaryFan.IsLimit.lift' (ℬ X Z).isLimit ((ℬ W Y).cone.π.app ⟨WalkingPair.left⟩ ≫ f) (((ℬ W Y).cone.π.app ⟨WalkingPair.right⟩ : (ℬ W Y).cone.pt ⟶ Y) ≫ g)).val #align category_theory.monoidal_of_chosen_finite_products.tensor_hom CategoryTheory.MonoidalOfChosenFiniteProducts.tensorHom
Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Basic.lean
242
246
theorem tensor_id (X₁ X₂ : C) : tensorHom ℬ (𝟙 X₁) (𝟙 X₂) = 𝟙 (tensorObj ℬ X₁ X₂) := by
apply IsLimit.hom_ext (ℬ _ _).isLimit; rintro ⟨⟨⟩⟩ <;> · dsimp [tensorHom] simp
4
54.59815
2
2
2
1,981
import Mathlib.CategoryTheory.Monoidal.Category import Mathlib.CategoryTheory.Limits.Shapes.BinaryProducts import Mathlib.CategoryTheory.PEmpty #align_import category_theory.monoidal.of_chosen_finite_products.basic from "leanprover-community/mathlib"@"95a87616d63b3cb49d3fe678d416fbe9c4217bf4" universe v u namespace CategoryTheory variable (C : Type u) [Category.{v} C] {X Y : C} open CategoryTheory.Limits section -- Porting note: no tidy -- attribute [local tidy] tactic.case_bash variable {C} variable (𝒯 : LimitCone (Functor.empty.{0} C)) variable (ℬ : ∀ X Y : C, LimitCone (pair X Y)) namespace MonoidalOfChosenFiniteProducts abbrev tensorObj (X Y : C) : C := (ℬ X Y).cone.pt #align category_theory.monoidal_of_chosen_finite_products.tensor_obj CategoryTheory.MonoidalOfChosenFiniteProducts.tensorObj abbrev tensorHom {W X Y Z : C} (f : W ⟶ X) (g : Y ⟶ Z) : tensorObj ℬ W Y ⟶ tensorObj ℬ X Z := (BinaryFan.IsLimit.lift' (ℬ X Z).isLimit ((ℬ W Y).cone.π.app ⟨WalkingPair.left⟩ ≫ f) (((ℬ W Y).cone.π.app ⟨WalkingPair.right⟩ : (ℬ W Y).cone.pt ⟶ Y) ≫ g)).val #align category_theory.monoidal_of_chosen_finite_products.tensor_hom CategoryTheory.MonoidalOfChosenFiniteProducts.tensorHom theorem tensor_id (X₁ X₂ : C) : tensorHom ℬ (𝟙 X₁) (𝟙 X₂) = 𝟙 (tensorObj ℬ X₁ X₂) := by apply IsLimit.hom_ext (ℬ _ _).isLimit; rintro ⟨⟨⟩⟩ <;> · dsimp [tensorHom] simp #align category_theory.monoidal_of_chosen_finite_products.tensor_id CategoryTheory.MonoidalOfChosenFiniteProducts.tensor_id
Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Basic.lean
249
254
theorem tensor_comp {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁) (g₂ : Y₂ ⟶ Z₂) : tensorHom ℬ (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom ℬ f₁ f₂ ≫ tensorHom ℬ g₁ g₂ := by
apply IsLimit.hom_ext (ℬ _ _).isLimit; rintro ⟨⟨⟩⟩ <;> · dsimp [tensorHom] simp
4
54.59815
2
2
2
1,981
import Mathlib.CategoryTheory.Sites.DenseSubsite #align_import category_theory.sites.induced_topology from "leanprover-community/mathlib"@"ba43124c37cfe0009bbfc57505f9503ae0e8c1af" namespace CategoryTheory universe v u open Limits Opposite Presieve section variable {C : Type*} [Category C] {D : Type*} [Category D] {G : C ⥤ D} variable {J : GrothendieckTopology C} {K : GrothendieckTopology D} variable (A : Type v) [Category.{u} A] -- variables (A) [full G] [faithful G] def LocallyCoverDense (K : GrothendieckTopology D) (G : C ⥤ D) : Prop := ∀ ⦃X : C⦄ (T : K (G.obj X)), (T.val.functorPullback G).functorPushforward G ∈ K (G.obj X) #align category_theory.locally_cover_dense CategoryTheory.LocallyCoverDense namespace LocallyCoverDense variable [G.Full] [G.Faithful] (Hld : LocallyCoverDense K G)
Mathlib/CategoryTheory/Sites/InducedTopology.lean
59
65
theorem pushforward_cover_iff_cover_pullback {X : C} (S : Sieve X) : K _ (S.functorPushforward G) ↔ ∃ T : K (G.obj X), T.val.functorPullback G = S := by
constructor · intro hS exact ⟨⟨_, hS⟩, (Sieve.fullyFaithfulFunctorGaloisCoinsertion G X).u_l_eq S⟩ · rintro ⟨T, rfl⟩ exact Hld T
5
148.413159
2
2
2
1,982
import Mathlib.CategoryTheory.Sites.DenseSubsite #align_import category_theory.sites.induced_topology from "leanprover-community/mathlib"@"ba43124c37cfe0009bbfc57505f9503ae0e8c1af" namespace CategoryTheory universe v u open Limits Opposite Presieve section variable {C : Type*} [Category C] {D : Type*} [Category D] {G : C ⥤ D} variable {J : GrothendieckTopology C} {K : GrothendieckTopology D} variable (A : Type v) [Category.{u} A] -- variables (A) [full G] [faithful G] def LocallyCoverDense (K : GrothendieckTopology D) (G : C ⥤ D) : Prop := ∀ ⦃X : C⦄ (T : K (G.obj X)), (T.val.functorPullback G).functorPushforward G ∈ K (G.obj X) #align category_theory.locally_cover_dense CategoryTheory.LocallyCoverDense variable (G K)
Mathlib/CategoryTheory/Sites/InducedTopology.lean
112
121
theorem Functor.locallyCoverDense_of_isCoverDense [Full G] [G.IsCoverDense K] : LocallyCoverDense K G := by
intro X T refine K.superset_covering ?_ (K.bind_covering T.property fun Y f _ => G.is_cover_of_isCoverDense _ Y) rintro Y _ ⟨Z, _, f, hf, ⟨W, g, f', rfl : _ = _⟩, rfl⟩ use W; use G.preimage (f' ≫ f); use g constructor · simpa using T.val.downward_closed hf f' · simp
8
2,980.957987
2
2
2
1,982
import Mathlib.Order.Partition.Equipartition #align_import combinatorics.simple_graph.regularity.equitabilise from "leanprover-community/mathlib"@"bf7ef0e83e5b7e6c1169e97f055e58a2e4e9d52d" open Finset Nat namespace Finpartition variable {α : Type*} [DecidableEq α] {s t : Finset α} {m n a b : ℕ} {P : Finpartition s}
Mathlib/Combinatorics/SimpleGraph/Regularity/Equitabilise.lean
42
139
theorem equitabilise_aux (hs : a * m + b * (m + 1) = s.card) : ∃ Q : Finpartition s, (∀ x : Finset α, x ∈ Q.parts → x.card = m ∨ x.card = m + 1) ∧ (∀ x, x ∈ P.parts → (x \ (Q.parts.filter fun y => y ⊆ x).biUnion id).card ≤ m) ∧ (Q.parts.filter fun i => card i = m + 1).card = b := by
-- Get rid of the easy case `m = 0` obtain rfl | m_pos := m.eq_zero_or_pos · refine ⟨⊥, by simp, ?_, by simpa [Finset.filter_true_of_mem] using hs.symm⟩ simp only [le_zero_iff, card_eq_zero, mem_biUnion, exists_prop, mem_filter, id, and_assoc, sdiff_eq_empty_iff_subset, subset_iff] exact fun x hx a ha => ⟨{a}, mem_map_of_mem _ (P.le hx ha), singleton_subset_iff.2 ha, mem_singleton_self _⟩ -- Prove the case `m > 0` by strong induction on `s` induction' s using Finset.strongInduction with s ih generalizing a b -- If `a = b = 0`, then `s = ∅` and we can partition into zero parts by_cases hab : a = 0 ∧ b = 0 · simp only [hab.1, hab.2, add_zero, zero_mul, eq_comm, card_eq_zero, Finset.bot_eq_empty] at hs subst hs -- Porting note: to synthesize `Finpartition ∅`, `have` is required have : P = Finpartition.empty _ := Unique.eq_default (α := Finpartition ⊥) P exact ⟨Finpartition.empty _, by simp, by simp [this], by simp [hab.2]⟩ simp_rw [not_and_or, ← Ne.eq_def, ← pos_iff_ne_zero] at hab -- `n` will be the size of the smallest part set n := if 0 < a then m else m + 1 with hn -- Some easy facts about it obtain ⟨hn₀, hn₁, hn₂, hn₃⟩ : 0 < n ∧ n ≤ m + 1 ∧ n ≤ a * m + b * (m + 1) ∧ ite (0 < a) (a - 1) a * m + ite (0 < a) b (b - 1) * (m + 1) = s.card - n := by rw [hn, ← hs] split_ifs with h <;> rw [tsub_mul, one_mul] · refine ⟨m_pos, le_succ _, le_add_right (Nat.le_mul_of_pos_left _ ‹0 < a›), ?_⟩ rw [tsub_add_eq_add_tsub (Nat.le_mul_of_pos_left _ h)] · refine ⟨succ_pos', le_rfl, le_add_left (Nat.le_mul_of_pos_left _ <| hab.resolve_left ‹¬0 < a›), ?_⟩ rw [← add_tsub_assoc_of_le (Nat.le_mul_of_pos_left _ <| hab.resolve_left ‹¬0 < a›)] /- We will call the inductive hypothesis on a partition of `s \ t` for a carefully chosen `t ⊆ s`. To decide which, however, we must distinguish the case where all parts of `P` have size `m` (in which case we take `t` to be an arbitrary subset of `s` of size `n`) from the case where at least one part `u` of `P` has size `m + 1` (in which case we take `t` to be an arbitrary subset of `u` of size `n`). The rest of each branch is just tedious calculations to satisfy the induction hypothesis. -/ by_cases h : ∀ u ∈ P.parts, card u < m + 1 · obtain ⟨t, hts, htn⟩ := exists_smaller_set s n (hn₂.trans_eq hs) have ht : t.Nonempty := by rwa [← card_pos, htn] have hcard : ite (0 < a) (a - 1) a * m + ite (0 < a) b (b - 1) * (m + 1) = (s \ t).card := by rw [card_sdiff ‹t ⊆ s›, htn, hn₃] obtain ⟨R, hR₁, _, hR₃⟩ := @ih (s \ t) (sdiff_ssubset hts ‹t.Nonempty›) (if 0 < a then a - 1 else a) (if 0 < a then b else b - 1) (P.avoid t) hcard refine ⟨R.extend ht.ne_empty sdiff_disjoint (sdiff_sup_cancel hts), ?_, ?_, ?_⟩ · simp only [extend_parts, mem_insert, forall_eq_or_imp, and_iff_left hR₁, htn, hn] exact ite_eq_or_eq _ _ _ · exact fun x hx => (card_le_card sdiff_subset).trans (Nat.lt_succ_iff.1 <| h _ hx) simp_rw [extend_parts, filter_insert, htn, m.succ_ne_self.symm.ite_eq_right_iff] split_ifs with ha · rw [hR₃, if_pos ha] rw [card_insert_of_not_mem, hR₃, if_neg ha, tsub_add_cancel_of_le] · exact hab.resolve_left ha · intro H; exact ht.ne_empty (le_sdiff_iff.1 <| R.le <| filter_subset _ _ H) push_neg at h obtain ⟨u, hu₁, hu₂⟩ := h obtain ⟨t, htu, htn⟩ := exists_smaller_set _ _ (hn₁.trans hu₂) have ht : t.Nonempty := by rwa [← card_pos, htn] have hcard : ite (0 < a) (a - 1) a * m + ite (0 < a) b (b - 1) * (m + 1) = (s \ t).card := by rw [card_sdiff (htu.trans <| P.le hu₁), htn, hn₃] obtain ⟨R, hR₁, hR₂, hR₃⟩ := @ih (s \ t) (sdiff_ssubset (htu.trans <| P.le hu₁) ht) (if 0 < a then a - 1 else a) (if 0 < a then b else b - 1) (P.avoid t) hcard refine ⟨R.extend ht.ne_empty sdiff_disjoint (sdiff_sup_cancel <| htu.trans <| P.le hu₁), ?_, ?_, ?_⟩ · simp only [mem_insert, forall_eq_or_imp, extend_parts, and_iff_left hR₁, htn, hn] exact ite_eq_or_eq _ _ _ · conv in _ ∈ _ => rw [← insert_erase hu₁] simp only [and_imp, mem_insert, forall_eq_or_imp, Ne, extend_parts] refine ⟨?_, fun x hx => (card_le_card ?_).trans <| hR₂ x ?_⟩ · simp only [filter_insert, if_pos htu, biUnion_insert, mem_erase, id] obtain rfl | hut := eq_or_ne u t · rw [sdiff_eq_empty_iff_subset.2 subset_union_left] exact bot_le refine (card_le_card fun i => ?_).trans (hR₂ (u \ t) <| P.mem_avoid.2 ⟨u, hu₁, fun i => hut <| i.antisymm htu, rfl⟩) -- Porting note: `not_and` required because `∃ x ∈ s, p x` is defined differently simp only [not_exists, not_and, mem_biUnion, and_imp, mem_union, mem_filter, mem_sdiff, id, not_or] exact fun hi₁ hi₂ hi₃ => ⟨⟨hi₁, hi₂⟩, fun x hx hx' => hi₃ _ hx <| hx'.trans sdiff_subset⟩ · apply sdiff_subset_sdiff Subset.rfl (biUnion_subset_biUnion_of_subset_left _ _) exact filter_subset_filter _ (subset_insert _ _) simp only [avoid, ofErase, mem_erase, mem_image, bot_eq_empty] exact ⟨(nonempty_of_mem_parts _ <| mem_of_mem_erase hx).ne_empty, _, mem_of_mem_erase hx, (disjoint_of_subset_right htu <| P.disjoint (mem_of_mem_erase hx) hu₁ <| ne_of_mem_erase hx).sdiff_eq_left⟩ simp only [extend_parts, filter_insert, htn, hn, m.succ_ne_self.symm.ite_eq_right_iff] split_ifs with h · rw [hR₃, if_pos h] · rw [card_insert_of_not_mem, hR₃, if_neg h, Nat.sub_add_cancel (hab.resolve_left h)] intro H; exact ht.ne_empty (le_sdiff_iff.1 <| R.le <| filter_subset _ _ H)
93
24,512,455,429,200,860,000,000,000,000,000,000,000,000
2
2
1
1,983
import Mathlib.Analysis.NormedSpace.Star.Basic import Mathlib.Analysis.NormedSpace.Unitization #align_import analysis.normed_space.star.mul from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a89a999c2f" open ContinuousLinearMap local postfix:max "⋆" => star variable (𝕜 : Type*) {E : Type*} variable [DenselyNormedField 𝕜] [NonUnitalNormedRing E] [StarRing E] [CstarRing E] variable [NormedSpace 𝕜 E] [IsScalarTower 𝕜 E E] [SMulCommClass 𝕜 E E] variable (E) instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <| show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by rw [← sSup_closed_unit_ball_eq_nnnorm] refine csSup_eq_of_forall_le_of_forall_lt_exists_gt ?_ ?_ fun r hr => ?_ · exact (Metric.nonempty_closedBall.mpr zero_le_one).image _ · rintro - ⟨x, hx, rfl⟩ exact ((mul 𝕜 E a).unit_le_opNorm x <| mem_closedBall_zero_iff.mp hx).trans (opNorm_mul_apply_le 𝕜 E a) · have ha : 0 < ‖a‖₊ := zero_le'.trans_lt hr rw [← inv_inv ‖a‖₊, NNReal.lt_inv_iff_mul_lt (inv_ne_zero ha.ne')] at hr obtain ⟨k, hk₁, hk₂⟩ := NormedField.exists_lt_nnnorm_lt 𝕜 (mul_lt_mul_of_pos_right hr <| inv_pos.2 ha) refine ⟨_, ⟨k • star a, ?_, rfl⟩, ?_⟩ · simpa only [mem_closedBall_zero_iff, norm_smul, one_mul, norm_star] using (NNReal.le_inv_iff_mul_le ha.ne').1 (one_mul ‖a‖₊⁻¹ ▸ hk₂.le : ‖k‖₊ ≤ ‖a‖₊⁻¹) · simp only [map_smul, nnnorm_smul, mul_apply', mul_smul_comm, CstarRing.nnnorm_self_mul_star] rwa [← NNReal.div_lt_iff (mul_pos ha ha).ne', div_eq_mul_inv, mul_inv, ← mul_assoc] section CStarProperty variable [StarRing 𝕜] [CstarRing 𝕜] [StarModule 𝕜 E] variable {E}
Mathlib/Analysis/NormedSpace/Star/Unitization.lean
87
124
theorem Unitization.norm_splitMul_snd_sq (x : Unitization 𝕜 E) : ‖(Unitization.splitMul 𝕜 E x).snd‖ ^ 2 ≤ ‖(Unitization.splitMul 𝕜 E (star x * x)).snd‖ := by
/- The key idea is that we can use `sSup_closed_unit_ball_eq_norm` to make this about applying this linear map to elements of norm at most one. There is a bit of `sqrt` and `sq` shuffling that needs to occur, which is primarily just an annoyance. -/ refine (Real.le_sqrt (norm_nonneg _) (norm_nonneg _)).mp ?_ simp only [Unitization.splitMul_apply] rw [← sSup_closed_unit_ball_eq_norm] refine csSup_le ((Metric.nonempty_closedBall.2 zero_le_one).image _) ?_ rintro - ⟨b, hb, rfl⟩ simp only -- rewrite to a more convenient form; this is where we use the C⋆-property rw [← Real.sqrt_sq (norm_nonneg _), Real.sqrt_le_sqrt_iff (norm_nonneg _), sq, ← CstarRing.norm_star_mul_self, ContinuousLinearMap.add_apply, star_add, mul_apply', Algebra.algebraMap_eq_smul_one, ContinuousLinearMap.smul_apply, ContinuousLinearMap.one_apply, star_mul, star_smul, add_mul, smul_mul_assoc, ← mul_smul_comm, mul_assoc, ← mul_add, ← sSup_closed_unit_ball_eq_norm] refine (norm_mul_le _ _).trans ?_ calc _ ≤ ‖star x.fst • (x.fst • b + x.snd * b) + star x.snd * (x.fst • b + x.snd * b)‖ := by nth_rewrite 2 [← one_mul ‖_ + _‖] gcongr exact (norm_star b).symm ▸ mem_closedBall_zero_iff.1 hb _ ≤ sSup (_ '' Metric.closedBall 0 1) := le_csSup ?_ ⟨b, hb, ?_⟩ -- now we just check the side conditions for `le_csSup`. There is nothing of interest here. · refine ⟨‖(star x * x).fst‖ + ‖(star x * x).snd‖, ?_⟩ rintro _ ⟨y, hy, rfl⟩ refine (norm_add_le _ _).trans ?_ gcongr · rw [Algebra.algebraMap_eq_smul_one] refine (norm_smul _ _).trans_le ?_ simpa only [mul_one] using mul_le_mul_of_nonneg_left (mem_closedBall_zero_iff.1 hy) (norm_nonneg (star x * x).fst) · exact (unit_le_opNorm _ y <| mem_closedBall_zero_iff.1 hy).trans (opNorm_mul_apply_le _ _ _) · simp only [ContinuousLinearMap.add_apply, mul_apply', Unitization.snd_star, Unitization.snd_mul, Unitization.fst_mul, Unitization.fst_star, Algebra.algebraMap_eq_smul_one, smul_apply, one_apply, smul_add, mul_add, add_mul] simp only [smul_smul, smul_mul_assoc, ← add_assoc, ← mul_assoc, mul_smul_comm]
36
4,311,231,547,115,195
2
2
1
1,984
import Mathlib.Algebra.Category.ModuleCat.EpiMono import Mathlib.Algebra.Category.ModuleCat.Kernels import Mathlib.CategoryTheory.Subobject.WellPowered import Mathlib.CategoryTheory.Subobject.Limits #align_import algebra.category.Module.subobject from "leanprover-community/mathlib"@"6d584f1709bedbed9175bd9350df46599bdd7213" open CategoryTheory open CategoryTheory.Subobject open CategoryTheory.Limits open ModuleCat universe v u namespace ModuleCat set_option linter.uppercaseLean3 false -- `Module` variable {R : Type u} [Ring R] (M : ModuleCat.{v} R) noncomputable def subobjectModule : Subobject M ≃o Submodule R M := OrderIso.symm { invFun := fun S => LinearMap.range S.arrow toFun := fun N => Subobject.mk (↾N.subtype) right_inv := fun S => Eq.symm (by fapply eq_mk_of_comm · apply LinearEquiv.toModuleIso'Left apply LinearEquiv.ofBijective (LinearMap.codRestrict (LinearMap.range S.arrow) S.arrow _) constructor · simp [← LinearMap.ker_eq_bot, LinearMap.ker_codRestrict] rw [ker_eq_bot_of_mono] · rw [← LinearMap.range_eq_top, LinearMap.range_codRestrict, Submodule.comap_subtype_self] exact LinearMap.mem_range_self _ · apply LinearMap.ext intro x rfl) left_inv := fun N => by -- Porting note: The type of `↾N.subtype` was ambiguous. Not entirely sure, I made the right -- choice here convert congr_arg LinearMap.range (underlyingIso_arrow (↾N.subtype : of R { x // x ∈ N } ⟶ M)) using 1 · have : -- Porting note: added the `.toLinearEquiv.toLinearMap` (underlyingIso (↾N.subtype : of R _ ⟶ M)).inv = (underlyingIso (↾N.subtype : of R _ ⟶ M)).symm.toLinearEquiv.toLinearMap := by apply LinearMap.ext intro x rfl rw [this, comp_def, LinearEquiv.range_comp] · exact (Submodule.range_subtype _).symm map_rel_iff' := fun {S T} => by refine ⟨fun h => ?_, fun h => mk_le_mk_of_comm (↟(Submodule.inclusion h)) rfl⟩ convert LinearMap.range_comp_le_range (ofMkLEMk _ _ h) (↾T.subtype) · simpa only [← comp_def, ofMkLEMk_comp] using (Submodule.range_subtype _).symm · exact (Submodule.range_subtype _).symm } #align Module.subobject_Module ModuleCat.subobjectModule instance wellPowered_moduleCat : WellPowered (ModuleCat.{v} R) := ⟨fun M => ⟨⟨_, ⟨(subobjectModule M).toEquiv⟩⟩⟩⟩ #align Module.well_powered_Module ModuleCat.wellPowered_moduleCat attribute [local instance] hasKernels_moduleCat noncomputable def toKernelSubobject {M N : ModuleCat.{v} R} {f : M ⟶ N} : LinearMap.ker f →ₗ[R] kernelSubobject f := (kernelSubobjectIso f ≪≫ ModuleCat.kernelIsoKer f).inv #align Module.to_kernel_subobject ModuleCat.toKernelSubobject @[simp]
Mathlib/Algebra/Category/ModuleCat/Subobject.lean
89
96
theorem toKernelSubobject_arrow {M N : ModuleCat R} {f : M ⟶ N} (x : LinearMap.ker f) : (kernelSubobject f).arrow (toKernelSubobject x) = x.1 := by
-- Porting note: The whole proof was just `simp [toKernelSubobject]`. suffices ((arrow ((kernelSubobject f))) ∘ (kernelSubobjectIso f ≪≫ kernelIsoKer f).inv) x = x by convert this rw [Iso.trans_inv, ← coe_comp, Category.assoc] simp only [Category.assoc, kernelSubobject_arrow', kernelIsoKer_inv_kernel_ι] aesop_cat
6
403.428793
2
2
2
1,985
import Mathlib.Algebra.Category.ModuleCat.EpiMono import Mathlib.Algebra.Category.ModuleCat.Kernels import Mathlib.CategoryTheory.Subobject.WellPowered import Mathlib.CategoryTheory.Subobject.Limits #align_import algebra.category.Module.subobject from "leanprover-community/mathlib"@"6d584f1709bedbed9175bd9350df46599bdd7213" open CategoryTheory open CategoryTheory.Subobject open CategoryTheory.Limits open ModuleCat universe v u namespace ModuleCat set_option linter.uppercaseLean3 false -- `Module` variable {R : Type u} [Ring R] (M : ModuleCat.{v} R) noncomputable def subobjectModule : Subobject M ≃o Submodule R M := OrderIso.symm { invFun := fun S => LinearMap.range S.arrow toFun := fun N => Subobject.mk (↾N.subtype) right_inv := fun S => Eq.symm (by fapply eq_mk_of_comm · apply LinearEquiv.toModuleIso'Left apply LinearEquiv.ofBijective (LinearMap.codRestrict (LinearMap.range S.arrow) S.arrow _) constructor · simp [← LinearMap.ker_eq_bot, LinearMap.ker_codRestrict] rw [ker_eq_bot_of_mono] · rw [← LinearMap.range_eq_top, LinearMap.range_codRestrict, Submodule.comap_subtype_self] exact LinearMap.mem_range_self _ · apply LinearMap.ext intro x rfl) left_inv := fun N => by -- Porting note: The type of `↾N.subtype` was ambiguous. Not entirely sure, I made the right -- choice here convert congr_arg LinearMap.range (underlyingIso_arrow (↾N.subtype : of R { x // x ∈ N } ⟶ M)) using 1 · have : -- Porting note: added the `.toLinearEquiv.toLinearMap` (underlyingIso (↾N.subtype : of R _ ⟶ M)).inv = (underlyingIso (↾N.subtype : of R _ ⟶ M)).symm.toLinearEquiv.toLinearMap := by apply LinearMap.ext intro x rfl rw [this, comp_def, LinearEquiv.range_comp] · exact (Submodule.range_subtype _).symm map_rel_iff' := fun {S T} => by refine ⟨fun h => ?_, fun h => mk_le_mk_of_comm (↟(Submodule.inclusion h)) rfl⟩ convert LinearMap.range_comp_le_range (ofMkLEMk _ _ h) (↾T.subtype) · simpa only [← comp_def, ofMkLEMk_comp] using (Submodule.range_subtype _).symm · exact (Submodule.range_subtype _).symm } #align Module.subobject_Module ModuleCat.subobjectModule instance wellPowered_moduleCat : WellPowered (ModuleCat.{v} R) := ⟨fun M => ⟨⟨_, ⟨(subobjectModule M).toEquiv⟩⟩⟩⟩ #align Module.well_powered_Module ModuleCat.wellPowered_moduleCat attribute [local instance] hasKernels_moduleCat noncomputable def toKernelSubobject {M N : ModuleCat.{v} R} {f : M ⟶ N} : LinearMap.ker f →ₗ[R] kernelSubobject f := (kernelSubobjectIso f ≪≫ ModuleCat.kernelIsoKer f).inv #align Module.to_kernel_subobject ModuleCat.toKernelSubobject @[simp] theorem toKernelSubobject_arrow {M N : ModuleCat R} {f : M ⟶ N} (x : LinearMap.ker f) : (kernelSubobject f).arrow (toKernelSubobject x) = x.1 := by -- Porting note: The whole proof was just `simp [toKernelSubobject]`. suffices ((arrow ((kernelSubobject f))) ∘ (kernelSubobjectIso f ≪≫ kernelIsoKer f).inv) x = x by convert this rw [Iso.trans_inv, ← coe_comp, Category.assoc] simp only [Category.assoc, kernelSubobject_arrow', kernelIsoKer_inv_kernel_ι] aesop_cat #align Module.to_kernel_subobject_arrow ModuleCat.toKernelSubobject_arrow -- Porting note (#11215): TODO compiler complains that this is marked with `@[ext]`. -- Should this be changed? -- @[ext] this is no longer an ext lemma under the current interpretation see eg -- the conversation beginning at -- https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/ -- Goal.20state.20not.20updating.2C.20bugs.2C.20etc.2E/near/338456803
Mathlib/Algebra/Category/ModuleCat/Subobject.lean
111
120
theorem cokernel_π_imageSubobject_ext {L M N : ModuleCat.{v} R} (f : L ⟶ M) [HasImage f] (g : (imageSubobject f : ModuleCat.{v} R) ⟶ N) [HasCokernel g] {x y : N} (l : L) (w : x = y + g (factorThruImageSubobject f l)) : cokernel.π g x = cokernel.π g y := by
subst w -- Porting note: The proof from here used to just be `simp`. simp only [map_add, add_right_eq_self] change ((cokernel.π g) ∘ (g) ∘ (factorThruImageSubobject f)) l = 0 rw [← coe_comp, ← coe_comp, Category.assoc] simp only [cokernel.condition, comp_zero] rfl
7
1,096.633158
2
2
2
1,985
import Mathlib.MeasureTheory.Measure.VectorMeasure import Mathlib.Order.SymmDiff #align_import measure_theory.decomposition.signed_hahn from "leanprover-community/mathlib"@"bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e" noncomputable section open scoped Classical NNReal ENNReal MeasureTheory variable {α β : Type*} [MeasurableSpace α] variable {M : Type*} [AddCommMonoid M] [TopologicalSpace M] [OrderedAddCommMonoid M] namespace MeasureTheory namespace SignedMeasure open Filter VectorMeasure variable {s : SignedMeasure α} {i j : Set α} def measureOfNegatives (s : SignedMeasure α) : Set ℝ := s '' { B | MeasurableSet B ∧ s ≤[B] 0 } #align measure_theory.signed_measure.measure_of_negatives MeasureTheory.SignedMeasure.measureOfNegatives theorem zero_mem_measureOfNegatives : (0 : ℝ) ∈ s.measureOfNegatives := ⟨∅, ⟨MeasurableSet.empty, le_restrict_empty _ _⟩, s.empty⟩ #align measure_theory.signed_measure.zero_mem_measure_of_negatives MeasureTheory.SignedMeasure.zero_mem_measureOfNegatives
Mathlib/MeasureTheory/Decomposition/SignedHahn.lean
342
364
theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives := by
simp_rw [BddBelow, Set.Nonempty, mem_lowerBounds] by_contra! h have h' : ∀ n : ℕ, ∃ y : ℝ, y ∈ s.measureOfNegatives ∧ y < -n := fun n => h (-n) choose f hf using h' have hf' : ∀ n : ℕ, ∃ B, MeasurableSet B ∧ s ≤[B] 0 ∧ s B < -n := by intro n rcases hf n with ⟨⟨B, ⟨hB₁, hBr⟩, hB₂⟩, hlt⟩ exact ⟨B, hB₁, hBr, hB₂.symm ▸ hlt⟩ choose B hmeas hr h_lt using hf' set A := ⋃ n, B n with hA have hfalse : ∀ n : ℕ, s A ≤ -n := by intro n refine le_trans ?_ (le_of_lt (h_lt _)) rw [hA, ← Set.diff_union_of_subset (Set.subset_iUnion _ n), of_union Set.disjoint_sdiff_left _ (hmeas n)] · refine add_le_of_nonpos_left ?_ have : s ≤[A] 0 := restrict_le_restrict_iUnion _ _ hmeas hr refine nonpos_of_restrict_le_zero _ (restrict_le_zero_subset _ ?_ Set.diff_subset this) exact MeasurableSet.iUnion hmeas · exact (MeasurableSet.iUnion hmeas).diff (hmeas n) rcases exists_nat_gt (-s A) with ⟨n, hn⟩ exact lt_irrefl _ ((neg_lt.1 hn).trans_le (hfalse n))
22
3,584,912,846.131591
2
2
1
1,986
import Mathlib.CategoryTheory.EffectiveEpi.Preserves import Mathlib.CategoryTheory.Limits.Final.ParallelPair import Mathlib.CategoryTheory.Preadditive.Projective import Mathlib.CategoryTheory.Sites.Canonical import Mathlib.CategoryTheory.Sites.Coherent.Basic import Mathlib.CategoryTheory.Sites.EffectiveEpimorphic namespace CategoryTheory open Limits variable {C D E : Type*} [Category C] [Category D] [Category E] open Opposite Presieve Functor class Presieve.regular {X : C} (R : Presieve X) : Prop where single_epi : ∃ (Y : C) (f : Y ⟶ X), R = Presieve.ofArrows (fun (_ : Unit) ↦ Y) (fun (_ : Unit) ↦ f) ∧ EffectiveEpi f namespace regularTopology lemma equalizerCondition_w (P : Cᵒᵖ ⥤ D) {X B : C} {π : X ⟶ B} (c : PullbackCone π π) : P.map π.op ≫ P.map c.fst.op = P.map π.op ≫ P.map c.snd.op := by simp only [← Functor.map_comp, ← op_comp, c.condition] def SingleEqualizerCondition (P : Cᵒᵖ ⥤ D) ⦃X B : C⦄ (π : X ⟶ B) : Prop := ∀ (c : PullbackCone π π) (_ : IsLimit c), Nonempty (IsLimit (Fork.ofι (P.map π.op) (equalizerCondition_w P c))) def EqualizerCondition (P : Cᵒᵖ ⥤ D) : Prop := ∀ ⦃X B : C⦄ (π : X ⟶ B) [EffectiveEpi π], SingleEqualizerCondition P π theorem equalizerCondition_of_natIso {P P' : Cᵒᵖ ⥤ D} (i : P ≅ P') (hP : EqualizerCondition P) : EqualizerCondition P' := fun X B π _ c hc ↦ ⟨Fork.isLimitOfIsos _ (hP π c hc).some _ (i.app _) (i.app _) (i.app _)⟩
Mathlib/CategoryTheory/Sites/Coherent/RegularSheaves.lean
69
79
theorem equalizerCondition_precomp_of_preservesPullback (P : Cᵒᵖ ⥤ D) (F : E ⥤ C) [∀ {X B} (π : X ⟶ B) [EffectiveEpi π], PreservesLimit (cospan π π) F] [F.PreservesEffectiveEpis] (hP : EqualizerCondition P) : EqualizerCondition (F.op ⋙ P) := by
intro X B π _ c hc have h : P.map (F.map π).op = (F.op ⋙ P).map π.op := by simp refine ⟨(IsLimit.equivIsoLimit (ForkOfι.ext ?_ _ h)) ?_⟩ · simp only [Functor.comp_map, op_map, Quiver.Hom.unop_op, ← map_comp, ← op_comp, c.condition] · refine (hP (F.map π) (PullbackCone.mk (F.map c.fst) (F.map c.snd) ?_) ?_).some · simp only [← map_comp, c.condition] · exact (isLimitMapConePullbackConeEquiv F c.condition) (isLimitOfPreserves F (hc.ofIsoLimit (PullbackCone.ext (Iso.refl _) (by simp) (by simp))))
8
2,980.957987
2
2
3
1,987
import Mathlib.CategoryTheory.EffectiveEpi.Preserves import Mathlib.CategoryTheory.Limits.Final.ParallelPair import Mathlib.CategoryTheory.Preadditive.Projective import Mathlib.CategoryTheory.Sites.Canonical import Mathlib.CategoryTheory.Sites.Coherent.Basic import Mathlib.CategoryTheory.Sites.EffectiveEpimorphic namespace CategoryTheory open Limits variable {C D E : Type*} [Category C] [Category D] [Category E] open Opposite Presieve Functor class Presieve.regular {X : C} (R : Presieve X) : Prop where single_epi : ∃ (Y : C) (f : Y ⟶ X), R = Presieve.ofArrows (fun (_ : Unit) ↦ Y) (fun (_ : Unit) ↦ f) ∧ EffectiveEpi f namespace regularTopology lemma equalizerCondition_w (P : Cᵒᵖ ⥤ D) {X B : C} {π : X ⟶ B} (c : PullbackCone π π) : P.map π.op ≫ P.map c.fst.op = P.map π.op ≫ P.map c.snd.op := by simp only [← Functor.map_comp, ← op_comp, c.condition] def SingleEqualizerCondition (P : Cᵒᵖ ⥤ D) ⦃X B : C⦄ (π : X ⟶ B) : Prop := ∀ (c : PullbackCone π π) (_ : IsLimit c), Nonempty (IsLimit (Fork.ofι (P.map π.op) (equalizerCondition_w P c))) def EqualizerCondition (P : Cᵒᵖ ⥤ D) : Prop := ∀ ⦃X B : C⦄ (π : X ⟶ B) [EffectiveEpi π], SingleEqualizerCondition P π theorem equalizerCondition_of_natIso {P P' : Cᵒᵖ ⥤ D} (i : P ≅ P') (hP : EqualizerCondition P) : EqualizerCondition P' := fun X B π _ c hc ↦ ⟨Fork.isLimitOfIsos _ (hP π c hc).some _ (i.app _) (i.app _) (i.app _)⟩ theorem equalizerCondition_precomp_of_preservesPullback (P : Cᵒᵖ ⥤ D) (F : E ⥤ C) [∀ {X B} (π : X ⟶ B) [EffectiveEpi π], PreservesLimit (cospan π π) F] [F.PreservesEffectiveEpis] (hP : EqualizerCondition P) : EqualizerCondition (F.op ⋙ P) := by intro X B π _ c hc have h : P.map (F.map π).op = (F.op ⋙ P).map π.op := by simp refine ⟨(IsLimit.equivIsoLimit (ForkOfι.ext ?_ _ h)) ?_⟩ · simp only [Functor.comp_map, op_map, Quiver.Hom.unop_op, ← map_comp, ← op_comp, c.condition] · refine (hP (F.map π) (PullbackCone.mk (F.map c.fst) (F.map c.snd) ?_) ?_).some · simp only [← map_comp, c.condition] · exact (isLimitMapConePullbackConeEquiv F c.condition) (isLimitOfPreserves F (hc.ofIsoLimit (PullbackCone.ext (Iso.refl _) (by simp) (by simp)))) def MapToEqualizer (P : Cᵒᵖ ⥤ Type*) {W X B : C} (f : X ⟶ B) (g₁ g₂ : W ⟶ X) (w : g₁ ≫ f = g₂ ≫ f) : P.obj (op B) → { x : P.obj (op X) | P.map g₁.op x = P.map g₂.op x } := fun t ↦ ⟨P.map f.op t, by simp only [Set.mem_setOf_eq, ← FunctorToTypes.map_comp_apply, ← op_comp, w]⟩
Mathlib/CategoryTheory/Sites/Coherent/RegularSheaves.lean
87
100
theorem EqualizerCondition.bijective_mapToEqualizer_pullback (P : Cᵒᵖ ⥤ Type*) (hP : EqualizerCondition P) : ∀ (X B : C) (π : X ⟶ B) [EffectiveEpi π] [HasPullback π π], Function.Bijective (MapToEqualizer P π (pullback.fst (f := π) (g := π)) (pullback.snd (f := π) (g := π)) pullback.condition) := by
intro X B π _ _ specialize hP π _ (pullbackIsPullback π π) rw [Types.type_equalizer_iff_unique] at hP rw [Function.bijective_iff_existsUnique] intro ⟨b, hb⟩ obtain ⟨a, ha₁, ha₂⟩ := hP b hb refine ⟨a, ?_, ?_⟩ · simpa [MapToEqualizer] using ha₁ · simpa [MapToEqualizer] using ha₂
9
8,103.083928
2
2
3
1,987
import Mathlib.CategoryTheory.EffectiveEpi.Preserves import Mathlib.CategoryTheory.Limits.Final.ParallelPair import Mathlib.CategoryTheory.Preadditive.Projective import Mathlib.CategoryTheory.Sites.Canonical import Mathlib.CategoryTheory.Sites.Coherent.Basic import Mathlib.CategoryTheory.Sites.EffectiveEpimorphic namespace CategoryTheory open Limits variable {C D E : Type*} [Category C] [Category D] [Category E] open Opposite Presieve Functor class Presieve.regular {X : C} (R : Presieve X) : Prop where single_epi : ∃ (Y : C) (f : Y ⟶ X), R = Presieve.ofArrows (fun (_ : Unit) ↦ Y) (fun (_ : Unit) ↦ f) ∧ EffectiveEpi f namespace regularTopology lemma equalizerCondition_w (P : Cᵒᵖ ⥤ D) {X B : C} {π : X ⟶ B} (c : PullbackCone π π) : P.map π.op ≫ P.map c.fst.op = P.map π.op ≫ P.map c.snd.op := by simp only [← Functor.map_comp, ← op_comp, c.condition] def SingleEqualizerCondition (P : Cᵒᵖ ⥤ D) ⦃X B : C⦄ (π : X ⟶ B) : Prop := ∀ (c : PullbackCone π π) (_ : IsLimit c), Nonempty (IsLimit (Fork.ofι (P.map π.op) (equalizerCondition_w P c))) def EqualizerCondition (P : Cᵒᵖ ⥤ D) : Prop := ∀ ⦃X B : C⦄ (π : X ⟶ B) [EffectiveEpi π], SingleEqualizerCondition P π theorem equalizerCondition_of_natIso {P P' : Cᵒᵖ ⥤ D} (i : P ≅ P') (hP : EqualizerCondition P) : EqualizerCondition P' := fun X B π _ c hc ↦ ⟨Fork.isLimitOfIsos _ (hP π c hc).some _ (i.app _) (i.app _) (i.app _)⟩ theorem equalizerCondition_precomp_of_preservesPullback (P : Cᵒᵖ ⥤ D) (F : E ⥤ C) [∀ {X B} (π : X ⟶ B) [EffectiveEpi π], PreservesLimit (cospan π π) F] [F.PreservesEffectiveEpis] (hP : EqualizerCondition P) : EqualizerCondition (F.op ⋙ P) := by intro X B π _ c hc have h : P.map (F.map π).op = (F.op ⋙ P).map π.op := by simp refine ⟨(IsLimit.equivIsoLimit (ForkOfι.ext ?_ _ h)) ?_⟩ · simp only [Functor.comp_map, op_map, Quiver.Hom.unop_op, ← map_comp, ← op_comp, c.condition] · refine (hP (F.map π) (PullbackCone.mk (F.map c.fst) (F.map c.snd) ?_) ?_).some · simp only [← map_comp, c.condition] · exact (isLimitMapConePullbackConeEquiv F c.condition) (isLimitOfPreserves F (hc.ofIsoLimit (PullbackCone.ext (Iso.refl _) (by simp) (by simp)))) def MapToEqualizer (P : Cᵒᵖ ⥤ Type*) {W X B : C} (f : X ⟶ B) (g₁ g₂ : W ⟶ X) (w : g₁ ≫ f = g₂ ≫ f) : P.obj (op B) → { x : P.obj (op X) | P.map g₁.op x = P.map g₂.op x } := fun t ↦ ⟨P.map f.op t, by simp only [Set.mem_setOf_eq, ← FunctorToTypes.map_comp_apply, ← op_comp, w]⟩ theorem EqualizerCondition.bijective_mapToEqualizer_pullback (P : Cᵒᵖ ⥤ Type*) (hP : EqualizerCondition P) : ∀ (X B : C) (π : X ⟶ B) [EffectiveEpi π] [HasPullback π π], Function.Bijective (MapToEqualizer P π (pullback.fst (f := π) (g := π)) (pullback.snd (f := π) (g := π)) pullback.condition) := by intro X B π _ _ specialize hP π _ (pullbackIsPullback π π) rw [Types.type_equalizer_iff_unique] at hP rw [Function.bijective_iff_existsUnique] intro ⟨b, hb⟩ obtain ⟨a, ha₁, ha₂⟩ := hP b hb refine ⟨a, ?_, ?_⟩ · simpa [MapToEqualizer] using ha₁ · simpa [MapToEqualizer] using ha₂
Mathlib/CategoryTheory/Sites/Coherent/RegularSheaves.lean
102
120
theorem EqualizerCondition.mk (P : Cᵒᵖ ⥤ Type*) (hP : ∀ (X B : C) (π : X ⟶ B) [EffectiveEpi π] [HasPullback π π], Function.Bijective (MapToEqualizer P π (pullback.fst (f := π) (g := π)) (pullback.snd (f := π) (g := π)) pullback.condition)) : EqualizerCondition P := by
intro X B π _ c hc have : HasPullback π π := ⟨c, hc⟩ specialize hP X B π rw [Types.type_equalizer_iff_unique] rw [Function.bijective_iff_existsUnique] at hP intro b hb have h₁ : ((pullbackIsPullback π π).conePointUniqueUpToIso hc).hom ≫ c.fst = pullback.fst (f := π) (g := π) := by simp have hb' : P.map (pullback.fst (f := π) (g := π)).op b = P.map pullback.snd.op b := by rw [← h₁, op_comp, FunctorToTypes.map_comp_apply, hb] simp [← FunctorToTypes.map_comp_apply, ← op_comp] obtain ⟨a, ha₁, ha₂⟩ := hP ⟨b, hb'⟩ refine ⟨a, ?_, ?_⟩ · simpa [MapToEqualizer] using ha₁ · simpa [MapToEqualizer] using ha₂
15
3,269,017.372472
2
2
3
1,987
import Mathlib.Combinatorics.SimpleGraph.Connectivity import Mathlib.Combinatorics.SimpleGraph.Operations import Mathlib.Data.Finset.Pairwise #align_import combinatorics.simple_graph.clique from "leanprover-community/mathlib"@"3365b20c2ffa7c35e47e5209b89ba9abdddf3ffe" open Finset Fintype Function SimpleGraph.Walk namespace SimpleGraph variable {α β : Type*} (G H : SimpleGraph α) section Clique variable {s t : Set α} abbrev IsClique (s : Set α) : Prop := s.Pairwise G.Adj #align simple_graph.is_clique SimpleGraph.IsClique theorem isClique_iff : G.IsClique s ↔ s.Pairwise G.Adj := Iff.rfl #align simple_graph.is_clique_iff SimpleGraph.isClique_iff
Mathlib/Combinatorics/SimpleGraph/Clique.lean
55
66
theorem isClique_iff_induce_eq : G.IsClique s ↔ G.induce s = ⊤ := by
rw [isClique_iff] constructor · intro h ext ⟨v, hv⟩ ⟨w, hw⟩ simp only [comap_adj, Subtype.coe_mk, top_adj, Ne, Subtype.mk_eq_mk] exact ⟨Adj.ne, h hv hw⟩ · intro h v hv w hw hne have h2 : (G.induce s).Adj ⟨v, hv⟩ ⟨w, hw⟩ = _ := rfl conv_lhs at h2 => rw [h] simp only [top_adj, ne_eq, Subtype.mk.injEq, eq_iff_iff] at h2 exact h2.1 hne
11
59,874.141715
2
2
1
1,988
import Mathlib.CategoryTheory.Limits.Constructions.Pullbacks import Mathlib.CategoryTheory.Preadditive.Biproducts import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Kernels import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers import Mathlib.CategoryTheory.Abelian.NonPreadditive #align_import category_theory.abelian.basic from "leanprover-community/mathlib"@"a5ff45a1c92c278b03b52459a620cfd9c49ebc80" noncomputable section open CategoryTheory open CategoryTheory.Preadditive open CategoryTheory.Limits universe v u open CategoryTheory namespace CategoryTheory.Abelian variable {C : Type u} [Category.{v} C] [Preadditive C] variable [Limits.HasKernels C] [Limits.HasCokernels C] namespace OfCoimageImageComparisonIsIso @[simps] def imageMonoFactorisation {X Y : C} (f : X ⟶ Y) : MonoFactorisation f where I := Abelian.image f m := kernel.ι _ m_mono := inferInstance e := kernel.lift _ f (cokernel.condition _) fac := kernel.lift_ι _ _ _ #align category_theory.abelian.of_coimage_image_comparison_is_iso.image_mono_factorisation CategoryTheory.Abelian.OfCoimageImageComparisonIsIso.imageMonoFactorisation
Mathlib/CategoryTheory/Abelian/Basic.lean
147
152
theorem imageMonoFactorisation_e' {X Y : C} (f : X ⟶ Y) : (imageMonoFactorisation f).e = cokernel.π _ ≫ Abelian.coimageImageComparison f := by
dsimp ext simp only [Abelian.coimageImageComparison, imageMonoFactorisation_e, Category.assoc, cokernel.π_desc_assoc]
4
54.59815
2
2
1
1,989
import Mathlib.CategoryTheory.EffectiveEpi.Basic import Mathlib.CategoryTheory.Limits.Shapes.Pullbacks import Mathlib.Tactic.ApplyFun namespace CategoryTheory open Limits variable {C : Type*} [Category C] noncomputable def effectiveEpiStructIsColimitDescOfEffectiveEpiFamily {B : C} {α : Type*} (X : α → C) (c : Cofan X) (hc : IsColimit c) (π : (a : α) → (X a ⟶ B)) [EffectiveEpiFamily X π] : EffectiveEpiStruct (hc.desc (Cofan.mk B π)) where desc e h := EffectiveEpiFamily.desc X π (fun a ↦ c.ι.app ⟨a⟩ ≫ e) (fun a₁ a₂ g₁ g₂ hg ↦ by simp only [← Category.assoc] exact h (g₁ ≫ c.ι.app ⟨a₁⟩) (g₂ ≫ c.ι.app ⟨a₂⟩) (by simpa)) fac e h := hc.hom_ext (fun ⟨j⟩ ↦ (by simp)) uniq e _ m hm := EffectiveEpiFamily.uniq X π (fun a ↦ c.ι.app ⟨a⟩ ≫ e) (fun _ _ _ _ hg ↦ (by simp [← hm, reassoc_of% hg])) m (fun _ ↦ (by simp [← hm])) noncomputable def effectiveEpiStructDescOfEffectiveEpiFamily {B : C} {α : Type*} (X : α → C) (π : (a : α) → (X a ⟶ B)) [HasCoproduct X] [EffectiveEpiFamily X π] : EffectiveEpiStruct (Sigma.desc π) := by simpa [coproductIsCoproduct] using effectiveEpiStructIsColimitDescOfEffectiveEpiFamily X _ (coproductIsCoproduct _) π instance {B : C} {α : Type*} (X : α → C) (π : (a : α) → (X a ⟶ B)) [HasCoproduct X] [EffectiveEpiFamily X π] : EffectiveEpi (Sigma.desc π) := ⟨⟨effectiveEpiStructDescOfEffectiveEpiFamily X π⟩⟩ example {B : C} {α : Type*} (X : α → C) (π : (a : α) → (X a ⟶ B)) [EffectiveEpiFamily X π] [HasCoproduct X] : Epi (Sigma.desc π) := inferInstance
Mathlib/CategoryTheory/EffectiveEpi/Coproduct.lean
61
93
theorem effectiveEpiFamilyStructOfEffectiveEpiDesc_aux {B : C} {α : Type*} {X : α → C} {π : (a : α) → X a ⟶ B} [HasCoproduct X] [∀ {Z : C} (g : Z ⟶ ∐ X) (a : α), HasPullback g (Sigma.ι X a)] [∀ {Z : C} (g : Z ⟶ ∐ X), HasCoproduct fun a ↦ pullback g (Sigma.ι X a)] [∀ {Z : C} (g : Z ⟶ ∐ X), Epi (Sigma.desc fun a ↦ pullback.fst (f := g) (g := (Sigma.ι X a)))] {W : C} {e : (a : α) → X a ⟶ W} (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) {Z : C} {g₁ g₂ : Z ⟶ ∐ fun b ↦ X b} (hg : g₁ ≫ Sigma.desc π = g₂ ≫ Sigma.desc π) : g₁ ≫ Sigma.desc e = g₂ ≫ Sigma.desc e := by
apply_fun ((Sigma.desc fun a ↦ pullback.fst (f := g₁) (g := (Sigma.ι X a))) ≫ ·) using (fun a b ↦ (cancel_epi _).mp) ext a simp only [colimit.ι_desc_assoc, Discrete.functor_obj, Cofan.mk_pt, Cofan.mk_ι_app] rw [← Category.assoc, pullback.condition] simp only [Category.assoc, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app] apply_fun ((Sigma.desc fun a ↦ pullback.fst (f := pullback.fst ≫ g₂) (g := (Sigma.ι X a))) ≫ ·) using (fun a b ↦ (cancel_epi _).mp) ext b simp only [colimit.ι_desc_assoc, Discrete.functor_obj, Cofan.mk_pt, Cofan.mk_ι_app] simp only [← Category.assoc] rw [(Category.assoc _ _ g₂), pullback.condition] simp only [Category.assoc, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app] rw [← Category.assoc] apply h apply_fun (pullback.fst (f := g₁) (g := (Sigma.ι X a)) ≫ ·) at hg rw [← Category.assoc, pullback.condition] at hg simp only [Category.assoc, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app] at hg apply_fun ((Sigma.ι (fun a ↦ pullback _ _) b) ≫ (Sigma.desc fun a ↦ pullback.fst (f := pullback.fst ≫ g₂) (g := (Sigma.ι X a))) ≫ ·) at hg simp only [colimit.ι_desc_assoc, Discrete.functor_obj, Cofan.mk_pt, Cofan.mk_ι_app] at hg simp only [← Category.assoc] at hg rw [(Category.assoc _ _ g₂), pullback.condition] at hg simpa using hg
24
26,489,122,129.84347
2
2
1
1,990
import Mathlib.CategoryTheory.Sites.Coherent.Comparison import Mathlib.CategoryTheory.Sites.Coherent.ExtensiveSheaves import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPrecoherent import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPreregular import Mathlib.CategoryTheory.Sites.InducedTopology import Mathlib.CategoryTheory.Sites.Whiskering universe v₁ v₂ v₃ v₄ u₁ u₂ u₃ u₄ namespace CategoryTheory open Limits Functor regularTopology variable {C D : Type*} [Category C] [Category D] (F : C ⥤ D) namespace coherentTopology variable [F.PreservesFiniteEffectiveEpiFamilies] [F.ReflectsFiniteEffectiveEpiFamilies] [F.Full] [F.Faithful] [F.EffectivelyEnough] [Precoherent D] instance : F.IsCoverDense (coherentTopology _) := by refine F.isCoverDense_of_generate_singleton_functor_π_mem _ fun B ↦ ⟨_, F.effectiveEpiOver B, ?_⟩ apply Coverage.saturate.of refine ⟨Unit, inferInstance, fun _ => F.effectiveEpiOverObj B, fun _ => F.effectiveEpiOver B, ?_ , ?_⟩ · funext; ext -- Do we want `Presieve.ext`? refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩ rintro ⟨⟩ simp · rw [← effectiveEpi_iff_effectiveEpiFamily] infer_instance
Mathlib/CategoryTheory/Sites/Coherent/SheafComparison.lean
55
76
theorem exists_effectiveEpiFamily_iff_mem_induced (X : C) (S : Sieve X) : (∃ (α : Type) (_ : Finite α) (Y : α → C) (π : (a : α) → (Y a ⟶ X)), EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔ (S ∈ F.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩ · apply (mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr refine ⟨α, inferInstance, fun i => F.obj (Y i), fun i => F.map (π i), ⟨?_, fun a => Sieve.image_mem_functorPushforward F S (H₂ a)⟩⟩ exact F.map_finite_effectiveEpiFamily _ _ · obtain ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ := (mem_sieves_iff_hasEffectiveEpiFamily _).mp hS refine ⟨α, inferInstance, ?_⟩ let Z : α → C := fun a ↦ (Functor.EffectivelyEnough.presentation (F := F) (Y a)).some.p let g₀ : (a : α) → F.obj (Z a) ⟶ Y a := fun a ↦ F.effectiveEpiOver (Y a) have : EffectiveEpiFamily _ (fun a ↦ g₀ a ≫ π a) := inferInstance refine ⟨Z , fun a ↦ F.preimage (g₀ a ≫ π a), ?_, fun a ↦ (?_ : S.arrows (F.preimage _))⟩ · refine F.finite_effectiveEpiFamily_of_map _ _ ?_ simpa using this · obtain ⟨W, g₁, g₂, h₁, h₂⟩ := H₂ a rw [h₂] convert S.downward_closed h₁ (F.preimage (g₀ a ≫ g₂)) exact F.map_injective (by simp)
18
65,659,969.137331
2
2
2
1,991
import Mathlib.CategoryTheory.Sites.Coherent.Comparison import Mathlib.CategoryTheory.Sites.Coherent.ExtensiveSheaves import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPrecoherent import Mathlib.CategoryTheory.Sites.Coherent.ReflectsPreregular import Mathlib.CategoryTheory.Sites.InducedTopology import Mathlib.CategoryTheory.Sites.Whiskering universe v₁ v₂ v₃ v₄ u₁ u₂ u₃ u₄ namespace CategoryTheory open Limits Functor regularTopology variable {C D : Type*} [Category C] [Category D] (F : C ⥤ D) namespace coherentTopology variable [F.PreservesFiniteEffectiveEpiFamilies] [F.ReflectsFiniteEffectiveEpiFamilies] [F.Full] [F.Faithful] [F.EffectivelyEnough] [Precoherent D] instance : F.IsCoverDense (coherentTopology _) := by refine F.isCoverDense_of_generate_singleton_functor_π_mem _ fun B ↦ ⟨_, F.effectiveEpiOver B, ?_⟩ apply Coverage.saturate.of refine ⟨Unit, inferInstance, fun _ => F.effectiveEpiOverObj B, fun _ => F.effectiveEpiOver B, ?_ , ?_⟩ · funext; ext -- Do we want `Presieve.ext`? refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩ rintro ⟨⟩ simp · rw [← effectiveEpi_iff_effectiveEpiFamily] infer_instance theorem exists_effectiveEpiFamily_iff_mem_induced (X : C) (S : Sieve X) : (∃ (α : Type) (_ : Finite α) (Y : α → C) (π : (a : α) → (Y a ⟶ X)), EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔ (S ∈ F.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩ · apply (mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr refine ⟨α, inferInstance, fun i => F.obj (Y i), fun i => F.map (π i), ⟨?_, fun a => Sieve.image_mem_functorPushforward F S (H₂ a)⟩⟩ exact F.map_finite_effectiveEpiFamily _ _ · obtain ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ := (mem_sieves_iff_hasEffectiveEpiFamily _).mp hS refine ⟨α, inferInstance, ?_⟩ let Z : α → C := fun a ↦ (Functor.EffectivelyEnough.presentation (F := F) (Y a)).some.p let g₀ : (a : α) → F.obj (Z a) ⟶ Y a := fun a ↦ F.effectiveEpiOver (Y a) have : EffectiveEpiFamily _ (fun a ↦ g₀ a ≫ π a) := inferInstance refine ⟨Z , fun a ↦ F.preimage (g₀ a ≫ π a), ?_, fun a ↦ (?_ : S.arrows (F.preimage _))⟩ · refine F.finite_effectiveEpiFamily_of_map _ _ ?_ simpa using this · obtain ⟨W, g₁, g₂, h₁, h₂⟩ := H₂ a rw [h₂] convert S.downward_closed h₁ (F.preimage (g₀ a ≫ g₂)) exact F.map_injective (by simp) lemma eq_induced : haveI := F.reflects_precoherent coherentTopology C = F.inducedTopologyOfIsCoverDense (coherentTopology _) := by ext X S have := F.reflects_precoherent rw [← exists_effectiveEpiFamily_iff_mem_induced F X] rw [← coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily S] lemma coverPreserving : haveI := F.reflects_precoherent CoverPreserving (coherentTopology _) (coherentTopology _) F := by rw [eq_induced F] apply LocallyCoverDense.inducedTopology_coverPreserving instance coverLifting : haveI := F.reflects_precoherent F.IsCocontinuous (coherentTopology _) (coherentTopology _) := by rw [eq_induced F] apply LocallyCoverDense.inducedTopology_isCocontinuous instance isContinuous : haveI := F.reflects_precoherent F.IsContinuous (coherentTopology _) (coherentTopology _) := Functor.IsCoverDense.isContinuous _ _ _ (coverPreserving F) namespace regularTopology variable [F.PreservesEffectiveEpis] [F.ReflectsEffectiveEpis] [F.Full] [F.Faithful] [F.EffectivelyEnough] [Preregular D] instance : F.IsCoverDense (regularTopology _) := by refine F.isCoverDense_of_generate_singleton_functor_π_mem _ fun B ↦ ⟨_, F.effectiveEpiOver B, ?_⟩ apply Coverage.saturate.of refine ⟨F.effectiveEpiOverObj B, F.effectiveEpiOver B, ?_, inferInstance⟩ funext; ext -- Do we want `Presieve.ext`? refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩ rintro ⟨⟩ simp
Mathlib/CategoryTheory/Sites/Coherent/SheafComparison.lean
161
178
theorem exists_effectiveEpi_iff_mem_induced (X : C) (S : Sieve X) : (∃ (Y : C) (π : Y ⟶ X), EffectiveEpi π ∧ S.arrows π) ↔ (S ∈ F.inducedTopologyOfIsCoverDense (regularTopology _) X) := by
refine ⟨fun ⟨Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩ · apply (mem_sieves_iff_hasEffectiveEpi (Sieve.functorPushforward _ S)).mpr refine ⟨F.obj Y, F.map π, ⟨?_, Sieve.image_mem_functorPushforward F S H₂⟩⟩ exact F.map_effectiveEpi _ · obtain ⟨Y, π, ⟨H₁, H₂⟩⟩ := (mem_sieves_iff_hasEffectiveEpi _).mp hS let g₀ := F.effectiveEpiOver Y refine ⟨_, F.preimage (g₀ ≫ π), ?_, (?_ : S.arrows (F.preimage _))⟩ · refine F.effectiveEpi_of_map _ ?_ simp only [map_preimage] infer_instance · obtain ⟨W, g₁, g₂, h₁, h₂⟩ := H₂ rw [h₂] convert S.downward_closed h₁ (F.preimage (g₀ ≫ g₂)) exact F.map_injective (by simp)
14
1,202,604.284165
2
2
2
1,991
import Mathlib.Topology.Sheaves.Forget import Mathlib.Topology.Sheaves.SheafCondition.PairwiseIntersections import Mathlib.CategoryTheory.Limits.Shapes.Types #align_import topology.sheaves.sheaf_condition.unique_gluing from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8" noncomputable section open TopCat TopCat.Presheaf CategoryTheory CategoryTheory.Limits TopologicalSpace TopologicalSpace.Opens Opposite universe v u x variable {C : Type u} [Category.{v} C] [ConcreteCategory.{v} C] namespace TopCat namespace Presheaf section attribute [local instance] ConcreteCategory.hasCoeToSort ConcreteCategory.instFunLike variable {X : TopCat.{x}} (F : Presheaf C X) {ι : Type x} (U : ι → Opens X) def IsCompatible (sf : ∀ i : ι, F.obj (op (U i))) : Prop := ∀ i j : ι, F.map (infLELeft (U i) (U j)).op (sf i) = F.map (infLERight (U i) (U j)).op (sf j) set_option linter.uppercaseLean3 false in #align Top.presheaf.is_compatible TopCat.Presheaf.IsCompatible def IsGluing (sf : ∀ i : ι, F.obj (op (U i))) (s : F.obj (op (iSup U))) : Prop := ∀ i : ι, F.map (Opens.leSupr U i).op s = sf i set_option linter.uppercaseLean3 false in #align Top.presheaf.is_gluing TopCat.Presheaf.IsGluing def IsSheafUniqueGluing : Prop := ∀ ⦃ι : Type x⦄ (U : ι → Opens X) (sf : ∀ i : ι, F.obj (op (U i))), IsCompatible F U sf → ∃! s : F.obj (op (iSup U)), IsGluing F U sf s set_option linter.uppercaseLean3 false in #align Top.presheaf.is_sheaf_unique_gluing TopCat.Presheaf.IsSheafUniqueGluing end section TypeValued variable {X : TopCat.{x}} {F : Presheaf (Type u) X} {ι : Type x} {U : ι → Opens X} def objPairwiseOfFamily (sf : ∀ i, F.obj (op (U i))) : ∀ i, ((Pairwise.diagram U).op ⋙ F).obj i | ⟨Pairwise.single i⟩ => sf i | ⟨Pairwise.pair i j⟩ => F.map (infLELeft (U i) (U j)).op (sf i) def IsCompatible.sectionPairwise {sf} (h : IsCompatible F U sf) : ((Pairwise.diagram U).op ⋙ F).sections := by refine ⟨objPairwiseOfFamily sf, ?_⟩ let G := (Pairwise.diagram U).op ⋙ F rintro (i|⟨i,j⟩) (i'|⟨i',j'⟩) (_|_|_|_) · exact congr_fun (G.map_id <| op <| Pairwise.single i) _ · rfl · exact (h i' i).symm · exact congr_fun (G.map_id <| op <| Pairwise.pair i j) _
Mathlib/Topology/Sheaves/SheafCondition/UniqueGluing.lean
112
118
theorem isGluing_iff_pairwise {sf s} : IsGluing F U sf s ↔ ∀ i, (F.mapCone (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i := by
refine ⟨fun h ↦ ?_, fun h i ↦ h (op <| Pairwise.single i)⟩ rintro (i|⟨i,j⟩) · exact h i · rw [← (F.mapCone (Pairwise.cocone U).op).w (op <| Pairwise.Hom.left i j)] exact congr_arg _ (h i)
5
148.413159
2
2
2
1,992
import Mathlib.Topology.Sheaves.Forget import Mathlib.Topology.Sheaves.SheafCondition.PairwiseIntersections import Mathlib.CategoryTheory.Limits.Shapes.Types #align_import topology.sheaves.sheaf_condition.unique_gluing from "leanprover-community/mathlib"@"5dc6092d09e5e489106865241986f7f2ad28d4c8" noncomputable section open TopCat TopCat.Presheaf CategoryTheory CategoryTheory.Limits TopologicalSpace TopologicalSpace.Opens Opposite universe v u x variable {C : Type u} [Category.{v} C] [ConcreteCategory.{v} C] namespace TopCat namespace Presheaf section attribute [local instance] ConcreteCategory.hasCoeToSort ConcreteCategory.instFunLike variable {X : TopCat.{x}} (F : Presheaf C X) {ι : Type x} (U : ι → Opens X) def IsCompatible (sf : ∀ i : ι, F.obj (op (U i))) : Prop := ∀ i j : ι, F.map (infLELeft (U i) (U j)).op (sf i) = F.map (infLERight (U i) (U j)).op (sf j) set_option linter.uppercaseLean3 false in #align Top.presheaf.is_compatible TopCat.Presheaf.IsCompatible def IsGluing (sf : ∀ i : ι, F.obj (op (U i))) (s : F.obj (op (iSup U))) : Prop := ∀ i : ι, F.map (Opens.leSupr U i).op s = sf i set_option linter.uppercaseLean3 false in #align Top.presheaf.is_gluing TopCat.Presheaf.IsGluing def IsSheafUniqueGluing : Prop := ∀ ⦃ι : Type x⦄ (U : ι → Opens X) (sf : ∀ i : ι, F.obj (op (U i))), IsCompatible F U sf → ∃! s : F.obj (op (iSup U)), IsGluing F U sf s set_option linter.uppercaseLean3 false in #align Top.presheaf.is_sheaf_unique_gluing TopCat.Presheaf.IsSheafUniqueGluing end section TypeValued variable {X : TopCat.{x}} {F : Presheaf (Type u) X} {ι : Type x} {U : ι → Opens X} def objPairwiseOfFamily (sf : ∀ i, F.obj (op (U i))) : ∀ i, ((Pairwise.diagram U).op ⋙ F).obj i | ⟨Pairwise.single i⟩ => sf i | ⟨Pairwise.pair i j⟩ => F.map (infLELeft (U i) (U j)).op (sf i) def IsCompatible.sectionPairwise {sf} (h : IsCompatible F U sf) : ((Pairwise.diagram U).op ⋙ F).sections := by refine ⟨objPairwiseOfFamily sf, ?_⟩ let G := (Pairwise.diagram U).op ⋙ F rintro (i|⟨i,j⟩) (i'|⟨i',j'⟩) (_|_|_|_) · exact congr_fun (G.map_id <| op <| Pairwise.single i) _ · rfl · exact (h i' i).symm · exact congr_fun (G.map_id <| op <| Pairwise.pair i j) _ theorem isGluing_iff_pairwise {sf s} : IsGluing F U sf s ↔ ∀ i, (F.mapCone (Pairwise.cocone U).op).π.app i s = objPairwiseOfFamily sf i := by refine ⟨fun h ↦ ?_, fun h i ↦ h (op <| Pairwise.single i)⟩ rintro (i|⟨i,j⟩) · exact h i · rw [← (F.mapCone (Pairwise.cocone U).op).w (op <| Pairwise.Hom.left i j)] exact congr_arg _ (h i) variable (F)
Mathlib/Topology/Sheaves/SheafCondition/UniqueGluing.lean
125
134
theorem isSheaf_iff_isSheafUniqueGluing_types : F.IsSheaf ↔ F.IsSheafUniqueGluing := by
simp_rw [isSheaf_iff_isSheafPairwiseIntersections, IsSheafPairwiseIntersections, Types.isLimit_iff, IsSheafUniqueGluing, isGluing_iff_pairwise] refine forall₂_congr fun ι U ↦ ⟨fun h sf cpt ↦ ?_, fun h s hs ↦ ?_⟩ · exact h _ cpt.sectionPairwise.prop · specialize h (fun i ↦ s <| op <| Pairwise.single i) fun i j ↦ (hs <| op <| Pairwise.Hom.left i j).trans (hs <| op <| Pairwise.Hom.right i j).symm convert h; ext (i|⟨i,j⟩) · rfl · exact (hs <| op <| Pairwise.Hom.left i j).symm
9
8,103.083928
2
2
2
1,992
import Mathlib.Data.Finset.Lattice import Mathlib.Order.Hom.Basic import Mathlib.Data.Set.Finite import Mathlib.Order.ConditionallyCompleteLattice.Basic #align_import order.partial_sups from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce" variable {α : Type*} section SemilatticeSup variable [SemilatticeSup α] def partialSups (f : ℕ → α) : ℕ →o α := ⟨@Nat.rec (fun _ => α) (f 0) fun (n : ℕ) (a : α) => a ⊔ f (n + 1), monotone_nat_of_le_succ fun _ => le_sup_left⟩ #align partial_sups partialSups @[simp] theorem partialSups_zero (f : ℕ → α) : partialSups f 0 = f 0 := rfl #align partial_sups_zero partialSups_zero @[simp] theorem partialSups_succ (f : ℕ → α) (n : ℕ) : partialSups f (n + 1) = partialSups f n ⊔ f (n + 1) := rfl #align partial_sups_succ partialSups_succ lemma partialSups_iff_forall {f : ℕ → α} (p : α → Prop) (hp : ∀ {a b}, p (a ⊔ b) ↔ p a ∧ p b) : ∀ {n : ℕ}, p (partialSups f n) ↔ ∀ k ≤ n, p (f k) | 0 => by simp | (n + 1) => by simp [hp, partialSups_iff_forall, ← Nat.lt_succ_iff, ← Nat.forall_lt_succ] @[simp] lemma partialSups_le_iff {f : ℕ → α} {n : ℕ} {a : α} : partialSups f n ≤ a ↔ ∀ k ≤ n, f k ≤ a := partialSups_iff_forall (· ≤ a) sup_le_iff theorem le_partialSups_of_le (f : ℕ → α) {m n : ℕ} (h : m ≤ n) : f m ≤ partialSups f n := partialSups_le_iff.1 le_rfl m h #align le_partial_sups_of_le le_partialSups_of_le theorem le_partialSups (f : ℕ → α) : f ≤ partialSups f := fun _n => le_partialSups_of_le f le_rfl #align le_partial_sups le_partialSups theorem partialSups_le (f : ℕ → α) (n : ℕ) (a : α) (w : ∀ m, m ≤ n → f m ≤ a) : partialSups f n ≤ a := partialSups_le_iff.2 w #align partial_sups_le partialSups_le @[simp] lemma upperBounds_range_partialSups (f : ℕ → α) : upperBounds (Set.range (partialSups f)) = upperBounds (Set.range f) := by ext a simp only [mem_upperBounds, Set.forall_mem_range, partialSups_le_iff] exact ⟨fun h _ ↦ h _ _ le_rfl, fun h _ _ _ ↦ h _⟩ @[simp] theorem bddAbove_range_partialSups {f : ℕ → α} : BddAbove (Set.range (partialSups f)) ↔ BddAbove (Set.range f) := .of_eq <| congr_arg Set.Nonempty <| upperBounds_range_partialSups f #align bdd_above_range_partial_sups bddAbove_range_partialSups
Mathlib/Order/PartialSups.lean
97
101
theorem Monotone.partialSups_eq {f : ℕ → α} (hf : Monotone f) : (partialSups f : ℕ → α) = f := by
ext n induction' n with n ih · rfl · rw [partialSups_succ, ih, sup_eq_right.2 (hf (Nat.le_succ _))]
4
54.59815
2
2
1
1,993
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull import Mathlib.Analysis.LocallyConvex.WithSeminorms import Mathlib.Analysis.Convex.Gauge #align_import analysis.locally_convex.abs_convex from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open NormedField Set open NNReal Pointwise Topology variable {𝕜 E F G ι : Type*} section NontriviallyNormedField variable (𝕜 E) {s : Set E} variable [NontriviallyNormedField 𝕜] [AddCommGroup E] [Module 𝕜 E] variable [Module ℝ E] [SMulCommClass ℝ 𝕜 E] variable [TopologicalSpace E] [LocallyConvexSpace ℝ E] [ContinuousSMul 𝕜 E]
Mathlib/Analysis/LocallyConvex/AbsConvex.lean
52
60
theorem nhds_basis_abs_convex : (𝓝 (0 : E)).HasBasis (fun s : Set E => s ∈ 𝓝 (0 : E) ∧ Balanced 𝕜 s ∧ Convex ℝ s) id := by
refine (LocallyConvexSpace.convex_basis_zero ℝ E).to_hasBasis (fun s hs => ?_) fun s hs => ⟨s, ⟨hs.1, hs.2.2⟩, rfl.subset⟩ refine ⟨convexHull ℝ (balancedCore 𝕜 s), ?_, convexHull_min (balancedCore_subset s) hs.2⟩ refine ⟨Filter.mem_of_superset (balancedCore_mem_nhds_zero hs.1) (subset_convexHull ℝ _), ?_⟩ refine ⟨(balancedCore_balanced s).convexHull, ?_⟩ exact convex_convexHull ℝ (balancedCore 𝕜 s)
7
1,096.633158
2
2
2
1,994
import Mathlib.Analysis.LocallyConvex.BalancedCoreHull import Mathlib.Analysis.LocallyConvex.WithSeminorms import Mathlib.Analysis.Convex.Gauge #align_import analysis.locally_convex.abs_convex from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open NormedField Set open NNReal Pointwise Topology variable {𝕜 E F G ι : Type*} section NontriviallyNormedField variable (𝕜 E) {s : Set E} variable [NontriviallyNormedField 𝕜] [AddCommGroup E] [Module 𝕜 E] variable [Module ℝ E] [SMulCommClass ℝ 𝕜 E] variable [TopologicalSpace E] [LocallyConvexSpace ℝ E] [ContinuousSMul 𝕜 E] theorem nhds_basis_abs_convex : (𝓝 (0 : E)).HasBasis (fun s : Set E => s ∈ 𝓝 (0 : E) ∧ Balanced 𝕜 s ∧ Convex ℝ s) id := by refine (LocallyConvexSpace.convex_basis_zero ℝ E).to_hasBasis (fun s hs => ?_) fun s hs => ⟨s, ⟨hs.1, hs.2.2⟩, rfl.subset⟩ refine ⟨convexHull ℝ (balancedCore 𝕜 s), ?_, convexHull_min (balancedCore_subset s) hs.2⟩ refine ⟨Filter.mem_of_superset (balancedCore_mem_nhds_zero hs.1) (subset_convexHull ℝ _), ?_⟩ refine ⟨(balancedCore_balanced s).convexHull, ?_⟩ exact convex_convexHull ℝ (balancedCore 𝕜 s) #align nhds_basis_abs_convex nhds_basis_abs_convex variable [ContinuousSMul ℝ E] [TopologicalAddGroup E]
Mathlib/Analysis/LocallyConvex/AbsConvex.lean
65
74
theorem nhds_basis_abs_convex_open : (𝓝 (0 : E)).HasBasis (fun s => (0 : E) ∈ s ∧ IsOpen s ∧ Balanced 𝕜 s ∧ Convex ℝ s) id := by
refine (nhds_basis_abs_convex 𝕜 E).to_hasBasis ?_ ?_ · rintro s ⟨hs_nhds, hs_balanced, hs_convex⟩ refine ⟨interior s, ?_, interior_subset⟩ exact ⟨mem_interior_iff_mem_nhds.mpr hs_nhds, isOpen_interior, hs_balanced.interior (mem_interior_iff_mem_nhds.mpr hs_nhds), hs_convex.interior⟩ rintro s ⟨hs_zero, hs_open, hs_balanced, hs_convex⟩ exact ⟨s, ⟨hs_open.mem_nhds hs_zero, hs_balanced, hs_convex⟩, rfl.subset⟩
8
2,980.957987
2
2
2
1,994
import Mathlib.Topology.Semicontinuous import Mathlib.MeasureTheory.Function.AEMeasurableSequence import Mathlib.MeasureTheory.Order.Lattice import Mathlib.Topology.Order.Lattice import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic #align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce" open Set Filter MeasureTheory MeasurableSpace TopologicalSpace open scoped Classical Topology NNReal ENNReal MeasureTheory universe u v w x y variable {α β γ δ : Type*} {ι : Sort y} {s t u : Set α} section OrderTopology variable (α) variable [TopologicalSpace α] [SecondCountableTopology α] [LinearOrder α] [OrderTopology α]
Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
54
74
theorem borel_eq_generateFrom_Iio : borel α = .generateFrom (range Iio) := by
refine le_antisymm ?_ (generateFrom_le ?_) · rw [borel_eq_generateFrom_of_subbasis (@OrderTopology.topology_eq_generate_intervals α _ _ _)] letI : MeasurableSpace α := MeasurableSpace.generateFrom (range Iio) have H : ∀ a : α, MeasurableSet (Iio a) := fun a => GenerateMeasurable.basic _ ⟨_, rfl⟩ refine generateFrom_le ?_ rintro _ ⟨a, rfl | rfl⟩ · rcases em (∃ b, a ⋖ b) with ⟨b, hb⟩ | hcovBy · rw [hb.Ioi_eq, ← compl_Iio] exact (H _).compl · rcases isOpen_biUnion_countable (Ioi a) Ioi fun _ _ ↦ isOpen_Ioi with ⟨t, hat, htc, htU⟩ have : Ioi a = ⋃ b ∈ t, Ici b := by refine Subset.antisymm ?_ <| iUnion₂_subset fun b hb ↦ Ici_subset_Ioi.2 (hat hb) refine Subset.trans ?_ <| iUnion₂_mono fun _ _ ↦ Ioi_subset_Ici_self simpa [CovBy, htU, subset_def] using hcovBy simp only [this, ← compl_Iio] exact .biUnion htc <| fun _ _ ↦ (H _).compl · apply H · rw [forall_mem_range] intro a exact GenerateMeasurable.basic _ isOpen_Iio
20
485,165,195.40979
2
2
2
1,995
import Mathlib.Topology.Semicontinuous import Mathlib.MeasureTheory.Function.AEMeasurableSequence import Mathlib.MeasureTheory.Order.Lattice import Mathlib.Topology.Order.Lattice import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic #align_import measure_theory.constructions.borel_space.basic from "leanprover-community/mathlib"@"9f55d0d4363ae59948c33864cbc52e0b12e0e8ce" open Set Filter MeasureTheory MeasurableSpace TopologicalSpace open scoped Classical Topology NNReal ENNReal MeasureTheory universe u v w x y variable {α β γ δ : Type*} {ι : Sort y} {s t u : Set α} section OrderTopology variable (α) variable [TopologicalSpace α] [SecondCountableTopology α] [LinearOrder α] [OrderTopology α] theorem borel_eq_generateFrom_Iio : borel α = .generateFrom (range Iio) := by refine le_antisymm ?_ (generateFrom_le ?_) · rw [borel_eq_generateFrom_of_subbasis (@OrderTopology.topology_eq_generate_intervals α _ _ _)] letI : MeasurableSpace α := MeasurableSpace.generateFrom (range Iio) have H : ∀ a : α, MeasurableSet (Iio a) := fun a => GenerateMeasurable.basic _ ⟨_, rfl⟩ refine generateFrom_le ?_ rintro _ ⟨a, rfl | rfl⟩ · rcases em (∃ b, a ⋖ b) with ⟨b, hb⟩ | hcovBy · rw [hb.Ioi_eq, ← compl_Iio] exact (H _).compl · rcases isOpen_biUnion_countable (Ioi a) Ioi fun _ _ ↦ isOpen_Ioi with ⟨t, hat, htc, htU⟩ have : Ioi a = ⋃ b ∈ t, Ici b := by refine Subset.antisymm ?_ <| iUnion₂_subset fun b hb ↦ Ici_subset_Ioi.2 (hat hb) refine Subset.trans ?_ <| iUnion₂_mono fun _ _ ↦ Ioi_subset_Ici_self simpa [CovBy, htU, subset_def] using hcovBy simp only [this, ← compl_Iio] exact .biUnion htc <| fun _ _ ↦ (H _).compl · apply H · rw [forall_mem_range] intro a exact GenerateMeasurable.basic _ isOpen_Iio #align borel_eq_generate_from_Iio borel_eq_generateFrom_Iio theorem borel_eq_generateFrom_Ioi : borel α = .generateFrom (range Ioi) := @borel_eq_generateFrom_Iio αᵒᵈ _ (by infer_instance : SecondCountableTopology α) _ _ #align borel_eq_generate_from_Ioi borel_eq_generateFrom_Ioi
Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
81
92
theorem borel_eq_generateFrom_Iic : borel α = MeasurableSpace.generateFrom (range Iic) := by
rw [borel_eq_generateFrom_Ioi] refine le_antisymm ?_ ?_ · refine MeasurableSpace.generateFrom_le fun t ht => ?_ obtain ⟨u, rfl⟩ := ht rw [← compl_Iic] exact (MeasurableSpace.measurableSet_generateFrom (mem_range.mpr ⟨u, rfl⟩)).compl · refine MeasurableSpace.generateFrom_le fun t ht => ?_ obtain ⟨u, rfl⟩ := ht rw [← compl_Ioi] exact (MeasurableSpace.measurableSet_generateFrom (mem_range.mpr ⟨u, rfl⟩)).compl
10
22,026.465795
2
2
2
1,995
import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Ring.Pi import Mathlib.Data.Finsupp.Defs #align_import data.finsupp.pointwise from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c" noncomputable section open Finset universe u₁ u₂ u₃ u₄ u₅ variable {α : Type u₁} {β : Type u₂} {γ : Type u₃} {δ : Type u₄} {ι : Type u₅} namespace Finsupp section variable [MulZeroClass β] instance : Mul (α →₀ β) := ⟨zipWith (· * ·) (mul_zero 0)⟩ theorem coe_mul (g₁ g₂ : α →₀ β) : ⇑(g₁ * g₂) = g₁ * g₂ := rfl #align finsupp.coe_mul Finsupp.coe_mul @[simp] theorem mul_apply {g₁ g₂ : α →₀ β} {a : α} : (g₁ * g₂) a = g₁ a * g₂ a := rfl #align finsupp.mul_apply Finsupp.mul_apply @[simp] theorem single_mul (a : α) (b₁ b₂ : β) : single a (b₁ * b₂) = single a b₁ * single a b₂ := (zipWith_single_single _ _ _ _ _).symm
Mathlib/Data/Finsupp/Pointwise.lean
57
65
theorem support_mul [DecidableEq α] {g₁ g₂ : α →₀ β} : (g₁ * g₂).support ⊆ g₁.support ∩ g₂.support := by
intro a h simp only [mul_apply, mem_support_iff] at h simp only [mem_support_iff, mem_inter, Ne] rw [← not_or] intro w apply h cases' w with w w <;> (rw [w]; simp)
7
1,096.633158
2
2
1
1,996
import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential import Mathlib.Geometry.Manifold.ContMDiffMap #align_import geometry.manifold.cont_mdiff_mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" open Set Function Filter ChartedSpace SmoothManifoldWithCorners Bundle open scoped Topology Manifold Bundle variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] -- declare a smooth manifold `M` over the pair `(E, H)`. {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [Is : SmoothManifoldWithCorners I M] -- declare a smooth manifold `M'` over the pair `(E', H')`. {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H'] {I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M'] [I's : SmoothManifoldWithCorners I' M'] -- declare a smooth manifold `N` over the pair `(F, G)`. {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G] {J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N] [Js : SmoothManifoldWithCorners J N] -- declare a smooth manifold `N'` over the pair `(F', G')`. {F' : Type*} [NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G'] {J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N'] [J's : SmoothManifoldWithCorners J' N'] -- declare some additional normed spaces, used for fibers of vector bundles {F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂] [NormedSpace 𝕜 F₂] -- declare functions, sets, points and smoothness indices {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞} -- Porting note: section about deducing differentiability from smoothness moved to -- `Geometry.Manifold.MFDeriv.Basic` section tangentMap
Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean
227
280
theorem ContMDiffOn.continuousOn_tangentMapWithin_aux {f : H → H'} {s : Set H} (hf : ContMDiffOn I I' n f s) (hn : 1 ≤ n) (hs : UniqueMDiffOn I s) : ContinuousOn (tangentMapWithin I I' f s) (π E (TangentSpace I) ⁻¹' s) := by
suffices h : ContinuousOn (fun p : H × E => (f p.fst, (fderivWithin 𝕜 (writtenInExtChartAt I I' p.fst f) (I.symm ⁻¹' s ∩ range I) ((extChartAt I p.fst) p.fst) : E →L[𝕜] E') p.snd)) (Prod.fst ⁻¹' s) by have A := (tangentBundleModelSpaceHomeomorph H I).continuous rw [continuous_iff_continuousOn_univ] at A have B := ((tangentBundleModelSpaceHomeomorph H' I').symm.continuous.comp_continuousOn h).comp' A have : univ ∩ tangentBundleModelSpaceHomeomorph H I ⁻¹' (Prod.fst ⁻¹' s) = π E (TangentSpace I) ⁻¹' s := by ext ⟨x, v⟩; simp only [mfld_simps] rw [this] at B apply B.congr rintro ⟨x, v⟩ hx dsimp [tangentMapWithin] ext; · rfl simp only [mfld_simps] apply congr_fun apply congr_arg rw [MDifferentiableWithinAt.mfderivWithin (hf.mdifferentiableOn hn x hx)] rfl suffices h : ContinuousOn (fun p : H × E => (fderivWithin 𝕜 (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) (I p.fst) : E →L[𝕜] E') p.snd) (Prod.fst ⁻¹' s) by dsimp [writtenInExtChartAt, extChartAt] exact (ContinuousOn.comp hf.continuousOn continuous_fst.continuousOn Subset.rfl).prod h suffices h : ContinuousOn (fderivWithin 𝕜 (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I)) (I '' s) by have C := ContinuousOn.comp h I.continuous_toFun.continuousOn Subset.rfl have A : Continuous fun q : (E →L[𝕜] E') × E => q.1 q.2 := isBoundedBilinearMap_apply.continuous have B : ContinuousOn (fun p : H × E => (fderivWithin 𝕜 (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) (I p.1), p.2)) (Prod.fst ⁻¹' s) := by apply ContinuousOn.prod _ continuous_snd.continuousOn refine C.comp continuousOn_fst ?_ exact preimage_mono (subset_preimage_image _ _) exact A.comp_continuousOn B rw [contMDiffOn_iff] at hf let x : H := I.symm (0 : E) let y : H' := I'.symm (0 : E') have A := hf.2 x y simp only [I.image_eq, inter_comm, mfld_simps] at A ⊢ apply A.continuousOn_fderivWithin _ hn convert hs.uniqueDiffOn_target_inter x using 1 simp only [inter_comm, mfld_simps]
51
14,093,490,824,269,389,000,000
2
2
3
1,997
import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential import Mathlib.Geometry.Manifold.ContMDiffMap #align_import geometry.manifold.cont_mdiff_mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" open Set Function Filter ChartedSpace SmoothManifoldWithCorners Bundle open scoped Topology Manifold Bundle variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] -- declare a smooth manifold `M` over the pair `(E, H)`. {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [Is : SmoothManifoldWithCorners I M] -- declare a smooth manifold `M'` over the pair `(E', H')`. {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H'] {I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M'] [I's : SmoothManifoldWithCorners I' M'] -- declare a smooth manifold `N` over the pair `(F, G)`. {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G] {J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N] [Js : SmoothManifoldWithCorners J N] -- declare a smooth manifold `N'` over the pair `(F', G')`. {F' : Type*} [NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G'] {J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N'] [J's : SmoothManifoldWithCorners J' N'] -- declare some additional normed spaces, used for fibers of vector bundles {F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂] [NormedSpace 𝕜 F₂] -- declare functions, sets, points and smoothness indices {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞} -- Porting note: section about deducing differentiability from smoothness moved to -- `Geometry.Manifold.MFDeriv.Basic` section tangentMap theorem ContMDiffOn.continuousOn_tangentMapWithin_aux {f : H → H'} {s : Set H} (hf : ContMDiffOn I I' n f s) (hn : 1 ≤ n) (hs : UniqueMDiffOn I s) : ContinuousOn (tangentMapWithin I I' f s) (π E (TangentSpace I) ⁻¹' s) := by suffices h : ContinuousOn (fun p : H × E => (f p.fst, (fderivWithin 𝕜 (writtenInExtChartAt I I' p.fst f) (I.symm ⁻¹' s ∩ range I) ((extChartAt I p.fst) p.fst) : E →L[𝕜] E') p.snd)) (Prod.fst ⁻¹' s) by have A := (tangentBundleModelSpaceHomeomorph H I).continuous rw [continuous_iff_continuousOn_univ] at A have B := ((tangentBundleModelSpaceHomeomorph H' I').symm.continuous.comp_continuousOn h).comp' A have : univ ∩ tangentBundleModelSpaceHomeomorph H I ⁻¹' (Prod.fst ⁻¹' s) = π E (TangentSpace I) ⁻¹' s := by ext ⟨x, v⟩; simp only [mfld_simps] rw [this] at B apply B.congr rintro ⟨x, v⟩ hx dsimp [tangentMapWithin] ext; · rfl simp only [mfld_simps] apply congr_fun apply congr_arg rw [MDifferentiableWithinAt.mfderivWithin (hf.mdifferentiableOn hn x hx)] rfl suffices h : ContinuousOn (fun p : H × E => (fderivWithin 𝕜 (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) (I p.fst) : E →L[𝕜] E') p.snd) (Prod.fst ⁻¹' s) by dsimp [writtenInExtChartAt, extChartAt] exact (ContinuousOn.comp hf.continuousOn continuous_fst.continuousOn Subset.rfl).prod h suffices h : ContinuousOn (fderivWithin 𝕜 (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I)) (I '' s) by have C := ContinuousOn.comp h I.continuous_toFun.continuousOn Subset.rfl have A : Continuous fun q : (E →L[𝕜] E') × E => q.1 q.2 := isBoundedBilinearMap_apply.continuous have B : ContinuousOn (fun p : H × E => (fderivWithin 𝕜 (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) (I p.1), p.2)) (Prod.fst ⁻¹' s) := by apply ContinuousOn.prod _ continuous_snd.continuousOn refine C.comp continuousOn_fst ?_ exact preimage_mono (subset_preimage_image _ _) exact A.comp_continuousOn B rw [contMDiffOn_iff] at hf let x : H := I.symm (0 : E) let y : H' := I'.symm (0 : E') have A := hf.2 x y simp only [I.image_eq, inter_comm, mfld_simps] at A ⊢ apply A.continuousOn_fderivWithin _ hn convert hs.uniqueDiffOn_target_inter x using 1 simp only [inter_comm, mfld_simps] #align cont_mdiff_on.continuous_on_tangent_map_within_aux ContMDiffOn.continuousOn_tangentMapWithin_aux
Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean
287
339
theorem ContMDiffOn.contMDiffOn_tangentMapWithin_aux {f : H → H'} {s : Set H} (hf : ContMDiffOn I I' n f s) (hmn : m + 1 ≤ n) (hs : UniqueMDiffOn I s) : ContMDiffOn I.tangent I'.tangent m (tangentMapWithin I I' f s) (π E (TangentSpace I) ⁻¹' s) := by
have m_le_n : m ≤ n := (le_add_right le_rfl).trans hmn have one_le_n : 1 ≤ n := (le_add_left le_rfl).trans hmn have U' : UniqueDiffOn 𝕜 (range I ∩ I.symm ⁻¹' s) := fun y hy ↦ by simpa only [UniqueMDiffOn, UniqueMDiffWithinAt, hy.1, inter_comm, mfld_simps] using hs (I.symm y) hy.2 rw [contMDiffOn_iff] refine ⟨hf.continuousOn_tangentMapWithin_aux one_le_n hs, fun p q => ?_⟩ suffices h : ContDiffOn 𝕜 m (((fun p : H' × E' => (I' p.fst, p.snd)) ∘ TotalSpace.toProd H' E') ∘ tangentMapWithin I I' f s ∘ (TotalSpace.toProd H E).symm ∘ fun p : E × E => (I.symm p.fst, p.snd)) ((range I ∩ I.symm ⁻¹' s) ×ˢ univ) by -- Porting note: was `simpa [(· ∘ ·)] using h` convert h using 1 · ext1 ⟨x, y⟩ simp only [mfld_simps]; rfl · simp only [mfld_simps] rw [inter_prod, prod_univ, prod_univ] rfl change ContDiffOn 𝕜 m (fun p : E × E => ((I' (f (I.symm p.fst)), (mfderivWithin I I' f s (I.symm p.fst) : E → E') p.snd) : E' × E')) ((range I ∩ I.symm ⁻¹' s) ×ˢ univ) -- check that all bits in this formula are `C^n` have hf' := contMDiffOn_iff.1 hf have A : ContDiffOn 𝕜 m (I' ∘ f ∘ I.symm) (range I ∩ I.symm ⁻¹' s) := by simpa only [mfld_simps] using (hf'.2 (I.symm 0) (I'.symm 0)).of_le m_le_n have B : ContDiffOn 𝕜 m ((I' ∘ f ∘ I.symm) ∘ Prod.fst) ((range I ∩ I.symm ⁻¹' s) ×ˢ (univ : Set E)) := A.comp contDiff_fst.contDiffOn (prod_subset_preimage_fst _ _) suffices C : ContDiffOn 𝕜 m (fun p : E × E => (fderivWithin 𝕜 (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) p.1 : _) p.2) ((range I ∩ I.symm ⁻¹' s) ×ˢ (univ : Set E)) by refine ContDiffOn.prod B ?_ refine C.congr fun p hp => ?_ simp only [mfld_simps] at hp simp only [mfderivWithin, hf.mdifferentiableOn one_le_n _ hp.2, hp.1, if_pos, mfld_simps] rfl have D : ContDiffOn 𝕜 m (fun x => fderivWithin 𝕜 (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) x) (range I ∩ I.symm ⁻¹' s) := by have : ContDiffOn 𝕜 n (I' ∘ f ∘ I.symm) (range I ∩ I.symm ⁻¹' s) := by simpa only [mfld_simps] using hf'.2 (I.symm 0) (I'.symm 0) simpa only [inter_comm] using this.fderivWithin U' hmn refine ContDiffOn.clm_apply ?_ contDiffOn_snd exact D.comp contDiff_fst.contDiffOn (prod_subset_preimage_fst _ _)
49
1,907,346,572,495,099,800,000
2
2
3
1,997
import Mathlib.Geometry.Manifold.MFDeriv.UniqueDifferential import Mathlib.Geometry.Manifold.ContMDiffMap #align_import geometry.manifold.cont_mdiff_mfderiv from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833" open Set Function Filter ChartedSpace SmoothManifoldWithCorners Bundle open scoped Topology Manifold Bundle variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] -- declare a smooth manifold `M` over the pair `(E, H)`. {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [Is : SmoothManifoldWithCorners I M] -- declare a smooth manifold `M'` over the pair `(E', H')`. {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H'] {I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M'] [I's : SmoothManifoldWithCorners I' M'] -- declare a smooth manifold `N` over the pair `(F, G)`. {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G] {J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N] [Js : SmoothManifoldWithCorners J N] -- declare a smooth manifold `N'` over the pair `(F', G')`. {F' : Type*} [NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G'] {J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N'] [J's : SmoothManifoldWithCorners J' N'] -- declare some additional normed spaces, used for fibers of vector bundles {F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂] [NormedSpace 𝕜 F₂] -- declare functions, sets, points and smoothness indices {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞} -- Porting note: section about deducing differentiability from smoothness moved to -- `Geometry.Manifold.MFDeriv.Basic` namespace TangentBundle variable (I M) open Bundle
Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean
571
599
theorem tangentMap_tangentBundle_pure (p : TangentBundle I M) : tangentMap I I.tangent (zeroSection E (TangentSpace I)) p = ⟨⟨p.proj, 0⟩, ⟨p.2, 0⟩⟩ := by
rcases p with ⟨x, v⟩ have N : I.symm ⁻¹' (chartAt H x).target ∈ 𝓝 (I ((chartAt H x) x)) := by apply IsOpen.mem_nhds · apply (PartialHomeomorph.open_target _).preimage I.continuous_invFun · simp only [mfld_simps] have A : MDifferentiableAt I I.tangent (fun x => @TotalSpace.mk M E (TangentSpace I) x 0) x := haveI : Smooth I (I.prod 𝓘(𝕜, E)) (zeroSection E (TangentSpace I : M → Type _)) := Bundle.smooth_zeroSection 𝕜 (TangentSpace I : M → Type _) this.mdifferentiableAt have B : fderivWithin 𝕜 (fun x' : E ↦ (x', (0 : E))) (Set.range I) (I ((chartAt H x) x)) v = (v, 0) := by rw [fderivWithin_eq_fderiv, DifferentiableAt.fderiv_prod] · simp · exact differentiableAt_id' · exact differentiableAt_const _ · exact ModelWithCorners.unique_diff_at_image I · exact differentiableAt_id'.prod (differentiableAt_const _) simp (config := { unfoldPartialApp := true }) only [Bundle.zeroSection, tangentMap, mfderiv, A, if_pos, chartAt, FiberBundle.chartedSpace_chartAt, TangentBundle.trivializationAt_apply, tangentBundleCore, Function.comp_def, ContinuousLinearMap.map_zero, mfld_simps] rw [← fderivWithin_inter N] at B rw [← fderivWithin_inter N, ← B] congr 1 refine fderivWithin_congr (fun y hy => ?_) ?_ · simp only [mfld_simps] at hy simp only [hy, Prod.mk.inj_iff, mfld_simps] · simp only [Prod.mk.inj_iff, mfld_simps]
27
532,048,240,601.79865
2
2
3
1,997
import Mathlib.Mathport.Rename set_option autoImplicit true namespace Thunk #align thunk.mk Thunk.mk -- Porting note: Added `Thunk.ext` to get `ext` tactic to work. @[ext]
Mathlib/Lean/Thunk.lean
20
24
theorem ext {α : Type u} {a b : Thunk α} (eq : a.get = b.get) : a = b := by
have ⟨_⟩ := a have ⟨_⟩ := b congr exact funext fun _ ↦ eq
4
54.59815
2
2
1
1,998
import Mathlib.Dynamics.FixedPoints.Basic import Mathlib.Order.Hom.Order #align_import order.fixed_points from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6" universe u v w variable {α : Type u} {β : Type v} {γ : Type w} open Function (fixedPoints IsFixedPt) namespace OrderHom section Basic variable [CompleteLattice α] (f : α →o α) def lfp : (α →o α) →o α where toFun f := sInf { a | f a ≤ a } monotone' _ _ hle := sInf_le_sInf fun a ha => (hle a).trans ha #align order_hom.lfp OrderHom.lfp def gfp : (α →o α) →o α where toFun f := sSup { a | a ≤ f a } monotone' _ _ hle := sSup_le_sSup fun a ha => le_trans ha (hle a) #align order_hom.gfp OrderHom.gfp theorem lfp_le {a : α} (h : f a ≤ a) : lfp f ≤ a := sInf_le h #align order_hom.lfp_le OrderHom.lfp_le theorem lfp_le_fixed {a : α} (h : f a = a) : lfp f ≤ a := f.lfp_le h.le #align order_hom.lfp_le_fixed OrderHom.lfp_le_fixed theorem le_lfp {a : α} (h : ∀ b, f b ≤ b → a ≤ b) : a ≤ lfp f := le_sInf h #align order_hom.le_lfp OrderHom.le_lfp -- Porting note: for the rest of the file, replace the dot notation `_.lfp` with `lfp _` -- same for `_.gfp`, `_.dual` -- Probably related to https://github.com/leanprover/lean4/issues/1910 theorem map_le_lfp {a : α} (ha : a ≤ lfp f) : f a ≤ lfp f := f.le_lfp fun _ hb => (f.mono <| le_sInf_iff.1 ha _ hb).trans hb #align order_hom.map_le_lfp OrderHom.map_le_lfp @[simp] theorem map_lfp : f (lfp f) = lfp f := have h : f (lfp f) ≤ lfp f := f.map_le_lfp le_rfl h.antisymm <| f.lfp_le <| f.mono h #align order_hom.map_lfp OrderHom.map_lfp theorem isFixedPt_lfp : IsFixedPt f (lfp f) := f.map_lfp #align order_hom.is_fixed_pt_lfp OrderHom.isFixedPt_lfp theorem lfp_le_map {a : α} (ha : lfp f ≤ a) : lfp f ≤ f a := calc lfp f = f (lfp f) := f.map_lfp.symm _ ≤ f a := f.mono ha #align order_hom.lfp_le_map OrderHom.lfp_le_map theorem isLeast_lfp_le : IsLeast { a | f a ≤ a } (lfp f) := ⟨f.map_lfp.le, fun _ => f.lfp_le⟩ #align order_hom.is_least_lfp_le OrderHom.isLeast_lfp_le theorem isLeast_lfp : IsLeast (fixedPoints f) (lfp f) := ⟨f.isFixedPt_lfp, fun _ => f.lfp_le_fixed⟩ #align order_hom.is_least_lfp OrderHom.isLeast_lfp_le
Mathlib/Order/FixedPoints.lean
100
107
theorem lfp_induction {p : α → Prop} (step : ∀ a, p a → a ≤ lfp f → p (f a)) (hSup : ∀ s, (∀ a ∈ s, p a) → p (sSup s)) : p (lfp f) := by
set s := { a | a ≤ lfp f ∧ p a } specialize hSup s fun a => And.right suffices sSup s = lfp f from this ▸ hSup have h : sSup s ≤ lfp f := sSup_le fun b => And.left have hmem : f (sSup s) ∈ s := ⟨f.map_le_lfp h, step _ hSup h⟩ exact h.antisymm (f.lfp_le <| le_sSup hmem)
6
403.428793
2
2
1
1,999
import Mathlib.Logic.Small.Defs import Mathlib.Logic.Equiv.Set #align_import logic.small.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" universe u w v v' section open scoped Classical instance small_subtype (α : Type v) [Small.{w} α] (P : α → Prop) : Small.{w} { x // P x } := small_map (equivShrink α).subtypeEquivOfSubtype' #align small_subtype small_subtype theorem small_of_injective {α : Type v} {β : Type w} [Small.{u} β] {f : α → β} (hf : Function.Injective f) : Small.{u} α := small_map (Equiv.ofInjective f hf) #align small_of_injective small_of_injective theorem small_of_surjective {α : Type v} {β : Type w} [Small.{u} α] {f : α → β} (hf : Function.Surjective f) : Small.{u} β := small_of_injective (Function.injective_surjInv hf) #align small_of_surjective small_of_surjective instance (priority := 100) small_subsingleton (α : Type v) [Subsingleton α] : Small.{w} α := by rcases isEmpty_or_nonempty α with ⟨⟩ · apply small_map (Equiv.equivPEmpty α) · apply small_map Equiv.punitOfNonemptyOfSubsingleton #align small_subsingleton small_subsingleton
Mathlib/Logic/Small/Basic.lean
46
54
theorem small_of_injective_of_exists {α : Type v} {β : Type w} {γ : Type v'} [Small.{u} α] (f : α → γ) {g : β → γ} (hg : Function.Injective g) (h : ∀ b : β, ∃ a : α, f a = g b) : Small.{u} β := by
by_cases hβ : Nonempty β · refine small_of_surjective (f := Function.invFun g ∘ f) (fun b => ?_) obtain ⟨a, ha⟩ := h b exact ⟨a, by rw [Function.comp_apply, ha, Function.leftInverse_invFun hg]⟩ · simp only [not_nonempty_iff] at hβ infer_instance
6
403.428793
2
2
1
2,000
import Mathlib.Topology.Baire.Lemmas import Mathlib.Topology.Algebra.Group.Basic open scoped Topology Pointwise open MulAction Set Function variable {G X : Type*} [TopologicalSpace G] [TopologicalSpace X] [Group G] [TopologicalGroup G] [MulAction G X] [SigmaCompactSpace G] [BaireSpace X] [T2Space X] [ContinuousSMul G X] [IsPretransitive G X] @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open around zero. It follows in `isOpenMap_vadd_of_sigmaCompact` that it is open around any point."]
Mathlib/Topology/Algebra/Group/OpenMapping.lean
37
88
theorem smul_singleton_mem_nhds_of_sigmaCompact {U : Set G} (hU : U ∈ 𝓝 1) (x : X) : U • {x} ∈ 𝓝 x := by
/- Consider a small closed neighborhood `V` of the identity. Then the group is covered by countably many translates of `V`, say `gᵢ V`. Let also `Kₙ` be a sequence of compact sets covering the space. Then the image of `Kₙ ∩ gᵢ V` in the orbit is compact, and their unions covers the space. By Baire, one of them has nonempty interior. Then `gᵢ V • x` has nonempty interior, and so does `V • x`. Its interior contains a point `g' x` with `g' ∈ V`. Then `g'⁻¹ • V • x` contains a neighborhood of `x`, and it is included in `V⁻¹ • V • x`, which is itself contained in `U • x` if `V` is small enough. -/ obtain ⟨V, V_mem, V_closed, V_symm, VU⟩ : ∃ V ∈ 𝓝 (1 : G), IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U := exists_closed_nhds_one_inv_eq_mul_subset hU obtain ⟨s, s_count, hs⟩ : ∃ (s : Set G), s.Countable ∧ ⋃ g ∈ s, g • V = univ := by apply countable_cover_nhds_of_sigma_compact (fun g ↦ ?_) convert smul_mem_nhds g V_mem simp only [smul_eq_mul, mul_one] let K : ℕ → Set G := compactCovering G let F : ℕ × s → Set X := fun p ↦ (K p.1 ∩ (p.2 : G) • V) • ({x} : Set X) obtain ⟨⟨n, ⟨g, hg⟩⟩, hi⟩ : ∃ i, (interior (F i)).Nonempty := by have : Nonempty X := ⟨x⟩ have : Encodable s := Countable.toEncodable s_count apply nonempty_interior_of_iUnion_of_closed · rintro ⟨n, ⟨g, hg⟩⟩ apply IsCompact.isClosed suffices H : IsCompact ((fun (g : G) ↦ g • x) '' (K n ∩ g • V)) by simpa only [F, smul_singleton] using H apply IsCompact.image · exact (isCompact_compactCovering G n).inter_right (V_closed.smul g) · exact continuous_id.smul continuous_const · apply eq_univ_iff_forall.2 (fun y ↦ ?_) obtain ⟨h, rfl⟩ : ∃ h, h • x = y := exists_smul_eq G x y obtain ⟨n, hn⟩ : ∃ n, h ∈ K n := exists_mem_compactCovering h obtain ⟨g, gs, hg⟩ : ∃ g ∈ s, h ∈ g • V := exists_set_mem_of_union_eq_top s _ hs _ simp only [F, smul_singleton, mem_iUnion, mem_image, mem_inter_iff, Prod.exists, Subtype.exists, exists_prop] exact ⟨n, g, gs, h, ⟨hn, hg⟩, rfl⟩ have I : (interior ((g • V) • {x})).Nonempty := by apply hi.mono apply interior_mono exact smul_subset_smul_right inter_subset_right obtain ⟨y, hy⟩ : (interior (V • ({x} : Set X))).Nonempty := by rw [smul_assoc, interior_smul] at I exact smul_set_nonempty.1 I obtain ⟨g', hg', rfl⟩ : ∃ g' ∈ V, g' • x = y := by simpa using interior_subset hy have J : (g' ⁻¹ • V) • {x} ∈ 𝓝 x := by apply mem_interior_iff_mem_nhds.1 rwa [smul_assoc, interior_smul, mem_inv_smul_set_iff] have : (g'⁻¹ • V) • {x} ⊆ U • ({x} : Set X) := by apply smul_subset_smul_right apply Subset.trans (smul_set_subset_smul (inv_mem_inv.2 hg')) ?_ rw [V_symm] exact VU exact Filter.mem_of_superset J this
50
5,184,705,528,587,073,000,000
2
2
3
2,001
import Mathlib.Topology.Baire.Lemmas import Mathlib.Topology.Algebra.Group.Basic open scoped Topology Pointwise open MulAction Set Function variable {G X : Type*} [TopologicalSpace G] [TopologicalSpace X] [Group G] [TopologicalGroup G] [MulAction G X] [SigmaCompactSpace G] [BaireSpace X] [T2Space X] [ContinuousSMul G X] [IsPretransitive G X] @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open around zero. It follows in `isOpenMap_vadd_of_sigmaCompact` that it is open around any point."] theorem smul_singleton_mem_nhds_of_sigmaCompact {U : Set G} (hU : U ∈ 𝓝 1) (x : X) : U • {x} ∈ 𝓝 x := by obtain ⟨V, V_mem, V_closed, V_symm, VU⟩ : ∃ V ∈ 𝓝 (1 : G), IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U := exists_closed_nhds_one_inv_eq_mul_subset hU obtain ⟨s, s_count, hs⟩ : ∃ (s : Set G), s.Countable ∧ ⋃ g ∈ s, g • V = univ := by apply countable_cover_nhds_of_sigma_compact (fun g ↦ ?_) convert smul_mem_nhds g V_mem simp only [smul_eq_mul, mul_one] let K : ℕ → Set G := compactCovering G let F : ℕ × s → Set X := fun p ↦ (K p.1 ∩ (p.2 : G) • V) • ({x} : Set X) obtain ⟨⟨n, ⟨g, hg⟩⟩, hi⟩ : ∃ i, (interior (F i)).Nonempty := by have : Nonempty X := ⟨x⟩ have : Encodable s := Countable.toEncodable s_count apply nonempty_interior_of_iUnion_of_closed · rintro ⟨n, ⟨g, hg⟩⟩ apply IsCompact.isClosed suffices H : IsCompact ((fun (g : G) ↦ g • x) '' (K n ∩ g • V)) by simpa only [F, smul_singleton] using H apply IsCompact.image · exact (isCompact_compactCovering G n).inter_right (V_closed.smul g) · exact continuous_id.smul continuous_const · apply eq_univ_iff_forall.2 (fun y ↦ ?_) obtain ⟨h, rfl⟩ : ∃ h, h • x = y := exists_smul_eq G x y obtain ⟨n, hn⟩ : ∃ n, h ∈ K n := exists_mem_compactCovering h obtain ⟨g, gs, hg⟩ : ∃ g ∈ s, h ∈ g • V := exists_set_mem_of_union_eq_top s _ hs _ simp only [F, smul_singleton, mem_iUnion, mem_image, mem_inter_iff, Prod.exists, Subtype.exists, exists_prop] exact ⟨n, g, gs, h, ⟨hn, hg⟩, rfl⟩ have I : (interior ((g • V) • {x})).Nonempty := by apply hi.mono apply interior_mono exact smul_subset_smul_right inter_subset_right obtain ⟨y, hy⟩ : (interior (V • ({x} : Set X))).Nonempty := by rw [smul_assoc, interior_smul] at I exact smul_set_nonempty.1 I obtain ⟨g', hg', rfl⟩ : ∃ g' ∈ V, g' • x = y := by simpa using interior_subset hy have J : (g' ⁻¹ • V) • {x} ∈ 𝓝 x := by apply mem_interior_iff_mem_nhds.1 rwa [smul_assoc, interior_smul, mem_inv_smul_set_iff] have : (g'⁻¹ • V) • {x} ⊆ U • ({x} : Set X) := by apply smul_subset_smul_right apply Subset.trans (smul_set_subset_smul (inv_mem_inv.2 hg')) ?_ rw [V_symm] exact VU exact Filter.mem_of_superset J this @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open. This is a version of the open mapping theorem, valid notably for the action of a sigma-compact locally compact group on a locally compact space."]
Mathlib/Topology/Algebra/Group/OpenMapping.lean
96
107
theorem isOpenMap_smul_of_sigmaCompact (x : X) : IsOpenMap (fun (g : G) ↦ g • x) := by
/- We have already proved the theorem around the basepoint of the orbit, in `smul_singleton_mem_nhds_of_sigmaCompact`. The general statement follows around an arbitrary point by changing basepoints. -/ simp_rw [isOpenMap_iff_nhds_le, Filter.le_map_iff] intro g U hU have : (· • x) = (· • (g • x)) ∘ (· * g⁻¹) := by ext g simp [smul_smul] rw [this, image_comp, ← smul_singleton] apply smul_singleton_mem_nhds_of_sigmaCompact simpa using isOpenMap_mul_right g⁻¹ |>.image_mem_nhds hU
11
59,874.141715
2
2
3
2,001
import Mathlib.Topology.Baire.Lemmas import Mathlib.Topology.Algebra.Group.Basic open scoped Topology Pointwise open MulAction Set Function variable {G X : Type*} [TopologicalSpace G] [TopologicalSpace X] [Group G] [TopologicalGroup G] [MulAction G X] [SigmaCompactSpace G] [BaireSpace X] [T2Space X] [ContinuousSMul G X] [IsPretransitive G X] @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open around zero. It follows in `isOpenMap_vadd_of_sigmaCompact` that it is open around any point."] theorem smul_singleton_mem_nhds_of_sigmaCompact {U : Set G} (hU : U ∈ 𝓝 1) (x : X) : U • {x} ∈ 𝓝 x := by obtain ⟨V, V_mem, V_closed, V_symm, VU⟩ : ∃ V ∈ 𝓝 (1 : G), IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U := exists_closed_nhds_one_inv_eq_mul_subset hU obtain ⟨s, s_count, hs⟩ : ∃ (s : Set G), s.Countable ∧ ⋃ g ∈ s, g • V = univ := by apply countable_cover_nhds_of_sigma_compact (fun g ↦ ?_) convert smul_mem_nhds g V_mem simp only [smul_eq_mul, mul_one] let K : ℕ → Set G := compactCovering G let F : ℕ × s → Set X := fun p ↦ (K p.1 ∩ (p.2 : G) • V) • ({x} : Set X) obtain ⟨⟨n, ⟨g, hg⟩⟩, hi⟩ : ∃ i, (interior (F i)).Nonempty := by have : Nonempty X := ⟨x⟩ have : Encodable s := Countable.toEncodable s_count apply nonempty_interior_of_iUnion_of_closed · rintro ⟨n, ⟨g, hg⟩⟩ apply IsCompact.isClosed suffices H : IsCompact ((fun (g : G) ↦ g • x) '' (K n ∩ g • V)) by simpa only [F, smul_singleton] using H apply IsCompact.image · exact (isCompact_compactCovering G n).inter_right (V_closed.smul g) · exact continuous_id.smul continuous_const · apply eq_univ_iff_forall.2 (fun y ↦ ?_) obtain ⟨h, rfl⟩ : ∃ h, h • x = y := exists_smul_eq G x y obtain ⟨n, hn⟩ : ∃ n, h ∈ K n := exists_mem_compactCovering h obtain ⟨g, gs, hg⟩ : ∃ g ∈ s, h ∈ g • V := exists_set_mem_of_union_eq_top s _ hs _ simp only [F, smul_singleton, mem_iUnion, mem_image, mem_inter_iff, Prod.exists, Subtype.exists, exists_prop] exact ⟨n, g, gs, h, ⟨hn, hg⟩, rfl⟩ have I : (interior ((g • V) • {x})).Nonempty := by apply hi.mono apply interior_mono exact smul_subset_smul_right inter_subset_right obtain ⟨y, hy⟩ : (interior (V • ({x} : Set X))).Nonempty := by rw [smul_assoc, interior_smul] at I exact smul_set_nonempty.1 I obtain ⟨g', hg', rfl⟩ : ∃ g' ∈ V, g' • x = y := by simpa using interior_subset hy have J : (g' ⁻¹ • V) • {x} ∈ 𝓝 x := by apply mem_interior_iff_mem_nhds.1 rwa [smul_assoc, interior_smul, mem_inv_smul_set_iff] have : (g'⁻¹ • V) • {x} ⊆ U • ({x} : Set X) := by apply smul_subset_smul_right apply Subset.trans (smul_set_subset_smul (inv_mem_inv.2 hg')) ?_ rw [V_symm] exact VU exact Filter.mem_of_superset J this @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open. This is a version of the open mapping theorem, valid notably for the action of a sigma-compact locally compact group on a locally compact space."] theorem isOpenMap_smul_of_sigmaCompact (x : X) : IsOpenMap (fun (g : G) ↦ g • x) := by simp_rw [isOpenMap_iff_nhds_le, Filter.le_map_iff] intro g U hU have : (· • x) = (· • (g • x)) ∘ (· * g⁻¹) := by ext g simp [smul_smul] rw [this, image_comp, ← smul_singleton] apply smul_singleton_mem_nhds_of_sigmaCompact simpa using isOpenMap_mul_right g⁻¹ |>.image_mem_nhds hU @[to_additive]
Mathlib/Topology/Algebra/Group/OpenMapping.lean
112
121
theorem MonoidHom.isOpenMap_of_sigmaCompact {H : Type*} [Group H] [TopologicalSpace H] [BaireSpace H] [T2Space H] [ContinuousMul H] (f : G →* H) (hf : Function.Surjective f) (h'f : Continuous f) : IsOpenMap f := by
let A : MulAction G H := MulAction.compHom _ f have : ContinuousSMul G H := continuousSMul_compHom h'f have : IsPretransitive G H := isPretransitive_compHom hf have : f = (fun (g : G) ↦ g • (1 : H)) := by simp [MulAction.compHom_smul_def] rw [this] exact isOpenMap_smul_of_sigmaCompact _
6
403.428793
2
2
3
2,001
import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.lhopital from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Set open scoped Filter Topology Pointwise variable {a b : ℝ} (hab : a < b) {l : Filter ℝ} {f f' g g' : ℝ → ℝ} namespace HasDerivAt
Mathlib/Analysis/Calculus/LHopital.lean
51
92
theorem lhopital_zero_right_on_Ioo (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) (hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x) (hg' : ∀ x ∈ Ioo a b, g' x ≠ 0) (hfa : Tendsto f (𝓝[>] a) (𝓝 0)) (hga : Tendsto g (𝓝[>] a) (𝓝 0)) (hdiv : Tendsto (fun x => f' x / g' x) (𝓝[>] a) l) : Tendsto (fun x => f x / g x) (𝓝[>] a) l := by
have sub : ∀ x ∈ Ioo a b, Ioo a x ⊆ Ioo a b := fun x hx => Ioo_subset_Ioo (le_refl a) (le_of_lt hx.2) have hg : ∀ x ∈ Ioo a b, g x ≠ 0 := by intro x hx h have : Tendsto g (𝓝[<] x) (𝓝 0) := by rw [← h, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hx.1] exact ((hgg' x hx).continuousAt.continuousWithinAt.mono <| sub x hx).tendsto obtain ⟨y, hyx, hy⟩ : ∃ c ∈ Ioo a x, g' c = 0 := exists_hasDerivAt_eq_zero' hx.1 hga this fun y hy => hgg' y <| sub x hx hy exact hg' y (sub x hx hyx) hy have : ∀ x ∈ Ioo a b, ∃ c ∈ Ioo a x, f x * g' c = g x * f' c := by intro x hx rw [← sub_zero (f x), ← sub_zero (g x)] exact exists_ratio_hasDerivAt_eq_ratio_slope' g g' hx.1 f f' (fun y hy => hgg' y <| sub x hx hy) (fun y hy => hff' y <| sub x hx hy) hga hfa (tendsto_nhdsWithin_of_tendsto_nhds (hgg' x hx).continuousAt.tendsto) (tendsto_nhdsWithin_of_tendsto_nhds (hff' x hx).continuousAt.tendsto) choose! c hc using this have : ∀ x ∈ Ioo a b, ((fun x' => f' x' / g' x') ∘ c) x = f x / g x := by intro x hx rcases hc x hx with ⟨h₁, h₂⟩ field_simp [hg x hx, hg' (c x) ((sub x hx) h₁)] simp only [h₂] rw [mul_comm] have cmp : ∀ x ∈ Ioo a b, a < c x ∧ c x < x := fun x hx => (hc x hx).1 rw [← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab] apply tendsto_nhdsWithin_congr this apply hdiv.comp refine tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ (tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds (tendsto_nhdsWithin_of_tendsto_nhds tendsto_id) ?_ ?_) ?_ all_goals apply eventually_nhdsWithin_of_forall intro x hx have := cmp x hx try simp linarith [this]
37
11,719,142,372,802,612
2
2
3
2,002
import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.lhopital from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Set open scoped Filter Topology Pointwise variable {a b : ℝ} (hab : a < b) {l : Filter ℝ} {f f' g g' : ℝ → ℝ} namespace HasDerivAt theorem lhopital_zero_right_on_Ioo (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) (hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x) (hg' : ∀ x ∈ Ioo a b, g' x ≠ 0) (hfa : Tendsto f (𝓝[>] a) (𝓝 0)) (hga : Tendsto g (𝓝[>] a) (𝓝 0)) (hdiv : Tendsto (fun x => f' x / g' x) (𝓝[>] a) l) : Tendsto (fun x => f x / g x) (𝓝[>] a) l := by have sub : ∀ x ∈ Ioo a b, Ioo a x ⊆ Ioo a b := fun x hx => Ioo_subset_Ioo (le_refl a) (le_of_lt hx.2) have hg : ∀ x ∈ Ioo a b, g x ≠ 0 := by intro x hx h have : Tendsto g (𝓝[<] x) (𝓝 0) := by rw [← h, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hx.1] exact ((hgg' x hx).continuousAt.continuousWithinAt.mono <| sub x hx).tendsto obtain ⟨y, hyx, hy⟩ : ∃ c ∈ Ioo a x, g' c = 0 := exists_hasDerivAt_eq_zero' hx.1 hga this fun y hy => hgg' y <| sub x hx hy exact hg' y (sub x hx hyx) hy have : ∀ x ∈ Ioo a b, ∃ c ∈ Ioo a x, f x * g' c = g x * f' c := by intro x hx rw [← sub_zero (f x), ← sub_zero (g x)] exact exists_ratio_hasDerivAt_eq_ratio_slope' g g' hx.1 f f' (fun y hy => hgg' y <| sub x hx hy) (fun y hy => hff' y <| sub x hx hy) hga hfa (tendsto_nhdsWithin_of_tendsto_nhds (hgg' x hx).continuousAt.tendsto) (tendsto_nhdsWithin_of_tendsto_nhds (hff' x hx).continuousAt.tendsto) choose! c hc using this have : ∀ x ∈ Ioo a b, ((fun x' => f' x' / g' x') ∘ c) x = f x / g x := by intro x hx rcases hc x hx with ⟨h₁, h₂⟩ field_simp [hg x hx, hg' (c x) ((sub x hx) h₁)] simp only [h₂] rw [mul_comm] have cmp : ∀ x ∈ Ioo a b, a < c x ∧ c x < x := fun x hx => (hc x hx).1 rw [← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab] apply tendsto_nhdsWithin_congr this apply hdiv.comp refine tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ (tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds (tendsto_nhdsWithin_of_tendsto_nhds tendsto_id) ?_ ?_) ?_ all_goals apply eventually_nhdsWithin_of_forall intro x hx have := cmp x hx try simp linarith [this] #align has_deriv_at.lhopital_zero_right_on_Ioo HasDerivAt.lhopital_zero_right_on_Ioo
Mathlib/Analysis/Calculus/LHopital.lean
95
104
theorem lhopital_zero_right_on_Ico (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) (hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x) (hcf : ContinuousOn f (Ico a b)) (hcg : ContinuousOn g (Ico a b)) (hg' : ∀ x ∈ Ioo a b, g' x ≠ 0) (hfa : f a = 0) (hga : g a = 0) (hdiv : Tendsto (fun x => f' x / g' x) (𝓝[>] a) l) : Tendsto (fun x => f x / g x) (𝓝[>] a) l := by
refine lhopital_zero_right_on_Ioo hab hff' hgg' hg' ?_ ?_ hdiv · rw [← hfa, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab] exact ((hcf a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto · rw [← hga, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab] exact ((hcg a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto
5
148.413159
2
2
3
2,002
import Mathlib.Analysis.Calculus.MeanValue import Mathlib.Analysis.Calculus.Deriv.Inv #align_import analysis.calculus.lhopital from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Filter Set open scoped Filter Topology Pointwise variable {a b : ℝ} (hab : a < b) {l : Filter ℝ} {f f' g g' : ℝ → ℝ} namespace HasDerivAt theorem lhopital_zero_right_on_Ioo (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) (hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x) (hg' : ∀ x ∈ Ioo a b, g' x ≠ 0) (hfa : Tendsto f (𝓝[>] a) (𝓝 0)) (hga : Tendsto g (𝓝[>] a) (𝓝 0)) (hdiv : Tendsto (fun x => f' x / g' x) (𝓝[>] a) l) : Tendsto (fun x => f x / g x) (𝓝[>] a) l := by have sub : ∀ x ∈ Ioo a b, Ioo a x ⊆ Ioo a b := fun x hx => Ioo_subset_Ioo (le_refl a) (le_of_lt hx.2) have hg : ∀ x ∈ Ioo a b, g x ≠ 0 := by intro x hx h have : Tendsto g (𝓝[<] x) (𝓝 0) := by rw [← h, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hx.1] exact ((hgg' x hx).continuousAt.continuousWithinAt.mono <| sub x hx).tendsto obtain ⟨y, hyx, hy⟩ : ∃ c ∈ Ioo a x, g' c = 0 := exists_hasDerivAt_eq_zero' hx.1 hga this fun y hy => hgg' y <| sub x hx hy exact hg' y (sub x hx hyx) hy have : ∀ x ∈ Ioo a b, ∃ c ∈ Ioo a x, f x * g' c = g x * f' c := by intro x hx rw [← sub_zero (f x), ← sub_zero (g x)] exact exists_ratio_hasDerivAt_eq_ratio_slope' g g' hx.1 f f' (fun y hy => hgg' y <| sub x hx hy) (fun y hy => hff' y <| sub x hx hy) hga hfa (tendsto_nhdsWithin_of_tendsto_nhds (hgg' x hx).continuousAt.tendsto) (tendsto_nhdsWithin_of_tendsto_nhds (hff' x hx).continuousAt.tendsto) choose! c hc using this have : ∀ x ∈ Ioo a b, ((fun x' => f' x' / g' x') ∘ c) x = f x / g x := by intro x hx rcases hc x hx with ⟨h₁, h₂⟩ field_simp [hg x hx, hg' (c x) ((sub x hx) h₁)] simp only [h₂] rw [mul_comm] have cmp : ∀ x ∈ Ioo a b, a < c x ∧ c x < x := fun x hx => (hc x hx).1 rw [← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab] apply tendsto_nhdsWithin_congr this apply hdiv.comp refine tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ (tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds (tendsto_nhdsWithin_of_tendsto_nhds tendsto_id) ?_ ?_) ?_ all_goals apply eventually_nhdsWithin_of_forall intro x hx have := cmp x hx try simp linarith [this] #align has_deriv_at.lhopital_zero_right_on_Ioo HasDerivAt.lhopital_zero_right_on_Ioo theorem lhopital_zero_right_on_Ico (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) (hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x) (hcf : ContinuousOn f (Ico a b)) (hcg : ContinuousOn g (Ico a b)) (hg' : ∀ x ∈ Ioo a b, g' x ≠ 0) (hfa : f a = 0) (hga : g a = 0) (hdiv : Tendsto (fun x => f' x / g' x) (𝓝[>] a) l) : Tendsto (fun x => f x / g x) (𝓝[>] a) l := by refine lhopital_zero_right_on_Ioo hab hff' hgg' hg' ?_ ?_ hdiv · rw [← hfa, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab] exact ((hcf a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto · rw [← hga, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab] exact ((hcg a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto #align has_deriv_at.lhopital_zero_right_on_Ico HasDerivAt.lhopital_zero_right_on_Ico
Mathlib/Analysis/Calculus/LHopital.lean
107
129
theorem lhopital_zero_left_on_Ioo (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) (hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x) (hg' : ∀ x ∈ Ioo a b, g' x ≠ 0) (hfb : Tendsto f (𝓝[<] b) (𝓝 0)) (hgb : Tendsto g (𝓝[<] b) (𝓝 0)) (hdiv : Tendsto (fun x => f' x / g' x) (𝓝[<] b) l) : Tendsto (fun x => f x / g x) (𝓝[<] b) l := by
-- Here, we essentially compose by `Neg.neg`. The following is mostly technical details. have hdnf : ∀ x ∈ -Ioo a b, HasDerivAt (f ∘ Neg.neg) (f' (-x) * -1) x := fun x hx => comp x (hff' (-x) hx) (hasDerivAt_neg x) have hdng : ∀ x ∈ -Ioo a b, HasDerivAt (g ∘ Neg.neg) (g' (-x) * -1) x := fun x hx => comp x (hgg' (-x) hx) (hasDerivAt_neg x) rw [preimage_neg_Ioo] at hdnf rw [preimage_neg_Ioo] at hdng have := lhopital_zero_right_on_Ioo (neg_lt_neg hab) hdnf hdng (by intro x hx h apply hg' _ (by rw [← preimage_neg_Ioo] at hx; exact hx) rwa [mul_comm, ← neg_eq_neg_one_mul, neg_eq_zero] at h) (hfb.comp tendsto_neg_nhdsWithin_Ioi_neg) (hgb.comp tendsto_neg_nhdsWithin_Ioi_neg) (by simp only [neg_div_neg_eq, mul_one, mul_neg] exact (tendsto_congr fun x => rfl).mp (hdiv.comp tendsto_neg_nhdsWithin_Ioi_neg)) have := this.comp tendsto_neg_nhdsWithin_Iio unfold Function.comp at this simpa only [neg_neg]
18
65,659,969.137331
2
2
3
2,002
import Mathlib.Topology.Algebra.InfiniteSum.Constructions import Mathlib.Topology.Algebra.Module.Basic #align_import topology.algebra.infinite_sum.module from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" variable {α β γ δ : Type*} open Filter Finset Function variable {ι κ R R₂ M M₂ : Type*} section HasSum -- Results in this section hold for continuous additive monoid homomorphisms or equivalences but we -- don't have bundled continuous additive homomorphisms. variable [Semiring R] [Semiring R₂] [AddCommMonoid M] [Module R M] [AddCommMonoid M₂] [Module R₂ M₂] [TopologicalSpace M] [TopologicalSpace M₂] {σ : R →+* R₂} {σ' : R₂ →+* R} [RingHomInvPair σ σ'] [RingHomInvPair σ' σ] protected theorem ContinuousLinearMap.hasSum {f : ι → M} (φ : M →SL[σ] M₂) {x : M} (hf : HasSum f x) : HasSum (fun b : ι ↦ φ (f b)) (φ x) := by simpa only using hf.map φ.toLinearMap.toAddMonoidHom φ.continuous #align continuous_linear_map.has_sum ContinuousLinearMap.hasSum alias HasSum.mapL := ContinuousLinearMap.hasSum set_option linter.uppercaseLean3 false in #align has_sum.mapL HasSum.mapL protected theorem ContinuousLinearMap.summable {f : ι → M} (φ : M →SL[σ] M₂) (hf : Summable f) : Summable fun b : ι ↦ φ (f b) := (hf.hasSum.mapL φ).summable #align continuous_linear_map.summable ContinuousLinearMap.summable alias Summable.mapL := ContinuousLinearMap.summable set_option linter.uppercaseLean3 false in #align summable.mapL Summable.mapL protected theorem ContinuousLinearMap.map_tsum [T2Space M₂] {f : ι → M} (φ : M →SL[σ] M₂) (hf : Summable f) : φ (∑' z, f z) = ∑' z, φ (f z) := (hf.hasSum.mapL φ).tsum_eq.symm #align continuous_linear_map.map_tsum ContinuousLinearMap.map_tsum protected theorem ContinuousLinearEquiv.hasSum {f : ι → M} (e : M ≃SL[σ] M₂) {y : M₂} : HasSum (fun b : ι ↦ e (f b)) y ↔ HasSum f (e.symm y) := ⟨fun h ↦ by simpa only [e.symm.coe_coe, e.symm_apply_apply] using h.mapL (e.symm : M₂ →SL[σ'] M), fun h ↦ by simpa only [e.coe_coe, e.apply_symm_apply] using (e : M →SL[σ] M₂).hasSum h⟩ #align continuous_linear_equiv.has_sum ContinuousLinearEquiv.hasSum protected theorem ContinuousLinearEquiv.hasSum' {f : ι → M} (e : M ≃SL[σ] M₂) {x : M} : HasSum (fun b : ι ↦ e (f b)) (e x) ↔ HasSum f x := by rw [e.hasSum, ContinuousLinearEquiv.symm_apply_apply] #align continuous_linear_equiv.has_sum' ContinuousLinearEquiv.hasSum' protected theorem ContinuousLinearEquiv.summable {f : ι → M} (e : M ≃SL[σ] M₂) : (Summable fun b : ι ↦ e (f b)) ↔ Summable f := ⟨fun hf ↦ (e.hasSum.1 hf.hasSum).summable, (e : M →SL[σ] M₂).summable⟩ #align continuous_linear_equiv.summable ContinuousLinearEquiv.summable
Mathlib/Topology/Algebra/InfiniteSum/Module.lean
167
178
theorem ContinuousLinearEquiv.tsum_eq_iff [T2Space M] [T2Space M₂] {f : ι → M} (e : M ≃SL[σ] M₂) {y : M₂} : (∑' z, e (f z)) = y ↔ ∑' z, f z = e.symm y := by
by_cases hf : Summable f · exact ⟨fun h ↦ (e.hasSum.mp ((e.summable.mpr hf).hasSum_iff.mpr h)).tsum_eq, fun h ↦ (e.hasSum.mpr (hf.hasSum_iff.mpr h)).tsum_eq⟩ · have hf' : ¬Summable fun z ↦ e (f z) := fun h ↦ hf (e.summable.mp h) rw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable hf'] refine ⟨?_, fun H ↦ ?_⟩ · rintro rfl simp · simpa using congr_arg (fun z ↦ e z) H
10
22,026.465795
2
2
1
2,003
import Mathlib.Topology.ContinuousOn import Mathlib.Data.Set.BoolIndicator open Set Filter Topology TopologicalSpace Classical universe u v variable {X : Type u} {Y : Type v} {ι : Type*} variable [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X} section Clopen protected theorem IsClopen.isOpen (hs : IsClopen s) : IsOpen s := hs.2 #align is_clopen.is_open IsClopen.isOpen protected theorem IsClopen.isClosed (hs : IsClopen s) : IsClosed s := hs.1 #align is_clopen.is_closed IsClopen.isClosed
Mathlib/Topology/Clopen.lean
30
34
theorem isClopen_iff_frontier_eq_empty : IsClopen s ↔ frontier s = ∅ := by
rw [IsClopen, ← closure_eq_iff_isClosed, ← interior_eq_iff_isOpen, frontier, diff_eq_empty] refine ⟨fun h => (h.1.trans h.2.symm).subset, fun h => ?_⟩ exact ⟨(h.trans interior_subset).antisymm subset_closure, interior_subset.antisymm (subset_closure.trans h)⟩
4
54.59815
2
2
2
2,004
import Mathlib.Topology.ContinuousOn import Mathlib.Data.Set.BoolIndicator open Set Filter Topology TopologicalSpace Classical universe u v variable {X : Type u} {Y : Type v} {ι : Type*} variable [TopologicalSpace X] [TopologicalSpace Y] {s t : Set X} section Clopen protected theorem IsClopen.isOpen (hs : IsClopen s) : IsOpen s := hs.2 #align is_clopen.is_open IsClopen.isOpen protected theorem IsClopen.isClosed (hs : IsClopen s) : IsClosed s := hs.1 #align is_clopen.is_closed IsClopen.isClosed theorem isClopen_iff_frontier_eq_empty : IsClopen s ↔ frontier s = ∅ := by rw [IsClopen, ← closure_eq_iff_isClosed, ← interior_eq_iff_isOpen, frontier, diff_eq_empty] refine ⟨fun h => (h.1.trans h.2.symm).subset, fun h => ?_⟩ exact ⟨(h.trans interior_subset).antisymm subset_closure, interior_subset.antisymm (subset_closure.trans h)⟩ #align is_clopen_iff_frontier_eq_empty isClopen_iff_frontier_eq_empty @[simp] alias ⟨IsClopen.frontier_eq, _⟩ := isClopen_iff_frontier_eq_empty #align is_clopen.frontier_eq IsClopen.frontier_eq theorem IsClopen.union (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s ∪ t) := ⟨hs.1.union ht.1, hs.2.union ht.2⟩ #align is_clopen.union IsClopen.union theorem IsClopen.inter (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s ∩ t) := ⟨hs.1.inter ht.1, hs.2.inter ht.2⟩ #align is_clopen.inter IsClopen.inter theorem isClopen_empty : IsClopen (∅ : Set X) := ⟨isClosed_empty, isOpen_empty⟩ #align is_clopen_empty isClopen_empty theorem isClopen_univ : IsClopen (univ : Set X) := ⟨isClosed_univ, isOpen_univ⟩ #align is_clopen_univ isClopen_univ theorem IsClopen.compl (hs : IsClopen s) : IsClopen sᶜ := ⟨hs.2.isClosed_compl, hs.1.isOpen_compl⟩ #align is_clopen.compl IsClopen.compl @[simp] theorem isClopen_compl_iff : IsClopen sᶜ ↔ IsClopen s := ⟨fun h => compl_compl s ▸ IsClopen.compl h, IsClopen.compl⟩ #align is_clopen_compl_iff isClopen_compl_iff theorem IsClopen.diff (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s \ t) := hs.inter ht.compl #align is_clopen.diff IsClopen.diff theorem IsClopen.prod {t : Set Y} (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s ×ˢ t) := ⟨hs.1.prod ht.1, hs.2.prod ht.2⟩ #align is_clopen.prod IsClopen.prod theorem isClopen_iUnion_of_finite [Finite Y] {s : Y → Set X} (h : ∀ i, IsClopen (s i)) : IsClopen (⋃ i, s i) := ⟨isClosed_iUnion_of_finite (forall_and.1 h).1, isOpen_iUnion (forall_and.1 h).2⟩ #align is_clopen_Union isClopen_iUnion_of_finite theorem Set.Finite.isClopen_biUnion {s : Set Y} {f : Y → Set X} (hs : s.Finite) (h : ∀ i ∈ s, IsClopen <| f i) : IsClopen (⋃ i ∈ s, f i) := ⟨hs.isClosed_biUnion fun i hi => (h i hi).1, isOpen_biUnion fun i hi => (h i hi).2⟩ #align is_clopen_bUnion Set.Finite.isClopen_biUnion theorem isClopen_biUnion_finset {s : Finset Y} {f : Y → Set X} (h : ∀ i ∈ s, IsClopen <| f i) : IsClopen (⋃ i ∈ s, f i) := s.finite_toSet.isClopen_biUnion h #align is_clopen_bUnion_finset isClopen_biUnion_finset theorem isClopen_iInter_of_finite [Finite Y] {s : Y → Set X} (h : ∀ i, IsClopen (s i)) : IsClopen (⋂ i, s i) := ⟨isClosed_iInter (forall_and.1 h).1, isOpen_iInter_of_finite (forall_and.1 h).2⟩ #align is_clopen_Inter isClopen_iInter_of_finite theorem Set.Finite.isClopen_biInter {s : Set Y} (hs : s.Finite) {f : Y → Set X} (h : ∀ i ∈ s, IsClopen (f i)) : IsClopen (⋂ i ∈ s, f i) := ⟨isClosed_biInter fun i hi => (h i hi).1, hs.isOpen_biInter fun i hi => (h i hi).2⟩ #align is_clopen_bInter Set.Finite.isClopen_biInter theorem isClopen_biInter_finset {s : Finset Y} {f : Y → Set X} (h : ∀ i ∈ s, IsClopen (f i)) : IsClopen (⋂ i ∈ s, f i) := s.finite_toSet.isClopen_biInter h #align is_clopen_bInter_finset isClopen_biInter_finset theorem IsClopen.preimage {s : Set Y} (h : IsClopen s) {f : X → Y} (hf : Continuous f) : IsClopen (f ⁻¹' s) := ⟨h.1.preimage hf, h.2.preimage hf⟩ #align is_clopen.preimage IsClopen.preimage theorem ContinuousOn.preimage_isClopen_of_isClopen {f : X → Y} {s : Set X} {t : Set Y} (hf : ContinuousOn f s) (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s ∩ f ⁻¹' t) := ⟨ContinuousOn.preimage_isClosed_of_isClosed hf hs.1 ht.1, ContinuousOn.isOpen_inter_preimage hf hs.2 ht.2⟩ #align continuous_on.preimage_clopen_of_clopen ContinuousOn.preimage_isClopen_of_isClopen
Mathlib/Topology/Clopen.lean
113
120
theorem isClopen_inter_of_disjoint_cover_clopen {s a b : Set X} (h : IsClopen s) (cover : s ⊆ a ∪ b) (ha : IsOpen a) (hb : IsOpen b) (hab : Disjoint a b) : IsClopen (s ∩ a) := by
refine ⟨?_, IsOpen.inter h.2 ha⟩ have : IsClosed (s ∩ bᶜ) := IsClosed.inter h.1 (isClosed_compl_iff.2 hb) convert this using 1 refine (inter_subset_inter_right s hab.subset_compl_right).antisymm ?_ rintro x ⟨hx₁, hx₂⟩ exact ⟨hx₁, by simpa [not_mem_of_mem_compl hx₂] using cover hx₁⟩
6
403.428793
2
2
2
2,004
import Mathlib.Topology.ContinuousFunction.Basic #align_import topology.continuous_function.cocompact_map from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" universe u v w open Filter Set structure CocompactMap (α : Type u) (β : Type v) [TopologicalSpace α] [TopologicalSpace β] extends ContinuousMap α β : Type max u v where cocompact_tendsto' : Tendsto toFun (cocompact α) (cocompact β) #align cocompact_map CocompactMap section class CocompactMapClass (F : Type*) (α β : outParam Type*) [TopologicalSpace α] [TopologicalSpace β] [FunLike F α β] extends ContinuousMapClass F α β : Prop where cocompact_tendsto (f : F) : Tendsto f (cocompact α) (cocompact β) #align cocompact_map_class CocompactMapClass end export CocompactMapClass (cocompact_tendsto) namespace CocompactMap section Basics variable {α β γ δ : Type*} [TopologicalSpace α] [TopologicalSpace β] [TopologicalSpace γ] [TopologicalSpace δ] instance : FunLike (CocompactMap α β) α β where coe f := f.toFun coe_injective' f g h := by obtain ⟨⟨_, _⟩, _⟩ := f obtain ⟨⟨_, _⟩, _⟩ := g congr instance : CocompactMapClass (CocompactMap α β) α β where map_continuous f := f.continuous_toFun cocompact_tendsto f := f.cocompact_tendsto' @[simp] theorem coe_toContinuousMap {f : CocompactMap α β} : (f.toContinuousMap : α → β) = f := rfl #align cocompact_map.coe_to_continuous_fun CocompactMap.coe_toContinuousMap @[ext] theorem ext {f g : CocompactMap α β} (h : ∀ x, f x = g x) : f = g := DFunLike.ext _ _ h #align cocompact_map.ext CocompactMap.ext protected def copy (f : CocompactMap α β) (f' : α → β) (h : f' = f) : CocompactMap α β where toFun := f' continuous_toFun := by rw [h] exact f.continuous_toFun cocompact_tendsto' := by simp_rw [h] exact f.cocompact_tendsto' #align cocompact_map.copy CocompactMap.copy @[simp] theorem coe_copy (f : CocompactMap α β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f' := rfl #align cocompact_map.coe_copy CocompactMap.coe_copy theorem copy_eq (f : CocompactMap α β) (f' : α → β) (h : f' = f) : f.copy f' h = f := DFunLike.ext' h #align cocompact_map.copy_eq CocompactMap.copy_eq @[simp] theorem coe_mk (f : C(α, β)) (h : Tendsto f (cocompact α) (cocompact β)) : ⇑(⟨f, h⟩ : CocompactMap α β) = f := rfl #align cocompact_map.coe_mk CocompactMap.coe_mk section variable (α) protected def id : CocompactMap α α := ⟨ContinuousMap.id _, tendsto_id⟩ #align cocompact_map.id CocompactMap.id @[simp] theorem coe_id : ⇑(CocompactMap.id α) = id := rfl #align cocompact_map.coe_id CocompactMap.coe_id end instance : Inhabited (CocompactMap α α) := ⟨CocompactMap.id α⟩ def comp (f : CocompactMap β γ) (g : CocompactMap α β) : CocompactMap α γ := ⟨f.toContinuousMap.comp g, (cocompact_tendsto f).comp (cocompact_tendsto g)⟩ #align cocompact_map.comp CocompactMap.comp @[simp] theorem coe_comp (f : CocompactMap β γ) (g : CocompactMap α β) : ⇑(comp f g) = f ∘ g := rfl #align cocompact_map.coe_comp CocompactMap.coe_comp @[simp] theorem comp_apply (f : CocompactMap β γ) (g : CocompactMap α β) (a : α) : comp f g a = f (g a) := rfl #align cocompact_map.comp_apply CocompactMap.comp_apply @[simp] theorem comp_assoc (f : CocompactMap γ δ) (g : CocompactMap β γ) (h : CocompactMap α β) : (f.comp g).comp h = f.comp (g.comp h) := rfl #align cocompact_map.comp_assoc CocompactMap.comp_assoc @[simp] theorem id_comp (f : CocompactMap α β) : (CocompactMap.id _).comp f = f := ext fun _ => rfl #align cocompact_map.id_comp CocompactMap.id_comp @[simp] theorem comp_id (f : CocompactMap α β) : f.comp (CocompactMap.id _) = f := ext fun _ => rfl #align cocompact_map.comp_id CocompactMap.comp_id theorem tendsto_of_forall_preimage {f : α → β} (h : ∀ s, IsCompact s → IsCompact (f ⁻¹' s)) : Tendsto f (cocompact α) (cocompact β) := fun s hs => match mem_cocompact.mp hs with | ⟨t, ht, hts⟩ => mem_map.mpr (mem_cocompact.mpr ⟨f ⁻¹' t, h t ht, by simpa using preimage_mono hts⟩) #align cocompact_map.tendsto_of_forall_preimage CocompactMap.tendsto_of_forall_preimage
Mathlib/Topology/ContinuousFunction/CocompactMap.lean
185
195
theorem isCompact_preimage [T2Space β] (f : CocompactMap α β) ⦃s : Set β⦄ (hs : IsCompact s) : IsCompact (f ⁻¹' s) := by
obtain ⟨t, ht, hts⟩ := mem_cocompact'.mp (by simpa only [preimage_image_preimage, preimage_compl] using mem_map.mp (cocompact_tendsto f <| mem_cocompact.mpr ⟨s, hs, compl_subset_compl.mpr (image_preimage_subset f _)⟩)) exact ht.of_isClosed_subset (hs.isClosed.preimage <| map_continuous f) (by simpa using hts)
9
8,103.083928
2
2
1
2,005
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.MeasureTheory.Covering.OneDim import Mathlib.Order.Monotone.Extension #align_import analysis.calculus.monotone from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Set Filter Function Metric MeasureTheory MeasureTheory.Measure IsUnifLocDoublingMeasure open scoped Topology
Mathlib/Analysis/Calculus/Monotone.lean
44
62
theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l : Filter ℝ} (hl : l ≤ 𝓝[≠] x) (hf : Tendsto (fun y => (f y - d) / (y - x)) l (𝓝 a)) (h' : Tendsto (fun y => y + c * (y - x) ^ 2) l l) : Tendsto (fun y => (f (y + c * (y - x) ^ 2) - d) / (y - x)) l (𝓝 a) := by
have L : Tendsto (fun y => (y + c * (y - x) ^ 2 - x) / (y - x)) l (𝓝 1) := by have : Tendsto (fun y => 1 + c * (y - x)) l (𝓝 (1 + c * (x - x))) := by apply Tendsto.mono_left _ (hl.trans nhdsWithin_le_nhds) exact ((tendsto_id.sub_const x).const_mul c).const_add 1 simp only [_root_.sub_self, add_zero, mul_zero] at this apply Tendsto.congr' (Eventually.filter_mono hl _) this filter_upwards [self_mem_nhdsWithin] with y hy field_simp [sub_ne_zero.2 hy] ring have Z := (hf.comp h').mul L rw [mul_one] at Z apply Tendsto.congr' _ Z have : ∀ᶠ y in l, y + c * (y - x) ^ 2 ≠ x := by apply Tendsto.mono_right h' hl self_mem_nhdsWithin filter_upwards [this] with y hy field_simp [sub_ne_zero.2 hy]
15
3,269,017.372472
2
2
2
2,006
import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.MeasureTheory.Covering.OneDim import Mathlib.Order.Monotone.Extension #align_import analysis.calculus.monotone from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Set Filter Function Metric MeasureTheory MeasureTheory.Measure IsUnifLocDoublingMeasure open scoped Topology theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l : Filter ℝ} (hl : l ≤ 𝓝[≠] x) (hf : Tendsto (fun y => (f y - d) / (y - x)) l (𝓝 a)) (h' : Tendsto (fun y => y + c * (y - x) ^ 2) l l) : Tendsto (fun y => (f (y + c * (y - x) ^ 2) - d) / (y - x)) l (𝓝 a) := by have L : Tendsto (fun y => (y + c * (y - x) ^ 2 - x) / (y - x)) l (𝓝 1) := by have : Tendsto (fun y => 1 + c * (y - x)) l (𝓝 (1 + c * (x - x))) := by apply Tendsto.mono_left _ (hl.trans nhdsWithin_le_nhds) exact ((tendsto_id.sub_const x).const_mul c).const_add 1 simp only [_root_.sub_self, add_zero, mul_zero] at this apply Tendsto.congr' (Eventually.filter_mono hl _) this filter_upwards [self_mem_nhdsWithin] with y hy field_simp [sub_ne_zero.2 hy] ring have Z := (hf.comp h').mul L rw [mul_one] at Z apply Tendsto.congr' _ Z have : ∀ᶠ y in l, y + c * (y - x) ^ 2 ≠ x := by apply Tendsto.mono_right h' hl self_mem_nhdsWithin filter_upwards [this] with y hy field_simp [sub_ne_zero.2 hy] #align tendsto_apply_add_mul_sq_div_sub tendsto_apply_add_mul_sq_div_sub
Mathlib/Analysis/Calculus/Monotone.lean
67
131
theorem StieltjesFunction.ae_hasDerivAt (f : StieltjesFunction) : ∀ᵐ x, HasDerivAt f (rnDeriv f.measure volume x).toReal x := by
/- Denote by `μ` the Stieltjes measure associated to `f`. The general theorem `VitaliFamily.ae_tendsto_rnDeriv` ensures that `μ [x, y] / (y - x)` tends to the Radon-Nikodym derivative as `y` tends to `x` from the right. As `μ [x,y] = f y - f (x^-)` and `f (x^-) = f x` almost everywhere, this gives differentiability on the right. On the left, `μ [y, x] / (x - y)` again tends to the Radon-Nikodym derivative. As `μ [y, x] = f x - f (y^-)`, this is not exactly the right result, so one uses a sandwiching argument to deduce the convergence for `(f x - f y) / (x - y)`. -/ filter_upwards [VitaliFamily.ae_tendsto_rnDeriv (vitaliFamily (volume : Measure ℝ) 1) f.measure, rnDeriv_lt_top f.measure volume, f.countable_leftLim_ne.ae_not_mem volume] with x hx h'x h''x -- Limit on the right, following from differentiation of measures have L1 : Tendsto (fun y => (f y - f x) / (y - x)) (𝓝[>] x) (𝓝 (rnDeriv f.measure volume x).toReal) := by apply Tendsto.congr' _ ((ENNReal.tendsto_toReal h'x.ne).comp (hx.comp (Real.tendsto_Icc_vitaliFamily_right x))) filter_upwards [self_mem_nhdsWithin] rintro y (hxy : x < y) simp only [comp_apply, StieltjesFunction.measure_Icc, Real.volume_Icc, Classical.not_not.1 h''x] rw [← ENNReal.ofReal_div_of_pos (sub_pos.2 hxy), ENNReal.toReal_ofReal] exact div_nonneg (sub_nonneg.2 (f.mono hxy.le)) (sub_pos.2 hxy).le -- Limit on the left, following from differentiation of measures. Its form is not exactly the one -- we need, due to the appearance of a left limit. have L2 : Tendsto (fun y => (leftLim f y - f x) / (y - x)) (𝓝[<] x) (𝓝 (rnDeriv f.measure volume x).toReal) := by apply Tendsto.congr' _ ((ENNReal.tendsto_toReal h'x.ne).comp (hx.comp (Real.tendsto_Icc_vitaliFamily_left x))) filter_upwards [self_mem_nhdsWithin] rintro y (hxy : y < x) simp only [comp_apply, StieltjesFunction.measure_Icc, Real.volume_Icc] rw [← ENNReal.ofReal_div_of_pos (sub_pos.2 hxy), ENNReal.toReal_ofReal, ← neg_neg (y - x), div_neg, neg_div', neg_sub, neg_sub] exact div_nonneg (sub_nonneg.2 (f.mono.leftLim_le hxy.le)) (sub_pos.2 hxy).le -- Shifting a little bit the limit on the left, by `(y - x)^2`. have L3 : Tendsto (fun y => (leftLim f (y + 1 * (y - x) ^ 2) - f x) / (y - x)) (𝓝[<] x) (𝓝 (rnDeriv f.measure volume x).toReal) := by apply tendsto_apply_add_mul_sq_div_sub (nhds_left'_le_nhds_ne x) L2 apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within · apply Tendsto.mono_left _ nhdsWithin_le_nhds have : Tendsto (fun y : ℝ => y + ↑1 * (y - x) ^ 2) (𝓝 x) (𝓝 (x + ↑1 * (x - x) ^ 2)) := tendsto_id.add (((tendsto_id.sub_const x).pow 2).const_mul ↑1) simpa using this · have : Ioo (x - 1) x ∈ 𝓝[<] x := by apply Ioo_mem_nhdsWithin_Iio; exact ⟨by linarith, le_refl _⟩ filter_upwards [this] rintro y ⟨hy : x - 1 < y, h'y : y < x⟩ rw [mem_Iio] norm_num; nlinarith -- Deduce the correct limit on the left, by sandwiching. have L4 : Tendsto (fun y => (f y - f x) / (y - x)) (𝓝[<] x) (𝓝 (rnDeriv f.measure volume x).toReal) := by apply tendsto_of_tendsto_of_tendsto_of_le_of_le' L3 L2 · filter_upwards [self_mem_nhdsWithin] rintro y (hy : y < x) refine div_le_div_of_nonpos_of_le (by linarith) ((sub_le_sub_iff_right _).2 ?_) apply f.mono.le_leftLim have : ↑0 < (x - y) ^ 2 := sq_pos_of_pos (sub_pos.2 hy) norm_num; linarith · filter_upwards [self_mem_nhdsWithin] rintro y (hy : y < x) refine div_le_div_of_nonpos_of_le (by linarith) ?_ simpa only [sub_le_sub_iff_right] using f.mono.leftLim_le (le_refl y) -- prove the result by splitting into left and right limits. rw [hasDerivAt_iff_tendsto_slope, slope_fun_def_field, ← nhds_left'_sup_nhds_right', tendsto_sup] exact ⟨L4, L1⟩
63
2,293,783,159,469,610,000,000,000,000
2
2
2
2,006
import Mathlib.Analysis.Calculus.ContDiff.Basic import Mathlib.Data.Finset.Sym import Mathlib.Data.Nat.Choose.Cast import Mathlib.Data.Nat.Choose.Multinomial #align_import analysis.calculus.cont_diff from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical NNReal Nat universe u uD uE uF uG open Set Fin Filter Function variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {D : Type uD} [NormedAddCommGroup D] [NormedSpace 𝕜 D] {E : Type uE} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {F : Type uF} [NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type uG} [NormedAddCommGroup G] [NormedSpace 𝕜 G] {s s₁ t u : Set E}
Mathlib/Analysis/Calculus/ContDiff/Bounds.lean
40
122
theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu Fu Gu : Type u} [NormedAddCommGroup Du] [NormedSpace 𝕜 Du] [NormedAddCommGroup Eu] [NormedSpace 𝕜 Eu] [NormedAddCommGroup Fu] [NormedSpace 𝕜 Fu] [NormedAddCommGroup Gu] [NormedSpace 𝕜 Gu] (B : Eu →L[𝕜] Fu →L[𝕜] Gu) {f : Du → Eu} {g : Du → Fu} {n : ℕ} {s : Set Du} {x : Du} (hf : ContDiffOn 𝕜 n f s) (hg : ContDiffOn 𝕜 n g s) (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) : ‖iteratedFDerivWithin 𝕜 n (fun y => B (f y) (g y)) s x‖ ≤ ‖B‖ * ∑ i ∈ Finset.range (n + 1), (n.choose i : ℝ) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ := by
/- We argue by induction on `n`. The bound is trivial for `n = 0`. For `n + 1`, we write the `(n+1)`-th derivative as the `n`-th derivative of the derivative `B f g' + B f' g`, and apply the inductive assumption to each of those two terms. For this induction to make sense, the spaces of linear maps that appear in the induction should be in the same universe as the original spaces, which explains why we assume in the lemma that all spaces live in the same universe. -/ induction' n with n IH generalizing Eu Fu Gu · simp only [Nat.zero_eq, norm_iteratedFDerivWithin_zero, zero_add, Finset.range_one, Finset.sum_singleton, Nat.choose_self, Nat.cast_one, one_mul, Nat.sub_zero, ← mul_assoc] apply B.le_opNorm₂ · have In : (n : ℕ∞) + 1 ≤ n.succ := by simp only [Nat.cast_succ, le_refl] -- Porting note: the next line is a hack allowing Lean to find the operator norm instance. let norm := @ContinuousLinearMap.hasOpNorm _ _ Eu ((Du →L[𝕜] Fu) →L[𝕜] Du →L[𝕜] Gu) _ _ _ _ _ _ (RingHom.id 𝕜) have I1 : ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompR Du (f y) (fderivWithin 𝕜 g s y)) s x‖ ≤ ‖B‖ * ∑ i ∈ Finset.range (n + 1), n.choose i * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n + 1 - i) g s x‖ := by calc ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompR Du (f y) (fderivWithin 𝕜 g s y)) s x‖ ≤ ‖B.precompR Du‖ * ∑ i ∈ Finset.range (n + 1), n.choose i * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ := IH _ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In) _ ≤ ‖B‖ * ∑ i ∈ Finset.range (n + 1), n.choose i * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) (fderivWithin 𝕜 g s) s x‖ := mul_le_mul_of_nonneg_right (B.norm_precompR_le Du) (by positivity) _ = _ := by congr 1 apply Finset.sum_congr rfl fun i hi => ?_ rw [Nat.succ_sub (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)), ← norm_iteratedFDerivWithin_fderivWithin hs hx] -- Porting note: the next line is a hack allowing Lean to find the operator norm instance. let norm := @ContinuousLinearMap.hasOpNorm _ _ (Du →L[𝕜] Eu) (Fu →L[𝕜] Du →L[𝕜] Gu) _ _ _ _ _ _ (RingHom.id 𝕜) have I2 : ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s x‖ ≤ ‖B‖ * ∑ i ∈ Finset.range (n + 1), n.choose i * ‖iteratedFDerivWithin 𝕜 (i + 1) f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ := calc ‖iteratedFDerivWithin 𝕜 n (fun y : Du => B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s x‖ ≤ ‖B.precompL Du‖ * ∑ i ∈ Finset.range (n + 1), n.choose i * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 f s) s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ := IH _ (hf.fderivWithin hs In) (hg.of_le (Nat.cast_le.2 (Nat.le_succ n))) _ ≤ ‖B‖ * ∑ i ∈ Finset.range (n + 1), n.choose i * ‖iteratedFDerivWithin 𝕜 i (fderivWithin 𝕜 f s) s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖ := mul_le_mul_of_nonneg_right (B.norm_precompL_le Du) (by positivity) _ = _ := by congr 1 apply Finset.sum_congr rfl fun i _ => ?_ rw [← norm_iteratedFDerivWithin_fderivWithin hs hx] have J : iteratedFDerivWithin 𝕜 n (fun y : Du => fderivWithin 𝕜 (fun y : Du => B (f y) (g y)) s y) s x = iteratedFDerivWithin 𝕜 n (fun y => B.precompR Du (f y) (fderivWithin 𝕜 g s y) + B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s x := by apply iteratedFDerivWithin_congr (fun y hy => ?_) hx have L : (1 : ℕ∞) ≤ n.succ := by simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n exact B.fderivWithin_of_bilinear (hf.differentiableOn L y hy) (hg.differentiableOn L y hy) (hs y hy) rw [← norm_iteratedFDerivWithin_fderivWithin hs hx, J] have A : ContDiffOn 𝕜 n (fun y => B.precompR Du (f y) (fderivWithin 𝕜 g s y)) s := (B.precompR Du).isBoundedBilinearMap.contDiff.comp_contDiff_on₂ (hf.of_le (Nat.cast_le.2 (Nat.le_succ n))) (hg.fderivWithin hs In) have A' : ContDiffOn 𝕜 n (fun y => B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s := (B.precompL Du).isBoundedBilinearMap.contDiff.comp_contDiff_on₂ (hf.fderivWithin hs In) (hg.of_le (Nat.cast_le.2 (Nat.le_succ n))) rw [iteratedFDerivWithin_add_apply' A A' hs hx] apply (norm_add_le _ _).trans ((add_le_add I1 I2).trans (le_of_eq ?_)) simp_rw [← mul_add, mul_assoc] congr 1 exact (Finset.sum_choose_succ_mul (fun i j => ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 j g s x‖) n).symm
75
373,324,199,679,900,150,000,000,000,000,000
2
2
1
2,007
import Mathlib.CategoryTheory.Filtered.Basic import Mathlib.Topology.Category.TopCat.Limits.Basic #align_import topology.category.Top.limits.konig from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseLean3 false open CategoryTheory open CategoryTheory.Limits -- Porting note: changed universe order as `v` is usually passed explicitly universe v u w noncomputable section namespace TopCat section TopologicalKonig variable {J : Type u} [SmallCategory J] -- Porting note: generalized `F` to land in `v` not `u` variable (F : J ⥤ TopCat.{v}) private abbrev FiniteDiagramArrow {J : Type u} [SmallCategory J] (G : Finset J) := Σ' (X Y : J) (_ : X ∈ G) (_ : Y ∈ G), X ⟶ Y private abbrev FiniteDiagram (J : Type u) [SmallCategory J] := Σ G : Finset J, Finset (FiniteDiagramArrow G) -- Porting note: generalized `F` to land in `v` not `u` def partialSections {J : Type u} [SmallCategory J] (F : J ⥤ TopCat.{v}) {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : Set (∀ j, F.obj j) := {u | ∀ {f : FiniteDiagramArrow G} (_ : f ∈ H), F.map f.2.2.2.2 (u f.1) = u f.2.1} #align Top.partial_sections TopCat.partialSections
Mathlib/Topology/Category/TopCat/Limits/Konig.lean
70
81
theorem partialSections.nonempty [IsCofilteredOrEmpty J] [h : ∀ j : J, Nonempty (F.obj j)] {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : (partialSections F H).Nonempty := by
classical cases isEmpty_or_nonempty J · exact ⟨isEmptyElim, fun {j} => IsEmpty.elim' inferInstance j.1⟩ haveI : IsCofiltered J := ⟨⟩ use fun j : J => if hj : j ∈ G then F.map (IsCofiltered.infTo G H hj) (h (IsCofiltered.inf G H)).some else (h _).some rintro ⟨X, Y, hX, hY, f⟩ hf dsimp only rwa [dif_pos hX, dif_pos hY, ← comp_app, ← F.map_comp, @IsCofiltered.infTo_commutes _ _ _ G H]
10
22,026.465795
2
2
4
2,008
import Mathlib.CategoryTheory.Filtered.Basic import Mathlib.Topology.Category.TopCat.Limits.Basic #align_import topology.category.Top.limits.konig from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseLean3 false open CategoryTheory open CategoryTheory.Limits -- Porting note: changed universe order as `v` is usually passed explicitly universe v u w noncomputable section namespace TopCat section TopologicalKonig variable {J : Type u} [SmallCategory J] -- Porting note: generalized `F` to land in `v` not `u` variable (F : J ⥤ TopCat.{v}) private abbrev FiniteDiagramArrow {J : Type u} [SmallCategory J] (G : Finset J) := Σ' (X Y : J) (_ : X ∈ G) (_ : Y ∈ G), X ⟶ Y private abbrev FiniteDiagram (J : Type u) [SmallCategory J] := Σ G : Finset J, Finset (FiniteDiagramArrow G) -- Porting note: generalized `F` to land in `v` not `u` def partialSections {J : Type u} [SmallCategory J] (F : J ⥤ TopCat.{v}) {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : Set (∀ j, F.obj j) := {u | ∀ {f : FiniteDiagramArrow G} (_ : f ∈ H), F.map f.2.2.2.2 (u f.1) = u f.2.1} #align Top.partial_sections TopCat.partialSections theorem partialSections.nonempty [IsCofilteredOrEmpty J] [h : ∀ j : J, Nonempty (F.obj j)] {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : (partialSections F H).Nonempty := by classical cases isEmpty_or_nonempty J · exact ⟨isEmptyElim, fun {j} => IsEmpty.elim' inferInstance j.1⟩ haveI : IsCofiltered J := ⟨⟩ use fun j : J => if hj : j ∈ G then F.map (IsCofiltered.infTo G H hj) (h (IsCofiltered.inf G H)).some else (h _).some rintro ⟨X, Y, hX, hY, f⟩ hf dsimp only rwa [dif_pos hX, dif_pos hY, ← comp_app, ← F.map_comp, @IsCofiltered.infTo_commutes _ _ _ G H] #align Top.partial_sections.nonempty TopCat.partialSections.nonempty
Mathlib/Topology/Category/TopCat/Limits/Konig.lean
84
104
theorem partialSections.directed : Directed Superset fun G : FiniteDiagram J => partialSections F G.2 := by
classical intro A B let ιA : FiniteDiagramArrow A.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f => ⟨f.1, f.2.1, Finset.mem_union_left _ f.2.2.1, Finset.mem_union_left _ f.2.2.2.1, f.2.2.2.2⟩ let ιB : FiniteDiagramArrow B.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f => ⟨f.1, f.2.1, Finset.mem_union_right _ f.2.2.1, Finset.mem_union_right _ f.2.2.2.1, f.2.2.2.2⟩ refine ⟨⟨A.1 ⊔ B.1, A.2.image ιA ⊔ B.2.image ιB⟩, ?_, ?_⟩ · rintro u hu f hf have : ιA f ∈ A.2.image ιA ⊔ B.2.image ιB := by apply Finset.mem_union_left rw [Finset.mem_image] exact ⟨f, hf, rfl⟩ exact hu this · rintro u hu f hf have : ιB f ∈ A.2.image ιA ⊔ B.2.image ιB := by apply Finset.mem_union_right rw [Finset.mem_image] exact ⟨f, hf, rfl⟩ exact hu this
19
178,482,300.963187
2
2
4
2,008
import Mathlib.CategoryTheory.Filtered.Basic import Mathlib.Topology.Category.TopCat.Limits.Basic #align_import topology.category.Top.limits.konig from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseLean3 false open CategoryTheory open CategoryTheory.Limits -- Porting note: changed universe order as `v` is usually passed explicitly universe v u w noncomputable section namespace TopCat section TopologicalKonig variable {J : Type u} [SmallCategory J] -- Porting note: generalized `F` to land in `v` not `u` variable (F : J ⥤ TopCat.{v}) private abbrev FiniteDiagramArrow {J : Type u} [SmallCategory J] (G : Finset J) := Σ' (X Y : J) (_ : X ∈ G) (_ : Y ∈ G), X ⟶ Y private abbrev FiniteDiagram (J : Type u) [SmallCategory J] := Σ G : Finset J, Finset (FiniteDiagramArrow G) -- Porting note: generalized `F` to land in `v` not `u` def partialSections {J : Type u} [SmallCategory J] (F : J ⥤ TopCat.{v}) {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : Set (∀ j, F.obj j) := {u | ∀ {f : FiniteDiagramArrow G} (_ : f ∈ H), F.map f.2.2.2.2 (u f.1) = u f.2.1} #align Top.partial_sections TopCat.partialSections theorem partialSections.nonempty [IsCofilteredOrEmpty J] [h : ∀ j : J, Nonempty (F.obj j)] {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : (partialSections F H).Nonempty := by classical cases isEmpty_or_nonempty J · exact ⟨isEmptyElim, fun {j} => IsEmpty.elim' inferInstance j.1⟩ haveI : IsCofiltered J := ⟨⟩ use fun j : J => if hj : j ∈ G then F.map (IsCofiltered.infTo G H hj) (h (IsCofiltered.inf G H)).some else (h _).some rintro ⟨X, Y, hX, hY, f⟩ hf dsimp only rwa [dif_pos hX, dif_pos hY, ← comp_app, ← F.map_comp, @IsCofiltered.infTo_commutes _ _ _ G H] #align Top.partial_sections.nonempty TopCat.partialSections.nonempty theorem partialSections.directed : Directed Superset fun G : FiniteDiagram J => partialSections F G.2 := by classical intro A B let ιA : FiniteDiagramArrow A.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f => ⟨f.1, f.2.1, Finset.mem_union_left _ f.2.2.1, Finset.mem_union_left _ f.2.2.2.1, f.2.2.2.2⟩ let ιB : FiniteDiagramArrow B.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f => ⟨f.1, f.2.1, Finset.mem_union_right _ f.2.2.1, Finset.mem_union_right _ f.2.2.2.1, f.2.2.2.2⟩ refine ⟨⟨A.1 ⊔ B.1, A.2.image ιA ⊔ B.2.image ιB⟩, ?_, ?_⟩ · rintro u hu f hf have : ιA f ∈ A.2.image ιA ⊔ B.2.image ιB := by apply Finset.mem_union_left rw [Finset.mem_image] exact ⟨f, hf, rfl⟩ exact hu this · rintro u hu f hf have : ιB f ∈ A.2.image ιA ⊔ B.2.image ιB := by apply Finset.mem_union_right rw [Finset.mem_image] exact ⟨f, hf, rfl⟩ exact hu this #align Top.partial_sections.directed TopCat.partialSections.directed
Mathlib/Topology/Category/TopCat/Limits/Konig.lean
107
124
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
have : partialSections F H = ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by ext1 simp only [Set.mem_iInter, Set.mem_setOf_eq] rfl rw [this] apply isClosed_biInter intro f _ -- Porting note: can't see through forget have : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) := inferInstanceAs (T2Space (F.obj f.snd.fst)) apply isClosed_eq -- Porting note: used to be a single `continuity` that closed both goals · exact (F.map f.snd.snd.snd.snd).continuous.comp (continuous_apply f.fst) · continuity
16
8,886,110.520508
2
2
4
2,008
import Mathlib.CategoryTheory.Filtered.Basic import Mathlib.Topology.Category.TopCat.Limits.Basic #align_import topology.category.Top.limits.konig from "leanprover-community/mathlib"@"dbdf71cee7bb20367cb7e37279c08b0c218cf967" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseLean3 false open CategoryTheory open CategoryTheory.Limits -- Porting note: changed universe order as `v` is usually passed explicitly universe v u w noncomputable section namespace TopCat section TopologicalKonig variable {J : Type u} [SmallCategory J] -- Porting note: generalized `F` to land in `v` not `u` variable (F : J ⥤ TopCat.{v}) private abbrev FiniteDiagramArrow {J : Type u} [SmallCategory J] (G : Finset J) := Σ' (X Y : J) (_ : X ∈ G) (_ : Y ∈ G), X ⟶ Y private abbrev FiniteDiagram (J : Type u) [SmallCategory J] := Σ G : Finset J, Finset (FiniteDiagramArrow G) -- Porting note: generalized `F` to land in `v` not `u` def partialSections {J : Type u} [SmallCategory J] (F : J ⥤ TopCat.{v}) {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : Set (∀ j, F.obj j) := {u | ∀ {f : FiniteDiagramArrow G} (_ : f ∈ H), F.map f.2.2.2.2 (u f.1) = u f.2.1} #align Top.partial_sections TopCat.partialSections theorem partialSections.nonempty [IsCofilteredOrEmpty J] [h : ∀ j : J, Nonempty (F.obj j)] {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : (partialSections F H).Nonempty := by classical cases isEmpty_or_nonempty J · exact ⟨isEmptyElim, fun {j} => IsEmpty.elim' inferInstance j.1⟩ haveI : IsCofiltered J := ⟨⟩ use fun j : J => if hj : j ∈ G then F.map (IsCofiltered.infTo G H hj) (h (IsCofiltered.inf G H)).some else (h _).some rintro ⟨X, Y, hX, hY, f⟩ hf dsimp only rwa [dif_pos hX, dif_pos hY, ← comp_app, ← F.map_comp, @IsCofiltered.infTo_commutes _ _ _ G H] #align Top.partial_sections.nonempty TopCat.partialSections.nonempty theorem partialSections.directed : Directed Superset fun G : FiniteDiagram J => partialSections F G.2 := by classical intro A B let ιA : FiniteDiagramArrow A.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f => ⟨f.1, f.2.1, Finset.mem_union_left _ f.2.2.1, Finset.mem_union_left _ f.2.2.2.1, f.2.2.2.2⟩ let ιB : FiniteDiagramArrow B.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f => ⟨f.1, f.2.1, Finset.mem_union_right _ f.2.2.1, Finset.mem_union_right _ f.2.2.2.1, f.2.2.2.2⟩ refine ⟨⟨A.1 ⊔ B.1, A.2.image ιA ⊔ B.2.image ιB⟩, ?_, ?_⟩ · rintro u hu f hf have : ιA f ∈ A.2.image ιA ⊔ B.2.image ιB := by apply Finset.mem_union_left rw [Finset.mem_image] exact ⟨f, hf, rfl⟩ exact hu this · rintro u hu f hf have : ιB f ∈ A.2.image ιA ⊔ B.2.image ιB := by apply Finset.mem_union_right rw [Finset.mem_image] exact ⟨f, hf, rfl⟩ exact hu this #align Top.partial_sections.directed TopCat.partialSections.directed theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J} (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by have : partialSections F H = ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by ext1 simp only [Set.mem_iInter, Set.mem_setOf_eq] rfl rw [this] apply isClosed_biInter intro f _ -- Porting note: can't see through forget have : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) := inferInstanceAs (T2Space (F.obj f.snd.fst)) apply isClosed_eq -- Porting note: used to be a single `continuity` that closed both goals · exact (F.map f.snd.snd.snd.snd).continuous.comp (continuous_apply f.fst) · continuity #align Top.partial_sections.closed TopCat.partialSections.closed -- Porting note: generalized from `TopCat.{u}` to `TopCat.{max v u}`
Mathlib/Topology/Category/TopCat/Limits/Konig.lean
130
146
theorem nonempty_limitCone_of_compact_t2_cofiltered_system (F : J ⥤ TopCat.{max v u}) [IsCofilteredOrEmpty J] [∀ j : J, Nonempty (F.obj j)] [∀ j : J, CompactSpace (F.obj j)] [∀ j : J, T2Space (F.obj j)] : Nonempty (TopCat.limitCone F).pt := by
classical obtain ⟨u, hu⟩ := IsCompact.nonempty_iInter_of_directed_nonempty_isCompact_isClosed (fun G => partialSections F _) (partialSections.directed F) (fun G => partialSections.nonempty F _) (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G => partialSections.closed F _ use u intro X Y f let G : FiniteDiagram J := ⟨{X, Y}, {⟨X, Y, by simp only [true_or_iff, eq_self_iff_true, Finset.mem_insert], by simp only [eq_self_iff_true, or_true_iff, Finset.mem_insert, Finset.mem_singleton], f⟩}⟩ exact hu _ ⟨G, rfl⟩ (Finset.mem_singleton_self _)
13
442,413.392009
2
2
4
2,008
import Mathlib.Geometry.Manifold.MFDeriv.Atlas noncomputable section open scoped Manifold open Set section UniqueMDiff variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [SmoothManifoldWithCorners I M] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H'] {I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M'] [SmoothManifoldWithCorners I' M'] {s : Set M} {x : M}
Mathlib/Geometry/Manifold/MFDeriv/UniqueDifferential.lean
39
49
theorem UniqueMDiffWithinAt.image_denseRange (hs : UniqueMDiffWithinAt I s x) {f : M → M'} {f' : E →L[𝕜] E'} (hf : HasMFDerivWithinAt I I' f s x f') (hd : DenseRange f') : UniqueMDiffWithinAt I' (f '' s) (f x) := by
/- Rewrite in coordinates, apply `HasFDerivWithinAt.uniqueDiffWithinAt`. -/ have := hs.inter' <| hf.1 (extChartAt_source_mem_nhds I' (f x)) refine (((hf.2.mono ?sub1).uniqueDiffWithinAt this hd).mono ?sub2).congr_pt ?pt case pt => simp only [mfld_simps] case sub1 => mfld_set_tac case sub2 => rintro _ ⟨y, ⟨⟨hys, hfy⟩, -⟩, rfl⟩ exact ⟨⟨_, hys, ((extChartAt I' (f x)).left_inv hfy).symm⟩, mem_range_self _⟩
8
2,980.957987
2
2
4
2,009
import Mathlib.Geometry.Manifold.MFDeriv.Atlas noncomputable section open scoped Manifold open Set section UniqueMDiff variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [SmoothManifoldWithCorners I M] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H'] {I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M'] [SmoothManifoldWithCorners I' M'] {s : Set M} {x : M} theorem UniqueMDiffWithinAt.image_denseRange (hs : UniqueMDiffWithinAt I s x) {f : M → M'} {f' : E →L[𝕜] E'} (hf : HasMFDerivWithinAt I I' f s x f') (hd : DenseRange f') : UniqueMDiffWithinAt I' (f '' s) (f x) := by have := hs.inter' <| hf.1 (extChartAt_source_mem_nhds I' (f x)) refine (((hf.2.mono ?sub1).uniqueDiffWithinAt this hd).mono ?sub2).congr_pt ?pt case pt => simp only [mfld_simps] case sub1 => mfld_set_tac case sub2 => rintro _ ⟨y, ⟨⟨hys, hfy⟩, -⟩, rfl⟩ exact ⟨⟨_, hys, ((extChartAt I' (f x)).left_inv hfy).symm⟩, mem_range_self _⟩ theorem UniqueMDiffOn.image_denseRange' (hs : UniqueMDiffOn I s) {f : M → M'} {f' : M → E →L[𝕜] E'} (hf : ∀ x ∈ s, HasMFDerivWithinAt I I' f s x (f' x)) (hd : ∀ x ∈ s, DenseRange (f' x)) : UniqueMDiffOn I' (f '' s) := forall_mem_image.2 fun x hx ↦ (hs x hx).image_denseRange (hf x hx) (hd x hx) theorem UniqueMDiffOn.image_denseRange (hs : UniqueMDiffOn I s) {f : M → M'} (hf : MDifferentiableOn I I' f s) (hd : ∀ x ∈ s, DenseRange (mfderivWithin I I' f s x)) : UniqueMDiffOn I' (f '' s) := hs.image_denseRange' (fun x hx ↦ (hf x hx).hasMFDerivWithinAt) hd protected theorem UniqueMDiffWithinAt.preimage_partialHomeomorph (hs : UniqueMDiffWithinAt I s x) {e : PartialHomeomorph M M'} (he : e.MDifferentiable I I') (hx : x ∈ e.source) : UniqueMDiffWithinAt I' (e.target ∩ e.symm ⁻¹' s) (e x) := by rw [← e.image_source_inter_eq', inter_comm] exact (hs.inter (e.open_source.mem_nhds hx)).image_denseRange (he.mdifferentiableAt hx).hasMFDerivAt.hasMFDerivWithinAt (he.mfderiv_surjective hx).denseRange theorem UniqueMDiffOn.uniqueMDiffOn_preimage (hs : UniqueMDiffOn I s) {e : PartialHomeomorph M M'} (he : e.MDifferentiable I I') : UniqueMDiffOn I' (e.target ∩ e.symm ⁻¹' s) := fun _x hx ↦ e.right_inv hx.1 ▸ (hs _ hx.2).preimage_partialHomeomorph he (e.map_target hx.1) #align unique_mdiff_on.unique_mdiff_on_preimage UniqueMDiffOn.uniqueMDiffOn_preimage
Mathlib/Geometry/Manifold/MFDeriv/UniqueDifferential.lean
84
92
theorem UniqueMDiffOn.uniqueDiffOn_target_inter (hs : UniqueMDiffOn I s) (x : M) : UniqueDiffOn 𝕜 ((extChartAt I x).target ∩ (extChartAt I x).symm ⁻¹' s) := by
-- this is just a reformulation of `UniqueMDiffOn.uniqueMDiffOn_preimage`, using as `e` -- the local chart at `x`. apply UniqueMDiffOn.uniqueDiffOn rw [← PartialEquiv.image_source_inter_eq', inter_comm, extChartAt_source] exact (hs.inter (chartAt H x).open_source).image_denseRange' (fun y hy ↦ hasMFDerivWithinAt_extChartAt I hy.2) fun y hy ↦ ((mdifferentiable_chart _ _).mfderiv_surjective hy.2).denseRange
7
1,096.633158
2
2
4
2,009
import Mathlib.Geometry.Manifold.MFDeriv.Atlas noncomputable section open scoped Manifold open Set section UniqueMDiff variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [SmoothManifoldWithCorners I M] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H'] {I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M'] [SmoothManifoldWithCorners I' M'] {s : Set M} {x : M} theorem UniqueMDiffWithinAt.image_denseRange (hs : UniqueMDiffWithinAt I s x) {f : M → M'} {f' : E →L[𝕜] E'} (hf : HasMFDerivWithinAt I I' f s x f') (hd : DenseRange f') : UniqueMDiffWithinAt I' (f '' s) (f x) := by have := hs.inter' <| hf.1 (extChartAt_source_mem_nhds I' (f x)) refine (((hf.2.mono ?sub1).uniqueDiffWithinAt this hd).mono ?sub2).congr_pt ?pt case pt => simp only [mfld_simps] case sub1 => mfld_set_tac case sub2 => rintro _ ⟨y, ⟨⟨hys, hfy⟩, -⟩, rfl⟩ exact ⟨⟨_, hys, ((extChartAt I' (f x)).left_inv hfy).symm⟩, mem_range_self _⟩ theorem UniqueMDiffOn.image_denseRange' (hs : UniqueMDiffOn I s) {f : M → M'} {f' : M → E →L[𝕜] E'} (hf : ∀ x ∈ s, HasMFDerivWithinAt I I' f s x (f' x)) (hd : ∀ x ∈ s, DenseRange (f' x)) : UniqueMDiffOn I' (f '' s) := forall_mem_image.2 fun x hx ↦ (hs x hx).image_denseRange (hf x hx) (hd x hx) theorem UniqueMDiffOn.image_denseRange (hs : UniqueMDiffOn I s) {f : M → M'} (hf : MDifferentiableOn I I' f s) (hd : ∀ x ∈ s, DenseRange (mfderivWithin I I' f s x)) : UniqueMDiffOn I' (f '' s) := hs.image_denseRange' (fun x hx ↦ (hf x hx).hasMFDerivWithinAt) hd protected theorem UniqueMDiffWithinAt.preimage_partialHomeomorph (hs : UniqueMDiffWithinAt I s x) {e : PartialHomeomorph M M'} (he : e.MDifferentiable I I') (hx : x ∈ e.source) : UniqueMDiffWithinAt I' (e.target ∩ e.symm ⁻¹' s) (e x) := by rw [← e.image_source_inter_eq', inter_comm] exact (hs.inter (e.open_source.mem_nhds hx)).image_denseRange (he.mdifferentiableAt hx).hasMFDerivAt.hasMFDerivWithinAt (he.mfderiv_surjective hx).denseRange theorem UniqueMDiffOn.uniqueMDiffOn_preimage (hs : UniqueMDiffOn I s) {e : PartialHomeomorph M M'} (he : e.MDifferentiable I I') : UniqueMDiffOn I' (e.target ∩ e.symm ⁻¹' s) := fun _x hx ↦ e.right_inv hx.1 ▸ (hs _ hx.2).preimage_partialHomeomorph he (e.map_target hx.1) #align unique_mdiff_on.unique_mdiff_on_preimage UniqueMDiffOn.uniqueMDiffOn_preimage theorem UniqueMDiffOn.uniqueDiffOn_target_inter (hs : UniqueMDiffOn I s) (x : M) : UniqueDiffOn 𝕜 ((extChartAt I x).target ∩ (extChartAt I x).symm ⁻¹' s) := by -- this is just a reformulation of `UniqueMDiffOn.uniqueMDiffOn_preimage`, using as `e` -- the local chart at `x`. apply UniqueMDiffOn.uniqueDiffOn rw [← PartialEquiv.image_source_inter_eq', inter_comm, extChartAt_source] exact (hs.inter (chartAt H x).open_source).image_denseRange' (fun y hy ↦ hasMFDerivWithinAt_extChartAt I hy.2) fun y hy ↦ ((mdifferentiable_chart _ _).mfderiv_surjective hy.2).denseRange #align unique_mdiff_on.unique_diff_on_target_inter UniqueMDiffOn.uniqueDiffOn_target_inter
Mathlib/Geometry/Manifold/MFDeriv/UniqueDifferential.lean
98
107
theorem UniqueMDiffOn.uniqueDiffOn_inter_preimage (hs : UniqueMDiffOn I s) (x : M) (y : M') {f : M → M'} (hf : ContinuousOn f s) : UniqueDiffOn 𝕜 ((extChartAt I x).target ∩ (extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' y).source)) := haveI : UniqueMDiffOn I (s ∩ f ⁻¹' (extChartAt I' y).source) := by
intro z hz apply (hs z hz.1).inter' apply (hf z hz.1).preimage_mem_nhdsWithin exact (isOpen_extChartAt_source I' y).mem_nhds hz.2 this.uniqueDiffOn_target_inter _
5
148.413159
2
2
4
2,009
import Mathlib.Geometry.Manifold.MFDeriv.Atlas noncomputable section open scoped Manifold open Set section UniqueMDiff variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [SmoothManifoldWithCorners I M] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H'] {I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M'] [SmoothManifoldWithCorners I' M'] {s : Set M} {x : M} theorem UniqueMDiffWithinAt.image_denseRange (hs : UniqueMDiffWithinAt I s x) {f : M → M'} {f' : E →L[𝕜] E'} (hf : HasMFDerivWithinAt I I' f s x f') (hd : DenseRange f') : UniqueMDiffWithinAt I' (f '' s) (f x) := by have := hs.inter' <| hf.1 (extChartAt_source_mem_nhds I' (f x)) refine (((hf.2.mono ?sub1).uniqueDiffWithinAt this hd).mono ?sub2).congr_pt ?pt case pt => simp only [mfld_simps] case sub1 => mfld_set_tac case sub2 => rintro _ ⟨y, ⟨⟨hys, hfy⟩, -⟩, rfl⟩ exact ⟨⟨_, hys, ((extChartAt I' (f x)).left_inv hfy).symm⟩, mem_range_self _⟩ theorem UniqueMDiffOn.image_denseRange' (hs : UniqueMDiffOn I s) {f : M → M'} {f' : M → E →L[𝕜] E'} (hf : ∀ x ∈ s, HasMFDerivWithinAt I I' f s x (f' x)) (hd : ∀ x ∈ s, DenseRange (f' x)) : UniqueMDiffOn I' (f '' s) := forall_mem_image.2 fun x hx ↦ (hs x hx).image_denseRange (hf x hx) (hd x hx) theorem UniqueMDiffOn.image_denseRange (hs : UniqueMDiffOn I s) {f : M → M'} (hf : MDifferentiableOn I I' f s) (hd : ∀ x ∈ s, DenseRange (mfderivWithin I I' f s x)) : UniqueMDiffOn I' (f '' s) := hs.image_denseRange' (fun x hx ↦ (hf x hx).hasMFDerivWithinAt) hd protected theorem UniqueMDiffWithinAt.preimage_partialHomeomorph (hs : UniqueMDiffWithinAt I s x) {e : PartialHomeomorph M M'} (he : e.MDifferentiable I I') (hx : x ∈ e.source) : UniqueMDiffWithinAt I' (e.target ∩ e.symm ⁻¹' s) (e x) := by rw [← e.image_source_inter_eq', inter_comm] exact (hs.inter (e.open_source.mem_nhds hx)).image_denseRange (he.mdifferentiableAt hx).hasMFDerivAt.hasMFDerivWithinAt (he.mfderiv_surjective hx).denseRange theorem UniqueMDiffOn.uniqueMDiffOn_preimage (hs : UniqueMDiffOn I s) {e : PartialHomeomorph M M'} (he : e.MDifferentiable I I') : UniqueMDiffOn I' (e.target ∩ e.symm ⁻¹' s) := fun _x hx ↦ e.right_inv hx.1 ▸ (hs _ hx.2).preimage_partialHomeomorph he (e.map_target hx.1) #align unique_mdiff_on.unique_mdiff_on_preimage UniqueMDiffOn.uniqueMDiffOn_preimage theorem UniqueMDiffOn.uniqueDiffOn_target_inter (hs : UniqueMDiffOn I s) (x : M) : UniqueDiffOn 𝕜 ((extChartAt I x).target ∩ (extChartAt I x).symm ⁻¹' s) := by -- this is just a reformulation of `UniqueMDiffOn.uniqueMDiffOn_preimage`, using as `e` -- the local chart at `x`. apply UniqueMDiffOn.uniqueDiffOn rw [← PartialEquiv.image_source_inter_eq', inter_comm, extChartAt_source] exact (hs.inter (chartAt H x).open_source).image_denseRange' (fun y hy ↦ hasMFDerivWithinAt_extChartAt I hy.2) fun y hy ↦ ((mdifferentiable_chart _ _).mfderiv_surjective hy.2).denseRange #align unique_mdiff_on.unique_diff_on_target_inter UniqueMDiffOn.uniqueDiffOn_target_inter theorem UniqueMDiffOn.uniqueDiffOn_inter_preimage (hs : UniqueMDiffOn I s) (x : M) (y : M') {f : M → M'} (hf : ContinuousOn f s) : UniqueDiffOn 𝕜 ((extChartAt I x).target ∩ (extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' y).source)) := haveI : UniqueMDiffOn I (s ∩ f ⁻¹' (extChartAt I' y).source) := by intro z hz apply (hs z hz.1).inter' apply (hf z hz.1).preimage_mem_nhdsWithin exact (isOpen_extChartAt_source I' y).mem_nhds hz.2 this.uniqueDiffOn_target_inter _ #align unique_mdiff_on.unique_diff_on_inter_preimage UniqueMDiffOn.uniqueDiffOn_inter_preimage open Bundle variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] {Z : M → Type*} [TopologicalSpace (TotalSpace F Z)] [∀ b, TopologicalSpace (Z b)] [∀ b, AddCommMonoid (Z b)] [∀ b, Module 𝕜 (Z b)] [FiberBundle F Z] [VectorBundle 𝕜 F Z] [SmoothVectorBundle F Z I] theorem Trivialization.mdifferentiable (e : Trivialization F (π F Z)) [MemTrivializationAtlas e] : e.toPartialHomeomorph.MDifferentiable (I.prod 𝓘(𝕜, F)) (I.prod 𝓘(𝕜, F)) := ⟨(e.smoothOn I).mdifferentiableOn, (e.smoothOn_symm I).mdifferentiableOn⟩
Mathlib/Geometry/Manifold/MFDeriv/UniqueDifferential.lean
120
131
theorem UniqueMDiffWithinAt.smooth_bundle_preimage {p : TotalSpace F Z} (hs : UniqueMDiffWithinAt I s p.proj) : UniqueMDiffWithinAt (I.prod 𝓘(𝕜, F)) (π F Z ⁻¹' s) p := by
set e := trivializationAt F Z p.proj have hp : p ∈ e.source := FiberBundle.mem_trivializationAt_proj_source have : UniqueMDiffWithinAt (I.prod 𝓘(𝕜, F)) (s ×ˢ univ) (e p) := by rw [← Prod.mk.eta (p := e p), FiberBundle.trivializationAt_proj_fst] exact hs.prod (uniqueMDiffWithinAt_univ _) rw [← e.left_inv hp] refine (this.preimage_partialHomeomorph e.mdifferentiable.symm (e.map_source hp)).mono ?_ rintro y ⟨hy, hys, -⟩ rwa [PartialHomeomorph.symm_symm, e.coe_coe, e.coe_fst hy] at hys
9
8,103.083928
2
2
4
2,009
import Mathlib.Analysis.Calculus.FDeriv.Basic #align_import analysis.calculus.fderiv.comp from "leanprover-community/mathlib"@"e3fb84046afd187b710170887195d50bada934ee" open Filter Asymptotics ContinuousLinearMap Set Metric open scoped Classical open Topology NNReal Filter Asymptotics ENNReal noncomputable section section variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace 𝕜 G] variable {G' : Type*} [NormedAddCommGroup G'] [NormedSpace 𝕜 G'] variable {f f₀ f₁ g : E → F} variable {f' f₀' f₁' g' : E →L[𝕜] F} variable (e : E →L[𝕜] F) variable {x : E} variable {s t : Set E} variable {L L₁ L₂ : Filter E} section Composition variable (x)
Mathlib/Analysis/Calculus/FDeriv/Comp.lean
53
59
theorem HasFDerivAtFilter.comp {g : F → G} {g' : F →L[𝕜] G} {L' : Filter F} (hg : HasFDerivAtFilter g g' (f x) L') (hf : HasFDerivAtFilter f f' x L) (hL : Tendsto f L L') : HasFDerivAtFilter (g ∘ f) (g'.comp f') x L := by
let eq₁ := (g'.isBigO_comp _ _).trans_isLittleO hf.isLittleO let eq₂ := (hg.isLittleO.comp_tendsto hL).trans_isBigO hf.isBigO_sub refine .of_isLittleO <| eq₂.triangle <| eq₁.congr_left fun x' => ?_ simp
4
54.59815
2
2
1
2,010
import Mathlib.Topology.Algebra.UniformConvergence #align_import topology.algebra.equicontinuity from "leanprover-community/mathlib"@"01ad394a11bf06b950232720cf7e8fc6b22f0d6a" open Function open UniformConvergence @[to_additive]
Mathlib/Topology/Algebra/Equicontinuity.lean
20
31
theorem equicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [TopologicalSpace G] [UniformSpace M] [Group G] [Group M] [TopologicalGroup G] [UniformGroup M] [FunLike hom G M] [MonoidHomClass hom G M] (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) : Equicontinuous ((↑) ∘ F) := by
rw [equicontinuous_iff_continuous] rw [equicontinuousAt_iff_continuousAt] at hf let φ : G →* (ι →ᵤ M) := { toFun := swap ((↑) ∘ F) map_one' := by dsimp [UniformFun]; ext; exact map_one _ map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ } exact continuous_of_continuousAt_one φ hf
7
1,096.633158
2
2
2
2,011
import Mathlib.Topology.Algebra.UniformConvergence #align_import topology.algebra.equicontinuity from "leanprover-community/mathlib"@"01ad394a11bf06b950232720cf7e8fc6b22f0d6a" open Function open UniformConvergence @[to_additive] theorem equicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [TopologicalSpace G] [UniformSpace M] [Group G] [Group M] [TopologicalGroup G] [UniformGroup M] [FunLike hom G M] [MonoidHomClass hom G M] (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) : Equicontinuous ((↑) ∘ F) := by rw [equicontinuous_iff_continuous] rw [equicontinuousAt_iff_continuousAt] at hf let φ : G →* (ι →ᵤ M) := { toFun := swap ((↑) ∘ F) map_one' := by dsimp [UniformFun]; ext; exact map_one _ map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ } exact continuous_of_continuousAt_one φ hf #align equicontinuous_of_equicontinuous_at_one equicontinuous_of_equicontinuousAt_one #align equicontinuous_of_equicontinuous_at_zero equicontinuous_of_equicontinuousAt_zero @[to_additive]
Mathlib/Topology/Algebra/Equicontinuity.lean
36
47
theorem uniformEquicontinuous_of_equicontinuousAt_one {ι G M hom : Type*} [UniformSpace G] [UniformSpace M] [Group G] [Group M] [UniformGroup G] [UniformGroup M] [FunLike hom G M] [MonoidHomClass hom G M] (F : ι → hom) (hf : EquicontinuousAt ((↑) ∘ F) (1 : G)) : UniformEquicontinuous ((↑) ∘ F) := by
rw [uniformEquicontinuous_iff_uniformContinuous] rw [equicontinuousAt_iff_continuousAt] at hf let φ : G →* (ι →ᵤ M) := { toFun := swap ((↑) ∘ F) map_one' := by dsimp [UniformFun]; ext; exact map_one _ map_mul' := fun a b => by dsimp [UniformFun]; ext; exact map_mul _ _ _ } exact uniformContinuous_of_continuousAt_one φ hf
7
1,096.633158
2
2
2
2,011
import Mathlib.Order.Interval.Set.Disjoint import Mathlib.Order.SuccPred.Basic #align_import data.set.intervals.monotone from "leanprover-community/mathlib"@"4d06b17aea8cf2e220f0b0aa46cd0231593c5c97" open Set section SuccOrder open Order variable {α β : Type*} [PartialOrder α]
Mathlib/Order/Interval/Set/Monotone.lean
203
218
theorem StrictMonoOn.Iic_id_le [SuccOrder α] [IsSuccArchimedean α] [OrderBot α] {n : α} {φ : α → α} (hφ : StrictMonoOn φ (Set.Iic n)) : ∀ m ≤ n, m ≤ φ m := by
revert hφ refine Succ.rec_bot (fun n => StrictMonoOn φ (Set.Iic n) → ∀ m ≤ n, m ≤ φ m) (fun _ _ hm => hm.trans bot_le) ?_ _ rintro k ih hφ m hm by_cases hk : IsMax k · rw [succ_eq_iff_isMax.2 hk] at hm exact ih (hφ.mono <| Iic_subset_Iic.2 (le_succ _)) _ hm obtain rfl | h := le_succ_iff_eq_or_le.1 hm · specialize ih (StrictMonoOn.mono hφ fun x hx => le_trans hx (le_succ _)) k le_rfl refine le_trans (succ_mono ih) (succ_le_of_lt (hφ (le_succ _) le_rfl ?_)) rw [lt_succ_iff_eq_or_lt_of_not_isMax hk] exact Or.inl rfl · exact ih (StrictMonoOn.mono hφ fun x hx => le_trans hx (le_succ _)) _ h
14
1,202,604.284165
2
2
2
2,012
import Mathlib.Order.Interval.Set.Disjoint import Mathlib.Order.SuccPred.Basic #align_import data.set.intervals.monotone from "leanprover-community/mathlib"@"4d06b17aea8cf2e220f0b0aa46cd0231593c5c97" open Set section SuccOrder open Order variable {α β : Type*} [PartialOrder α] theorem StrictMonoOn.Iic_id_le [SuccOrder α] [IsSuccArchimedean α] [OrderBot α] {n : α} {φ : α → α} (hφ : StrictMonoOn φ (Set.Iic n)) : ∀ m ≤ n, m ≤ φ m := by revert hφ refine Succ.rec_bot (fun n => StrictMonoOn φ (Set.Iic n) → ∀ m ≤ n, m ≤ φ m) (fun _ _ hm => hm.trans bot_le) ?_ _ rintro k ih hφ m hm by_cases hk : IsMax k · rw [succ_eq_iff_isMax.2 hk] at hm exact ih (hφ.mono <| Iic_subset_Iic.2 (le_succ _)) _ hm obtain rfl | h := le_succ_iff_eq_or_le.1 hm · specialize ih (StrictMonoOn.mono hφ fun x hx => le_trans hx (le_succ _)) k le_rfl refine le_trans (succ_mono ih) (succ_le_of_lt (hφ (le_succ _) le_rfl ?_)) rw [lt_succ_iff_eq_or_lt_of_not_isMax hk] exact Or.inl rfl · exact ih (StrictMonoOn.mono hφ fun x hx => le_trans hx (le_succ _)) _ h #align strict_mono_on.Iic_id_le StrictMonoOn.Iic_id_le theorem StrictMonoOn.Ici_le_id [PredOrder α] [IsPredArchimedean α] [OrderTop α] {n : α} {φ : α → α} (hφ : StrictMonoOn φ (Set.Ici n)) : ∀ m, n ≤ m → φ m ≤ m := StrictMonoOn.Iic_id_le (α := αᵒᵈ) fun _ hi _ hj hij => hφ hj hi hij #align strict_mono_on.Ici_le_id StrictMonoOn.Ici_le_id variable [Preorder β] {ψ : α → β}
Mathlib/Order/Interval/Set/Monotone.lean
230
253
theorem strictMonoOn_Iic_of_lt_succ [SuccOrder α] [IsSuccArchimedean α] {n : α} (hψ : ∀ m, m < n → ψ m < ψ (succ m)) : StrictMonoOn ψ (Set.Iic n) := by
intro x hx y hy hxy obtain ⟨i, rfl⟩ := hxy.le.exists_succ_iterate induction' i with k ih · simp at hxy cases' k with k · exact hψ _ (lt_of_lt_of_le hxy hy) rw [Set.mem_Iic] at * simp only [Function.iterate_succ', Function.comp_apply] at ih hxy hy ⊢ by_cases hmax : IsMax (succ^[k] x) · rw [succ_eq_iff_isMax.2 hmax] at hxy ⊢ exact ih (le_trans (le_succ _) hy) hxy by_cases hmax' : IsMax (succ (succ^[k] x)) · rw [succ_eq_iff_isMax.2 hmax'] at hxy ⊢ exact ih (le_trans (le_succ _) hy) hxy refine lt_trans (ih (le_trans (le_succ _) hy) (lt_of_le_of_lt (le_succ_iterate k _) (lt_succ_iff_not_isMax.2 hmax))) ?_ rw [← Function.comp_apply (f := succ), ← Function.iterate_succ'] refine hψ _ (lt_of_lt_of_le ?_ hy) rwa [Function.iterate_succ', Function.comp_apply, lt_succ_iff_not_isMax]
22
3,584,912,846.131591
2
2
2
2,012
import Mathlib.Order.Interval.Set.OrderEmbedding import Mathlib.Order.Antichain import Mathlib.Order.SetNotation #align_import data.set.intervals.ord_connected from "leanprover-community/mathlib"@"76de8ae01554c3b37d66544866659ff174e66e1f" open scoped Interval open Set open OrderDual (toDual ofDual) namespace Set section Preorder variable {α β : Type*} [Preorder α] [Preorder β] {s t : Set α} class OrdConnected (s : Set α) : Prop where out' ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) : Icc x y ⊆ s #align set.ord_connected Set.OrdConnected theorem OrdConnected.out (h : OrdConnected s) : ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), Icc x y ⊆ s := h.1 #align set.ord_connected.out Set.OrdConnected.out theorem ordConnected_def : OrdConnected s ↔ ∀ ⦃x⦄ (_ : x ∈ s) ⦃y⦄ (_ : y ∈ s), Icc x y ⊆ s := ⟨fun h => h.1, fun h => ⟨h⟩⟩ #align set.ord_connected_def Set.ordConnected_def theorem ordConnected_iff : OrdConnected s ↔ ∀ x ∈ s, ∀ y ∈ s, x ≤ y → Icc x y ⊆ s := ordConnected_def.trans ⟨fun hs _ hx _ hy _ => hs hx hy, fun H x hx y hy _ hz => H x hx y hy (le_trans hz.1 hz.2) hz⟩ #align set.ord_connected_iff Set.ordConnected_iff
Mathlib/Order/Interval/Set/OrdConnected.lean
57
63
theorem ordConnected_of_Ioo {α : Type*} [PartialOrder α] {s : Set α} (hs : ∀ x ∈ s, ∀ y ∈ s, x < y → Ioo x y ⊆ s) : OrdConnected s := by
rw [ordConnected_iff] intro x hx y hy hxy rcases eq_or_lt_of_le hxy with (rfl | hxy'); · simpa rw [← Ioc_insert_left hxy, ← Ioo_insert_right hxy'] exact insert_subset_iff.2 ⟨hx, insert_subset_iff.2 ⟨hy, hs x hx y hy hxy'⟩⟩
5
148.413159
2
2
1
2,013
import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Asymptotics.SpecificAsymptotics import Mathlib.Analysis.Complex.CauchyIntegral #align_import analysis.complex.removable_singularity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open TopologicalSpace Metric Set Filter Asymptotics Function open scoped Topology Filter NNReal Real universe u variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] namespace Complex
Mathlib/Analysis/Complex/RemovableSingularity.lean
34
43
theorem analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt {f : ℂ → E} {c : ℂ} (hd : ∀ᶠ z in 𝓝[≠] c, DifferentiableAt ℂ f z) (hc : ContinuousAt f c) : AnalyticAt ℂ f c := by
rcases (nhdsWithin_hasBasis nhds_basis_closedBall _).mem_iff.1 hd with ⟨R, hR0, hRs⟩ lift R to ℝ≥0 using hR0.le replace hc : ContinuousOn f (closedBall c R) := by refine fun z hz => ContinuousAt.continuousWithinAt ?_ rcases eq_or_ne z c with (rfl | hne) exacts [hc, (hRs ⟨hz, hne⟩).continuousAt] exact (hasFPowerSeriesOnBall_of_differentiable_off_countable (countable_singleton c) hc (fun z hz => hRs (diff_subset_diff_left ball_subset_closedBall hz)) hR0).analyticAt
8
2,980.957987
2
2
3
2,014
import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Asymptotics.SpecificAsymptotics import Mathlib.Analysis.Complex.CauchyIntegral #align_import analysis.complex.removable_singularity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open TopologicalSpace Metric Set Filter Asymptotics Function open scoped Topology Filter NNReal Real universe u variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] namespace Complex theorem analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt {f : ℂ → E} {c : ℂ} (hd : ∀ᶠ z in 𝓝[≠] c, DifferentiableAt ℂ f z) (hc : ContinuousAt f c) : AnalyticAt ℂ f c := by rcases (nhdsWithin_hasBasis nhds_basis_closedBall _).mem_iff.1 hd with ⟨R, hR0, hRs⟩ lift R to ℝ≥0 using hR0.le replace hc : ContinuousOn f (closedBall c R) := by refine fun z hz => ContinuousAt.continuousWithinAt ?_ rcases eq_or_ne z c with (rfl | hne) exacts [hc, (hRs ⟨hz, hne⟩).continuousAt] exact (hasFPowerSeriesOnBall_of_differentiable_off_countable (countable_singleton c) hc (fun z hz => hRs (diff_subset_diff_left ball_subset_closedBall hz)) hR0).analyticAt #align complex.analytic_at_of_differentiable_on_punctured_nhds_of_continuous_at Complex.analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt
Mathlib/Analysis/Complex/RemovableSingularity.lean
46
57
theorem differentiableOn_compl_singleton_and_continuousAt_iff {f : ℂ → E} {s : Set ℂ} {c : ℂ} (hs : s ∈ 𝓝 c) : DifferentiableOn ℂ f (s \ {c}) ∧ ContinuousAt f c ↔ DifferentiableOn ℂ f s := by
refine ⟨?_, fun hd => ⟨hd.mono diff_subset, (hd.differentiableAt hs).continuousAt⟩⟩ rintro ⟨hd, hc⟩ x hx rcases eq_or_ne x c with (rfl | hne) · refine (analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt ?_ hc).differentiableAt.differentiableWithinAt refine eventually_nhdsWithin_iff.2 ((eventually_mem_nhds.2 hs).mono fun z hz hzx => ?_) exact hd.differentiableAt (inter_mem hz (isOpen_ne.mem_nhds hzx)) · simpa only [DifferentiableWithinAt, HasFDerivWithinAt, hne.nhdsWithin_diff_singleton] using hd x ⟨hx, hne⟩
9
8,103.083928
2
2
3
2,014
import Mathlib.Analysis.Calculus.FDeriv.Analytic import Mathlib.Analysis.Asymptotics.SpecificAsymptotics import Mathlib.Analysis.Complex.CauchyIntegral #align_import analysis.complex.removable_singularity from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open TopologicalSpace Metric Set Filter Asymptotics Function open scoped Topology Filter NNReal Real universe u variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] namespace Complex theorem analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt {f : ℂ → E} {c : ℂ} (hd : ∀ᶠ z in 𝓝[≠] c, DifferentiableAt ℂ f z) (hc : ContinuousAt f c) : AnalyticAt ℂ f c := by rcases (nhdsWithin_hasBasis nhds_basis_closedBall _).mem_iff.1 hd with ⟨R, hR0, hRs⟩ lift R to ℝ≥0 using hR0.le replace hc : ContinuousOn f (closedBall c R) := by refine fun z hz => ContinuousAt.continuousWithinAt ?_ rcases eq_or_ne z c with (rfl | hne) exacts [hc, (hRs ⟨hz, hne⟩).continuousAt] exact (hasFPowerSeriesOnBall_of_differentiable_off_countable (countable_singleton c) hc (fun z hz => hRs (diff_subset_diff_left ball_subset_closedBall hz)) hR0).analyticAt #align complex.analytic_at_of_differentiable_on_punctured_nhds_of_continuous_at Complex.analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt theorem differentiableOn_compl_singleton_and_continuousAt_iff {f : ℂ → E} {s : Set ℂ} {c : ℂ} (hs : s ∈ 𝓝 c) : DifferentiableOn ℂ f (s \ {c}) ∧ ContinuousAt f c ↔ DifferentiableOn ℂ f s := by refine ⟨?_, fun hd => ⟨hd.mono diff_subset, (hd.differentiableAt hs).continuousAt⟩⟩ rintro ⟨hd, hc⟩ x hx rcases eq_or_ne x c with (rfl | hne) · refine (analyticAt_of_differentiable_on_punctured_nhds_of_continuousAt ?_ hc).differentiableAt.differentiableWithinAt refine eventually_nhdsWithin_iff.2 ((eventually_mem_nhds.2 hs).mono fun z hz hzx => ?_) exact hd.differentiableAt (inter_mem hz (isOpen_ne.mem_nhds hzx)) · simpa only [DifferentiableWithinAt, HasFDerivWithinAt, hne.nhdsWithin_diff_singleton] using hd x ⟨hx, hne⟩ #align complex.differentiable_on_compl_singleton_and_continuous_at_iff Complex.differentiableOn_compl_singleton_and_continuousAt_iff theorem differentiableOn_dslope {f : ℂ → E} {s : Set ℂ} {c : ℂ} (hc : s ∈ 𝓝 c) : DifferentiableOn ℂ (dslope f c) s ↔ DifferentiableOn ℂ f s := ⟨fun h => h.of_dslope, fun h => (differentiableOn_compl_singleton_and_continuousAt_iff hc).mp <| ⟨Iff.mpr (differentiableOn_dslope_of_nmem fun h => h.2 rfl) (h.mono diff_subset), continuousAt_dslope_same.2 <| h.differentiableAt hc⟩⟩ #align complex.differentiable_on_dslope Complex.differentiableOn_dslope
Mathlib/Analysis/Complex/RemovableSingularity.lean
71
87
theorem differentiableOn_update_limUnder_of_isLittleO {f : ℂ → E} {s : Set ℂ} {c : ℂ} (hc : s ∈ 𝓝 c) (hd : DifferentiableOn ℂ f (s \ {c})) (ho : (fun z => f z - f c) =o[𝓝[≠] c] fun z => (z - c)⁻¹) : DifferentiableOn ℂ (update f c (limUnder (𝓝[≠] c) f)) s := by
set F : ℂ → E := fun z => (z - c) • f z suffices DifferentiableOn ℂ F (s \ {c}) ∧ ContinuousAt F c by rw [differentiableOn_compl_singleton_and_continuousAt_iff hc, ← differentiableOn_dslope hc, dslope_sub_smul] at this have hc : Tendsto f (𝓝[≠] c) (𝓝 (deriv F c)) := continuousAt_update_same.mp (this.continuousOn.continuousAt hc) rwa [hc.limUnder_eq] refine ⟨(differentiableOn_id.sub_const _).smul hd, ?_⟩ rw [← continuousWithinAt_compl_self] have H := ho.tendsto_inv_smul_nhds_zero have H' : Tendsto (fun z => (z - c) • f c) (𝓝[≠] c) (𝓝 (F c)) := (continuousWithinAt_id.tendsto.sub tendsto_const_nhds).smul tendsto_const_nhds simpa [← smul_add, ContinuousWithinAt] using H.add H'
13
442,413.392009
2
2
3
2,014
import Mathlib.NumberTheory.ModularForms.SlashInvariantForms import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups noncomputable section open ModularForm UpperHalfPlane Complex Matrix open scoped MatrixGroups namespace EisensteinSeries variable (N : ℕ) (a : Fin 2 → ZMod N) variable {N a} section eisSummand def eisSummand (k : ℤ) (v : Fin 2 → ℤ) (z : ℍ) : ℂ := 1 / (v 0 * z.1 + v 1) ^ k
Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean
92
100
theorem eisSummand_SL2_apply (k : ℤ) (i : (Fin 2 → ℤ)) (A : SL(2, ℤ)) (z : ℍ) : eisSummand k i (A • z) = (z.denom A) ^ k * eisSummand k (i ᵥ* A) z := by
simp only [eisSummand, specialLinearGroup_apply, algebraMap_int_eq, eq_intCast, ofReal_intCast, one_div, vecMul, vec2_dotProduct, Int.cast_add, Int.cast_mul] have h (a b c d u v : ℂ) (hc : c * z + d ≠ 0) : ((u * ((a * z + b) / (c * z + d)) + v) ^ k)⁻¹ = (c * z + d) ^ k * (((u * a + v * c) * z + (u * b + v * d)) ^ k)⁻¹ := by field_simp [hc] ring_nf apply h (hc := z.denom_ne_zero A)
7
1,096.633158
2
2
1
2,015
import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.RingTheory.Ideal.Basic import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.euclidean_domain from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" section open EuclideanDomain Set Ideal section GCDMonoid variable {R : Type*} [EuclideanDomain R] [GCDMonoid R] {p q : R} theorem gcd_ne_zero_of_left (hp : p ≠ 0) : GCDMonoid.gcd p q ≠ 0 := fun h => hp <| eq_zero_of_zero_dvd (h ▸ gcd_dvd_left p q) #align gcd_ne_zero_of_left gcd_ne_zero_of_left theorem gcd_ne_zero_of_right (hp : q ≠ 0) : GCDMonoid.gcd p q ≠ 0 := fun h => hp <| eq_zero_of_zero_dvd (h ▸ gcd_dvd_right p q) #align gcd_ne_zero_of_right gcd_ne_zero_of_right
Mathlib/RingTheory/EuclideanDomain.lean
42
47
theorem left_div_gcd_ne_zero {p q : R} (hp : p ≠ 0) : p / GCDMonoid.gcd p q ≠ 0 := by
obtain ⟨r, hr⟩ := GCDMonoid.gcd_dvd_left p q obtain ⟨pq0, r0⟩ : GCDMonoid.gcd p q ≠ 0 ∧ r ≠ 0 := mul_ne_zero_iff.mp (hr ▸ hp) nth_rw 1 [hr] rw [mul_comm, mul_div_cancel_right₀ _ pq0] exact r0
5
148.413159
2
2
2
2,016
import Mathlib.Algebra.GCDMonoid.Basic import Mathlib.Algebra.EuclideanDomain.Basic import Mathlib.RingTheory.Ideal.Basic import Mathlib.RingTheory.PrincipalIdealDomain #align_import ring_theory.euclidean_domain from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" section open EuclideanDomain Set Ideal section GCDMonoid variable {R : Type*} [EuclideanDomain R] [GCDMonoid R] {p q : R} theorem gcd_ne_zero_of_left (hp : p ≠ 0) : GCDMonoid.gcd p q ≠ 0 := fun h => hp <| eq_zero_of_zero_dvd (h ▸ gcd_dvd_left p q) #align gcd_ne_zero_of_left gcd_ne_zero_of_left theorem gcd_ne_zero_of_right (hp : q ≠ 0) : GCDMonoid.gcd p q ≠ 0 := fun h => hp <| eq_zero_of_zero_dvd (h ▸ gcd_dvd_right p q) #align gcd_ne_zero_of_right gcd_ne_zero_of_right theorem left_div_gcd_ne_zero {p q : R} (hp : p ≠ 0) : p / GCDMonoid.gcd p q ≠ 0 := by obtain ⟨r, hr⟩ := GCDMonoid.gcd_dvd_left p q obtain ⟨pq0, r0⟩ : GCDMonoid.gcd p q ≠ 0 ∧ r ≠ 0 := mul_ne_zero_iff.mp (hr ▸ hp) nth_rw 1 [hr] rw [mul_comm, mul_div_cancel_right₀ _ pq0] exact r0 #align left_div_gcd_ne_zero left_div_gcd_ne_zero
Mathlib/RingTheory/EuclideanDomain.lean
50
55
theorem right_div_gcd_ne_zero {p q : R} (hq : q ≠ 0) : q / GCDMonoid.gcd p q ≠ 0 := by
obtain ⟨r, hr⟩ := GCDMonoid.gcd_dvd_right p q obtain ⟨pq0, r0⟩ : GCDMonoid.gcd p q ≠ 0 ∧ r ≠ 0 := mul_ne_zero_iff.mp (hr ▸ hq) nth_rw 1 [hr] rw [mul_comm, mul_div_cancel_right₀ _ pq0] exact r0
5
148.413159
2
2
2
2,016