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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.