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.GroupTheory.OrderOfElement import Mathlib.RingTheory.Ideal.Maps import Mathlib.RingTheory.Ideal.Quotient #align_import algebra.char_p.quotient from "leanprover-community/mathlib"@"85e3c05a94b27c84dc6f234cf88326d5e0096ec3" universe u v
Mathlib/Algebra/CharP/Quotient.lean
60
66
theorem Ideal.Quotient.index_eq_zero {R : Type*} [CommRing R] (I : Ideal R) : (↑I.toAddSubgroup.index : R β§Έ I) = 0 := by
rw [AddSubgroup.index, Nat.card_eq] split_ifs with hq; swap Β· simp letI : Fintype (R β§Έ I) := @Fintype.ofFinite _ hq exact Nat.cast_card_eq_zero (R β§Έ I)
5
148.413159
2
1
3
970
import Mathlib.Analysis.NormedSpace.Banach import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Topology.PartialHomeomorph #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable 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 {Ξ΅ : ℝ} open Filter Metric Set open ContinuousLinearMap (id) def ApproximatesLinearOn (f : E β†’ F) (f' : E β†’L[π•œ] F) (s : Set E) (c : ℝβ‰₯0) : Prop := βˆ€ x ∈ s, βˆ€ y ∈ s, β€–f x - f y - f' (x - y)β€– ≀ c * β€–x - yβ€– #align approximates_linear_on ApproximatesLinearOn @[simp]
Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
76
77
theorem approximatesLinearOn_empty (f : E β†’ F) (f' : E β†’L[π•œ] F) (c : ℝβ‰₯0) : ApproximatesLinearOn f f' βˆ… c := by
simp [ApproximatesLinearOn]
1
2.718282
0
1
3
971
import Mathlib.Analysis.NormedSpace.Banach import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Topology.PartialHomeomorph #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable 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 {Ξ΅ : ℝ} open Filter Metric Set open ContinuousLinearMap (id) def ApproximatesLinearOn (f : E β†’ F) (f' : E β†’L[π•œ] F) (s : Set E) (c : ℝβ‰₯0) : Prop := βˆ€ x ∈ s, βˆ€ y ∈ s, β€–f x - f y - f' (x - y)β€– ≀ c * β€–x - yβ€– #align approximates_linear_on ApproximatesLinearOn @[simp] theorem approximatesLinearOn_empty (f : E β†’ F) (f' : E β†’L[π•œ] F) (c : ℝβ‰₯0) : ApproximatesLinearOn f f' βˆ… c := by simp [ApproximatesLinearOn] #align approximates_linear_on_empty approximatesLinearOn_empty namespace ApproximatesLinearOn variable [CompleteSpace E] {f : E β†’ F} section variable {f' : E β†’L[π•œ] F} {s t : Set E} {c c' : ℝβ‰₯0} theorem mono_num (hc : c ≀ c') (hf : ApproximatesLinearOn f f' s c) : ApproximatesLinearOn f f' s c' := fun x hx y hy => le_trans (hf x hx y hy) (mul_le_mul_of_nonneg_right hc <| norm_nonneg _) #align approximates_linear_on.mono_num ApproximatesLinearOn.mono_num theorem mono_set (hst : s βŠ† t) (hf : ApproximatesLinearOn f f' t c) : ApproximatesLinearOn f f' s c := fun x hx y hy => hf x (hst hx) y (hst hy) #align approximates_linear_on.mono_set ApproximatesLinearOn.mono_set
Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
101
105
theorem approximatesLinearOn_iff_lipschitzOnWith {f : E β†’ F} {f' : E β†’L[π•œ] F} {s : Set E} {c : ℝβ‰₯0} : ApproximatesLinearOn f f' s c ↔ LipschitzOnWith c (f - ⇑f') s := by
have : βˆ€ x y, f x - f y - f' (x - y) = (f - f') x - (f - f') y := fun x y ↦ by simp only [map_sub, Pi.sub_apply]; abel simp only [this, lipschitzOnWith_iff_norm_sub_le, ApproximatesLinearOn]
3
20.085537
1
1
3
971
import Mathlib.Analysis.NormedSpace.Banach import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Topology.PartialHomeomorph #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topology Classical NNReal noncomputable 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 {Ξ΅ : ℝ} open Filter Metric Set open ContinuousLinearMap (id) def ApproximatesLinearOn (f : E β†’ F) (f' : E β†’L[π•œ] F) (s : Set E) (c : ℝβ‰₯0) : Prop := βˆ€ x ∈ s, βˆ€ y ∈ s, β€–f x - f y - f' (x - y)β€– ≀ c * β€–x - yβ€– #align approximates_linear_on ApproximatesLinearOn @[simp] theorem approximatesLinearOn_empty (f : E β†’ F) (f' : E β†’L[π•œ] F) (c : ℝβ‰₯0) : ApproximatesLinearOn f f' βˆ… c := by simp [ApproximatesLinearOn] #align approximates_linear_on_empty approximatesLinearOn_empty namespace ApproximatesLinearOn variable [CompleteSpace E] {f : E β†’ F} section variable {f' : E β†’L[π•œ] F} {s t : Set E} {c c' : ℝβ‰₯0} theorem mono_num (hc : c ≀ c') (hf : ApproximatesLinearOn f f' s c) : ApproximatesLinearOn f f' s c' := fun x hx y hy => le_trans (hf x hx y hy) (mul_le_mul_of_nonneg_right hc <| norm_nonneg _) #align approximates_linear_on.mono_num ApproximatesLinearOn.mono_num theorem mono_set (hst : s βŠ† t) (hf : ApproximatesLinearOn f f' t c) : ApproximatesLinearOn f f' s c := fun x hx y hy => hf x (hst hx) y (hst hy) #align approximates_linear_on.mono_set ApproximatesLinearOn.mono_set theorem approximatesLinearOn_iff_lipschitzOnWith {f : E β†’ F} {f' : E β†’L[π•œ] F} {s : Set E} {c : ℝβ‰₯0} : ApproximatesLinearOn f f' s c ↔ LipschitzOnWith c (f - ⇑f') s := by have : βˆ€ x y, f x - f y - f' (x - y) = (f - f') x - (f - f') y := fun x y ↦ by simp only [map_sub, Pi.sub_apply]; abel simp only [this, lipschitzOnWith_iff_norm_sub_le, ApproximatesLinearOn] #align approximates_linear_on.approximates_linear_on_iff_lipschitz_on_with ApproximatesLinearOn.approximatesLinearOn_iff_lipschitzOnWith alias ⟨lipschitzOnWith, _root_.LipschitzOnWith.approximatesLinearOn⟩ := approximatesLinearOn_iff_lipschitzOnWith #align approximates_linear_on.lipschitz_on_with ApproximatesLinearOn.lipschitzOnWith #align lipschitz_on_with.approximates_linear_on LipschitzOnWith.approximatesLinearOn theorem lipschitz_sub (hf : ApproximatesLinearOn f f' s c) : LipschitzWith c fun x : s => f x - f' x := hf.lipschitzOnWith.to_restrict #align approximates_linear_on.lipschitz_sub ApproximatesLinearOn.lipschitz_sub protected theorem lipschitz (hf : ApproximatesLinearOn f f' s c) : LipschitzWith (β€–f'β€–β‚Š + c) (s.restrict f) := by simpa only [restrict_apply, add_sub_cancel] using (f'.lipschitz.restrict s).add hf.lipschitz_sub #align approximates_linear_on.lipschitz ApproximatesLinearOn.lipschitz protected theorem continuous (hf : ApproximatesLinearOn f f' s c) : Continuous (s.restrict f) := hf.lipschitz.continuous #align approximates_linear_on.continuous ApproximatesLinearOn.continuous protected theorem continuousOn (hf : ApproximatesLinearOn f f' s c) : ContinuousOn f s := continuousOn_iff_continuous_restrict.2 hf.continuous #align approximates_linear_on.continuous_on ApproximatesLinearOn.continuousOn end section LocallyOnto variable {s : Set E} {c : ℝβ‰₯0} {f' : E β†’L[π•œ] F}
Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
148
280
theorem surjOn_closedBall_of_nonlinearRightInverse (hf : ApproximatesLinearOn f f' s c) (f'symm : f'.NonlinearRightInverse) {Ξ΅ : ℝ} {b : E} (Ξ΅0 : 0 ≀ Ξ΅) (hΞ΅ : closedBall b Ξ΅ βŠ† s) : SurjOn f (closedBall b Ξ΅) (closedBall (f b) (((f'symm.nnnorm : ℝ)⁻¹ - c) * Ξ΅)) := by
intro y hy rcases le_or_lt (f'symm.nnnorm : ℝ)⁻¹ c with hc | hc Β· refine ⟨b, by simp [Ξ΅0], ?_⟩ have : dist y (f b) ≀ 0 := (mem_closedBall.1 hy).trans (mul_nonpos_of_nonpos_of_nonneg (by linarith) Ξ΅0) simp only [dist_le_zero] at this rw [this] have If' : (0 : ℝ) < f'symm.nnnorm := by rw [← inv_pos]; exact (NNReal.coe_nonneg _).trans_lt hc have Icf' : (c : ℝ) * f'symm.nnnorm < 1 := by rwa [inv_eq_one_div, lt_div_iff If'] at hc have Jf' : (f'symm.nnnorm : ℝ) β‰  0 := ne_of_gt If' have Jcf' : (1 : ℝ) - c * f'symm.nnnorm β‰  0 := by apply ne_of_gt; linarith /- We have to show that `y` can be written as `f x` for some `x ∈ closedBall b Ξ΅`. The idea of the proof is to apply the Banach contraction principle to the map `g : x ↦ x + f'symm (y - f x)`, as a fixed point of this map satisfies `f x = y`. When `f'symm` is a genuine linear inverse, `g` is a contracting map. In our case, since `f'symm` is nonlinear, this map is not contracting (it is not even continuous), but still the proof of the contraction theorem holds: `uβ‚™ = gⁿ b` is a Cauchy sequence, converging exponentially fast to the desired point `x`. Instead of appealing to general results, we check this by hand. The main point is that `f (u n)` becomes exponentially close to `y`, and therefore `dist (u (n+1)) (u n)` becomes exponentally small, making it possible to get an inductive bound on `dist (u n) b`, from which one checks that `u n` stays in the ball on which one has a control. Therefore, the bound can be checked at the next step, and so on inductively. -/ set g := fun x => x + f'symm (y - f x) with hg set u := fun n : β„• => g^[n] b with hu have usucc : βˆ€ n, u (n + 1) = g (u n) := by simp [hu, ← iterate_succ_apply' g _ b] -- First bound: if `f z` is close to `y`, then `g z` is close to `z` (i.e., almost a fixed point). have A : βˆ€ z, dist (g z) z ≀ f'symm.nnnorm * dist (f z) y := by intro z rw [dist_eq_norm, hg, add_sub_cancel_left, dist_eq_norm'] exact f'symm.bound _ -- Second bound: if `z` and `g z` are in the set with good control, then `f (g z)` becomes closer -- to `y` than `f z` was (this uses the linear approximation property, and is the reason for the -- choice of the formula for `g`). have B : βˆ€ z ∈ closedBall b Ξ΅, g z ∈ closedBall b Ξ΅ β†’ dist (f (g z)) y ≀ c * f'symm.nnnorm * dist (f z) y := by intro z hz hgz set v := f'symm (y - f z) calc dist (f (g z)) y = β€–f (z + v) - yβ€– := by rw [dist_eq_norm] _ = β€–f (z + v) - f z - f' v + f' v - (y - f z)β€– := by congr 1; abel _ = β€–f (z + v) - f z - f' (z + v - z)β€– := by simp only [v, ContinuousLinearMap.NonlinearRightInverse.right_inv, add_sub_cancel_left, sub_add_cancel] _ ≀ c * β€–z + v - zβ€– := hf _ (hΞ΅ hgz) _ (hΞ΅ hz) _ ≀ c * (f'symm.nnnorm * dist (f z) y) := by gcongr simpa [dist_eq_norm'] using f'symm.bound (y - f z) _ = c * f'symm.nnnorm * dist (f z) y := by ring -- Third bound: a complicated bound on `dist w b` (that will show up in the induction) is enough -- to check that `w` is in the ball on which one has controls. Will be used to check that `u n` -- belongs to this ball for all `n`. have C : βˆ€ (n : β„•) (w : E), dist w b ≀ f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) / (1 - c * f'symm.nnnorm) * dist (f b) y β†’ w ∈ closedBall b Ξ΅ := fun n w hw ↦ by apply hw.trans rw [div_mul_eq_mul_div, div_le_iff]; swap; Β· linarith calc (f'symm.nnnorm : ℝ) * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) * dist (f b) y = f'symm.nnnorm * dist (f b) y * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) := by ring _ ≀ f'symm.nnnorm * dist (f b) y * 1 := by gcongr rw [sub_le_self_iff] positivity _ ≀ f'symm.nnnorm * (((f'symm.nnnorm : ℝ)⁻¹ - c) * Ξ΅) := by rw [mul_one] gcongr exact mem_closedBall'.1 hy _ = Ξ΅ * (1 - c * f'symm.nnnorm) := by field_simp; ring /- Main inductive control: `f (u n)` becomes exponentially close to `y`, and therefore `dist (u (n+1)) (u n)` becomes exponentally small, making it possible to get an inductive bound on `dist (u n) b`, from which one checks that `u n` remains in the ball on which we have estimates. -/ have D : βˆ€ n : β„•, dist (f (u n)) y ≀ ((c : ℝ) * f'symm.nnnorm) ^ n * dist (f b) y ∧ dist (u n) b ≀ f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) / (1 - (c : ℝ) * f'symm.nnnorm) * dist (f b) y := fun n ↦ by induction' n with n IH; Β· simp [hu, le_refl] rw [usucc] have Ign : dist (g (u n)) b ≀ f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n.succ) / (1 - c * f'symm.nnnorm) * dist (f b) y := calc dist (g (u n)) b ≀ dist (g (u n)) (u n) + dist (u n) b := dist_triangle _ _ _ _ ≀ f'symm.nnnorm * dist (f (u n)) y + dist (u n) b := add_le_add (A _) le_rfl _ ≀ f'symm.nnnorm * (((c : ℝ) * f'symm.nnnorm) ^ n * dist (f b) y) + f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n) / (1 - c * f'symm.nnnorm) * dist (f b) y := by gcongr Β· exact IH.1 Β· exact IH.2 _ = f'symm.nnnorm * (1 - ((c : ℝ) * f'symm.nnnorm) ^ n.succ) / (1 - (c : ℝ) * f'symm.nnnorm) * dist (f b) y := by field_simp [Jcf', pow_succ]; ring refine ⟨?_, Ign⟩ calc dist (f (g (u n))) y ≀ c * f'symm.nnnorm * dist (f (u n)) y := B _ (C n _ IH.2) (C n.succ _ Ign) _ ≀ (c : ℝ) * f'symm.nnnorm * (((c : ℝ) * f'symm.nnnorm) ^ n * dist (f b) y) := by gcongr apply IH.1 _ = ((c : ℝ) * f'symm.nnnorm) ^ n.succ * dist (f b) y := by simp only [pow_succ']; ring -- Deduce from the inductive bound that `uβ‚™` is a Cauchy sequence, therefore converging. have : CauchySeq u := by refine cauchySeq_of_le_geometric _ (↑f'symm.nnnorm * dist (f b) y) Icf' fun n ↦ ?_ calc dist (u n) (u (n + 1)) = dist (g (u n)) (u n) := by rw [usucc, dist_comm] _ ≀ f'symm.nnnorm * dist (f (u n)) y := A _ _ ≀ f'symm.nnnorm * (((c : ℝ) * f'symm.nnnorm) ^ n * dist (f b) y) := by gcongr exact (D n).1 _ = f'symm.nnnorm * dist (f b) y * ((c : ℝ) * f'symm.nnnorm) ^ n := by ring obtain ⟨x, hx⟩ : βˆƒ x, Tendsto u atTop (𝓝 x) := cauchySeq_tendsto_of_complete this -- As all the `uβ‚™` belong to the ball `closedBall b Ξ΅`, so does their limit `x`. have xmem : x ∈ closedBall b Ξ΅ := isClosed_ball.mem_of_tendsto hx (eventually_of_forall fun n => C n _ (D n).2) refine ⟨x, xmem, ?_⟩ -- It remains to check that `f x = y`. This follows from continuity of `f` on `closedBall b Ξ΅` -- and from the fact that `f uβ‚™` is converging to `y` by construction. have hx' : Tendsto u atTop (𝓝[closedBall b Ξ΅] x) := by simp only [nhdsWithin, tendsto_inf, hx, true_and_iff, ge_iff_le, tendsto_principal] exact eventually_of_forall fun n => C n _ (D n).2 have T1 : Tendsto (f ∘ u) atTop (𝓝 (f x)) := (hf.continuousOn.mono hΞ΅ x xmem).tendsto.comp hx' have T2 : Tendsto (f ∘ u) atTop (𝓝 y) := by rw [tendsto_iff_dist_tendsto_zero] refine squeeze_zero (fun _ => dist_nonneg) (fun n => (D n).1) ?_ simpa using (tendsto_pow_atTop_nhds_zero_of_lt_one (by positivity) Icf').mul tendsto_const_nhds exact tendsto_nhds_unique T1 T2
128
38,877,084,059,945,950,000,000,000,000,000,000,000,000,000,000,000,000,000
2
1
3
971
import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Basic #align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" open Nat namespace Nat def choose : β„• β†’ β„• β†’ β„• | _, 0 => 1 | 0, _ + 1 => 0 | n + 1, k + 1 => choose n k + choose n (k + 1) #align nat.choose Nat.choose @[simp]
Mathlib/Data/Nat/Choose/Basic.lean
54
54
theorem choose_zero_right (n : β„•) : choose n 0 = 1 := by
cases n <;> rfl
1
2.718282
0
1
5
972
import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Basic #align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" open Nat namespace Nat def choose : β„• β†’ β„• β†’ β„• | _, 0 => 1 | 0, _ + 1 => 0 | n + 1, k + 1 => choose n k + choose n (k + 1) #align nat.choose Nat.choose @[simp] theorem choose_zero_right (n : β„•) : choose n 0 = 1 := by cases n <;> rfl #align nat.choose_zero_right Nat.choose_zero_right @[simp] theorem choose_zero_succ (k : β„•) : choose 0 (succ k) = 0 := rfl #align nat.choose_zero_succ Nat.choose_zero_succ theorem choose_succ_succ (n k : β„•) : choose (succ n) (succ k) = choose n k + choose n (succ k) := rfl #align nat.choose_succ_succ Nat.choose_succ_succ theorem choose_succ_succ' (n k : β„•) : choose (n + 1) (k + 1) = choose n k + choose n (k + 1) := rfl theorem choose_eq_zero_of_lt : βˆ€ {n k}, n < k β†’ choose n k = 0 | _, 0, hk => absurd hk (Nat.not_lt_zero _) | 0, k + 1, _ => choose_zero_succ _ | n + 1, k + 1, hk => by have hnk : n < k := lt_of_succ_lt_succ hk have hnk1 : n < k + 1 := lt_of_succ_lt hk rw [choose_succ_succ, choose_eq_zero_of_lt hnk, choose_eq_zero_of_lt hnk1] #align nat.choose_eq_zero_of_lt Nat.choose_eq_zero_of_lt @[simp]
Mathlib/Data/Nat/Choose/Basic.lean
79
80
theorem choose_self (n : β„•) : choose n n = 1 := by
induction n <;> simp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)]
1
2.718282
0
1
5
972
import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Basic #align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" open Nat namespace Nat def choose : β„• β†’ β„• β†’ β„• | _, 0 => 1 | 0, _ + 1 => 0 | n + 1, k + 1 => choose n k + choose n (k + 1) #align nat.choose Nat.choose @[simp] theorem choose_zero_right (n : β„•) : choose n 0 = 1 := by cases n <;> rfl #align nat.choose_zero_right Nat.choose_zero_right @[simp] theorem choose_zero_succ (k : β„•) : choose 0 (succ k) = 0 := rfl #align nat.choose_zero_succ Nat.choose_zero_succ theorem choose_succ_succ (n k : β„•) : choose (succ n) (succ k) = choose n k + choose n (succ k) := rfl #align nat.choose_succ_succ Nat.choose_succ_succ theorem choose_succ_succ' (n k : β„•) : choose (n + 1) (k + 1) = choose n k + choose n (k + 1) := rfl theorem choose_eq_zero_of_lt : βˆ€ {n k}, n < k β†’ choose n k = 0 | _, 0, hk => absurd hk (Nat.not_lt_zero _) | 0, k + 1, _ => choose_zero_succ _ | n + 1, k + 1, hk => by have hnk : n < k := lt_of_succ_lt_succ hk have hnk1 : n < k + 1 := lt_of_succ_lt hk rw [choose_succ_succ, choose_eq_zero_of_lt hnk, choose_eq_zero_of_lt hnk1] #align nat.choose_eq_zero_of_lt Nat.choose_eq_zero_of_lt @[simp] theorem choose_self (n : β„•) : choose n n = 1 := by induction n <;> simp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)] #align nat.choose_self Nat.choose_self @[simp] theorem choose_succ_self (n : β„•) : choose n (succ n) = 0 := choose_eq_zero_of_lt (lt_succ_self _) #align nat.choose_succ_self Nat.choose_succ_self @[simp] lemma choose_one_right (n : β„•) : choose n 1 = n := by induction n <;> simp [*, choose, Nat.add_comm] #align nat.choose_one_right Nat.choose_one_right -- The `n+1`-st triangle number is `n` more than the `n`-th triangle number
Mathlib/Data/Nat/Choose/Basic.lean
93
95
theorem triangle_succ (n : β„•) : (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n := by
rw [← add_mul_div_left, Nat.mul_comm 2 n, ← Nat.mul_add, Nat.add_sub_cancel, Nat.mul_comm] cases n <;> rfl; apply zero_lt_succ
2
7.389056
1
1
5
972
import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Basic #align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" open Nat namespace Nat def choose : β„• β†’ β„• β†’ β„• | _, 0 => 1 | 0, _ + 1 => 0 | n + 1, k + 1 => choose n k + choose n (k + 1) #align nat.choose Nat.choose @[simp] theorem choose_zero_right (n : β„•) : choose n 0 = 1 := by cases n <;> rfl #align nat.choose_zero_right Nat.choose_zero_right @[simp] theorem choose_zero_succ (k : β„•) : choose 0 (succ k) = 0 := rfl #align nat.choose_zero_succ Nat.choose_zero_succ theorem choose_succ_succ (n k : β„•) : choose (succ n) (succ k) = choose n k + choose n (succ k) := rfl #align nat.choose_succ_succ Nat.choose_succ_succ theorem choose_succ_succ' (n k : β„•) : choose (n + 1) (k + 1) = choose n k + choose n (k + 1) := rfl theorem choose_eq_zero_of_lt : βˆ€ {n k}, n < k β†’ choose n k = 0 | _, 0, hk => absurd hk (Nat.not_lt_zero _) | 0, k + 1, _ => choose_zero_succ _ | n + 1, k + 1, hk => by have hnk : n < k := lt_of_succ_lt_succ hk have hnk1 : n < k + 1 := lt_of_succ_lt hk rw [choose_succ_succ, choose_eq_zero_of_lt hnk, choose_eq_zero_of_lt hnk1] #align nat.choose_eq_zero_of_lt Nat.choose_eq_zero_of_lt @[simp] theorem choose_self (n : β„•) : choose n n = 1 := by induction n <;> simp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)] #align nat.choose_self Nat.choose_self @[simp] theorem choose_succ_self (n : β„•) : choose n (succ n) = 0 := choose_eq_zero_of_lt (lt_succ_self _) #align nat.choose_succ_self Nat.choose_succ_self @[simp] lemma choose_one_right (n : β„•) : choose n 1 = n := by induction n <;> simp [*, choose, Nat.add_comm] #align nat.choose_one_right Nat.choose_one_right -- The `n+1`-st triangle number is `n` more than the `n`-th triangle number theorem triangle_succ (n : β„•) : (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n := by rw [← add_mul_div_left, Nat.mul_comm 2 n, ← Nat.mul_add, Nat.add_sub_cancel, Nat.mul_comm] cases n <;> rfl; apply zero_lt_succ #align nat.triangle_succ Nat.triangle_succ
Mathlib/Data/Nat/Choose/Basic.lean
99
103
theorem choose_two_right (n : β„•) : choose n 2 = n * (n - 1) / 2 := by
induction' n with n ih Β· simp Β· rw [triangle_succ n, choose, ih] simp [Nat.add_comm]
4
54.59815
2
1
5
972
import Mathlib.Data.Nat.Factorial.Basic import Mathlib.Order.Monotone.Basic #align_import data.nat.choose.basic from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4" open Nat namespace Nat def choose : β„• β†’ β„• β†’ β„• | _, 0 => 1 | 0, _ + 1 => 0 | n + 1, k + 1 => choose n k + choose n (k + 1) #align nat.choose Nat.choose @[simp] theorem choose_zero_right (n : β„•) : choose n 0 = 1 := by cases n <;> rfl #align nat.choose_zero_right Nat.choose_zero_right @[simp] theorem choose_zero_succ (k : β„•) : choose 0 (succ k) = 0 := rfl #align nat.choose_zero_succ Nat.choose_zero_succ theorem choose_succ_succ (n k : β„•) : choose (succ n) (succ k) = choose n k + choose n (succ k) := rfl #align nat.choose_succ_succ Nat.choose_succ_succ theorem choose_succ_succ' (n k : β„•) : choose (n + 1) (k + 1) = choose n k + choose n (k + 1) := rfl theorem choose_eq_zero_of_lt : βˆ€ {n k}, n < k β†’ choose n k = 0 | _, 0, hk => absurd hk (Nat.not_lt_zero _) | 0, k + 1, _ => choose_zero_succ _ | n + 1, k + 1, hk => by have hnk : n < k := lt_of_succ_lt_succ hk have hnk1 : n < k + 1 := lt_of_succ_lt hk rw [choose_succ_succ, choose_eq_zero_of_lt hnk, choose_eq_zero_of_lt hnk1] #align nat.choose_eq_zero_of_lt Nat.choose_eq_zero_of_lt @[simp] theorem choose_self (n : β„•) : choose n n = 1 := by induction n <;> simp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)] #align nat.choose_self Nat.choose_self @[simp] theorem choose_succ_self (n : β„•) : choose n (succ n) = 0 := choose_eq_zero_of_lt (lt_succ_self _) #align nat.choose_succ_self Nat.choose_succ_self @[simp] lemma choose_one_right (n : β„•) : choose n 1 = n := by induction n <;> simp [*, choose, Nat.add_comm] #align nat.choose_one_right Nat.choose_one_right -- The `n+1`-st triangle number is `n` more than the `n`-th triangle number theorem triangle_succ (n : β„•) : (n + 1) * (n + 1 - 1) / 2 = n * (n - 1) / 2 + n := by rw [← add_mul_div_left, Nat.mul_comm 2 n, ← Nat.mul_add, Nat.add_sub_cancel, Nat.mul_comm] cases n <;> rfl; apply zero_lt_succ #align nat.triangle_succ Nat.triangle_succ theorem choose_two_right (n : β„•) : choose n 2 = n * (n - 1) / 2 := by induction' n with n ih Β· simp Β· rw [triangle_succ n, choose, ih] simp [Nat.add_comm] #align nat.choose_two_right Nat.choose_two_right theorem choose_pos : βˆ€ {n k}, k ≀ n β†’ 0 < choose n k | 0, _, hk => by rw [Nat.eq_zero_of_le_zero hk]; decide | n + 1, 0, _ => by simp | n + 1, k + 1, hk => Nat.add_pos_left (choose_pos (le_of_succ_le_succ hk)) _ #align nat.choose_pos Nat.choose_pos theorem choose_eq_zero_iff {n k : β„•} : n.choose k = 0 ↔ n < k := ⟨fun h => lt_of_not_ge (mt Nat.choose_pos h.symm.not_lt), Nat.choose_eq_zero_of_lt⟩ #align nat.choose_eq_zero_iff Nat.choose_eq_zero_iff theorem succ_mul_choose_eq : βˆ€ n k, succ n * choose n k = choose (succ n) (succ k) * succ k | 0, 0 => by decide | 0, k + 1 => by simp [choose] | n + 1, 0 => by simp [choose, mul_succ, succ_eq_add_one, Nat.add_comm] | n + 1, k + 1 => by rw [choose_succ_succ (succ n) (succ k), Nat.add_mul, ← succ_mul_choose_eq n, mul_succ, ← succ_mul_choose_eq n, Nat.add_right_comm, ← Nat.mul_add, ← choose_succ_succ, ← succ_mul] #align nat.succ_mul_choose_eq Nat.succ_mul_choose_eq
Mathlib/Data/Nat/Choose/Basic.lean
125
142
theorem choose_mul_factorial_mul_factorial : βˆ€ {n k}, k ≀ n β†’ choose n k * k ! * (n - k)! = n ! | 0, _, hk => by simp [Nat.eq_zero_of_le_zero hk] | n + 1, 0, _ => by simp | n + 1, succ k, hk => by rcases lt_or_eq_of_le hk with hk₁ | hk₁ Β· have h : choose n k * k.succ ! * (n - k)! = (k + 1) * n ! := by
rw [← choose_mul_factorial_mul_factorial (le_of_succ_le_succ hk)] simp [factorial_succ, Nat.mul_comm, Nat.mul_left_comm, Nat.mul_assoc] have h₁ : (n - k)! = (n - k) * (n - k.succ)! := by rw [← succ_sub_succ, succ_sub (le_of_lt_succ hk₁), factorial_succ] have hβ‚‚ : choose n (succ k) * k.succ ! * ((n - k) * (n - k.succ)!) = (n - k) * n ! := by rw [← choose_mul_factorial_mul_factorial (le_of_lt_succ hk₁)] simp [factorial_succ, Nat.mul_comm, Nat.mul_left_comm, Nat.mul_assoc] have h₃ : k * n ! ≀ n * n ! := Nat.mul_le_mul_right _ (le_of_succ_le_succ hk) rw [choose_succ_succ, Nat.add_mul, Nat.add_mul, succ_sub_succ, h, h₁, hβ‚‚, Nat.add_mul, Nat.mul_sub_right_distrib, factorial_succ, ← Nat.add_sub_assoc h₃, Nat.add_assoc, ← Nat.add_mul, Nat.add_sub_cancel_left, Nat.add_comm] Β· rw [hk₁]; simp [hk₁, Nat.mul_comm, choose, Nat.sub_self]
12
162,754.791419
2
1
5
972
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.function.floor from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open Set section FloorRing variable {Ξ± R : Type*} [MeasurableSpace Ξ±] [LinearOrderedRing R] [FloorRing R] [TopologicalSpace R] [OrderTopology R] [MeasurableSpace R] theorem Int.measurable_floor [OpensMeasurableSpace R] : Measurable (Int.floor : R β†’ β„€) := measurable_to_countable fun x => by simpa only [Int.preimage_floor_singleton] using measurableSet_Ico #align int.measurable_floor Int.measurable_floor @[measurability] theorem Measurable.floor [OpensMeasurableSpace R] {f : Ξ± β†’ R} (hf : Measurable f) : Measurable fun x => ⌊f xβŒ‹ := Int.measurable_floor.comp hf #align measurable.floor Measurable.floor theorem Int.measurable_ceil [OpensMeasurableSpace R] : Measurable (Int.ceil : R β†’ β„€) := measurable_to_countable fun x => by simpa only [Int.preimage_ceil_singleton] using measurableSet_Ioc #align int.measurable_ceil Int.measurable_ceil @[measurability] theorem Measurable.ceil [OpensMeasurableSpace R] {f : Ξ± β†’ R} (hf : Measurable f) : Measurable fun x => ⌈f xβŒ‰ := Int.measurable_ceil.comp hf #align measurable.ceil Measurable.ceil
Mathlib/MeasureTheory/Function/Floor.lean
47
50
theorem measurable_fract [BorelSpace R] : Measurable (Int.fract : R β†’ R) := by
intro s hs rw [Int.preimage_fract] exact MeasurableSet.iUnion fun z => measurable_id.sub_const _ (hs.inter measurableSet_Ico)
3
20.085537
1
1
2
973
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.function.floor from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open Set section FloorRing variable {Ξ± R : Type*} [MeasurableSpace Ξ±] [LinearOrderedRing R] [FloorRing R] [TopologicalSpace R] [OrderTopology R] [MeasurableSpace R] theorem Int.measurable_floor [OpensMeasurableSpace R] : Measurable (Int.floor : R β†’ β„€) := measurable_to_countable fun x => by simpa only [Int.preimage_floor_singleton] using measurableSet_Ico #align int.measurable_floor Int.measurable_floor @[measurability] theorem Measurable.floor [OpensMeasurableSpace R] {f : Ξ± β†’ R} (hf : Measurable f) : Measurable fun x => ⌊f xβŒ‹ := Int.measurable_floor.comp hf #align measurable.floor Measurable.floor theorem Int.measurable_ceil [OpensMeasurableSpace R] : Measurable (Int.ceil : R β†’ β„€) := measurable_to_countable fun x => by simpa only [Int.preimage_ceil_singleton] using measurableSet_Ioc #align int.measurable_ceil Int.measurable_ceil @[measurability] theorem Measurable.ceil [OpensMeasurableSpace R] {f : Ξ± β†’ R} (hf : Measurable f) : Measurable fun x => ⌈f xβŒ‰ := Int.measurable_ceil.comp hf #align measurable.ceil Measurable.ceil theorem measurable_fract [BorelSpace R] : Measurable (Int.fract : R β†’ R) := by intro s hs rw [Int.preimage_fract] exact MeasurableSet.iUnion fun z => measurable_id.sub_const _ (hs.inter measurableSet_Ico) #align measurable_fract measurable_fract @[measurability] theorem Measurable.fract [BorelSpace R] {f : Ξ± β†’ R} (hf : Measurable f) : Measurable fun x => Int.fract (f x) := measurable_fract.comp hf #align measurable.fract Measurable.fract
Mathlib/MeasureTheory/Function/Floor.lean
59
62
theorem MeasurableSet.image_fract [BorelSpace R] {s : Set R} (hs : MeasurableSet s) : MeasurableSet (Int.fract '' s) := by
simp only [Int.image_fract, sub_eq_add_neg, image_add_right'] exact MeasurableSet.iUnion fun m => (measurable_add_const _ hs).inter measurableSet_Ico
2
7.389056
1
1
2
973
import Mathlib.Analysis.Normed.Order.Lattice import Mathlib.MeasureTheory.Function.LpSpace #align_import measure_theory.function.lp_order from "leanprover-community/mathlib"@"5dc275ec639221ca4d5f56938eb966f6ad9bc89f" set_option linter.uppercaseLean3 false open TopologicalSpace MeasureTheory open scoped ENNReal variable {Ξ± E : Type*} {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {p : ℝβ‰₯0∞} namespace MeasureTheory namespace Lp section Order variable [NormedLatticeAddCommGroup E]
Mathlib/MeasureTheory/Function/LpOrder.lean
41
42
theorem coeFn_le (f g : Lp E p ΞΌ) : f ≀ᡐ[ΞΌ] g ↔ f ≀ g := by
rw [← Subtype.coe_le_coe, ← AEEqFun.coeFn_le]
1
2.718282
0
1
2
974
import Mathlib.Analysis.Normed.Order.Lattice import Mathlib.MeasureTheory.Function.LpSpace #align_import measure_theory.function.lp_order from "leanprover-community/mathlib"@"5dc275ec639221ca4d5f56938eb966f6ad9bc89f" set_option linter.uppercaseLean3 false open TopologicalSpace MeasureTheory open scoped ENNReal variable {Ξ± E : Type*} {m : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {p : ℝβ‰₯0∞} namespace MeasureTheory namespace Lp section Order variable [NormedLatticeAddCommGroup E] theorem coeFn_le (f g : Lp E p ΞΌ) : f ≀ᡐ[ΞΌ] g ↔ f ≀ g := by rw [← Subtype.coe_le_coe, ← AEEqFun.coeFn_le] #align measure_theory.Lp.coe_fn_le MeasureTheory.Lp.coeFn_le
Mathlib/MeasureTheory/Function/LpOrder.lean
45
50
theorem coeFn_nonneg (f : Lp E p ΞΌ) : 0 ≀ᡐ[ΞΌ] f ↔ 0 ≀ f := by
rw [← coeFn_le] have h0 := Lp.coeFn_zero E p ΞΌ constructor <;> intro h <;> filter_upwards [h, h0] with _ _ h2 Β· rwa [h2] Β· rwa [← h2]
5
148.413159
2
1
2
974
import Mathlib.Computability.Halting #align_import computability.reduce from "leanprover-community/mathlib"@"d13b3a4a392ea7273dfa4727dbd1892e26cfd518" universe u v w open Function def ManyOneReducible {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] (p : Ξ± β†’ Prop) (q : Ξ² β†’ Prop) := βˆƒ f, Computable f ∧ βˆ€ a, p a ↔ q (f a) #align many_one_reducible ManyOneReducible @[inherit_doc ManyOneReducible] infixl:1000 " ≀₀ " => ManyOneReducible theorem ManyOneReducible.mk {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {f : Ξ± β†’ Ξ²} (q : Ξ² β†’ Prop) (h : Computable f) : (fun a => q (f a)) ≀₀ q := ⟨f, h, fun _ => Iff.rfl⟩ #align many_one_reducible.mk ManyOneReducible.mk @[refl] theorem manyOneReducible_refl {Ξ±} [Primcodable Ξ±] (p : Ξ± β†’ Prop) : p ≀₀ p := ⟨id, Computable.id, by simp⟩ #align many_one_reducible_refl manyOneReducible_refl @[trans] theorem ManyOneReducible.trans {Ξ± Ξ² Ξ³} [Primcodable Ξ±] [Primcodable Ξ²] [Primcodable Ξ³] {p : Ξ± β†’ Prop} {q : Ξ² β†’ Prop} {r : Ξ³ β†’ Prop} : p ≀₀ q β†’ q ≀₀ r β†’ p ≀₀ r | ⟨f, c₁, hβ‚βŸ©, ⟨g, cβ‚‚, hβ‚‚βŸ© => ⟨g ∘ f, cβ‚‚.comp c₁, fun a => ⟨fun h => by erw [← hβ‚‚, ← h₁]; assumption, fun h => by rwa [h₁, hβ‚‚]⟩⟩ #align many_one_reducible.trans ManyOneReducible.trans theorem reflexive_manyOneReducible {Ξ±} [Primcodable Ξ±] : Reflexive (@ManyOneReducible Ξ± Ξ± _ _) := manyOneReducible_refl #align reflexive_many_one_reducible reflexive_manyOneReducible theorem transitive_manyOneReducible {Ξ±} [Primcodable Ξ±] : Transitive (@ManyOneReducible Ξ± Ξ± _ _) := fun _ _ _ => ManyOneReducible.trans #align transitive_many_one_reducible transitive_manyOneReducible def OneOneReducible {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] (p : Ξ± β†’ Prop) (q : Ξ² β†’ Prop) := βˆƒ f, Computable f ∧ Injective f ∧ βˆ€ a, p a ↔ q (f a) #align one_one_reducible OneOneReducible @[inherit_doc OneOneReducible] infixl:1000 " ≀₁ " => OneOneReducible theorem OneOneReducible.mk {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {f : Ξ± β†’ Ξ²} (q : Ξ² β†’ Prop) (h : Computable f) (i : Injective f) : (fun a => q (f a)) ≀₁ q := ⟨f, h, i, fun _ => Iff.rfl⟩ #align one_one_reducible.mk OneOneReducible.mk @[refl] theorem oneOneReducible_refl {Ξ±} [Primcodable Ξ±] (p : Ξ± β†’ Prop) : p ≀₁ p := ⟨id, Computable.id, injective_id, by simp⟩ #align one_one_reducible_refl oneOneReducible_refl @[trans] theorem OneOneReducible.trans {Ξ± Ξ² Ξ³} [Primcodable Ξ±] [Primcodable Ξ²] [Primcodable Ξ³] {p : Ξ± β†’ Prop} {q : Ξ² β†’ Prop} {r : Ξ³ β†’ Prop} : p ≀₁ q β†’ q ≀₁ r β†’ p ≀₁ r | ⟨f, c₁, i₁, hβ‚βŸ©, ⟨g, cβ‚‚, iβ‚‚, hβ‚‚βŸ© => ⟨g ∘ f, cβ‚‚.comp c₁, iβ‚‚.comp i₁, fun a => ⟨fun h => by erw [← hβ‚‚, ← h₁]; assumption, fun h => by rwa [h₁, hβ‚‚]⟩⟩ #align one_one_reducible.trans OneOneReducible.trans theorem OneOneReducible.to_many_one {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {p : Ξ± β†’ Prop} {q : Ξ² β†’ Prop} : p ≀₁ q β†’ p ≀₀ q | ⟨f, c, _, h⟩ => ⟨f, c, h⟩ #align one_one_reducible.to_many_one OneOneReducible.to_many_one theorem OneOneReducible.of_equiv {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {e : Ξ± ≃ Ξ²} (q : Ξ² β†’ Prop) (h : Computable e) : (q ∘ e) ≀₁ q := OneOneReducible.mk _ h e.injective #align one_one_reducible.of_equiv OneOneReducible.of_equiv
Mathlib/Computability/Reduce.lean
111
113
theorem OneOneReducible.of_equiv_symm {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {e : Ξ± ≃ Ξ²} (q : Ξ² β†’ Prop) (h : Computable e.symm) : q ≀₁ (q ∘ e) := by
convert OneOneReducible.of_equiv _ h; funext; simp
1
2.718282
0
1
2
975
import Mathlib.Computability.Halting #align_import computability.reduce from "leanprover-community/mathlib"@"d13b3a4a392ea7273dfa4727dbd1892e26cfd518" universe u v w open Function def ManyOneReducible {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] (p : Ξ± β†’ Prop) (q : Ξ² β†’ Prop) := βˆƒ f, Computable f ∧ βˆ€ a, p a ↔ q (f a) #align many_one_reducible ManyOneReducible @[inherit_doc ManyOneReducible] infixl:1000 " ≀₀ " => ManyOneReducible theorem ManyOneReducible.mk {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {f : Ξ± β†’ Ξ²} (q : Ξ² β†’ Prop) (h : Computable f) : (fun a => q (f a)) ≀₀ q := ⟨f, h, fun _ => Iff.rfl⟩ #align many_one_reducible.mk ManyOneReducible.mk @[refl] theorem manyOneReducible_refl {Ξ±} [Primcodable Ξ±] (p : Ξ± β†’ Prop) : p ≀₀ p := ⟨id, Computable.id, by simp⟩ #align many_one_reducible_refl manyOneReducible_refl @[trans] theorem ManyOneReducible.trans {Ξ± Ξ² Ξ³} [Primcodable Ξ±] [Primcodable Ξ²] [Primcodable Ξ³] {p : Ξ± β†’ Prop} {q : Ξ² β†’ Prop} {r : Ξ³ β†’ Prop} : p ≀₀ q β†’ q ≀₀ r β†’ p ≀₀ r | ⟨f, c₁, hβ‚βŸ©, ⟨g, cβ‚‚, hβ‚‚βŸ© => ⟨g ∘ f, cβ‚‚.comp c₁, fun a => ⟨fun h => by erw [← hβ‚‚, ← h₁]; assumption, fun h => by rwa [h₁, hβ‚‚]⟩⟩ #align many_one_reducible.trans ManyOneReducible.trans theorem reflexive_manyOneReducible {Ξ±} [Primcodable Ξ±] : Reflexive (@ManyOneReducible Ξ± Ξ± _ _) := manyOneReducible_refl #align reflexive_many_one_reducible reflexive_manyOneReducible theorem transitive_manyOneReducible {Ξ±} [Primcodable Ξ±] : Transitive (@ManyOneReducible Ξ± Ξ± _ _) := fun _ _ _ => ManyOneReducible.trans #align transitive_many_one_reducible transitive_manyOneReducible def OneOneReducible {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] (p : Ξ± β†’ Prop) (q : Ξ² β†’ Prop) := βˆƒ f, Computable f ∧ Injective f ∧ βˆ€ a, p a ↔ q (f a) #align one_one_reducible OneOneReducible @[inherit_doc OneOneReducible] infixl:1000 " ≀₁ " => OneOneReducible theorem OneOneReducible.mk {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {f : Ξ± β†’ Ξ²} (q : Ξ² β†’ Prop) (h : Computable f) (i : Injective f) : (fun a => q (f a)) ≀₁ q := ⟨f, h, i, fun _ => Iff.rfl⟩ #align one_one_reducible.mk OneOneReducible.mk @[refl] theorem oneOneReducible_refl {Ξ±} [Primcodable Ξ±] (p : Ξ± β†’ Prop) : p ≀₁ p := ⟨id, Computable.id, injective_id, by simp⟩ #align one_one_reducible_refl oneOneReducible_refl @[trans] theorem OneOneReducible.trans {Ξ± Ξ² Ξ³} [Primcodable Ξ±] [Primcodable Ξ²] [Primcodable Ξ³] {p : Ξ± β†’ Prop} {q : Ξ² β†’ Prop} {r : Ξ³ β†’ Prop} : p ≀₁ q β†’ q ≀₁ r β†’ p ≀₁ r | ⟨f, c₁, i₁, hβ‚βŸ©, ⟨g, cβ‚‚, iβ‚‚, hβ‚‚βŸ© => ⟨g ∘ f, cβ‚‚.comp c₁, iβ‚‚.comp i₁, fun a => ⟨fun h => by erw [← hβ‚‚, ← h₁]; assumption, fun h => by rwa [h₁, hβ‚‚]⟩⟩ #align one_one_reducible.trans OneOneReducible.trans theorem OneOneReducible.to_many_one {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {p : Ξ± β†’ Prop} {q : Ξ² β†’ Prop} : p ≀₁ q β†’ p ≀₀ q | ⟨f, c, _, h⟩ => ⟨f, c, h⟩ #align one_one_reducible.to_many_one OneOneReducible.to_many_one theorem OneOneReducible.of_equiv {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {e : Ξ± ≃ Ξ²} (q : Ξ² β†’ Prop) (h : Computable e) : (q ∘ e) ≀₁ q := OneOneReducible.mk _ h e.injective #align one_one_reducible.of_equiv OneOneReducible.of_equiv theorem OneOneReducible.of_equiv_symm {Ξ± Ξ²} [Primcodable Ξ±] [Primcodable Ξ²] {e : Ξ± ≃ Ξ²} (q : Ξ² β†’ Prop) (h : Computable e.symm) : q ≀₁ (q ∘ e) := by convert OneOneReducible.of_equiv _ h; funext; simp #align one_one_reducible.of_equiv_symm OneOneReducible.of_equiv_symm theorem reflexive_oneOneReducible {Ξ±} [Primcodable Ξ±] : Reflexive (@OneOneReducible Ξ± Ξ± _ _) := oneOneReducible_refl #align reflexive_one_one_reducible reflexive_oneOneReducible theorem transitive_oneOneReducible {Ξ±} [Primcodable Ξ±] : Transitive (@OneOneReducible Ξ± Ξ± _ _) := fun _ _ _ => OneOneReducible.trans #align transitive_one_one_reducible transitive_oneOneReducible namespace ComputablePred variable {Ξ± : Type*} {Ξ² : Type*} {Οƒ : Type*} variable [Primcodable Ξ±] [Primcodable Ξ²] [Primcodable Οƒ] open Computable
Mathlib/Computability/Reduce.lean
131
136
theorem computable_of_manyOneReducible {p : Ξ± β†’ Prop} {q : Ξ² β†’ Prop} (h₁ : p ≀₀ q) (hβ‚‚ : ComputablePred q) : ComputablePred p := by
rcases h₁ with ⟨f, c, hf⟩ rw [show p = fun a => q (f a) from Set.ext hf] rcases computable_iff.1 hβ‚‚ with ⟨g, hg, rfl⟩ exact ⟨by infer_instance, by simpa using hg.comp c⟩
4
54.59815
2
1
2
975
import Mathlib.Data.Set.Image #align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780" open Function universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Sort w} (r r' s : Ξ± β†’ Ξ± β†’ Prop) local infixl:50 " β‰Ό " => r def Directed (f : ΞΉ β†’ Ξ±) := βˆ€ x y, βˆƒ z, f x β‰Ό f z ∧ f y β‰Ό f z #align directed Directed def DirectedOn (s : Set Ξ±) := βˆ€ x ∈ s, βˆ€ y ∈ s, βˆƒ z ∈ s, x β‰Ό z ∧ y β‰Ό z #align directed_on DirectedOn variable {r r'}
Mathlib/Order/Directed.lean
58
60
theorem directedOn_iff_directed {s} : @DirectedOn Ξ± r s ↔ Directed r (Subtype.val : s β†’ Ξ±) := by
simp only [DirectedOn, Directed, Subtype.exists, exists_and_left, exists_prop, Subtype.forall] exact forallβ‚‚_congr fun x _ => by simp [And.comm, and_assoc]
2
7.389056
1
1
4
976
import Mathlib.Data.Set.Image #align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780" open Function universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Sort w} (r r' s : Ξ± β†’ Ξ± β†’ Prop) local infixl:50 " β‰Ό " => r def Directed (f : ΞΉ β†’ Ξ±) := βˆ€ x y, βˆƒ z, f x β‰Ό f z ∧ f y β‰Ό f z #align directed Directed def DirectedOn (s : Set Ξ±) := βˆ€ x ∈ s, βˆ€ y ∈ s, βˆƒ z ∈ s, x β‰Ό z ∧ y β‰Ό z #align directed_on DirectedOn variable {r r'} theorem directedOn_iff_directed {s} : @DirectedOn Ξ± r s ↔ Directed r (Subtype.val : s β†’ Ξ±) := by simp only [DirectedOn, Directed, Subtype.exists, exists_and_left, exists_prop, Subtype.forall] exact forallβ‚‚_congr fun x _ => by simp [And.comm, and_assoc] #align directed_on_iff_directed directedOn_iff_directed alias ⟨DirectedOn.directed_val, _⟩ := directedOn_iff_directed #align directed_on.directed_coe DirectedOn.directed_val
Mathlib/Order/Directed.lean
66
67
theorem directedOn_range {f : ΞΉ β†’ Ξ±} : Directed r f ↔ DirectedOn r (Set.range f) := by
simp_rw [Directed, DirectedOn, Set.forall_mem_range, Set.exists_range_iff]
1
2.718282
0
1
4
976
import Mathlib.Data.Set.Image #align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780" open Function universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Sort w} (r r' s : Ξ± β†’ Ξ± β†’ Prop) local infixl:50 " β‰Ό " => r def Directed (f : ΞΉ β†’ Ξ±) := βˆ€ x y, βˆƒ z, f x β‰Ό f z ∧ f y β‰Ό f z #align directed Directed def DirectedOn (s : Set Ξ±) := βˆ€ x ∈ s, βˆ€ y ∈ s, βˆƒ z ∈ s, x β‰Ό z ∧ y β‰Ό z #align directed_on DirectedOn variable {r r'} theorem directedOn_iff_directed {s} : @DirectedOn Ξ± r s ↔ Directed r (Subtype.val : s β†’ Ξ±) := by simp only [DirectedOn, Directed, Subtype.exists, exists_and_left, exists_prop, Subtype.forall] exact forallβ‚‚_congr fun x _ => by simp [And.comm, and_assoc] #align directed_on_iff_directed directedOn_iff_directed alias ⟨DirectedOn.directed_val, _⟩ := directedOn_iff_directed #align directed_on.directed_coe DirectedOn.directed_val theorem directedOn_range {f : ΞΉ β†’ Ξ±} : Directed r f ↔ DirectedOn r (Set.range f) := by simp_rw [Directed, DirectedOn, Set.forall_mem_range, Set.exists_range_iff] #align directed_on_range directedOn_range -- Porting note: This alias was misplaced in `order/compactly_generated.lean` in mathlib3 alias ⟨Directed.directedOn_range, _⟩ := directedOn_range #align directed.directed_on_range Directed.directedOn_range -- Porting note: `attribute [protected]` doesn't work -- attribute [protected] Directed.directedOn_range
Mathlib/Order/Directed.lean
77
80
theorem directedOn_image {s : Set Ξ²} {f : Ξ² β†’ Ξ±} : DirectedOn r (f '' s) ↔ DirectedOn (f ⁻¹'o r) s := by
simp only [DirectedOn, Set.mem_image, exists_exists_and_eq_and, forall_exists_index, and_imp, forall_apply_eq_imp_iffβ‚‚, Order.Preimage]
2
7.389056
1
1
4
976
import Mathlib.Data.Set.Image #align_import order.directed from "leanprover-community/mathlib"@"ffde2d8a6e689149e44fd95fa862c23a57f8c780" open Function universe u v w variable {Ξ± : Type u} {Ξ² : Type v} {ΞΉ : Sort w} (r r' s : Ξ± β†’ Ξ± β†’ Prop) local infixl:50 " β‰Ό " => r def Directed (f : ΞΉ β†’ Ξ±) := βˆ€ x y, βˆƒ z, f x β‰Ό f z ∧ f y β‰Ό f z #align directed Directed def DirectedOn (s : Set Ξ±) := βˆ€ x ∈ s, βˆ€ y ∈ s, βˆƒ z ∈ s, x β‰Ό z ∧ y β‰Ό z #align directed_on DirectedOn variable {r r'} theorem directedOn_iff_directed {s} : @DirectedOn Ξ± r s ↔ Directed r (Subtype.val : s β†’ Ξ±) := by simp only [DirectedOn, Directed, Subtype.exists, exists_and_left, exists_prop, Subtype.forall] exact forallβ‚‚_congr fun x _ => by simp [And.comm, and_assoc] #align directed_on_iff_directed directedOn_iff_directed alias ⟨DirectedOn.directed_val, _⟩ := directedOn_iff_directed #align directed_on.directed_coe DirectedOn.directed_val theorem directedOn_range {f : ΞΉ β†’ Ξ±} : Directed r f ↔ DirectedOn r (Set.range f) := by simp_rw [Directed, DirectedOn, Set.forall_mem_range, Set.exists_range_iff] #align directed_on_range directedOn_range -- Porting note: This alias was misplaced in `order/compactly_generated.lean` in mathlib3 alias ⟨Directed.directedOn_range, _⟩ := directedOn_range #align directed.directed_on_range Directed.directedOn_range -- Porting note: `attribute [protected]` doesn't work -- attribute [protected] Directed.directedOn_range theorem directedOn_image {s : Set Ξ²} {f : Ξ² β†’ Ξ±} : DirectedOn r (f '' s) ↔ DirectedOn (f ⁻¹'o r) s := by simp only [DirectedOn, Set.mem_image, exists_exists_and_eq_and, forall_exists_index, and_imp, forall_apply_eq_imp_iffβ‚‚, Order.Preimage] #align directed_on_image directedOn_image theorem DirectedOn.mono' {s : Set Ξ±} (hs : DirectedOn r s) (h : βˆ€ ⦃a⦄, a ∈ s β†’ βˆ€ ⦃b⦄, b ∈ s β†’ r a b β†’ r' a b) : DirectedOn r' s := fun _ hx _ hy => let ⟨z, hz, hxz, hyz⟩ := hs _ hx _ hy ⟨z, hz, h hx hz hxz, h hy hz hyz⟩ #align directed_on.mono' DirectedOn.mono' theorem DirectedOn.mono {s : Set Ξ±} (h : DirectedOn r s) (H : βˆ€ ⦃a b⦄, r a b β†’ r' a b) : DirectedOn r' s := h.mono' fun _ _ _ _ h ↦ H h #align directed_on.mono DirectedOn.mono theorem directed_comp {ΞΉ} {f : ΞΉ β†’ Ξ²} {g : Ξ² β†’ Ξ±} : Directed r (g ∘ f) ↔ Directed (g ⁻¹'o r) f := Iff.rfl #align directed_comp directed_comp theorem Directed.mono {s : Ξ± β†’ Ξ± β†’ Prop} {ΞΉ} {f : ΞΉ β†’ Ξ±} (H : βˆ€ a b, r a b β†’ s a b) (h : Directed r f) : Directed s f := fun a b => let ⟨c, h₁, hβ‚‚βŸ© := h a b ⟨c, H _ _ h₁, H _ _ hβ‚‚βŸ© #align directed.mono Directed.mono -- Porting note: due to some interaction with the local notation, `r` became explicit here in lean3 theorem Directed.mono_comp (r : Ξ± β†’ Ξ± β†’ Prop) {ΞΉ} {rb : Ξ² β†’ Ξ² β†’ Prop} {g : Ξ± β†’ Ξ²} {f : ΞΉ β†’ Ξ±} (hg : βˆ€ ⦃x y⦄, r x y β†’ rb (g x) (g y)) (hf : Directed r f) : Directed rb (g ∘ f) := directed_comp.2 <| hf.mono hg #align directed.mono_comp Directed.mono_comp theorem directedOn_of_sup_mem [SemilatticeSup Ξ±] {S : Set Ξ±} (H : βˆ€ ⦃i j⦄, i ∈ S β†’ j ∈ S β†’ i βŠ” j ∈ S) : DirectedOn (Β· ≀ Β·) S := fun a ha b hb => ⟨a βŠ” b, H ha hb, le_sup_left, le_sup_right⟩ #align directed_on_of_sup_mem directedOn_of_sup_mem
Mathlib/Order/Directed.lean
116
128
theorem Directed.extend_bot [Preorder Ξ±] [OrderBot Ξ±] {e : ΞΉ β†’ Ξ²} {f : ΞΉ β†’ Ξ±} (hf : Directed (Β· ≀ Β·) f) (he : Function.Injective e) : Directed (Β· ≀ Β·) (Function.extend e f βŠ₯) := by
intro a b rcases (em (βˆƒ i, e i = a)).symm with (ha | ⟨i, rfl⟩) Β· use b simp [Function.extend_apply' _ _ _ ha] rcases (em (βˆƒ i, e i = b)).symm with (hb | ⟨j, rfl⟩) Β· use e i simp [Function.extend_apply' _ _ _ hb] rcases hf i j with ⟨k, hi, hj⟩ use e k simp only [he.extend_apply, *, true_and_iff]
10
22,026.465795
2
1
4
976
import Mathlib.Analysis.SpecificLimits.Basic import Mathlib.Analysis.RCLike.Basic open Set Algebra Filter open scoped Topology variable (π•œ : Type*) [RCLike π•œ]
Mathlib/Analysis/SpecificLimits/RCLike.lean
19
22
theorem RCLike.tendsto_inverse_atTop_nhds_zero_nat : Tendsto (fun n : β„• => (n : π•œ)⁻¹) atTop (𝓝 0) := by
convert tendsto_algebraMap_inverse_atTop_nhds_zero_nat π•œ simp
2
7.389056
1
1
1
977
import Mathlib.Algebra.Homology.ImageToKernel import Mathlib.Algebra.Homology.HomologicalComplex import Mathlib.CategoryTheory.GradedObject #align_import algebra.homology.homology from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open CategoryTheory CategoryTheory.Limits variable {ΞΉ : Type*} variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {c : ComplexShape ΞΉ} (C : HomologicalComplex V c) open scoped Classical open ZeroObject noncomputable section namespace HomologicalComplex section Cycles variable [HasKernels V] abbrev cycles' (i : ΞΉ) : Subobject (C.X i) := kernelSubobject (C.dFrom i) #align homological_complex.cycles HomologicalComplex.cycles' theorem cycles'_eq_kernelSubobject {i j : ΞΉ} (r : c.Rel i j) : C.cycles' i = kernelSubobject (C.d i j) := C.kernel_from_eq_kernel r #align homological_complex.cycles_eq_kernel_subobject HomologicalComplex.cycles'_eq_kernelSubobject def cycles'IsoKernel {i j : ΞΉ} (r : c.Rel i j) : (C.cycles' i : V) β‰… kernel (C.d i j) := Subobject.isoOfEq _ _ (C.cycles'_eq_kernelSubobject r) β‰ͺ≫ kernelSubobjectIso (C.d i j) #align homological_complex.cycles_iso_kernel HomologicalComplex.cycles'IsoKernel
Mathlib/Algebra/Homology/Homology.lean
68
71
theorem cycles_eq_top {i} (h : ¬c.Rel i (c.next i)) : C.cycles' i = ⊀ := by
rw [eq_top_iff] apply le_kernelSubobject rw [C.dFrom_eq_zero h, comp_zero]
3
20.085537
1
1
2
978
import Mathlib.Algebra.Homology.ImageToKernel import Mathlib.Algebra.Homology.HomologicalComplex import Mathlib.CategoryTheory.GradedObject #align_import algebra.homology.homology from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open CategoryTheory CategoryTheory.Limits variable {ΞΉ : Type*} variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {c : ComplexShape ΞΉ} (C : HomologicalComplex V c) open scoped Classical open ZeroObject noncomputable section namespace HomologicalComplex section Boundaries variable [HasImages V] abbrev boundaries (C : HomologicalComplex V c) (j : ΞΉ) : Subobject (C.X j) := imageSubobject (C.dTo j) #align homological_complex.boundaries HomologicalComplex.boundaries theorem boundaries_eq_imageSubobject [HasEqualizers V] {i j : ΞΉ} (r : c.Rel i j) : C.boundaries j = imageSubobject (C.d i j) := C.image_to_eq_image r #align homological_complex.boundaries_eq_image_subobject HomologicalComplex.boundaries_eq_imageSubobject def boundariesIsoImage [HasEqualizers V] {i j : ΞΉ} (r : c.Rel i j) : (C.boundaries j : V) β‰… image (C.d i j) := Subobject.isoOfEq _ _ (C.boundaries_eq_imageSubobject r) β‰ͺ≫ imageSubobjectIso (C.d i j) #align homological_complex.boundaries_iso_image HomologicalComplex.boundariesIsoImage
Mathlib/Algebra/Homology/Homology.lean
97
100
theorem boundaries_eq_bot [HasZeroObject V] {j} (h : Β¬c.Rel (c.prev j) j) : C.boundaries j = βŠ₯ := by
rw [eq_bot_iff] refine imageSubobject_le _ 0 ?_ rw [C.dTo_eq_zero h, zero_comp]
3
20.085537
1
1
2
978
import Mathlib.Analysis.Normed.Group.Basic import Mathlib.Topology.Algebra.Module.Basic import Mathlib.LinearAlgebra.Basis #align_import analysis.normed_space.linear_isometry from "leanprover-community/mathlib"@"4601791ea62fea875b488dafc4e6dede19e8363f" open Function Set variable {R Rβ‚‚ R₃ Rβ‚„ E Eβ‚‚ E₃ Eβ‚„ F 𝓕 : Type*} [Semiring R] [Semiring Rβ‚‚] [Semiring R₃] [Semiring Rβ‚„] {σ₁₂ : R β†’+* Rβ‚‚} {σ₂₁ : Rβ‚‚ β†’+* R} {σ₁₃ : R β†’+* R₃} {σ₃₁ : R₃ β†’+* R} {σ₁₄ : R β†’+* Rβ‚„} {σ₄₁ : Rβ‚„ β†’+* R} {σ₂₃ : Rβ‚‚ β†’+* R₃} {σ₃₂ : R₃ β†’+* Rβ‚‚} {Οƒβ‚‚β‚„ : Rβ‚‚ β†’+* Rβ‚„} {Οƒβ‚„β‚‚ : Rβ‚„ β†’+* Rβ‚‚} {σ₃₄ : R₃ β†’+* Rβ‚„} {σ₄₃ : Rβ‚„ β†’+* R₃} [RingHomInvPair σ₁₂ σ₂₁] [RingHomInvPair σ₂₁ σ₁₂] [RingHomInvPair σ₁₃ σ₃₁] [RingHomInvPair σ₃₁ σ₁₃] [RingHomInvPair σ₂₃ σ₃₂] [RingHomInvPair σ₃₂ σ₂₃] [RingHomInvPair σ₁₄ σ₄₁] [RingHomInvPair σ₄₁ σ₁₄] [RingHomInvPair Οƒβ‚‚β‚„ Οƒβ‚„β‚‚] [RingHomInvPair Οƒβ‚„β‚‚ Οƒβ‚‚β‚„] [RingHomInvPair σ₃₄ σ₄₃] [RingHomInvPair σ₄₃ σ₃₄] [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] [RingHomCompTriple σ₁₂ Οƒβ‚‚β‚„ σ₁₄] [RingHomCompTriple σ₂₃ σ₃₄ Οƒβ‚‚β‚„] [RingHomCompTriple σ₁₃ σ₃₄ σ₁₄] [RingHomCompTriple σ₃₂ σ₂₁ σ₃₁] [RingHomCompTriple Οƒβ‚„β‚‚ σ₂₁ σ₄₁] [RingHomCompTriple σ₄₃ σ₃₂ Οƒβ‚„β‚‚] [RingHomCompTriple σ₄₃ σ₃₁ σ₄₁] [SeminormedAddCommGroup E] [SeminormedAddCommGroup Eβ‚‚] [SeminormedAddCommGroup E₃] [SeminormedAddCommGroup Eβ‚„] [Module R E] [Module Rβ‚‚ Eβ‚‚] [Module R₃ E₃] [Module Rβ‚„ Eβ‚„] [NormedAddCommGroup F] [Module R F] structure LinearIsometry (σ₁₂ : R β†’+* Rβ‚‚) (E Eβ‚‚ : Type*) [SeminormedAddCommGroup E] [SeminormedAddCommGroup Eβ‚‚] [Module R E] [Module Rβ‚‚ Eβ‚‚] extends E β†’β‚›β‚—[σ₁₂] Eβ‚‚ where norm_map' : βˆ€ x, β€–toLinearMap xβ€– = β€–xβ€– #align linear_isometry LinearIsometry @[inherit_doc] notation:25 E " β†’β‚›β‚—α΅’[" σ₁₂:25 "] " Eβ‚‚:0 => LinearIsometry σ₁₂ E Eβ‚‚ notation:25 E " β†’β‚—α΅’[" R:25 "] " Eβ‚‚:0 => LinearIsometry (RingHom.id R) E Eβ‚‚ notation:25 E " →ₗᡒ⋆[" R:25 "] " Eβ‚‚:0 => LinearIsometry (starRingEnd R) E Eβ‚‚ class SemilinearIsometryClass (𝓕 : Type*) {R Rβ‚‚ : outParam Type*} [Semiring R] [Semiring Rβ‚‚] (σ₁₂ : outParam <| R β†’+* Rβ‚‚) (E Eβ‚‚ : outParam Type*) [SeminormedAddCommGroup E] [SeminormedAddCommGroup Eβ‚‚] [Module R E] [Module Rβ‚‚ Eβ‚‚] [FunLike 𝓕 E Eβ‚‚] extends SemilinearMapClass 𝓕 σ₁₂ E Eβ‚‚ : Prop where norm_map : βˆ€ (f : 𝓕) (x : E), β€–f xβ€– = β€–xβ€– #align semilinear_isometry_class SemilinearIsometryClass abbrev LinearIsometryClass (𝓕 : Type*) (R E Eβ‚‚ : outParam Type*) [Semiring R] [SeminormedAddCommGroup E] [SeminormedAddCommGroup Eβ‚‚] [Module R E] [Module R Eβ‚‚] [FunLike 𝓕 E Eβ‚‚] := SemilinearIsometryClass 𝓕 (RingHom.id R) E Eβ‚‚ #align linear_isometry_class LinearIsometryClass namespace LinearIsometry variable (f : E β†’β‚›β‚—α΅’[σ₁₂] Eβ‚‚) (f₁ : F β†’β‚›β‚—α΅’[σ₁₂] Eβ‚‚) theorem toLinearMap_injective : Injective (toLinearMap : (E β†’β‚›β‚—α΅’[σ₁₂] Eβ‚‚) β†’ E β†’β‚›β‚—[σ₁₂] Eβ‚‚) | ⟨_, _⟩, ⟨_, _⟩, rfl => rfl #align linear_isometry.to_linear_map_injective LinearIsometry.toLinearMap_injective @[simp] theorem toLinearMap_inj {f g : E β†’β‚›β‚—α΅’[σ₁₂] Eβ‚‚} : f.toLinearMap = g.toLinearMap ↔ f = g := toLinearMap_injective.eq_iff #align linear_isometry.to_linear_map_inj LinearIsometry.toLinearMap_inj instance instFunLike : FunLike (E β†’β‚›β‚—α΅’[σ₁₂] Eβ‚‚) E Eβ‚‚ where coe f := f.toFun coe_injective' _ _ h := toLinearMap_injective (DFunLike.coe_injective h) instance instSemilinearIsometryClass : SemilinearIsometryClass (E β†’β‚›β‚—α΅’[σ₁₂] Eβ‚‚) σ₁₂ E Eβ‚‚ where map_add f := map_add f.toLinearMap map_smulβ‚›β‚— f := map_smulβ‚›β‚— f.toLinearMap norm_map f := f.norm_map' @[simp] theorem coe_toLinearMap : ⇑f.toLinearMap = f := rfl #align linear_isometry.coe_to_linear_map LinearIsometry.coe_toLinearMap @[simp] theorem coe_mk (f : E β†’β‚›β‚—[σ₁₂] Eβ‚‚) (hf) : ⇑(mk f hf) = f := rfl #align linear_isometry.coe_mk LinearIsometry.coe_mk
Mathlib/Analysis/NormedSpace/LinearIsometry.lean
170
172
theorem coe_injective : @Injective (E β†’β‚›β‚—α΅’[σ₁₂] Eβ‚‚) (E β†’ Eβ‚‚) (fun f => f) := by
rintro ⟨_⟩ ⟨_⟩ simp
2
7.389056
1
1
1
979
import Mathlib.Algebra.Star.Basic import Mathlib.Algebra.Order.CauSeq.Completion #align_import data.real.basic from "leanprover-community/mathlib"@"cb42593171ba005beaaf4549fcfe0dece9ada4c9" assert_not_exists Finset assert_not_exists Module assert_not_exists Submonoid assert_not_exists FloorRing structure Real where ofCauchy :: cauchy : CauSeq.Completion.Cauchy (abs : β„š β†’ β„š) #align real Real @[inherit_doc] notation "ℝ" => Real -- Porting note: unknown attribute -- attribute [pp_using_anonymous_constructor] Real namespace Real open CauSeq CauSeq.Completion variable {x y : ℝ} theorem ext_cauchy_iff : βˆ€ {x y : Real}, x = y ↔ x.cauchy = y.cauchy | ⟨a⟩, ⟨b⟩ => by rw [ofCauchy.injEq] #align real.ext_cauchy_iff Real.ext_cauchy_iff theorem ext_cauchy {x y : Real} : x.cauchy = y.cauchy β†’ x = y := ext_cauchy_iff.2 #align real.ext_cauchy Real.ext_cauchy def equivCauchy : ℝ ≃ CauSeq.Completion.Cauchy (abs : β„š β†’ β„š) := ⟨Real.cauchy, Real.ofCauchy, fun ⟨_⟩ => rfl, fun _ => rfl⟩ set_option linter.uppercaseLean3 false in #align real.equiv_Cauchy Real.equivCauchy -- irreducible doesn't work for instances: https://github.com/leanprover-community/lean/issues/511 private irreducible_def zero : ℝ := ⟨0⟩ private irreducible_def one : ℝ := ⟨1⟩ private irreducible_def add : ℝ β†’ ℝ β†’ ℝ | ⟨a⟩, ⟨b⟩ => ⟨a + b⟩ private irreducible_def neg : ℝ β†’ ℝ | ⟨a⟩ => ⟨-a⟩ private irreducible_def mul : ℝ β†’ ℝ β†’ ℝ | ⟨a⟩, ⟨b⟩ => ⟨a * b⟩ private noncomputable irreducible_def inv' : ℝ β†’ ℝ | ⟨a⟩ => ⟨a⁻¹⟩ instance : Zero ℝ := ⟨zero⟩ instance : One ℝ := ⟨one⟩ instance : Add ℝ := ⟨add⟩ instance : Neg ℝ := ⟨neg⟩ instance : Mul ℝ := ⟨mul⟩ instance : Sub ℝ := ⟨fun a b => a + -b⟩ noncomputable instance : Inv ℝ := ⟨inv'⟩ theorem ofCauchy_zero : (⟨0⟩ : ℝ) = 0 := zero_def.symm #align real.of_cauchy_zero Real.ofCauchy_zero theorem ofCauchy_one : (⟨1⟩ : ℝ) = 1 := one_def.symm #align real.of_cauchy_one Real.ofCauchy_one theorem ofCauchy_add (a b) : (⟨a + b⟩ : ℝ) = ⟨a⟩ + ⟨b⟩ := (add_def _ _).symm #align real.of_cauchy_add Real.ofCauchy_add theorem ofCauchy_neg (a) : (⟨-a⟩ : ℝ) = -⟨a⟩ := (neg_def _).symm #align real.of_cauchy_neg Real.ofCauchy_neg
Mathlib/Data/Real/Basic.lean
130
132
theorem ofCauchy_sub (a b) : (⟨a - b⟩ : ℝ) = ⟨a⟩ - ⟨b⟩ := by
rw [sub_eq_add_neg, ofCauchy_add, ofCauchy_neg] rfl
2
7.389056
1
1
1
980
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd
Mathlib/NumberTheory/Pell.lean
83
85
theorem is_pell_solution_iff_mem_unitary {d : β„€} {a : β„€βˆšd} : a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (β„€βˆšd) := by
rw [← norm_eq_one_iff_mem_unitary, norm_def, sq, sq, ← mul_assoc]
1
2.718282
0
1
7
981
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd theorem is_pell_solution_iff_mem_unitary {d : β„€} {a : β„€βˆšd} : a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (β„€βˆšd) := by rw [← norm_eq_one_iff_mem_unitary, norm_def, sq, sq, ← mul_assoc] #align pell.is_pell_solution_iff_mem_unitary Pell.is_pell_solution_iff_mem_unitary -- We use `solution₁ d` to allow for a more general structure `solution d m` that -- encodes solutions to `x^2 - d*y^2 = m` to be added later. def Solution₁ (d : β„€) : Type := β†₯(unitary (β„€βˆšd)) #align pell.solution₁ Pell.Solution₁ namespace Solution₁ variable {d : β„€} -- Porting note(https://github.com/leanprover-community/mathlib4/issues/5020): manual deriving instance instCommGroup : CommGroup (Solution₁ d) := inferInstanceAs (CommGroup (unitary (β„€βˆšd))) #align pell.solution₁.comm_group Pell.Solution₁.instCommGroup instance instHasDistribNeg : HasDistribNeg (Solution₁ d) := inferInstanceAs (HasDistribNeg (unitary (β„€βˆšd))) #align pell.solution₁.has_distrib_neg Pell.Solution₁.instHasDistribNeg instance instInhabited : Inhabited (Solution₁ d) := inferInstanceAs (Inhabited (unitary (β„€βˆšd))) #align pell.solution₁.inhabited Pell.Solution₁.instInhabited instance : Coe (Solution₁ d) (β„€βˆšd) where coe := Subtype.val protected def x (a : Solution₁ d) : β„€ := (a : β„€βˆšd).re #align pell.solution₁.x Pell.Solution₁.x protected def y (a : Solution₁ d) : β„€ := (a : β„€βˆšd).im #align pell.solution₁.y Pell.Solution₁.y theorem prop (a : Solution₁ d) : a.x ^ 2 - d * a.y ^ 2 = 1 := is_pell_solution_iff_mem_unitary.mpr a.property #align pell.solution₁.prop Pell.Solution₁.prop
Mathlib/NumberTheory/Pell.lean
133
133
theorem prop_x (a : Solution₁ d) : a.x ^ 2 = 1 + d * a.y ^ 2 := by
rw [← a.prop]; ring
1
2.718282
0
1
7
981
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd theorem is_pell_solution_iff_mem_unitary {d : β„€} {a : β„€βˆšd} : a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (β„€βˆšd) := by rw [← norm_eq_one_iff_mem_unitary, norm_def, sq, sq, ← mul_assoc] #align pell.is_pell_solution_iff_mem_unitary Pell.is_pell_solution_iff_mem_unitary -- We use `solution₁ d` to allow for a more general structure `solution d m` that -- encodes solutions to `x^2 - d*y^2 = m` to be added later. def Solution₁ (d : β„€) : Type := β†₯(unitary (β„€βˆšd)) #align pell.solution₁ Pell.Solution₁ namespace Solution₁ variable {d : β„€} -- Porting note(https://github.com/leanprover-community/mathlib4/issues/5020): manual deriving instance instCommGroup : CommGroup (Solution₁ d) := inferInstanceAs (CommGroup (unitary (β„€βˆšd))) #align pell.solution₁.comm_group Pell.Solution₁.instCommGroup instance instHasDistribNeg : HasDistribNeg (Solution₁ d) := inferInstanceAs (HasDistribNeg (unitary (β„€βˆšd))) #align pell.solution₁.has_distrib_neg Pell.Solution₁.instHasDistribNeg instance instInhabited : Inhabited (Solution₁ d) := inferInstanceAs (Inhabited (unitary (β„€βˆšd))) #align pell.solution₁.inhabited Pell.Solution₁.instInhabited instance : Coe (Solution₁ d) (β„€βˆšd) where coe := Subtype.val protected def x (a : Solution₁ d) : β„€ := (a : β„€βˆšd).re #align pell.solution₁.x Pell.Solution₁.x protected def y (a : Solution₁ d) : β„€ := (a : β„€βˆšd).im #align pell.solution₁.y Pell.Solution₁.y theorem prop (a : Solution₁ d) : a.x ^ 2 - d * a.y ^ 2 = 1 := is_pell_solution_iff_mem_unitary.mpr a.property #align pell.solution₁.prop Pell.Solution₁.prop theorem prop_x (a : Solution₁ d) : a.x ^ 2 = 1 + d * a.y ^ 2 := by rw [← a.prop]; ring #align pell.solution₁.prop_x Pell.Solution₁.prop_x
Mathlib/NumberTheory/Pell.lean
137
137
theorem prop_y (a : Solution₁ d) : d * a.y ^ 2 = a.x ^ 2 - 1 := by
rw [← a.prop]; ring
1
2.718282
0
1
7
981
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd theorem is_pell_solution_iff_mem_unitary {d : β„€} {a : β„€βˆšd} : a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (β„€βˆšd) := by rw [← norm_eq_one_iff_mem_unitary, norm_def, sq, sq, ← mul_assoc] #align pell.is_pell_solution_iff_mem_unitary Pell.is_pell_solution_iff_mem_unitary -- We use `solution₁ d` to allow for a more general structure `solution d m` that -- encodes solutions to `x^2 - d*y^2 = m` to be added later. def Solution₁ (d : β„€) : Type := β†₯(unitary (β„€βˆšd)) #align pell.solution₁ Pell.Solution₁ namespace Solution₁ variable {d : β„€} -- Porting note(https://github.com/leanprover-community/mathlib4/issues/5020): manual deriving instance instCommGroup : CommGroup (Solution₁ d) := inferInstanceAs (CommGroup (unitary (β„€βˆšd))) #align pell.solution₁.comm_group Pell.Solution₁.instCommGroup instance instHasDistribNeg : HasDistribNeg (Solution₁ d) := inferInstanceAs (HasDistribNeg (unitary (β„€βˆšd))) #align pell.solution₁.has_distrib_neg Pell.Solution₁.instHasDistribNeg instance instInhabited : Inhabited (Solution₁ d) := inferInstanceAs (Inhabited (unitary (β„€βˆšd))) #align pell.solution₁.inhabited Pell.Solution₁.instInhabited instance : Coe (Solution₁ d) (β„€βˆšd) where coe := Subtype.val protected def x (a : Solution₁ d) : β„€ := (a : β„€βˆšd).re #align pell.solution₁.x Pell.Solution₁.x protected def y (a : Solution₁ d) : β„€ := (a : β„€βˆšd).im #align pell.solution₁.y Pell.Solution₁.y theorem prop (a : Solution₁ d) : a.x ^ 2 - d * a.y ^ 2 = 1 := is_pell_solution_iff_mem_unitary.mpr a.property #align pell.solution₁.prop Pell.Solution₁.prop theorem prop_x (a : Solution₁ d) : a.x ^ 2 = 1 + d * a.y ^ 2 := by rw [← a.prop]; ring #align pell.solution₁.prop_x Pell.Solution₁.prop_x theorem prop_y (a : Solution₁ d) : d * a.y ^ 2 = a.x ^ 2 - 1 := by rw [← a.prop]; ring #align pell.solution₁.prop_y Pell.Solution₁.prop_y @[ext] theorem ext {a b : Solution₁ d} (hx : a.x = b.x) (hy : a.y = b.y) : a = b := Subtype.ext <| Zsqrtd.ext _ _ hx hy #align pell.solution₁.ext Pell.Solution₁.ext def mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : Solution₁ d where val := ⟨x, y⟩ property := is_pell_solution_iff_mem_unitary.mp prop #align pell.solution₁.mk Pell.Solution₁.mk @[simp] theorem x_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (mk x y prop).x = x := rfl #align pell.solution₁.x_mk Pell.Solution₁.x_mk @[simp] theorem y_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (mk x y prop).y = y := rfl #align pell.solution₁.y_mk Pell.Solution₁.y_mk @[simp] theorem coe_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (↑(mk x y prop) : β„€βˆšd) = ⟨x, y⟩ := Zsqrtd.ext _ _ (x_mk x y prop) (y_mk x y prop) #align pell.solution₁.coe_mk Pell.Solution₁.coe_mk @[simp] theorem x_one : (1 : Solution₁ d).x = 1 := rfl #align pell.solution₁.x_one Pell.Solution₁.x_one @[simp] theorem y_one : (1 : Solution₁ d).y = 0 := rfl #align pell.solution₁.y_one Pell.Solution₁.y_one @[simp]
Mathlib/NumberTheory/Pell.lean
178
180
theorem x_mul (a b : Solution₁ d) : (a * b).x = a.x * b.x + d * (a.y * b.y) := by
rw [← mul_assoc] rfl
2
7.389056
1
1
7
981
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd theorem is_pell_solution_iff_mem_unitary {d : β„€} {a : β„€βˆšd} : a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (β„€βˆšd) := by rw [← norm_eq_one_iff_mem_unitary, norm_def, sq, sq, ← mul_assoc] #align pell.is_pell_solution_iff_mem_unitary Pell.is_pell_solution_iff_mem_unitary -- We use `solution₁ d` to allow for a more general structure `solution d m` that -- encodes solutions to `x^2 - d*y^2 = m` to be added later. def Solution₁ (d : β„€) : Type := β†₯(unitary (β„€βˆšd)) #align pell.solution₁ Pell.Solution₁ namespace Solution₁ variable {d : β„€} -- Porting note(https://github.com/leanprover-community/mathlib4/issues/5020): manual deriving instance instCommGroup : CommGroup (Solution₁ d) := inferInstanceAs (CommGroup (unitary (β„€βˆšd))) #align pell.solution₁.comm_group Pell.Solution₁.instCommGroup instance instHasDistribNeg : HasDistribNeg (Solution₁ d) := inferInstanceAs (HasDistribNeg (unitary (β„€βˆšd))) #align pell.solution₁.has_distrib_neg Pell.Solution₁.instHasDistribNeg instance instInhabited : Inhabited (Solution₁ d) := inferInstanceAs (Inhabited (unitary (β„€βˆšd))) #align pell.solution₁.inhabited Pell.Solution₁.instInhabited instance : Coe (Solution₁ d) (β„€βˆšd) where coe := Subtype.val protected def x (a : Solution₁ d) : β„€ := (a : β„€βˆšd).re #align pell.solution₁.x Pell.Solution₁.x protected def y (a : Solution₁ d) : β„€ := (a : β„€βˆšd).im #align pell.solution₁.y Pell.Solution₁.y theorem prop (a : Solution₁ d) : a.x ^ 2 - d * a.y ^ 2 = 1 := is_pell_solution_iff_mem_unitary.mpr a.property #align pell.solution₁.prop Pell.Solution₁.prop theorem prop_x (a : Solution₁ d) : a.x ^ 2 = 1 + d * a.y ^ 2 := by rw [← a.prop]; ring #align pell.solution₁.prop_x Pell.Solution₁.prop_x theorem prop_y (a : Solution₁ d) : d * a.y ^ 2 = a.x ^ 2 - 1 := by rw [← a.prop]; ring #align pell.solution₁.prop_y Pell.Solution₁.prop_y @[ext] theorem ext {a b : Solution₁ d} (hx : a.x = b.x) (hy : a.y = b.y) : a = b := Subtype.ext <| Zsqrtd.ext _ _ hx hy #align pell.solution₁.ext Pell.Solution₁.ext def mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : Solution₁ d where val := ⟨x, y⟩ property := is_pell_solution_iff_mem_unitary.mp prop #align pell.solution₁.mk Pell.Solution₁.mk @[simp] theorem x_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (mk x y prop).x = x := rfl #align pell.solution₁.x_mk Pell.Solution₁.x_mk @[simp] theorem y_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (mk x y prop).y = y := rfl #align pell.solution₁.y_mk Pell.Solution₁.y_mk @[simp] theorem coe_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (↑(mk x y prop) : β„€βˆšd) = ⟨x, y⟩ := Zsqrtd.ext _ _ (x_mk x y prop) (y_mk x y prop) #align pell.solution₁.coe_mk Pell.Solution₁.coe_mk @[simp] theorem x_one : (1 : Solution₁ d).x = 1 := rfl #align pell.solution₁.x_one Pell.Solution₁.x_one @[simp] theorem y_one : (1 : Solution₁ d).y = 0 := rfl #align pell.solution₁.y_one Pell.Solution₁.y_one @[simp] theorem x_mul (a b : Solution₁ d) : (a * b).x = a.x * b.x + d * (a.y * b.y) := by rw [← mul_assoc] rfl #align pell.solution₁.x_mul Pell.Solution₁.x_mul @[simp] theorem y_mul (a b : Solution₁ d) : (a * b).y = a.x * b.y + a.y * b.x := rfl #align pell.solution₁.y_mul Pell.Solution₁.y_mul @[simp] theorem x_inv (a : Solution₁ d) : a⁻¹.x = a.x := rfl #align pell.solution₁.x_inv Pell.Solution₁.x_inv @[simp] theorem y_inv (a : Solution₁ d) : a⁻¹.y = -a.y := rfl #align pell.solution₁.y_inv Pell.Solution₁.y_inv @[simp] theorem x_neg (a : Solution₁ d) : (-a).x = -a.x := rfl #align pell.solution₁.x_neg Pell.Solution₁.x_neg @[simp] theorem y_neg (a : Solution₁ d) : (-a).y = -a.y := rfl #align pell.solution₁.y_neg Pell.Solution₁.y_neg
Mathlib/NumberTheory/Pell.lean
209
214
theorem eq_zero_of_d_neg (hβ‚€ : d < 0) (a : Solution₁ d) : a.x = 0 ∨ a.y = 0 := by
have h := a.prop contrapose! h have h1 := sq_pos_of_ne_zero h.1 have h2 := sq_pos_of_ne_zero h.2 nlinarith
5
148.413159
2
1
7
981
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd theorem is_pell_solution_iff_mem_unitary {d : β„€} {a : β„€βˆšd} : a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (β„€βˆšd) := by rw [← norm_eq_one_iff_mem_unitary, norm_def, sq, sq, ← mul_assoc] #align pell.is_pell_solution_iff_mem_unitary Pell.is_pell_solution_iff_mem_unitary -- We use `solution₁ d` to allow for a more general structure `solution d m` that -- encodes solutions to `x^2 - d*y^2 = m` to be added later. def Solution₁ (d : β„€) : Type := β†₯(unitary (β„€βˆšd)) #align pell.solution₁ Pell.Solution₁ namespace Solution₁ variable {d : β„€} -- Porting note(https://github.com/leanprover-community/mathlib4/issues/5020): manual deriving instance instCommGroup : CommGroup (Solution₁ d) := inferInstanceAs (CommGroup (unitary (β„€βˆšd))) #align pell.solution₁.comm_group Pell.Solution₁.instCommGroup instance instHasDistribNeg : HasDistribNeg (Solution₁ d) := inferInstanceAs (HasDistribNeg (unitary (β„€βˆšd))) #align pell.solution₁.has_distrib_neg Pell.Solution₁.instHasDistribNeg instance instInhabited : Inhabited (Solution₁ d) := inferInstanceAs (Inhabited (unitary (β„€βˆšd))) #align pell.solution₁.inhabited Pell.Solution₁.instInhabited instance : Coe (Solution₁ d) (β„€βˆšd) where coe := Subtype.val protected def x (a : Solution₁ d) : β„€ := (a : β„€βˆšd).re #align pell.solution₁.x Pell.Solution₁.x protected def y (a : Solution₁ d) : β„€ := (a : β„€βˆšd).im #align pell.solution₁.y Pell.Solution₁.y theorem prop (a : Solution₁ d) : a.x ^ 2 - d * a.y ^ 2 = 1 := is_pell_solution_iff_mem_unitary.mpr a.property #align pell.solution₁.prop Pell.Solution₁.prop theorem prop_x (a : Solution₁ d) : a.x ^ 2 = 1 + d * a.y ^ 2 := by rw [← a.prop]; ring #align pell.solution₁.prop_x Pell.Solution₁.prop_x theorem prop_y (a : Solution₁ d) : d * a.y ^ 2 = a.x ^ 2 - 1 := by rw [← a.prop]; ring #align pell.solution₁.prop_y Pell.Solution₁.prop_y @[ext] theorem ext {a b : Solution₁ d} (hx : a.x = b.x) (hy : a.y = b.y) : a = b := Subtype.ext <| Zsqrtd.ext _ _ hx hy #align pell.solution₁.ext Pell.Solution₁.ext def mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : Solution₁ d where val := ⟨x, y⟩ property := is_pell_solution_iff_mem_unitary.mp prop #align pell.solution₁.mk Pell.Solution₁.mk @[simp] theorem x_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (mk x y prop).x = x := rfl #align pell.solution₁.x_mk Pell.Solution₁.x_mk @[simp] theorem y_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (mk x y prop).y = y := rfl #align pell.solution₁.y_mk Pell.Solution₁.y_mk @[simp] theorem coe_mk (x y : β„€) (prop : x ^ 2 - d * y ^ 2 = 1) : (↑(mk x y prop) : β„€βˆšd) = ⟨x, y⟩ := Zsqrtd.ext _ _ (x_mk x y prop) (y_mk x y prop) #align pell.solution₁.coe_mk Pell.Solution₁.coe_mk @[simp] theorem x_one : (1 : Solution₁ d).x = 1 := rfl #align pell.solution₁.x_one Pell.Solution₁.x_one @[simp] theorem y_one : (1 : Solution₁ d).y = 0 := rfl #align pell.solution₁.y_one Pell.Solution₁.y_one @[simp] theorem x_mul (a b : Solution₁ d) : (a * b).x = a.x * b.x + d * (a.y * b.y) := by rw [← mul_assoc] rfl #align pell.solution₁.x_mul Pell.Solution₁.x_mul @[simp] theorem y_mul (a b : Solution₁ d) : (a * b).y = a.x * b.y + a.y * b.x := rfl #align pell.solution₁.y_mul Pell.Solution₁.y_mul @[simp] theorem x_inv (a : Solution₁ d) : a⁻¹.x = a.x := rfl #align pell.solution₁.x_inv Pell.Solution₁.x_inv @[simp] theorem y_inv (a : Solution₁ d) : a⁻¹.y = -a.y := rfl #align pell.solution₁.y_inv Pell.Solution₁.y_inv @[simp] theorem x_neg (a : Solution₁ d) : (-a).x = -a.x := rfl #align pell.solution₁.x_neg Pell.Solution₁.x_neg @[simp] theorem y_neg (a : Solution₁ d) : (-a).y = -a.y := rfl #align pell.solution₁.y_neg Pell.Solution₁.y_neg theorem eq_zero_of_d_neg (hβ‚€ : d < 0) (a : Solution₁ d) : a.x = 0 ∨ a.y = 0 := by have h := a.prop contrapose! h have h1 := sq_pos_of_ne_zero h.1 have h2 := sq_pos_of_ne_zero h.2 nlinarith #align pell.solution₁.eq_zero_of_d_neg Pell.Solution₁.eq_zero_of_d_neg
Mathlib/NumberTheory/Pell.lean
218
222
theorem x_ne_zero (hβ‚€ : 0 ≀ d) (a : Solution₁ d) : a.x β‰  0 := by
intro hx have h : 0 ≀ d * a.y ^ 2 := mul_nonneg hβ‚€ (sq_nonneg _) rw [a.prop_y, hx, sq, zero_mul, zero_sub] at h exact not_le.mpr (neg_one_lt_zero : (-1 : β„€) < 0) h
4
54.59815
2
1
7
981
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd theorem is_pell_solution_iff_mem_unitary {d : β„€} {a : β„€βˆšd} : a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (β„€βˆšd) := by rw [← norm_eq_one_iff_mem_unitary, norm_def, sq, sq, ← mul_assoc] #align pell.is_pell_solution_iff_mem_unitary Pell.is_pell_solution_iff_mem_unitary -- We use `solution₁ d` to allow for a more general structure `solution d m` that -- encodes solutions to `x^2 - d*y^2 = m` to be added later. def Solution₁ (d : β„€) : Type := β†₯(unitary (β„€βˆšd)) #align pell.solution₁ Pell.Solution₁ section Existence variable {d : β„€} open Set Real
Mathlib/NumberTheory/Pell.lean
367
434
theorem exists_of_not_isSquare (hβ‚€ : 0 < d) (hd : Β¬IsSquare d) : βˆƒ x y : β„€, x ^ 2 - d * y ^ 2 = 1 ∧ y β‰  0 := by
let ΞΎ : ℝ := √d have hΞΎ : Irrational ΞΎ := by refine irrational_nrt_of_notint_nrt 2 d (sq_sqrt <| Int.cast_nonneg.mpr hβ‚€.le) ?_ two_pos rintro ⟨x, hx⟩ refine hd ⟨x, @Int.cast_injective ℝ _ _ d (x * x) ?_⟩ rw [← sq_sqrt <| Int.cast_nonneg.mpr hβ‚€.le, Int.cast_mul, ← hx, sq] obtain ⟨M, hMβ‚βŸ© := exists_int_gt (2 * |ΞΎ| + 1) have hM : {q : β„š | |q.1 ^ 2 - d * (q.2 : β„€) ^ 2| < M}.Infinite := by refine Infinite.mono (fun q h => ?_) (infinite_rat_abs_sub_lt_one_div_den_sq_of_irrational hΞΎ) have h0 : 0 < (q.2 : ℝ) ^ 2 := pow_pos (Nat.cast_pos.mpr q.pos) 2 have h1 : (q.num : ℝ) / (q.den : ℝ) = q := mod_cast q.num_div_den rw [mem_setOf, abs_sub_comm, ← @Int.cast_lt ℝ, ← div_lt_div_right (abs_pos_of_pos h0)] push_cast rw [← abs_div, abs_sq, sub_div, mul_div_cancel_rightβ‚€ _ h0.ne', ← div_pow, h1, ← sq_sqrt (Int.cast_pos.mpr hβ‚€).le, sq_sub_sq, abs_mul, ← mul_one_div] refine mul_lt_mul'' (((abs_add ΞΎ q).trans ?_).trans_lt hM₁) h (abs_nonneg _) (abs_nonneg _) rw [two_mul, add_assoc, add_le_add_iff_left, ← sub_le_iff_le_add'] rw [mem_setOf, abs_sub_comm] at h refine (abs_sub_abs_le_abs_sub (q : ℝ) ΞΎ).trans (h.le.trans ?_) rw [div_le_one h0, one_le_sq_iff_one_le_abs, Nat.abs_cast, Nat.one_le_cast] exact q.pos obtain ⟨m, hm⟩ : βˆƒ m : β„€, {q : β„š | q.1 ^ 2 - d * (q.den : β„€) ^ 2 = m}.Infinite := by contrapose! hM simp only [not_infinite] at hM ⊒ refine (congr_arg _ (ext fun x => ?_)).mp (Finite.biUnion (finite_Ioo (-M) M) fun m _ => hM m) simp only [abs_lt, mem_setOf, mem_Ioo, mem_iUnion, exists_prop, exists_eq_right'] have hmβ‚€ : m β‰  0 := by rintro rfl obtain ⟨q, hq⟩ := hm.nonempty rw [mem_setOf, sub_eq_zero, mul_comm] at hq obtain ⟨a, ha⟩ := (Int.pow_dvd_pow_iff two_ne_zero).mp ⟨d, hq⟩ rw [ha, mul_pow, mul_right_inj' (pow_pos (Int.natCast_pos.mpr q.pos) 2).ne'] at hq exact hd ⟨a, sq a β–Έ hq.symm⟩ haveI := neZero_iff.mpr (Int.natAbs_ne_zero.mpr hmβ‚€) let f : β„š β†’ ZMod m.natAbs Γ— ZMod m.natAbs := fun q => (q.num, q.den) obtain ⟨q₁, h₁ : q₁.num ^ 2 - d * (q₁.den : β„€) ^ 2 = m, qβ‚‚, hβ‚‚ : qβ‚‚.num ^ 2 - d * (qβ‚‚.den : β„€) ^ 2 = m, hne, hqf⟩ := hm.exists_ne_map_eq_of_mapsTo (mapsTo_univ f _) finite_univ obtain ⟨hq1 : (q₁.num : ZMod m.natAbs) = qβ‚‚.num, hq2 : (q₁.den : ZMod m.natAbs) = qβ‚‚.den⟩ := Prod.ext_iff.mp hqf have hd₁ : m ∣ q₁.num * qβ‚‚.num - d * (q₁.den * qβ‚‚.den) := by rw [← Int.natAbs_dvd, ← ZMod.intCast_zmod_eq_zero_iff_dvd] push_cast rw [hq1, hq2, ← sq, ← sq] norm_cast rw [ZMod.intCast_zmod_eq_zero_iff_dvd, Int.natAbs_dvd, Nat.cast_pow, ← hβ‚‚] have hdβ‚‚ : m ∣ q₁.num * qβ‚‚.den - qβ‚‚.num * q₁.den := by rw [← Int.natAbs_dvd, ← ZMod.intCast_eq_intCast_iff_dvd_sub] push_cast rw [hq1, hq2] replace hmβ‚€ : (m : β„š) β‰  0 := Int.cast_ne_zero.mpr hmβ‚€ refine ⟨(q₁.num * qβ‚‚.num - d * (q₁.den * qβ‚‚.den)) / m, (q₁.num * qβ‚‚.den - qβ‚‚.num * q₁.den) / m, ?_, ?_⟩ Β· qify [hd₁, hdβ‚‚] field_simp [hmβ‚€] norm_cast conv_rhs => rw [sq] congr Β· rw [← h₁] Β· rw [← hβ‚‚] push_cast ring Β· qify [hdβ‚‚] refine div_ne_zero_iff.mpr ⟨?_, hmβ‚€βŸ© exact mod_cast mt sub_eq_zero.mp (mt Rat.eq_iff_mul_eq_mul.mpr hne)
66
46,071,866,343,312,910,000,000,000,000
2
1
7
981
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.MeasureTheory.Function.ConditionalExpectation.Unique import Mathlib.MeasureTheory.Function.L2Space #align_import measure_theory.function.conditional_expectation.condexp_L2 from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e" set_option linter.uppercaseLean3 false open TopologicalSpace Filter ContinuousLinearMap open scoped ENNReal Topology MeasureTheory namespace MeasureTheory variable {Ξ± E E' F G G' π•œ : Type*} {p : ℝβ‰₯0∞} [RCLike π•œ] -- π•œ for ℝ or β„‚ -- E for an inner product space [NormedAddCommGroup E] [InnerProductSpace π•œ E] [CompleteSpace E] -- E' for an inner product space on which we compute integrals [NormedAddCommGroup E'] [InnerProductSpace π•œ E'] [CompleteSpace E'] [NormedSpace ℝ E'] -- F for a Lp submodule [NormedAddCommGroup F] [NormedSpace π•œ F] -- G for a Lp add_subgroup [NormedAddCommGroup G] -- G' for integrals on a Lp add_subgroup [NormedAddCommGroup G'] [NormedSpace ℝ G'] [CompleteSpace G'] variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s t : Set Ξ±} local notation "βŸͺ" x ", " y "⟫" => @inner π•œ E _ x y local notation "βŸͺ" x ", " y "βŸ«β‚‚" => @inner π•œ (Ξ± β†’β‚‚[ΞΌ] E) _ x y -- Porting note: the argument `E` of `condexpL2` is not automatically filled in Lean 4. -- To avoid typing `(E := _)` every time it is made explicit. variable (E π•œ) noncomputable def condexpL2 (hm : m ≀ m0) : (Ξ± β†’β‚‚[ΞΌ] E) β†’L[π•œ] lpMeas E π•œ m 2 ΞΌ := @orthogonalProjection π•œ (Ξ± β†’β‚‚[ΞΌ] E) _ _ _ (lpMeas E π•œ m 2 ΞΌ) haveI : Fact (m ≀ m0) := ⟨hm⟩ inferInstance #align measure_theory.condexp_L2 MeasureTheory.condexpL2 variable {E π•œ} theorem aeStronglyMeasurable'_condexpL2 (hm : m ≀ m0) (f : Ξ± β†’β‚‚[ΞΌ] E) : AEStronglyMeasurable' (Ξ² := E) m (condexpL2 E π•œ hm f) ΞΌ := lpMeas.aeStronglyMeasurable' _ #align measure_theory.ae_strongly_measurable'_condexp_L2 MeasureTheory.aeStronglyMeasurable'_condexpL2 theorem integrableOn_condexpL2_of_measure_ne_top (hm : m ≀ m0) (hΞΌs : ΞΌ s β‰  ∞) (f : Ξ± β†’β‚‚[ΞΌ] E) : IntegrableOn (E := E) (condexpL2 E π•œ hm f) s ΞΌ := integrableOn_Lp_of_measure_ne_top (condexpL2 E π•œ hm f : Ξ± β†’β‚‚[ΞΌ] E) fact_one_le_two_ennreal.elim hΞΌs #align measure_theory.integrable_on_condexp_L2_of_measure_ne_top MeasureTheory.integrableOn_condexpL2_of_measure_ne_top theorem integrable_condexpL2_of_isFiniteMeasure (hm : m ≀ m0) [IsFiniteMeasure ΞΌ] {f : Ξ± β†’β‚‚[ΞΌ] E} : Integrable (Ξ² := E) (condexpL2 E π•œ hm f) ΞΌ := integrableOn_univ.mp <| integrableOn_condexpL2_of_measure_ne_top hm (measure_ne_top _ _) f #align measure_theory.integrable_condexp_L2_of_is_finite_measure MeasureTheory.integrable_condexpL2_of_isFiniteMeasure theorem norm_condexpL2_le_one (hm : m ≀ m0) : β€–@condexpL2 Ξ± E π•œ _ _ _ _ _ _ ΞΌ hmβ€– ≀ 1 := haveI : Fact (m ≀ m0) := ⟨hm⟩ orthogonalProjection_norm_le _ #align measure_theory.norm_condexp_L2_le_one MeasureTheory.norm_condexpL2_le_one theorem norm_condexpL2_le (hm : m ≀ m0) (f : Ξ± β†’β‚‚[ΞΌ] E) : β€–condexpL2 E π•œ hm fβ€– ≀ β€–fβ€– := ((@condexpL2 _ E π•œ _ _ _ _ _ _ ΞΌ hm).le_opNorm f).trans (mul_le_of_le_one_left (norm_nonneg _) (norm_condexpL2_le_one hm)) #align measure_theory.norm_condexp_L2_le MeasureTheory.norm_condexpL2_le
Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL2.lean
106
110
theorem snorm_condexpL2_le (hm : m ≀ m0) (f : Ξ± β†’β‚‚[ΞΌ] E) : snorm (F := E) (condexpL2 E π•œ hm f) 2 ΞΌ ≀ snorm f 2 ΞΌ := by
rw [lpMeas_coe, ← ENNReal.toReal_le_toReal (Lp.snorm_ne_top _) (Lp.snorm_ne_top _), ← Lp.norm_def, ← Lp.norm_def, Submodule.norm_coe] exact norm_condexpL2_le hm f
3
20.085537
1
1
2
982
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.MeasureTheory.Function.ConditionalExpectation.Unique import Mathlib.MeasureTheory.Function.L2Space #align_import measure_theory.function.conditional_expectation.condexp_L2 from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e" set_option linter.uppercaseLean3 false open TopologicalSpace Filter ContinuousLinearMap open scoped ENNReal Topology MeasureTheory namespace MeasureTheory variable {Ξ± E E' F G G' π•œ : Type*} {p : ℝβ‰₯0∞} [RCLike π•œ] -- π•œ for ℝ or β„‚ -- E for an inner product space [NormedAddCommGroup E] [InnerProductSpace π•œ E] [CompleteSpace E] -- E' for an inner product space on which we compute integrals [NormedAddCommGroup E'] [InnerProductSpace π•œ E'] [CompleteSpace E'] [NormedSpace ℝ E'] -- F for a Lp submodule [NormedAddCommGroup F] [NormedSpace π•œ F] -- G for a Lp add_subgroup [NormedAddCommGroup G] -- G' for integrals on a Lp add_subgroup [NormedAddCommGroup G'] [NormedSpace ℝ G'] [CompleteSpace G'] variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s t : Set Ξ±} local notation "βŸͺ" x ", " y "⟫" => @inner π•œ E _ x y local notation "βŸͺ" x ", " y "βŸ«β‚‚" => @inner π•œ (Ξ± β†’β‚‚[ΞΌ] E) _ x y -- Porting note: the argument `E` of `condexpL2` is not automatically filled in Lean 4. -- To avoid typing `(E := _)` every time it is made explicit. variable (E π•œ) noncomputable def condexpL2 (hm : m ≀ m0) : (Ξ± β†’β‚‚[ΞΌ] E) β†’L[π•œ] lpMeas E π•œ m 2 ΞΌ := @orthogonalProjection π•œ (Ξ± β†’β‚‚[ΞΌ] E) _ _ _ (lpMeas E π•œ m 2 ΞΌ) haveI : Fact (m ≀ m0) := ⟨hm⟩ inferInstance #align measure_theory.condexp_L2 MeasureTheory.condexpL2 variable {E π•œ} theorem aeStronglyMeasurable'_condexpL2 (hm : m ≀ m0) (f : Ξ± β†’β‚‚[ΞΌ] E) : AEStronglyMeasurable' (Ξ² := E) m (condexpL2 E π•œ hm f) ΞΌ := lpMeas.aeStronglyMeasurable' _ #align measure_theory.ae_strongly_measurable'_condexp_L2 MeasureTheory.aeStronglyMeasurable'_condexpL2 theorem integrableOn_condexpL2_of_measure_ne_top (hm : m ≀ m0) (hΞΌs : ΞΌ s β‰  ∞) (f : Ξ± β†’β‚‚[ΞΌ] E) : IntegrableOn (E := E) (condexpL2 E π•œ hm f) s ΞΌ := integrableOn_Lp_of_measure_ne_top (condexpL2 E π•œ hm f : Ξ± β†’β‚‚[ΞΌ] E) fact_one_le_two_ennreal.elim hΞΌs #align measure_theory.integrable_on_condexp_L2_of_measure_ne_top MeasureTheory.integrableOn_condexpL2_of_measure_ne_top theorem integrable_condexpL2_of_isFiniteMeasure (hm : m ≀ m0) [IsFiniteMeasure ΞΌ] {f : Ξ± β†’β‚‚[ΞΌ] E} : Integrable (Ξ² := E) (condexpL2 E π•œ hm f) ΞΌ := integrableOn_univ.mp <| integrableOn_condexpL2_of_measure_ne_top hm (measure_ne_top _ _) f #align measure_theory.integrable_condexp_L2_of_is_finite_measure MeasureTheory.integrable_condexpL2_of_isFiniteMeasure theorem norm_condexpL2_le_one (hm : m ≀ m0) : β€–@condexpL2 Ξ± E π•œ _ _ _ _ _ _ ΞΌ hmβ€– ≀ 1 := haveI : Fact (m ≀ m0) := ⟨hm⟩ orthogonalProjection_norm_le _ #align measure_theory.norm_condexp_L2_le_one MeasureTheory.norm_condexpL2_le_one theorem norm_condexpL2_le (hm : m ≀ m0) (f : Ξ± β†’β‚‚[ΞΌ] E) : β€–condexpL2 E π•œ hm fβ€– ≀ β€–fβ€– := ((@condexpL2 _ E π•œ _ _ _ _ _ _ ΞΌ hm).le_opNorm f).trans (mul_le_of_le_one_left (norm_nonneg _) (norm_condexpL2_le_one hm)) #align measure_theory.norm_condexp_L2_le MeasureTheory.norm_condexpL2_le theorem snorm_condexpL2_le (hm : m ≀ m0) (f : Ξ± β†’β‚‚[ΞΌ] E) : snorm (F := E) (condexpL2 E π•œ hm f) 2 ΞΌ ≀ snorm f 2 ΞΌ := by rw [lpMeas_coe, ← ENNReal.toReal_le_toReal (Lp.snorm_ne_top _) (Lp.snorm_ne_top _), ← Lp.norm_def, ← Lp.norm_def, Submodule.norm_coe] exact norm_condexpL2_le hm f #align measure_theory.snorm_condexp_L2_le MeasureTheory.snorm_condexpL2_le
Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL2.lean
113
117
theorem norm_condexpL2_coe_le (hm : m ≀ m0) (f : Ξ± β†’β‚‚[ΞΌ] E) : β€–(condexpL2 E π•œ hm f : Ξ± β†’β‚‚[ΞΌ] E)β€– ≀ β€–fβ€– := by
rw [Lp.norm_def, Lp.norm_def, ← lpMeas_coe] refine (ENNReal.toReal_le_toReal ?_ (Lp.snorm_ne_top _)).mpr (snorm_condexpL2_le hm f) exact Lp.snorm_ne_top _
3
20.085537
1
1
2
982
import Mathlib.Algebra.Group.Invertible.Basic import Mathlib.Algebra.GroupWithZero.Units.Basic #align_import algebra.invertible from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422" assert_not_exists DenselyOrdered universe u variable {Ξ± : Type u}
Mathlib/Algebra/GroupWithZero/Invertible.lean
23
28
theorem nonzero_of_invertible [MulZeroOneClass Ξ±] (a : Ξ±) [Nontrivial Ξ±] [Invertible a] : a β‰  0 := fun ha => zero_ne_one <| calc 0 = β…Ÿ a * a := by
simp [ha] _ = 1 := invOf_mul_self a
2
7.389056
1
1
1
983
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open QuotientAddGroup Metric Set Topology NNReal variable {M N : Type*} [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] noncomputable instance normOnQuotient (S : AddSubgroup M) : Norm (M β§Έ S) where norm x := sInf (norm '' { m | mk' S m = x }) #align norm_on_quotient normOnQuotient theorem AddSubgroup.quotient_norm_eq {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = sInf (norm '' { m : M | (m : M β§Έ S) = x }) := rfl #align add_subgroup.quotient_norm_eq AddSubgroup.quotient_norm_eq
Mathlib/Analysis/Normed/Group/Quotient.lean
113
115
theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = infDist 0 { m : M | (m : M β§Έ S) = x } := by
simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left]
1
2.718282
0
1
8
984
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open QuotientAddGroup Metric Set Topology NNReal variable {M N : Type*} [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] noncomputable instance normOnQuotient (S : AddSubgroup M) : Norm (M β§Έ S) where norm x := sInf (norm '' { m | mk' S m = x }) #align norm_on_quotient normOnQuotient theorem AddSubgroup.quotient_norm_eq {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = sInf (norm '' { m : M | (m : M β§Έ S) = x }) := rfl #align add_subgroup.quotient_norm_eq AddSubgroup.quotient_norm_eq theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = infDist 0 { m : M | (m : M β§Έ S) = x } := by simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left]
Mathlib/Analysis/Normed/Group/Quotient.lean
119
125
theorem QuotientAddGroup.norm_mk {S : AddSubgroup M} (x : M) : β€–(x : M β§Έ S)β€– = infDist x S := by
rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ← IsometryEquiv.preimage_symm] congr 1 with y simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg, neg_add_cancel_right, SetLike.mem_coe]
5
148.413159
2
1
8
984
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open QuotientAddGroup Metric Set Topology NNReal variable {M N : Type*} [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] noncomputable instance normOnQuotient (S : AddSubgroup M) : Norm (M β§Έ S) where norm x := sInf (norm '' { m | mk' S m = x }) #align norm_on_quotient normOnQuotient theorem AddSubgroup.quotient_norm_eq {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = sInf (norm '' { m : M | (m : M β§Έ S) = x }) := rfl #align add_subgroup.quotient_norm_eq AddSubgroup.quotient_norm_eq theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = infDist 0 { m : M | (m : M β§Έ S) = x } := by simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left] theorem QuotientAddGroup.norm_mk {S : AddSubgroup M} (x : M) : β€–(x : M β§Έ S)β€– = infDist x S := by rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ← IsometryEquiv.preimage_symm] congr 1 with y simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg, neg_add_cancel_right, SetLike.mem_coe] theorem image_norm_nonempty {S : AddSubgroup M} (x : M β§Έ S) : (norm '' { m | mk' S m = x }).Nonempty := .image _ <| Quot.exists_rep x #align image_norm_nonempty image_norm_nonempty theorem bddBelow_image_norm (s : Set M) : BddBelow (norm '' s) := ⟨0, forall_mem_image.2 fun _ _ ↦ norm_nonneg _⟩ #align bdd_below_image_norm bddBelow_image_norm theorem isGLB_quotient_norm {S : AddSubgroup M} (x : M β§Έ S) : IsGLB (norm '' { m | mk' S m = x }) (β€–xβ€–) := isGLB_csInf (image_norm_nonempty x) (bddBelow_image_norm _)
Mathlib/Analysis/Normed/Group/Quotient.lean
141
144
theorem quotient_norm_neg {S : AddSubgroup M} (x : M β§Έ S) : β€–-xβ€– = β€–xβ€– := by
simp only [AddSubgroup.quotient_norm_eq] congr 1 with r constructor <;> { rintro ⟨m, hm, rfl⟩; use -m; simpa [neg_eq_iff_eq_neg] using hm }
3
20.085537
1
1
8
984
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open QuotientAddGroup Metric Set Topology NNReal variable {M N : Type*} [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] noncomputable instance normOnQuotient (S : AddSubgroup M) : Norm (M β§Έ S) where norm x := sInf (norm '' { m | mk' S m = x }) #align norm_on_quotient normOnQuotient theorem AddSubgroup.quotient_norm_eq {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = sInf (norm '' { m : M | (m : M β§Έ S) = x }) := rfl #align add_subgroup.quotient_norm_eq AddSubgroup.quotient_norm_eq theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = infDist 0 { m : M | (m : M β§Έ S) = x } := by simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left] theorem QuotientAddGroup.norm_mk {S : AddSubgroup M} (x : M) : β€–(x : M β§Έ S)β€– = infDist x S := by rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ← IsometryEquiv.preimage_symm] congr 1 with y simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg, neg_add_cancel_right, SetLike.mem_coe] theorem image_norm_nonempty {S : AddSubgroup M} (x : M β§Έ S) : (norm '' { m | mk' S m = x }).Nonempty := .image _ <| Quot.exists_rep x #align image_norm_nonempty image_norm_nonempty theorem bddBelow_image_norm (s : Set M) : BddBelow (norm '' s) := ⟨0, forall_mem_image.2 fun _ _ ↦ norm_nonneg _⟩ #align bdd_below_image_norm bddBelow_image_norm theorem isGLB_quotient_norm {S : AddSubgroup M} (x : M β§Έ S) : IsGLB (norm '' { m | mk' S m = x }) (β€–xβ€–) := isGLB_csInf (image_norm_nonempty x) (bddBelow_image_norm _) theorem quotient_norm_neg {S : AddSubgroup M} (x : M β§Έ S) : β€–-xβ€– = β€–xβ€– := by simp only [AddSubgroup.quotient_norm_eq] congr 1 with r constructor <;> { rintro ⟨m, hm, rfl⟩; use -m; simpa [neg_eq_iff_eq_neg] using hm } #align quotient_norm_neg quotient_norm_neg
Mathlib/Analysis/Normed/Group/Quotient.lean
147
148
theorem quotient_norm_sub_rev {S : AddSubgroup M} (x y : M β§Έ S) : β€–x - yβ€– = β€–y - xβ€– := by
rw [← neg_sub, quotient_norm_neg]
1
2.718282
0
1
8
984
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open QuotientAddGroup Metric Set Topology NNReal variable {M N : Type*} [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] noncomputable instance normOnQuotient (S : AddSubgroup M) : Norm (M β§Έ S) where norm x := sInf (norm '' { m | mk' S m = x }) #align norm_on_quotient normOnQuotient theorem AddSubgroup.quotient_norm_eq {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = sInf (norm '' { m : M | (m : M β§Έ S) = x }) := rfl #align add_subgroup.quotient_norm_eq AddSubgroup.quotient_norm_eq theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = infDist 0 { m : M | (m : M β§Έ S) = x } := by simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left] theorem QuotientAddGroup.norm_mk {S : AddSubgroup M} (x : M) : β€–(x : M β§Έ S)β€– = infDist x S := by rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ← IsometryEquiv.preimage_symm] congr 1 with y simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg, neg_add_cancel_right, SetLike.mem_coe] theorem image_norm_nonempty {S : AddSubgroup M} (x : M β§Έ S) : (norm '' { m | mk' S m = x }).Nonempty := .image _ <| Quot.exists_rep x #align image_norm_nonempty image_norm_nonempty theorem bddBelow_image_norm (s : Set M) : BddBelow (norm '' s) := ⟨0, forall_mem_image.2 fun _ _ ↦ norm_nonneg _⟩ #align bdd_below_image_norm bddBelow_image_norm theorem isGLB_quotient_norm {S : AddSubgroup M} (x : M β§Έ S) : IsGLB (norm '' { m | mk' S m = x }) (β€–xβ€–) := isGLB_csInf (image_norm_nonempty x) (bddBelow_image_norm _) theorem quotient_norm_neg {S : AddSubgroup M} (x : M β§Έ S) : β€–-xβ€– = β€–xβ€– := by simp only [AddSubgroup.quotient_norm_eq] congr 1 with r constructor <;> { rintro ⟨m, hm, rfl⟩; use -m; simpa [neg_eq_iff_eq_neg] using hm } #align quotient_norm_neg quotient_norm_neg theorem quotient_norm_sub_rev {S : AddSubgroup M} (x y : M β§Έ S) : β€–x - yβ€– = β€–y - xβ€– := by rw [← neg_sub, quotient_norm_neg] #align quotient_norm_sub_rev quotient_norm_sub_rev theorem quotient_norm_mk_le (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– ≀ β€–mβ€– := csInf_le (bddBelow_image_norm _) <| Set.mem_image_of_mem _ rfl #align quotient_norm_mk_le quotient_norm_mk_le theorem quotient_norm_mk_le' (S : AddSubgroup M) (m : M) : β€–(m : M β§Έ S)β€– ≀ β€–mβ€– := quotient_norm_mk_le S m #align quotient_norm_mk_le' quotient_norm_mk_le'
Mathlib/Analysis/Normed/Group/Quotient.lean
162
166
theorem quotient_norm_mk_eq (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– = sInf ((β€–m + Β·β€–) '' S) := by
rw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg, neg_coe_set (H := S), infDist_eq_iInf] simp only [dist_eq_norm', sub_neg_eq_add, add_comm]
3
20.085537
1
1
8
984
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open QuotientAddGroup Metric Set Topology NNReal variable {M N : Type*} [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] noncomputable instance normOnQuotient (S : AddSubgroup M) : Norm (M β§Έ S) where norm x := sInf (norm '' { m | mk' S m = x }) #align norm_on_quotient normOnQuotient theorem AddSubgroup.quotient_norm_eq {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = sInf (norm '' { m : M | (m : M β§Έ S) = x }) := rfl #align add_subgroup.quotient_norm_eq AddSubgroup.quotient_norm_eq theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = infDist 0 { m : M | (m : M β§Έ S) = x } := by simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left] theorem QuotientAddGroup.norm_mk {S : AddSubgroup M} (x : M) : β€–(x : M β§Έ S)β€– = infDist x S := by rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ← IsometryEquiv.preimage_symm] congr 1 with y simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg, neg_add_cancel_right, SetLike.mem_coe] theorem image_norm_nonempty {S : AddSubgroup M} (x : M β§Έ S) : (norm '' { m | mk' S m = x }).Nonempty := .image _ <| Quot.exists_rep x #align image_norm_nonempty image_norm_nonempty theorem bddBelow_image_norm (s : Set M) : BddBelow (norm '' s) := ⟨0, forall_mem_image.2 fun _ _ ↦ norm_nonneg _⟩ #align bdd_below_image_norm bddBelow_image_norm theorem isGLB_quotient_norm {S : AddSubgroup M} (x : M β§Έ S) : IsGLB (norm '' { m | mk' S m = x }) (β€–xβ€–) := isGLB_csInf (image_norm_nonempty x) (bddBelow_image_norm _) theorem quotient_norm_neg {S : AddSubgroup M} (x : M β§Έ S) : β€–-xβ€– = β€–xβ€– := by simp only [AddSubgroup.quotient_norm_eq] congr 1 with r constructor <;> { rintro ⟨m, hm, rfl⟩; use -m; simpa [neg_eq_iff_eq_neg] using hm } #align quotient_norm_neg quotient_norm_neg theorem quotient_norm_sub_rev {S : AddSubgroup M} (x y : M β§Έ S) : β€–x - yβ€– = β€–y - xβ€– := by rw [← neg_sub, quotient_norm_neg] #align quotient_norm_sub_rev quotient_norm_sub_rev theorem quotient_norm_mk_le (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– ≀ β€–mβ€– := csInf_le (bddBelow_image_norm _) <| Set.mem_image_of_mem _ rfl #align quotient_norm_mk_le quotient_norm_mk_le theorem quotient_norm_mk_le' (S : AddSubgroup M) (m : M) : β€–(m : M β§Έ S)β€– ≀ β€–mβ€– := quotient_norm_mk_le S m #align quotient_norm_mk_le' quotient_norm_mk_le' theorem quotient_norm_mk_eq (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– = sInf ((β€–m + Β·β€–) '' S) := by rw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg, neg_coe_set (H := S), infDist_eq_iInf] simp only [dist_eq_norm', sub_neg_eq_add, add_comm] #align quotient_norm_mk_eq quotient_norm_mk_eq theorem quotient_norm_nonneg (S : AddSubgroup M) (x : M β§Έ S) : 0 ≀ β€–xβ€– := Real.sInf_nonneg _ <| forall_mem_image.2 fun _ _ ↦ norm_nonneg _ #align quotient_norm_nonneg quotient_norm_nonneg theorem norm_mk_nonneg (S : AddSubgroup M) (m : M) : 0 ≀ β€–mk' S mβ€– := quotient_norm_nonneg S _ #align norm_mk_nonneg norm_mk_nonneg
Mathlib/Analysis/Normed/Group/Quotient.lean
181
184
theorem quotient_norm_eq_zero_iff (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– = 0 ↔ m ∈ closure (S : Set M) := by
rw [mk'_apply, norm_mk, ← mem_closure_iff_infDist_zero] exact ⟨0, S.zero_mem⟩
2
7.389056
1
1
8
984
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open QuotientAddGroup Metric Set Topology NNReal variable {M N : Type*} [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] noncomputable instance normOnQuotient (S : AddSubgroup M) : Norm (M β§Έ S) where norm x := sInf (norm '' { m | mk' S m = x }) #align norm_on_quotient normOnQuotient theorem AddSubgroup.quotient_norm_eq {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = sInf (norm '' { m : M | (m : M β§Έ S) = x }) := rfl #align add_subgroup.quotient_norm_eq AddSubgroup.quotient_norm_eq theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = infDist 0 { m : M | (m : M β§Έ S) = x } := by simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left] theorem QuotientAddGroup.norm_mk {S : AddSubgroup M} (x : M) : β€–(x : M β§Έ S)β€– = infDist x S := by rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ← IsometryEquiv.preimage_symm] congr 1 with y simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg, neg_add_cancel_right, SetLike.mem_coe] theorem image_norm_nonempty {S : AddSubgroup M} (x : M β§Έ S) : (norm '' { m | mk' S m = x }).Nonempty := .image _ <| Quot.exists_rep x #align image_norm_nonempty image_norm_nonempty theorem bddBelow_image_norm (s : Set M) : BddBelow (norm '' s) := ⟨0, forall_mem_image.2 fun _ _ ↦ norm_nonneg _⟩ #align bdd_below_image_norm bddBelow_image_norm theorem isGLB_quotient_norm {S : AddSubgroup M} (x : M β§Έ S) : IsGLB (norm '' { m | mk' S m = x }) (β€–xβ€–) := isGLB_csInf (image_norm_nonempty x) (bddBelow_image_norm _) theorem quotient_norm_neg {S : AddSubgroup M} (x : M β§Έ S) : β€–-xβ€– = β€–xβ€– := by simp only [AddSubgroup.quotient_norm_eq] congr 1 with r constructor <;> { rintro ⟨m, hm, rfl⟩; use -m; simpa [neg_eq_iff_eq_neg] using hm } #align quotient_norm_neg quotient_norm_neg theorem quotient_norm_sub_rev {S : AddSubgroup M} (x y : M β§Έ S) : β€–x - yβ€– = β€–y - xβ€– := by rw [← neg_sub, quotient_norm_neg] #align quotient_norm_sub_rev quotient_norm_sub_rev theorem quotient_norm_mk_le (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– ≀ β€–mβ€– := csInf_le (bddBelow_image_norm _) <| Set.mem_image_of_mem _ rfl #align quotient_norm_mk_le quotient_norm_mk_le theorem quotient_norm_mk_le' (S : AddSubgroup M) (m : M) : β€–(m : M β§Έ S)β€– ≀ β€–mβ€– := quotient_norm_mk_le S m #align quotient_norm_mk_le' quotient_norm_mk_le' theorem quotient_norm_mk_eq (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– = sInf ((β€–m + Β·β€–) '' S) := by rw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg, neg_coe_set (H := S), infDist_eq_iInf] simp only [dist_eq_norm', sub_neg_eq_add, add_comm] #align quotient_norm_mk_eq quotient_norm_mk_eq theorem quotient_norm_nonneg (S : AddSubgroup M) (x : M β§Έ S) : 0 ≀ β€–xβ€– := Real.sInf_nonneg _ <| forall_mem_image.2 fun _ _ ↦ norm_nonneg _ #align quotient_norm_nonneg quotient_norm_nonneg theorem norm_mk_nonneg (S : AddSubgroup M) (m : M) : 0 ≀ β€–mk' S mβ€– := quotient_norm_nonneg S _ #align norm_mk_nonneg norm_mk_nonneg theorem quotient_norm_eq_zero_iff (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– = 0 ↔ m ∈ closure (S : Set M) := by rw [mk'_apply, norm_mk, ← mem_closure_iff_infDist_zero] exact ⟨0, S.zero_mem⟩ #align quotient_norm_eq_zero_iff quotient_norm_eq_zero_iff
Mathlib/Analysis/Normed/Group/Quotient.lean
187
190
theorem QuotientAddGroup.norm_lt_iff {S : AddSubgroup M} {x : M β§Έ S} {r : ℝ} : β€–xβ€– < r ↔ βˆƒ m : M, ↑m = x ∧ β€–mβ€– < r := by
rw [isGLB_lt_iff (isGLB_quotient_norm _), exists_mem_image] rfl
2
7.389056
1
1
8
984
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" noncomputable section open QuotientAddGroup Metric Set Topology NNReal variable {M N : Type*} [SeminormedAddCommGroup M] [SeminormedAddCommGroup N] noncomputable instance normOnQuotient (S : AddSubgroup M) : Norm (M β§Έ S) where norm x := sInf (norm '' { m | mk' S m = x }) #align norm_on_quotient normOnQuotient theorem AddSubgroup.quotient_norm_eq {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = sInf (norm '' { m : M | (m : M β§Έ S) = x }) := rfl #align add_subgroup.quotient_norm_eq AddSubgroup.quotient_norm_eq theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M β§Έ S) : β€–xβ€– = infDist 0 { m : M | (m : M β§Έ S) = x } := by simp only [AddSubgroup.quotient_norm_eq, infDist_eq_iInf, sInf_image', dist_zero_left] theorem QuotientAddGroup.norm_mk {S : AddSubgroup M} (x : M) : β€–(x : M β§Έ S)β€– = infDist x S := by rw [norm_eq_infDist, ← infDist_image (IsometryEquiv.subLeft x).isometry, IsometryEquiv.subLeft_apply, sub_zero, ← IsometryEquiv.preimage_symm] congr 1 with y simp only [mem_preimage, IsometryEquiv.subLeft_symm_apply, mem_setOf_eq, QuotientAddGroup.eq, neg_add, neg_neg, neg_add_cancel_right, SetLike.mem_coe] theorem image_norm_nonempty {S : AddSubgroup M} (x : M β§Έ S) : (norm '' { m | mk' S m = x }).Nonempty := .image _ <| Quot.exists_rep x #align image_norm_nonempty image_norm_nonempty theorem bddBelow_image_norm (s : Set M) : BddBelow (norm '' s) := ⟨0, forall_mem_image.2 fun _ _ ↦ norm_nonneg _⟩ #align bdd_below_image_norm bddBelow_image_norm theorem isGLB_quotient_norm {S : AddSubgroup M} (x : M β§Έ S) : IsGLB (norm '' { m | mk' S m = x }) (β€–xβ€–) := isGLB_csInf (image_norm_nonempty x) (bddBelow_image_norm _) theorem quotient_norm_neg {S : AddSubgroup M} (x : M β§Έ S) : β€–-xβ€– = β€–xβ€– := by simp only [AddSubgroup.quotient_norm_eq] congr 1 with r constructor <;> { rintro ⟨m, hm, rfl⟩; use -m; simpa [neg_eq_iff_eq_neg] using hm } #align quotient_norm_neg quotient_norm_neg theorem quotient_norm_sub_rev {S : AddSubgroup M} (x y : M β§Έ S) : β€–x - yβ€– = β€–y - xβ€– := by rw [← neg_sub, quotient_norm_neg] #align quotient_norm_sub_rev quotient_norm_sub_rev theorem quotient_norm_mk_le (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– ≀ β€–mβ€– := csInf_le (bddBelow_image_norm _) <| Set.mem_image_of_mem _ rfl #align quotient_norm_mk_le quotient_norm_mk_le theorem quotient_norm_mk_le' (S : AddSubgroup M) (m : M) : β€–(m : M β§Έ S)β€– ≀ β€–mβ€– := quotient_norm_mk_le S m #align quotient_norm_mk_le' quotient_norm_mk_le' theorem quotient_norm_mk_eq (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– = sInf ((β€–m + Β·β€–) '' S) := by rw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg, neg_coe_set (H := S), infDist_eq_iInf] simp only [dist_eq_norm', sub_neg_eq_add, add_comm] #align quotient_norm_mk_eq quotient_norm_mk_eq theorem quotient_norm_nonneg (S : AddSubgroup M) (x : M β§Έ S) : 0 ≀ β€–xβ€– := Real.sInf_nonneg _ <| forall_mem_image.2 fun _ _ ↦ norm_nonneg _ #align quotient_norm_nonneg quotient_norm_nonneg theorem norm_mk_nonneg (S : AddSubgroup M) (m : M) : 0 ≀ β€–mk' S mβ€– := quotient_norm_nonneg S _ #align norm_mk_nonneg norm_mk_nonneg theorem quotient_norm_eq_zero_iff (S : AddSubgroup M) (m : M) : β€–mk' S mβ€– = 0 ↔ m ∈ closure (S : Set M) := by rw [mk'_apply, norm_mk, ← mem_closure_iff_infDist_zero] exact ⟨0, S.zero_mem⟩ #align quotient_norm_eq_zero_iff quotient_norm_eq_zero_iff theorem QuotientAddGroup.norm_lt_iff {S : AddSubgroup M} {x : M β§Έ S} {r : ℝ} : β€–xβ€– < r ↔ βˆƒ m : M, ↑m = x ∧ β€–mβ€– < r := by rw [isGLB_lt_iff (isGLB_quotient_norm _), exists_mem_image] rfl theorem norm_mk_lt {S : AddSubgroup M} (x : M β§Έ S) {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) : βˆƒ m : M, mk' S m = x ∧ β€–mβ€– < β€–xβ€– + Ξ΅ := norm_lt_iff.1 <| lt_add_of_pos_right _ hΞ΅ #align norm_mk_lt norm_mk_lt
Mathlib/Analysis/Normed/Group/Quotient.lean
200
206
theorem norm_mk_lt' (S : AddSubgroup M) (m : M) {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) : βˆƒ s ∈ S, β€–m + sβ€– < β€–mk' S mβ€– + Ξ΅ := by
obtain ⟨n : M, hn : mk' S n = mk' S m, hn' : β€–nβ€– < β€–mk' S mβ€– + Ρ⟩ := norm_mk_lt (QuotientAddGroup.mk' S m) hΞ΅ erw [eq_comm, QuotientAddGroup.eq] at hn use -m + n, hn rwa [add_neg_cancel_left]
5
148.413159
2
1
8
984
import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Ideal.Maps import Mathlib.RingTheory.Nilpotent.Defs #align_import ring_theory.nilpotent from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff" universe u v open Function Set variable {R S : Type*} {x y : R}
Mathlib/RingTheory/Nilpotent/Lemmas.lean
25
29
theorem RingHom.ker_isRadical_iff_reduced_of_surjective {S F} [CommSemiring R] [CommRing S] [FunLike F R S] [RingHomClass F R S] {f : F} (hf : Function.Surjective f) : (RingHom.ker f).IsRadical ↔ IsReduced S := by
simp_rw [isReduced_iff, hf.forall, IsNilpotent, ← map_pow, ← RingHom.mem_ker] rfl
2
7.389056
1
1
3
985
import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Ideal.Maps import Mathlib.RingTheory.Nilpotent.Defs #align_import ring_theory.nilpotent from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff" universe u v open Function Set variable {R S : Type*} {x y : R} theorem RingHom.ker_isRadical_iff_reduced_of_surjective {S F} [CommSemiring R] [CommRing S] [FunLike F R S] [RingHomClass F R S] {f : F} (hf : Function.Surjective f) : (RingHom.ker f).IsRadical ↔ IsReduced S := by simp_rw [isReduced_iff, hf.forall, IsNilpotent, ← map_pow, ← RingHom.mem_ker] rfl #align ring_hom.ker_is_radical_iff_reduced_of_surjective RingHom.ker_isRadical_iff_reduced_of_surjective
Mathlib/RingTheory/Nilpotent/Lemmas.lean
32
35
theorem isRadical_iff_span_singleton [CommSemiring R] : IsRadical y ↔ (Ideal.span ({y} : Set R)).IsRadical := by
simp_rw [IsRadical, ← Ideal.mem_span_singleton] exact forall_swap.trans (forall_congr' fun r => exists_imp.symm)
2
7.389056
1
1
3
985
import Mathlib.LinearAlgebra.Matrix.ToLin import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Ideal.Maps import Mathlib.RingTheory.Nilpotent.Defs #align_import ring_theory.nilpotent from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff" universe u v open Function Set variable {R S : Type*} {x y : R} theorem RingHom.ker_isRadical_iff_reduced_of_surjective {S F} [CommSemiring R] [CommRing S] [FunLike F R S] [RingHomClass F R S] {f : F} (hf : Function.Surjective f) : (RingHom.ker f).IsRadical ↔ IsReduced S := by simp_rw [isReduced_iff, hf.forall, IsNilpotent, ← map_pow, ← RingHom.mem_ker] rfl #align ring_hom.ker_is_radical_iff_reduced_of_surjective RingHom.ker_isRadical_iff_reduced_of_surjective theorem isRadical_iff_span_singleton [CommSemiring R] : IsRadical y ↔ (Ideal.span ({y} : Set R)).IsRadical := by simp_rw [IsRadical, ← Ideal.mem_span_singleton] exact forall_swap.trans (forall_congr' fun r => exists_imp.symm) #align is_radical_iff_span_singleton isRadical_iff_span_singleton namespace Commute namespace Module.End lemma isNilpotent.restrict {R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M] {f : M β†’β‚—[R] M} {p : Submodule R M} (hf : MapsTo f p p) (hnil : IsNilpotent f) : IsNilpotent (f.restrict hf) := by obtain ⟨n, hn⟩ := hnil exact ⟨n, LinearMap.ext fun m ↦ by simp [LinearMap.pow_restrict n, LinearMap.restrict_apply, hn]⟩ variable {M : Type v} [Ring R] [AddCommGroup M] [Module R M] variable {f : Module.End R M} {p : Submodule R M} (hp : p ≀ p.comap f)
Mathlib/RingTheory/Nilpotent/Lemmas.lean
123
126
theorem IsNilpotent.mapQ (hnp : IsNilpotent f) : IsNilpotent (p.mapQ p f hp) := by
obtain ⟨k, hk⟩ := hnp use k simp [← p.mapQ_pow, hk]
3
20.085537
1
1
3
985
import Mathlib.Data.Prod.PProd import Mathlib.Data.Set.Countable import Mathlib.Order.Filter.Prod import Mathlib.Order.Filter.Ker #align_import order.filter.bases from "leanprover-community/mathlib"@"996b0ff959da753a555053a480f36e5f264d4207" set_option autoImplicit true open Set Filter open scoped Classical open Filter section sort variable {Ξ± Ξ² Ξ³ : Type*} {ΞΉ ΞΉ' : Sort*} structure FilterBasis (Ξ± : Type*) where sets : Set (Set Ξ±) nonempty : sets.Nonempty inter_sets {x y} : x ∈ sets β†’ y ∈ sets β†’ βˆƒ z ∈ sets, z βŠ† x ∩ y #align filter_basis FilterBasis instance FilterBasis.nonempty_sets (B : FilterBasis Ξ±) : Nonempty B.sets := B.nonempty.to_subtype #align filter_basis.nonempty_sets FilterBasis.nonempty_sets -- Porting note: this instance was reducible but it doesn't work the same way in Lean 4 instance {Ξ± : Type*} : Membership (Set Ξ±) (FilterBasis Ξ±) := ⟨fun U B => U ∈ B.sets⟩ @[simp] theorem FilterBasis.mem_sets {s : Set Ξ±} {B : FilterBasis Ξ±} : s ∈ B.sets ↔ s ∈ B := Iff.rfl -- For illustration purposes, the filter basis defining `(atTop : Filter β„•)` instance : Inhabited (FilterBasis β„•) := ⟨{ sets := range Ici nonempty := ⟨Ici 0, mem_range_self 0⟩ inter_sets := by rintro _ _ ⟨n, rfl⟩ ⟨m, rfl⟩ exact ⟨Ici (max n m), mem_range_self _, Ici_inter_Ici.symm.subset⟩ }⟩ def Filter.asBasis (f : Filter Ξ±) : FilterBasis Ξ± := ⟨f.sets, ⟨univ, univ_mem⟩, fun {x y} hx hy => ⟨x ∩ y, inter_mem hx hy, subset_rfl⟩⟩ #align filter.as_basis Filter.asBasis -- Porting note: was `protected` in Lean 3 but `protected` didn't work; removed structure Filter.IsBasis (p : ΞΉ β†’ Prop) (s : ΞΉ β†’ Set Ξ±) : Prop where nonempty : βˆƒ i, p i inter : βˆ€ {i j}, p i β†’ p j β†’ βˆƒ k, p k ∧ s k βŠ† s i ∩ s j #align filter.is_basis Filter.IsBasis namespace Filter -- Porting note: was `protected` in Lean 3 but `protected` didn't work; removed structure HasBasis (l : Filter Ξ±) (p : ΞΉ β†’ Prop) (s : ΞΉ β†’ Set Ξ±) : Prop where mem_iff' : βˆ€ t : Set Ξ±, t ∈ l ↔ βˆƒ i, p i ∧ s i βŠ† t #align filter.has_basis Filter.HasBasis section SameType variable {l l' : Filter Ξ±} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} {t : Set Ξ±} {i : ΞΉ} {p' : ΞΉ' β†’ Prop} {s' : ΞΉ' β†’ Set Ξ±} {i' : ΞΉ'} theorem hasBasis_generate (s : Set (Set Ξ±)) : (generate s).HasBasis (fun t => Set.Finite t ∧ t βŠ† s) fun t => β‹‚β‚€ t := ⟨fun U => by simp only [mem_generate_iff, exists_prop, and_assoc, and_left_comm]⟩ #align filter.has_basis_generate Filter.hasBasis_generate def FilterBasis.ofSets (s : Set (Set Ξ±)) : FilterBasis Ξ± where sets := sInter '' { t | Set.Finite t ∧ t βŠ† s } nonempty := ⟨univ, βˆ…, ⟨⟨finite_empty, empty_subset s⟩, sInter_empty⟩⟩ inter_sets := by rintro _ _ ⟨a, ⟨fina, suba⟩, rfl⟩ ⟨b, ⟨finb, subb⟩, rfl⟩ exact βŸ¨β‹‚β‚€ (a βˆͺ b), mem_image_of_mem _ ⟨fina.union finb, union_subset suba subb⟩, (sInter_union _ _).subset⟩ #align filter.filter_basis.of_sets Filter.FilterBasis.ofSets lemma FilterBasis.ofSets_sets (s : Set (Set Ξ±)) : (FilterBasis.ofSets s).sets = sInter '' { t | Set.Finite t ∧ t βŠ† s } := rfl -- Porting note: use `βˆƒ i, p i ∧ _` instead of `βˆƒ i (hi : p i), _`. theorem HasBasis.mem_iff (hl : l.HasBasis p s) : t ∈ l ↔ βˆƒ i, p i ∧ s i βŠ† t := hl.mem_iff' t #align filter.has_basis.mem_iff Filter.HasBasis.mem_iffβ‚“
Mathlib/Order/Filter/Bases.lean
268
270
theorem HasBasis.eq_of_same_basis (hl : l.HasBasis p s) (hl' : l'.HasBasis p s) : l = l' := by
ext t rw [hl.mem_iff, hl'.mem_iff]
2
7.389056
1
1
1
986
import Mathlib.CategoryTheory.Iso import Mathlib.CategoryTheory.Functor.Category import Mathlib.CategoryTheory.EqToHom #align_import category_theory.comma from "leanprover-community/mathlib"@"8a318021995877a44630c898d0b2bc376fceef3b" namespace CategoryTheory open Category -- declare the `v`'s first; see `CategoryTheory.Category` for an explanation universe v₁ vβ‚‚ v₃ vβ‚„ vβ‚… u₁ uβ‚‚ u₃ uβ‚„ uβ‚… variable {A : Type u₁} [Category.{v₁} A] variable {B : Type uβ‚‚} [Category.{vβ‚‚} B] variable {T : Type u₃} [Category.{v₃} T] variable {A' B' T' : Type*} [Category A'] [Category B'] [Category T'] structure Comma (L : A β₯€ T) (R : B β₯€ T) : Type max u₁ uβ‚‚ v₃ where left : A right : B hom : L.obj left ⟢ R.obj right #align category_theory.comma CategoryTheory.Comma -- Satisfying the inhabited linter instance Comma.inhabited [Inhabited T] : Inhabited (Comma (𝟭 T) (𝟭 T)) where default := { left := default right := default hom := πŸ™ default } #align category_theory.comma.inhabited CategoryTheory.Comma.inhabited variable {L : A β₯€ T} {R : B β₯€ T} @[ext] structure CommaMorphism (X Y : Comma L R) where left : X.left ⟢ Y.left right : X.right ⟢ Y.right w : L.map left ≫ Y.hom = X.hom ≫ R.map right := by aesop_cat #align category_theory.comma_morphism CategoryTheory.CommaMorphism -- Satisfying the inhabited linter instance CommaMorphism.inhabited [Inhabited (Comma L R)] : Inhabited (CommaMorphism (default : Comma L R) default) := ⟨{ left := πŸ™ _, right := πŸ™ _}⟩ #align category_theory.comma_morphism.inhabited CategoryTheory.CommaMorphism.inhabited attribute [reassoc (attr := simp)] CommaMorphism.w instance commaCategory : Category (Comma L R) where Hom X Y := CommaMorphism X Y id X := { left := πŸ™ X.left right := πŸ™ X.right } comp f g := { left := f.left ≫ g.left right := f.right ≫ g.right } #align category_theory.comma_category CategoryTheory.commaCategory namespace Comma section variable {X Y Z : Comma L R} {f : X ⟢ Y} {g : Y ⟢ Z} -- Porting note: this lemma was added because `CommaMorphism.ext` -- was not triggered automatically @[ext] lemma hom_ext (f g : X ⟢ Y) (h₁ : f.left = g.left) (hβ‚‚ : f.right = g.right) : f = g := CommaMorphism.ext _ _ h₁ hβ‚‚ @[simp] theorem id_left : (πŸ™ X : CommaMorphism X X).left = πŸ™ X.left := rfl #align category_theory.comma.id_left CategoryTheory.Comma.id_left @[simp] theorem id_right : (πŸ™ X : CommaMorphism X X).right = πŸ™ X.right := rfl #align category_theory.comma.id_right CategoryTheory.Comma.id_right @[simp] theorem comp_left : (f ≫ g).left = f.left ≫ g.left := rfl #align category_theory.comma.comp_left CategoryTheory.Comma.comp_left @[simp] theorem comp_right : (f ≫ g).right = f.right ≫ g.right := rfl #align category_theory.comma.comp_right CategoryTheory.Comma.comp_right end variable (L) (R) @[simps] def fst : Comma L R β₯€ A where obj X := X.left map f := f.left #align category_theory.comma.fst CategoryTheory.Comma.fst @[simps] def snd : Comma L R β₯€ B where obj X := X.right map f := f.right #align category_theory.comma.snd CategoryTheory.Comma.snd @[simps] def natTrans : fst L R β‹™ L ⟢ snd L R β‹™ R where app X := X.hom #align category_theory.comma.nat_trans CategoryTheory.Comma.natTrans @[simp]
Mathlib/CategoryTheory/Comma/Basic.lean
166
169
theorem eqToHom_left (X Y : Comma L R) (H : X = Y) : CommaMorphism.left (eqToHom H) = eqToHom (by cases H; rfl) := by
cases H rfl
2
7.389056
1
1
2
987
import Mathlib.CategoryTheory.Iso import Mathlib.CategoryTheory.Functor.Category import Mathlib.CategoryTheory.EqToHom #align_import category_theory.comma from "leanprover-community/mathlib"@"8a318021995877a44630c898d0b2bc376fceef3b" namespace CategoryTheory open Category -- declare the `v`'s first; see `CategoryTheory.Category` for an explanation universe v₁ vβ‚‚ v₃ vβ‚„ vβ‚… u₁ uβ‚‚ u₃ uβ‚„ uβ‚… variable {A : Type u₁} [Category.{v₁} A] variable {B : Type uβ‚‚} [Category.{vβ‚‚} B] variable {T : Type u₃} [Category.{v₃} T] variable {A' B' T' : Type*} [Category A'] [Category B'] [Category T'] structure Comma (L : A β₯€ T) (R : B β₯€ T) : Type max u₁ uβ‚‚ v₃ where left : A right : B hom : L.obj left ⟢ R.obj right #align category_theory.comma CategoryTheory.Comma -- Satisfying the inhabited linter instance Comma.inhabited [Inhabited T] : Inhabited (Comma (𝟭 T) (𝟭 T)) where default := { left := default right := default hom := πŸ™ default } #align category_theory.comma.inhabited CategoryTheory.Comma.inhabited variable {L : A β₯€ T} {R : B β₯€ T} @[ext] structure CommaMorphism (X Y : Comma L R) where left : X.left ⟢ Y.left right : X.right ⟢ Y.right w : L.map left ≫ Y.hom = X.hom ≫ R.map right := by aesop_cat #align category_theory.comma_morphism CategoryTheory.CommaMorphism -- Satisfying the inhabited linter instance CommaMorphism.inhabited [Inhabited (Comma L R)] : Inhabited (CommaMorphism (default : Comma L R) default) := ⟨{ left := πŸ™ _, right := πŸ™ _}⟩ #align category_theory.comma_morphism.inhabited CategoryTheory.CommaMorphism.inhabited attribute [reassoc (attr := simp)] CommaMorphism.w instance commaCategory : Category (Comma L R) where Hom X Y := CommaMorphism X Y id X := { left := πŸ™ X.left right := πŸ™ X.right } comp f g := { left := f.left ≫ g.left right := f.right ≫ g.right } #align category_theory.comma_category CategoryTheory.commaCategory namespace Comma section variable {X Y Z : Comma L R} {f : X ⟢ Y} {g : Y ⟢ Z} -- Porting note: this lemma was added because `CommaMorphism.ext` -- was not triggered automatically @[ext] lemma hom_ext (f g : X ⟢ Y) (h₁ : f.left = g.left) (hβ‚‚ : f.right = g.right) : f = g := CommaMorphism.ext _ _ h₁ hβ‚‚ @[simp] theorem id_left : (πŸ™ X : CommaMorphism X X).left = πŸ™ X.left := rfl #align category_theory.comma.id_left CategoryTheory.Comma.id_left @[simp] theorem id_right : (πŸ™ X : CommaMorphism X X).right = πŸ™ X.right := rfl #align category_theory.comma.id_right CategoryTheory.Comma.id_right @[simp] theorem comp_left : (f ≫ g).left = f.left ≫ g.left := rfl #align category_theory.comma.comp_left CategoryTheory.Comma.comp_left @[simp] theorem comp_right : (f ≫ g).right = f.right ≫ g.right := rfl #align category_theory.comma.comp_right CategoryTheory.Comma.comp_right end variable (L) (R) @[simps] def fst : Comma L R β₯€ A where obj X := X.left map f := f.left #align category_theory.comma.fst CategoryTheory.Comma.fst @[simps] def snd : Comma L R β₯€ B where obj X := X.right map f := f.right #align category_theory.comma.snd CategoryTheory.Comma.snd @[simps] def natTrans : fst L R β‹™ L ⟢ snd L R β‹™ R where app X := X.hom #align category_theory.comma.nat_trans CategoryTheory.Comma.natTrans @[simp] theorem eqToHom_left (X Y : Comma L R) (H : X = Y) : CommaMorphism.left (eqToHom H) = eqToHom (by cases H; rfl) := by cases H rfl #align category_theory.comma.eq_to_hom_left CategoryTheory.Comma.eqToHom_left @[simp]
Mathlib/CategoryTheory/Comma/Basic.lean
173
176
theorem eqToHom_right (X Y : Comma L R) (H : X = Y) : CommaMorphism.right (eqToHom H) = eqToHom (by cases H; rfl) := by
cases H rfl
2
7.389056
1
1
2
987
import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Order.Filter.Pointwise import Mathlib.Topology.Algebra.MulAction import Mathlib.Algebra.BigOperators.Pi import Mathlib.Topology.ContinuousFunction.Basic import Mathlib.Algebra.Group.ULift #align_import topology.algebra.monoid from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa5353" universe u v open scoped Classical open Set Filter TopologicalSpace open scoped Classical open Topology Pointwise variable {ΞΉ Ξ± M N X : Type*} [TopologicalSpace X] @[to_additive (attr := continuity, fun_prop)] theorem continuous_one [TopologicalSpace M] [One M] : Continuous (1 : X β†’ M) := @continuous_const _ _ _ _ 1 #align continuous_one continuous_one #align continuous_zero continuous_zero class ContinuousAdd (M : Type u) [TopologicalSpace M] [Add M] : Prop where continuous_add : Continuous fun p : M Γ— M => p.1 + p.2 #align has_continuous_add ContinuousAdd @[to_additive] class ContinuousMul (M : Type u) [TopologicalSpace M] [Mul M] : Prop where continuous_mul : Continuous fun p : M Γ— M => p.1 * p.2 #align has_continuous_mul ContinuousMul section ContinuousMul variable [TopologicalSpace M] [Mul M] [ContinuousMul M] @[to_additive] instance : ContinuousMul Mα΅’α΅ˆ := β€ΉContinuousMul Mβ€Ί @[to_additive (attr := continuity)] theorem continuous_mul : Continuous fun p : M Γ— M => p.1 * p.2 := ContinuousMul.continuous_mul #align continuous_mul continuous_mul #align continuous_add continuous_add @[to_additive] instance : ContinuousMul (ULift.{u} M) := by constructor apply continuous_uLift_up.comp exact continuous_mul.compβ‚‚ (continuous_uLift_down.comp continuous_fst) (continuous_uLift_down.comp continuous_snd) @[to_additive] instance ContinuousMul.to_continuousSMul : ContinuousSMul M M := ⟨continuous_mul⟩ #align has_continuous_mul.to_has_continuous_smul ContinuousMul.to_continuousSMul #align has_continuous_add.to_has_continuous_vadd ContinuousAdd.to_continuousVAdd @[to_additive] instance ContinuousMul.to_continuousSMul_op : ContinuousSMul Mᡐᡒᡖ M := ⟨show Continuous ((fun p : M Γ— M => p.1 * p.2) ∘ Prod.swap ∘ Prod.map MulOpposite.unop id) from continuous_mul.comp <| continuous_swap.comp <| Continuous.prod_map MulOpposite.continuous_unop continuous_id⟩ #align has_continuous_mul.to_has_continuous_smul_op ContinuousMul.to_continuousSMul_op #align has_continuous_add.to_has_continuous_vadd_op ContinuousAdd.to_continuousVAdd_op @[to_additive (attr := continuity, fun_prop)] theorem Continuous.mul {f g : X β†’ M} (hf : Continuous f) (hg : Continuous g) : Continuous fun x => f x * g x := continuous_mul.comp (hf.prod_mk hg : _) #align continuous.mul Continuous.mul #align continuous.add Continuous.add @[to_additive (attr := continuity)] theorem continuous_mul_left (a : M) : Continuous fun b : M => a * b := continuous_const.mul continuous_id #align continuous_mul_left continuous_mul_left #align continuous_add_left continuous_add_left @[to_additive (attr := continuity)] theorem continuous_mul_right (a : M) : Continuous fun b : M => b * a := continuous_id.mul continuous_const #align continuous_mul_right continuous_mul_right #align continuous_add_right continuous_add_right @[to_additive (attr := fun_prop)] theorem ContinuousOn.mul {f g : X β†’ M} {s : Set X} (hf : ContinuousOn f s) (hg : ContinuousOn g s) : ContinuousOn (fun x => f x * g x) s := (continuous_mul.comp_continuousOn (hf.prod hg) : _) #align continuous_on.mul ContinuousOn.mul #align continuous_on.add ContinuousOn.add @[to_additive] theorem tendsto_mul {a b : M} : Tendsto (fun p : M Γ— M => p.fst * p.snd) (𝓝 (a, b)) (𝓝 (a * b)) := continuous_iff_continuousAt.mp ContinuousMul.continuous_mul (a, b) #align tendsto_mul tendsto_mul #align tendsto_add tendsto_add @[to_additive] theorem Filter.Tendsto.mul {f g : Ξ± β†’ M} {x : Filter Ξ±} {a b : M} (hf : Tendsto f x (𝓝 a)) (hg : Tendsto g x (𝓝 b)) : Tendsto (fun x => f x * g x) x (𝓝 (a * b)) := tendsto_mul.comp (hf.prod_mk_nhds hg) #align filter.tendsto.mul Filter.Tendsto.mul #align filter.tendsto.add Filter.Tendsto.add @[to_additive] theorem Filter.Tendsto.const_mul (b : M) {c : M} {f : Ξ± β†’ M} {l : Filter Ξ±} (h : Tendsto (fun k : Ξ± => f k) l (𝓝 c)) : Tendsto (fun k : Ξ± => b * f k) l (𝓝 (b * c)) := tendsto_const_nhds.mul h #align filter.tendsto.const_mul Filter.Tendsto.const_mul #align filter.tendsto.const_add Filter.Tendsto.const_add @[to_additive] theorem Filter.Tendsto.mul_const (b : M) {c : M} {f : Ξ± β†’ M} {l : Filter Ξ±} (h : Tendsto (fun k : Ξ± => f k) l (𝓝 c)) : Tendsto (fun k : Ξ± => f k * b) l (𝓝 (c * b)) := h.mul tendsto_const_nhds #align filter.tendsto.mul_const Filter.Tendsto.mul_const #align filter.tendsto.add_const Filter.Tendsto.add_const @[to_additive]
Mathlib/Topology/Algebra/Monoid.lean
150
152
theorem le_nhds_mul (a b : M) : 𝓝 a * 𝓝 b ≀ 𝓝 (a * b) := by
rw [← mapβ‚‚_mul, ← map_uncurry_prod, ← nhds_prod_eq] exact continuous_mul.tendsto _
2
7.389056
1
1
1
988
import Mathlib.CategoryTheory.Sites.Canonical #align_import category_theory.sites.types from "leanprover-community/mathlib"@"9f9015c645d85695581237cc761981036be8bd37" universe u namespace CategoryTheory --open scoped CategoryTheory.Type -- Porting note: unknown namespace def typesGrothendieckTopology : GrothendieckTopology (Type u) where sieves Ξ± S := βˆ€ x : Ξ±, S fun _ : PUnit => x top_mem' _ _ := trivial pullback_stable' _ _ _ f hs x := hs (f x) transitive' _ _ hs _ hr x := hr (hs x) PUnit.unit #align category_theory.types_grothendieck_topology CategoryTheory.typesGrothendieckTopology @[simps] def discreteSieve (Ξ± : Type u) : Sieve Ξ± where arrows _ f := βˆƒ x, βˆ€ y, f y = x downward_closed := fun ⟨x, hx⟩ g => ⟨x, fun y => hx <| g y⟩ #align category_theory.discrete_sieve CategoryTheory.discreteSieve theorem discreteSieve_mem (Ξ± : Type u) : discreteSieve Ξ± ∈ typesGrothendieckTopology Ξ± := fun x => ⟨x, fun _ => rfl⟩ #align category_theory.discrete_sieve_mem CategoryTheory.discreteSieve_mem def discretePresieve (Ξ± : Type u) : Presieve Ξ± := fun Ξ² _ => βˆƒ x : Ξ², βˆ€ y : Ξ², y = x #align category_theory.discrete_presieve CategoryTheory.discretePresieve theorem generate_discretePresieve_mem (Ξ± : Type u) : Sieve.generate (discretePresieve Ξ±) ∈ typesGrothendieckTopology Ξ± := fun x => ⟨PUnit, id, fun _ => x, ⟨PUnit.unit, fun _ => Subsingleton.elim _ _⟩, rfl⟩ #align category_theory.generate_discrete_presieve_mem CategoryTheory.generate_discretePresieve_mem open Presieve theorem isSheaf_yoneda' {Ξ± : Type u} : IsSheaf typesGrothendieckTopology (yoneda.obj Ξ±) := fun Ξ² S hs x hx => ⟨fun y => x _ (hs y) PUnit.unit, fun Ξ³ f h => funext fun z => by convert congr_fun (hx (πŸ™ _) (fun _ => z) (hs <| f z) h rfl) PUnit.unit using 1, fun f hf => funext fun y => by convert congr_fun (hf _ (hs y)) PUnit.unit⟩ #align category_theory.is_sheaf_yoneda' CategoryTheory.isSheaf_yoneda' @[simps] def yoneda' : Type u β₯€ SheafOfTypes typesGrothendieckTopology where obj Ξ± := ⟨yoneda.obj Ξ±, isSheaf_yoneda'⟩ map f := ⟨yoneda.map f⟩ #align category_theory.yoneda' CategoryTheory.yoneda' @[simp] theorem yoneda'_comp : yoneda'.{u} β‹™ sheafOfTypesToPresheaf _ = yoneda := rfl #align category_theory.yoneda'_comp CategoryTheory.yoneda'_comp open Opposite def eval (P : Type uα΅’α΅– β₯€ Type u) (Ξ± : Type u) (s : P.obj (op Ξ±)) (x : Ξ±) : P.obj (op PUnit) := P.map (β†Ύfun _ => x).op s #align category_theory.eval CategoryTheory.eval noncomputable def typesGlue (S : Type uα΅’α΅– β₯€ Type u) (hs : IsSheaf typesGrothendieckTopology S) (Ξ± : Type u) (f : Ξ± β†’ S.obj (op PUnit)) : S.obj (op Ξ±) := (hs.isSheafFor _ _ (generate_discretePresieve_mem Ξ±)).amalgamate (fun Ξ² g hg => S.map (β†Ύfun _ => PUnit.unit).op <| f <| g <| Classical.choose hg) fun Ξ² Ξ³ Ξ΄ g₁ gβ‚‚ f₁ fβ‚‚ hf₁ hfβ‚‚ h => (hs.isSheafFor _ _ (generate_discretePresieve_mem Ξ΄)).isSeparatedFor.ext fun Ξ΅ g ⟨x, _⟩ => by have : f₁ (Classical.choose hf₁) = fβ‚‚ (Classical.choose hfβ‚‚) := Classical.choose_spec hf₁ (g₁ <| g x) β–Έ Classical.choose_spec hfβ‚‚ (gβ‚‚ <| g x) β–Έ congr_fun h _ simp_rw [← FunctorToTypes.map_comp_apply, this, ← op_comp] rfl #align category_theory.types_glue CategoryTheory.typesGlue
Mathlib/CategoryTheory/Sites/Types.lean
102
105
theorem eval_typesGlue {S hs Ξ±} (f) : eval.{u} S Ξ± (typesGlue S hs Ξ± f) = f := by
funext x apply (IsSheafFor.valid_glue _ _ _ <| ⟨PUnit.unit, fun _ => Subsingleton.elim _ _⟩).trans convert FunctorToTypes.map_id_apply S _
3
20.085537
1
1
3
989
import Mathlib.CategoryTheory.Sites.Canonical #align_import category_theory.sites.types from "leanprover-community/mathlib"@"9f9015c645d85695581237cc761981036be8bd37" universe u namespace CategoryTheory --open scoped CategoryTheory.Type -- Porting note: unknown namespace def typesGrothendieckTopology : GrothendieckTopology (Type u) where sieves Ξ± S := βˆ€ x : Ξ±, S fun _ : PUnit => x top_mem' _ _ := trivial pullback_stable' _ _ _ f hs x := hs (f x) transitive' _ _ hs _ hr x := hr (hs x) PUnit.unit #align category_theory.types_grothendieck_topology CategoryTheory.typesGrothendieckTopology @[simps] def discreteSieve (Ξ± : Type u) : Sieve Ξ± where arrows _ f := βˆƒ x, βˆ€ y, f y = x downward_closed := fun ⟨x, hx⟩ g => ⟨x, fun y => hx <| g y⟩ #align category_theory.discrete_sieve CategoryTheory.discreteSieve theorem discreteSieve_mem (Ξ± : Type u) : discreteSieve Ξ± ∈ typesGrothendieckTopology Ξ± := fun x => ⟨x, fun _ => rfl⟩ #align category_theory.discrete_sieve_mem CategoryTheory.discreteSieve_mem def discretePresieve (Ξ± : Type u) : Presieve Ξ± := fun Ξ² _ => βˆƒ x : Ξ², βˆ€ y : Ξ², y = x #align category_theory.discrete_presieve CategoryTheory.discretePresieve theorem generate_discretePresieve_mem (Ξ± : Type u) : Sieve.generate (discretePresieve Ξ±) ∈ typesGrothendieckTopology Ξ± := fun x => ⟨PUnit, id, fun _ => x, ⟨PUnit.unit, fun _ => Subsingleton.elim _ _⟩, rfl⟩ #align category_theory.generate_discrete_presieve_mem CategoryTheory.generate_discretePresieve_mem open Presieve theorem isSheaf_yoneda' {Ξ± : Type u} : IsSheaf typesGrothendieckTopology (yoneda.obj Ξ±) := fun Ξ² S hs x hx => ⟨fun y => x _ (hs y) PUnit.unit, fun Ξ³ f h => funext fun z => by convert congr_fun (hx (πŸ™ _) (fun _ => z) (hs <| f z) h rfl) PUnit.unit using 1, fun f hf => funext fun y => by convert congr_fun (hf _ (hs y)) PUnit.unit⟩ #align category_theory.is_sheaf_yoneda' CategoryTheory.isSheaf_yoneda' @[simps] def yoneda' : Type u β₯€ SheafOfTypes typesGrothendieckTopology where obj Ξ± := ⟨yoneda.obj Ξ±, isSheaf_yoneda'⟩ map f := ⟨yoneda.map f⟩ #align category_theory.yoneda' CategoryTheory.yoneda' @[simp] theorem yoneda'_comp : yoneda'.{u} β‹™ sheafOfTypesToPresheaf _ = yoneda := rfl #align category_theory.yoneda'_comp CategoryTheory.yoneda'_comp open Opposite def eval (P : Type uα΅’α΅– β₯€ Type u) (Ξ± : Type u) (s : P.obj (op Ξ±)) (x : Ξ±) : P.obj (op PUnit) := P.map (β†Ύfun _ => x).op s #align category_theory.eval CategoryTheory.eval noncomputable def typesGlue (S : Type uα΅’α΅– β₯€ Type u) (hs : IsSheaf typesGrothendieckTopology S) (Ξ± : Type u) (f : Ξ± β†’ S.obj (op PUnit)) : S.obj (op Ξ±) := (hs.isSheafFor _ _ (generate_discretePresieve_mem Ξ±)).amalgamate (fun Ξ² g hg => S.map (β†Ύfun _ => PUnit.unit).op <| f <| g <| Classical.choose hg) fun Ξ² Ξ³ Ξ΄ g₁ gβ‚‚ f₁ fβ‚‚ hf₁ hfβ‚‚ h => (hs.isSheafFor _ _ (generate_discretePresieve_mem Ξ΄)).isSeparatedFor.ext fun Ξ΅ g ⟨x, _⟩ => by have : f₁ (Classical.choose hf₁) = fβ‚‚ (Classical.choose hfβ‚‚) := Classical.choose_spec hf₁ (g₁ <| g x) β–Έ Classical.choose_spec hfβ‚‚ (gβ‚‚ <| g x) β–Έ congr_fun h _ simp_rw [← FunctorToTypes.map_comp_apply, this, ← op_comp] rfl #align category_theory.types_glue CategoryTheory.typesGlue theorem eval_typesGlue {S hs Ξ±} (f) : eval.{u} S Ξ± (typesGlue S hs Ξ± f) = f := by funext x apply (IsSheafFor.valid_glue _ _ _ <| ⟨PUnit.unit, fun _ => Subsingleton.elim _ _⟩).trans convert FunctorToTypes.map_id_apply S _ #align category_theory.eval_types_glue CategoryTheory.eval_typesGlue
Mathlib/CategoryTheory/Sites/Types.lean
108
117
theorem typesGlue_eval {S hs Ξ±} (s) : typesGlue.{u} S hs Ξ± (eval S Ξ± s) = s := by
apply (hs.isSheafFor _ _ (generate_discretePresieve_mem Ξ±)).isSeparatedFor.ext intro Ξ² f hf apply (IsSheafFor.valid_glue _ _ _ hf).trans apply (FunctorToTypes.map_comp_apply _ _ _ _).symm.trans rw [← op_comp] --congr 2 -- Porting note: This tactic didn't work. Find an alternative. suffices ((β†Ύfun _ ↦ PUnit.unit) ≫ β†Ύfun _ ↦ f (Classical.choose hf)) = f by rw [this] funext x exact congr_arg f (Classical.choose_spec hf x).symm
9
8,103.083928
2
1
3
989
import Mathlib.CategoryTheory.Sites.Canonical #align_import category_theory.sites.types from "leanprover-community/mathlib"@"9f9015c645d85695581237cc761981036be8bd37" universe u namespace CategoryTheory --open scoped CategoryTheory.Type -- Porting note: unknown namespace def typesGrothendieckTopology : GrothendieckTopology (Type u) where sieves Ξ± S := βˆ€ x : Ξ±, S fun _ : PUnit => x top_mem' _ _ := trivial pullback_stable' _ _ _ f hs x := hs (f x) transitive' _ _ hs _ hr x := hr (hs x) PUnit.unit #align category_theory.types_grothendieck_topology CategoryTheory.typesGrothendieckTopology @[simps] def discreteSieve (Ξ± : Type u) : Sieve Ξ± where arrows _ f := βˆƒ x, βˆ€ y, f y = x downward_closed := fun ⟨x, hx⟩ g => ⟨x, fun y => hx <| g y⟩ #align category_theory.discrete_sieve CategoryTheory.discreteSieve theorem discreteSieve_mem (Ξ± : Type u) : discreteSieve Ξ± ∈ typesGrothendieckTopology Ξ± := fun x => ⟨x, fun _ => rfl⟩ #align category_theory.discrete_sieve_mem CategoryTheory.discreteSieve_mem def discretePresieve (Ξ± : Type u) : Presieve Ξ± := fun Ξ² _ => βˆƒ x : Ξ², βˆ€ y : Ξ², y = x #align category_theory.discrete_presieve CategoryTheory.discretePresieve theorem generate_discretePresieve_mem (Ξ± : Type u) : Sieve.generate (discretePresieve Ξ±) ∈ typesGrothendieckTopology Ξ± := fun x => ⟨PUnit, id, fun _ => x, ⟨PUnit.unit, fun _ => Subsingleton.elim _ _⟩, rfl⟩ #align category_theory.generate_discrete_presieve_mem CategoryTheory.generate_discretePresieve_mem open Presieve theorem isSheaf_yoneda' {Ξ± : Type u} : IsSheaf typesGrothendieckTopology (yoneda.obj Ξ±) := fun Ξ² S hs x hx => ⟨fun y => x _ (hs y) PUnit.unit, fun Ξ³ f h => funext fun z => by convert congr_fun (hx (πŸ™ _) (fun _ => z) (hs <| f z) h rfl) PUnit.unit using 1, fun f hf => funext fun y => by convert congr_fun (hf _ (hs y)) PUnit.unit⟩ #align category_theory.is_sheaf_yoneda' CategoryTheory.isSheaf_yoneda' @[simps] def yoneda' : Type u β₯€ SheafOfTypes typesGrothendieckTopology where obj Ξ± := ⟨yoneda.obj Ξ±, isSheaf_yoneda'⟩ map f := ⟨yoneda.map f⟩ #align category_theory.yoneda' CategoryTheory.yoneda' @[simp] theorem yoneda'_comp : yoneda'.{u} β‹™ sheafOfTypesToPresheaf _ = yoneda := rfl #align category_theory.yoneda'_comp CategoryTheory.yoneda'_comp open Opposite def eval (P : Type uα΅’α΅– β₯€ Type u) (Ξ± : Type u) (s : P.obj (op Ξ±)) (x : Ξ±) : P.obj (op PUnit) := P.map (β†Ύfun _ => x).op s #align category_theory.eval CategoryTheory.eval noncomputable def typesGlue (S : Type uα΅’α΅– β₯€ Type u) (hs : IsSheaf typesGrothendieckTopology S) (Ξ± : Type u) (f : Ξ± β†’ S.obj (op PUnit)) : S.obj (op Ξ±) := (hs.isSheafFor _ _ (generate_discretePresieve_mem Ξ±)).amalgamate (fun Ξ² g hg => S.map (β†Ύfun _ => PUnit.unit).op <| f <| g <| Classical.choose hg) fun Ξ² Ξ³ Ξ΄ g₁ gβ‚‚ f₁ fβ‚‚ hf₁ hfβ‚‚ h => (hs.isSheafFor _ _ (generate_discretePresieve_mem Ξ΄)).isSeparatedFor.ext fun Ξ΅ g ⟨x, _⟩ => by have : f₁ (Classical.choose hf₁) = fβ‚‚ (Classical.choose hfβ‚‚) := Classical.choose_spec hf₁ (g₁ <| g x) β–Έ Classical.choose_spec hfβ‚‚ (gβ‚‚ <| g x) β–Έ congr_fun h _ simp_rw [← FunctorToTypes.map_comp_apply, this, ← op_comp] rfl #align category_theory.types_glue CategoryTheory.typesGlue theorem eval_typesGlue {S hs Ξ±} (f) : eval.{u} S Ξ± (typesGlue S hs Ξ± f) = f := by funext x apply (IsSheafFor.valid_glue _ _ _ <| ⟨PUnit.unit, fun _ => Subsingleton.elim _ _⟩).trans convert FunctorToTypes.map_id_apply S _ #align category_theory.eval_types_glue CategoryTheory.eval_typesGlue theorem typesGlue_eval {S hs Ξ±} (s) : typesGlue.{u} S hs Ξ± (eval S Ξ± s) = s := by apply (hs.isSheafFor _ _ (generate_discretePresieve_mem Ξ±)).isSeparatedFor.ext intro Ξ² f hf apply (IsSheafFor.valid_glue _ _ _ hf).trans apply (FunctorToTypes.map_comp_apply _ _ _ _).symm.trans rw [← op_comp] --congr 2 -- Porting note: This tactic didn't work. Find an alternative. suffices ((β†Ύfun _ ↦ PUnit.unit) ≫ β†Ύfun _ ↦ f (Classical.choose hf)) = f by rw [this] funext x exact congr_arg f (Classical.choose_spec hf x).symm #align category_theory.types_glue_eval CategoryTheory.typesGlue_eval @[simps] noncomputable def evalEquiv (S : Type uα΅’α΅– β₯€ Type u) (hs : IsSheaf typesGrothendieckTopology S) (Ξ± : Type u) : S.obj (op Ξ±) ≃ (Ξ± β†’ S.obj (op PUnit)) where toFun := eval S Ξ± invFun := typesGlue S hs Ξ± left_inv := typesGlue_eval right_inv := eval_typesGlue #align category_theory.eval_equiv CategoryTheory.evalEquiv
Mathlib/CategoryTheory/Sites/Types.lean
130
132
theorem eval_map (S : Type uα΅’α΅– β₯€ Type u) (Ξ± Ξ²) (f : Ξ² ⟢ Ξ±) (s x) : eval S Ξ² (S.map f.op s) x = eval S Ξ± s (f x) := by
simp_rw [eval, ← FunctorToTypes.map_comp_apply, ← op_comp]; rfl
1
2.718282
0
1
3
989
import Mathlib.Analysis.NormedSpace.LinearIsometry import Mathlib.Analysis.NormedSpace.ContinuousLinearMap import Mathlib.Analysis.NormedSpace.Basic variable {π•œ E : Type*} namespace LinearMap variable (π•œ) section Seminormed variable [NormedDivisionRing π•œ] [SeminormedAddCommGroup E] [Module π•œ E] [BoundedSMul π•œ E]
Mathlib/Analysis/NormedSpace/Span.lean
36
39
theorem toSpanSingleton_homothety (x : E) (c : π•œ) : β€–LinearMap.toSpanSingleton π•œ E x cβ€– = β€–xβ€– * β€–cβ€– := by
rw [mul_comm] exact norm_smul _ _
2
7.389056
1
1
1
990
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ΞΉ : Type*} {G : ΞΉ β†’ Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Con (Coprod (CoprodI G) H) := conGen (fun x y : Coprod (CoprodI G) H => βˆƒ i x', x = inl (of (Ο† i x')) ∧ y = inr x') def PushoutI [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Type _ := (PushoutI.con Ο†).Quotient namespace PushoutI section Monoid variable [βˆ€ i, Monoid (G i)] [Monoid H] {Ο† : βˆ€ i, H β†’* G i} protected instance mul : Mul (PushoutI Ο†) := by delta PushoutI; infer_instance protected instance one : One (PushoutI Ο†) := by delta PushoutI; infer_instance instance monoid : Monoid (PushoutI Ο†) := { Con.monoid _ with toMul := PushoutI.mul toOne := PushoutI.one } def of (i : ΞΉ) : G i β†’* PushoutI Ο† := (Con.mk' _).comp <| inl.comp CoprodI.of variable (Ο†) in def base : H β†’* PushoutI Ο† := (Con.mk' _).comp inr
Mathlib/GroupTheory/PushoutI.lean
88
93
theorem of_comp_eq_base (i : ΞΉ) : (of i).comp (Ο† i) = (base Ο†) := by
ext x apply (Con.eq _).2 refine ConGen.Rel.of _ _ ?_ simp only [MonoidHom.comp_apply, Set.mem_iUnion, Set.mem_range] exact ⟨_, _, rfl, rfl⟩
5
148.413159
2
1
6
991
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ΞΉ : Type*} {G : ΞΉ β†’ Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Con (Coprod (CoprodI G) H) := conGen (fun x y : Coprod (CoprodI G) H => βˆƒ i x', x = inl (of (Ο† i x')) ∧ y = inr x') def PushoutI [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Type _ := (PushoutI.con Ο†).Quotient namespace PushoutI section Monoid variable [βˆ€ i, Monoid (G i)] [Monoid H] {Ο† : βˆ€ i, H β†’* G i} protected instance mul : Mul (PushoutI Ο†) := by delta PushoutI; infer_instance protected instance one : One (PushoutI Ο†) := by delta PushoutI; infer_instance instance monoid : Monoid (PushoutI Ο†) := { Con.monoid _ with toMul := PushoutI.mul toOne := PushoutI.one } def of (i : ΞΉ) : G i β†’* PushoutI Ο† := (Con.mk' _).comp <| inl.comp CoprodI.of variable (Ο†) in def base : H β†’* PushoutI Ο† := (Con.mk' _).comp inr theorem of_comp_eq_base (i : ΞΉ) : (of i).comp (Ο† i) = (base Ο†) := by ext x apply (Con.eq _).2 refine ConGen.Rel.of _ _ ?_ simp only [MonoidHom.comp_apply, Set.mem_iUnion, Set.mem_range] exact ⟨_, _, rfl, rfl⟩ variable (Ο†) in
Mathlib/GroupTheory/PushoutI.lean
96
97
theorem of_apply_eq_base (i : ΞΉ) (x : H) : of i (Ο† i x) = base Ο† x := by
rw [← MonoidHom.comp_apply, of_comp_eq_base]
1
2.718282
0
1
6
991
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ΞΉ : Type*} {G : ΞΉ β†’ Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Con (Coprod (CoprodI G) H) := conGen (fun x y : Coprod (CoprodI G) H => βˆƒ i x', x = inl (of (Ο† i x')) ∧ y = inr x') def PushoutI [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Type _ := (PushoutI.con Ο†).Quotient namespace PushoutI section Monoid variable [βˆ€ i, Monoid (G i)] [Monoid H] {Ο† : βˆ€ i, H β†’* G i} protected instance mul : Mul (PushoutI Ο†) := by delta PushoutI; infer_instance protected instance one : One (PushoutI Ο†) := by delta PushoutI; infer_instance instance monoid : Monoid (PushoutI Ο†) := { Con.monoid _ with toMul := PushoutI.mul toOne := PushoutI.one } def of (i : ΞΉ) : G i β†’* PushoutI Ο† := (Con.mk' _).comp <| inl.comp CoprodI.of variable (Ο†) in def base : H β†’* PushoutI Ο† := (Con.mk' _).comp inr theorem of_comp_eq_base (i : ΞΉ) : (of i).comp (Ο† i) = (base Ο†) := by ext x apply (Con.eq _).2 refine ConGen.Rel.of _ _ ?_ simp only [MonoidHom.comp_apply, Set.mem_iUnion, Set.mem_range] exact ⟨_, _, rfl, rfl⟩ variable (Ο†) in theorem of_apply_eq_base (i : ΞΉ) (x : H) : of i (Ο† i x) = base Ο† x := by rw [← MonoidHom.comp_apply, of_comp_eq_base] def lift (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) : PushoutI Ο† β†’* K := Con.lift _ (Coprod.lift (CoprodI.lift f) k) <| by apply Con.conGen_le fun x y => ?_ rintro ⟨i, x', rfl, rfl⟩ simp only [DFunLike.ext_iff, MonoidHom.coe_comp, comp_apply] at hf simp [hf] @[simp]
Mathlib/GroupTheory/PushoutI.lean
111
116
theorem lift_of (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) {i : ΞΉ} (g : G i) : (lift f k hf) (of i g : PushoutI Ο†) = f i g := by
delta PushoutI lift of simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inl, CoprodI.lift_of]
3
20.085537
1
1
6
991
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ΞΉ : Type*} {G : ΞΉ β†’ Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Con (Coprod (CoprodI G) H) := conGen (fun x y : Coprod (CoprodI G) H => βˆƒ i x', x = inl (of (Ο† i x')) ∧ y = inr x') def PushoutI [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Type _ := (PushoutI.con Ο†).Quotient namespace PushoutI section Monoid variable [βˆ€ i, Monoid (G i)] [Monoid H] {Ο† : βˆ€ i, H β†’* G i} protected instance mul : Mul (PushoutI Ο†) := by delta PushoutI; infer_instance protected instance one : One (PushoutI Ο†) := by delta PushoutI; infer_instance instance monoid : Monoid (PushoutI Ο†) := { Con.monoid _ with toMul := PushoutI.mul toOne := PushoutI.one } def of (i : ΞΉ) : G i β†’* PushoutI Ο† := (Con.mk' _).comp <| inl.comp CoprodI.of variable (Ο†) in def base : H β†’* PushoutI Ο† := (Con.mk' _).comp inr theorem of_comp_eq_base (i : ΞΉ) : (of i).comp (Ο† i) = (base Ο†) := by ext x apply (Con.eq _).2 refine ConGen.Rel.of _ _ ?_ simp only [MonoidHom.comp_apply, Set.mem_iUnion, Set.mem_range] exact ⟨_, _, rfl, rfl⟩ variable (Ο†) in theorem of_apply_eq_base (i : ΞΉ) (x : H) : of i (Ο† i x) = base Ο† x := by rw [← MonoidHom.comp_apply, of_comp_eq_base] def lift (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) : PushoutI Ο† β†’* K := Con.lift _ (Coprod.lift (CoprodI.lift f) k) <| by apply Con.conGen_le fun x y => ?_ rintro ⟨i, x', rfl, rfl⟩ simp only [DFunLike.ext_iff, MonoidHom.coe_comp, comp_apply] at hf simp [hf] @[simp] theorem lift_of (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) {i : ΞΉ} (g : G i) : (lift f k hf) (of i g : PushoutI Ο†) = f i g := by delta PushoutI lift of simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inl, CoprodI.lift_of] @[simp]
Mathlib/GroupTheory/PushoutI.lean
119
123
theorem lift_base (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) (g : H) : (lift f k hf) (base Ο† g : PushoutI Ο†) = k g := by
delta PushoutI lift base simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inr]
2
7.389056
1
1
6
991
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ΞΉ : Type*} {G : ΞΉ β†’ Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Con (Coprod (CoprodI G) H) := conGen (fun x y : Coprod (CoprodI G) H => βˆƒ i x', x = inl (of (Ο† i x')) ∧ y = inr x') def PushoutI [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Type _ := (PushoutI.con Ο†).Quotient namespace PushoutI section Monoid variable [βˆ€ i, Monoid (G i)] [Monoid H] {Ο† : βˆ€ i, H β†’* G i} protected instance mul : Mul (PushoutI Ο†) := by delta PushoutI; infer_instance protected instance one : One (PushoutI Ο†) := by delta PushoutI; infer_instance instance monoid : Monoid (PushoutI Ο†) := { Con.monoid _ with toMul := PushoutI.mul toOne := PushoutI.one } def of (i : ΞΉ) : G i β†’* PushoutI Ο† := (Con.mk' _).comp <| inl.comp CoprodI.of variable (Ο†) in def base : H β†’* PushoutI Ο† := (Con.mk' _).comp inr theorem of_comp_eq_base (i : ΞΉ) : (of i).comp (Ο† i) = (base Ο†) := by ext x apply (Con.eq _).2 refine ConGen.Rel.of _ _ ?_ simp only [MonoidHom.comp_apply, Set.mem_iUnion, Set.mem_range] exact ⟨_, _, rfl, rfl⟩ variable (Ο†) in theorem of_apply_eq_base (i : ΞΉ) (x : H) : of i (Ο† i x) = base Ο† x := by rw [← MonoidHom.comp_apply, of_comp_eq_base] def lift (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) : PushoutI Ο† β†’* K := Con.lift _ (Coprod.lift (CoprodI.lift f) k) <| by apply Con.conGen_le fun x y => ?_ rintro ⟨i, x', rfl, rfl⟩ simp only [DFunLike.ext_iff, MonoidHom.coe_comp, comp_apply] at hf simp [hf] @[simp] theorem lift_of (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) {i : ΞΉ} (g : G i) : (lift f k hf) (of i g : PushoutI Ο†) = f i g := by delta PushoutI lift of simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inl, CoprodI.lift_of] @[simp] theorem lift_base (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) (g : H) : (lift f k hf) (base Ο† g : PushoutI Ο†) = k g := by delta PushoutI lift base simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inr] -- `ext` attribute should be lower priority then `hom_ext_nonempty` @[ext 1199] theorem hom_ext {f g : PushoutI Ο† β†’* K} (h : βˆ€ i, f.comp (of i : G i β†’* _) = g.comp (of i : G i β†’* _)) (hbase : f.comp (base Ο†) = g.comp (base Ο†)) : f = g := (MonoidHom.cancel_right Con.mk'_surjective).mp <| Coprod.hom_ext (CoprodI.ext_hom _ _ h) hbase @[ext high] theorem hom_ext_nonempty [hn : Nonempty ΞΉ] {f g : PushoutI Ο† β†’* K} (h : βˆ€ i, f.comp (of i : G i β†’* _) = g.comp (of i : G i β†’* _)) : f = g := hom_ext h <| by cases hn with | intro i => ext rw [← of_comp_eq_base i, ← MonoidHom.comp_assoc, h, MonoidHom.comp_assoc] @[simps] def homEquiv : (PushoutI Ο† β†’* K) ≃ { f : (Ξ  i, G i β†’* K) Γ— (H β†’* K) // βˆ€ i, (f.1 i).comp (Ο† i) = f.2 } := { toFun := fun f => ⟨(fun i => f.comp (of i), f.comp (base Ο†)), fun i => by rw [MonoidHom.comp_assoc, of_comp_eq_base]⟩ invFun := fun f => lift f.1.1 f.1.2 f.2, left_inv := fun _ => hom_ext (by simp [DFunLike.ext_iff]) (by simp [DFunLike.ext_iff]) right_inv := fun ⟨⟨_, _⟩, _⟩ => by simp [DFunLike.ext_iff, Function.funext_iff] } def ofCoprodI : CoprodI G β†’* PushoutI Ο† := CoprodI.lift of @[simp]
Mathlib/GroupTheory/PushoutI.lean
163
165
theorem ofCoprodI_of (i : ΞΉ) (g : G i) : (ofCoprodI (CoprodI.of g) : PushoutI Ο†) = of i g := by
simp [ofCoprodI]
1
2.718282
0
1
6
991
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ΞΉ : Type*} {G : ΞΉ β†’ Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Con (Coprod (CoprodI G) H) := conGen (fun x y : Coprod (CoprodI G) H => βˆƒ i x', x = inl (of (Ο† i x')) ∧ y = inr x') def PushoutI [βˆ€ i, Monoid (G i)] [Monoid H] (Ο† : βˆ€ i, H β†’* G i) : Type _ := (PushoutI.con Ο†).Quotient namespace PushoutI section Monoid variable [βˆ€ i, Monoid (G i)] [Monoid H] {Ο† : βˆ€ i, H β†’* G i} protected instance mul : Mul (PushoutI Ο†) := by delta PushoutI; infer_instance protected instance one : One (PushoutI Ο†) := by delta PushoutI; infer_instance instance monoid : Monoid (PushoutI Ο†) := { Con.monoid _ with toMul := PushoutI.mul toOne := PushoutI.one } def of (i : ΞΉ) : G i β†’* PushoutI Ο† := (Con.mk' _).comp <| inl.comp CoprodI.of variable (Ο†) in def base : H β†’* PushoutI Ο† := (Con.mk' _).comp inr theorem of_comp_eq_base (i : ΞΉ) : (of i).comp (Ο† i) = (base Ο†) := by ext x apply (Con.eq _).2 refine ConGen.Rel.of _ _ ?_ simp only [MonoidHom.comp_apply, Set.mem_iUnion, Set.mem_range] exact ⟨_, _, rfl, rfl⟩ variable (Ο†) in theorem of_apply_eq_base (i : ΞΉ) (x : H) : of i (Ο† i x) = base Ο† x := by rw [← MonoidHom.comp_apply, of_comp_eq_base] def lift (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) : PushoutI Ο† β†’* K := Con.lift _ (Coprod.lift (CoprodI.lift f) k) <| by apply Con.conGen_le fun x y => ?_ rintro ⟨i, x', rfl, rfl⟩ simp only [DFunLike.ext_iff, MonoidHom.coe_comp, comp_apply] at hf simp [hf] @[simp] theorem lift_of (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) {i : ΞΉ} (g : G i) : (lift f k hf) (of i g : PushoutI Ο†) = f i g := by delta PushoutI lift of simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inl, CoprodI.lift_of] @[simp] theorem lift_base (f : βˆ€ i, G i β†’* K) (k : H β†’* K) (hf : βˆ€ i, (f i).comp (Ο† i) = k) (g : H) : (lift f k hf) (base Ο† g : PushoutI Ο†) = k g := by delta PushoutI lift base simp only [MonoidHom.coe_comp, Con.coe_mk', comp_apply, Con.lift_coe, lift_apply_inr] -- `ext` attribute should be lower priority then `hom_ext_nonempty` @[ext 1199] theorem hom_ext {f g : PushoutI Ο† β†’* K} (h : βˆ€ i, f.comp (of i : G i β†’* _) = g.comp (of i : G i β†’* _)) (hbase : f.comp (base Ο†) = g.comp (base Ο†)) : f = g := (MonoidHom.cancel_right Con.mk'_surjective).mp <| Coprod.hom_ext (CoprodI.ext_hom _ _ h) hbase @[ext high] theorem hom_ext_nonempty [hn : Nonempty ΞΉ] {f g : PushoutI Ο† β†’* K} (h : βˆ€ i, f.comp (of i : G i β†’* _) = g.comp (of i : G i β†’* _)) : f = g := hom_ext h <| by cases hn with | intro i => ext rw [← of_comp_eq_base i, ← MonoidHom.comp_assoc, h, MonoidHom.comp_assoc] @[simps] def homEquiv : (PushoutI Ο† β†’* K) ≃ { f : (Ξ  i, G i β†’* K) Γ— (H β†’* K) // βˆ€ i, (f.1 i).comp (Ο† i) = f.2 } := { toFun := fun f => ⟨(fun i => f.comp (of i), f.comp (base Ο†)), fun i => by rw [MonoidHom.comp_assoc, of_comp_eq_base]⟩ invFun := fun f => lift f.1.1 f.1.2 f.2, left_inv := fun _ => hom_ext (by simp [DFunLike.ext_iff]) (by simp [DFunLike.ext_iff]) right_inv := fun ⟨⟨_, _⟩, _⟩ => by simp [DFunLike.ext_iff, Function.funext_iff] } def ofCoprodI : CoprodI G β†’* PushoutI Ο† := CoprodI.lift of @[simp] theorem ofCoprodI_of (i : ΞΉ) (g : G i) : (ofCoprodI (CoprodI.of g) : PushoutI Ο†) = of i g := by simp [ofCoprodI]
Mathlib/GroupTheory/PushoutI.lean
167
184
theorem induction_on {motive : PushoutI Ο† β†’ Prop} (x : PushoutI Ο†) (of : βˆ€ (i : ΞΉ) (g : G i), motive (of i g)) (base : βˆ€ h, motive (base Ο† h)) (mul : βˆ€ x y, motive x β†’ motive y β†’ motive (x * y)) : motive x := by
delta PushoutI PushoutI.of PushoutI.base at * induction x using Con.induction_on with | H x => induction x using Coprod.induction_on with | inl g => induction g using CoprodI.induction_on with | h_of i g => exact of i g | h_mul x y ihx ihy => rw [map_mul] exact mul _ _ ihx ihy | h_one => simpa using base 1 | inr h => exact base h | mul x y ihx ihy => exact mul _ _ ihx ihy
13
442,413.392009
2
1
6
991
import Mathlib.ModelTheory.Basic #align_import model_theory.language_map from "leanprover-community/mathlib"@"b3951c65c6e797ff162ae8b69eab0063bcfb3d73" universe u v u' v' w w' namespace FirstOrder set_option linter.uppercaseLean3 false namespace Language open Structure Cardinal open Cardinal variable (L : Language.{u, v}) (L' : Language.{u', v'}) {M : Type w} [L.Structure M] structure LHom where onFunction : βˆ€ ⦃n⦄, L.Functions n β†’ L'.Functions n onRelation : βˆ€ ⦃n⦄, L.Relations n β†’ L'.Relations n #align first_order.language.Lhom FirstOrder.Language.LHom @[inherit_doc FirstOrder.Language.LHom] infixl:10 " β†’α΄Έ " => LHom -- \^L variable {L L'} namespace LHom protected def mkβ‚‚ {c f₁ fβ‚‚ : Type u} {r₁ rβ‚‚ : Type v} (Ο†β‚€ : c β†’ L'.Constants) (φ₁ : f₁ β†’ L'.Functions 1) (Ο†β‚‚ : fβ‚‚ β†’ L'.Functions 2) (φ₁' : r₁ β†’ L'.Relations 1) (Ο†β‚‚' : rβ‚‚ β†’ L'.Relations 2) : Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚ β†’α΄Έ L' := ⟨fun n => Nat.casesOn n Ο†β‚€ fun n => Nat.casesOn n φ₁ fun n => Nat.casesOn n Ο†β‚‚ fun _ => PEmpty.elim, fun n => Nat.casesOn n PEmpty.elim fun n => Nat.casesOn n φ₁' fun n => Nat.casesOn n Ο†β‚‚' fun _ => PEmpty.elim⟩ #align first_order.language.Lhom.mkβ‚‚ FirstOrder.Language.LHom.mkβ‚‚ variable (Ο• : L β†’α΄Έ L') def reduct (M : Type*) [L'.Structure M] : L.Structure M where funMap f xs := funMap (Ο•.onFunction f) xs RelMap r xs := RelMap (Ο•.onRelation r) xs #align first_order.language.Lhom.reduct FirstOrder.Language.LHom.reduct @[simps] protected def id (L : Language) : L β†’α΄Έ L := ⟨fun _n => id, fun _n => id⟩ #align first_order.language.Lhom.id FirstOrder.Language.LHom.id instance : Inhabited (L β†’α΄Έ L) := ⟨LHom.id L⟩ @[simps] protected def sumInl : L β†’α΄Έ L.sum L' := ⟨fun _n => Sum.inl, fun _n => Sum.inl⟩ #align first_order.language.Lhom.sum_inl FirstOrder.Language.LHom.sumInl @[simps] protected def sumInr : L' β†’α΄Έ L.sum L' := ⟨fun _n => Sum.inr, fun _n => Sum.inr⟩ #align first_order.language.Lhom.sum_inr FirstOrder.Language.LHom.sumInr variable (L L') @[simps] protected def ofIsEmpty [L.IsAlgebraic] [L.IsRelational] : L β†’α΄Έ L' := ⟨fun n => (IsRelational.empty_functions n).elim, fun n => (IsAlgebraic.empty_relations n).elim⟩ #align first_order.language.Lhom.of_is_empty FirstOrder.Language.LHom.ofIsEmpty variable {L L'} {L'' : Language} @[ext] protected theorem funext {F G : L β†’α΄Έ L'} (h_fun : F.onFunction = G.onFunction) (h_rel : F.onRelation = G.onRelation) : F = G := by cases' F with Ff Fr cases' G with Gf Gr simp only [mk.injEq] exact And.intro h_fun h_rel #align first_order.language.Lhom.funext FirstOrder.Language.LHom.funext instance [L.IsAlgebraic] [L.IsRelational] : Unique (L β†’α΄Έ L') := ⟨⟨LHom.ofIsEmpty L L'⟩, fun _ => LHom.funext (Subsingleton.elim _ _) (Subsingleton.elim _ _)⟩ theorem mkβ‚‚_funext {c f₁ fβ‚‚ : Type u} {r₁ rβ‚‚ : Type v} {F G : Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚ β†’α΄Έ L'} (h0 : βˆ€ c : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Constants, F.onFunction c = G.onFunction c) (h1 : βˆ€ f : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Functions 1, F.onFunction f = G.onFunction f) (h2 : βˆ€ f : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Functions 2, F.onFunction f = G.onFunction f) (h1' : βˆ€ r : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Relations 1, F.onRelation r = G.onRelation r) (h2' : βˆ€ r : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Relations 2, F.onRelation r = G.onRelation r) : F = G := LHom.funext (funext fun n => Nat.casesOn n (funext h0) fun n => Nat.casesOn n (funext h1) fun n => Nat.casesOn n (funext h2) fun _n => funext fun f => PEmpty.elim f) (funext fun n => Nat.casesOn n (funext fun r => PEmpty.elim r) fun n => Nat.casesOn n (funext h1') fun n => Nat.casesOn n (funext h2') fun _n => funext fun r => PEmpty.elim r) #align first_order.language.Lhom.mkβ‚‚_funext FirstOrder.Language.LHom.mkβ‚‚_funext @[simps] def comp (g : L' β†’α΄Έ L'') (f : L β†’α΄Έ L') : L β†’α΄Έ L'' := ⟨fun _n F => g.1 (f.1 F), fun _ R => g.2 (f.2 R)⟩ #align first_order.language.Lhom.comp FirstOrder.Language.LHom.comp -- Porting note: added α΄Έ to avoid clash with function composition @[inherit_doc] local infixl:60 " ∘ᴸ " => LHom.comp @[simp]
Mathlib/ModelTheory/LanguageMap.lean
153
155
theorem id_comp (F : L β†’α΄Έ L') : LHom.id L' ∘ᴸ F = F := by
cases F rfl
2
7.389056
1
1
2
992
import Mathlib.ModelTheory.Basic #align_import model_theory.language_map from "leanprover-community/mathlib"@"b3951c65c6e797ff162ae8b69eab0063bcfb3d73" universe u v u' v' w w' namespace FirstOrder set_option linter.uppercaseLean3 false namespace Language open Structure Cardinal open Cardinal variable (L : Language.{u, v}) (L' : Language.{u', v'}) {M : Type w} [L.Structure M] structure LHom where onFunction : βˆ€ ⦃n⦄, L.Functions n β†’ L'.Functions n onRelation : βˆ€ ⦃n⦄, L.Relations n β†’ L'.Relations n #align first_order.language.Lhom FirstOrder.Language.LHom @[inherit_doc FirstOrder.Language.LHom] infixl:10 " β†’α΄Έ " => LHom -- \^L variable {L L'} namespace LHom protected def mkβ‚‚ {c f₁ fβ‚‚ : Type u} {r₁ rβ‚‚ : Type v} (Ο†β‚€ : c β†’ L'.Constants) (φ₁ : f₁ β†’ L'.Functions 1) (Ο†β‚‚ : fβ‚‚ β†’ L'.Functions 2) (φ₁' : r₁ β†’ L'.Relations 1) (Ο†β‚‚' : rβ‚‚ β†’ L'.Relations 2) : Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚ β†’α΄Έ L' := ⟨fun n => Nat.casesOn n Ο†β‚€ fun n => Nat.casesOn n φ₁ fun n => Nat.casesOn n Ο†β‚‚ fun _ => PEmpty.elim, fun n => Nat.casesOn n PEmpty.elim fun n => Nat.casesOn n φ₁' fun n => Nat.casesOn n Ο†β‚‚' fun _ => PEmpty.elim⟩ #align first_order.language.Lhom.mkβ‚‚ FirstOrder.Language.LHom.mkβ‚‚ variable (Ο• : L β†’α΄Έ L') def reduct (M : Type*) [L'.Structure M] : L.Structure M where funMap f xs := funMap (Ο•.onFunction f) xs RelMap r xs := RelMap (Ο•.onRelation r) xs #align first_order.language.Lhom.reduct FirstOrder.Language.LHom.reduct @[simps] protected def id (L : Language) : L β†’α΄Έ L := ⟨fun _n => id, fun _n => id⟩ #align first_order.language.Lhom.id FirstOrder.Language.LHom.id instance : Inhabited (L β†’α΄Έ L) := ⟨LHom.id L⟩ @[simps] protected def sumInl : L β†’α΄Έ L.sum L' := ⟨fun _n => Sum.inl, fun _n => Sum.inl⟩ #align first_order.language.Lhom.sum_inl FirstOrder.Language.LHom.sumInl @[simps] protected def sumInr : L' β†’α΄Έ L.sum L' := ⟨fun _n => Sum.inr, fun _n => Sum.inr⟩ #align first_order.language.Lhom.sum_inr FirstOrder.Language.LHom.sumInr variable (L L') @[simps] protected def ofIsEmpty [L.IsAlgebraic] [L.IsRelational] : L β†’α΄Έ L' := ⟨fun n => (IsRelational.empty_functions n).elim, fun n => (IsAlgebraic.empty_relations n).elim⟩ #align first_order.language.Lhom.of_is_empty FirstOrder.Language.LHom.ofIsEmpty variable {L L'} {L'' : Language} @[ext] protected theorem funext {F G : L β†’α΄Έ L'} (h_fun : F.onFunction = G.onFunction) (h_rel : F.onRelation = G.onRelation) : F = G := by cases' F with Ff Fr cases' G with Gf Gr simp only [mk.injEq] exact And.intro h_fun h_rel #align first_order.language.Lhom.funext FirstOrder.Language.LHom.funext instance [L.IsAlgebraic] [L.IsRelational] : Unique (L β†’α΄Έ L') := ⟨⟨LHom.ofIsEmpty L L'⟩, fun _ => LHom.funext (Subsingleton.elim _ _) (Subsingleton.elim _ _)⟩ theorem mkβ‚‚_funext {c f₁ fβ‚‚ : Type u} {r₁ rβ‚‚ : Type v} {F G : Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚ β†’α΄Έ L'} (h0 : βˆ€ c : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Constants, F.onFunction c = G.onFunction c) (h1 : βˆ€ f : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Functions 1, F.onFunction f = G.onFunction f) (h2 : βˆ€ f : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Functions 2, F.onFunction f = G.onFunction f) (h1' : βˆ€ r : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Relations 1, F.onRelation r = G.onRelation r) (h2' : βˆ€ r : (Language.mkβ‚‚ c f₁ fβ‚‚ r₁ rβ‚‚).Relations 2, F.onRelation r = G.onRelation r) : F = G := LHom.funext (funext fun n => Nat.casesOn n (funext h0) fun n => Nat.casesOn n (funext h1) fun n => Nat.casesOn n (funext h2) fun _n => funext fun f => PEmpty.elim f) (funext fun n => Nat.casesOn n (funext fun r => PEmpty.elim r) fun n => Nat.casesOn n (funext h1') fun n => Nat.casesOn n (funext h2') fun _n => funext fun r => PEmpty.elim r) #align first_order.language.Lhom.mkβ‚‚_funext FirstOrder.Language.LHom.mkβ‚‚_funext @[simps] def comp (g : L' β†’α΄Έ L'') (f : L β†’α΄Έ L') : L β†’α΄Έ L'' := ⟨fun _n F => g.1 (f.1 F), fun _ R => g.2 (f.2 R)⟩ #align first_order.language.Lhom.comp FirstOrder.Language.LHom.comp -- Porting note: added α΄Έ to avoid clash with function composition @[inherit_doc] local infixl:60 " ∘ᴸ " => LHom.comp @[simp] theorem id_comp (F : L β†’α΄Έ L') : LHom.id L' ∘ᴸ F = F := by cases F rfl #align first_order.language.Lhom.id_comp FirstOrder.Language.LHom.id_comp @[simp]
Mathlib/ModelTheory/LanguageMap.lean
159
161
theorem comp_id (F : L β†’α΄Έ L') : F ∘ᴸ LHom.id L = F := by
cases F rfl
2
7.389056
1
1
2
992
import Mathlib.RingTheory.Coprime.Lemmas import Mathlib.Tactic.NormNum.GCD namespace Tactic namespace NormNum open Qq Lean Elab.Tactic Mathlib.Meta.NormNum
Mathlib/Tactic/NormNum/IsCoprime.lean
23
26
theorem int_not_isCoprime_helper (x y : β„€) (d : β„•) (hd : Int.gcd x y = d) (h : Nat.beq d 1 = false) : Β¬ IsCoprime x y := by
rw [Int.isCoprime_iff_gcd_eq_one, hd] exact Nat.ne_of_beq_eq_false h
2
7.389056
1
1
1
993
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] section SeminormedAddCommGroup variable [SeminormedAddCommGroup E] [NormedSpace π•œ E]
Mathlib/Analysis/NormedSpace/Pointwise.lean
84
88
theorem smul_ball {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ ball x r = ball (c β€’ x) (β€–cβ€– * r) := by
ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smulβ‚€]
4
54.59815
2
1
8
994
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] section SeminormedAddCommGroup variable [SeminormedAddCommGroup E] [NormedSpace π•œ E] theorem smul_ball {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ ball x r = ball (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smulβ‚€] #align smul_ball smul_ball
Mathlib/Analysis/NormedSpace/Pointwise.lean
91
92
theorem smul_unitBall {c : π•œ} (hc : c β‰  0) : c β€’ ball (0 : E) (1 : ℝ) = ball (0 : E) β€–cβ€– := by
rw [_root_.smul_ball hc, smul_zero, mul_one]
1
2.718282
0
1
8
994
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] section SeminormedAddCommGroup variable [SeminormedAddCommGroup E] [NormedSpace π•œ E] theorem smul_ball {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ ball x r = ball (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smulβ‚€] #align smul_ball smul_ball theorem smul_unitBall {c : π•œ} (hc : c β‰  0) : c β€’ ball (0 : E) (1 : ℝ) = ball (0 : E) β€–cβ€– := by rw [_root_.smul_ball hc, smul_zero, mul_one] #align smul_unit_ball smul_unitBall
Mathlib/Analysis/NormedSpace/Pointwise.lean
95
101
theorem smul_sphere' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ sphere x r = sphere (c β€’ x) (β€–cβ€– * r) := by
ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp only [mem_sphere, dist_smulβ‚€, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne', mul_comm r]
5
148.413159
2
1
8
994
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] section SeminormedAddCommGroup variable [SeminormedAddCommGroup E] [NormedSpace π•œ E] theorem smul_ball {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ ball x r = ball (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smulβ‚€] #align smul_ball smul_ball theorem smul_unitBall {c : π•œ} (hc : c β‰  0) : c β€’ ball (0 : E) (1 : ℝ) = ball (0 : E) β€–cβ€– := by rw [_root_.smul_ball hc, smul_zero, mul_one] #align smul_unit_ball smul_unitBall theorem smul_sphere' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ sphere x r = sphere (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp only [mem_sphere, dist_smulβ‚€, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne', mul_comm r] #align smul_sphere' smul_sphere'
Mathlib/Analysis/NormedSpace/Pointwise.lean
104
106
theorem smul_closedBall' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ closedBall x r = closedBall (c β€’ x) (β€–cβ€– * r) := by
simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc]
1
2.718282
0
1
8
994
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] section SeminormedAddCommGroup variable [SeminormedAddCommGroup E] [NormedSpace π•œ E] theorem smul_ball {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ ball x r = ball (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smulβ‚€] #align smul_ball smul_ball theorem smul_unitBall {c : π•œ} (hc : c β‰  0) : c β€’ ball (0 : E) (1 : ℝ) = ball (0 : E) β€–cβ€– := by rw [_root_.smul_ball hc, smul_zero, mul_one] #align smul_unit_ball smul_unitBall theorem smul_sphere' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ sphere x r = sphere (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp only [mem_sphere, dist_smulβ‚€, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne', mul_comm r] #align smul_sphere' smul_sphere' theorem smul_closedBall' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ closedBall x r = closedBall (c β€’ x) (β€–cβ€– * r) := by simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc] #align smul_closed_ball' smul_closedBall'
Mathlib/Analysis/NormedSpace/Pointwise.lean
109
115
theorem set_smul_sphere_zero {s : Set π•œ} (hs : 0 βˆ‰ s) (r : ℝ) : s β€’ sphere (0 : E) r = (β€–Β·β€–) ⁻¹' ((β€–Β·β€– * r) '' s) := calc s β€’ sphere (0 : E) r = ⋃ c ∈ s, c β€’ sphere (0 : E) r := iUnion_smul_left_image.symm _ = ⋃ c ∈ s, sphere (0 : E) (β€–cβ€– * r) := iUnionβ‚‚_congr fun c hc ↦ by rw [smul_sphere' (ne_of_mem_of_not_mem hc hs), smul_zero] _ = (β€–Β·β€–) ⁻¹' ((β€–Β·β€– * r) '' s) := by
ext; simp [eq_comm]
1
2.718282
0
1
8
994
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] section SeminormedAddCommGroup variable [SeminormedAddCommGroup E] [NormedSpace π•œ E] theorem smul_ball {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ ball x r = ball (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smulβ‚€] #align smul_ball smul_ball theorem smul_unitBall {c : π•œ} (hc : c β‰  0) : c β€’ ball (0 : E) (1 : ℝ) = ball (0 : E) β€–cβ€– := by rw [_root_.smul_ball hc, smul_zero, mul_one] #align smul_unit_ball smul_unitBall theorem smul_sphere' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ sphere x r = sphere (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp only [mem_sphere, dist_smulβ‚€, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne', mul_comm r] #align smul_sphere' smul_sphere' theorem smul_closedBall' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ closedBall x r = closedBall (c β€’ x) (β€–cβ€– * r) := by simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc] #align smul_closed_ball' smul_closedBall' theorem set_smul_sphere_zero {s : Set π•œ} (hs : 0 βˆ‰ s) (r : ℝ) : s β€’ sphere (0 : E) r = (β€–Β·β€–) ⁻¹' ((β€–Β·β€– * r) '' s) := calc s β€’ sphere (0 : E) r = ⋃ c ∈ s, c β€’ sphere (0 : E) r := iUnion_smul_left_image.symm _ = ⋃ c ∈ s, sphere (0 : E) (β€–cβ€– * r) := iUnionβ‚‚_congr fun c hc ↦ by rw [smul_sphere' (ne_of_mem_of_not_mem hc hs), smul_zero] _ = (β€–Β·β€–) ⁻¹' ((β€–Β·β€– * r) '' s) := by ext; simp [eq_comm] theorem Bornology.IsBounded.smulβ‚€ {s : Set E} (hs : IsBounded s) (c : π•œ) : IsBounded (c β€’ s) := (lipschitzWith_smul c).isBounded_image hs #align metric.bounded.smul Bornology.IsBounded.smulβ‚€
Mathlib/Analysis/NormedSpace/Pointwise.lean
125
143
theorem eventually_singleton_add_smul_subset {x : E} {s : Set E} (hs : Bornology.IsBounded s) {u : Set E} (hu : u ∈ 𝓝 x) : βˆ€αΆ  r in 𝓝 (0 : π•œ), {x} + r β€’ s βŠ† u := by
obtain ⟨Ρ, Ξ΅pos, hΡ⟩ : βˆƒ Ξ΅ : ℝ, 0 < Ξ΅ ∧ closedBall x Ξ΅ βŠ† u := nhds_basis_closedBall.mem_iff.1 hu obtain ⟨R, Rpos, hR⟩ : βˆƒ R : ℝ, 0 < R ∧ s βŠ† closedBall 0 R := hs.subset_closedBall_lt 0 0 have : Metric.closedBall (0 : π•œ) (Ξ΅ / R) ∈ 𝓝 (0 : π•œ) := closedBall_mem_nhds _ (div_pos Ξ΅pos Rpos) filter_upwards [this] with r hr simp only [image_add_left, singleton_add] intro y hy obtain ⟨z, zs, hz⟩ : βˆƒ z : E, z ∈ s ∧ r β€’ z = -x + y := by simpa [mem_smul_set] using hy have I : β€–r β€’ zβ€– ≀ Ξ΅ := calc β€–r β€’ zβ€– = β€–rβ€– * β€–zβ€– := norm_smul _ _ _ ≀ Ξ΅ / R * R := (mul_le_mul (mem_closedBall_zero_iff.1 hr) (mem_closedBall_zero_iff.1 (hR zs)) (norm_nonneg _) (div_pos Ξ΅pos Rpos).le) _ = Ξ΅ := by field_simp have : y = x + r β€’ z := by simp only [hz, add_neg_cancel_left] apply hΞ΅ simpa only [this, dist_eq_norm, add_sub_cancel_left, mem_closedBall] using I
17
24,154,952.753575
2
1
8
994
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] section SeminormedAddCommGroup variable [SeminormedAddCommGroup E] [NormedSpace π•œ E] theorem smul_ball {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ ball x r = ball (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smulβ‚€] #align smul_ball smul_ball theorem smul_unitBall {c : π•œ} (hc : c β‰  0) : c β€’ ball (0 : E) (1 : ℝ) = ball (0 : E) β€–cβ€– := by rw [_root_.smul_ball hc, smul_zero, mul_one] #align smul_unit_ball smul_unitBall theorem smul_sphere' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ sphere x r = sphere (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp only [mem_sphere, dist_smulβ‚€, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne', mul_comm r] #align smul_sphere' smul_sphere' theorem smul_closedBall' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ closedBall x r = closedBall (c β€’ x) (β€–cβ€– * r) := by simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc] #align smul_closed_ball' smul_closedBall' theorem set_smul_sphere_zero {s : Set π•œ} (hs : 0 βˆ‰ s) (r : ℝ) : s β€’ sphere (0 : E) r = (β€–Β·β€–) ⁻¹' ((β€–Β·β€– * r) '' s) := calc s β€’ sphere (0 : E) r = ⋃ c ∈ s, c β€’ sphere (0 : E) r := iUnion_smul_left_image.symm _ = ⋃ c ∈ s, sphere (0 : E) (β€–cβ€– * r) := iUnionβ‚‚_congr fun c hc ↦ by rw [smul_sphere' (ne_of_mem_of_not_mem hc hs), smul_zero] _ = (β€–Β·β€–) ⁻¹' ((β€–Β·β€– * r) '' s) := by ext; simp [eq_comm] theorem Bornology.IsBounded.smulβ‚€ {s : Set E} (hs : IsBounded s) (c : π•œ) : IsBounded (c β€’ s) := (lipschitzWith_smul c).isBounded_image hs #align metric.bounded.smul Bornology.IsBounded.smulβ‚€ theorem eventually_singleton_add_smul_subset {x : E} {s : Set E} (hs : Bornology.IsBounded s) {u : Set E} (hu : u ∈ 𝓝 x) : βˆ€αΆ  r in 𝓝 (0 : π•œ), {x} + r β€’ s βŠ† u := by obtain ⟨Ρ, Ξ΅pos, hΡ⟩ : βˆƒ Ξ΅ : ℝ, 0 < Ξ΅ ∧ closedBall x Ξ΅ βŠ† u := nhds_basis_closedBall.mem_iff.1 hu obtain ⟨R, Rpos, hR⟩ : βˆƒ R : ℝ, 0 < R ∧ s βŠ† closedBall 0 R := hs.subset_closedBall_lt 0 0 have : Metric.closedBall (0 : π•œ) (Ξ΅ / R) ∈ 𝓝 (0 : π•œ) := closedBall_mem_nhds _ (div_pos Ξ΅pos Rpos) filter_upwards [this] with r hr simp only [image_add_left, singleton_add] intro y hy obtain ⟨z, zs, hz⟩ : βˆƒ z : E, z ∈ s ∧ r β€’ z = -x + y := by simpa [mem_smul_set] using hy have I : β€–r β€’ zβ€– ≀ Ξ΅ := calc β€–r β€’ zβ€– = β€–rβ€– * β€–zβ€– := norm_smul _ _ _ ≀ Ξ΅ / R * R := (mul_le_mul (mem_closedBall_zero_iff.1 hr) (mem_closedBall_zero_iff.1 (hR zs)) (norm_nonneg _) (div_pos Ξ΅pos Rpos).le) _ = Ξ΅ := by field_simp have : y = x + r β€’ z := by simp only [hz, add_neg_cancel_left] apply hΞ΅ simpa only [this, dist_eq_norm, add_sub_cancel_left, mem_closedBall] using I #align eventually_singleton_add_smul_subset eventually_singleton_add_smul_subset variable [NormedSpace ℝ E] {x y z : E} {Ξ΄ Ξ΅ : ℝ}
Mathlib/Analysis/NormedSpace/Pointwise.lean
150
151
theorem smul_unitBall_of_pos {r : ℝ} (hr : 0 < r) : r β€’ ball (0 : E) 1 = ball (0 : E) r := by
rw [smul_unitBall hr.ne', Real.norm_of_nonneg hr.le]
1
2.718282
0
1
8
994
import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.Real #align_import analysis.normed_space.pointwise from "leanprover-community/mathlib"@"bc91ed7093bf098d253401e69df601fc33dde156" open Metric Set open Pointwise Topology variable {π•œ E : Type*} variable [NormedField π•œ] section SeminormedAddCommGroup variable [SeminormedAddCommGroup E] [NormedSpace π•œ E] theorem smul_ball {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ ball x r = ball (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp [← div_eq_inv_mul, div_lt_iff (norm_pos_iff.2 hc), mul_comm _ r, dist_smulβ‚€] #align smul_ball smul_ball theorem smul_unitBall {c : π•œ} (hc : c β‰  0) : c β€’ ball (0 : E) (1 : ℝ) = ball (0 : E) β€–cβ€– := by rw [_root_.smul_ball hc, smul_zero, mul_one] #align smul_unit_ball smul_unitBall theorem smul_sphere' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ sphere x r = sphere (c β€’ x) (β€–cβ€– * r) := by ext y rw [mem_smul_set_iff_inv_smul_memβ‚€ hc] conv_lhs => rw [← inv_smul_smulβ‚€ hc x] simp only [mem_sphere, dist_smulβ‚€, norm_inv, ← div_eq_inv_mul, div_eq_iff (norm_pos_iff.2 hc).ne', mul_comm r] #align smul_sphere' smul_sphere' theorem smul_closedBall' {c : π•œ} (hc : c β‰  0) (x : E) (r : ℝ) : c β€’ closedBall x r = closedBall (c β€’ x) (β€–cβ€– * r) := by simp only [← ball_union_sphere, Set.smul_set_union, _root_.smul_ball hc, smul_sphere' hc] #align smul_closed_ball' smul_closedBall' theorem set_smul_sphere_zero {s : Set π•œ} (hs : 0 βˆ‰ s) (r : ℝ) : s β€’ sphere (0 : E) r = (β€–Β·β€–) ⁻¹' ((β€–Β·β€– * r) '' s) := calc s β€’ sphere (0 : E) r = ⋃ c ∈ s, c β€’ sphere (0 : E) r := iUnion_smul_left_image.symm _ = ⋃ c ∈ s, sphere (0 : E) (β€–cβ€– * r) := iUnionβ‚‚_congr fun c hc ↦ by rw [smul_sphere' (ne_of_mem_of_not_mem hc hs), smul_zero] _ = (β€–Β·β€–) ⁻¹' ((β€–Β·β€– * r) '' s) := by ext; simp [eq_comm] theorem Bornology.IsBounded.smulβ‚€ {s : Set E} (hs : IsBounded s) (c : π•œ) : IsBounded (c β€’ s) := (lipschitzWith_smul c).isBounded_image hs #align metric.bounded.smul Bornology.IsBounded.smulβ‚€ theorem eventually_singleton_add_smul_subset {x : E} {s : Set E} (hs : Bornology.IsBounded s) {u : Set E} (hu : u ∈ 𝓝 x) : βˆ€αΆ  r in 𝓝 (0 : π•œ), {x} + r β€’ s βŠ† u := by obtain ⟨Ρ, Ξ΅pos, hΡ⟩ : βˆƒ Ξ΅ : ℝ, 0 < Ξ΅ ∧ closedBall x Ξ΅ βŠ† u := nhds_basis_closedBall.mem_iff.1 hu obtain ⟨R, Rpos, hR⟩ : βˆƒ R : ℝ, 0 < R ∧ s βŠ† closedBall 0 R := hs.subset_closedBall_lt 0 0 have : Metric.closedBall (0 : π•œ) (Ξ΅ / R) ∈ 𝓝 (0 : π•œ) := closedBall_mem_nhds _ (div_pos Ξ΅pos Rpos) filter_upwards [this] with r hr simp only [image_add_left, singleton_add] intro y hy obtain ⟨z, zs, hz⟩ : βˆƒ z : E, z ∈ s ∧ r β€’ z = -x + y := by simpa [mem_smul_set] using hy have I : β€–r β€’ zβ€– ≀ Ξ΅ := calc β€–r β€’ zβ€– = β€–rβ€– * β€–zβ€– := norm_smul _ _ _ ≀ Ξ΅ / R * R := (mul_le_mul (mem_closedBall_zero_iff.1 hr) (mem_closedBall_zero_iff.1 (hR zs)) (norm_nonneg _) (div_pos Ξ΅pos Rpos).le) _ = Ξ΅ := by field_simp have : y = x + r β€’ z := by simp only [hz, add_neg_cancel_left] apply hΞ΅ simpa only [this, dist_eq_norm, add_sub_cancel_left, mem_closedBall] using I #align eventually_singleton_add_smul_subset eventually_singleton_add_smul_subset variable [NormedSpace ℝ E] {x y z : E} {Ξ΄ Ξ΅ : ℝ} theorem smul_unitBall_of_pos {r : ℝ} (hr : 0 < r) : r β€’ ball (0 : E) 1 = ball (0 : E) r := by rw [smul_unitBall hr.ne', Real.norm_of_nonneg hr.le] #align smul_unit_ball_of_pos smul_unitBall_of_pos lemma Ioo_smul_sphere_zero {a b r : ℝ} (ha : 0 ≀ a) (hr : 0 < r) : Ioo a b β€’ sphere (0 : E) r = ball 0 (b * r) \ closedBall 0 (a * r) := by have : EqOn (β€–Β·β€–) id (Ioo a b) := fun x hx ↦ abs_of_pos (ha.trans_lt hx.1) rw [set_smul_sphere_zero (by simp [ha.not_lt]), ← image_image (Β· * r), this.image_eq, image_id, image_mul_right_Ioo _ _ hr] ext x; simp [and_comm] -- This is also true for `β„š`-normed spaces
Mathlib/Analysis/NormedSpace/Pointwise.lean
162
167
theorem exists_dist_eq (x z : E) {a b : ℝ} (ha : 0 ≀ a) (hb : 0 ≀ b) (hab : a + b = 1) : βˆƒ y, dist x y = b * dist x z ∧ dist y z = a * dist x z := by
use a β€’ x + b β€’ z nth_rw 1 [← one_smul ℝ x] nth_rw 4 [← one_smul ℝ z] simp [dist_eq_norm, ← hab, add_smul, ← smul_sub, norm_smul_of_nonneg, ha, hb]
4
54.59815
2
1
8
994
import Mathlib.RingTheory.UniqueFactorizationDomain import Mathlib.RingTheory.Localization.Basic #align_import ring_theory.localization.away.basic from "leanprover-community/mathlib"@"a7c017d750512a352b623b1824d75da5998457d0" section CommSemiring variable {R : Type*} [CommSemiring R] (M : Submonoid R) {S : Type*} [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] namespace IsLocalization section Away variable (x : R) abbrev Away (S : Type*) [CommSemiring S] [Algebra R S] := IsLocalization (Submonoid.powers x) S #align is_localization.away IsLocalization.Away namespace Away variable [IsLocalization.Away x S] noncomputable def invSelf : S := mk' S (1 : R) ⟨x, Submonoid.mem_powers _⟩ #align is_localization.away.inv_self IsLocalization.Away.invSelf @[simp]
Mathlib/RingTheory/Localization/Away/Basic.lean
58
61
theorem mul_invSelf : algebraMap R S x * invSelf x = 1 := by
convert IsLocalization.mk'_mul_mk'_eq_one (M := Submonoid.powers x) (S := S) _ 1 symm apply IsLocalization.mk'_one
3
20.085537
1
1
1
995
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.NormedSpace.PiLp import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.UnitaryGroup #align_import analysis.inner_product_space.pi_L2 from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" set_option linter.uppercaseLean3 false open Real Set Filter RCLike Submodule Function Uniformity Topology NNReal ENNReal ComplexConjugate DirectSum noncomputable section variable {ΞΉ ΞΉ' π•œ : Type*} [RCLike π•œ] variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace π•œ E] variable {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace π•œ E'] variable {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] variable {F' : Type*} [NormedAddCommGroup F'] [InnerProductSpace ℝ F'] local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y instance PiLp.innerProductSpace {ΞΉ : Type*} [Fintype ΞΉ] (f : ΞΉ β†’ Type*) [βˆ€ i, NormedAddCommGroup (f i)] [βˆ€ i, InnerProductSpace π•œ (f i)] : InnerProductSpace π•œ (PiLp 2 f) where inner x y := βˆ‘ i, inner (x i) (y i) norm_sq_eq_inner x := by simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div] conj_symm := by intro x y unfold inner rw [map_sum] apply Finset.sum_congr rfl rintro z - apply inner_conj_symm add_left x y z := show (βˆ‘ i, inner (x i + y i) (z i)) = (βˆ‘ i, inner (x i) (z i)) + βˆ‘ i, inner (y i) (z i) by simp only [inner_add_left, Finset.sum_add_distrib] smul_left x y r := show (βˆ‘ i : ΞΉ, inner (r β€’ x i) (y i)) = conj r * βˆ‘ i, inner (x i) (y i) by simp only [Finset.mul_sum, inner_smul_left] #align pi_Lp.inner_product_space PiLp.innerProductSpace @[simp] theorem PiLp.inner_apply {ΞΉ : Type*} [Fintype ΞΉ] {f : ΞΉ β†’ Type*} [βˆ€ i, NormedAddCommGroup (f i)] [βˆ€ i, InnerProductSpace π•œ (f i)] (x y : PiLp 2 f) : βŸͺx, y⟫ = βˆ‘ i, βŸͺx i, y i⟫ := rfl #align pi_Lp.inner_apply PiLp.inner_apply abbrev EuclideanSpace (π•œ : Type*) (n : Type*) : Type _ := PiLp 2 fun _ : n => π•œ #align euclidean_space EuclideanSpace theorem EuclideanSpace.nnnorm_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x : EuclideanSpace π•œ n) : β€–xβ€–β‚Š = NNReal.sqrt (βˆ‘ i, β€–x iβ€–β‚Š ^ 2) := PiLp.nnnorm_eq_of_L2 x #align euclidean_space.nnnorm_eq EuclideanSpace.nnnorm_eq
Mathlib/Analysis/InnerProductSpace/PiL2.lean
114
116
theorem EuclideanSpace.norm_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x : EuclideanSpace π•œ n) : β€–xβ€– = √(βˆ‘ i, β€–x iβ€– ^ 2) := by
simpa only [Real.coe_sqrt, NNReal.coe_sum] using congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) x.nnnorm_eq
1
2.718282
0
1
4
996
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.NormedSpace.PiLp import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.UnitaryGroup #align_import analysis.inner_product_space.pi_L2 from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" set_option linter.uppercaseLean3 false open Real Set Filter RCLike Submodule Function Uniformity Topology NNReal ENNReal ComplexConjugate DirectSum noncomputable section variable {ΞΉ ΞΉ' π•œ : Type*} [RCLike π•œ] variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace π•œ E] variable {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace π•œ E'] variable {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] variable {F' : Type*} [NormedAddCommGroup F'] [InnerProductSpace ℝ F'] local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y instance PiLp.innerProductSpace {ΞΉ : Type*} [Fintype ΞΉ] (f : ΞΉ β†’ Type*) [βˆ€ i, NormedAddCommGroup (f i)] [βˆ€ i, InnerProductSpace π•œ (f i)] : InnerProductSpace π•œ (PiLp 2 f) where inner x y := βˆ‘ i, inner (x i) (y i) norm_sq_eq_inner x := by simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div] conj_symm := by intro x y unfold inner rw [map_sum] apply Finset.sum_congr rfl rintro z - apply inner_conj_symm add_left x y z := show (βˆ‘ i, inner (x i + y i) (z i)) = (βˆ‘ i, inner (x i) (z i)) + βˆ‘ i, inner (y i) (z i) by simp only [inner_add_left, Finset.sum_add_distrib] smul_left x y r := show (βˆ‘ i : ΞΉ, inner (r β€’ x i) (y i)) = conj r * βˆ‘ i, inner (x i) (y i) by simp only [Finset.mul_sum, inner_smul_left] #align pi_Lp.inner_product_space PiLp.innerProductSpace @[simp] theorem PiLp.inner_apply {ΞΉ : Type*} [Fintype ΞΉ] {f : ΞΉ β†’ Type*} [βˆ€ i, NormedAddCommGroup (f i)] [βˆ€ i, InnerProductSpace π•œ (f i)] (x y : PiLp 2 f) : βŸͺx, y⟫ = βˆ‘ i, βŸͺx i, y i⟫ := rfl #align pi_Lp.inner_apply PiLp.inner_apply abbrev EuclideanSpace (π•œ : Type*) (n : Type*) : Type _ := PiLp 2 fun _ : n => π•œ #align euclidean_space EuclideanSpace theorem EuclideanSpace.nnnorm_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x : EuclideanSpace π•œ n) : β€–xβ€–β‚Š = NNReal.sqrt (βˆ‘ i, β€–x iβ€–β‚Š ^ 2) := PiLp.nnnorm_eq_of_L2 x #align euclidean_space.nnnorm_eq EuclideanSpace.nnnorm_eq theorem EuclideanSpace.norm_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x : EuclideanSpace π•œ n) : β€–xβ€– = √(βˆ‘ i, β€–x iβ€– ^ 2) := by simpa only [Real.coe_sqrt, NNReal.coe_sum] using congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) x.nnnorm_eq #align euclidean_space.norm_eq EuclideanSpace.norm_eq theorem EuclideanSpace.dist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : dist x y = √(βˆ‘ i, dist (x i) (y i) ^ 2) := PiLp.dist_eq_of_L2 x y #align euclidean_space.dist_eq EuclideanSpace.dist_eq theorem EuclideanSpace.nndist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : nndist x y = NNReal.sqrt (βˆ‘ i, nndist (x i) (y i) ^ 2) := PiLp.nndist_eq_of_L2 x y #align euclidean_space.nndist_eq EuclideanSpace.nndist_eq theorem EuclideanSpace.edist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : edist x y = (βˆ‘ i, edist (x i) (y i) ^ 2) ^ (1 / 2 : ℝ) := PiLp.edist_eq_of_L2 x y #align euclidean_space.edist_eq EuclideanSpace.edist_eq
Mathlib/Analysis/InnerProductSpace/PiL2.lean
134
138
theorem EuclideanSpace.ball_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≀ r) : Metric.ball (0 : EuclideanSpace ℝ n) r = {x | βˆ‘ i, x i ^ 2 < r ^ 2} := by
ext x have : (0 : ℝ) ≀ βˆ‘ i, x i ^ 2 := Finset.sum_nonneg fun _ _ => sq_nonneg _ simp_rw [mem_setOf, mem_ball_zero_iff, norm_eq, norm_eq_abs, sq_abs, sqrt_lt this hr]
3
20.085537
1
1
4
996
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.NormedSpace.PiLp import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.UnitaryGroup #align_import analysis.inner_product_space.pi_L2 from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" set_option linter.uppercaseLean3 false open Real Set Filter RCLike Submodule Function Uniformity Topology NNReal ENNReal ComplexConjugate DirectSum noncomputable section variable {ΞΉ ΞΉ' π•œ : Type*} [RCLike π•œ] variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace π•œ E] variable {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace π•œ E'] variable {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] variable {F' : Type*} [NormedAddCommGroup F'] [InnerProductSpace ℝ F'] local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y instance PiLp.innerProductSpace {ΞΉ : Type*} [Fintype ΞΉ] (f : ΞΉ β†’ Type*) [βˆ€ i, NormedAddCommGroup (f i)] [βˆ€ i, InnerProductSpace π•œ (f i)] : InnerProductSpace π•œ (PiLp 2 f) where inner x y := βˆ‘ i, inner (x i) (y i) norm_sq_eq_inner x := by simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div] conj_symm := by intro x y unfold inner rw [map_sum] apply Finset.sum_congr rfl rintro z - apply inner_conj_symm add_left x y z := show (βˆ‘ i, inner (x i + y i) (z i)) = (βˆ‘ i, inner (x i) (z i)) + βˆ‘ i, inner (y i) (z i) by simp only [inner_add_left, Finset.sum_add_distrib] smul_left x y r := show (βˆ‘ i : ΞΉ, inner (r β€’ x i) (y i)) = conj r * βˆ‘ i, inner (x i) (y i) by simp only [Finset.mul_sum, inner_smul_left] #align pi_Lp.inner_product_space PiLp.innerProductSpace @[simp] theorem PiLp.inner_apply {ΞΉ : Type*} [Fintype ΞΉ] {f : ΞΉ β†’ Type*} [βˆ€ i, NormedAddCommGroup (f i)] [βˆ€ i, InnerProductSpace π•œ (f i)] (x y : PiLp 2 f) : βŸͺx, y⟫ = βˆ‘ i, βŸͺx i, y i⟫ := rfl #align pi_Lp.inner_apply PiLp.inner_apply abbrev EuclideanSpace (π•œ : Type*) (n : Type*) : Type _ := PiLp 2 fun _ : n => π•œ #align euclidean_space EuclideanSpace theorem EuclideanSpace.nnnorm_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x : EuclideanSpace π•œ n) : β€–xβ€–β‚Š = NNReal.sqrt (βˆ‘ i, β€–x iβ€–β‚Š ^ 2) := PiLp.nnnorm_eq_of_L2 x #align euclidean_space.nnnorm_eq EuclideanSpace.nnnorm_eq theorem EuclideanSpace.norm_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x : EuclideanSpace π•œ n) : β€–xβ€– = √(βˆ‘ i, β€–x iβ€– ^ 2) := by simpa only [Real.coe_sqrt, NNReal.coe_sum] using congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) x.nnnorm_eq #align euclidean_space.norm_eq EuclideanSpace.norm_eq theorem EuclideanSpace.dist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : dist x y = √(βˆ‘ i, dist (x i) (y i) ^ 2) := PiLp.dist_eq_of_L2 x y #align euclidean_space.dist_eq EuclideanSpace.dist_eq theorem EuclideanSpace.nndist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : nndist x y = NNReal.sqrt (βˆ‘ i, nndist (x i) (y i) ^ 2) := PiLp.nndist_eq_of_L2 x y #align euclidean_space.nndist_eq EuclideanSpace.nndist_eq theorem EuclideanSpace.edist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : edist x y = (βˆ‘ i, edist (x i) (y i) ^ 2) ^ (1 / 2 : ℝ) := PiLp.edist_eq_of_L2 x y #align euclidean_space.edist_eq EuclideanSpace.edist_eq theorem EuclideanSpace.ball_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≀ r) : Metric.ball (0 : EuclideanSpace ℝ n) r = {x | βˆ‘ i, x i ^ 2 < r ^ 2} := by ext x have : (0 : ℝ) ≀ βˆ‘ i, x i ^ 2 := Finset.sum_nonneg fun _ _ => sq_nonneg _ simp_rw [mem_setOf, mem_ball_zero_iff, norm_eq, norm_eq_abs, sq_abs, sqrt_lt this hr]
Mathlib/Analysis/InnerProductSpace/PiL2.lean
140
143
theorem EuclideanSpace.closedBall_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≀ r) : Metric.closedBall (0 : EuclideanSpace ℝ n) r = {x | βˆ‘ i, x i ^ 2 ≀ r ^ 2} := by
ext simp_rw [mem_setOf, mem_closedBall_zero_iff, norm_eq, norm_eq_abs, sq_abs, sqrt_le_left hr]
2
7.389056
1
1
4
996
import Mathlib.Analysis.InnerProductSpace.Projection import Mathlib.Analysis.NormedSpace.PiLp import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.UnitaryGroup #align_import analysis.inner_product_space.pi_L2 from "leanprover-community/mathlib"@"13bce9a6b6c44f6b4c91ac1c1d2a816e2533d395" set_option linter.uppercaseLean3 false open Real Set Filter RCLike Submodule Function Uniformity Topology NNReal ENNReal ComplexConjugate DirectSum noncomputable section variable {ΞΉ ΞΉ' π•œ : Type*} [RCLike π•œ] variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace π•œ E] variable {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace π•œ E'] variable {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] variable {F' : Type*} [NormedAddCommGroup F'] [InnerProductSpace ℝ F'] local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y instance PiLp.innerProductSpace {ΞΉ : Type*} [Fintype ΞΉ] (f : ΞΉ β†’ Type*) [βˆ€ i, NormedAddCommGroup (f i)] [βˆ€ i, InnerProductSpace π•œ (f i)] : InnerProductSpace π•œ (PiLp 2 f) where inner x y := βˆ‘ i, inner (x i) (y i) norm_sq_eq_inner x := by simp only [PiLp.norm_sq_eq_of_L2, map_sum, ← norm_sq_eq_inner, one_div] conj_symm := by intro x y unfold inner rw [map_sum] apply Finset.sum_congr rfl rintro z - apply inner_conj_symm add_left x y z := show (βˆ‘ i, inner (x i + y i) (z i)) = (βˆ‘ i, inner (x i) (z i)) + βˆ‘ i, inner (y i) (z i) by simp only [inner_add_left, Finset.sum_add_distrib] smul_left x y r := show (βˆ‘ i : ΞΉ, inner (r β€’ x i) (y i)) = conj r * βˆ‘ i, inner (x i) (y i) by simp only [Finset.mul_sum, inner_smul_left] #align pi_Lp.inner_product_space PiLp.innerProductSpace @[simp] theorem PiLp.inner_apply {ΞΉ : Type*} [Fintype ΞΉ] {f : ΞΉ β†’ Type*} [βˆ€ i, NormedAddCommGroup (f i)] [βˆ€ i, InnerProductSpace π•œ (f i)] (x y : PiLp 2 f) : βŸͺx, y⟫ = βˆ‘ i, βŸͺx i, y i⟫ := rfl #align pi_Lp.inner_apply PiLp.inner_apply abbrev EuclideanSpace (π•œ : Type*) (n : Type*) : Type _ := PiLp 2 fun _ : n => π•œ #align euclidean_space EuclideanSpace theorem EuclideanSpace.nnnorm_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x : EuclideanSpace π•œ n) : β€–xβ€–β‚Š = NNReal.sqrt (βˆ‘ i, β€–x iβ€–β‚Š ^ 2) := PiLp.nnnorm_eq_of_L2 x #align euclidean_space.nnnorm_eq EuclideanSpace.nnnorm_eq theorem EuclideanSpace.norm_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x : EuclideanSpace π•œ n) : β€–xβ€– = √(βˆ‘ i, β€–x iβ€– ^ 2) := by simpa only [Real.coe_sqrt, NNReal.coe_sum] using congr_arg ((↑) : ℝβ‰₯0 β†’ ℝ) x.nnnorm_eq #align euclidean_space.norm_eq EuclideanSpace.norm_eq theorem EuclideanSpace.dist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : dist x y = √(βˆ‘ i, dist (x i) (y i) ^ 2) := PiLp.dist_eq_of_L2 x y #align euclidean_space.dist_eq EuclideanSpace.dist_eq theorem EuclideanSpace.nndist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : nndist x y = NNReal.sqrt (βˆ‘ i, nndist (x i) (y i) ^ 2) := PiLp.nndist_eq_of_L2 x y #align euclidean_space.nndist_eq EuclideanSpace.nndist_eq theorem EuclideanSpace.edist_eq {π•œ : Type*} [RCLike π•œ] {n : Type*} [Fintype n] (x y : EuclideanSpace π•œ n) : edist x y = (βˆ‘ i, edist (x i) (y i) ^ 2) ^ (1 / 2 : ℝ) := PiLp.edist_eq_of_L2 x y #align euclidean_space.edist_eq EuclideanSpace.edist_eq theorem EuclideanSpace.ball_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≀ r) : Metric.ball (0 : EuclideanSpace ℝ n) r = {x | βˆ‘ i, x i ^ 2 < r ^ 2} := by ext x have : (0 : ℝ) ≀ βˆ‘ i, x i ^ 2 := Finset.sum_nonneg fun _ _ => sq_nonneg _ simp_rw [mem_setOf, mem_ball_zero_iff, norm_eq, norm_eq_abs, sq_abs, sqrt_lt this hr] theorem EuclideanSpace.closedBall_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≀ r) : Metric.closedBall (0 : EuclideanSpace ℝ n) r = {x | βˆ‘ i, x i ^ 2 ≀ r ^ 2} := by ext simp_rw [mem_setOf, mem_closedBall_zero_iff, norm_eq, norm_eq_abs, sq_abs, sqrt_le_left hr]
Mathlib/Analysis/InnerProductSpace/PiL2.lean
145
150
theorem EuclideanSpace.sphere_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≀ r) : Metric.sphere (0 : EuclideanSpace ℝ n) r = {x | βˆ‘ i, x i ^ 2 = r ^ 2} := by
ext x have : (0 : ℝ) ≀ βˆ‘ i, x i ^ 2 := Finset.sum_nonneg fun _ _ => sq_nonneg _ simp_rw [mem_setOf, mem_sphere_zero_iff_norm, norm_eq, norm_eq_abs, sq_abs, Real.sqrt_eq_iff_sq_eq this hr, eq_comm]
4
54.59815
2
1
4
996
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} namespace ContinuousLinearMap variable {B : E β†’L[π•œ] F β†’L[π•œ] G} {u : π•œ β†’ E} {v : π•œ β†’ F} {u' : E} {v' : F}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
52
56
theorem hasDerivWithinAt_of_bilinear (hu : HasDerivWithinAt u u' s x) (hv : HasDerivWithinAt v v' s x) : HasDerivWithinAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) s x := by
simpa using (B.hasFDerivWithinAt_of_bilinear hu.hasFDerivWithinAt hv.hasFDerivWithinAt).hasDerivWithinAt
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} namespace ContinuousLinearMap variable {B : E β†’L[π•œ] F β†’L[π•œ] G} {u : π•œ β†’ E} {v : π•œ β†’ F} {u' : E} {v' : F} theorem hasDerivWithinAt_of_bilinear (hu : HasDerivWithinAt u u' s x) (hv : HasDerivWithinAt v v' s x) : HasDerivWithinAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) s x := by simpa using (B.hasFDerivWithinAt_of_bilinear hu.hasFDerivWithinAt hv.hasFDerivWithinAt).hasDerivWithinAt
Mathlib/Analysis/Calculus/Deriv/Mul.lean
58
60
theorem hasDerivAt_of_bilinear (hu : HasDerivAt u u' x) (hv : HasDerivAt v v' x) : HasDerivAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) x := by
simpa using (B.hasFDerivAt_of_bilinear hu.hasFDerivAt hv.hasFDerivAt).hasDerivAt
1
2.718282
0
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} namespace ContinuousLinearMap variable {B : E β†’L[π•œ] F β†’L[π•œ] G} {u : π•œ β†’ E} {v : π•œ β†’ F} {u' : E} {v' : F} theorem hasDerivWithinAt_of_bilinear (hu : HasDerivWithinAt u u' s x) (hv : HasDerivWithinAt v v' s x) : HasDerivWithinAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) s x := by simpa using (B.hasFDerivWithinAt_of_bilinear hu.hasFDerivWithinAt hv.hasFDerivWithinAt).hasDerivWithinAt theorem hasDerivAt_of_bilinear (hu : HasDerivAt u u' x) (hv : HasDerivAt v v' x) : HasDerivAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) x := by simpa using (B.hasFDerivAt_of_bilinear hu.hasFDerivAt hv.hasFDerivAt).hasDerivAt
Mathlib/Analysis/Calculus/Deriv/Mul.lean
62
65
theorem hasStrictDerivAt_of_bilinear (hu : HasStrictDerivAt u u' x) (hv : HasStrictDerivAt v v' x) : HasStrictDerivAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) x := by
simpa using (B.hasStrictFDerivAt_of_bilinear hu.hasStrictFDerivAt hv.hasStrictFDerivAt).hasStrictDerivAt
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
87
89
theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by
simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt
1
2.718282
0
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'} theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt #align has_deriv_within_at.smul HasDerivWithinAt.smul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
92
95
theorem HasDerivAt.smul (hc : HasDerivAt c c' x) (hf : HasDerivAt f f' x) : HasDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by
rw [← hasDerivWithinAt_univ] at * exact hc.smul hf
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'} theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt #align has_deriv_within_at.smul HasDerivWithinAt.smul theorem HasDerivAt.smul (hc : HasDerivAt c c' x) (hf : HasDerivAt f f' x) : HasDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by rw [← hasDerivWithinAt_univ] at * exact hc.smul hf #align has_deriv_at.smul HasDerivAt.smul nonrec theorem HasStrictDerivAt.smul (hc : HasStrictDerivAt c c' x) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by simpa using (hc.smul hf).hasStrictDerivAt #align has_strict_deriv_at.smul HasStrictDerivAt.smul theorem derivWithin_smul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hf : DifferentiableWithinAt π•œ f s x) : derivWithin (fun y => c y β€’ f y) s x = c x β€’ derivWithin f s x + derivWithin c s x β€’ f x := (hc.hasDerivWithinAt.smul hf.hasDerivWithinAt).derivWithin hxs #align deriv_within_smul derivWithin_smul theorem deriv_smul (hc : DifferentiableAt π•œ c x) (hf : DifferentiableAt π•œ f x) : deriv (fun y => c y β€’ f y) x = c x β€’ deriv f x + deriv c x β€’ f x := (hc.hasDerivAt.smul hf.hasDerivAt).deriv #align deriv_smul deriv_smul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
114
117
theorem HasStrictDerivAt.smul_const (hc : HasStrictDerivAt c c' x) (f : F) : HasStrictDerivAt (fun y => c y β€’ f) (c' β€’ f) x := by
have := hc.smul (hasStrictDerivAt_const x f) rwa [smul_zero, zero_add] at this
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'} theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt #align has_deriv_within_at.smul HasDerivWithinAt.smul theorem HasDerivAt.smul (hc : HasDerivAt c c' x) (hf : HasDerivAt f f' x) : HasDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by rw [← hasDerivWithinAt_univ] at * exact hc.smul hf #align has_deriv_at.smul HasDerivAt.smul nonrec theorem HasStrictDerivAt.smul (hc : HasStrictDerivAt c c' x) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by simpa using (hc.smul hf).hasStrictDerivAt #align has_strict_deriv_at.smul HasStrictDerivAt.smul theorem derivWithin_smul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hf : DifferentiableWithinAt π•œ f s x) : derivWithin (fun y => c y β€’ f y) s x = c x β€’ derivWithin f s x + derivWithin c s x β€’ f x := (hc.hasDerivWithinAt.smul hf.hasDerivWithinAt).derivWithin hxs #align deriv_within_smul derivWithin_smul theorem deriv_smul (hc : DifferentiableAt π•œ c x) (hf : DifferentiableAt π•œ f x) : deriv (fun y => c y β€’ f y) x = c x β€’ deriv f x + deriv c x β€’ f x := (hc.hasDerivAt.smul hf.hasDerivAt).deriv #align deriv_smul deriv_smul theorem HasStrictDerivAt.smul_const (hc : HasStrictDerivAt c c' x) (f : F) : HasStrictDerivAt (fun y => c y β€’ f) (c' β€’ f) x := by have := hc.smul (hasStrictDerivAt_const x f) rwa [smul_zero, zero_add] at this #align has_strict_deriv_at.smul_const HasStrictDerivAt.smul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
120
123
theorem HasDerivWithinAt.smul_const (hc : HasDerivWithinAt c c' s x) (f : F) : HasDerivWithinAt (fun y => c y β€’ f) (c' β€’ f) s x := by
have := hc.smul (hasDerivWithinAt_const x s f) rwa [smul_zero, zero_add] at this
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section SMul variable {π•œ' : Type*} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {c : π•œ β†’ π•œ'} {c' : π•œ'} theorem HasDerivWithinAt.smul (hc : HasDerivWithinAt c c' s x) (hf : HasDerivWithinAt f f' s x) : HasDerivWithinAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) s x := by simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt #align has_deriv_within_at.smul HasDerivWithinAt.smul theorem HasDerivAt.smul (hc : HasDerivAt c c' x) (hf : HasDerivAt f f' x) : HasDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by rw [← hasDerivWithinAt_univ] at * exact hc.smul hf #align has_deriv_at.smul HasDerivAt.smul nonrec theorem HasStrictDerivAt.smul (hc : HasStrictDerivAt c c' x) (hf : HasStrictDerivAt f f' x) : HasStrictDerivAt (fun y => c y β€’ f y) (c x β€’ f' + c' β€’ f x) x := by simpa using (hc.smul hf).hasStrictDerivAt #align has_strict_deriv_at.smul HasStrictDerivAt.smul theorem derivWithin_smul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hf : DifferentiableWithinAt π•œ f s x) : derivWithin (fun y => c y β€’ f y) s x = c x β€’ derivWithin f s x + derivWithin c s x β€’ f x := (hc.hasDerivWithinAt.smul hf.hasDerivWithinAt).derivWithin hxs #align deriv_within_smul derivWithin_smul theorem deriv_smul (hc : DifferentiableAt π•œ c x) (hf : DifferentiableAt π•œ f x) : deriv (fun y => c y β€’ f y) x = c x β€’ deriv f x + deriv c x β€’ f x := (hc.hasDerivAt.smul hf.hasDerivAt).deriv #align deriv_smul deriv_smul theorem HasStrictDerivAt.smul_const (hc : HasStrictDerivAt c c' x) (f : F) : HasStrictDerivAt (fun y => c y β€’ f) (c' β€’ f) x := by have := hc.smul (hasStrictDerivAt_const x f) rwa [smul_zero, zero_add] at this #align has_strict_deriv_at.smul_const HasStrictDerivAt.smul_const theorem HasDerivWithinAt.smul_const (hc : HasDerivWithinAt c c' s x) (f : F) : HasDerivWithinAt (fun y => c y β€’ f) (c' β€’ f) s x := by have := hc.smul (hasDerivWithinAt_const x s f) rwa [smul_zero, zero_add] at this #align has_deriv_within_at.smul_const HasDerivWithinAt.smul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
126
129
theorem HasDerivAt.smul_const (hc : HasDerivAt c c' x) (f : F) : HasDerivAt (fun y => c y β€’ f) (c' β€’ f) x := by
rw [← hasDerivWithinAt_univ] at * exact hc.smul_const f
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
206
212
theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by
have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this
5
148.413159
2
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
215
218
theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by
rw [← hasDerivWithinAt_univ] at * exact hc.mul hd
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
221
227
theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by
have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this
5
148.413159
2
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul
Mathlib/Analysis/Calculus/Deriv/Mul.lean
242
245
theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by
convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero]
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero] #align has_deriv_within_at.mul_const HasDerivWithinAt.mul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
248
251
theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by
rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero] #align has_deriv_within_at.mul_const HasDerivWithinAt.mul_const theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d #align has_deriv_at.mul_const HasDerivAt.mul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
254
255
theorem hasDerivAt_mul_const (c : π•œ) : HasDerivAt (fun x => x * c) c x := by
simpa only [one_mul] using (hasDerivAt_id' x).mul_const c
1
2.718282
0
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero] #align has_deriv_within_at.mul_const HasDerivWithinAt.mul_const theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d #align has_deriv_at.mul_const HasDerivAt.mul_const theorem hasDerivAt_mul_const (c : π•œ) : HasDerivAt (fun x => x * c) c x := by simpa only [one_mul] using (hasDerivAt_id' x).mul_const c #align has_deriv_at_mul_const hasDerivAt_mul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
258
261
theorem HasStrictDerivAt.mul_const (hc : HasStrictDerivAt c c' x) (d : 𝔸) : HasStrictDerivAt (fun y => c y * d) (c' * d) x := by
convert hc.mul (hasStrictDerivAt_const x d) using 1 rw [mul_zero, add_zero]
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Mul variable {π•œ' 𝔸 : Type*} [NormedField π•œ'] [NormedRing 𝔸] [NormedAlgebra π•œ π•œ'] [NormedAlgebra π•œ 𝔸] {c d : π•œ β†’ 𝔸} {c' d' : 𝔸} {u v : π•œ β†’ π•œ'} theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x := by have := (HasFDerivWithinAt.mul' hc hd).hasDerivWithinAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.mul HasDerivWithinAt.mul theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul hd #align has_deriv_at.mul HasDerivAt.mul theorem HasStrictDerivAt.mul (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => c y * d y) (c' * d x + c x * d') x := by have := (HasStrictFDerivAt.mul' hc hd).hasStrictDerivAt rwa [ContinuousLinearMap.add_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.mul HasStrictDerivAt.mul theorem derivWithin_mul (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) : derivWithin (fun y => c y * d y) s x = derivWithin c s x * d x + c x * derivWithin d s x := (hc.hasDerivWithinAt.mul hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_mul derivWithin_mul @[simp] theorem deriv_mul (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => c y * d y) x = deriv c x * d x + c x * deriv d x := (hc.hasDerivAt.mul hd.hasDerivAt).deriv #align deriv_mul deriv_mul theorem HasDerivWithinAt.mul_const (hc : HasDerivWithinAt c c' s x) (d : 𝔸) : HasDerivWithinAt (fun y => c y * d) (c' * d) s x := by convert hc.mul (hasDerivWithinAt_const x s d) using 1 rw [mul_zero, add_zero] #align has_deriv_within_at.mul_const HasDerivWithinAt.mul_const theorem HasDerivAt.mul_const (hc : HasDerivAt c c' x) (d : 𝔸) : HasDerivAt (fun y => c y * d) (c' * d) x := by rw [← hasDerivWithinAt_univ] at * exact hc.mul_const d #align has_deriv_at.mul_const HasDerivAt.mul_const theorem hasDerivAt_mul_const (c : π•œ) : HasDerivAt (fun x => x * c) c x := by simpa only [one_mul] using (hasDerivAt_id' x).mul_const c #align has_deriv_at_mul_const hasDerivAt_mul_const theorem HasStrictDerivAt.mul_const (hc : HasStrictDerivAt c c' x) (d : 𝔸) : HasStrictDerivAt (fun y => c y * d) (c' * d) x := by convert hc.mul (hasStrictDerivAt_const x d) using 1 rw [mul_zero, add_zero] #align has_strict_deriv_at.mul_const HasStrictDerivAt.mul_const theorem derivWithin_mul_const (hxs : UniqueDiffWithinAt π•œ s x) (hc : DifferentiableWithinAt π•œ c s x) (d : 𝔸) : derivWithin (fun y => c y * d) s x = derivWithin c s x * d := (hc.hasDerivWithinAt.mul_const d).derivWithin hxs #align deriv_within_mul_const derivWithin_mul_const theorem deriv_mul_const (hc : DifferentiableAt π•œ c x) (d : 𝔸) : deriv (fun y => c y * d) x = deriv c x * d := (hc.hasDerivAt.mul_const d).deriv #align deriv_mul_const deriv_mul_const
Mathlib/Analysis/Calculus/Deriv/Mul.lean
274
281
theorem deriv_mul_const_field (v : π•œ') : deriv (fun y => u y * v) x = deriv u x * v := by
by_cases hu : DifferentiableAt π•œ u x Β· exact deriv_mul_const hu v Β· rw [deriv_zero_of_not_differentiableAt hu, zero_mul] rcases eq_or_ne v 0 with (rfl | hd) Β· simp only [mul_zero, deriv_const] Β· refine deriv_zero_of_not_differentiableAt (mt (fun H => ?_) hu) simpa only [mul_inv_cancel_rightβ‚€ hd] using H.mul_const v⁻¹
7
1,096.633158
2
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section HasDeriv variable {ΞΉ : Type*} [DecidableEq ΞΉ] {𝔸' : Type*} [NormedCommRing 𝔸'] [NormedAlgebra π•œ 𝔸'] {u : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ 𝔸'} {f' : ΞΉ β†’ 𝔸'}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
336
339
theorem HasDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivAt (f i) (f' i) x) : HasDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by
simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivAt)).hasDerivAt
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section HasDeriv variable {ΞΉ : Type*} [DecidableEq ΞΉ] {𝔸' : Type*} [NormedCommRing 𝔸'] [NormedAlgebra π•œ 𝔸'] {u : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ 𝔸'} {f' : ΞΉ β†’ 𝔸'} theorem HasDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivAt (f i) (f' i) x) : HasDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivAt)).hasDerivAt
Mathlib/Analysis/Calculus/Deriv/Mul.lean
341
344
theorem HasDerivWithinAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivWithinAt (f i) (f' i) s x) : HasDerivWithinAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) s x := by
simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivWithinAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivWithinAt)).hasDerivWithinAt
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section HasDeriv variable {ΞΉ : Type*} [DecidableEq ΞΉ] {𝔸' : Type*} [NormedCommRing 𝔸'] [NormedAlgebra π•œ 𝔸'] {u : Finset ΞΉ} {f : ΞΉ β†’ π•œ β†’ 𝔸'} {f' : ΞΉ β†’ 𝔸'} theorem HasDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivAt (f i) (f' i) x) : HasDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivAt)).hasDerivAt theorem HasDerivWithinAt.finset_prod (hf : βˆ€ i ∈ u, HasDerivWithinAt (f i) (f' i) s x) : HasDerivWithinAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) s x := by simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasFDerivWithinAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivWithinAt)).hasDerivWithinAt
Mathlib/Analysis/Calculus/Deriv/Mul.lean
346
349
theorem HasStrictDerivAt.finset_prod (hf : βˆ€ i ∈ u, HasStrictDerivAt (f i) (f' i) x) : HasStrictDerivAt (∏ i ∈ u, f i Β·) (βˆ‘ i ∈ u, (∏ j ∈ u.erase i, f j x) β€’ f' i) x := by
simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using (HasStrictFDerivAt.finset_prod (fun i hi ↦ (hf i hi).hasStrictFDerivAt)).hasStrictDerivAt
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F}
Mathlib/Analysis/Calculus/Deriv/Mul.lean
447
451
theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by
have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
3
20.085537
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp
Mathlib/Analysis/Calculus/Deriv/Mul.lean
454
459
theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by
have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
3
20.085537
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_comp HasDerivWithinAt.clm_comp
Mathlib/Analysis/Calculus/Deriv/Mul.lean
462
465
theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by
rw [← hasDerivWithinAt_univ] at * exact hc.clm_comp hd
2
7.389056
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_comp HasDerivWithinAt.clm_comp theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.clm_comp hd #align has_deriv_at.clm_comp HasDerivAt.clm_comp theorem derivWithin_clm_comp (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun y => (c y).comp (d y)) s x = (derivWithin c s x).comp (d x) + (c x).comp (derivWithin d s x) := (hc.hasDerivWithinAt.clm_comp hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_clm_comp derivWithin_clm_comp theorem deriv_clm_comp (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => (c y).comp (d y)) x = (deriv c x).comp (d x) + (c x).comp (deriv d x) := (hc.hasDerivAt.clm_comp hd.hasDerivAt).deriv #align deriv_clm_comp deriv_clm_comp
Mathlib/Analysis/Calculus/Deriv/Mul.lean
480
484
theorem HasStrictDerivAt.clm_apply (hc : HasStrictDerivAt c c' x) (hu : HasStrictDerivAt u u' x) : HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by
have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
3
20.085537
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_comp HasDerivWithinAt.clm_comp theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.clm_comp hd #align has_deriv_at.clm_comp HasDerivAt.clm_comp theorem derivWithin_clm_comp (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun y => (c y).comp (d y)) s x = (derivWithin c s x).comp (d x) + (c x).comp (derivWithin d s x) := (hc.hasDerivWithinAt.clm_comp hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_clm_comp derivWithin_clm_comp theorem deriv_clm_comp (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => (c y).comp (d y)) x = (deriv c x).comp (d x) + (c x).comp (deriv d x) := (hc.hasDerivAt.clm_comp hd.hasDerivAt).deriv #align deriv_clm_comp deriv_clm_comp theorem HasStrictDerivAt.clm_apply (hc : HasStrictDerivAt c c' x) (hu : HasStrictDerivAt u u' x) : HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_apply HasStrictDerivAt.clm_apply
Mathlib/Analysis/Calculus/Deriv/Mul.lean
487
492
theorem HasDerivWithinAt.clm_apply (hc : HasDerivWithinAt c c' s x) (hu : HasDerivWithinAt u u' s x) : HasDerivWithinAt (fun y => (c y) (u y)) (c' (u x) + c x u') s x := by
have := (hc.hasFDerivWithinAt.clm_apply hu.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
3
20.085537
1
1
25
997
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Mul import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.mul from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w noncomputable section open scoped Classical Topology Filter ENNReal open Filter Asymptotics Set open ContinuousLinearMap (smulRight smulRight_one_eq_iff) variable {π•œ : Type u} [NontriviallyNormedField π•œ] variable {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] variable {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] variable {f fβ‚€ f₁ g : π•œ β†’ F} variable {f' fβ‚€' f₁' g' : F} variable {x : π•œ} variable {s t : Set π•œ} variable {L L₁ Lβ‚‚ : Filter π•œ} section Prod section CLMCompApply open ContinuousLinearMap variable {G : Type*} [NormedAddCommGroup G] [NormedSpace π•œ G] {c : π•œ β†’ F β†’L[π•œ] G} {c' : F β†’L[π•œ] G} {d : π•œ β†’ E β†’L[π•œ] F} {d' : E β†’L[π•œ] F} {u : π•œ β†’ F} {u' : F} theorem HasStrictDerivAt.clm_comp (hc : HasStrictDerivAt c c' x) (hd : HasStrictDerivAt d d' x) : HasStrictDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by have := (hc.hasStrictFDerivAt.clm_comp hd.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_comp HasStrictDerivAt.clm_comp theorem HasDerivWithinAt.clm_comp (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) : HasDerivWithinAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') s x := by have := (hc.hasFDerivWithinAt.clm_comp hd.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, comp_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_comp HasDerivWithinAt.clm_comp theorem HasDerivAt.clm_comp (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) : HasDerivAt (fun y => (c y).comp (d y)) (c'.comp (d x) + (c x).comp d') x := by rw [← hasDerivWithinAt_univ] at * exact hc.clm_comp hd #align has_deriv_at.clm_comp HasDerivAt.clm_comp theorem derivWithin_clm_comp (hc : DifferentiableWithinAt π•œ c s x) (hd : DifferentiableWithinAt π•œ d s x) (hxs : UniqueDiffWithinAt π•œ s x) : derivWithin (fun y => (c y).comp (d y)) s x = (derivWithin c s x).comp (d x) + (c x).comp (derivWithin d s x) := (hc.hasDerivWithinAt.clm_comp hd.hasDerivWithinAt).derivWithin hxs #align deriv_within_clm_comp derivWithin_clm_comp theorem deriv_clm_comp (hc : DifferentiableAt π•œ c x) (hd : DifferentiableAt π•œ d x) : deriv (fun y => (c y).comp (d y)) x = (deriv c x).comp (d x) + (c x).comp (deriv d x) := (hc.hasDerivAt.clm_comp hd.hasDerivAt).deriv #align deriv_clm_comp deriv_clm_comp theorem HasStrictDerivAt.clm_apply (hc : HasStrictDerivAt c c' x) (hu : HasStrictDerivAt u u' x) : HasStrictDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by have := (hc.hasStrictFDerivAt.clm_apply hu.hasStrictFDerivAt).hasStrictDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_strict_deriv_at.clm_apply HasStrictDerivAt.clm_apply theorem HasDerivWithinAt.clm_apply (hc : HasDerivWithinAt c c' s x) (hu : HasDerivWithinAt u u' s x) : HasDerivWithinAt (fun y => (c y) (u y)) (c' (u x) + c x u') s x := by have := (hc.hasFDerivWithinAt.clm_apply hu.hasFDerivWithinAt).hasDerivWithinAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this #align has_deriv_within_at.clm_apply HasDerivWithinAt.clm_apply
Mathlib/Analysis/Calculus/Deriv/Mul.lean
495
499
theorem HasDerivAt.clm_apply (hc : HasDerivAt c c' x) (hu : HasDerivAt u u' x) : HasDerivAt (fun y => (c y) (u y)) (c' (u x) + c x u') x := by
have := (hc.hasFDerivAt.clm_apply hu.hasFDerivAt).hasDerivAt rwa [add_apply, comp_apply, flip_apply, smulRight_apply, smulRight_apply, one_apply, one_smul, one_smul, add_comm] at this
3
20.085537
1
1
25
997