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 | goals listlengths 0 224 | goals_before listlengths 0 220 |
|---|---|---|---|---|---|---|---|
import Mathlib.CategoryTheory.Elementwise
import Mathlib.CategoryTheory.Adjunction.Evaluation
import Mathlib.Tactic.CategoryTheory.Elementwise
import Mathlib.CategoryTheory.Adhesive
import Mathlib.CategoryTheory.Sites.ConcreteSheafification
#align_import category_theory.sites.subsheaf from "leanprover-community/mathl... | Mathlib/CategoryTheory/Sites/Subsheaf.lean | 110 | 113 | theorem Subpresheaf.homOfLe_ι {G G' : Subpresheaf F} (h : G ≤ G') :
Subpresheaf.homOfLe h ≫ G'.ι = G.ι := by |
ext
rfl
| [
" x ∈ F.map x✝¹ ⁻¹' (fun U => ⊤) V",
" { obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.map (𝟙 X) =\n 𝟙 ({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.obj X)",
" ↑({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.map (𝟙 X) ⟨x, property✝⟩) =... | [
" x ∈ F.map x✝¹ ⁻¹' (fun U => ⊤) V",
" { obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.map (𝟙 X) =\n 𝟙 ({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.obj X)",
" ↑({ obj := fun U => ↑(G.obj U), map := fun U V i x => ⟨F.map i ↑x, ⋯⟩ }.map (𝟙 X) ⟨x, property✝⟩) =... |
import Mathlib.Topology.Category.LightProfinite.Basic
import Mathlib.Topology.Category.Profinite.Limits
namespace LightProfinite
universe u w
attribute [local instance] CategoryTheory.ConcreteCategory.instFunLike
open CategoryTheory Limits
section Pullbacks
variable {X Y B : LightProfinite.{u}} (f : X ⟶ B) (g ... | Mathlib/Topology/Category/LightProfinite/Limits.lean | 202 | 204 | theorem Sigma.ι_comp_toFiniteCoproduct (a : α) :
(Limits.Sigma.ι X a) ≫ (coproductIsoCoproduct X).inv = finiteCoproduct.ι X a := by |
simp [coproductIsoCoproduct]
| [
" fst f g ≫ f = snd f g ≫ g",
" (fst f g ≫ f) ⟨val✝, h⟩ = (snd f g ≫ g) ⟨val✝, h⟩",
" (a z, b z) ∈ {xy | f xy.1 = g xy.2}",
" Continuous fun z => ⟨(a z, b z), ⋯⟩",
" Continuous fun x => (a x, b x)",
" (Continuous fun x => a x) ∧ Continuous fun x => b x",
" a = b",
" a z = b z",
" ↑(a z) = ↑(b z)",
... | [
" fst f g ≫ f = snd f g ≫ g",
" (fst f g ≫ f) ⟨val✝, h⟩ = (snd f g ≫ g) ⟨val✝, h⟩",
" (a z, b z) ∈ {xy | f xy.1 = g xy.2}",
" Continuous fun z => ⟨(a z, b z), ⋯⟩",
" Continuous fun x => (a x, b x)",
" (Continuous fun x => a x) ∧ Continuous fun x => b x",
" a = b",
" a z = b z",
" ↑(a z) = ↑(b z)",
... |
import Mathlib.RingTheory.FiniteType
import Mathlib.RingTheory.Localization.AtPrime
import Mathlib.RingTheory.Localization.Away.Basic
import Mathlib.RingTheory.Localization.Integer
import Mathlib.RingTheory.Localization.Submodule
import Mathlib.RingTheory.Nilpotent.Lemmas
import Mathlib.RingTheory.RingHomProperties
im... | Mathlib/RingTheory/LocalProperties.lean | 236 | 255 | theorem Ideal.le_of_localization_maximal {I J : Ideal R}
(h : ∀ (P : Ideal R) (hP : P.IsMaximal),
Ideal.map (algebraMap R (Localization.AtPrime P)) I ≤
Ideal.map (algebraMap R (Localization.AtPrime P)) J) :
I ≤ J := by |
intro x hx
suffices J.colon (Ideal.span {x}) = ⊤ by
simpa using Submodule.mem_colon.mp
(show (1 : R) ∈ J.colon (Ideal.span {x}) from this.symm ▸ Submodule.mem_top) x
(Ideal.mem_span_singleton_self x)
refine Not.imp_symm (J.colon (Ideal.span {x})).exists_le_maximal ?_
push_neg
intro P hP le
... | [
" I ≤ J",
" x ∈ J",
" Submodule.colon J (span {x}) = ⊤",
" ¬∃ M, M.IsMaximal ∧ Submodule.colon J (span {x}) ≤ M",
" ∀ (M : Ideal R), M.IsMaximal → ¬Submodule.colon J (span {x}) ≤ M",
" False",
" s * m * x ∈ J"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.ContDiff.Defs
#align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open scoped Classical Topology
open Filter Asymptotics Set
variable {𝕜... | Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean | 128 | 134 | theorem contDiffOn_of_continuousOn_differentiableOn_deriv {n : ℕ∞}
(Hcont : ∀ m : ℕ, (m : ℕ∞) ≤ n → ContinuousOn (fun x => iteratedDerivWithin m f s x) s)
(Hdiff : ∀ m : ℕ, (m : ℕ∞) < n → DifferentiableOn 𝕜 (fun x => iteratedDerivWithin m f s x) s) :
ContDiffOn 𝕜 n f s := by |
apply contDiffOn_of_continuousOn_differentiableOn
· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_continuousOn_iff]
· simpa only [iteratedFDerivWithin_eq_equiv_comp, LinearIsometryEquiv.comp_differentiableOn_iff]
| [
" iteratedDerivWithin n f univ = iteratedDeriv n f",
" iteratedDerivWithin n f univ x = iteratedDeriv n f x",
" iteratedDerivWithin n f s = ⇑(ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F).symm ∘ iteratedFDerivWithin 𝕜 n f s",
" iteratedDerivWithin n f s x =\n (⇑(ContinuousMultilinearMap.piFieldEquiv... | [
" iteratedDerivWithin n f univ = iteratedDeriv n f",
" iteratedDerivWithin n f univ x = iteratedDeriv n f x",
" iteratedDerivWithin n f s = ⇑(ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F).symm ∘ iteratedFDerivWithin 𝕜 n f s",
" iteratedDerivWithin n f s x =\n (⇑(ContinuousMultilinearMap.piFieldEquiv... |
import Mathlib.Data.Set.Lattice
import Mathlib.Init.Set
import Mathlib.Control.Basic
import Mathlib.Lean.Expr.ExtraRecognizers
#align_import data.set.functor from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
universe u
open Function
namespace Set
variable {α β : Type u} {s : Set α} ... | Mathlib/Data/Set/Functor.lean | 146 | 147 | theorem image_val_subset : (γ : Set α) ⊆ β := by |
rintro _ ⟨⟨_, ha⟩, _, rfl⟩; exact ha
| [
" Lean.Internal.coeM t = Subtype.val '' t",
" ⋃ x ∈ t, {↑x} = Subtype.val '' t",
" x✝ ∈ ⋃ x ∈ t, {↑x} ↔ x✝ ∈ Subtype.val '' t",
" Subtype.val '' γ ⊆ β",
" ↑⟨val✝, ha⟩ ∈ β"
] | [
" Lean.Internal.coeM t = Subtype.val '' t",
" ⋃ x ∈ t, {↑x} = Subtype.val '' t",
" x✝ ∈ ⋃ x ∈ t, {↑x} ↔ x✝ ∈ Subtype.val '' t"
] |
import Mathlib.Algebra.Order.Group.Instances
import Mathlib.Analysis.Convex.Segment
import Mathlib.Tactic.GCongr
#align_import analysis.convex.star from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Set
open Convex Pointwise
variable {𝕜 E F : Type*}
section OrderedSemiring
va... | Mathlib/Analysis/Convex/Star.lean | 93 | 99 | theorem starConvex_iff_pointwise_add_subset :
StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s := by |
refine
⟨?_, fun h y hy a b ha hb hab =>
h ha hb hab (add_mem_add (smul_mem_smul_set <| mem_singleton _) ⟨_, hy, rfl⟩)⟩
rintro hA a b ha hb hab w ⟨au, ⟨u, rfl : u = x, rfl⟩, bv, ⟨v, hv, rfl⟩, rfl⟩
exact hA hv ha hb hab
| [
" StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" a • x + b • y ∈ s",
" (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s",
" StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s",
" StarConvex 𝕜 x s → ∀ ⦃... | [
" StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s",
" a • x + b • y ∈ s",
" (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s"
] |
import Mathlib.Logic.Function.Conjugate
#align_import logic.function.iterate from "leanprover-community/mathlib"@"792a2a264169d64986541c6f8f7e3bbb6acb6295"
universe u v
variable {α : Type u} {β : Type v}
def Nat.iterate {α : Sort u} (op : α → α) : ℕ → α → α
| 0, a => a
| succ k, a => iterate op k (op a)
#a... | Mathlib/Logic/Function/Iterate.lean | 121 | 129 | theorem iterate_left {g : ℕ → α → α} (H : ∀ n, Semiconj f (g n) (g <| n + 1)) (n k : ℕ) :
Semiconj f^[n] (g k) (g <| n + k) := by |
induction n generalizing k with
| zero =>
rw [Nat.zero_add]
exact id_left
| succ n ihn =>
rw [Nat.add_right_comm, Nat.add_assoc]
exact (H k).trans (ihn (k + 1))
| [
" id^[n.succ] = id",
" f^[m + n.succ] = f^[m] ∘ f^[n.succ]",
" (f^[m] ∘ f^[n]) ∘ f = f^[m] ∘ f^[n] ∘ f",
" f^[m + n] x = f^[m] (f^[n] x)",
" (f^[m] ∘ f^[n]) x = f^[m] (f^[n] x)",
" f^[m * 0] = f^[m]^[0]",
" f^[m * (n + 1)] = f^[m]^[n + 1]",
" f^[n.succ] x = x",
" Semiconj f^[n] (g k) (g (n + k))",
... | [
" id^[n.succ] = id",
" f^[m + n.succ] = f^[m] ∘ f^[n.succ]",
" (f^[m] ∘ f^[n]) ∘ f = f^[m] ∘ f^[n] ∘ f",
" f^[m + n] x = f^[m] (f^[n] x)",
" (f^[m] ∘ f^[n]) x = f^[m] (f^[n] x)",
" f^[m * 0] = f^[m]^[0]",
" f^[m * (n + 1)] = f^[m]^[n + 1]",
" f^[n.succ] x = x"
] |
import Mathlib.MeasureTheory.Measure.Typeclasses
open scoped ENNReal
namespace MeasureTheory
variable {α : Type*}
noncomputable
def Measure.trim {m m0 : MeasurableSpace α} (μ : @Measure α m0) (hm : m ≤ m0) : @Measure α m :=
@OuterMeasure.toMeasure α m μ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory... | Mathlib/MeasureTheory/Measure/Trim.lean | 107 | 121 | theorem sigmaFiniteTrim_mono {m m₂ m0 : MeasurableSpace α} {μ : Measure α} (hm : m ≤ m0)
(hm₂ : m₂ ≤ m) [SigmaFinite (μ.trim (hm₂.trans hm))] : SigmaFinite (μ.trim hm) := by |
refine ⟨⟨?_⟩⟩
refine
{ set := spanningSets (μ.trim (hm₂.trans hm))
set_mem := fun _ => Set.mem_univ _
finite := fun i => ?_
spanning := iUnion_spanningSets _ }
calc
(μ.trim hm) (spanningSets (μ.trim (hm₂.trans hm)) i) =
((μ.trim hm).trim hm₂) (spanningSets (μ.trim (hm₂.trans hm)... | [
" μ.trim ⋯ = μ",
" (μ.trim hm).toOuterMeasure = μ.trim",
" Measure.trim 0 hm = 0",
" (μ.trim hm) s = μ s",
" μ s ≤ (μ.trim hm) s",
" μ s ≤ (μ.toMeasure ⋯) s",
" (μ.trim hm) (toMeasurable (μ.trim hm) s) = 0",
" (μ.trim hm₂).trim hm₁₂ = μ.trim ⋯",
" ((μ.trim hm₂).trim hm₁₂) t = (μ.trim ⋯) t",
" (μ.t... | [
" μ.trim ⋯ = μ",
" (μ.trim hm).toOuterMeasure = μ.trim",
" Measure.trim 0 hm = 0",
" (μ.trim hm) s = μ s",
" μ s ≤ (μ.trim hm) s",
" μ s ≤ (μ.toMeasure ⋯) s",
" (μ.trim hm) (toMeasurable (μ.trim hm) s) = 0",
" (μ.trim hm₂).trim hm₁₂ = μ.trim ⋯",
" ((μ.trim hm₂).trim hm₁₂) t = (μ.trim ⋯) t",
" (μ.t... |
import Mathlib.Algebra.Order.Field.Pi
import Mathlib.Algebra.Order.UpperLower
import Mathlib.Analysis.Normed.Group.Pointwise
import Mathlib.Analysis.Normed.Order.Basic
import Mathlib.Data.Real.Sqrt
import Mathlib.Topology.Algebra.Order.UpperLower
import Mathlib.Topology.MetricSpace.Sequences
#align_import analysis.no... | Mathlib/Analysis/Normed/Order/UpperLower.lean | 112 | 128 | theorem IsLowerSet.mem_interior_of_forall_lt (hs : IsLowerSet s) (hx : x ∈ closure s)
(h : ∀ i, y i < x i) : y ∈ interior s := by |
cases nonempty_fintype ι
obtain ⟨ε, hε, hxy⟩ := Pi.exists_forall_pos_add_lt h
obtain ⟨z, hz, hxz⟩ := Metric.mem_closure_iff.1 hx _ hε
rw [dist_pi_lt_iff hε] at hxz
have hyz : ∀ i, y i < z i := by
refine fun i =>
(lt_sub_iff_add_lt.2 <| hxy _).trans_le (sub_le_comm.1 <| (le_abs_self _).trans ?_)
... | [
" y ∈ interior s",
" ∀ (i : ι), z i < y i",
" |z i - x i| ≤ ε",
" dist (x i) (z i) ≤ ε",
" ball y δ ⊆ s",
" w ∈ s",
" z i ≤ w i",
" ∀ (i : ι), y i < z i",
" |x i - z i| ≤ ε",
" w i ≤ z i"
] | [
" y ∈ interior s",
" ∀ (i : ι), z i < y i",
" |z i - x i| ≤ ε",
" dist (x i) (z i) ≤ ε",
" ball y δ ⊆ s",
" w ∈ s",
" z i ≤ w i"
] |
import Mathlib.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Log.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.Convex.Deriv
#align_import analysis.convex.specific_functions.deriv from "leanprover-communi... | Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean | 122 | 129 | theorem deriv_sqrt_mul_log (x : ℝ) :
deriv (fun x => √x * log x) x = (2 + log x) / (2 * √x) := by |
cases' lt_or_le 0 x with hx hx
· exact (hasDerivAt_sqrt_mul_log hx.ne').deriv
· rw [sqrt_eq_zero_of_nonpos hx, mul_zero, div_zero]
refine HasDerivWithinAt.deriv_eq_zero ?_ (uniqueDiffOn_Iic 0 x hx)
refine (hasDerivWithinAt_const x _ 0).congr_of_mem (fun x hx => ?_) hx
rw [sqrt_eq_zero_of_nonpos hx, z... | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... |
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Order.Hom.Set
#align_import data.set.intervals.order_iso from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105"
open Set
namespace OrderIso
section Preorder
variable {α β : Type*} [Preorder α] [Preorder β]
@[simp]
theorem preimage_I... | Mathlib/Order/Interval/Set/OrderIso.lean | 93 | 94 | theorem image_Ioc (e : α ≃o β) (a b : α) : e '' Ioc a b = Ioc (e a) (e b) := by |
rw [e.image_eq_preimage, e.symm.preimage_Ioc, e.symm_symm]
| [
" ⇑e ⁻¹' Iic b = Iic (e.symm b)",
" x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)",
" ⇑e ⁻¹' Ici b = Ici (e.symm b)",
" x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)",
" ⇑e ⁻¹' Iio b = Iio (e.symm b)",
" x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)",
" ⇑e ⁻¹' Ioi b = Ioi (e.symm b)",
" x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"... | [
" ⇑e ⁻¹' Iic b = Iic (e.symm b)",
" x ∈ ⇑e ⁻¹' Iic b ↔ x ∈ Iic (e.symm b)",
" ⇑e ⁻¹' Ici b = Ici (e.symm b)",
" x ∈ ⇑e ⁻¹' Ici b ↔ x ∈ Ici (e.symm b)",
" ⇑e ⁻¹' Iio b = Iio (e.symm b)",
" x ∈ ⇑e ⁻¹' Iio b ↔ x ∈ Iio (e.symm b)",
" ⇑e ⁻¹' Ioi b = Ioi (e.symm b)",
" x ∈ ⇑e ⁻¹' Ioi b ↔ x ∈ Ioi (e.symm b)"... |
import Mathlib.Data.Set.Pointwise.SMul
#align_import algebra.add_torsor from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P,
VSub G P where
[nonempty : Nonempty P]
vsub_vadd' : ∀ p₁ p₂ : P, (p₁ ... | Mathlib/Algebra/AddTorsor.lean | 159 | 160 | theorem vadd_vsub_eq_sub_vsub (g : G) (p q : P) : g +ᵥ p -ᵥ q = g - (q -ᵥ p) := by |
rw [vadd_vsub_assoc, sub_eq_add_neg, neg_vsub_eq_vsub_rev]
| [
" g₁ = g₂",
" g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂)",
" g +ᵥ p₁ -ᵥ p₂ +ᵥ p₂ = g + (p₁ -ᵥ p₂) +ᵥ p₂",
" p -ᵥ p = 0",
" p₁ = p₂",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) = p₁ -ᵥ p₃",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) +ᵥ p₃ = p₁ -ᵥ p₃ +ᵥ p₃",
" -(p₁ -ᵥ p₂) = p₂ -ᵥ p₁",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₁) +ᵥ p₁ = 0 +ᵥ p₁",
" g +ᵥ p -ᵥ q = g - (q... | [
" g₁ = g₂",
" g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂)",
" g +ᵥ p₁ -ᵥ p₂ +ᵥ p₂ = g + (p₁ -ᵥ p₂) +ᵥ p₂",
" p -ᵥ p = 0",
" p₁ = p₂",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) = p₁ -ᵥ p₃",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) +ᵥ p₃ = p₁ -ᵥ p₃ +ᵥ p₃",
" -(p₁ -ᵥ p₂) = p₂ -ᵥ p₁",
" p₁ -ᵥ p₂ + (p₂ -ᵥ p₁) +ᵥ p₁ = 0 +ᵥ p₁"
] |
import Mathlib.Data.List.OfFn
import Mathlib.Data.List.Range
#align_import data.list.fin_range from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
universe u
namespace List
variable {α : Type u}
@[simp]
theorem map_coe_finRange (n : ℕ) : ((finRange n) : List (Fin n)).map (Fin.val) = ... | Mathlib/Data/List/FinRange.lean | 37 | 40 | theorem finRange_succ (n : ℕ) :
finRange n.succ = (finRange n |>.map Fin.castSucc |>.concat (.last _)) := by |
apply map_injective_iff.mpr Fin.val_injective
simp [range_succ, Function.comp_def]
| [
" map Fin.val (finRange n) = range n",
" map (fun a => a) (range n) = range n",
" finRange n.succ = 0 :: map Fin.succ (finRange n)",
" map Fin.val (finRange n.succ) = map Fin.val (0 :: map Fin.succ (finRange n))",
" 0 :: map (Nat.succ ∘ Fin.val) (finRange n) = 0 :: map (Fin.val ∘ Fin.succ) (finRange n)",
... | [
" map Fin.val (finRange n) = range n",
" map (fun a => a) (range n) = range n",
" finRange n.succ = 0 :: map Fin.succ (finRange n)",
" map Fin.val (finRange n.succ) = map Fin.val (0 :: map Fin.succ (finRange n))",
" 0 :: map (Nat.succ ∘ Fin.val) (finRange n) = 0 :: map (Fin.val ∘ Fin.succ) (finRange n)"
] |
import Mathlib.Algebra.Polynomial.Reverse
import Mathlib.Algebra.Regular.SMul
#align_import data.polynomial.monic from "leanprover-community/mathlib"@"cbdf7b565832144d024caa5a550117c6df0204a5"
noncomputable section
open Finset
open Polynomial
namespace Polynomial
universe u v y
variable {R : Type u} {S : Typ... | Mathlib/Algebra/Polynomial/Monic.lean | 108 | 110 | theorem monic_X_pow_add_C {n : ℕ} (h : n ≠ 0) : (X ^ n + C a).Monic := by |
obtain ⟨k, rfl⟩ := Nat.exists_eq_succ_of_ne_zero h
exact monic_X_pow_add <| degree_C_le.trans Nat.WithBot.coe_nonneg
| [
" Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b",
" (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b",
" p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i",
"R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p",
" C (p.coeff p.natD... | [
" Subsingleton R → (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b",
" (∀ (f g : R[X]), f = g) ∧ ∀ (a b : R), a = b",
" p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i",
"R : Type u S : Type v a b : R m n : ℕ ι : Type y inst✝ : Semiring R p q r : R[X] hp : p.Monic | p",
" C (p.coeff p.natD... |
import Mathlib.Analysis.Calculus.TangentCone
import Mathlib.Analysis.NormedSpace.OperatorNorm.Asymptotics
#align_import analysis.calculus.fderiv.basic from "leanprover-community/mathlib"@"41bef4ae1254365bc190aee63b947674d2977f01"
open Filter Asymptotics ContinuousLinearMap Set Metric
open scoped Classical
open To... | Mathlib/Analysis/Calculus/FDeriv/Basic.lean | 305 | 313 | theorem hasFDerivAtFilter_iff_tendsto :
HasFDerivAtFilter f f' x L ↔
Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) L (𝓝 0) := by |
have h : ∀ x', ‖x' - x‖ = 0 → ‖f x' - f x - f' (x' - x)‖ = 0 := fun x' hx' => by
rw [sub_eq_zero.1 (norm_eq_zero.1 hx')]
simp
rw [hasFDerivAtFilter_iff_isLittleO, ← isLittleO_norm_left, ← isLittleO_norm_right,
isLittleO_iff_tendsto h]
exact tendsto_congr fun _ => div_eq_inv_mul _ _
| [
" fderivWithin 𝕜 f s x = 0",
" 𝓝[s \\ {x}] x = ⊥",
" 𝓝[s \\ {x}] x ≤ 𝓝[s] x",
" fderiv 𝕜 f x = 0",
" HasFDerivAtFilter f f' x L ↔ Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) L (𝓝 0)",
" ‖f x' - f x - f' (x' - x)‖ = 0",
" ‖f x - f x - f' (x - x)‖ = 0",
" Tendsto (fun x_1 => ‖f x_1... | [
" fderivWithin 𝕜 f s x = 0",
" 𝓝[s \\ {x}] x = ⊥",
" 𝓝[s \\ {x}] x ≤ 𝓝[s] x",
" fderiv 𝕜 f x = 0"
] |
import Mathlib.MeasureTheory.Group.Measure
import Mathlib.MeasureTheory.Integral.IntegrableOn
import Mathlib.MeasureTheory.Function.LocallyIntegrable
open Asymptotics MeasureTheory Set Filter
variable {α E F : Type*} [MeasurableSpace α] [NormedAddCommGroup E] [NormedAddCommGroup F]
{f : α → E} {g : α → F} {a b :... | Mathlib/MeasureTheory/Integral/Asymptotics.lean | 36 | 44 | theorem _root_.Asymptotics.IsBigO.integrableAtFilter [IsMeasurablyGenerated l]
(hf : f =O[l] g) (hfm : StronglyMeasurableAtFilter f l μ) (hg : IntegrableAtFilter g l μ) :
IntegrableAtFilter f l μ := by |
obtain ⟨C, hC⟩ := hf.bound
obtain ⟨s, hsl, hsm, hfg, hf, hg⟩ :=
(hC.smallSets.and <| hfm.eventually.and hg.eventually).exists_measurable_mem_of_smallSets
refine ⟨s, hsl, (hg.norm.const_mul C).mono hf ?_⟩
refine (ae_restrict_mem hsm).mono fun x hx ↦ ?_
exact (hfg x hx).trans (le_abs_self _)
| [
" IntegrableAtFilter f l μ",
" ∀ᵐ (a : α) ∂μ.restrict s, ‖f a‖ ≤ ‖C * ‖g a‖‖",
" ‖f x‖ ≤ ‖C * ‖g x‖‖"
] | [] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Monic
#align_import data.polynomial.integral_normalization from "leanprover-community/mathlib"@"6f401acf4faec3ab9ab13a42789c4f68064a61cd"
open Polynomial
namespace Polynomial
universe u... | Mathlib/RingTheory/Polynomial/IntegralNormalization.lean | 62 | 63 | theorem integralNormalization_coeff_degree {f : R[X]} {i : ℕ} (hi : f.degree = i) :
(integralNormalization f).coeff i = 1 := by | rw [integralNormalization_coeff, if_pos hi]
| [
" integralNormalization 0 = 0",
" f.integralNormalization.coeff i = if f.degree = ↑i then 1 else f.coeff i * f.leadingCoeff ^ (f.natDegree - 1 - i)",
" f.integralNormalization.support ⊆ f.support",
" a✝ ∈ f.integralNormalization.support → a✝ ∈ f.support",
" f.integralNormalization.coeff i = 1"
] | [
" integralNormalization 0 = 0",
" f.integralNormalization.coeff i = if f.degree = ↑i then 1 else f.coeff i * f.leadingCoeff ^ (f.natDegree - 1 - i)",
" f.integralNormalization.support ⊆ f.support",
" a✝ ∈ f.integralNormalization.support → a✝ ∈ f.support"
] |
import Mathlib.Analysis.Complex.Circle
import Mathlib.LinearAlgebra.Determinant
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
#align_import analysis.complex.isometry from "leanprover-community/mathlib"@"ae690b0c236e488a0043f6faa8ce3546e7f2f9c5"
noncomputable section
open Complex
open ComplexConjugate
... | Mathlib/Analysis/Complex/Isometry.lean | 90 | 93 | theorem LinearIsometry.re_apply_eq_re_of_add_conj_eq (f : ℂ →ₗᵢ[ℝ] ℂ)
(h₃ : ∀ z, z + conj z = f z + conj (f z)) (z : ℂ) : (f z).re = z.re := by |
simpa [ext_iff, add_re, add_im, conj_re, conj_im, ← two_mul,
show (2 : ℝ) ≠ 0 by simp [two_ne_zero]] using (h₃ z).symm
| [
" Complex.abs (↑a * x) = Complex.abs x",
" (rotation a).trans (rotation b) = rotation (b * a)",
" ((rotation a).trans (rotation b)) x✝ = (rotation (b * a)) x✝",
" rotation a ≠ conjLIE",
" False",
" e 1 / ↑(Complex.abs (e 1)) ∈ circle",
" ↑(rotationOf (rotation a)) = ↑a",
" (f z).re = z.re",
" 2 ≠ 0"... | [
" Complex.abs (↑a * x) = Complex.abs x",
" (rotation a).trans (rotation b) = rotation (b * a)",
" ((rotation a).trans (rotation b)) x✝ = (rotation (b * a)) x✝",
" rotation a ≠ conjLIE",
" False",
" e 1 / ↑(Complex.abs (e 1)) ∈ circle",
" ↑(rotationOf (rotation a)) = ↑a"
] |
import Mathlib.Topology.Instances.ENNReal
#align_import order.filter.ennreal from "leanprover-community/mathlib"@"52932b3a083d4142e78a15dc928084a22fea9ba0"
open Filter ENNReal
namespace ENNReal
variable {α : Type*} {f : Filter α}
theorem eventually_le_limsup [CountableInterFilter f] (u : α → ℝ≥0∞) :
∀ᶠ y i... | Mathlib/Order/Filter/ENNReal.lean | 50 | 68 | theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
f.limsup (a * u ·) = a * f.limsup u := by |
by_cases ha_top : a ≠ ⊤
· exact limsup_const_mul_of_ne_top ha_top
push_neg at ha_top
by_cases hu : u =ᶠ[f] 0
· have hau : (a * u ·) =ᶠ[f] 0 := hu.mono fun x hx => by simp [hx]
simp only [limsup_congr hu, limsup_congr hau, Pi.zero_apply, ← ENNReal.bot_eq_zero,
limsup_const_bot]
simp
· have hu_... | [
" limsup (fun x => a * u x) f = a * limsup u f",
" limsup (fun x => ⊥) f = ⊥",
" (fun x => a⁻¹ * x) (g x) = x",
" g ((fun x => a⁻¹ * x) x) = x",
" g x✝² ≤ g x✝¹",
" (fun x => a * u x) x = 0 x",
" ⊥ = a * ⊥",
" ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤",
" ⊤ ≤ if u x = 0 then 0 else ⊤"
] | [
" limsup (fun x => a * u x) f = a * limsup u f",
" limsup (fun x => ⊥) f = ⊥",
" (fun x => a⁻¹ * x) (g x) = x",
" g ((fun x => a⁻¹ * x) x) = x",
" g x✝² ≤ g x✝¹"
] |
import Mathlib.Analysis.Convex.Gauge
import Mathlib.Analysis.Convex.Normed
open Metric Bornology Filter Set
open scoped NNReal Topology Pointwise
noncomputable section
section Module
variable {E : Type*} [AddCommGroup E] [Module ℝ E]
def gaugeRescale (s t : Set E) (x : E) : E := (gauge s x / gauge t x) • x
the... | Mathlib/Analysis/Convex/GaugeRescale.lean | 41 | 44 | theorem gaugeRescale_smul (s t : Set E) {c : ℝ} (hc : 0 ≤ c) (x : E) :
gaugeRescale s t (c • x) = c • gaugeRescale s t x := by |
simp only [gaugeRescale, gauge_smul_of_nonneg hc, smul_smul, smul_eq_mul]
rw [mul_div_mul_comm, mul_right_comm, div_self_mul_self]
| [
" gaugeRescale s t (c • x) = c • gaugeRescale s t x",
" (c * gauge s x / (c * gauge t x) * c) • x = (c * (gauge s x / gauge t x)) • x"
] | [] |
import Mathlib.Data.Matrix.Block
import Mathlib.Data.Matrix.Notation
import Mathlib.Data.Matrix.RowCol
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.GroupTheory.Perm.Fin
import Mathlib.LinearAlgebra.Alternating.Basic
#align_import linear_algebra.matrix.determinant from "leanprover-community/mathlib"@"c30... | Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean | 73 | 82 | theorem det_diagonal {d : n → R} : det (diagonal d) = ∏ i, d i := by |
rw [det_apply']
refine (Finset.sum_eq_single 1 ?_ ?_).trans ?_
· rintro σ - h2
cases' not_forall.1 (mt Equiv.ext h2) with x h3
convert mul_zero (ε σ)
apply Finset.prod_eq_zero (mem_univ x)
exact if_neg h3
· simp
· simp
| [
" M.det = ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, M (σ i) i",
" (diagonal d).det = ∏ i : n, d i",
" ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = ∏ i : n, d i",
" ∀ b ∈ univ, b ≠ 1 → ↑↑(sign b) * ∏ i : n, diagonal d (b i) i = 0",
" ↑↑(sign σ) * ∏ i : n, diagonal d (σ i) i = 0",
" ∏ i : n, diagonal ... | [
" M.det = ∑ σ : Perm n, ↑↑(sign σ) * ∏ i : n, M (σ i) i"
] |
import Mathlib.Algebra.Group.Commute.Basic
import Mathlib.Data.Fintype.Card
import Mathlib.GroupTheory.Perm.Basic
#align_import group_theory.perm.support from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
open Equiv Finset
namespace Equiv.Perm
variable {α : Type*}
section Disjoint
... | Mathlib/GroupTheory/Perm/Support.lean | 144 | 152 | theorem nodup_of_pairwise_disjoint {l : List (Perm α)} (h1 : (1 : Perm α) ∉ l)
(h2 : l.Pairwise Disjoint) : l.Nodup := by |
refine List.Pairwise.imp_of_mem ?_ h2
intro τ σ h_mem _ h_disjoint _
subst τ
suffices (σ : Perm α) = 1 by
rw [this] at h_mem
exact h1 h_mem
exact ext fun a => or_self_iff.mp (h_disjoint a)
| [
" f.Disjoint g → g.Disjoint f",
" (f * g) x = (g * f) x",
" f.Disjoint f ↔ f = 1",
" f = 1",
" f x = 1 x",
" f⁻¹.Disjoint g",
" f⁻¹ x = x ∨ g x = x",
" f x = x ∨ g x = x",
" f⁻¹.Disjoint g ↔ f.Disjoint g",
" f.Disjoint g",
" f.Disjoint g⁻¹ ↔ f.Disjoint g",
" (f * g) x = x ∨ h x = x",
" f.Dis... | [
" f.Disjoint g → g.Disjoint f",
" (f * g) x = (g * f) x",
" f.Disjoint f ↔ f = 1",
" f = 1",
" f x = 1 x",
" f⁻¹.Disjoint g",
" f⁻¹ x = x ∨ g x = x",
" f x = x ∨ g x = x",
" f⁻¹.Disjoint g ↔ f.Disjoint g",
" f.Disjoint g",
" f.Disjoint g⁻¹ ↔ f.Disjoint g",
" (f * g) x = x ∨ h x = x",
" f.Dis... |
import Mathlib.Order.MinMax
import Mathlib.Data.Set.Subsingleton
import Mathlib.Tactic.Says
#align_import data.set.intervals.basic from "leanprover-community/mathlib"@"3ba15165bd6927679be7c22d6091a87337e3cd0c"
open Function
open OrderDual (toDual ofDual)
variable {α β : Type*}
namespace Set
section Preorder
v... | Mathlib/Order/Interval/Set/Basic.lean | 196 | 196 | theorem left_mem_Ioc : a ∈ Ioc a b ↔ False := by | simp [lt_irrefl]
| [
" Decidable (x ∈ Ioo a b)",
" Decidable (x ∈ Ico a b)",
" Decidable (x ∈ Iio b)",
" Decidable (x ∈ Icc a b)",
" Decidable (x ∈ Iic b)",
" Decidable (x ∈ Ioc a b)",
" Decidable (x ∈ Ici a)",
" Decidable (x ∈ Ioi a)",
" a ∈ Ioo a b ↔ False",
" a ∈ Ico a b ↔ a < b",
" a ∈ Icc a b ↔ a ≤ b",
" a ∈ ... | [
" Decidable (x ∈ Ioo a b)",
" Decidable (x ∈ Ico a b)",
" Decidable (x ∈ Iio b)",
" Decidable (x ∈ Icc a b)",
" Decidable (x ∈ Iic b)",
" Decidable (x ∈ Ioc a b)",
" Decidable (x ∈ Ici a)",
" Decidable (x ∈ Ioi a)",
" a ∈ Ioo a b ↔ False",
" a ∈ Ico a b ↔ a < b",
" a ∈ Icc a b ↔ a ≤ b"
] |
import Mathlib.Topology.ContinuousOn
#align_import topology.algebra.order.left_right from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4"
open Set Filter Topology
section TopologicalSpace
variable {α β : Type*} [TopologicalSpace α] [LinearOrder α] [TopologicalSpace β]
theorem nhds_lef... | Mathlib/Topology/Order/LeftRight.lean | 123 | 124 | theorem nhds_left'_sup_nhds_right' (a : α) : 𝓝[<] a ⊔ 𝓝[>] a = 𝓝[≠] a := by |
rw [← nhdsWithin_union, Iio_union_Ioi]
| [
" 𝓝[≤] a ⊔ 𝓝[≥] a = 𝓝 a",
" 𝓝[<] a ⊔ 𝓝[≥] a = 𝓝 a",
" 𝓝[≤] a ⊔ 𝓝[>] a = 𝓝 a",
" 𝓝[<] a ⊔ 𝓝[>] a = 𝓝[≠] a"
] | [
" 𝓝[≤] a ⊔ 𝓝[≥] a = 𝓝 a",
" 𝓝[<] a ⊔ 𝓝[≥] a = 𝓝 a",
" 𝓝[≤] a ⊔ 𝓝[>] a = 𝓝 a"
] |
import Mathlib.Data.Set.Image
import Mathlib.Data.SProd
#align_import data.set.prod from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc9524185ae994553ebf4"
open Function
namespace Set
section Prod
variable {α β γ δ : Type*} {s s₁ s₂ : Set α} {t t₁ t₂ : Set β} {a : α} {b : β}
theorem Subsingleton.pro... | Mathlib/Data/Set/Prod.lean | 111 | 113 | theorem singleton_prod : ({a} : Set α) ×ˢ t = Prod.mk a '' t := by |
ext ⟨x, y⟩
simp [and_left_comm, eq_comm]
| [
" (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)",
" s ×ˢ ∅ = ∅",
" x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅",
" ∅ ×ˢ t = ∅",
" x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅",
" univ ×ˢ univ = univ",
" x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ",
" univ ×ˢ t = Prod.snd ⁻¹' t",
" s ×ˢ univ = Prod.fst ⁻¹' s",
" s ×ˢ t = univ ↔ s = univ ∧ t = univ",
" {... | [
" (∃ x ∈ s ×ˢ t, p x) ↔ ∃ x ∈ s, ∃ y ∈ t, p (x, y)",
" s ×ˢ ∅ = ∅",
" x✝ ∈ s ×ˢ ∅ ↔ x✝ ∈ ∅",
" ∅ ×ˢ t = ∅",
" x✝ ∈ ∅ ×ˢ t ↔ x✝ ∈ ∅",
" univ ×ˢ univ = univ",
" x✝ ∈ univ ×ˢ univ ↔ x✝ ∈ univ",
" univ ×ˢ t = Prod.snd ⁻¹' t",
" s ×ˢ univ = Prod.fst ⁻¹' s",
" s ×ˢ t = univ ↔ s = univ ∧ t = univ"
] |
import Mathlib.Algebra.MonoidAlgebra.Basic
#align_import algebra.monoid_algebra.division from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951"
variable {k G : Type*} [Semiring k]
namespace AddMonoidAlgebra
section
variable [AddCancelCommMonoid G]
noncomputable def divOf (x : k[G]) (g... | Mathlib/Algebra/MonoidAlgebra/Division.lean | 120 | 121 | theorem of'_divOf (a : G) : of' k G a /ᵒᶠ a = 1 := by |
simpa only [one_mul] using mul_of'_divOf (1 : k[G]) a
| [
" x /ᵒᶠ 0 = x",
" (x /ᵒᶠ 0) x✝ = x x✝",
" x /ᵒᶠ (a + b) = x /ᵒᶠ a /ᵒᶠ b",
" (x /ᵒᶠ (a + b)) x✝ = (x /ᵒᶠ a /ᵒᶠ b) x✝",
" of' k G a * x /ᵒᶠ a = x",
" (of' k G a * x /ᵒᶠ a) x✝ = x x✝",
" ∀ (a_1 : G), a + a_1 = a + x✝ ↔ a_1 = x✝",
" a + c = a + x✝ ↔ c = x✝",
" x * of' k G a /ᵒᶠ a = x",
" (x * of' k G ... | [
" x /ᵒᶠ 0 = x",
" (x /ᵒᶠ 0) x✝ = x x✝",
" x /ᵒᶠ (a + b) = x /ᵒᶠ a /ᵒᶠ b",
" (x /ᵒᶠ (a + b)) x✝ = (x /ᵒᶠ a /ᵒᶠ b) x✝",
" of' k G a * x /ᵒᶠ a = x",
" (of' k G a * x /ᵒᶠ a) x✝ = x x✝",
" ∀ (a_1 : G), a + a_1 = a + x✝ ↔ a_1 = x✝",
" a + c = a + x✝ ↔ c = x✝",
" x * of' k G a /ᵒᶠ a = x",
" (x * of' k G ... |
import Mathlib.LinearAlgebra.Matrix.Reindex
import Mathlib.LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.basis from "leanprover-community/mathlib"@"6c263e4bfc2e6714de30f22178b4d0ca4d149a76"
noncomputable section
open LinearMap Matrix Set Submodule
open Matrix
section BasisToMatrix
variable {ι... | Mathlib/LinearAlgebra/Matrix/Basis.lean | 73 | 76 | theorem coePiBasisFun.toMatrix_eq_transpose [Finite ι] :
((Pi.basisFun R ι).toMatrix : Matrix ι ι R → Matrix ι ι R) = Matrix.transpose := by |
ext M i j
rfl
| [
" e.toMatrix v = (LinearMap.toMatrix e e) ((e.constr ℕ) v)",
" e.toMatrix v i✝ j✝ = (LinearMap.toMatrix e e) ((e.constr ℕ) v) i✝ j✝",
" (Pi.basisFun R ι).toMatrix = transpose",
" (Pi.basisFun R ι).toMatrix M i j = Mᵀ i j"
] | [
" e.toMatrix v = (LinearMap.toMatrix e e) ((e.constr ℕ) v)",
" e.toMatrix v i✝ j✝ = (LinearMap.toMatrix e e) ((e.constr ℕ) v) i✝ j✝"
] |
import Mathlib.Algebra.Lie.Nilpotent
import Mathlib.Algebra.Lie.Normalizer
#align_import algebra.lie.engel from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90"
universe u₁ u₂ u₃ u₄
variable {R : Type u₁} {L : Type u₂} {L₂ : Type u₃} {M : Type u₄}
variable [CommRing R] [LieRing L] [LieAl... | Mathlib/Algebra/Lie/Engel.lean | 82 | 86 | theorem exists_smul_add_of_span_sup_eq_top (y : L) : ∃ t : R, ∃ z ∈ I, y = t • x + z := by |
have hy : y ∈ (⊤ : Submodule R L) := Submodule.mem_top
simp only [← hxI, Submodule.mem_sup, Submodule.mem_span_singleton] at hy
obtain ⟨-, ⟨t, rfl⟩, z, hz, rfl⟩ := hy
exact ⟨t, z, hz, rfl⟩
| [
" ∃ t, ∃ z ∈ I, y = t • x + z",
" ∃ t_1, ∃ z_1 ∈ I, t • x + z = t_1 • x + z_1"
] | [] |
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.MeasureTheory.Covering.OneDim
import Mathlib.Order.Monotone.Extension
#align_import analysis.calculus.monotone from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
open Set Filter Function Metric MeasureTheory MeasureTheory.Meas... | Mathlib/Analysis/Calculus/Monotone.lean | 44 | 62 | theorem tendsto_apply_add_mul_sq_div_sub {f : ℝ → ℝ} {x a c d : ℝ} {l : Filter ℝ} (hl : l ≤ 𝓝[≠] x)
(hf : Tendsto (fun y => (f y - d) / (y - x)) l (𝓝 a))
(h' : Tendsto (fun y => y + c * (y - x) ^ 2) l l) :
Tendsto (fun y => (f (y + c * (y - x) ^ 2) - d) / (y - x)) l (𝓝 a) := by |
have L : Tendsto (fun y => (y + c * (y - x) ^ 2 - x) / (y - x)) l (𝓝 1) := by
have : Tendsto (fun y => 1 + c * (y - x)) l (𝓝 (1 + c * (x - x))) := by
apply Tendsto.mono_left _ (hl.trans nhdsWithin_le_nhds)
exact ((tendsto_id.sub_const x).const_mul c).const_add 1
simp only [_root_.sub_self, add_... | [
" Tendsto (fun y => (f (y + c * (y - x) ^ 2) - d) / (y - x)) l (𝓝 a)",
" Tendsto (fun y => (y + c * (y - x) ^ 2 - x) / (y - x)) l (𝓝 1)",
" Tendsto (fun y => 1 + c * (y - x)) l (𝓝 (1 + c * (x - x)))",
" Tendsto (fun y => 1 + c * (y - x)) (𝓝 x) (𝓝 (1 + c * (x - x)))",
" ∀ᶠ (x_1 : ℝ) in 𝓝[≠] x, 1 + c * ... | [] |
import Mathlib.Data.Multiset.Bind
#align_import data.multiset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9"
namespace Multiset
section Pi
variable {α : Type*}
open Function
def Pi.empty (δ : α → Sort*) : ∀ a ∈ (0 : Multiset α), δ a :=
nofun
#align multiset.pi.empty Multi... | Mathlib/Data/Multiset/Pi.lean | 62 | 68 | theorem pi.cons_eta {m : Multiset α} {a : α} (f : ∀ a' ∈ a ::ₘ m, δ a') :
(Pi.cons m a (f _ (mem_cons_self _ _)) fun a' ha' => f a' (mem_cons_of_mem ha')) = f := by |
ext a' h'
by_cases h : a' = a
· subst h
rw [Pi.cons_same]
· rw [Pi.cons_ne _ h]
| [
" HEq (cons (a' ::ₘ m) a b (cons m a' b' f)) (cons (a ::ₘ m) a' b' (cons m a b f))",
" ∀ (a_1 a'_1 : α),\n HEq a_1 a'_1 → HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a_1) (cons (a ::ₘ m) a' b' (cons m a b f) a'_1)",
" ∀ (a_1 a'_1 : α),\n a_1 = a'_1 → HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a_1) (cons (a :... | [
" HEq (cons (a' ::ₘ m) a b (cons m a' b' f)) (cons (a ::ₘ m) a' b' (cons m a b f))",
" ∀ (a_1 a'_1 : α),\n HEq a_1 a'_1 → HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a_1) (cons (a ::ₘ m) a' b' (cons m a b f) a'_1)",
" ∀ (a_1 a'_1 : α),\n a_1 = a'_1 → HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a_1) (cons (a :... |
import Mathlib.Algebra.Module.Submodule.Localization
import Mathlib.LinearAlgebra.Dimension.DivisionRing
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.OreLocalization.OreSet
open Cardinal nonZeroDivisors
section CommRing
universe u u' v v'
variable {R : Type u} (S : Type u') {M : T... | Mathlib/LinearAlgebra/Dimension/Localization.lean | 96 | 102 | theorem rank_quotient_add_rank_of_isDomain [IsDomain R] (M' : Submodule R M) :
Module.rank R (M ⧸ M') + Module.rank R M' = Module.rank R M := by |
apply lift_injective.{max u v}
rw [lift_add, ← IsLocalizedModule.lift_rank_eq (FractionRing R) R⁰ (M'.toLocalized R⁰) le_rfl,
← IsLocalizedModule.lift_rank_eq (FractionRing R) R⁰ (LocalizedModule.mkLinearMap R⁰ M) le_rfl,
← IsLocalizedModule.lift_rank_eq (FractionRing R) R⁰ (M'.toLocalizedQuotient R⁰) le_r... | [
" ∃ w, LinearIndependent R w",
" LinearIndependent R fun i => (sec (v i)).1",
" ∀ (s : Finset ι) (g : ι → R), ∑ i ∈ s, g i • (sec (v i)).1 = 0 → ∀ i ∈ s, g i = 0",
" g i = 0",
" g i * ↑(sec (v i)).2 = 0",
" (algebraMap R S) (g i * ↑(sec (v i)).2) = (algebraMap R S) 0",
" (algebraMap R S) (g i * ↑(sec (v... | [
" ∃ w, LinearIndependent R w",
" LinearIndependent R fun i => (sec (v i)).1",
" ∀ (s : Finset ι) (g : ι → R), ∑ i ∈ s, g i • (sec (v i)).1 = 0 → ∀ i ∈ s, g i = 0",
" g i = 0",
" g i * ↑(sec (v i)).2 = 0",
" (algebraMap R S) (g i * ↑(sec (v i)).2) = (algebraMap R S) 0",
" (algebraMap R S) (g i * ↑(sec (v... |
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Tactic.Ring
#align_import data.nat.hyperoperation from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
def hyperoperation : ℕ → ℕ → ℕ → ℕ
| 0, _, k => k + 1
| 1, m, 0 => m
| 2, _, 0 => 0
| _ + 3, _, 0 => 1
| n + 1, m, k + 1 ... | Mathlib/Data/Nat/Hyperoperation.lean | 53 | 55 | theorem hyperoperation_recursion (n m k : ℕ) :
hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k) := by |
rw [hyperoperation]
| [
" hyperoperation 0 m k = k.succ",
" hyperoperation (n + 3) m 0 = 1",
" hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)"
] | [
" hyperoperation 0 m k = k.succ",
" hyperoperation (n + 3) m 0 = 1"
] |
import Mathlib.Algebra.Group.Basic
import Mathlib.Algebra.Group.Nat
import Mathlib.Data.Set.Basic
import Mathlib.Tactic.Common
#align_import data.set.enumerate from "leanprover-community/mathlib"@"92ca63f0fb391a9ca5f22d2409a6080e786d99f7"
noncomputable section
open Function
namespace Set
section Enumerate
va... | Mathlib/Data/Set/Enumerate.lean | 75 | 101 | theorem enumerate_inj {n₁ n₂ : ℕ} {a : α} {s : Set α} (h_sel : ∀ s a, sel s = some a → a ∈ s)
(h₁ : enumerate sel s n₁ = some a) (h₂ : enumerate sel s n₂ = some a) : n₁ = n₂ := by |
/- Porting note: The `rcase, on_goal, all_goals` has been used instead of
the not-yet-ported `wlog` -/
rcases le_total n₁ n₂ with (hn|hn)
on_goal 2 => swap_var n₁ ↔ n₂, h₁ ↔ h₂
all_goals
rcases Nat.le.dest hn with ⟨m, rfl⟩
clear hn
induction n₁ generalizing s with
| zero =>
cases m w... | [
" enumerate sel s 0 = none",
" enumerate sel s (n + 1) = none",
" enumerate sel s m = none",
" enumerate sel s (m' + 1) = none",
" enumerate sel (s \\ {val✝}) m' = none",
" enumerate sel s (n + 1) = some a → a ∈ s",
" (do\n let a ← some a'\n enumerate sel (s \\ {a}) n) =\n some a →\n ... | [
" enumerate sel s 0 = none",
" enumerate sel s (n + 1) = none",
" enumerate sel s m = none",
" enumerate sel s (m' + 1) = none",
" enumerate sel (s \\ {val✝}) m' = none",
" enumerate sel s (n + 1) = some a → a ∈ s",
" (do\n let a ← some a'\n enumerate sel (s \\ {a}) n) =\n some a →\n ... |
import Mathlib.Order.PartialSups
#align_import order.disjointed from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce47ef47c"
variable {α β : Type*}
section GeneralizedBooleanAlgebra
variable [GeneralizedBooleanAlgebra α]
def disjointed (f : ℕ → α) : ℕ → α
| 0 => f 0
| n + 1 => f (n + 1) ... | Mathlib/Order/Disjointed.lean | 63 | 67 | theorem disjointed_le_id : disjointed ≤ (id : (ℕ → α) → ℕ → α) := by |
rintro f n
cases n
· rfl
· exact sdiff_le
| [
" disjointed ≤ id",
" disjointed f n ≤ id f n",
" disjointed f 0 ≤ id f 0",
" disjointed f (n✝ + 1) ≤ id f (n✝ + 1)"
] | [] |
import Mathlib.Data.Real.Irrational
import Mathlib.Data.Nat.Fib.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Algebra.LinearRecurrence
import Mathlib.Tactic.NormNum.NatFib
import Mathlib.Tactic.NormNum.Prime
#align_import data.real.golden_ratio from "leanprover-community/mathlib"@"2196ab363eb097c008d449712... | Mathlib/Data/Real/GoldenRatio.lean | 117 | 119 | theorem gold_lt_two : φ < 2 := by | calc
(1 + sqrt 5) / 2 < (1 + 3) / 2 := by gcongr; rw [sqrt_lt'] <;> norm_num
_ = 2 := by norm_num
| [
" φ⁻¹ = -ψ",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1",
" ψ⁻¹ = -φ",
" -ψ = φ⁻¹",
" φ * ψ = -1",
" (1 + √5) * (1 - √5) = -(2 * 2)",
" 1 ^ 2 - √5 ^ 2 = -(2 * 2)",
" ψ * φ = -1",
" φ + ψ = 1",
" (1 + √5) / 2 + (1 - √5) / 2 = 1",
" 1 - φ = ψ",
" 1 - ψ = φ",
" φ - ψ = √5",
" φ ^ (n + 2) - φ ^ (... | [
" φ⁻¹ = -ψ",
" 0 < 1",
" 0 < 5",
" 2 * 2 = 5 - 1",
" ψ⁻¹ = -φ",
" -ψ = φ⁻¹",
" φ * ψ = -1",
" (1 + √5) * (1 - √5) = -(2 * 2)",
" 1 ^ 2 - √5 ^ 2 = -(2 * 2)",
" ψ * φ = -1",
" φ + ψ = 1",
" (1 + √5) / 2 + (1 - √5) / 2 = 1",
" 1 - φ = ψ",
" 1 - ψ = φ",
" φ - ψ = √5",
" φ ^ (n + 2) - φ ^ (... |
import Mathlib.Order.Filter.Bases
#align_import order.filter.pi from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451"
open Set Function
open scoped Classical
open Filter
namespace Filter
variable {ι : Type*} {α : ι → Type*} {f f₁ f₂ : (i : ι) → Filter (α i)} {s : (i : ι) → Set (α i)}
... | Mathlib/Order/Filter/Pi.lean | 238 | 240 | theorem coprodᵢ_neBot_iff' :
NeBot (Filter.coprodᵢ f) ↔ (∀ i, Nonempty (α i)) ∧ ∃ d, NeBot (f d) := by |
simp only [Filter.coprodᵢ, iSup_neBot, ← exists_and_left, ← comap_eval_neBot_iff']
| [
" s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁ ∈ f i, eval i ⁻¹' t₁ ⊆ s",
" sᶜ ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), (eval i '' s)ᶜ ∈ f i",
" (Filter.coprodᵢ f).NeBot ↔ (∀ (i : ι), Nonempty (α i)) ∧ ∃ d, (f d).NeBot"
] | [
" s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁ ∈ f i, eval i ⁻¹' t₁ ⊆ s",
" sᶜ ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), (eval i '' s)ᶜ ∈ f i"
] |
import Mathlib.Algebra.Order.Group.Basic
import Mathlib.Algebra.Order.Ring.Basic
import Mathlib.Algebra.Star.Unitary
import Mathlib.Data.Nat.ModEq
import Mathlib.NumberTheory.Zsqrtd.Basic
import Mathlib.Tactic.Monotonicity
#align_import number_theory.pell_matiyasevic from "leanprover-community/mathlib"@"795b501869b9f... | Mathlib/NumberTheory/PellMatiyasevic.lean | 155 | 155 | theorem yn_one : yn a1 1 = 1 := by | simp
| [
" IsPell { re := x, im := y } ↔ { re := x, im := y } * star { re := x, im := y } = 1",
" x * x - y * (d * y) = 1 ↔ x * x + -(y * (d * y)) = 1",
" IsPell { re := x, im := y } ↔ { re := x, im := y } ∈ unitary (ℤ√d)",
" b * c * star (b * c) = 1",
" IsPell { re := x, im := y } ↔ IsPell (star { re := x, im := y ... | [
" IsPell { re := x, im := y } ↔ { re := x, im := y } * star { re := x, im := y } = 1",
" x * x - y * (d * y) = 1 ↔ x * x + -(y * (d * y)) = 1",
" IsPell { re := x, im := y } ↔ { re := x, im := y } ∈ unitary (ℤ√d)",
" b * c * star (b * c) = 1",
" IsPell { re := x, im := y } ↔ IsPell (star { re := x, im := y ... |
import Mathlib.Analysis.Calculus.BumpFunction.Basic
import Mathlib.MeasureTheory.Integral.SetIntegral
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open F... | Mathlib/Analysis/Calculus/BumpFunction/Normed.lean | 80 | 82 | theorem support_normed_eq : Function.support (f.normed μ) = Metric.ball c f.rOut := by |
unfold ContDiffBump.normed
rw [support_div, f.support_eq, support_const f.integral_pos.ne', inter_univ]
| [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1",
" support (f.normed μ) = ball c f.rOut",
" (sup... | [
" f.normed μ (c - x) = f.normed μ (c + x)",
" f.normed μ (-x) = f.normed μ x",
" 0 < ∫ (x : E), ↑f x ∂μ",
" 0 < μ (support fun i => ↑f i)",
" 0 < μ (ball c f.rOut)",
" ∫ (x : E), f.normed μ x ∂μ = 1",
" (∫ (x : E), ↑f x ∂μ)⁻¹ • ∫ (x : E), ↑f x ∂μ = 1"
] |
import Batteries.Data.List.Lemmas
namespace List
universe u v
variable {α : Type u} {β : Type v}
@[simp] theorem eraseIdx_zero (l : List α) : eraseIdx l 0 = tail l := by cases l <;> rfl
theorem eraseIdx_eq_take_drop_succ :
∀ (l : List α) (i : Nat), l.eraseIdx i = l.take i ++ l.drop (i + 1)
| nil, _ => by s... | .lake/packages/batteries/Batteries/Data/List/EraseIdx.lean | 49 | 55 | theorem eraseIdx_append_of_length_le {l : List α} {k : Nat} (hk : length l ≤ k) (l' : List α) :
eraseIdx (l ++ l') k = l ++ eraseIdx l' (k - length l) := by |
rw [eraseIdx_eq_take_drop_succ, eraseIdx_eq_take_drop_succ,
take_append_eq_append_take, drop_append_eq_append_drop,
take_all_of_le hk, drop_eq_nil_of_le (by omega), nil_append, append_assoc]
congr
omega
| [
" l.eraseIdx 0 = l.tail",
" [].eraseIdx 0 = [].tail",
" (head✝ :: tail✝).eraseIdx 0 = (head✝ :: tail✝).tail",
" [].eraseIdx x✝ = take x✝ [] ++ drop (x✝ + 1) []",
" (a :: l).eraseIdx 0 = take 0 (a :: l) ++ drop (0 + 1) (a :: l)",
" (a :: l).eraseIdx (i + 1) = take (i + 1) (a :: l) ++ drop (i + 1 + 1) (a ::... | [
" l.eraseIdx 0 = l.tail",
" [].eraseIdx 0 = [].tail",
" (head✝ :: tail✝).eraseIdx 0 = (head✝ :: tail✝).tail",
" [].eraseIdx x✝ = take x✝ [] ++ drop (x✝ + 1) []",
" (a :: l).eraseIdx 0 = take 0 (a :: l) ++ drop (0 + 1) (a :: l)",
" (a :: l).eraseIdx (i + 1) = take (i + 1) (a :: l) ++ drop (i + 1 + 1) (a ::... |
import Mathlib.Data.Finset.Image
import Mathlib.Data.List.FinRange
#align_import data.fintype.basic from "leanprover-community/mathlib"@"d78597269638367c3863d40d45108f52207e03cf"
assert_not_exists MonoidWithZero
assert_not_exists MulAction
open Function
open Nat
universe u v
variable {α β γ : Type*}
class Fi... | Mathlib/Data/Fintype/Basic.lean | 96 | 96 | theorem coe_eq_univ : (s : Set α) = Set.univ ↔ s = univ := by | rw [← coe_univ, coe_inj]
| [
" s = univ ↔ ∀ (x : α), x ∈ s",
" ↑univ = Set.univ",
" x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ",
" ↑s = Set.univ ↔ s = univ"
] | [
" s = univ ↔ ∀ (x : α), x ∈ s",
" ↑univ = Set.univ",
" x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ"
] |
import Mathlib.Algebra.Order.Group.PiLex
import Mathlib.Data.DFinsupp.Order
import Mathlib.Data.DFinsupp.NeLocus
import Mathlib.Order.WellFoundedSet
#align_import data.dfinsupp.lex from "leanprover-community/mathlib"@"dde670c9a3f503647fd5bfdf1037bad526d3397a"
variable {ι : Type*} {α : ι → Type*}
namespace DFinsu... | Mathlib/Data/DFinsupp/Lex.lean | 133 | 139 | theorem toLex_monotone : Monotone (@toLex (Π₀ i, α i)) := by |
intro a b h
refine le_of_lt_or_eq (or_iff_not_imp_right.2 fun hne ↦ ?_)
classical
exact ⟨Finset.min' _ (nonempty_neLocus_iff.2 hne),
fun j hj ↦ not_mem_neLocus.1 fun h ↦ (Finset.min'_le _ _ h).not_lt hj,
(h _).lt_of_ne (mem_neLocus.1 <| Finset.min'_mem _ _)⟩
| [
" ∃ i, (∀ (j : ι), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i",
" y k ≤ x k",
" Pi.Lex r (fun {i} x x_1 => x < x_1) ⇑x ⇑y",
" Monotone ⇑toLex",
" toLex a ≤ toLex b",
" toLex a < toLex b"
] | [
" ∃ i, (∀ (j : ι), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i",
" y k ≤ x k",
" Pi.Lex r (fun {i} x x_1 => x < x_1) ⇑x ⇑y"
] |
import Mathlib.Data.List.Chain
#align_import data.list.destutter from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213"
variable {α : Type*} (l : List α) (R : α → α → Prop) [DecidableRel R] {a b : α}
namespace List
@[simp]
theorem destutter'_nil : destutter' R a [] = [a] :=
rfl
#align ... | Mathlib/Data/List/Destutter.lean | 53 | 54 | theorem destutter'_cons_neg (h : ¬R b a) : (a :: l).destutter' R b = l.destutter' R b := by |
rw [destutter', if_neg h]
| [
" destutter' R b (a :: l) = b :: destutter' R a l",
" destutter' R b (a :: l) = destutter' R b l"
] | [
" destutter' R b (a :: l) = b :: destutter' R a l"
] |
import Mathlib.Data.Nat.Cast.WithTop
import Mathlib.RingTheory.Prime
import Mathlib.RingTheory.Polynomial.Content
import Mathlib.RingTheory.Ideal.Quotient
#align_import ring_theory.eisenstein_criterion from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff"
open Polynomial Ideal.Quotient
v... | Mathlib/RingTheory/EisensteinCriterion.lean | 65 | 68 | theorem eval_zero_mem_ideal_of_eq_mul_X_pow {n : ℕ} {P : Ideal R} {q : R[X]}
{c : Polynomial (R ⧸ P)} (hq : map (mk P) q = c * X ^ n) (hn0 : n ≠ 0) : eval 0 q ∈ P := by |
rw [← coeff_zero_eq_eval_zero, ← eq_zero_iff_mem, ← coeff_map, hq,
coeff_zero_eq_eval_zero, eval_mul, eval_pow, eval_X, zero_pow hn0, mul_zero]
| [
" (map (mk P) f).coeff n = (C ((mk P) f.leadingCoeff) * X ^ f.natDegree).coeff n",
" ¬n = f.natDegree",
" False",
" (C ((mk P) f.leadingCoeff) * X ^ f.natDegree).degree < ↑n",
" ↑f.natDegree < ↑n",
" (map (mk P) f).degree < ↑n",
" ↑n = (map (mk P) q).degree",
" eval 0 q ∈ P"
] | [
" (map (mk P) f).coeff n = (C ((mk P) f.leadingCoeff) * X ^ f.natDegree).coeff n",
" ¬n = f.natDegree",
" False",
" (C ((mk P) f.leadingCoeff) * X ^ f.natDegree).degree < ↑n",
" ↑f.natDegree < ↑n",
" (map (mk P) f).degree < ↑n",
" ↑n = (map (mk P) q).degree"
] |
import Mathlib.Algebra.Algebra.Defs
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Algebra.Order.Field.Canonical.Basic
import Mathlib.Algebra.Order.Nonneg.Field
import Mathlib.Algebra.Order.Nonneg.Floor
import Mathlib.Data.Real.Pointwise
import Mathlib.Order.ConditionallyCompleteLattice.Group
imp... | Mathlib/Data/Real/NNReal.lean | 125 | 126 | theorem _root_.Real.toNNReal_of_nonneg {r : ℝ} (hr : 0 ≤ r) : r.toNNReal = ⟨r, hr⟩ := by |
simp_rw [Real.toNNReal, max_eq_left hr]
| [
" r.toNNReal = ⟨r, hr⟩"
] | [] |
import Mathlib.Logic.Function.Conjugate
#align_import logic.function.iterate from "leanprover-community/mathlib"@"792a2a264169d64986541c6f8f7e3bbb6acb6295"
universe u v
variable {α : Type u} {β : Type v}
def Nat.iterate {α : Sort u} (op : α → α) : ℕ → α → α
| 0, a => a
| succ k, a => iterate op k (op a)
#a... | Mathlib/Logic/Function/Iterate.lean | 80 | 82 | theorem iterate_add_apply (m n : ℕ) (x : α) : f^[m + n] x = f^[m] (f^[n] x) := by |
rw [iterate_add f m n]
rfl
| [
" id^[n.succ] = id",
" f^[m + n.succ] = f^[m] ∘ f^[n.succ]",
" (f^[m] ∘ f^[n]) ∘ f = f^[m] ∘ f^[n] ∘ f",
" f^[m + n] x = f^[m] (f^[n] x)",
" (f^[m] ∘ f^[n]) x = f^[m] (f^[n] x)"
] | [
" id^[n.succ] = id",
" f^[m + n.succ] = f^[m] ∘ f^[n.succ]",
" (f^[m] ∘ f^[n]) ∘ f = f^[m] ∘ f^[n] ∘ f"
] |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 111 | 116 | theorem Multiset.untrop_sum [LinearOrder R] [OrderTop R] (s : Multiset (Tropical R)) :
untrop s.sum = Multiset.inf (s.map untrop) := by |
induction' s using Multiset.induction with s x IH
· simp
· simp only [sum_cons, ge_iff_le, untrop_add, untrop_le_iff, map_cons, inf_cons, ← IH]
rfl
| [
" trop l.sum = (map trop l).prod",
" trop [].sum = (map trop []).prod",
" trop (hd :: tl).sum = (map trop (hd :: tl)).prod",
" ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod",
" trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)",
" ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod",
" ... | [
" trop l.sum = (map trop l).prod",
" trop [].sum = (map trop []).prod",
" trop (hd :: tl).sum = (map trop (hd :: tl)).prod",
" ∀ (a : List R), trop (sum ⟦a⟧) = (map trop ⟦a⟧).prod",
" trop (∑ i ∈ s, f i) = ∏ i ∈ s, trop (f i)",
" ∏ i ∈ s, trop (f i) = (Multiset.map trop (Multiset.map f s.val)).prod",
" ... |
import Mathlib.Analysis.Calculus.Deriv.ZPow
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Analysis.SpecialFunctions.Log.Deriv
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Analysis.Convex.Deriv
#align_import analysis.convex.specific_functions.deriv from "leanprover-communi... | Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean | 174 | 177 | theorem strictConcaveOn_cos_Icc : StrictConcaveOn ℝ (Icc (-(π / 2)) (π / 2)) cos := by |
apply strictConcaveOn_of_deriv2_neg (convex_Icc _ _) continuousOn_cos fun x hx => ?_
rw [interior_Icc] at hx
simp [cos_pos_of_mem_Ioo hx]
| [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... | [
" StrictConvexOn ℝ (Ici 0) fun x => x ^ n",
" StrictMonoOn (deriv fun x => x ^ n) (interior (Ici 0))",
" StrictMonoOn (fun x => ↑n * x ^ (n - 1)) (Ioi 0)",
" 0 < ↑n",
" StrictConvexOn ℝ univ fun x => x ^ n",
" StrictMono (deriv fun a => a ^ n)",
" StrictMono fun x => ↑n * x ^ (n - 1)",
" 0 ≤ (if f x ≤... |
import Mathlib.Algebra.IsPrimePow
import Mathlib.Algebra.Squarefree.Basic
import Mathlib.Order.Hom.Bounded
import Mathlib.Algebra.GCDMonoid.Basic
#align_import ring_theory.chain_of_divisors from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {M : Type*} [CancelCommMonoidWithZero... | Mathlib/RingTheory/ChainOfDivisors.lean | 66 | 81 | theorem exists_chain_of_prime_pow {p : Associates M} {n : ℕ} (hn : n ≠ 0) (hp : Prime p) :
∃ c : Fin (n + 1) → Associates M,
c 1 = p ∧ StrictMono c ∧ ∀ {r : Associates M}, r ≤ p ^ n ↔ ∃ i, r = c i := by |
refine ⟨fun i => p ^ (i : ℕ), ?_, fun n m h => ?_, @fun y => ⟨fun h => ?_, ?_⟩⟩
· dsimp only
rw [Fin.val_one', Nat.mod_eq_of_lt, pow_one]
exact Nat.lt_succ_of_le (Nat.one_le_iff_ne_zero.mpr hn)
· exact Associates.dvdNotUnit_iff_lt.mp
⟨pow_ne_zero n hp.ne_zero, p ^ (m - n : ℕ),
not_isUni... | [
" ¬IsUnit p",
" IsUnit b",
" Associated (p * b) p",
"M : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p",
" p ≠ ⊥",
" b = ⊥",
" b = p * ↑ha.unit⁻¹",
" ∃ c, c 1 = p ∧ StrictMono c ∧ ∀ {r : Associates M}, r ≤ ... | [
" ¬IsUnit p",
" IsUnit b",
" Associated (p * b) p",
"M : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p",
" p ≠ ⊥",
" b = ⊥",
" b = p * ↑ha.unit⁻¹"
] |
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.HasseDeriv
#align_import data.polynomial.taylor from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
noncomputable section
namespace Polynomial
open Polynomial... | Mathlib/Algebra/Polynomial/Taylor.lean | 62 | 62 | theorem taylor_zero (f : R[X]) : taylor 0 f = f := by | rw [taylor_zero', LinearMap.id_apply]
| [
" { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f",
" (taylor r) X = X + C r",
" (taylor r) (C x) = C x",
" taylor 0 = LinearMap.id",
" ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono... | [
" { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f",
" (taylor r) X = X + C r",
" (taylor r) (C x) = C x",
" taylor 0 = LinearMap.id",
" ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono... |
import Mathlib.Algebra.MonoidAlgebra.Ideal
import Mathlib.Algebra.MvPolynomial.Division
#align_import ring_theory.mv_polynomial.ideal from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951"
variable {σ R : Type*}
namespace MvPolynomial
variable [CommSemiring R]
theorem mem_ideal_span_mo... | Mathlib/RingTheory/MvPolynomial/Ideal.lean | 39 | 43 | theorem mem_ideal_span_monomial_image_iff_dvd {x : MvPolynomial σ R} {s : Set (σ →₀ ℕ)} :
x ∈ Ideal.span ((fun s => monomial s (1 : R)) '' s) ↔
∀ xi ∈ x.support, ∃ si ∈ s, monomial si 1 ∣ monomial xi (x.coeff xi) := by |
refine mem_ideal_span_monomial_image.trans (forall₂_congr fun xi hxi => ?_)
simp_rw [monomial_dvd_monomial, one_dvd, and_true_iff, mem_support_iff.mp hxi, false_or_iff]
| [
" x ∈ Ideal.span ((fun s => (monomial s) 1) '' s) ↔ ∀ xi ∈ x.support, ∃ si ∈ s, si ≤ xi",
" (∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = d + m') ↔ ∀ xi ∈ x.support, ∃ si ∈ s, si ≤ xi",
" (∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = m' + d) ↔ ∀ xi ∈ x.support, ∃ si ∈ s, ∃ c, xi = si + c",
" x ∈ Ideal.span ((fun s => (monomial... | [
" x ∈ Ideal.span ((fun s => (monomial s) 1) '' s) ↔ ∀ xi ∈ x.support, ∃ si ∈ s, si ≤ xi",
" (∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = d + m') ↔ ∀ xi ∈ x.support, ∃ si ∈ s, si ≤ xi",
" (∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = m' + d) ↔ ∀ xi ∈ x.support, ∃ si ∈ s, ∃ c, xi = si + c"
] |
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.DenseEmbedding
import Mathlib.Topology.Support
import Mathlib.Topology.Connected.LocallyConnected
#align_import topology.homeomorph from "leanprover-community/mathlib"@"4c3e1721c58ef9087bbc2c8c38b540f70eda2e53"
open Set Filter
open Topology
variable {X : Typ... | Mathlib/Topology/Homeomorph.lean | 171 | 173 | theorem self_trans_symm (h : X ≃ₜ Y) : h.trans h.symm = Homeomorph.refl X := by |
ext
apply symm_apply_apply
| [
" h.trans h.symm = Homeomorph.refl X",
" (h.trans h.symm) x✝ = (Homeomorph.refl X) x✝"
] | [] |
import Mathlib.Algebra.GCDMonoid.Finset
import Mathlib.Algebra.Polynomial.CancelLeads
import Mathlib.Algebra.Polynomial.EraseLead
import Mathlib.Algebra.Polynomial.FieldDivision
#align_import ring_theory.polynomial.content from "leanprover-community/mathlib"@"7a030ab8eb5d99f05a891dccc49c5b5b90c947d3"
namespace Po... | Mathlib/RingTheory/Polynomial/Content.lean | 102 | 102 | theorem content_zero : content (0 : R[X]) = 0 := by | rw [← C_0, content_C, normalize_zero]
| [
" p.content ∣ p.coeff n",
" p.content ∣ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r",
" content 0 = 0"
] | [
" p.content ∣ p.coeff n",
" p.content ∣ 0",
" (C r).content = normalize r",
" (C r).support.gcd (C r).coeff = normalize r"
] |
import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.CategoryTheory.Limits.HasLimits
import Mathlib.CategoryTheory.Limits.Types
#align_import category_theory.limits.filtered from "leanprover-community/mathlib"@"e4ee4e30418efcb8cf304ba76ad653aeec04ba6e"
universe w' w v u
noncomputable section
open Categor... | Mathlib/CategoryTheory/Limits/Filtered.lean | 52 | 60 | theorem IsCofiltered.iff_nonempty_limit : IsCofiltered C ↔
∀ {J : Type v} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
∃ (X : C), Nonempty (limit (F ⋙ coyoneda.obj (op X))) := by |
rw [IsCofiltered.iff_cone_nonempty.{v}]
refine ⟨fun h J _ _ F => ?_, fun h J _ _ F => ?_⟩
· obtain ⟨c⟩ := h F
exact ⟨c.pt, ⟨(limitCompCoyonedaIsoCone F c.pt).inv c.π⟩⟩
· obtain ⟨pt, ⟨π⟩⟩ := h F
exact ⟨⟨pt, (limitCompCoyonedaIsoCone F pt).hom π⟩⟩
| [
" IsFiltered C ↔\n ∀ {J : Type v} [inst : SmallCategory J] [inst_1 : FinCategory J] (F : J ⥤ C),\n ∃ X, Nonempty (limit (F.op ⋙ yoneda.obj X))",
" (∀ {J : Type v} [inst : SmallCategory J] [inst_1 : FinCategory J] (F : J ⥤ C), Nonempty (Cocone F)) ↔\n ∀ {J : Type v} [inst : SmallCategory J] [inst_1 : Fi... | [
" IsFiltered C ↔\n ∀ {J : Type v} [inst : SmallCategory J] [inst_1 : FinCategory J] (F : J ⥤ C),\n ∃ X, Nonempty (limit (F.op ⋙ yoneda.obj X))",
" (∀ {J : Type v} [inst : SmallCategory J] [inst_1 : FinCategory J] (F : J ⥤ C), Nonempty (Cocone F)) ↔\n ∀ {J : Type v} [inst : SmallCategory J] [inst_1 : Fi... |
import Mathlib.Algebra.Order.AbsoluteValue
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Group.MinMax
import Mathlib.Algebra.Ring.Pi
import Mathlib.GroupTheory.GroupAction.Pi
import Mathlib.GroupTheory.GroupAction.Ring
import Mathlib.Init.Align
import Mathlib.Tactic.GCongr
import Mathlib.Tactic... | Mathlib/Algebra/Order/CauSeq/Basic.lean | 74 | 85 | theorem rat_inv_continuous_lemma {β : Type*} [DivisionRing β] (abv : β → α) [IsAbsoluteValue abv]
{ε K : α} (ε0 : 0 < ε) (K0 : 0 < K) :
∃ δ > 0, ∀ {a b : β}, K ≤ abv a → K ≤ abv b → abv (a - b) < δ → abv (a⁻¹ - b⁻¹) < ε := by |
refine ⟨K * ε * K, mul_pos (mul_pos K0 ε0) K0, fun {a b} ha hb h => ?_⟩
have a0 := K0.trans_le ha
have b0 := K0.trans_le hb
rw [inv_sub_inv' ((abv_pos abv).1 a0) ((abv_pos abv).1 b0), abv_mul abv, abv_mul abv, abv_inv abv,
abv_inv abv, abv_sub abv]
refine lt_of_mul_lt_mul_left (lt_of_mul_lt_mul_right ?_ ... | [
" abv (a₁ + a₂ - (b₁ + b₂)) < ε",
" ∃ δ > 0,\n ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε",
" abv (a₁ * a₂ - b₁ * b₂) < ε",
" abv (a₁ - b₁) * abv b₂ + abv (a₂ - b₂) * abv a₁ < ε / 2 / M * M + ε / 2 / M * M",
" ∃ δ > 0, ∀ {a b : β},... | [
" abv (a₁ + a₂ - (b₁ + b₂)) < ε",
" ∃ δ > 0,\n ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε",
" abv (a₁ * a₂ - b₁ * b₂) < ε",
" abv (a₁ - b₁) * abv b₂ + abv (a₂ - b₂) * abv a₁ < ε / 2 / M * M + ε / 2 / M * M"
] |
import Mathlib.Algebra.EuclideanDomain.Basic
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.Algebra.GCDMonoid.Nat
#align_import ring_theory.int.basic from "leanprover-community/mathlib"@"e655e4ea5c6d02854696f97494997ba4c31be802"
namespace Int
| Mathlib/RingTheory/Int/Basic.lean | 33 | 46 | theorem gcd_eq_one_iff_coprime {a b : ℤ} : Int.gcd a b = 1 ↔ IsCoprime a b := by |
constructor
· intro hg
obtain ⟨ua, -, ha⟩ := exists_unit_of_abs a
obtain ⟨ub, -, hb⟩ := exists_unit_of_abs b
use Nat.gcdA (Int.natAbs a) (Int.natAbs b) * ua, Nat.gcdB (Int.natAbs a) (Int.natAbs b) * ub
rw [mul_assoc, ← ha, mul_assoc, ← hb, mul_comm, mul_comm _ (Int.natAbs b : ℤ), ←
Nat.gcd_eq... | [
" a.gcd b = 1 ↔ IsCoprime a b",
" a.gcd b = 1 → IsCoprime a b",
" IsCoprime a b",
" a.natAbs.gcdA b.natAbs * ua * a + a.natAbs.gcdB b.natAbs * ub * b = 1",
" IsCoprime a b → a.gcd b = 1",
" a.gcd b = 1",
" False",
" p ∣ 1",
" ↑p ∣ r * a + s * b"
] | [] |
import Mathlib.Algebra.Algebra.Operations
import Mathlib.Algebra.Algebra.Subalgebra.Prod
import Mathlib.Algebra.Algebra.Subalgebra.Tower
import Mathlib.LinearAlgebra.Basis
import Mathlib.LinearAlgebra.Prod
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.Prod
#align_import ring_theory.adjoin.basic fr... | Mathlib/RingTheory/Adjoin/Basic.lean | 99 | 113 | theorem adjoin_induction₂ {p : A → A → Prop} {a b : A} (ha : a ∈ adjoin R s) (hb : b ∈ adjoin R s)
(Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (Halg : ∀ r₁ r₂, p (algebraMap R A r₁) (algebraMap R A r₂))
(Halg_left : ∀ (r), ∀ x ∈ s, p (algebraMap R A r) x)
(Halg_right : ∀ (r), ∀ x ∈ s, p x (algebraMap R A r))
(Hadd_l... |
refine adjoin_induction hb ?_ (fun r => ?_) (Hadd_right a) (Hmul_right a)
· exact adjoin_induction ha Hs Halg_left
(fun x y Hx Hy z hz => Hadd_left x y z (Hx z hz) (Hy z hz))
fun x y Hx Hy z hz => Hmul_left x y z (Hx z hz) (Hy z hz)
· exact adjoin_induction ha (Halg_right r) (fun r' => Halg r' r)
... | [
" adjoin R ↑(s.attach.biUnion f) = ⨆ x, adjoin R ↑(f x)",
" p a b",
" ∀ x ∈ s, p a x",
" p a ((algebraMap R A) r)"
] | [
" adjoin R ↑(s.attach.biUnion f) = ⨆ x, adjoin R ↑(f x)"
] |
import Mathlib.GroupTheory.QuotientGroup
import Mathlib.LinearAlgebra.Span
#align_import linear_algebra.quotient from "leanprover-community/mathlib"@"48085f140e684306f9e7da907cd5932056d1aded"
-- For most of this file we work over a noncommutative ring
section Ring
namespace Submodule
variable {R M : Type*} {r : ... | Mathlib/LinearAlgebra/Quotient.lean | 262 | 265 | theorem nontrivial_of_lt_top (h : p < ⊤) : Nontrivial (M ⧸ p) := by |
obtain ⟨x, _, not_mem_s⟩ := SetLike.exists_of_lt h
refine ⟨⟨mk x, 0, ?_⟩⟩
simpa using not_mem_s
| [
" Setoid.r x y ↔ -(x - y) ∈ p",
" -x + y ∈ p.toAddSubgroup ↔ -x + y ∈ p",
" mk x = 0 ↔ x ∈ p",
" Function.Surjective mk",
" ∃ a, mk a = Quot.mk Setoid.r x",
" Nontrivial (M ⧸ p)",
" mk x ≠ 0"
] | [
" Setoid.r x y ↔ -(x - y) ∈ p",
" -x + y ∈ p.toAddSubgroup ↔ -x + y ∈ p",
" mk x = 0 ↔ x ∈ p",
" Function.Surjective mk",
" ∃ a, mk a = Quot.mk Setoid.r x"
] |
import Mathlib.MeasureTheory.MeasurableSpace.Basic
import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
#align_import measure_theory.function.ae_measurable_sequence from "leanprover-community/mathlib"@"d003c55042c3cd08aefd1ae9a42ef89441cdaaf3"
open MeasureTheory
open scoped Classical
variable {ι : Sort*} {α β γ... | Mathlib/MeasureTheory/Function/AEMeasurableSequence.lean | 69 | 78 | theorem prop_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α} (hx : x ∈ aeSeqSet hf p) :
p x fun n => aeSeq hf p n x := by |
simp only [aeSeq, hx, if_true]
rw [funext fun n => mk_eq_fun_of_mem_aeSeqSet hf hx n]
have h_ss : aeSeqSet hf p ⊆ { x | p x fun n => f n x } := by
rw [← compl_compl { x | p x fun n => f n x }, aeSeqSet, Set.compl_subset_compl]
refine Set.Subset.trans (Set.compl_subset_compl.mpr ?_) (subset_toMeasurable _... | [
" aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}ᶜ ⊆\n toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x) ∧ p x fun n => f n x}ᶜ",
" x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" aeSeq hf p i x = AEMeasur... | [
" aeSeqSet hf p ⊆ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}ᶜ ⊆\n toMeasurable μ {x | (∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x) ∧ p x fun n => f n x}ᶜ",
" x ∈ {x | ∀ (i : ι), f i x = AEMeasurable.mk (f i) ⋯ x}",
" aeSeq hf p i x = AEMeasur... |
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
import Mathlib.Algebra.Polynomial.AlgebraMap
import Mathlib.RingTheory.Coprime.Basic
import Mathlib.Tactic.AdaptationNote
#align_import ring_theory.polynomial.scale_roots from "leanprover-community/mathlib"@"40ac1b258344e0c2b4568dc37bfad937ec35a727"
variable {R... | Mathlib/RingTheory/Polynomial/ScaleRoots.lean | 78 | 86 | theorem degree_scaleRoots (p : R[X]) {s : R} : degree (scaleRoots p s) = degree p := by |
haveI := Classical.propDecidable
by_cases hp : p = 0
· rw [hp, zero_scaleRoots]
refine le_antisymm (Finset.sup_mono (support_scaleRoots_le p s)) (degree_le_degree ?_)
rw [coeff_scaleRoots_natDegree]
intro h
have := leadingCoeff_eq_zero.mp h
contradiction
| [
" (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)",
" (p.scaleRoots s).coeff p.natDegree = p.leadingCoeff",
" scaleRoots 0 s = 0",
" (scaleRoots 0 s).coeff n✝ = coeff 0 n✝",
" p.scaleRoots s ≠ 0",
" False",
" (p.scaleRoots s).support ≤ p.support",
" a✝ ∈ (p.scaleRoots s).support → a✝ ∈ p.... | [
" (p.scaleRoots s).coeff i = p.coeff i * s ^ (p.natDegree - i)",
" (p.scaleRoots s).coeff p.natDegree = p.leadingCoeff",
" scaleRoots 0 s = 0",
" (scaleRoots 0 s).coeff n✝ = coeff 0 n✝",
" p.scaleRoots s ≠ 0",
" False",
" (p.scaleRoots s).support ≤ p.support",
" a✝ ∈ (p.scaleRoots s).support → a✝ ∈ p.... |
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Integral.PeakFunction
#align_import analysis.special_functions.trigonometric.euler_sine_prod from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1"
open scoped Real Topology
open Real Set Filter intervalIntegra... | Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean | 39 | 46 | theorem antideriv_cos_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
HasDerivAt (fun y : ℝ => Complex.sin (2 * z * y) / (2 * z)) (Complex.cos (2 * z * x)) x := by |
have a : HasDerivAt (fun y : ℂ => y * (2 * z)) _ x := hasDerivAt_mul_const _
have b : HasDerivAt (fun y : ℂ => Complex.sin (y * (2 * z))) _ x :=
HasDerivAt.comp (x : ℂ) (Complex.hasDerivAt_sin (x * (2 * z))) a
have c := b.comp_ofReal.div_const (2 * z)
field_simp at c; simp only [fun y => mul_comm y (2 * z)... | [
" HasDerivAt (fun y => (2 * z * ↑y).sin / (2 * z)) (2 * z * ↑x).cos x"
] | [] |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.Polynomial.Monic
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.LinearAlgebra.Vandermonde
import Mathlib.RingTheory.Polynomial.Pochhammer
namespace Nat
def superFactorial : ℕ → ℕ
| 0 => 1
| succ n => factorial n.succ * superFactoria... | Mathlib/Data/Nat/Factorial/SuperFactorial.lean | 114 | 125 | theorem superFactorial_dvd_vandermonde_det {n : ℕ} (v : Fin (n + 1) → ℤ) :
↑(Nat.superFactorial n) ∣ (Matrix.vandermonde v).det := by |
let m := inf' univ ⟨0, mem_univ _⟩ v
let w' := fun i ↦ (v i - m).toNat
have hw' : ∀ i, (w' i : ℤ) = v i - m := fun i ↦ Int.toNat_sub_of_le (inf'_le _ (mem_univ _))
have h := Matrix.det_eval_matrixOfPolynomials_eq_det_vandermonde (fun i ↦ ↑(w' i))
(fun i => descPochhammer ℤ i)
(fun i => descPochhamm... | [
" ∏ x ∈ Icc 1 (n + 1), x ! = sf n + 1",
" ∏ x ∈ range (n + 1 + 1), x ! = sf n + 1",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n)",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf 0)",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n + 1)",
" (∏ j ∈ Ioi 0, (↑↑j - ↑↑0)) * ∏ i : Fin (n + 1), ∏ j ∈ Ioi (F... | [
" ∏ x ∈ Icc 1 (n + 1), x ! = sf n + 1",
" ∏ x ∈ range (n + 1 + 1), x ! = sf n + 1",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n)",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf 0)",
" (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n + 1)",
" (∏ j ∈ Ioi 0, (↑↑j - ↑↑0)) * ∏ i : Fin (n + 1), ∏ j ∈ Ioi (F... |
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.BigOperators.Ring
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Algebra.Order.Field.Basic
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Algebra.Ring.Opposite
import Mathlib.Tactic.Abel
#align_import algebra.geom_sum fro... | Mathlib/Algebra/GeomSum.lean | 81 | 82 | theorem op_geom_sum (x : α) (n : ℕ) : op (∑ i ∈ range n, x ^ i) = ∑ i ∈ range n, op x ^ i := by |
simp
| [
" ∑ i ∈ range (n + 1), x ^ i = x * ∑ i ∈ range n, x ^ i + 1",
" ∑ i ∈ range 1, x ^ i = 1",
" ∑ i ∈ range 2, x ^ i = x + 1",
" ∑ i ∈ range 0, 0 ^ i = if 0 = 0 then 0 else 1",
" ∑ i ∈ range 1, 0 ^ i = if 1 = 0 then 0 else 1",
" ∑ i ∈ range (n + 2), 0 ^ i = if n + 2 = 0 then 0 else 1",
" 0 ^ (n + 1) + ∑ i ... | [
" ∑ i ∈ range (n + 1), x ^ i = x * ∑ i ∈ range n, x ^ i + 1",
" ∑ i ∈ range 1, x ^ i = 1",
" ∑ i ∈ range 2, x ^ i = x + 1",
" ∑ i ∈ range 0, 0 ^ i = if 0 = 0 then 0 else 1",
" ∑ i ∈ range 1, 0 ^ i = if 1 = 0 then 0 else 1",
" ∑ i ∈ range (n + 2), 0 ^ i = if n + 2 = 0 then 0 else 1",
" 0 ^ (n + 1) + ∑ i ... |
import Mathlib.Analysis.NormedSpace.BoundedLinearMaps
import Mathlib.Topology.FiberBundle.Basic
#align_import topology.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
noncomputable section
open scoped Classical
open Bundle Set
open scoped Topology
variable (R : ... | Mathlib/Topology/VectorBundle/Basic.lean | 120 | 123 | theorem coe_linearMapAt (e : Pretrivialization F (π F E)) [e.IsLinear R] (b : B) :
⇑(e.linearMapAt R b) = fun y => if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0 := by |
rw [Pretrivialization.linearMapAt]
split_ifs <;> rfl
| [
" F →ₗ[R] E b",
" IsLinearMap R (e.symm b)",
" IsLinearMap R 0",
" { toFun := fun y => (↑e { proj := b, snd := y }).2, map_add' := ⋯, map_smul' := ⋯ }.toFun (e.symm b v) = v",
" ⇑(Pretrivialization.linearMapAt R e b) = fun y => if b ∈ e.baseSet then (↑e { proj := b, snd := y }).2 else 0",
" ⇑(if hb : b ∈ ... | [
" F →ₗ[R] E b",
" IsLinearMap R (e.symm b)",
" IsLinearMap R 0",
" { toFun := fun y => (↑e { proj := b, snd := y }).2, map_add' := ⋯, map_smul' := ⋯ }.toFun (e.symm b v) = v"
] |
import Mathlib.Algebra.MonoidAlgebra.Ideal
import Mathlib.Algebra.MvPolynomial.Division
#align_import ring_theory.mv_polynomial.ideal from "leanprover-community/mathlib"@"72c366d0475675f1309d3027d3d7d47ee4423951"
variable {σ R : Type*}
namespace MvPolynomial
variable [CommSemiring R]
theorem mem_ideal_span_mo... | Mathlib/RingTheory/MvPolynomial/Ideal.lean | 48 | 54 | theorem mem_ideal_span_X_image {x : MvPolynomial σ R} {s : Set σ} :
x ∈ Ideal.span (MvPolynomial.X '' s : Set (MvPolynomial σ R)) ↔
∀ m ∈ x.support, ∃ i ∈ s, (m : σ →₀ ℕ) i ≠ 0 := by |
have := @mem_ideal_span_monomial_image σ R _ x ((fun i => Finsupp.single i 1) '' s)
rw [Set.image_image] at this
refine this.trans ?_
simp [Nat.one_le_iff_ne_zero]
| [
" x ∈ Ideal.span ((fun s => (monomial s) 1) '' s) ↔ ∀ xi ∈ x.support, ∃ si ∈ s, si ≤ xi",
" (∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = d + m') ↔ ∀ xi ∈ x.support, ∃ si ∈ s, si ≤ xi",
" (∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = m' + d) ↔ ∀ xi ∈ x.support, ∃ si ∈ s, ∃ c, xi = si + c",
" x ∈ Ideal.span ((fun s => (monomial... | [
" x ∈ Ideal.span ((fun s => (monomial s) 1) '' s) ↔ ∀ xi ∈ x.support, ∃ si ∈ s, si ≤ xi",
" (∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = d + m') ↔ ∀ xi ∈ x.support, ∃ si ∈ s, si ≤ xi",
" (∀ m ∈ x.support, ∃ m' ∈ s, ∃ d, m = m' + d) ↔ ∀ xi ∈ x.support, ∃ si ∈ s, ∃ c, xi = si + c",
" x ∈ Ideal.span ((fun s => (monomial... |
import Mathlib.Algebra.EuclideanDomain.Instances
import Mathlib.RingTheory.Ideal.Colon
import Mathlib.RingTheory.UniqueFactorizationDomain
#align_import ring_theory.principal_ideal_domain from "leanprover-community/mathlib"@"6010cf523816335f7bae7f8584cb2edaace73940"
universe u v
variable {R : Type u} {M : Type v... | Mathlib/RingTheory/PrincipalIdealDomain.lean | 114 | 115 | theorem eq_bot_iff_generator_eq_zero (S : Submodule R M) [S.IsPrincipal] :
S = ⊥ ↔ generator S = 0 := by | rw [← @span_singleton_eq_bot R M, span_singleton_generator]
| [
" ⊥ = span R {0}",
" IsPrincipal S",
" IsPrincipal ⊥",
" IsPrincipal ⊤",
" generator S ∈ S",
"R : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : S.IsPrincipal\n| S",
" generator S ∈ span R {generator S}",
" x ∈ S ↔ ∃ s, x = s • generator S... | [
" ⊥ = span R {0}",
" IsPrincipal S",
" IsPrincipal ⊥",
" IsPrincipal ⊤",
" generator S ∈ S",
"R : Type u\nM : Type v\ninst✝³ : AddCommGroup M\ninst✝² : Ring R\ninst✝¹ : Module R M\nS : Submodule R M\ninst✝ : S.IsPrincipal\n| S",
" generator S ∈ span R {generator S}",
" x ∈ S ↔ ∃ s, x = s • generator S... |
import Mathlib.Algebra.Order.Monoid.Defs
import Mathlib.Algebra.Order.Sub.Defs
import Mathlib.Util.AssertExists
#align_import algebra.order.group.defs from "leanprover-community/mathlib"@"b599f4e4e5cf1fbcb4194503671d3d9e569c1fce"
open Function
universe u
variable {α : Type u}
class OrderedAddCommGroup (α : Ty... | Mathlib/Algebra/Order/Group/Defs.lean | 280 | 281 | theorem Right.inv_lt_one_iff : a⁻¹ < 1 ↔ 1 < a := by |
rw [← mul_lt_mul_iff_right a, inv_mul_self, one_mul]
| [
" b ≤ c",
" a⁻¹ < 1 ↔ 1 < a"
] | [
" b ≤ c"
] |
import Mathlib.Algebra.CharP.Invertible
import Mathlib.Analysis.NormedSpace.LinearIsometry
import Mathlib.Analysis.Normed.Group.AddTorsor
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.LinearAlgebra.AffineSpace.Restrict
import Mathlib.Tactic.FailIfNoProgress
#align_import analysis.normed_space.affine_isomet... | Mathlib/Analysis/NormedSpace/AffineIsometry.lean | 72 | 74 | theorem linear_eq_linearIsometry : f.linear = f.linearIsometry.toLinearMap := by |
ext
rfl
| [
" f.linear = f.linearIsometry.toLinearMap",
" f.linear x✝ = f.linearIsometry.toLinearMap x✝"
] | [] |
import Mathlib.Order.Cover
import Mathlib.Order.LatticeIntervals
import Mathlib.Order.GaloisConnection
#align_import order.modular_lattice from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432"
open Set
variable {α : Type*}
class IsWeakUpperModularLattice (α : Type*) [Lattice α] : Prop ... | Mathlib/Order/ModularLattice.lean | 127 | 129 | theorem inf_covBy_of_covBy_sup_of_covBy_sup_right : a ⋖ a ⊔ b → b ⋖ a ⊔ b → a ⊓ b ⋖ b := by |
rw [sup_comm, inf_comm]
exact fun ha hb => inf_covBy_of_covBy_sup_of_covBy_sup_left hb ha
| [
" a ⋖ a ⊔ b → b ⋖ a ⊔ b → a ⊓ b ⋖ b",
" a ⋖ b ⊔ a → b ⋖ b ⊔ a → b ⊓ a ⋖ b"
] | [] |
import Mathlib.Data.Complex.Basic
import Mathlib.MeasureTheory.Integral.CircleIntegral
#align_import measure_theory.integral.circle_transform from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15"
open Set MeasureTheory Metric Filter Function
open scoped Interval Real
noncomputable secti... | Mathlib/MeasureTheory/Integral/CircleTransform.lean | 109 | 117 | theorem continuousOn_abs_circleTransformBoundingFunction {R r : ℝ} (hr : r < R) (z : ℂ) :
ContinuousOn (abs ∘ circleTransformBoundingFunction R z) (closedBall z r ×ˢ univ) := by |
have : ContinuousOn (circleTransformBoundingFunction R z) (closedBall z r ×ˢ univ) := by
apply_rules [ContinuousOn.smul, continuousOn_const]
· simp only [deriv_circleMap]
apply_rules [ContinuousOn.mul, (continuous_circleMap 0 R).comp_continuousOn continuousOn_snd,
continuousOn_const]
· simp... | [
" Periodic (circleTransformDeriv R z w f) (2 * π)",
" ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x",
" circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x",
" (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c... | [
" Periodic (circleTransformDeriv R z w f) (2 * π)",
" ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x",
" circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x",
" (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c... |
import Mathlib.Data.Nat.Lattice
import Mathlib.Logic.Denumerable
import Mathlib.Logic.Function.Iterate
import Mathlib.Order.Hom.Basic
import Mathlib.Data.Set.Subsingleton
#align_import order.order_iso_nat from "leanprover-community/mathlib"@"210657c4ea4a4a7b234392f70a3a2a83346dfa90"
variable {α : Type*}
namespa... | Mathlib/Order/OrderIsoNat.lean | 90 | 96 | theorem wellFounded_iff_no_descending_seq :
WellFounded r ↔ IsEmpty (((· > ·) : ℕ → ℕ → Prop) ↪r r) := by |
constructor
· rintro ⟨h⟩
exact ⟨fun f => not_acc_of_decreasing_seq f 0 (h _)⟩
· intro h
exact ⟨fun x => acc_iff_no_decreasing_seq.2 inferInstance⟩
| [
" ∃ b, ¬Acc r b ∧ r b a",
" Acc r a",
" Acc r b",
" False",
" Acc r x ↔ IsEmpty { f // x ∈ Set.range ⇑f }",
" Acc r x → IsEmpty { f // x ∈ Set.range ⇑f }",
" IsEmpty { f // x ∈ Set.range ⇑f }",
" { f // x ∈ Set.range ⇑f } → False",
" IsEmpty { f // x ∈ Set.range ⇑f } → Acc r x",
" ∀ (x : { a // ¬A... | [
" ∃ b, ¬Acc r b ∧ r b a",
" Acc r a",
" Acc r b",
" False",
" Acc r x ↔ IsEmpty { f // x ∈ Set.range ⇑f }",
" Acc r x → IsEmpty { f // x ∈ Set.range ⇑f }",
" IsEmpty { f // x ∈ Set.range ⇑f }",
" { f // x ∈ Set.range ⇑f } → False",
" IsEmpty { f // x ∈ Set.range ⇑f } → Acc r x",
" ∀ (x : { a // ¬A... |
import Mathlib.Algebra.Polynomial.FieldDivision
import Mathlib.Algebra.Polynomial.Lifts
import Mathlib.Data.List.Prime
#align_import data.polynomial.splits from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
noncomputable section
open Polynomial
universe u v w
variable {R : Type*} {F... | Mathlib/Algebra/Polynomial/Splits.lean | 124 | 125 | theorem splits_map_iff (j : L →+* F) {f : K[X]} : Splits j (f.map i) ↔ Splits (j.comp i) f := by |
simp [Splits, Polynomial.map_map]
| [
" g✝.degree = 0",
" g✝.degree = 1",
" Splits i f",
" p ∣ map i f * map i g",
" map i f * map i g = map i (f * g)",
" False",
" g ∣ map i (f * g✝)",
" g ∣ map i f * map i g✝",
" Splits j (map i f) ↔ Splits (j.comp i) f"
] | [
" g✝.degree = 0",
" g✝.degree = 1",
" Splits i f",
" p ∣ map i f * map i g",
" map i f * map i g = map i (f * g)",
" False",
" g ∣ map i (f * g✝)",
" g ∣ map i f * map i g✝"
] |
import Mathlib.Algebra.Field.Basic
import Mathlib.Algebra.GroupWithZero.Units.Equiv
import Mathlib.Algebra.Order.Field.Defs
import Mathlib.Algebra.Order.Ring.Abs
import Mathlib.Order.Bounds.OrderIso
import Mathlib.Tactic.Positivity.Core
#align_import algebra.order.field.basic from "leanprover-community/mathlib"@"8477... | Mathlib/Algebra/Order/Field/Basic.lean | 642 | 643 | theorem div_nonpos_iff : a / b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b := by |
simp [division_def, mul_nonpos_iff]
| [
" 0 < a / b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0",
" a / b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b",
" 0 ≤ a / b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0",
" a / b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b"
] | [
" 0 < a / b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0",
" a / b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b",
" 0 ≤ a / b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0"
] |
import Mathlib.Algebra.Homology.HomologicalComplex
import Mathlib.CategoryTheory.DifferentialObject
#align_import algebra.homology.differential_object from "leanprover-community/mathlib"@"b535c2d5d996acd9b0554b76395d9c920e186f4f"
open CategoryTheory CategoryTheory.Limits
open scoped Classical
noncomputable secti... | Mathlib/Algebra/Homology/DifferentialObject.lean | 61 | 62 | theorem eqToHom_f' {X Y : DifferentialObject ℤ (GradedObjectWithShift b V)} (f : X ⟶ Y) {x y : β}
(h : x = y) : X.objEqToHom h ≫ f.f y = f.f x ≫ Y.objEqToHom h := by | cases h; simp
| [
" (fun b_1 => b_1 + { as := 1 }.as • b) x = (fun b_1 => b_1 + { as := 1 }.as • b) y",
" (fun b_1 => b_1 + { as := 1 }.as • b) x = (fun b_1 => b_1 + { as := 1 }.as • b) x",
" X.objEqToHom h ≫ X.d y = X.d x ≫ X.objEqToHom ⋯",
" X.objEqToHom ⋯ ≫ X.d x = X.d x ≫ X.objEqToHom ⋯",
" 𝟙 (X.obj x) ≫ X.d x = X.d x ≫... | [
" (fun b_1 => b_1 + { as := 1 }.as • b) x = (fun b_1 => b_1 + { as := 1 }.as • b) y",
" (fun b_1 => b_1 + { as := 1 }.as • b) x = (fun b_1 => b_1 + { as := 1 }.as • b) x",
" X.objEqToHom h ≫ X.d y = X.d x ≫ X.objEqToHom ⋯",
" X.objEqToHom ⋯ ≫ X.d x = X.d x ≫ X.objEqToHom ⋯",
" 𝟙 (X.obj x) ≫ X.d x = X.d x ≫... |
import Mathlib.Data.PFunctor.Univariate.M
#align_import data.qpf.univariate.basic from "leanprover-community/mathlib"@"14b69e9f3c16630440a2cbd46f1ddad0d561dee7"
universe u
class QPF (F : Type u → Type u) [Functor F] where
P : PFunctor.{u}
abs : ∀ {α}, P α → F α
repr : ∀ {α}, F α → P α
abs_repr : ∀ {α} (... | Mathlib/Data/QPF/Univariate/Basic.lean | 78 | 83 | theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α) :
(g ∘ f) <$> x = g <$> f <$> x := by |
rw [← abs_repr x]
cases' repr x with a f
rw [← abs_map, ← abs_map, ← abs_map]
rfl
| [
" id <$> x = x",
" id <$> abs (repr x) = abs (repr x)",
" id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩",
" (g ∘ f) <$> x = g <$> f <$> x",
" (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)",
" (g ∘ f✝) <$> abs ⟨a, f⟩ = g <$> f✝ <$> abs ⟨a, f⟩",
" abs ((P F).map (g ∘ f✝... | [
" id <$> x = x",
" id <$> abs (repr x) = abs (repr x)",
" id <$> abs ⟨a, f⟩ = abs ⟨a, f⟩",
" abs ((P F).map id ⟨a, f⟩) = abs ⟨a, f⟩"
] |
import Mathlib.RingTheory.PrincipalIdealDomain
#align_import ring_theory.bezout from "leanprover-community/mathlib"@"6623e6af705e97002a9054c1c05a980180276fc1"
universe u v
variable {R : Type u} [CommRing R]
namespace IsBezout
theorem iff_span_pair_isPrincipal :
IsBezout R ↔ ∀ x y : R, (Ideal.span {x, y} : ... | Mathlib/RingTheory/Bezout.lean | 53 | 78 | theorem TFAE [IsBezout R] [IsDomain R] :
List.TFAE
[IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R] := by |
classical
tfae_have 1 → 2
· intro H; exact ⟨fun I => isPrincipal_of_FG _ (IsNoetherian.noetherian _)⟩
tfae_have 2 → 3
· intro; infer_instance
tfae_have 3 → 4
· intro; infer_instance
tfae_have 4 → 1
· rintro ⟨h⟩
rw [isNoetherianRing_iff, isNoetherian_iff_fg_wellFounded]
app... | [
" IsBezout R ↔ ∀ (x y : R), Submodule.IsPrincipal (Ideal.span {x, y})",
" IsBezout R → ∀ (x y : R), Submodule.IsPrincipal (Ideal.span {x, y})",
" Submodule.IsPrincipal (Ideal.span {x, y})",
" (∀ (x y : R), Submodule.IsPrincipal (Ideal.span {x, y})) → IsBezout R",
" IsBezout R",
" ∀ (I : Ideal R), I.FG → S... | [
" IsBezout R ↔ ∀ (x y : R), Submodule.IsPrincipal (Ideal.span {x, y})",
" IsBezout R → ∀ (x y : R), Submodule.IsPrincipal (Ideal.span {x, y})",
" Submodule.IsPrincipal (Ideal.span {x, y})",
" (∀ (x y : R), Submodule.IsPrincipal (Ideal.span {x, y})) → IsBezout R",
" IsBezout R",
" ∀ (I : Ideal R), I.FG → S... |
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.LinearAlgebra.Finsupp
import Mathlib.LinearAlgebra.Prod
import Mathlib.SetTheory.Cardinal.Basic
import Mathlib.Tactic.FinCases
import Mathlib.Tactic.LinearCombination
import Mathlib.Lean.Expr.ExtraRecognizers
import Mathlib.Data.Set.Subsingleton
#align_import lin... | Mathlib/LinearAlgebra/LinearIndependent.lean | 167 | 171 | theorem not_linearIndependent_iff :
¬LinearIndependent R v ↔
∃ s : Finset ι, ∃ g : ι → R, ∑ i ∈ s, g i • v i = 0 ∧ ∃ i ∈ s, g i ≠ 0 := by |
rw [linearIndependent_iff']
simp only [exists_prop, not_forall]
| [
" LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0",
" (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0",
" g i = (Finsupp.lapply i) (Finsupp.single i (g i))",
" (Finsupp.lapply i) (Finsupp.single j (g j)) = 0",
" LinearIndependent R v ↔ ∀ (s : Finset ι) (g : ι → R)... | [
" LinearIndependent R v ↔ ∀ (l : ι →₀ R), (Finsupp.total ι M R v) l = 0 → l = 0",
" (Finsupp.total ι M R v) (∑ i ∈ s, Finsupp.single i (g i)) = 0",
" g i = (Finsupp.lapply i) (Finsupp.single i (g i))",
" (Finsupp.lapply i) (Finsupp.single j (g j)) = 0",
" LinearIndependent R v ↔ ∀ (s : Finset ι) (g : ι → R)... |
import Mathlib.Topology.Order.LeftRight
import Mathlib.Topology.Order.Monotone
#align_import topology.algebra.order.left_right_lim from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977"
open Set Filter
open Topology
section
variable {α β : Type*} [LinearOrder α] [TopologicalSpace β]
n... | Mathlib/Topology/Order/LeftRightLim.lean | 110 | 122 | theorem leftLim_le (h : x ≤ y) : leftLim f x ≤ f y := by |
letI : TopologicalSpace α := Preorder.topology α
haveI : OrderTopology α := ⟨rfl⟩
rcases eq_or_ne (𝓝[<] x) ⊥ with (h' | h')
· simpa [leftLim, h'] using hf h
haveI A : NeBot (𝓝[<] x) := neBot_iff.2 h'
rw [leftLim_eq_sSup hf h']
refine csSup_le ?_ ?_
· simp only [image_nonempty]
exact (forall_mem_n... | [
" β",
" leftLim f a = y",
" limUnder (𝓝[<] a) f = y",
" leftLim f a = f a",
" leftLim f x ≤ f y",
" sSup (f '' Iio x) ≤ f y",
" (f '' Iio x).Nonempty",
" (Iio x).Nonempty",
" ∀ b ∈ f '' Iio x, b ≤ f y",
" ∀ a < x, f a ≤ f y",
" f z ≤ f y"
] | [
" β",
" leftLim f a = y",
" limUnder (𝓝[<] a) f = y",
" leftLim f a = f a"
] |
import Mathlib.Analysis.SpecialFunctions.Pow.Real
#align_import analysis.special_functions.log.monotone from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
open Set Filter Function
open Topology
noncomputable section
namespace Real
variable {x y : ℝ}
theorem log_mul_self_monotoneOn... | Mathlib/Analysis/SpecialFunctions/Log/Monotone.lean | 41 | 53 | theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | exp 1 ≤ x } := by |
simp only [AntitoneOn, mem_setOf_eq]
intro x hex y hey hxy
have x_pos : 0 < x := (exp_pos 1).trans_le hex
have y_pos : 0 < y := (exp_pos 1).trans_le hey
have hlogx : 1 ≤ log x := by rwa [le_log_iff_exp_le x_pos]
have hyx : 0 ≤ y / x - 1 := by rwa [le_sub_iff_add_le, le_div_iff x_pos, zero_add, one_mul]
r... | [
" MonotoneOn (fun x => x.log * x) {x | 1 ≤ x}",
" ∀ ⦃a : ℝ⦄, 1 ≤ a → ∀ ⦃b : ℝ⦄, 1 ≤ b → a ≤ b → a.log * a ≤ b.log * b",
" x.log * x ≤ y.log * y",
" 0 ≤ y.log",
" AntitoneOn (fun x => x.log / x) {x | rexp 1 ≤ x}",
" ∀ ⦃a : ℝ⦄, rexp 1 ≤ a → ∀ ⦃b : ℝ⦄, rexp 1 ≤ b → a ≤ b → b.log / b ≤ a.log / a",
" y.log /... | [
" MonotoneOn (fun x => x.log * x) {x | 1 ≤ x}",
" ∀ ⦃a : ℝ⦄, 1 ≤ a → ∀ ⦃b : ℝ⦄, 1 ≤ b → a ≤ b → a.log * a ≤ b.log * b",
" x.log * x ≤ y.log * y",
" 0 ≤ y.log"
] |
import Mathlib.Tactic.ApplyFun
import Mathlib.Topology.UniformSpace.Basic
import Mathlib.Topology.Separation
#align_import topology.uniform_space.separation from "leanprover-community/mathlib"@"0c1f285a9f6e608ae2bdffa3f993eafb01eba829"
open Filter Set Function Topology Uniformity UniformSpace
open scoped Classical... | Mathlib/Topology/UniformSpace/Separation.lean | 160 | 163 | theorem t0Space_iff_ker_uniformity : T0Space α ↔ (𝓤 α).ker = diagonal α := by |
simp_rw [t0Space_iff_uniformity, subset_antisymm_iff, diagonal_subset_iff, subset_def,
Prod.forall, Filter.mem_ker, mem_diagonal_iff, iff_self_and]
exact fun _ x s hs ↦ refl_mem_uniformity hs
| [
" 𝓝 (x, y) ≤ 𝓤 α",
" 𝓝 (y, y) ≤ 𝓤 α",
" Inseparable x y ↔ ClusterPt (x, y) (𝓤 α)",
" Inseparable x y",
" ∀ (i : Set (α × α)), (i ∈ 𝓤 α ∧ ∀ (a : α × α), ClusterPt a (𝓟 i) → a ∈ i) → (x, y) ∈ id i",
" T0Space α ↔ ∀ (x y : α), (∀ r ∈ 𝓤 α, (x, y) ∈ r) → x = y",
" T0Space α ↔ Pairwise fun x y => ∃ r ... | [
" 𝓝 (x, y) ≤ 𝓤 α",
" 𝓝 (y, y) ≤ 𝓤 α",
" Inseparable x y ↔ ClusterPt (x, y) (𝓤 α)",
" Inseparable x y",
" ∀ (i : Set (α × α)), (i ∈ 𝓤 α ∧ ∀ (a : α × α), ClusterPt a (𝓟 i) → a ∈ i) → (x, y) ∈ id i",
" T0Space α ↔ ∀ (x y : α), (∀ r ∈ 𝓤 α, (x, y) ∈ r) → x = y",
" T0Space α ↔ Pairwise fun x y => ∃ r ... |
import Mathlib.Analysis.Calculus.ContDiff.Bounds
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.LocallyConvex.WithSeminorms
import Mathlib.Analysis.Normed.Group.ZeroAtInfty
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Ana... | Mathlib/Analysis/Distribution/SchwartzSpace.lean | 103 | 106 | theorem decay (f : 𝓢(E, F)) (k n : ℕ) :
∃ C : ℝ, 0 < C ∧ ∀ x, ‖x‖ ^ k * ‖iteratedFDeriv ℝ n f x‖ ≤ C := by |
rcases f.decay' k n with ⟨C, hC⟩
exact ⟨max C 1, by positivity, fun x => (hC x).trans (le_max_left _ _)⟩
| [
" f = g",
" { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g",
" { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }",
" ∃ C, 0 < C ∧ ∀ (x : E), ‖x‖ ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ C",
" 0 < max C 1"
] | [
" f = g",
" { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ } = g",
" { toFun := toFun✝¹, smooth' := smooth'✝¹, decay' := decay'✝¹ } =\n { toFun := toFun✝, smooth' := smooth'✝, decay' := decay'✝ }"
] |
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.Calculus.FDeriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Basic
open Topology InnerProductSpace Set
noncomputable section
variable {𝕜 F : Type*} [RCLike 𝕜]
variable [NormedAddCommGroup F] [InnerProductSpace 𝕜 F] [CompleteSpace F]
variabl... | Mathlib/Analysis/Calculus/Gradient/Basic.lean | 156 | 160 | theorem HasGradientAtFilter.hasDerivAtFilter (h : HasGradientAtFilter g g' u L') :
HasDerivAtFilter g (starRingEnd 𝕜 g') u L' := by |
have : ContinuousLinearMap.smulRight (1 : 𝕜 →L[𝕜] 𝕜) (starRingEnd 𝕜 g') = (toDual 𝕜 𝕜) g' := by
ext; simp
rwa [HasDerivAtFilter, this]
| [
" HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x",
" HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x",
" ∇ f x = 0",
" HasGradientAt f (∇ f x) x",
" HasFDerivAt f (fderiv 𝕜 f x) x",
" HasGradientWithinAt f (gradientWithin f s x) s x",
"... | [
" HasFDerivWithinAt f frechet s x ↔ HasGradientWithinAt f ((toDual 𝕜 F).symm frechet) s x",
" HasFDerivAt f frechet x ↔ HasGradientAt f ((toDual 𝕜 F).symm frechet) x",
" ∇ f x = 0",
" HasGradientAt f (∇ f x) x",
" HasFDerivAt f (fderiv 𝕜 f x) x",
" HasGradientWithinAt f (gradientWithin f s x) s x",
"... |
import Mathlib.Analysis.SpecialFunctions.Integrals
import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
import Mathlib.MeasureTheory.Integral.Layercake
#align_import analysis.special_functions.japanese_bracket from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
noncomputable section
op... | Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean | 41 | 46 | theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) :
(1 : ℝ) + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2) := by |
rw [← sqrt_mul zero_le_two]
have := sq_nonneg (‖x‖ - 1)
apply le_sqrt_of_sq_le
linarith
| [
" √(1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖",
" 0 ≤ 1 + ‖x‖",
" 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2",
" 1 + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)",
" 1 + ‖x‖ ≤ √(2 * (1 + ‖x‖ ^ 2))",
" (1 + ‖x‖) ^ 2 ≤ 2 * (1 + ‖x‖ ^ 2)"
] | [
" √(1 + ‖x‖ ^ 2) ≤ 1 + ‖x‖",
" 0 ≤ 1 + ‖x‖",
" 1 + ‖x‖ ^ 2 ≤ (1 + ‖x‖) ^ 2"
] |
import Mathlib.Data.Nat.Defs
import Mathlib.Order.Interval.Set.Basic
import Mathlib.Tactic.Monotonicity.Attr
#align_import data.nat.log from "leanprover-community/mathlib"@"3e00d81bdcbf77c8188bbd18f5524ddc3ed8cac6"
namespace Nat
--@[pp_nodot] porting note: unknown attribute
def log (b : ℕ) : ℕ → ℕ
| n => i... | Mathlib/Data/Nat/Log.lean | 64 | 66 | theorem log_of_one_lt_of_le {b n : ℕ} (h : 1 < b) (hn : b ≤ n) : log b n = log b (n / b) + 1 := by |
rw [log]
exact if_pos ⟨hn, h⟩
| [
" (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 (n / b) a✝",
" b.log n = 0 ↔ n < b ∨ b ≤ 1",
" (∀ (h : b ≤ n ∧ 1 < b), b.log (n / b) + 1 = 0) ↔ n < b ∨ b ≤ 1",
" 0 < b.log n ↔ b ≤ n ∧ 1 < b",
" b.log n = b.log (n / b) + 1",
" (if h : b ≤ n ∧ 1 < b then b.log (n / b) + 1 else 0) = b.log (n / b)... | [
" (invImage (fun x => x) instWellFoundedRelationOfSizeOf).1 (n / b) a✝",
" b.log n = 0 ↔ n < b ∨ b ≤ 1",
" (∀ (h : b ≤ n ∧ 1 < b), b.log (n / b) + 1 = 0) ↔ n < b ∨ b ≤ 1",
" 0 < b.log n ↔ b ≤ n ∧ 1 < b"
] |
import Mathlib.Analysis.NormedSpace.Units
import Mathlib.Algebra.Algebra.Spectrum
import Mathlib.Topology.ContinuousFunction.Algebra
#align_import topology.continuous_function.units from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
variable {X M R 𝕜 : Type*} [TopologicalSpace X]
nam... | Mathlib/Topology/ContinuousFunction/Units.lean | 70 | 79 | theorem continuous_isUnit_unit {f : C(X, R)} (h : ∀ x, IsUnit (f x)) :
Continuous fun x => (h x).unit := by |
refine
continuous_induced_rng.2
(Continuous.prod_mk f.continuous
(MulOpposite.continuous_op.comp (continuous_iff_continuousAt.mpr fun x => ?_)))
have := NormedRing.inverse_continuousAt (h x).unit
simp only
simp only [← Ring.inverse_unit, IsUnit.unit_spec] at this ⊢
exact this.comp (f.contin... | [
" Continuous fun x => ⋯.unit",
" ContinuousAt (fun x => ↑((fun x => ⋯.unit) x)⁻¹) x",
" ContinuousAt (fun x => ↑⋯.unit⁻¹) x",
" ContinuousAt (fun x => Ring.inverse (f x)) x"
] | [] |
import Mathlib.FieldTheory.Normal
import Mathlib.FieldTheory.Perfect
import Mathlib.RingTheory.Localization.Integral
#align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
universe u v w
open scoped Classical Polynomial
open Polynomial
vari... | Mathlib/FieldTheory/IsAlgClosed/Basic.lean | 99 | 101 | theorem exists_eq_mul_self [IsAlgClosed k] (x : k) : ∃ z, x = z * z := by |
rcases exists_pow_nat_eq x zero_lt_two with ⟨z, rfl⟩
exact ⟨z, sq z⟩
| [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x",
" ∃ z, x = z * z",
" ∃ z_1, z ^ 2 = z_1 * z_1"
] | [
" Splits f p",
" Splits f p ↔ Splits (RingHom.id k) (map f p)",
" ∃ z, z ^ n = x",
" (X ^ n - C x).degree ≠ 0",
" ↑n ≠ 0",
" z ^ n = x"
] |
import Mathlib.Data.Matrix.Notation
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.Fin.Tuple.Reflection
#align_import data.matrix.reflection from "leanprover-community/mathlib"@"820b22968a2bc4a47ce5cf1d2f36a9ebe52510aa"
open Matrix
namespace Matrix
variable {l m n : ℕ} {α β : Type*}
def Forall : ∀ {m n}... | Mathlib/Data/Matrix/Reflection.lean | 185 | 188 | theorem mulVecᵣ_eq [NonUnitalNonAssocSemiring α] (A : Matrix (Fin l) (Fin m) α) (v : Fin m → α) :
mulVecᵣ A v = A *ᵥ v := by |
simp [mulVecᵣ, Function.comp]
rfl
| [
" Forall P ↔ ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x",
" (∀ (x : Fin n → α) (x_1 : Matrix (Fin m) (Fin n) α), P (of (vecCons x x_1))) ↔\n ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x",
" Exists P ↔ ∃ x, P x",
" (∃ r A, P (of (vecCons r A))) ↔ ∃ x, P x",
" A.transposeᵣ i j = Aᵀ i j",
" of (vecCons (F... | [
" Forall P ↔ ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x",
" (∀ (x : Fin n → α) (x_1 : Matrix (Fin m) (Fin n) α), P (of (vecCons x x_1))) ↔\n ∀ (x : Matrix (Fin (m + 1)) (Fin n) α), P x",
" Exists P ↔ ∃ x, P x",
" (∃ r A, P (of (vecCons r A))) ↔ ∃ x, P x",
" A.transposeᵣ i j = Aᵀ i j",
" of (vecCons (F... |
import Mathlib.Topology.UniformSpace.Cauchy
import Mathlib.Topology.UniformSpace.Separation
import Mathlib.Topology.DenseEmbedding
#align_import topology.uniform_space.uniform_embedding from "leanprover-community/mathlib"@"195fcd60ff2bfe392543bceb0ec2adcdb472db4c"
open Filter Function Set Uniformity Topology
sec... | Mathlib/Topology/UniformSpace/UniformEmbedding.lean | 76 | 80 | theorem UniformInducing.of_comp_iff {g : β → γ} (hg : UniformInducing g) {f : α → β} :
UniformInducing (g ∘ f) ↔ UniformInducing f := by |
refine ⟨fun h ↦ ?_, hg.comp⟩
rw [uniformInducing_iff, ← hg.comap_uniformity, comap_comap, ← h.comap_uniformity,
Function.comp, Function.comp]
| [
" UniformInducing f ↔ UniformSpace.comap f inst✝¹ = inst✝²",
" (∀ (s : Set (α × α)), s ∈ comap (fun x => (f x.1, f x.2)) (𝓤 β) ↔ s ∈ 𝓤 α) ↔ ∀ (s : Set (α × α)), s ∈ 𝓤 α ↔ s ∈ 𝓤 α",
" UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α",
" 𝓤 α ≤ comap (fun x => (f x.1, f x.2)) (𝓤... | [
" UniformInducing f ↔ UniformSpace.comap f inst✝¹ = inst✝²",
" (∀ (s : Set (α × α)), s ∈ comap (fun x => (f x.1, f x.2)) (𝓤 β) ↔ s ∈ 𝓤 α) ↔ ∀ (s : Set (α × α)), s ∈ 𝓤 α ↔ s ∈ 𝓤 α",
" UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α",
" 𝓤 α ≤ comap (fun x => (f x.1, f x.2)) (𝓤... |
import Mathlib.Algebra.Algebra.Hom
import Mathlib.RingTheory.Ideal.Quotient
#align_import algebra.ring_quot from "leanprover-community/mathlib"@"e5820f6c8fcf1b75bcd7738ae4da1c5896191f72"
universe uR uS uT uA u₄
variable {R : Type uR} [Semiring R]
variable {S : Type uS} [CommSemiring S]
variable {T : Type uT}
vari... | Mathlib/Algebra/RingQuot.lean | 62 | 64 | theorem Rel.add_right {r : R → R → Prop} ⦃a b c : R⦄ (h : Rel r b c) : Rel r (a + b) (a + c) := by |
rw [add_comm a b, add_comm a c]
exact Rel.add_left h
| [
" Rel r (a + b) (a + c)",
" Rel r (b + a) (c + a)"
] | [] |
import Mathlib.Data.Multiset.FinsetOps
import Mathlib.Data.Multiset.Fold
#align_import data.multiset.lattice from "leanprover-community/mathlib"@"65a1391a0106c9204fe45bc73a039f056558cb83"
namespace Multiset
variable {α : Type*}
section Sup
-- can be defined with just `[Bot α]` where some lemmas hold without... | Mathlib/Data/Multiset/Lattice.lean | 89 | 90 | theorem sup_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).sup = a ⊔ s.sup := by |
rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_cons]; simp
| [
" (s₁ + s₂).sup = fold (fun x x_1 => x ⊔ x_1) (⊥ ⊔ ⊥) (s₁ + s₂)",
" sup 0 ≤ a ↔ ∀ b ∈ 0, b ≤ a",
" ∀ (a_1 : α) (s : Multiset α), (s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a) → ((a_1 ::ₘ s).sup ≤ a ↔ ∀ b ∈ a_1 ::ₘ s, b ≤ a)",
" (s₁.ndunion s₂).sup = s₁.sup ⊔ s₂.sup",
" ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂",
" (s₁ ∪ ... | [
" (s₁ + s₂).sup = fold (fun x x_1 => x ⊔ x_1) (⊥ ⊔ ⊥) (s₁ + s₂)",
" sup 0 ≤ a ↔ ∀ b ∈ 0, b ≤ a",
" ∀ (a_1 : α) (s : Multiset α), (s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a) → ((a_1 ::ₘ s).sup ≤ a ↔ ∀ b ∈ a_1 ::ₘ s, b ≤ a)",
" (s₁.ndunion s₂).sup = s₁.sup ⊔ s₂.sup",
" ∀ (a : α), a ∈ s₁.ndunion s₂ ↔ a ∈ s₁ + s₂",
" (s₁ ∪ ... |
import Mathlib.Data.Set.Basic
#align_import data.bundle from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
open Function Set
namespace Bundle
variable {B F : Type*} (E : B → Type*)
@[ext]
structure TotalSpace (F : Type*) (E : B → Type*) where
proj : B
snd : E proj
#align bund... | Mathlib/Data/Bundle.lean | 69 | 70 | theorem TotalSpace.mk_cast {x x' : B} (h : x = x') (b : E x) :
.mk' F x' (cast (congr_arg E h) b) = TotalSpace.mk x b := by | subst h; rfl
| [
" mk' F x' (cast ⋯ b) = { proj := x, snd := b }",
" mk' F x (cast ⋯ b) = { proj := x, snd := b }"
] | [] |
import Mathlib.Data.PFunctor.Multivariate.W
import Mathlib.Data.QPF.Multivariate.Basic
#align_import data.qpf.multivariate.constructions.fix from "leanprover-community/mathlib"@"28aa996fc6fb4317f0083c4e6daf79878d81be33"
universe u v
namespace MvQPF
open TypeVec
open MvFunctor (LiftP LiftR)
open MvFunctor
var... | Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean | 92 | 104 | theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
WEquiv x y → recF u x = recF u y := by |
apply q.P.w_cases _ x
intro a₀ f'₀ f₀
apply q.P.w_cases _ y
intro a₁ f'₁ f₁
intro h
-- Porting note: induction on h doesn't work.
refine @WEquiv.recOn _ _ _ _ _ (fun a a' _ ↦ recF u a = recF u a') _ _ h ?_ ?_ ?_
· intros a f' f₀ f₁ _h ih; simp only [recF_eq, Function.comp]
congr; funext; congr; fun... | [
" recF g ((P F).wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)",
" g (abs ⟨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) (f i)⟩) =\n g (abs ⟨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) ∘ f)⟩)",
" recF g x = g (abs ((TypeVec.id ::: r... | [
" recF g ((P F).wMk a f' f) = g (abs ⟨a, splitFun f' (recF g ∘ f)⟩)",
" g (abs ⟨a, splitFun f' fun i => (P F).wRec (fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) (f i)⟩) =\n g (abs ⟨a, splitFun f' (((P F).wRec fun a f' _f rec => g (abs ⟨a, splitFun f' rec⟩)) ∘ f)⟩)",
" recF g x = g (abs ((TypeVec.id ::: r... |
import Mathlib.NumberTheory.Liouville.Basic
import Mathlib.Topology.Baire.Lemmas
import Mathlib.Topology.Baire.LocallyCompactRegular
import Mathlib.Topology.Instances.Irrational
#align_import number_theory.liouville.residual from "leanprover-community/mathlib"@"32b08ef840dd25ca2e47e035c5da03ce16d2dc3c"
open scope... | Mathlib/NumberTheory/Liouville/Residual.lean | 34 | 38 | theorem IsGδ.setOf_liouville : IsGδ { x | Liouville x } := by |
rw [setOf_liouville_eq_iInter_iUnion]
refine .iInter fun n => IsOpen.isGδ ?_
refine isOpen_iUnion fun a => isOpen_iUnion fun b => isOpen_iUnion fun _hb => ?_
exact isOpen_ball.inter isClosed_singleton.isOpen_compl
| [
" {x | Liouville x} = ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}",
" x ∈ {x | Liouville x} ↔ x ∈ ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}",
" IsGδ {x | Liouville x}",
" IsGδ (⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b})",
"... | [
" {x | Liouville x} = ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}",
" x ∈ {x | Liouville x} ↔ x ∈ ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n) \\ {↑a / ↑b}"
] |
import Mathlib.Data.List.Nodup
#align_import data.list.duplicate from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
variable {α : Type*}
namespace List
inductive Duplicate (x : α) : List α → Prop
| cons_mem {l : List α} : x ∈ l → Duplicate x (x :: l)
| cons_duplicate {y : α} {l ... | Mathlib/Data/List/Duplicate.lean | 129 | 130 | theorem nodup_iff_forall_not_duplicate : Nodup l ↔ ∀ x : α, ¬x ∈+ l := by |
simp_rw [nodup_iff_sublist, duplicate_iff_sublist]
| [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'",
" l ≠ [y]",
" x :: l' ≠ [y]",
" z :: l' ≠ [y]",
" x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l",
" y = x ∧ x ∈ l ∨ x ∈+ l",
" x = x ∧ x ∈ l ∨ x ∈+ l",
" x ∈+ y :: l",
" x ∈+ x :: l",
" x ∈+ l",
" x ∈+ y :: l ↔ x ∈+ l",
" x ∈+ l'",
" x ∈+ []",
" x ∈+ y ... | [
" x ∈ l",
" x ∈ x :: l'",
" x ∈ y :: l'",
" l ≠ [y]",
" x :: l' ≠ [y]",
" z :: l' ≠ [y]",
" x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l",
" y = x ∧ x ∈ l ∨ x ∈+ l",
" x = x ∧ x ∈ l ∨ x ∈+ l",
" x ∈+ y :: l",
" x ∈+ x :: l",
" x ∈+ l",
" x ∈+ y :: l ↔ x ∈+ l",
" x ∈+ l'",
" x ∈+ []",
" x ∈+ y ... |
import Mathlib.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Geometry.Euclidean.Angle.Oriented.Basic
#align_import geometry.euclidean.angle.oriented.rotation from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
noncomputable section
open FiniteDimensional Complex
open scoped ... | Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean | 134 | 135 | theorem rotation_symm (θ : Real.Angle) : (o.rotation θ).symm = o.rotation (-θ) := by |
ext; simp [o.rotation_apply, o.rotation_symm_apply, sub_eq_add_neg]
| [
" ∀ (x y : V),\n ⟪(θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) x,\n (θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) y⟫_ℝ =\n ⟪x, y⟫_ℝ",
" ⟪(θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) x,\n (θ.cos • LinearMap.id + θ.sin • ↑o.r... | [
" ∀ (x y : V),\n ⟪(θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) x,\n (θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) y⟫_ℝ =\n ⟪x, y⟫_ℝ",
" ⟪(θ.cos • LinearMap.id + θ.sin • ↑o.rightAngleRotation.toLinearEquiv) x,\n (θ.cos • LinearMap.id + θ.sin • ↑o.r... |
import Mathlib.Computability.Halting
import Mathlib.Computability.TuringMachine
import Mathlib.Data.Num.Lemmas
import Mathlib.Tactic.DeriveFintype
#align_import computability.tm_to_partrec from "leanprover-community/mathlib"@"6155d4351090a6fad236e3d2e4e0e4e7342668e8"
open Function (update)
open Relation
namespa... | Mathlib/Computability/TMToPartrec.lean | 174 | 174 | theorem nil_eval (v) : nil.eval v = pure [] := by | simp [nil]
| [
" zero'.eval = fun v => pure (0 :: v)",
" succ.eval = fun v => pure [v.headI.succ]",
" tail.eval = fun v => pure v.tail",
" (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)",
" (f.comp g).eval = fun v => g.eval v >>= f.eval",
" (f.case g).eval = fun v ... | [
" zero'.eval = fun v => pure (0 :: v)",
" succ.eval = fun v => pure [v.headI.succ]",
" tail.eval = fun v => pure v.tail",
" (f.cons fs).eval = fun v => do\n let n ← f.eval v\n let ns ← fs.eval v\n pure (n.headI :: ns)",
" (f.comp g).eval = fun v => g.eval v >>= f.eval",
" (f.case g).eval = fun v ... |
import Mathlib.MeasureTheory.Measure.Typeclasses
open scoped ENNReal
namespace MeasureTheory
variable {α : Type*}
noncomputable
def Measure.trim {m m0 : MeasurableSpace α} (μ : @Measure α m0) (hm : m ≤ m0) : @Measure α m :=
@OuterMeasure.toMeasure α m μ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory... | Mathlib/MeasureTheory/Measure/Trim.lean | 43 | 45 | theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (μ : Measure α) (hm : m ≤ m0) :
@Measure.toOuterMeasure _ m (μ.trim hm) = @OuterMeasure.trim _ m μ.toOuterMeasure := by |
rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)]
| [
" μ.trim ⋯ = μ",
" (μ.trim hm).toOuterMeasure = μ.trim"
] | [
" μ.trim ⋯ = μ"
] |
import Mathlib.MeasureTheory.Function.ConditionalExpectation.Indicator
import Mathlib.MeasureTheory.Function.UniformIntegrable
import Mathlib.MeasureTheory.Decomposition.RadonNikodym
#align_import measure_theory.function.conditional_expectation.real from "leanprover-community/mathlib"@"b2ff9a3d7a15fd5b0f060b135421d6a... | Mathlib/MeasureTheory/Function/ConditionalExpectation/Real.lean | 116 | 138 | theorem setIntegral_abs_condexp_le {s : Set α} (hs : MeasurableSet[m] s) (f : α → ℝ) :
∫ x in s, |(μ[f|m]) x| ∂μ ≤ ∫ x in s, |f x| ∂μ := by |
by_cases hnm : m ≤ m0
swap
· simp_rw [condexp_of_not_le hnm, Pi.zero_apply, abs_zero, integral_zero]
positivity
by_cases hfint : Integrable f μ
swap
· simp only [condexp_undef hfint, Pi.zero_apply, abs_zero, integral_const, Algebra.id.smul_eq_mul,
mul_zero]
positivity
have : ∫ x in s, |(μ[f... | [
" SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm) =ᶠ[ae μ] μ[f|m]",
" ∀ (s : Set α),\n MeasurableSet s → μ s < ⊤ → IntegrableOn (SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm)) s μ",
" ∀ (s : Set α),\n MeasurableSet s →\n μ s < ⊤ →\n ∫ (x : α) in s, SignedMeasure... | [
" SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm) =ᶠ[ae μ] μ[f|m]",
" ∀ (s : Set α),\n MeasurableSet s → μ s < ⊤ → IntegrableOn (SignedMeasure.rnDeriv ((μ.withDensityᵥ f).trim hm) (μ.trim hm)) s μ",
" ∀ (s : Set α),\n MeasurableSet s →\n μ s < ⊤ →\n ∫ (x : α) in s, SignedMeasure... |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open Function Set Filter
open scoped Topology Filter
variable... | Mathlib/Analysis/Calculus/BumpFunction/Basic.lean | 179 | 180 | theorem tsupport_eq : tsupport f = closedBall c f.rOut := by |
simp_rw [tsupport, f.support_eq, closure_ball _ f.rOut_pos.ne']
| [
" 1 < f.rOut / f.rIn",
" f.rIn < f.rOut",
" ↑f (c - x) = ↑f (c + x)",
" ↑f (-x) = ↑f x",
" ↑f x = 1",
" ‖(fun x => f.rIn⁻¹ • (x - c)) x‖ ≤ 1",
" support ↑f = ball c f.rOut",
" (fun x => f.rIn⁻¹ • (x - c)) ⁻¹' ball 0 (f.rOut / f.rIn) = ball c f.rOut",
" x ∈ (fun x => f.rIn⁻¹ • (x - c)) ⁻¹' ball 0 (f.... | [
" 1 < f.rOut / f.rIn",
" f.rIn < f.rOut",
" ↑f (c - x) = ↑f (c + x)",
" ↑f (-x) = ↑f x",
" ↑f x = 1",
" ‖(fun x => f.rIn⁻¹ • (x - c)) x‖ ≤ 1",
" support ↑f = ball c f.rOut",
" (fun x => f.rIn⁻¹ • (x - c)) ⁻¹' ball 0 (f.rOut / f.rIn) = ball c f.rOut",
" x ∈ (fun x => f.rIn⁻¹ • (x - c)) ⁻¹' ball 0 (f.... |
import Mathlib.Data.Set.Equitable
import Mathlib.Logic.Equiv.Fin
import Mathlib.Order.Partition.Finpartition
#align_import order.partition.equipartition from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
open Finset Fintype
namespace Finpartition
variable {α : Type*} [DecidableEq α] ... | Mathlib/Order/Partition/Equipartition.lean | 74 | 77 | theorem IsEquipartition.card_part_le_average_add_one (hP : P.IsEquipartition) (ht : t ∈ P.parts) :
t.card ≤ s.card / P.parts.card + 1 := by |
rw [← P.sum_card_parts]
exact Finset.EquitableOn.le_add_one hP ht
| [
" P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1",
" t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1",
" ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)",
" False",
" s.card / P.parts.card ≤ t.card",
" (∑ i ... | [
" P.IsEquipartition ↔ ∀ a ∈ P.parts, a.card = s.card / P.parts.card ∨ a.card = s.card / P.parts.card + 1",
" t.card = s.card / P.parts.card ↔ t.card ≠ s.card / P.parts.card + 1",
" ¬(t.card = s.card / P.parts.card ∧ t.card = s.card / P.parts.card + 1)",
" False",
" s.card / P.parts.card ≤ t.card",
" (∑ i ... |
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.integral.average from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520"
open ENNReal MeasureTheory MeasureTheory.Measure Metric Set Filter TopologicalSpace Function
open scoped Topology ENNReal Convex
variable... | Mathlib/MeasureTheory/Integral/Average.lean | 153 | 155 | theorem setLaverage_congr_fun (hs : MeasurableSet s) (h : ∀ᵐ x ∂μ, x ∈ s → f x = g x) :
⨍⁻ x in s, f x ∂μ = ⨍⁻ x in s, g x ∂μ := by |
simp only [laverage_eq, set_lintegral_congr_fun hs h]
| [
" ⨍⁻ (_x : α), 0 ∂μ = 0",
" ⨍⁻ (x : α), f x ∂0 = 0",
" ⨍⁻ (x : α), f x ∂μ = (∫⁻ (x : α), f x ∂μ) / μ univ",
" ⨍⁻ (x : α), f x ∂μ = ∫⁻ (x : α), f x ∂μ",
" μ univ * ⨍⁻ (x : α), f x ∂μ = ∫⁻ (x : α), f x ∂μ",
" ⨍⁻ (x : α) in s, f x ∂μ = (∫⁻ (x : α) in s, f x ∂μ) / μ s",
" ⨍⁻ (x : α) in s, f x ∂μ = ∫⁻ (x : α... | [
" ⨍⁻ (_x : α), 0 ∂μ = 0",
" ⨍⁻ (x : α), f x ∂0 = 0",
" ⨍⁻ (x : α), f x ∂μ = (∫⁻ (x : α), f x ∂μ) / μ univ",
" ⨍⁻ (x : α), f x ∂μ = ∫⁻ (x : α), f x ∂μ",
" μ univ * ⨍⁻ (x : α), f x ∂μ = ∫⁻ (x : α), f x ∂μ",
" ⨍⁻ (x : α) in s, f x ∂μ = (∫⁻ (x : α) in s, f x ∂μ) / μ s",
" ⨍⁻ (x : α) in s, f x ∂μ = ∫⁻ (x : α... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.