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.Algebra.Homology.ImageToKernel import Mathlib.Algebra.Homology.HomologicalComplex import Mathlib.CategoryTheory.GradedObject #align_import algebra.homology.homology from "leanprover-community/mathlib"@"618ea3d5c99240cd7000d8376924906a148bf9ff" universe v u open CategoryTheory CategoryTheory.Limits...
Mathlib/Algebra/Homology/Homology.lean
68
71
theorem cycles_eq_top {i} (h : ¬c.Rel i (c.next i)) : C.cycles' i = ⊤ := by
rw [eq_top_iff] apply le_kernelSubobject rw [C.dFrom_eq_zero h, comp_zero]
[ " C.cycles' i = ⊤", " ⊤ ≤ C.cycles' i", " ⊤.arrow ≫ C.dFrom i = 0" ]
[]
import Mathlib.Analysis.Calculus.LocalExtr.Basic import Mathlib.Topology.Algebra.Order.Rolle #align_import analysis.calculus.local_extr from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" open Set Filter Topology variable {f f' : ℝ → ℝ} {a b l : ℝ} theorem exists_hasDerivAt_eq_zero (h...
Mathlib/Analysis/Calculus/LocalExtr/Rolle.lean
78
84
theorem exists_deriv_eq_zero' (hab : a < b) (hfa : Tendsto f (𝓝[>] a) (𝓝 l)) (hfb : Tendsto f (𝓝[<] b) (𝓝 l)) : ∃ c ∈ Ioo a b, deriv f c = 0 := by
by_cases h : ∀ x ∈ Ioo a b, DifferentiableAt ℝ f x · exact exists_hasDerivAt_eq_zero' hab hfa hfb fun x hx => (h x hx).hasDerivAt · obtain ⟨c, hc, hcdiff⟩ : ∃ x ∈ Ioo a b, ¬DifferentiableAt ℝ f x := by push_neg at h; exact h exact ⟨c, hc, deriv_zero_of_not_differentiableAt hcdiff⟩
[ " ∃ c ∈ Ioo a b, deriv f c = 0", " ∃ x ∈ Ioo a b, ¬DifferentiableAt ℝ f x" ]
[]
import Mathlib.Algebra.BigOperators.Finsupp import Mathlib.Algebra.BigOperators.Finprod import Mathlib.Data.Fintype.BigOperators import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.LinearIndependent import Mathlib.SetTheory.Cardinal.Cofinality #align_import linear_algebra.basis from "leanprover-communit...
Mathlib/LinearAlgebra/Basis.lean
137
141
theorem repr_symm_single : b.repr.symm (Finsupp.single i c) = c • b i := calc b.repr.symm (Finsupp.single i c) = b.repr.symm (c • Finsupp.single i (1 : R)) := by
{ rw [Finsupp.smul_single', mul_one] } _ = c • b i := by rw [LinearEquiv.map_smul, repr_symm_single_one]
[ " { repr := b } = default", " f = g", " { repr := repr✝ } = g", " { repr := repr✝¹ } = { repr := repr✝ }", " ↑f.repr.symm = ↑g.repr.symm", " (↑f.repr.symm ∘ₗ Finsupp.lsingle a✝) 1 = (↑g.repr.symm ∘ₗ Finsupp.lsingle a✝) 1", " b.repr.symm (Finsupp.single i c) = b.repr.symm (c • Finsupp.single i 1)", " b...
[ " { repr := b } = default", " f = g", " { repr := repr✝ } = g", " { repr := repr✝¹ } = { repr := repr✝ }", " ↑f.repr.symm = ↑g.repr.symm", " (↑f.repr.symm ∘ₗ Finsupp.lsingle a✝) 1 = (↑g.repr.symm ∘ₗ Finsupp.lsingle a✝) 1" ]
import Mathlib.Topology.Instances.ENNReal import Mathlib.MeasureTheory.Measure.Dirac #align_import probability.probability_mass_function.basic from "leanprover-community/mathlib"@"4ac69b290818724c159de091daa3acd31da0ee6d" noncomputable section variable {α β γ : Type*} open scoped Classical open NNReal ENNReal M...
Mathlib/Probability/ProbabilityMassFunction/Basic.lean
107
108
theorem apply_eq_zero_iff (p : PMF α) (a : α) : p a = 0 ↔ a ∉ p.support := by
rw [mem_support_iff, Classical.not_not]
[ " p a = 0 ↔ a ∉ p.support" ]
[]
import Mathlib.Tactic.Qify import Mathlib.Data.ZMod.Basic import Mathlib.NumberTheory.DiophantineApproximation import Mathlib.NumberTheory.Zsqrtd.Basic #align_import number_theory.pell from "leanprover-community/mathlib"@"7ad820c4997738e2f542f8a20f32911f52020e26" namespace Pell open Zsqrtd theorem is_pell_s...
Mathlib/NumberTheory/Pell.lean
209
214
theorem eq_zero_of_d_neg (h₀ : d < 0) (a : Solution₁ d) : a.x = 0 ∨ a.y = 0 := by
have h := a.prop contrapose! h have h1 := sq_pos_of_ne_zero h.1 have h2 := sq_pos_of_ne_zero h.2 nlinarith
[ " a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)", " a.x ^ 2 = 1 + d * a.y ^ 2", " a.x ^ 2 = a.x ^ 2 - d * a.y ^ 2 + d * a.y ^ 2", " d * a.y ^ 2 = a.x ^ 2 - 1", " d * a.y ^ 2 = a.x ^ 2 - (a.x ^ 2 - d * a.y ^ 2)", " (a * b).x = a.x * b.x + d * (a.y * b.y)", " (a * b).x = a.x * b.x + d * a.y * b.y", " ...
[ " a.re ^ 2 - d * a.im ^ 2 = 1 ↔ a ∈ unitary (ℤ√d)", " a.x ^ 2 = 1 + d * a.y ^ 2", " a.x ^ 2 = a.x ^ 2 - d * a.y ^ 2 + d * a.y ^ 2", " d * a.y ^ 2 = a.x ^ 2 - 1", " d * a.y ^ 2 = a.x ^ 2 - (a.x ^ 2 - d * a.y ^ 2)", " (a * b).x = a.x * b.x + d * (a.y * b.y)", " (a * b).x = a.x * b.x + d * a.y * b.y" ]
import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Analysis.Normed.Group.Completion #align_import analysis.normed.group.hom_completion from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" noncomputable section open Set NormedAddGroupHom UniformSpace section Completion variable {G...
Mathlib/Analysis/Normed/Group/HomCompletion.lean
155
156
theorem NormedAddGroupHom.completion_toCompl (f : NormedAddGroupHom G H) : f.completion.comp toCompl = toCompl.comp f := by
ext x; simp
[ " (id G).completion = id (Completion G)", " (id G).completion x = (id (Completion G)) x", " _root_.id x = (id (Completion G)) x", " g.completion.comp f.completion = (g.comp f).completion", " (g.completion.comp f.completion) x = (g.comp f).completion x", " Completion.map (⇑g ∘ ⇑f) x = Completion.map (⇑(g.c...
[ " (id G).completion = id (Completion G)", " (id G).completion x = (id (Completion G)) x", " _root_.id x = (id (Completion G)) x", " g.completion.comp f.completion = (g.comp f).completion", " (g.completion.comp f.completion) x = (g.comp f).completion x", " Completion.map (⇑g ∘ ⇑f) x = Completion.map (⇑(g.c...
import Mathlib.Data.ENNReal.Inv #align_import data.real.ennreal from "leanprover-community/mathlib"@"c14c8fcde993801fca8946b0d80131a1a81d1520" open Set NNReal ENNReal namespace ENNReal section iInf variable {ι : Sort*} {f g : ι → ℝ≥0∞} variable {a b c d : ℝ≥0∞} {r p q : ℝ≥0} theorem toNNReal_iInf (hf : ∀ i, f ...
Mathlib/Data/ENNReal/Real.lean
572
573
theorem toReal_iInf (hf : ∀ i, f i ≠ ∞) : (iInf f).toReal = ⨅ i, (f i).toReal := by
simp only [ENNReal.toReal, toNNReal_iInf hf, NNReal.coe_iInf]
[ " (iInf f).toNNReal = ⨅ i, (f i).toNNReal", " (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal", " (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s)", " (iSup f).toNNReal = ⨆ i, (f i).toNNReal", " (⨆ i, ↑(f i)).toNNReal = ⨆ i, ((fun i => ↑(f i)) i).toNNReal", " (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i...
[ " (iInf f).toNNReal = ⨅ i, (f i).toNNReal", " (⨅ i, ↑(f i)).toNNReal = ⨅ i, ((fun i => ↑(f i)) i).toNNReal", " (sInf s).toNNReal = sInf (ENNReal.toNNReal '' s)", " (iSup f).toNNReal = ⨆ i, (f i).toNNReal", " (⨆ i, ↑(f i)).toNNReal = ⨆ i, ((fun i => ↑(f i)) i).toNNReal", " (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i...
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Module.Defs import Mathlib.Algebra.Order.Archimedean import Mathlib.Algebra.Order.Group.Instances import Mathlib.GroupTheory.GroupAction.Pi open Function Set structure AddConstMap (G H : Type*) [Add G] [Add H] (a : G) (b : H) where protected...
Mathlib/Algebra/AddConstMap/Basic.lean
73
75
theorem map_add_nsmul [AddMonoid G] [AddMonoid H] [AddConstMapClass F G H a b] (f : F) (x : G) (n : ℕ) : f (x + n • a) = f x + n • b := by
simpa using (AddConstMapClass.semiconj f).iterate_right n x
[ " f (x + n • a) = f x + n • b" ]
[]
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {α β δ : Type*} [MeasurableSpace α] [MeasurableSpace β] {s : Set α} ...
Mathlib/MeasureTheory/Measure/Dirac.lean
77
83
theorem restrict_singleton (μ : Measure α) (a : α) : μ.restrict {a} = μ {a} • dirac a := by
ext1 s hs by_cases ha : a ∈ s · have : s ∩ {a} = {a} := by simpa simp [*] · have : s ∩ {a} = ∅ := inter_singleton_eq_empty.2 ha simp [*]
[ " inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory", " (dirac a) s = 1", " (dirac a) s ≤ univ.indicator 1 a", " (dirac a) s ≤ (dirac a) univ", " (dirac a) s = s.indicator 1 a", " (dirac a) s ≤ 0", " (dirac a) {a}ᶜ = 0", " (map f (dirac a)) s = (dirac (f a)) s", " map (fun x => c) μ = μ univ • dirac c", ...
[ " inst✝¹ ≤ (OuterMeasure.dirac a).caratheodory", " (dirac a) s = 1", " (dirac a) s ≤ univ.indicator 1 a", " (dirac a) s ≤ (dirac a) univ", " (dirac a) s = s.indicator 1 a", " (dirac a) s ≤ 0", " (dirac a) {a}ᶜ = 0", " (map f (dirac a)) s = (dirac (f a)) s", " map (fun x => c) μ = μ univ • dirac c", ...
import Mathlib.Analysis.InnerProductSpace.Calculus import Mathlib.Analysis.InnerProductSpace.Dual import Mathlib.Analysis.InnerProductSpace.Adjoint import Mathlib.Analysis.Calculus.LagrangeMultipliers import Mathlib.LinearAlgebra.Eigenspace.Basic #align_import analysis.inner_product_space.rayleigh from "leanprover-co...
Mathlib/Analysis/InnerProductSpace/Rayleigh.lean
67
80
theorem image_rayleigh_eq_image_rayleigh_sphere {r : ℝ} (hr : 0 < r) : rayleighQuotient T '' {0}ᶜ = rayleighQuotient T '' sphere 0 r := by
ext a constructor · rintro ⟨x, hx : x ≠ 0, hxT⟩ have : ‖x‖ ≠ 0 := by simp [hx] let c : 𝕜 := ↑‖x‖⁻¹ * r have : c ≠ 0 := by simp [c, hx, hr.ne'] refine ⟨c • x, ?_, ?_⟩ · field_simp [c, norm_smul, abs_of_pos hr] · rw [T.rayleigh_smul x this] exact hxT · rintro ⟨x, hx, hxT⟩ exact...
[ " T.rayleighQuotient (c • x) = T.rayleighQuotient x", " ‖c‖ ≠ 0", " ‖x‖ ≠ 0", " ‖c‖ ^ 2 * T.reApplyInnerSelf x * ‖x‖ ^ 2 = T.reApplyInnerSelf x * (‖c‖ * ‖x‖) ^ 2", " T.rayleighQuotient '' {0}ᶜ = T.rayleighQuotient '' sphere 0 r", " a ∈ T.rayleighQuotient '' {0}ᶜ ↔ a ∈ T.rayleighQuotient '' sphere 0 r", ...
[ " T.rayleighQuotient (c • x) = T.rayleighQuotient x", " ‖c‖ ≠ 0", " ‖x‖ ≠ 0", " ‖c‖ ^ 2 * T.reApplyInnerSelf x * ‖x‖ ^ 2 = T.reApplyInnerSelf x * (‖c‖ * ‖x‖) ^ 2" ]
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
49
56
theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) : HasDerivAt (fun y : ℝ => -Complex.cos (2 * z * y) / (2 * z)) (Complex.sin (2 * z * x)) x := by
have a : HasDerivAt (fun y : ℂ => y * (2 * z)) _ x := hasDerivAt_mul_const _ have b : HasDerivAt (fun y : ℂ => Complex.cos (y * (2 * z))) _ x := HasDerivAt.comp (x : ℂ) (Complex.hasDerivAt_cos (x * (2 * z))) a have c := (b.comp_ofReal.div_const (2 * z)).neg field_simp at c; simp only [fun y => mul_comm y (...
[ " HasDerivAt (fun y => (2 * z * ↑y).sin / (2 * z)) (2 * z * ↑x).cos x", " HasDerivAt (fun y => -(2 * z * ↑y).cos / (2 * z)) (2 * z * ↑x).sin x" ]
[ " HasDerivAt (fun y => (2 * z * ↑y).sin / (2 * z)) (2 * z * ↑x).cos x" ]
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
110
110
theorem mul_inv_le_iff' (h : 0 < b) : a * b⁻¹ ≤ c ↔ a ≤ c * b := by
rw [mul_comm, inv_mul_le_iff' h]
[ " a ≤ b / c ↔ c * a ≤ b", " a = a / b * b", " c * b / b = c", " a / b ≤ c ↔ a ≤ b * c", " a / b ≤ c ↔ a / c ≤ b", " a < b / c ↔ c * a < b", " b / c < a ↔ b < c * a", " a / b < c ↔ a / c < b", " b⁻¹ * a ≤ c ↔ a ≤ b * c", " b⁻¹ * a ≤ c ↔ a ≤ c * b", " a * b⁻¹ ≤ c ↔ a ≤ b * c", " a * b⁻¹ ≤ c ↔ a ...
[ " a ≤ b / c ↔ c * a ≤ b", " a = a / b * b", " c * b / b = c", " a / b ≤ c ↔ a ≤ b * c", " a / b ≤ c ↔ a / c ≤ b", " a < b / c ↔ c * a < b", " b / c < a ↔ b < c * a", " a / b < c ↔ a / c < b", " b⁻¹ * a ≤ c ↔ a ≤ b * c", " b⁻¹ * a ≤ c ↔ a ≤ c * b", " a * b⁻¹ ≤ c ↔ a ≤ b * c" ]
import Mathlib.Analysis.Calculus.FDeriv.Bilinear #align_import analysis.calculus.fderiv.mul from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521" open scoped Classical open Filter Asymptotics ContinuousLinearMap Set Metric Topology NNReal ENNReal noncomputable section section variable ...
Mathlib/Analysis/Calculus/FDeriv/Mul.lean
376
380
theorem HasStrictFDerivAt.mul (hc : HasStrictFDerivAt c c' x) (hd : HasStrictFDerivAt d d' x) : HasStrictFDerivAt (fun y => c y * d y) (c x • d' + d x • c') x := by
convert hc.mul' hd ext z apply mul_comm
[ " HasStrictFDerivAt (fun y => c y * d y) (c x • d' + d x • c') x", " d x • c' = c'.smulRight (d x)", " (d x • c') z = (c'.smulRight (d x)) z" ]
[]
import Mathlib.Order.BooleanAlgebra import Mathlib.Logic.Equiv.Basic #align_import order.symm_diff from "leanprover-community/mathlib"@"6eb334bd8f3433d5b08ba156b8ec3e6af47e1904" open Function OrderDual variable {ι α β : Type*} {π : ι → Type*} def symmDiff [Sup α] [SDiff α] (a b : α) : α := a \ b ⊔ b \ a #ali...
Mathlib/Order/SymmDiff.lean
252
252
theorem bihimp_top : a ⇔ ⊤ = a := by
rw [bihimp, himp_top, top_himp, inf_top_eq]
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ⇔ b = b ⇔ a", " a ⇔ a = ⊤", " a ⇔ ⊤ = a" ]
[ " ∀ (p q : Bool), p ∆ q = xor p q", " a ⇔ b = b ⇔ a", " a ⇔ a = ⊤" ]
import Mathlib.Topology.Order.IsLUB open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) variable {α β γ : Type*} section ConditionallyCompleteLinearOrder variable [ConditionallyCompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α] [ConditionallyCompleteLinearOrder β] [Top...
Mathlib/Topology/Order/Monotone.lean
41
45
theorem Monotone.map_iSup_of_continuousAt' {ι : Sort*} [Nonempty ι] {f : α → β} {g : ι → α} (Cf : ContinuousAt f (iSup g)) (Mf : Monotone f) (bdd : BddAbove (range g) := by
bddDefault) : f (⨆ i, g i) = ⨆ i, f (g i) := by rw [iSup, Monotone.map_sSup_of_continuousAt' Cf Mf (range_nonempty g) bdd, ← range_comp, iSup] rfl
[ " f (⨆ i, g i) = ⨆ i, f (g i)", " sSup (range (f ∘ g)) = sSup (range fun i => f (g i))" ]
[]
import Mathlib.Algebra.Group.Defs #align_import algebra.invertible from "leanprover-community/mathlib"@"722b3b152ddd5e0cf21c0a29787c76596cb6b422" assert_not_exists MonoidWithZero assert_not_exists DenselyOrdered universe u variable {α : Type u} class Invertible [Mul α] [One α] (a : α) : Type u where invOf...
Mathlib/Algebra/Group/Invertible/Defs.lean
117
118
theorem invOf_mul_self_assoc' [Monoid α] (a b : α) {_ : Invertible a} : ⅟ a * (a * b) = b := by
rw [← mul_assoc, invOf_mul_self, one_mul]
[ " ⅟a * (a * b) = b" ]
[]
import Mathlib.Data.Matroid.Dual open Set namespace Matroid variable {α : Type*} {M : Matroid α} {R I J X Y : Set α} section restrict @[simps] def restrictIndepMatroid (M : Matroid α) (R : Set α) : IndepMatroid α where E := R Indep I := M.Indep I ∧ I ⊆ R indep_empty := ⟨M.empty_indep, empty_subset _⟩ i...
Mathlib/Data/Matroid/Restrict.lean
159
163
theorem Basis.restrict_base (h : M.Basis I X) : (M ↾ X).Base I := by
rw [basis_iff'] at h simp_rw [base_iff_maximal_indep, restrict_indep_iff, and_imp, and_assoc, and_iff_right h.1.1, and_iff_right h.1.2.1] exact fun J hJ hJX hIJ ↦ h.1.2.2 _ hJ hIJ hJX
[ " ∀ ⦃I B : Set α⦄,\n (fun I => M.Indep I ∧ I ⊆ R) I →\n I ∉ maximals (fun x x_1 => x ⊆ x_1) {I | (fun I => M.Indep I ∧ I ⊆ R) I} →\n B ∈ maximals (fun x x_1 => x ⊆ x_1) {I | (fun I => M.Indep I ∧ I ⊆ R) I} →\n ∃ x ∈ B \\ I, (fun I => M.Indep I ∧ I ⊆ R) (insert x I)", " ∃ x ∈ I' \\ I, (fun ...
[ " ∀ ⦃I B : Set α⦄,\n (fun I => M.Indep I ∧ I ⊆ R) I →\n I ∉ maximals (fun x x_1 => x ⊆ x_1) {I | (fun I => M.Indep I ∧ I ⊆ R) I} →\n B ∈ maximals (fun x x_1 => x ⊆ x_1) {I | (fun I => M.Indep I ∧ I ⊆ R) I} →\n ∃ x ∈ B \\ I, (fun I => M.Indep I ∧ I ⊆ R) (insert x I)", " ∃ x ∈ I' \\ I, (fun ...
import Mathlib.CategoryTheory.Limits.Preserves.Finite import Mathlib.CategoryTheory.Sites.Canonical import Mathlib.CategoryTheory.Sites.Coherent.Basic import Mathlib.CategoryTheory.Sites.Preserves universe v u w namespace CategoryTheory open Limits variable {C : Type u} [Category.{v} C] variable [FinitaryPreExten...
Mathlib/CategoryTheory/Sites/Coherent/ExtensiveSheaves.lean
52
58
theorem isSheafFor_extensive_of_preservesFiniteProducts {X : C} (S : Presieve X) [S.Extensive] (F : Cᵒᵖ ⥤ Type w) [PreservesFiniteProducts F] : S.IsSheafFor F := by
obtain ⟨α, _, Z, π, rfl, ⟨hc⟩⟩ := Extensive.arrows_nonempty_isColimit (R := S) have : (ofArrows Z (Cofan.mk X π).inj).hasPullbacks := (inferInstance : (ofArrows Z π).hasPullbacks) cases nonempty_fintype α exact isSheafFor_of_preservesProduct _ _ hc
[ " ∀ {Y Z : C} {f : Y ⟶ X}, S f → ∀ {g : Z ⟶ X}, S g → HasPullback f g", " ∀ {Y Z : C} {f : Y ⟶ X}, Presieve.ofArrows w✝¹ w✝ f → ∀ {g : Z ⟶ X}, Presieve.ofArrows w✝¹ w✝ g → HasPullback f g", " HasPullback f✝ g✝", " HasPullback f✝ (w✝ i✝)", " IsSheafFor F S", " IsSheafFor F (ofArrows Z π)" ]
[ " ∀ {Y Z : C} {f : Y ⟶ X}, S f → ∀ {g : Z ⟶ X}, S g → HasPullback f g", " ∀ {Y Z : C} {f : Y ⟶ X}, Presieve.ofArrows w✝¹ w✝ f → ∀ {g : Z ⟶ X}, Presieve.ofArrows w✝¹ w✝ g → HasPullback f g", " HasPullback f✝ g✝", " HasPullback f✝ (w✝ i✝)" ]
import Mathlib.Algebra.BigOperators.Group.List import Mathlib.Algebra.Group.Prod import Mathlib.Data.Multiset.Basic #align_import algebra.big_operators.multiset.basic from "leanprover-community/mathlib"@"6c5f73fd6f6cc83122788a80a27cdd54663609f4" assert_not_exists MonoidWithZero variable {F ι α β γ : Type*} names...
Mathlib/Algebra/BigOperators/Group/Multiset.lean
66
68
theorem prod_toList (s : Multiset α) : s.toList.prod = s.prod := by
conv_rhs => rw [← coe_toList s] rw [prod_coe]
[ " (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)", " (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y", " foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s", " s.toList...
[ " (fun x x_1 => x * x_1) x ((fun x x_1 => x * x_1) y z) = (fun x x_1 => x * x_1) y ((fun x x_1 => x * x_1) x z)", " (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x y) z = (fun x x_1 => x * x_1) ((fun x x_1 => x * x_1) x z) y", " foldl (fun x y => y * x) ⋯ 1 s = foldl (fun x x_1 => x * x_1) ⋯ 1 s" ]
import Mathlib.Analysis.Normed.Group.Basic #align_import information_theory.hamming from "leanprover-community/mathlib"@"17ef379e997badd73e5eabb4d38f11919ab3c4b3" section HammingDistNorm open Finset Function variable {α ι : Type*} {β : ι → Type*} [Fintype ι] [∀ i, DecidableEq (β i)] variable {γ : ι → Type*} [∀ ...
Mathlib/InformationTheory/Hamming.lean
71
74
theorem hammingDist_triangle_left (x y z : ∀ i, β i) : hammingDist x y ≤ hammingDist z x + hammingDist z y := by
rw [hammingDist_comm z] exact hammingDist_triangle _ _ _
[ " hammingDist x x = 0", " ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1", " hammingDist x y = hammingDist y x", " hammingDist x z ≤ hammingDist x y + hammingDist y z", " (filter (fun i => x i ≠ z i) univ).card ≤\n (filter (fun i => x i ≠ y i) univ).card + (filter (fun i => y i ≠ z i) univ).card", " filter (...
[ " hammingDist x x = 0", " ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1", " hammingDist x y = hammingDist y x", " hammingDist x z ≤ hammingDist x y + hammingDist y z", " (filter (fun i => x i ≠ z i) univ).card ≤\n (filter (fun i => x i ≠ y i) univ).card + (filter (fun i => y i ≠ z i) univ).card", " filter (...
import Mathlib.Data.Real.Basic #align_import data.real.sign from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace Real noncomputable def sign (r : ℝ) : ℝ := if r < 0 then -1 else if 0 < r then 1 else 0 #align real.sign Real.sign theorem sign_of_neg {r : ℝ} (hr : r < 0) : si...
Mathlib/Data/Real/Sign.lean
101
104
theorem sign_mul_pos_of_ne_zero (r : ℝ) (hr : r ≠ 0) : 0 < sign r * r := by
refine lt_of_le_of_ne (sign_mul_nonneg r) fun h => hr ?_ have hs0 := (zero_eq_mul.mp h).resolve_right hr exact sign_eq_zero_iff.mp hs0
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0", " (↑z).sign = ↑z.sign", " (↑0).sign = ↑(Int.sign 0)", " (-r).sign = -r.sign", " (-0).sign = -sign 0", " 0 ≤...
[ " r.sign = -1", " r.sign = 1", " sign 0 = 0", " 0 < 1", " r.sign = -1 ∨ r.sign = 0 ∨ r.sign = 1", " sign 0 = -1 ∨ sign 0 = 0 ∨ sign 0 = 1", " r.sign = 0 ↔ r = 0", " r = 0", " 0 = 0", " (↑z).sign = ↑z.sign", " (↑0).sign = ↑(Int.sign 0)", " (-r).sign = -r.sign", " (-0).sign = -sign 0", " 0 ≤...
import ProofWidgets.Component.HtmlDisplay open scoped ProofWidgets.Jsx -- ⟵ remember this! def htmlLetters : Array ProofWidgets.Html := #[ <span style={json% {color: "red"}}>H</span>, <span style={json% {color: "yellow"}}>T</span>, <span style={json% {color: "green"}}>M</span>, <span style={json% {c...
.lake/packages/proofwidgets/ProofWidgets/Demos/Jsx.lean
18
24
theorem ghjk : True := by
-- Put your cursor over any of the `html!` lines html! <b>What, HTML in Lean?! </b> html! <i>And another!</i> -- attributes and text nodes can be interpolated html! <img src={ "https://" ++ "upload.wikimedia.org/wikipedia/commons/a/a5/Parrot_montage.jpg"} alt="parrots" /> trivial
[ " True" ]
[]
import Mathlib.Geometry.Manifold.MFDeriv.Basic noncomputable section open scoped Manifold variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {f : E → E'} {s : Set E} {x : E} section MFDerivFderiv t...
Mathlib/Geometry/Manifold/MFDeriv/FDeriv.lean
108
110
theorem mdifferentiable_iff_differentiable : MDifferentiable 𝓘(𝕜, E) 𝓘(𝕜, E') f ↔ Differentiable 𝕜 f := by
simp only [MDifferentiable, Differentiable, mdifferentiableAt_iff_differentiableAt]
[ " UniqueMDiffWithinAt 𝓘(𝕜, E) s x ↔ UniqueDiffWithinAt 𝕜 s x", " UniqueMDiffOn 𝓘(𝕜, E) s ↔ UniqueDiffOn 𝕜 s", " HasMFDerivWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x f' ↔ HasFDerivWithinAt f f' s x", " HasMFDerivAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x f' ↔ HasFDerivAt f f' x", " MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E...
[ " UniqueMDiffWithinAt 𝓘(𝕜, E) s x ↔ UniqueDiffWithinAt 𝕜 s x", " UniqueMDiffOn 𝓘(𝕜, E) s ↔ UniqueDiffOn 𝕜 s", " HasMFDerivWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x f' ↔ HasFDerivWithinAt f f' s x", " HasMFDerivAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x f' ↔ HasFDerivAt f f' x", " MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E...
import Mathlib.Data.Fintype.Order import Mathlib.Data.Set.Finite import Mathlib.Order.Category.FinPartOrd import Mathlib.Order.Category.LinOrd import Mathlib.CategoryTheory.Limits.Shapes.Images import Mathlib.CategoryTheory.Limits.Shapes.RegularMono import Mathlib.Data.Set.Subsingleton #align_import order.category.No...
Mathlib/Order/Category/NonemptyFinLinOrd.lean
171
209
theorem epi_iff_surjective {A B : NonemptyFinLinOrd.{u}} (f : A ⟶ B) : Epi f ↔ Function.Surjective f := by
constructor · intro dsimp only [Function.Surjective] by_contra! hf' rcases hf' with ⟨m, hm⟩ let Y := NonemptyFinLinOrd.of (ULift (Fin 2)) let p₁ : B ⟶ Y := ⟨fun b => if b < m then ULift.up 0 else ULift.up 1, fun x₁ x₂ h => by simp only split_ifs with h₁ h₂ h₂ any_g...
[ " ↑e ≫ ↑e.symm = 𝟙 α", " (↑e ≫ ↑e.symm) x = (𝟙 α) x", " ↑e.symm ≫ ↑e = 𝟙 β", " (↑e.symm ≫ ↑e) x = (𝟙 β) x", " x✝¹ = x✝", " x✝¹ x = x✝ x", " Mono f ↔ Function.Injective ⇑f", " Mono f → Function.Injective ⇑f", " Function.Injective ⇑f", " a₁ = a₂", " (fun x => a₁) x✝² ≤ (fun x => a₁) x✝¹", " ...
[ " ↑e ≫ ↑e.symm = 𝟙 α", " (↑e ≫ ↑e.symm) x = (𝟙 α) x", " ↑e.symm ≫ ↑e = 𝟙 β", " (↑e.symm ≫ ↑e) x = (𝟙 β) x", " x✝¹ = x✝", " x✝¹ x = x✝ x", " Mono f ↔ Function.Injective ⇑f", " Mono f → Function.Injective ⇑f", " Function.Injective ⇑f", " a₁ = a₂", " (fun x => a₁) x✝² ≤ (fun x => a₁) x✝¹", " ...
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Data.Fintype.Basic import Mathlib.Data.Int.GCD import Mathlib.RingTheory.Coprime.Basic #align_import ring_theory.coprime.lemmas from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226" universe u v section IsCoprime variable {R : Type ...
Mathlib/RingTheory/Coprime/Lemmas.lean
42
43
theorem Nat.isCoprime_iff_coprime {m n : ℕ} : IsCoprime (m : ℤ) n ↔ Nat.Coprime m n := by
rw [Int.isCoprime_iff_gcd_eq_one, Int.gcd_natCast_natCast]
[ " IsCoprime m n ↔ m.gcd n = 1", " IsCoprime m n → m.gcd n = 1", " m.gcd n = 1", " 1 = m * a + n * b", " m.gcd n = 1 → IsCoprime m n", " m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1", " ∃ a b, a * m + b * n = 1", " IsCoprime ↑m ↑n ↔ m.Coprime n" ]
[ " IsCoprime m n ↔ m.gcd n = 1", " IsCoprime m n → m.gcd n = 1", " m.gcd n = 1", " 1 = m * a + n * b", " m.gcd n = 1 → IsCoprime m n", " m.gcdA n * m + m.gcdB n * n = 1 → ∃ a b, a * m + b * n = 1", " ∃ a b, a * m + b * n = 1" ]
import Mathlib.ModelTheory.Satisfiability #align_import model_theory.types from "leanprover-community/mathlib"@"98bd247d933fb581ff37244a5998bd33d81dd46d" set_option linter.uppercaseLean3 false universe u v w w' open Cardinal Set open scoped Classical open Cardinal FirstOrder namespace FirstOrder namespace La...
Mathlib/ModelTheory/Types.lean
115
126
theorem setOf_subset_eq_empty_iff (S : L[[α]].Theory) : { p : T.CompleteType α | S ⊆ ↑p } = ∅ ↔ ¬((L.lhomWithConstants α).onTheory T ∪ S).IsSatisfiable := by
rw [iff_not_comm, ← not_nonempty_iff_eq_empty, Classical.not_not, Set.Nonempty] refine ⟨fun h => ⟨⟨L[[α]].completeTheory h.some, (subset_union_left (t := S)).trans completeTheory.subset, completeTheory.isMaximal (L[[α]]) h.some⟩, (((L.lhomWithConstants α).onTheory T).subset_union_right)...
[ " p = q", " { toTheory := toTheory✝, subset' := subset'✝, isMaximal' := isMaximal'✝ } = q", " { toTheory := toTheory✝¹, subset' := subset'✝¹, isMaximal' := isMaximal'✝¹ } =\n { toTheory := toTheory✝, subset' := subset'✝, isMaximal' := isMaximal'✝ }", " False", " ¬{φ, Formula.not φ}.IsSatisfiable", " {φ...
[ " p = q", " { toTheory := toTheory✝, subset' := subset'✝, isMaximal' := isMaximal'✝ } = q", " { toTheory := toTheory✝¹, subset' := subset'✝¹, isMaximal' := isMaximal'✝¹ } =\n { toTheory := toTheory✝, subset' := subset'✝, isMaximal' := isMaximal'✝ }", " False", " ¬{φ, Formula.not φ}.IsSatisfiable", " {φ...
import Batteries.Data.RBMap.Alter import Batteries.Data.List.Lemmas namespace Batteries namespace RBNode open RBColor attribute [simp] fold foldl foldr Any forM foldlM Ordered @[simp] theorem min?_reverse (t : RBNode α) : t.reverse.min? = t.max? := by unfold RBNode.max?; split <;> simp [RBNode.min?] unfold RB...
.lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean
67
68
theorem isOrdered_iff [@TransCmp α cmp] {t : RBNode α} : isOrdered cmp t ↔ Ordered cmp t := by
simp [isOrdered_iff']
[ " t.reverse.min? = t.max?", " t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?", " nil.reverse.min? = none", " (node c✝ l✝ v✝ nil).reverse.min? = some v✝", " (node c✝ l✝ v✝ r✝).reverse.min? = r✝.max?", " (node c✝ r✝.reverse v✝ l✝.reverse)....
[ " t.reverse.min? = t.max?", " t.reverse.min? =\n match t with\n | nil => none\n | node c l v nil => some v\n | node c l v r => r.max?", " nil.reverse.min? = none", " (node c✝ l✝ v✝ nil).reverse.min? = some v✝", " (node c✝ l✝ v✝ r✝).reverse.min? = r✝.max?", " (node c✝ r✝.reverse v✝ l✝.reverse)....
import Mathlib.Data.W.Basic #align_import data.pfunctor.univariate.basic from "leanprover-community/mathlib"@"8631e2d5ea77f6c13054d9151d82b83069680cb1" -- "W", "Idx" set_option linter.uppercaseLean3 false universe u v v₁ v₂ v₃ @[pp_with_univ] structure PFunctor where A : Type u B : A → Type u #align p...
Mathlib/Data/PFunctor/Univariate/Basic.lean
129
129
theorem W.mk_dest (p : W P) : W.mk (W.dest p) = p := by
cases p; rfl
[ " (mk p).dest = p", " (mk ⟨fst✝, snd✝⟩).dest = ⟨fst✝, snd✝⟩", " mk p.dest = p", " mk (dest (WType.mk a✝ f✝)) = WType.mk a✝ f✝" ]
[ " (mk p).dest = p", " (mk ⟨fst✝, snd✝⟩).dest = ⟨fst✝, snd✝⟩" ]
import Mathlib.Algebra.Algebra.NonUnitalSubalgebra import Mathlib.Algebra.Star.StarAlgHom import Mathlib.Algebra.Star.Center universe u u' v v' w w' w'' variable {F : Type v'} {R' : Type u'} {R : Type u} variable {A : Type v} {B : Type w} {C : Type w'} namespace NonUnitalSubalgebra open scoped Pointwise vari...
Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
544
545
theorem star_mem_star_iff (S : NonUnitalSubalgebra R A) (x : A) : star x ∈ star S ↔ x ∈ S := by
simp
[ " x + y ∈ star S.carrier", " x * y ∈ { carrier := star S.carrier, add_mem' := ⋯, zero_mem' := ⋯ }.carrier", " r • x ∈ { carrier := star S.carrier, add_mem' := ⋯, zero_mem' := ⋯, mul_mem' := ⋯ }.carrier", " star x ∈ star S ↔ x ∈ S" ]
[ " x + y ∈ star S.carrier", " x * y ∈ { carrier := star S.carrier, add_mem' := ⋯, zero_mem' := ⋯ }.carrier", " r • x ∈ { carrier := star S.carrier, add_mem' := ⋯, zero_mem' := ⋯, mul_mem' := ⋯ }.carrier" ]
import Mathlib.Data.Finsupp.Basic import Mathlib.Data.List.AList #align_import data.finsupp.alist from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" namespace AList variable {α M : Type*} [Zero M] open List noncomputable def lookupFinsupp (l : AList fun _x : α => M) : α →₀ M where ...
Mathlib/Data/Finsupp/AList.lean
76
78
theorem lookupFinsupp_apply [DecidableEq α] (l : AList fun _x : α => M) (a : α) : l.lookupFinsupp a = (l.lookup a).getD 0 := by
convert rfl; congr
[ " Finset α", " a ∈ (filter (fun x => decide (x.snd ≠ 0)) l.entries).keys.toFinset ↔ (fun a => (lookup a l).getD 0) a ≠ 0", " (∃ b ∈ lookup a l, decide (b ≠ 0) = true) ↔ (lookup a l).getD 0 ≠ 0", " (∃ b ∈ none, decide (b ≠ 0) = true) ↔ none.getD 0 ≠ 0", " (∃ b ∈ some val✝, decide (b ≠ 0) = true) ↔ (some val✝...
[ " Finset α", " a ∈ (filter (fun x => decide (x.snd ≠ 0)) l.entries).keys.toFinset ↔ (fun a => (lookup a l).getD 0) a ≠ 0", " (∃ b ∈ lookup a l, decide (b ≠ 0) = true) ↔ (lookup a l).getD 0 ≠ 0", " (∃ b ∈ none, decide (b ≠ 0) = true) ↔ none.getD 0 ≠ 0", " (∃ b ∈ some val✝, decide (b ≠ 0) = true) ↔ (some val✝...
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.CategoryTheory.Groupoid.VertexGroup import Mathlib.CategoryTheory.Groupoid.Basic import Mathlib.CategoryTheory.Groupoid import Mathlib.Data.Set.Lattice import Mathlib.Order.GaloisConnection #align_import category_theory.groupoid.subgroupoid from "leanprover-c...
Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean
123
126
theorem id_mem_of_nonempty_isotropy (c : C) : c ∈ objs S → 𝟙 c ∈ S.arrows c c := by
rintro ⟨γ, hγ⟩ convert S.mul hγ (S.inv hγ) simp only [inv_eq_inv, IsIso.hom_inv_id]
[ " Groupoid.inv f ∈ S.arrows d c ↔ f ∈ S.arrows c d", " Groupoid.inv f ∈ S.arrows d c → f ∈ S.arrows c d", " f ∈ S.arrows c d", " f ∈ S.arrows c d → Groupoid.inv f ∈ S.arrows d c", " f ≫ g ∈ S.arrows c e ↔ g ∈ S.arrows d e", " f ≫ g ∈ S.arrows c e → g ∈ S.arrows d e", " g ∈ S.arrows d e", " Groupoid.in...
[ " Groupoid.inv f ∈ S.arrows d c ↔ f ∈ S.arrows c d", " Groupoid.inv f ∈ S.arrows d c → f ∈ S.arrows c d", " f ∈ S.arrows c d", " f ∈ S.arrows c d → Groupoid.inv f ∈ S.arrows d c", " f ≫ g ∈ S.arrows c e ↔ g ∈ S.arrows d e", " f ≫ g ∈ S.arrows c e → g ∈ S.arrows d e", " g ∈ S.arrows d e", " Groupoid.in...
import Mathlib.Algebra.Group.Submonoid.Pointwise #align_import group_theory.submonoid.inverses from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {M : Type*} namespace Submonoid @[to_additive] noncomputable instance [Monoid M] : Group (IsUnit.submonoid M) := { inferInstanc...
Mathlib/GroupTheory/Submonoid/Inverses.lean
87
94
theorem leftInv_leftInv_eq (hS : S ≤ IsUnit.submonoid M) : S.leftInv.leftInv = S := by
refine le_antisymm S.leftInv_leftInv_le ?_ intro x hx have : x = ((hS hx).unit⁻¹⁻¹ : Mˣ) := by rw [inv_inv (hS hx).unit] rfl rw [this] exact S.leftInv.unit_mem_leftInv _ (S.unit_mem_leftInv _ hx)
[ " a * b = b * a", " a * _b * ↑(b' * a') = 1", " S.leftInv.leftInv ≤ S", " x ∈ S", " x = ↑z", " S.leftInv.leftInv = S", " S ≤ S.leftInv.leftInv", " x ∈ S.leftInv.leftInv", " x = ↑(IsUnit.unit ⋯)⁻¹⁻¹", " x = ↑(IsUnit.unit ⋯)", " ↑(IsUnit.unit ⋯)⁻¹⁻¹ ∈ S.leftInv.leftInv" ]
[ " a * b = b * a", " a * _b * ↑(b' * a') = 1", " S.leftInv.leftInv ≤ S", " x ∈ S", " x = ↑z" ]
import Mathlib.Analysis.Convex.Side import Mathlib.Geometry.Euclidean.Angle.Oriented.Rotation import Mathlib.Geometry.Euclidean.Angle.Unoriented.Affine #align_import geometry.euclidean.angle.oriented.affine from "leanprover-community/mathlib"@"46b633fd842bef9469441c0209906f6dddd2b4f5" noncomputable section open ...
Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
60
60
theorem oangle_self_left (p₁ p₂ : P) : ∡ p₁ p₁ p₂ = 0 := by
simp [oangle]
[ " ContinuousAt (fun y => ∡ y.1 y.2.1 y.2.2) x", " (f x).1 ≠ 0", " (f x).2 ≠ 0", " ∡ p₁ p₁ p₂ = 0" ]
[ " ContinuousAt (fun y => ∡ y.1 y.2.1 y.2.2) x", " (f x).1 ≠ 0", " (f x).2 ≠ 0" ]
import Mathlib.Algebra.Polynomial.Eval import Mathlib.LinearAlgebra.Dimension.Constructions #align_import algebra.linear_recurrence from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f" noncomputable section open Finset open Polynomial structure LinearRecurrence (α : Type*) [CommSemir...
Mathlib/Algebra/LinearRecurrence.lean
156
166
theorem sol_eq_of_eq_init (u v : ℕ → α) (hu : E.IsSolution u) (hv : E.IsSolution v) : u = v ↔ Set.EqOn u v ↑(range E.order) := by
refine Iff.intro (fun h x _ ↦ h ▸ rfl) ?_ intro h set u' : ↥E.solSpace := ⟨u, hu⟩ set v' : ↥E.solSpace := ⟨v, hv⟩ change u'.val = v'.val suffices h' : u' = v' from h' ▸ rfl rw [← E.toInit.toEquiv.apply_eq_iff_eq, LinearEquiv.coe_toEquiv] ext x exact mod_cast h (mem_range.mpr x.2)
[ " n - E.order + ↑k < n", " ↑k + n < E.order + n", " E.order ≤ ↑k + n", " E.order = 0 + E.order", " E.IsSolution (E.mkSol init)", " E.mkSol init (n + E.order) = ∑ i : Fin E.order, E.coeffs i * E.mkSol init (n + ↑i)", " (if h : n + E.order < E.order then init ⟨n + E.order, h⟩\n else\n ∑ k : Fin E....
[ " n - E.order + ↑k < n", " ↑k + n < E.order + n", " E.order ≤ ↑k + n", " E.order = 0 + E.order", " E.IsSolution (E.mkSol init)", " E.mkSol init (n + E.order) = ∑ i : Fin E.order, E.coeffs i * E.mkSol init (n + ↑i)", " (if h : n + E.order < E.order then init ⟨n + E.order, h⟩\n else\n ∑ k : Fin E....
import Mathlib.Algebra.Lie.Nilpotent import Mathlib.Algebra.Lie.Normalizer #align_import algebra.lie.cartan_subalgebra from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102" universe u v w w₁ w₂ variable {R : Type u} {L : Type v} variable [CommRing R] [LieRing L] [LieAlgebra R L] (H : Lie...
Mathlib/Algebra/Lie/CartanSubalgebra.lean
72
94
theorem isCartanSubalgebra_iff_isUcsLimit : H.IsCartanSubalgebra ↔ H.toLieSubmodule.IsUcsLimit := by
constructor · intro h have h₁ : LieAlgebra.IsNilpotent R H := by infer_instance obtain ⟨k, hk⟩ := H.toLieSubmodule.isNilpotent_iff_exists_self_le_ucs.mp h₁ replace hk : H.toLieSubmodule = LieSubmodule.ucs k ⊥ := le_antisymm hk (LieSubmodule.ucs_le_of_normalizer_eq_self H.normalizer_eq_sel...
[ " H.toLieSubmodule.normalizer = H.toLieSubmodule", " LieSubmodule.ucs k H.toLieSubmodule = H.toLieSubmodule", " LieSubmodule.ucs 0 H.toLieSubmodule = H.toLieSubmodule", " LieSubmodule.ucs (k + 1) H.toLieSubmodule = H.toLieSubmodule", " H.IsCartanSubalgebra ↔ H.toLieSubmodule.IsUcsLimit", " H.IsCartanSubal...
[ " H.toLieSubmodule.normalizer = H.toLieSubmodule", " LieSubmodule.ucs k H.toLieSubmodule = H.toLieSubmodule", " LieSubmodule.ucs 0 H.toLieSubmodule = H.toLieSubmodule", " LieSubmodule.ucs (k + 1) H.toLieSubmodule = H.toLieSubmodule" ]
import Mathlib.MeasureTheory.Constructions.BorelSpace.Order import Mathlib.Topology.Order.LeftRightLim #align_import measure_theory.measure.stieltjes from "leanprover-community/mathlib"@"20d5763051978e9bc6428578ed070445df6a18b3" noncomputable section open scoped Classical open Set Filter Function ENNReal NNReal T...
Mathlib/MeasureTheory/Measure/Stieltjes.lean
83
89
theorem iInf_rat_gt_eq (f : StieltjesFunction) (x : ℝ) : ⨅ r : { r' : ℚ // x < r' }, f r = f x := by
rw [← iInf_Ioi_eq f x] refine (Real.iInf_Ioi_eq_iInf_rat_gt _ ?_ f.mono).symm refine ⟨f x, fun y => ?_⟩ rintro ⟨y, hy_mem, rfl⟩ exact f.mono (le_of_lt hy_mem)
[ " f = g", " ∀ (x : ℝ), ↑f x = ↑g x", " rightLim (↑f) x = ↑f x", " ContinuousWithinAt (↑f) (Ici x) x", " ⨅ r, ↑f ↑r = ↑f x", " rightLim (↑f) x = ⨅ r, ↑f ↑r", " 𝓝[>] x ≠ ⊥", " (𝓝[>] x).NeBot", " ⨅ r, ↑f ↑↑r = ↑f x", " ⨅ r, ↑f ↑↑r = ⨅ r, ↑f ↑r", " BddBelow (↑f '' Ioi x)", " y ∈ ↑f '' Ioi x → ↑f...
[ " f = g", " ∀ (x : ℝ), ↑f x = ↑g x", " rightLim (↑f) x = ↑f x", " ContinuousWithinAt (↑f) (Ici x) x", " ⨅ r, ↑f ↑r = ↑f x", " rightLim (↑f) x = ⨅ r, ↑f ↑r", " 𝓝[>] x ≠ ⊥", " (𝓝[>] x).NeBot" ]
import Mathlib.Order.Monotone.Union import Mathlib.Algebra.Order.Group.Instances #align_import order.monotone.odd from "leanprover-community/mathlib"@"9116dd6709f303dcf781632e15fdef382b0fc579" open Set variable {G H : Type*} [LinearOrderedAddCommGroup G] [OrderedAddCommGroup H] theorem strictMono_of_odd_strict...
Mathlib/Order/Monotone/Odd.lean
42
46
theorem monotone_of_odd_of_monotoneOn_nonneg {f : G → H} (h₁ : ∀ x, f (-x) = -f x) (h₂ : MonotoneOn f (Ici 0)) : Monotone f := by
refine MonotoneOn.Iic_union_Ici (fun x hx y hy hxy => neg_le_neg_iff.1 ?_) h₂ rw [← h₁, ← h₁] exact h₂ (neg_nonneg.2 hy) (neg_nonneg.2 hx) (neg_le_neg hxy)
[ " StrictMono f", " -f y < -f x", " f (-y) < f (-x)", " Monotone f", " -f y ≤ -f x", " f (-y) ≤ f (-x)" ]
[ " StrictMono f", " -f y < -f x", " f (-y) < f (-x)" ]
import Mathlib.Topology.Algebra.GroupCompletion import Mathlib.Topology.Algebra.InfiniteSum.Group open UniformSpace.Completion variable {α β : Type*} [AddCommGroup α] [UniformSpace α] [UniformAddGroup α] theorem hasSum_iff_hasSum_compl (f : β → α) (a : α): HasSum (toCompl ∘ f) a ↔ HasSum f a := (denseInducin...
Mathlib/Topology/Algebra/InfiniteSum/GroupCompletion.lean
32
45
theorem summable_iff_cauchySeq_finset_and_tsum_mem (f : β → α) : Summable f ↔ CauchySeq (fun s : Finset β ↦ ∑ b in s, f b) ∧ ∑' i, toCompl (f i) ∈ Set.range toCompl := by
classical constructor · rintro ⟨a, ha⟩ exact ⟨ha.cauchySeq, ((summable_iff_summable_compl_and_tsum_mem f).mp ⟨a, ha⟩).2⟩ · rintro ⟨h_cauchy, h_tsum⟩ apply (summable_iff_summable_compl_and_tsum_mem f).mpr constructor · apply summable_iff_cauchySeq_finset.mpr simp_rw [Function.comp_apply, ←...
[ " Summable f ↔ (CauchySeq fun s => ∑ b ∈ s, f b) ∧ ∑' (i : β), toCompl (f i) ∈ Set.range ⇑toCompl", " Summable f → (CauchySeq fun s => ∑ b ∈ s, f b) ∧ ∑' (i : β), toCompl (f i) ∈ Set.range ⇑toCompl", " (CauchySeq fun s => ∑ b ∈ s, f b) ∧ ∑' (i : β), toCompl (f i) ∈ Set.range ⇑toCompl", " (CauchySeq fun s => ∑...
[]
import Batteries.Data.Sum.Basic import Batteries.Logic open Function namespace Sum @[simp] protected theorem «forall» {p : α ⊕ β → Prop} : (∀ x, p x) ↔ (∀ a, p (inl a)) ∧ ∀ b, p (inr b) := ⟨fun h => ⟨fun _ => h _, fun _ => h _⟩, fun ⟨h₁, h₂⟩ => Sum.rec h₁ h₂⟩ @[simp] protected theorem «exists» {p : α ⊕ β ...
.lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
83
83
theorem isLeft_iff : x.isLeft ↔ ∃ y, x = Sum.inl y := by
cases x <;> simp
[ " (∀ (fab : (ab : α ⊕ β) → γ ab), p fab) ↔\n ∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), p fun t => rec fa fb t", " p fab", " fab = fun t => rec (fun a => fab (inl a)) (fun b => fab (inr b)) t", " fab ab = rec (fun a => fab (inl a)) (fun b => fab (inr b)) ab", " fab (inl val✝) = rec ...
[ " (∀ (fab : (ab : α ⊕ β) → γ ab), p fab) ↔\n ∀ (fa : (val : α) → γ (inl val)) (fb : (val : β) → γ (inr val)), p fun t => rec fa fb t", " p fab", " fab = fun t => rec (fun a => fab (inl a)) (fun b => fab (inr b)) t", " fab ab = rec (fun a => fab (inl a)) (fun b => fab (inr b)) ab", " fab (inl val✝) = rec ...
import Mathlib.Init.Logic import Mathlib.Tactic.AdaptationNote import Mathlib.Tactic.Coe set_option autoImplicit true -- We align Lean 3 lemmas with lemmas in `Init.SimpLemmas` in Lean 4. #align band_self Bool.and_self #align band_tt Bool.and_true #align band_ff Bool.and_false #align tt_band Bool.true_and #align f...
Mathlib/Init/Data/Bool/Lemmas.lean
68
69
theorem and_eq_true_eq_eq_true_and_eq_true (a b : Bool) : ((a && b) = true) = (a = true ∧ b = true) := by
simp
[ " ¬true = false", " ¬false = true", " (¬b = true) = (b = false)", " (¬b = false) = (b = true)", " ((a && b) = true) = (a = true ∧ b = true)" ]
[ " ¬true = false", " ¬false = true", " (¬b = true) = (b = false)", " (¬b = false) = (b = true)" ]
import Mathlib.Algebra.Polynomial.Taylor import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.AdicCompletion.Basic #align_import ring_theory.henselian from "leanprover-community/mathlib"@"d1accf4f9cddb3666c6e8e4da0ac2d19c4ed73f0" noncomputable section universe u v open Polynomial LocalRing Polyno...
Mathlib/RingTheory/Henselian.lean
121
155
theorem HenselianLocalRing.TFAE (R : Type u) [CommRing R] [LocalRing R] : TFAE [HenselianLocalRing R, ∀ f : R[X], f.Monic → ∀ a₀ : ResidueField R, aeval a₀ f = 0 → aeval a₀ (derivative f) ≠ 0 → ∃ a : R, f.IsRoot a ∧ residue R a = a₀, ∀ {K : Type u} [Field K], ∀ (φ : R →+* K...
tfae_have 3 → 2 · intro H exact H (residue R) Ideal.Quotient.mk_surjective tfae_have 2 → 1 · intro H constructor intro f hf a₀ h₁ h₂ specialize H f hf (residue R a₀) have aux := flip mem_nonunits_iff.mp h₂ simp only [aeval_def, ResidueField.algebraMap_eq, eval₂_at_apply, ← Ideal.Q...
[ " IsLocalRingHom (Ideal.Quotient.mk I)", " ∀ (a : R), IsUnit ((Ideal.Quotient.mk I) a) → IsUnit a", " IsUnit a", " IsUnit ((Ideal.Quotient.mk ⊥.jacobson) a)", " ∃ b, (Ideal.Quotient.mk ⊥.jacobson) a * b = 1", " (Ideal.Quotient.mk ⊥.jacobson) a * (Ideal.Quotient.mk ⊥.jacobson) b = 1", " a * b - 1 ∈ ⊥.jac...
[ " IsLocalRingHom (Ideal.Quotient.mk I)", " ∀ (a : R), IsUnit ((Ideal.Quotient.mk I) a) → IsUnit a", " IsUnit a", " IsUnit ((Ideal.Quotient.mk ⊥.jacobson) a)", " ∃ b, (Ideal.Quotient.mk ⊥.jacobson) a * b = 1", " (Ideal.Quotient.mk ⊥.jacobson) a * (Ideal.Quotient.mk ⊥.jacobson) b = 1", " a * b - 1 ∈ ⊥.jac...
import Mathlib.Data.Nat.Choose.Central import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Data.Nat.Multiplicity #align_import data.nat.choose.factorization from "leanprover-community/mathlib"@"dc9db541168768af03fe228703e758e649afdbfc" namespace Nat variable {p n k : ℕ} theorem factorization_choose_le_l...
Mathlib/Data/Nat/Choose/Factorization.lean
55
58
theorem factorization_choose_le_one (p_large : n < p ^ 2) : (choose n k).factorization p ≤ 1 := by
apply factorization_choose_le_log.trans rcases eq_or_ne n 0 with (rfl | hn0); · simp exact Nat.lt_succ_iff.1 (log_lt_of_lt_pow hn0 p_large)
[ " (n.choose k).factorization p ≤ p.log n", " k ≤ n", " (n.choose k).factorization p = 0", " (multiplicity p (n.choose k)).get ⋯ ≤ p.log n", " (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 (p.log n + 1))).card ≤ p.log n", " (n.choose k).factorization p ≤ 1", " p.log n ≤ 1", ...
[ " (n.choose k).factorization p ≤ p.log n", " k ≤ n", " (n.choose k).factorization p = 0", " (multiplicity p (n.choose k)).get ⋯ ≤ p.log n", " (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 (p.log n + 1))).card ≤ p.log n" ]
import Mathlib.Algebra.Group.Commute.Basic import Mathlib.GroupTheory.GroupAction.Basic import Mathlib.Dynamics.PeriodicPts import Mathlib.Data.Set.Pointwise.SMul namespace MulAction open Pointwise variable {α : Type*} variable {G : Type*} [Group G] [MulAction G α] variable {M : Type*} [Monoid M] [MulAction M α] ...
Mathlib/GroupTheory/GroupAction/FixedPoints.lean
65
68
theorem smul_mem_fixedBy_iff_mem_fixedBy {a : α} {g : G} : g • a ∈ fixedBy α g ↔ a ∈ fixedBy α g := by
rw [mem_fixedBy, smul_left_cancel_iff] rfl
[ " fixedBy α g⁻¹ = fixedBy α g", " x✝ ∈ fixedBy α g⁻¹ ↔ x✝ ∈ fixedBy α g", " g • a ∈ fixedBy α g ↔ a ∈ fixedBy α g", " g • a = a ↔ a ∈ fixedBy α g" ]
[ " fixedBy α g⁻¹ = fixedBy α g", " x✝ ∈ fixedBy α g⁻¹ ↔ x✝ ∈ fixedBy α 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
638
639
theorem div_nonneg_iff : 0 ≤ a / b ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0 := by
simp [division_def, mul_nonneg_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" ]
[ " 0 < a / b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0", " a / b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b" ]
import Mathlib.Analysis.NormedSpace.OperatorNorm.Bilinear import Mathlib.Analysis.NormedSpace.OperatorNorm.NNNorm suppress_compilation open Bornology Metric Set Real open Filter hiding map_smul open scoped Classical NNReal Topology Uniformity -- the `ₗ` subscript variables are for special cases about linear (as o...
Mathlib/Analysis/NormedSpace/OperatorNorm/Completeness.lean
246
263
theorem opNorm_extend_le : ‖f.extend e h_dense (uniformEmbedding_of_bound _ h_e).toUniformInducing‖ ≤ N * ‖f‖ := by
-- Add `opNorm_le_of_dense`? refine opNorm_le_bound _ ?_ (isClosed_property h_dense (isClosed_le ?_ ?_) fun x ↦ ?_) · cases le_total 0 N with | inl hN => exact mul_nonneg hN (norm_nonneg _) | inr hN => have : Unique E := ⟨⟨0⟩, fun x ↦ norm_le_zero_iff.mp <| (h_e x).trans (mul_nonpos_of_nonp...
[ " ∀ (x y : Fₗ), ⋯.extend (⇑f) (x + y) = ⋯.extend (⇑f) x + ⋯.extend (⇑f) y", " IsClosed {q | ⋯.extend (⇑f) (q.1 + q.2) = ⋯.extend (⇑f) q.1 + ⋯.extend (⇑f) q.2}", " ∀ (a₁ a₂ : E), ⋯.extend (⇑f) (e a₁ + e a₂) = ⋯.extend (⇑f) (e a₁) + ⋯.extend (⇑f) (e a₂)", " ⋯.extend (⇑f) (e x + e y) = ⋯.extend (⇑f) (e x) + ⋯.ex...
[ " ∀ (x y : Fₗ), ⋯.extend (⇑f) (x + y) = ⋯.extend (⇑f) x + ⋯.extend (⇑f) y", " IsClosed {q | ⋯.extend (⇑f) (q.1 + q.2) = ⋯.extend (⇑f) q.1 + ⋯.extend (⇑f) q.2}", " ∀ (a₁ a₂ : E), ⋯.extend (⇑f) (e a₁ + e a₂) = ⋯.extend (⇑f) (e a₁) + ⋯.extend (⇑f) (e a₂)", " ⋯.extend (⇑f) (e x + e y) = ⋯.extend (⇑f) (e x) + ⋯.ex...
import Mathlib.Analysis.SpecialFunctions.Exp import Mathlib.Data.Nat.Factorization.Basic import Mathlib.Analysis.NormedSpace.Real #align_import analysis.special_functions.log.basic from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable ...
Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
137
139
theorem log_inv (x : ℝ) : log x⁻¹ = -log x := by
by_cases hx : x = 0; · simp [hx] rw [← exp_eq_exp, exp_log_eq_abs (inv_ne_zero hx), exp_neg, exp_log_eq_abs hx, abs_inv]
[ " x.log = expOrderIso.symm ⟨x, hx⟩", " expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩", " |x| = x", " rexp x.log = |x|", " rexp x.log = x", " rexp x.log = -x", " |x| = -x", " x ≤ rexp x.log", " 0 ≤ 1", " x ≤ |x|", " rexp (log 1) = rexp 0", " |x|.log = x.log", " (-x).log = x.log", " x...
[ " x.log = expOrderIso.symm ⟨x, hx⟩", " expOrderIso.symm ⟨|x|, ⋯⟩ = expOrderIso.symm ⟨x, hx⟩", " |x| = x", " rexp x.log = |x|", " rexp x.log = x", " rexp x.log = -x", " |x| = -x", " x ≤ rexp x.log", " 0 ≤ 1", " x ≤ |x|", " rexp (log 1) = rexp 0", " |x|.log = x.log", " (-x).log = x.log", " x...
import Mathlib.Analysis.Analytic.Basic import Mathlib.Combinatorics.Enumerative.Composition #align_import analysis.analytic.composition from "leanprover-community/mathlib"@"ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a" noncomputable section variable {𝕜 : Type*} {E F G H : Type*} open Filter List open scoped Topol...
Mathlib/Analysis/Analytic/Composition.lean
117
127
theorem applyComposition_single (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ} (hn : 0 < n) (v : Fin n → E) : p.applyComposition (Composition.single n hn) v = fun _j => p n v := by
ext j refine p.congr (by simp) fun i hi1 hi2 => ?_ dsimp congr 1 convert Composition.single_embedding hn ⟨i, hi2⟩ using 1 cases' j with j_val j_property have : j_val = 0 := le_bot_iff.1 (Nat.lt_succ_iff.1 j_property) congr! simp
[ " p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE ⋯ i)", " p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE ⋯ i)", " ∀ (i_1 : ℕ) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 → (v ∘ ⇑((Composition.ones n).embedding i)) ⟨i_1, him⟩ = v (Fi...
[ " p.applyComposition (Composition.ones n) = fun v i => (p 1) fun x => v (Fin.castLE ⋯ i)", " p.applyComposition (Composition.ones n) v i = (p 1) fun x => v (Fin.castLE ⋯ i)", " ∀ (i_1 : ℕ) (him : i_1 < (Composition.ones n).blocksFun i),\n i_1 < 1 → (v ∘ ⇑((Composition.ones n).embedding i)) ⟨i_1, him⟩ = v (Fi...
import Mathlib.FieldTheory.Separable import Mathlib.FieldTheory.SplittingField.Construction import Mathlib.Algebra.CharP.Reduced open Function Polynomial class PerfectRing (R : Type*) (p : ℕ) [CommSemiring R] [ExpChar R p] : Prop where bijective_frobenius : Bijective <| frobenius R p section PerfectRing va...
Mathlib/FieldTheory/Perfect.lean
131
133
theorem iterateFrobeniusEquiv_symm : (iterateFrobeniusEquiv R p n).symm = (frobeniusEquiv R p).symm ^ n := by
rw [iterateFrobeniusEquiv_eq_pow]; exact (inv_pow _ _).symm
[ " (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))", " (iterateFrobeniusEquiv R p 0) x = x", " (iterateFrobeniusEquiv R p 1) x = x ^ p", " ⇑(iterateFrobeniusEq...
[ " (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p (m + n)).symm x) =\n (iterateFrobeniusEquiv R p (m + n)) ((iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x))", " (iterateFrobeniusEquiv R p 0) x = x", " (iterateFrobeniusEquiv R p 1) x = x ^ p", " ⇑(iterateFrobeniusEq...
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Order.Field.Defs import Mathlib.Data.Tree.Basic import Mathlib.Logic.Basic import Mathlib.Tactic.NormNum.Core import Mathlib.Util.SynthesizeUsing import Mathlib.Util.Qq open Lean Parser Tactic Mathlib Meta NormNum Qq initialize registerTraceClass `CancelDen...
Mathlib/Tactic/CancelDenoms/Core.lean
63
63
theorem neg_subst {α} [Ring α] {n e t : α} (h1 : n * e = t) : n * -e = -t := by
simp [*]
[ " k * (e1 * e2) = t1 * t2", " k * (e1 / e2) = t1", " e * n = e'", " n * (e1 + e2) = t1 + t2", " n * (e1 - e2) = t1 - t2", " n * -e = -t" ]
[ " k * (e1 * e2) = t1 * t2", " k * (e1 / e2) = t1", " e * n = e'", " n * (e1 + e2) = t1 + t2", " n * (e1 - e2) = t1 - t2" ]
import Mathlib.Data.DFinsupp.Order #align_import data.dfinsupp.multiset from "leanprover-community/mathlib"@"442a83d738cb208d3600056c489be16900ba701d" open Function variable {α : Type*} {β : α → Type*} namespace Multiset variable [DecidableEq α] {s t : Multiset α} def toDFinsupp : Multiset α →+ Π₀ _ : α, ℕ wh...
Mathlib/Data/DFinsupp/Multiset.lean
67
71
theorem toDFinsupp_replicate (a : α) (n : ℕ) : toDFinsupp (Multiset.replicate n a) = DFinsupp.single a n := by
ext i dsimp [toDFinsupp] simp [count_replicate, eq_comm]
[ " toDFinsupp (replicate n a) = DFinsupp.single a n", " (toDFinsupp (replicate n a)) i = (DFinsupp.single a n) i", " count i (replicate n a) = (DFinsupp.single a n) i" ]
[]
import Mathlib.Algebra.GroupPower.IterateHom import Mathlib.Algebra.Polynomial.Eval import Mathlib.GroupTheory.GroupAction.Ring #align_import data.polynomial.derivative from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" noncomputable section open Finset open Polynomial namespace Pol...
Mathlib/Algebra/Polynomial/Derivative.lean
125
126
theorem derivative_of_natDegree_zero {p : R[X]} (hp : p.natDegree = 0) : derivative p = 0 := by
rw [eq_C_of_natDegree_eq_zero hp, derivative_C]
[ " (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q", " ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (a * ↑...
[ " (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) (p + q) =\n (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) p + (fun p => p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) q", " ((p + q).sum fun n a => C (a * ↑n) * X ^ (n - 1)) =\n (p.sum fun n a => C (a * ↑n) * X ^ (n - 1)) + q.sum fun n a => C (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
150
151
theorem codisjoint_left : Codisjoint s t ↔ ∀ ⦃a⦄, a ∉ s → a ∈ t := by
classical simp [codisjoint_iff, eq_univ_iff_forall, or_iff_not_imp_left]
[ " s = univ ↔ ∀ (x : α), x ∈ s", " ↑univ = Set.univ", " x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ", " ↑s = Set.univ ↔ s = univ", " s.Nonempty → s = univ", " s = univ", " y ∈ s", " univ.Nonempty ↔ Nonempty α", " univ = ∅ ↔ IsEmpty α", " Codisjoint s t ↔ ∀ ⦃a : α⦄, a ∉ s → a ∈ t" ]
[ " s = univ ↔ ∀ (x : α), x ∈ s", " ↑univ = Set.univ", " x✝ ∈ ↑univ ↔ x✝ ∈ Set.univ", " ↑s = Set.univ ↔ s = univ", " s.Nonempty → s = univ", " s = univ", " y ∈ s", " univ.Nonempty ↔ Nonempty α", " univ = ∅ ↔ IsEmpty α" ]
import Mathlib.LinearAlgebra.Quotient import Mathlib.RingTheory.Ideal.Operations namespace Submodule open Pointwise variable {R M M' F G : Type*} [CommRing R] [AddCommGroup M] [Module R M] variable {N N₁ N₂ P P₁ P₂ : Submodule R M} def colon (N P : Submodule R M) : Ideal R := annihilator (P.map N.mkQ) #align ...
Mathlib/RingTheory/Ideal/Colon.lean
67
72
theorem mem_colon_singleton {N : Submodule R M} {x : M} {r : R} : r ∈ N.colon (Submodule.span R {x}) ↔ r • x ∈ N := calc r ∈ N.colon (Submodule.span R {x}) ↔ ∀ a : R, r • a • x ∈ N := by
simp [Submodule.mem_colon, Submodule.mem_span_singleton] _ ↔ r • x ∈ N := by simp_rw [fun (a : R) ↦ smul_comm r a x]; exact SetLike.forall_smul_mem_iff
[ " colon I ⊤ = I", " ∀ (x : R), (∀ p ∈ ⊤, x * p ∈ I) ↔ x ∈ I", " ⊥.colon N = N.annihilator", " r ∈ N.colon (span R {x}) ↔ ∀ (a : R), r • a • x ∈ N", " (∀ (a : R), r • a • x ∈ N) ↔ r • x ∈ N", " (∀ (a : R), a • r • x ∈ N) ↔ r • x ∈ N" ]
[ " colon I ⊤ = I", " ∀ (x : R), (∀ p ∈ ⊤, x * p ∈ I) ↔ x ∈ I", " ⊥.colon N = N.annihilator" ]
import Mathlib.Algebra.Polynomial.Monic #align_import algebra.polynomial.big_operators from "leanprover-community/mathlib"@"47adfab39a11a072db552f47594bf8ed2cf8a722" open Finset open Multiset open Polynomial universe u w variable {R : Type u} {ι : Type w} namespace Polynomial variable (s : Finset ι) sectio...
Mathlib/Algebra/Polynomial/BigOperators.lean
57
59
theorem natDegree_sum_le (f : ι → S[X]) : natDegree (∑ i ∈ s, f i) ≤ s.fold max 0 (natDegree ∘ f) := by
simpa using natDegree_multiset_sum_le (s.val.map f)
[ " natDegree 0 ≤ 0", " ∀ (a : List S[X]), (Multiset.sum ⟦a⟧).natDegree ≤ foldr max ⋯ 0 (Multiset.map natDegree ⟦a⟧)", " (∑ i ∈ s, f i).natDegree ≤ Finset.fold max 0 (natDegree ∘ f) s" ]
[ " natDegree 0 ≤ 0", " ∀ (a : List S[X]), (Multiset.sum ⟦a⟧).natDegree ≤ foldr max ⋯ 0 (Multiset.map natDegree ⟦a⟧)" ]
import Mathlib.MeasureTheory.Integral.Lebesgue open Set hiding restrict restrict_apply open Filter ENNReal NNReal MeasureTheory.Measure namespace MeasureTheory variable {α : Type*} {m0 : MeasurableSpace α} {μ : Measure α} noncomputable def Measure.withDensity {m : MeasurableSpace α} (μ : Measure α) (f : α → ℝ≥...
Mathlib/MeasureTheory/Measure/WithDensity.lean
138
142
theorem withDensity_smul_measure (r : ℝ≥0∞) (f : α → ℝ≥0∞) : (r • μ).withDensity f = r • μ.withDensity f := by
ext s hs rw [withDensity_apply _ hs, Measure.coe_smul, Pi.smul_apply, withDensity_apply _ hs, smul_eq_mul, set_lintegral_smul_measure]
[ " (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0", " ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s", " (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ", " (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ", " ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ", " μ.restrict t = μ.restrict s", " withDensity 0 f =...
[ " (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0", " ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s", " (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ", " (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ", " ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ", " μ.restrict t = μ.restrict s", " withDensity 0 f =...
import Mathlib.Probability.Independence.Basic import Mathlib.Probability.Independence.Conditional #align_import probability.independence.zero_one from "leanprover-community/mathlib"@"2f8347015b12b0864dfaf366ec4909eb70c78740" open MeasureTheory MeasurableSpace open scoped MeasureTheory ENNReal namespace Probabili...
Mathlib/Probability/Independence/ZeroOne.lean
33
44
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω} (h_indep : kernel.IndepSet t t κ μα) : ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t)) (measurableSet_generateFrom (Set.mem_singleton t)) filter_upwards [h_indep] with a ha by_cases h0 : κ a t = 0 · exact Or.inl h0 by_cases h_top : κ a t = ∞ · exact Or.inr (Or.inr h_top) rw [← one_mul (κ a (t ∩ t)), Set.inter_sel...
[ " ∀ᵐ (a : α) ∂μα, (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤", " (κ a) t = 0 ∨ (κ a) t = 1 ∨ (κ a) t = ⊤" ]
[]
import Mathlib.Algebra.ContinuedFractions.Basic import Mathlib.Algebra.GroupWithZero.Basic #align_import algebra.continued_fractions.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction section WithDivisionRing variable {K : Type*}...
Mathlib/Algebra/ContinuedFractions/Translations.lean
146
147
theorem zeroth_convergent_eq_h : g.convergents 0 = g.h := by
simp [convergent_eq_num_div_denom, num_eq_conts_a, denom_eq_conts_b, div_one]
[ " ∃ conts, g.continuants n = conts ∧ conts.a = A", " ∃ conts, g.continuants n = conts ∧ conts.b = B", " g.convergents 0 = g.h" ]
[ " ∃ conts, g.continuants n = conts ∧ conts.a = A", " ∃ conts, g.continuants n = conts ∧ conts.b = B" ]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Angle import Mathlib.Analysis.SpecialFunctions.Trigonometric.Inverse #align_import analysis.special_functions.complex.arg from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Filter Metric Set open scoped ComplexConjugate Real To...
Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
40
50
theorem cos_arg {x : ℂ} (hx : x ≠ 0) : Real.cos (arg x) = x.re / abs x := by
rw [arg] split_ifs with h₁ h₂ · rw [Real.cos_arcsin] field_simp [Real.sqrt_sq, (abs.pos hx).le, *] · rw [Real.cos_add_pi, Real.cos_arcsin] field_simp [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs, _root_.abs_of_neg (not_le.1 h₁), *] · rw [Real.cos_sub_pi, Real.cos_arcsin] field_simp [Re...
[ " x.arg.sin = x.im / abs x", " (if 0 ≤ x.re then (x.im / abs x).arcsin\n else if 0 ≤ x.im then ((-x).im / abs x).arcsin + π else ((-x).im / abs x).arcsin - π).sin =\n x.im / abs x", " (x.im / abs x).arcsin.sin = x.im / abs x", " (((-x).im / abs x).arcsin + π).sin = x.im / abs x", " (((-x).im / abs x...
[ " x.arg.sin = x.im / abs x", " (if 0 ≤ x.re then (x.im / abs x).arcsin\n else if 0 ≤ x.im then ((-x).im / abs x).arcsin + π else ((-x).im / abs x).arcsin - π).sin =\n x.im / abs x", " (x.im / abs x).arcsin.sin = x.im / abs x", " (((-x).im / abs x).arcsin + π).sin = x.im / abs x", " (((-x).im / abs x...
import Mathlib.Analysis.Calculus.Deriv.Pow import Mathlib.Analysis.SpecialFunctions.Log.Basic import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Tactic.AdaptationNote #align_import analysis.special_functions.log.deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" ope...
Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean
34
39
theorem hasStrictDerivAt_log_of_pos (hx : 0 < x) : HasStrictDerivAt log x⁻¹ x := by
have : HasStrictDerivAt log (exp <| log x)⁻¹ x := (hasStrictDerivAt_exp <| log x).of_local_left_inverse (continuousAt_log hx.ne') (ne_of_gt <| exp_pos _) <| Eventually.mono (lt_mem_nhds hx) @exp_log rwa [exp_log hx] at this
[ " HasStrictDerivAt log x⁻¹ x" ]
[]
import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.MeasureTheory.Integral.Average #align_import measure_theory.integral.interval_average from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open MeasureTheory Set TopologicalSpace open scoped Interval variable {E : Ty...
Mathlib/MeasureTheory/Integral/IntervalAverage.lean
52
54
theorem interval_average_eq_div (f : ℝ → ℝ) (a b : ℝ) : (⨍ x in a..b, f x) = (∫ x in a..b, f x) / (b - a) := by
rw [interval_average_eq, smul_eq_mul, div_eq_inv_mul]
[ " ⨍ (x : ℝ) in a..b, f x = ⨍ (x : ℝ) in b..a, f x", " ⨍ (x : ℝ) in a..b, f x = (b - a)⁻¹ • ∫ (x : ℝ) in a..b, f x", " ⨍ (x : ℝ) in a..b, f x = (∫ (x : ℝ) in a..b, f x) / (b - a)" ]
[ " ⨍ (x : ℝ) in a..b, f x = ⨍ (x : ℝ) in b..a, f x", " ⨍ (x : ℝ) in a..b, f x = (b - a)⁻¹ • ∫ (x : ℝ) in a..b, f x" ]
import Mathlib.Probability.Kernel.MeasurableIntegral #align_import probability.kernel.composition from "leanprover-community/mathlib"@"3b92d54a05ee592aa2c6181a4e76b1bb7cc45d0b" open MeasureTheory open scoped ENNReal namespace ProbabilityTheory namespace kernel variable {α β ι : Type*} {mα : MeasurableSpace α}...
Mathlib/Probability/Kernel/Composition.lean
99
128
theorem compProdFun_iUnion (κ : kernel α β) (η : kernel (α × β) γ) [IsSFiniteKernel η] (a : α) (f : ℕ → Set (β × γ)) (hf_meas : ∀ i, MeasurableSet (f i)) (hf_disj : Pairwise (Disjoint on f)) : compProdFun κ η a (⋃ i, f i) = ∑' i, compProdFun κ η a (f i) := by
have h_Union : (fun b => η (a, b) {c : γ | (b, c) ∈ ⋃ i, f i}) = fun b => η (a, b) (⋃ i, {c : γ | (b, c) ∈ f i}) := by ext1 b congr with c simp only [Set.mem_iUnion, Set.iSup_eq_iUnion, Set.mem_setOf_eq] rw [compProdFun, h_Union] have h_tsum : (fun b => η (a, b) (⋃ i, {c : γ | (b, c) ∈ ...
[ " compProdFun κ η a ∅ = 0", " compProdFun κ η a (⋃ i, f i) = ∑' (i : ℕ), compProdFun κ η a (f i)", " (fun b => (η (a, b)) {c | (b, c) ∈ ⋃ i, f i}) = fun b => (η (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " (η (a, b)) {c | (b, c) ∈ ⋃ i, f i} = (η (a, b)) (⋃ i, {c | (b, c) ∈ f i})", " c ∈ {c | (b, c) ∈ ⋃ i, f i} ↔ c...
[ " compProdFun κ η a ∅ = 0" ]
import Mathlib.Analysis.Convex.Between import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.Topology import Mathlib.Analysis.Normed.Group.Pointwise import Mathlib.Analysis.NormedSpace.AddTorsor #align_import analysis.convex.normed from "leanprover-community/mathlib"@"a63928c34ec358b5edcda2bf7513c50052...
Mathlib/Analysis/Convex/Normed.lean
102
108
theorem convexHull_ediam (s : Set E) : EMetric.diam (convexHull ℝ s) = EMetric.diam s := by
refine (EMetric.diam_le fun x hx y hy => ?_).antisymm (EMetric.diam_mono <| subset_convexHull ℝ s) rcases convexHull_exists_dist_ge2 hx hy with ⟨x', hx', y', hy', H⟩ rw [edist_dist] apply le_trans (ENNReal.ofReal_le_ofReal H) rw [← edist_dist] exact EMetric.edist_le_diam_of_mem hx' hy'
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖", " ConvexOn ℝ s fun z' => dist z' z", " Convex ℝ (ball a r)", " Convex ℝ (closedBall a r)", " Convex ℝ (Metric.thickening δ s)", " Convex ℝ (s + ball 0 δ)", " Convex ℝ (Metric.cthickening δ s)", " Convex ℝ (⋂ ε, ⋂ (_ : δ < ε), Metric.thickening ε s)", " Conve...
[ " ‖a • x‖ + ‖b • y‖ = a * ‖x‖ + b * ‖y‖", " ConvexOn ℝ s fun z' => dist z' z", " Convex ℝ (ball a r)", " Convex ℝ (closedBall a r)", " Convex ℝ (Metric.thickening δ s)", " Convex ℝ (s + ball 0 δ)", " Convex ℝ (Metric.cthickening δ s)", " Convex ℝ (⋂ ε, ⋂ (_ : δ < ε), Metric.thickening ε s)", " Conve...
import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv #align_import linear_algebra.quadratic_form.prod from "leanprover-community/mathlib"@"9b2755b951bc323c962bd072cd447b375cf58101" universe u v w variable {ι : Type*} {R : Type*} {M₁ M₂ N₁ N₂ : Type*} {Mᵢ Nᵢ : ι → Type*} namespace QuadraticForm section Pro...
Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
137
147
theorem anisotropic_of_prod {R} [OrderedCommRing R] [Module R M₁] [Module R M₂] {Q₁ : QuadraticForm R M₁} {Q₂ : QuadraticForm R M₂} (h : (Q₁.prod Q₂).Anisotropic) : Q₁.Anisotropic ∧ Q₂.Anisotropic := by
simp_rw [Anisotropic, prod_apply, Prod.forall, Prod.mk_eq_zero] at h constructor · intro x hx refine (h x 0 ?_).1 rw [hx, zero_add, map_zero] · intro x hx refine (h 0 x ?_).2 rw [hx, add_zero, map_zero]
[ " (Q₁.prod Q₂) ((LinearMap.inl R M₁ M₂).toFun m₁) = Q₁ m₁", " (Q₁.prod Q₂) ((LinearMap.inr R M₁ M₂).toFun m₁) = Q₂ m₁", " Q₁ ((LinearMap.fst R M₁ M₂).toFun m₁) = (Q₁.prod 0) m₁", " Q₂ ((LinearMap.snd R M₁ M₂).toFun m₁) = (prod 0 Q₂) m₁", " Q₁.Anisotropic ∧ Q₂.Anisotropic", " Q₁.Anisotropic", " x = 0", ...
[ " (Q₁.prod Q₂) ((LinearMap.inl R M₁ M₂).toFun m₁) = Q₁ m₁", " (Q₁.prod Q₂) ((LinearMap.inr R M₁ M₂).toFun m₁) = Q₂ m₁", " Q₁ ((LinearMap.fst R M₁ M₂).toFun m₁) = (Q₁.prod 0) m₁", " Q₂ ((LinearMap.snd R M₁ M₂).toFun m₁) = (prod 0 Q₂) m₁" ]
import Mathlib.Algebra.Order.Ring.Nat import Mathlib.Combinatorics.SetFamily.Compression.Down import Mathlib.Order.UpperLower.Basic import Mathlib.Data.Fintype.Powerset #align_import combinatorics.set_family.harris_kleitman from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205" open Finset...
Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean
103
110
theorem IsUpperSet.card_inter_le_finset (h𝒜 : IsUpperSet (𝒜 : Set (Finset α))) (hℬ : IsLowerSet (ℬ : Set (Finset α))) : 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card ≤ 𝒜.card * ℬ.card := by
rw [← isLowerSet_compl, ← coe_compl] at h𝒜 have := h𝒜.le_card_inter_finset hℬ rwa [card_compl, Fintype.card_finset, tsub_mul, tsub_le_iff_tsub_le, ← mul_tsub, ← card_sdiff inter_subset_right, sdiff_inter_self_right, sdiff_compl, _root_.inf_comm] at this
[ " s ∈ ↑(Finset.nonMemberSubfamily a 𝒜) → t ∈ ↑(Finset.nonMemberSubfamily a 𝒜)", " s ∈ 𝒜 ∧ a ∉ s → t ∈ 𝒜 ∧ a ∉ t", " IsLowerSet ↑(Finset.memberSubfamily a 𝒜)", " s ∈ ↑(Finset.memberSubfamily a 𝒜) → t ∈ ↑(Finset.memberSubfamily a 𝒜)", " insert a s ∈ 𝒜 ∧ a ∉ s → insert a t ∈ 𝒜 ∧ a ∉ t", " s ∈ Finset...
[ " s ∈ ↑(Finset.nonMemberSubfamily a 𝒜) → t ∈ ↑(Finset.nonMemberSubfamily a 𝒜)", " s ∈ 𝒜 ∧ a ∉ s → t ∈ 𝒜 ∧ a ∉ t", " IsLowerSet ↑(Finset.memberSubfamily a 𝒜)", " s ∈ ↑(Finset.memberSubfamily a 𝒜) → t ∈ ↑(Finset.memberSubfamily a 𝒜)", " insert a s ∈ 𝒜 ∧ a ∉ s → insert a t ∈ 𝒜 ∧ a ∉ t", " s ∈ Finset...
import Mathlib.Analysis.NormedSpace.Basic import Mathlib.Analysis.Normed.Group.Hom import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Ideal.QuotientOperations import Mathlib.Topology.MetricSpace.HausdorffDistance #align_import analysis.normed.group.quotient from "leanprover-community/mathlib"@"2196ab363eb097c008...
Mathlib/Analysis/Normed/Group/Quotient.lean
141
144
theorem quotient_norm_neg {S : AddSubgroup M} (x : M ⧸ S) : ‖-x‖ = ‖x‖ := by
simp only [AddSubgroup.quotient_norm_eq] congr 1 with r constructor <;> { rintro ⟨m, hm, rfl⟩; use -m; simpa [neg_eq_iff_eq_neg] using hm }
[ " ‖x‖ = infDist 0 {m | ↑m = x}", " ‖↑x‖ = infDist x ↑S", " infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S", " y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S", " ‖-x‖ = ‖x‖", " sInf (norm '' {m | ↑m = -x}) = sInf (norm '' {m | ↑m = x})", " r ∈ norm '' {m | ↑m...
[ " ‖x‖ = infDist 0 {m | ↑m = x}", " ‖↑x‖ = infDist x ↑S", " infDist x (⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x}) = infDist x ↑S", " y ∈ ⇑(IsometryEquiv.subLeft x).symm ⁻¹' {m | ↑m = ↑x} ↔ y ∈ ↑S" ]
import Mathlib.CategoryTheory.Sites.Whiskering import Mathlib.CategoryTheory.Sites.Plus #align_import category_theory.sites.compatible_plus from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section namespace CategoryTheory.GrothendieckTopology open CategoryTheory Limits...
Mathlib/CategoryTheory/Sites/CompatiblePlus.lean
115
128
theorem ι_plusCompIso_hom (X) (W) : F.map (colimit.ι _ W) ≫ (J.plusCompIso F P).hom.app X = (J.diagramCompIso F P X.unop).hom.app W ≫ colimit.ι _ W := by
delta diagramCompIso plusCompIso simp only [IsColimit.descCoconeMorphism_hom, IsColimit.uniqueUpToIso_hom, Cocones.forget_map, Iso.trans_hom, NatIso.ofComponents_hom_app, Functor.mapIso_hom, ← Category.assoc] erw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P (unop X)))).fac] simp only [Categ...
[ " (J.diagram P X ⋙ F).obj W ≅ (J.diagram (P ⋙ F) X).obj W", " (J.diagram P X ⋙ F).obj W ≅ limit ((W.unop.index P).multicospan ⋙ F)", " ∀ {X_1 Y : (J.Cover X)ᵒᵖ} (f : X_1 ⟶ Y),\n (J.diagram P X ⋙ F).map f ≫\n ((fun W =>\n (isLimitOfPreserves F (limit.isLimit (W.unop.index P).multicospan))....
[ " (J.diagram P X ⋙ F).obj W ≅ (J.diagram (P ⋙ F) X).obj W", " (J.diagram P X ⋙ F).obj W ≅ limit ((W.unop.index P).multicospan ⋙ F)", " ∀ {X_1 Y : (J.Cover X)ᵒᵖ} (f : X_1 ⟶ Y),\n (J.diagram P X ⋙ F).map f ≫\n ((fun W =>\n (isLimitOfPreserves F (limit.isLimit (W.unop.index P).multicospan))....
import Mathlib.Topology.MetricSpace.HausdorffDistance import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import measure_theory.measure.regular from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf" open Set Filter ENNReal Topology NNReal TopologicalSpace namespace MeasureTh...
Mathlib/MeasureTheory/Measure/Regular.lean
339
344
theorem _root_.Set.exists_isOpen_lt_of_lt [OuterRegular μ] (A : Set α) (r : ℝ≥0∞) (hr : μ A < r) : ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < r := by
rcases OuterRegular.outerRegular (measurableSet_toMeasurable μ A) r (by rwa [measure_toMeasurable]) with ⟨U, hAU, hUo, hU⟩ exact ⟨U, (subset_toMeasurable _ _).trans hAU, hUo, hU⟩
[ " ∃ U ⊇ A, IsOpen U ∧ μ U < r", " r > ?m.3205 (toMeasurable μ A)" ]
[]
import Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity #align_import number_theory.legendre_symbol.jacobi_symbol from "leanprover-community/mathlib"@"74a27133cf29446a0983779e37c8f829a85368f3" section Jacobi open Nat ZMod -- Since we need the fact that the factors are prime, we use `List.pmap`. def ...
Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean
122
126
theorem mul_right' (a : ℤ) {b₁ b₂ : ℕ} (hb₁ : b₁ ≠ 0) (hb₂ : b₂ ≠ 0) : J(a | b₁ * b₂) = J(a | b₁) * J(a | b₂) := by
rw [jacobiSym, ((perm_factors_mul hb₁ hb₂).pmap _).prod_eq, List.pmap_append, List.prod_append] case h => exact fun p hp => (List.mem_append.mp hp).elim prime_of_mem_factors prime_of_mem_factors case _ => rfl
[ " J(a | 0) = 1", " J(a | 1) = 1", " legendreSym p a = J(a | p)", " J(a | b₁ * b₂) = J(a | b₁) * J(a | b₂)", " ∀ a ∈ b₁.factors ++ b₂.factors, a.Prime", " (List.pmap (fun p pp => legendreSym p a) b₁.factors ⋯).prod *\n (List.pmap (fun p pp => legendreSym p a) b₂.factors ⋯).prod =\n J(a | b₁) * J(a ...
[ " J(a | 0) = 1", " J(a | 1) = 1", " legendreSym p a = J(a | p)" ]
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv import Mathlib.Analysis.SpecialFunctions.Log.Basic #align_import analysis.special_functions.arsinh from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" noncomputable section open Function Filter Set open scoped Topology name...
Mathlib/Analysis/SpecialFunctions/Arsinh.lean
57
61
theorem exp_arsinh (x : ℝ) : exp (arsinh x) = x + √(1 + x ^ 2) := by
apply exp_log rw [← neg_lt_iff_pos_add'] apply lt_sqrt_of_sq_lt simp
[ " rexp x.arsinh = x + √(1 + x ^ 2)", " 0 < x + √(1 + x ^ 2)", " -x < √(1 + x ^ 2)", " (-x) ^ 2 < 1 + x ^ 2" ]
[]
import Mathlib.MeasureTheory.Integral.SetIntegral import Mathlib.MeasureTheory.Measure.Lebesgue.Basic import Mathlib.MeasureTheory.Measure.Haar.Unique #align_import measure_theory.measure.lebesgue.integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844" open Set Filter MeasureTheory...
Mathlib/MeasureTheory/Measure/Lebesgue/Integral.lean
55
69
theorem Real.integrable_of_summable_norm_Icc {E : Type*} [NormedAddCommGroup E] {f : C(ℝ, E)} (hf : Summable fun n : ℤ => ‖(f.comp <| ContinuousMap.addRight n).restrict (Icc 0 1)‖) : Integrable f := by
refine integrable_of_summable_norm_restrict (.of_nonneg_of_le (fun n : ℤ => mul_nonneg (norm_nonneg (f.restrict (⟨Icc (n : ℝ) ((n : ℝ) + 1), isCompact_Icc⟩ : Compacts ℝ))) ENNReal.toReal_nonneg) (fun n => ?_) hf) ?_ · simp only [Compacts.coe_mk, Real.volume_Icc, add_sub_cancel_left, ENNReal...
[ " Integrable (⇑f) volume", " ‖ContinuousMap.restrict (↑{ carrier := Icc (↑n) (↑n + 1), isCompact' := ⋯ }) f‖ *\n (volume ↑{ carrier := Icc (↑n) (↑n + 1), isCompact' := ⋯ }).toReal ≤\n ‖ContinuousMap.restrict (Icc 0 1) (f.comp (ContinuousMap.addRight ↑n))‖", " ∀ (x : ↑(Icc (↑n) (↑n + 1))),\n ‖(Continu...
[]
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
51
53
theorem tendsto_pi {β : Type*} {m : β → ∀ i, α i} {l : Filter β} : Tendsto m l (pi f) ↔ ∀ i, Tendsto (fun x => m x i) l (f i) := by
simp only [pi, tendsto_iInf, tendsto_comap_iff]; rfl
[ " Tendsto m l (pi f) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)", " (∀ (i : ι), Tendsto (eval i ∘ m) l (f i)) ↔ ∀ (i : ι), Tendsto (fun x => m x i) l (f i)" ]
[]
import Mathlib.Analysis.NormedSpace.Banach import Mathlib.Analysis.NormedSpace.OperatorNorm.NormedSpace import Mathlib.Topology.PartialHomeomorph #align_import analysis.calculus.inverse from "leanprover-community/mathlib"@"2c1d8ca2812b64f88992a5294ea3dba144755cd1" open Function Set Filter Metric open scoped Topolo...
Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
76
77
theorem approximatesLinearOn_empty (f : E → F) (f' : E →L[𝕜] F) (c : ℝ≥0) : ApproximatesLinearOn f f' ∅ c := by
simp [ApproximatesLinearOn]
[ " ApproximatesLinearOn f f' ∅ c" ]
[]
import Mathlib.Analysis.Convex.Jensen import Mathlib.Analysis.Convex.SpecificFunctions.Basic import Mathlib.Analysis.SpecialFunctions.Pow.NNReal import Mathlib.Data.Real.ConjExponents #align_import analysis.mean_inequalities from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" universe u...
Mathlib/Analysis/MeanInequalities.lean
138
148
theorem geom_mean_le_arith_mean {ι : Type*} (s : Finset ι) (w : ι → ℝ) (z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : 0 < ∑ i ∈ s, w i) (hz : ∀ i ∈ s, 0 ≤ z i) : (∏ i ∈ s, z i ^ w i) ^ (∑ i ∈ s, w i)⁻¹ ≤ (∑ i ∈ s, w i * z i) / (∑ i ∈ s, w i) := by
convert geom_mean_le_arith_mean_weighted s (fun i => (w i) / ∑ i ∈ s, w i) z ?_ ?_ hz using 2 · rw [← finset_prod_rpow _ _ (fun i hi => rpow_nonneg (hz _ hi) _) _] refine Finset.prod_congr rfl (fun _ ih => ?_) rw [div_eq_mul_inv, rpow_mul (hz _ ih)] · simp_rw [div_eq_mul_inv, mul_assoc, mul_comm, ← mul_a...
[ " ∏ i ∈ s, z i ^ w i ≤ ∑ i ∈ s, w i * z i", " 0 ≤ ∑ i ∈ s, w i * z i", " z i ^ w i = 0", " 0 ^ w i = 0", " ∏ i ∈ s, z i ^ w i = ∏ x ∈ s, rexp ((z x).log * w x)", " ∑ i ∈ s, w i * z i = ∑ x ∈ s, w x * rexp (z x).log", " ∀ x ∈ s, z x ^ w x = rexp ((z x).log * w x)", " ∀ x ∈ s, w x * z x = w x * rexp (z ...
[ " ∏ i ∈ s, z i ^ w i ≤ ∑ i ∈ s, w i * z i", " 0 ≤ ∑ i ∈ s, w i * z i", " z i ^ w i = 0", " 0 ^ w i = 0", " ∏ i ∈ s, z i ^ w i = ∏ x ∈ s, rexp ((z x).log * w x)", " ∑ i ∈ s, w i * z i = ∑ x ∈ s, w x * rexp (z x).log", " ∀ x ∈ s, z x ^ w x = rexp ((z x).log * w x)", " ∀ x ∈ s, w x * z x = w x * rexp (z ...
import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.Finsupp.Defs import Mathlib.Data.Finset.Pairwise #align_import data.finsupp.big_operators from "leanprover-community/mathlib"@"59694bd07f0a39c5beccba34bd9f413a160782bf" variable {ι M : Type*} [DecidableEq ι] theorem List.support_sum_subset [Add...
Mathlib/Data/Finsupp/BigOperators.lean
48
52
theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M)) : s.sum.support ⊆ (s.map Finsupp.support).sup := by
induction s using Quot.inductionOn simpa only [Multiset.quot_mk_to_coe'', Multiset.sum_coe, Multiset.map_coe, Multiset.sup_coe, List.foldr_map] using List.support_sum_subset _
[ " l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l", " [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []", " (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)", " (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)", " hd.support ⊆ hd.support",...
[ " l.sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l", " [].sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ []", " (hd :: tl).sum.support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)", " (hd + tl.sum).support ⊆ foldr (fun x x_1 => x.support ⊔ x_1) ∅ (hd :: tl)", " hd.support ⊆ hd.support" ...
import Mathlib.Algebra.MvPolynomial.Degrees #align_import data.mv_polynomial.variables from "leanprover-community/mathlib"@"2f5b500a507264de86d666a5f87ddb976e2d8de4" noncomputable section open Set Function Finsupp AddMonoidAlgebra universe u v w variable {R : Type u} {S : Type v} namespace MvPolynomial varia...
Mathlib/Algebra/MvPolynomial/Variables.lean
217
217
theorem vars_map : (map f p).vars ⊆ p.vars := by
classical simp [vars_def, degrees_map]
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support", " (C r).vars = ∅", " (X n).vars = {n}", " i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars ⊆ p.vars ∪ q.vars", " x ∈ p.vars ∪ q....
[ " p.vars = p.degrees.toFinset", " p.degrees.toFinset = p.degrees.toFinset", " vars 0 = ∅", " ((monomial s) r).vars = s.support", " (C r).vars = ∅", " (X n).vars = {n}", " i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support", " x v = 0", " v ∈ f.vars", " (p + q).vars ⊆ p.vars ∪ q.vars", " x ∈ p.vars ∪ q....
import Mathlib.Algebra.MonoidAlgebra.Support import Mathlib.Algebra.Polynomial.Basic import Mathlib.Algebra.Regular.Basic import Mathlib.Data.Nat.Choose.Sum #align_import data.polynomial.coeff from "leanprover-community/mathlib"@"2651125b48fc5c170ab1111afd0817c903b1fc6c" set_option linter.uppercaseLean3 false no...
Mathlib/Algebra/Polynomial/Coeff.lean
53
57
theorem coeff_smul [SMulZeroClass S R] (r : S) (p : R[X]) (n : ℕ) : coeff (r • p) n = r • coeff p n := by
rcases p with ⟨⟩ simp_rw [← ofFinsupp_smul, coeff] exact Finsupp.smul_apply _ _ _
[ " (p + q).coeff n = p.coeff n + q.coeff n", " ({ toFinsupp := toFinsupp✝ } + q).coeff n = { toFinsupp := toFinsupp✝ }.coeff n + q.coeff n", " ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).coeff n =\n { toFinsupp := toFinsupp✝¹ }.coeff n + { toFinsupp := toFinsupp✝ }.coeff n", " (toFinsupp✝¹ ...
[ " (p + q).coeff n = p.coeff n + q.coeff n", " ({ toFinsupp := toFinsupp✝ } + q).coeff n = { toFinsupp := toFinsupp✝ }.coeff n + q.coeff n", " ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).coeff n =\n { toFinsupp := toFinsupp✝¹ }.coeff n + { toFinsupp := toFinsupp✝ }.coeff n", " (toFinsupp✝¹ ...
import Mathlib.Probability.Martingale.Convergence import Mathlib.Probability.Martingale.OptionalStopping import Mathlib.Probability.Martingale.Centering #align_import probability.martingale.borel_cantelli from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" open Filter open scoped NNRea...
Mathlib/Probability/Martingale/BorelCantelli.lean
101
115
theorem Submartingale.stoppedValue_leastGE [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ) (r : ℝ) : Submartingale (fun i => stoppedValue f (leastGE f r i)) ℱ μ := by
rw [submartingale_iff_expected_stoppedValue_mono] · intro σ π hσ hπ hσ_le_π hπ_bdd obtain ⟨n, hπ_le_n⟩ := hπ_bdd simp_rw [stoppedValue_stoppedValue_leastGE f σ r fun i => (hσ_le_π i).trans (hπ_le_n i)] simp_rw [stoppedValue_stoppedValue_leastGE f π r hπ_le_n] refine hf.expected_stoppedValue_mono ?_...
[ " leastGE f r (π ω) ω = min (π ω) (leastGE f r n ω)", " min (π ω) (leastGE f r n ω) ≤ leastGE f r (π ω) ω", " π ω ≤ hitting f (Set.Ici r) 0 (π ω) ω", " leastGE f r n ω = hitting f (Set.Ici r) 0 (π ω) ω", " ∃ j ∈ Set.Icc 0 (π ω), f j ω ∈ Set.Ici r", " stoppedValue (fun i => stoppedValue f (leastGE f r i)) ...
[ " leastGE f r (π ω) ω = min (π ω) (leastGE f r n ω)", " min (π ω) (leastGE f r n ω) ≤ leastGE f r (π ω) ω", " π ω ≤ hitting f (Set.Ici r) 0 (π ω) ω", " leastGE f r n ω = hitting f (Set.Ici r) 0 (π ω) ω", " ∃ j ∈ Set.Icc 0 (π ω), f j ω ∈ Set.Ici r", " stoppedValue (fun i => stoppedValue f (leastGE f r i)) ...
import Mathlib.Algebra.Homology.ImageToKernel #align_import algebra.homology.exact from "leanprover-community/mathlib"@"3feb151caefe53df080ca6ca67a0c6685cfd1b82" universe v v₂ u u₂ open CategoryTheory CategoryTheory.Limits variable {V : Type u} [Category.{v} V] variable [HasImages V] namespace CategoryTheory ...
Mathlib/Algebra/Homology/Exact.lean
140
144
theorem comp_eq_zero_of_image_eq_kernel {A B C : V} (f : A ⟶ B) (g : B ⟶ C) (p : imageSubobject f = kernelSubobject g) : f ≫ g = 0 := by
suffices Subobject.arrow (imageSubobject f) ≫ g = 0 by rw [← imageSubobject_arrow_comp f, Category.assoc, this, comp_zero] rw [p, kernelSubobject_arrow_comp]
[ " homology' f g ⋯ ≅ 0", " Exact f g", " cokernel.π (imageToKernel f g w) ≫ i.hom = 0 ≫ i.hom", " Exact f₂ g₂", " ∃ (w : f₂ ≫ g₂ = 0), Nonempty (homology' f₂ g₂ w ≅ 0)", " f₂ ≫ g₂ = 0", " (α.hom.left ≫ f₂ ≫ g₂) ≫ β.inv.right = f₁ ≫ g₁", " α.symm.hom.right = β.symm.hom.left", " α.symm.hom.right ≫ α.ho...
[ " homology' f g ⋯ ≅ 0", " Exact f g", " cokernel.π (imageToKernel f g w) ≫ i.hom = 0 ≫ i.hom", " Exact f₂ g₂", " ∃ (w : f₂ ≫ g₂ = 0), Nonempty (homology' f₂ g₂ w ≅ 0)", " f₂ ≫ g₂ = 0", " (α.hom.left ≫ f₂ ≫ g₂) ≫ β.inv.right = f₁ ≫ g₁", " α.symm.hom.right = β.symm.hom.left", " α.symm.hom.right ≫ α.ho...
import Mathlib.Data.List.Chain import Mathlib.Data.List.Enum import Mathlib.Data.List.Nodup import Mathlib.Data.List.Pairwise import Mathlib.Data.List.Zip #align_import data.list.range from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" set_option autoImplicit true universe u open Nat...
Mathlib/Data/List/Range.lean
92
93
theorem nodup_range (n : ℕ) : Nodup (range n) := by
simp (config := {decide := true}) only [range_eq_range', nodup_range']
[ " (range' n m).nthLe i H = n + i", " Pairwise (fun x x_1 => x < x_1) (range n)", " take m (range n) = range (min m n)", " (take m (range n)).length = (range (min m n)).length", " ∀ (n_1 : ℕ) (h₁ : n_1 < (take m (range n)).length) (h₂ : n_1 < (range (min m n)).length),\n (take m (range n)).get ⟨n_1, h₁⟩ =...
[ " (range' n m).nthLe i H = n + i", " Pairwise (fun x x_1 => x < x_1) (range n)", " take m (range n) = range (min m n)", " (take m (range n)).length = (range (min m n)).length", " ∀ (n_1 : ℕ) (h₁ : n_1 < (take m (range n)).length) (h₂ : n_1 < (range (min m n)).length),\n (take m (range n)).get ⟨n_1, h₁⟩ =...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Add #align_import analysis.calculus.deriv.add from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" universe u v w open scoped Classical open Topology Filter ENNReal open Filter Asymptotics Set variable...
Mathlib/Analysis/Calculus/Deriv/Add.lean
208
210
theorem derivWithin.neg (hxs : UniqueDiffWithinAt 𝕜 s x) : derivWithin (fun y => -f y) s x = -derivWithin f s x := by
simp only [derivWithin, fderivWithin_neg hxs, ContinuousLinearMap.neg_apply]
[ " HasDerivAtFilter (fun x => -f x) (-f') x L", " HasStrictDerivAt (fun x => -f x) (-f') x", " derivWithin (fun y => -f y) s x = -derivWithin f s x" ]
[ " HasDerivAtFilter (fun x => -f x) (-f') x L", " HasStrictDerivAt (fun x => -f x) (-f') x" ]
import Mathlib.AlgebraicGeometry.Spec import Mathlib.Algebra.Category.Ring.Constructions import Mathlib.CategoryTheory.Elementwise #align_import algebraic_geometry.Scheme from "leanprover-community/mathlib"@"88474d1b5af6d37c2ab728b757771bced7f5194c" -- Explicit universe annotations were used in this file to improv...
Mathlib/AlgebraicGeometry/Scheme.lean
144
146
theorem comp_val_base_apply {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) (x : X) : (f ≫ g).val.base x = g.val.base (f.val.base x) := by
simp
[ " U = U", " { unop := U } = { unop := U }", " { unop := { carrier := carrier✝, is_open' := is_open'✝ } } =\n { unop := { carrier := carrier✝, is_open' := is_open'✝ } }", " (f ≫ g).val.base x = g.val.base (f.val.base x)" ]
[ " U = U", " { unop := U } = { unop := U }", " { unop := { carrier := carrier✝, is_open' := is_open'✝ } } =\n { unop := { carrier := carrier✝, is_open' := is_open'✝ } }" ]
import Mathlib.Algebra.IsPrimePow import Mathlib.Data.Nat.Factorization.Basic #align_import data.nat.factorization.prime_pow from "leanprover-community/mathlib"@"6ca1a09bc9aa75824bf97388c9e3b441fc4ccf3f" variable {R : Type*} [CommMonoidWithZero R] (n p : R) (k : ℕ) theorem IsPrimePow.minFac_pow_factorization_eq ...
Mathlib/Data/Nat/Factorization/PrimePow.lean
57
60
theorem isPrimePow_iff_card_primeFactors_eq_one {n : ℕ} : IsPrimePow n ↔ n.primeFactors.card = 1 := by
simp_rw [isPrimePow_iff_factorization_eq_single, ← Nat.support_factorization, Finsupp.card_support_eq_one', pos_iff_ne_zero]
[ " n.minFac ^ n.factorization n.minFac = n", " (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k", " IsPrimePow n", " IsPrimePow 0", " 0 < n.factorization n.minFac", " IsPrimePow n ↔ ∃ p k, 0 < k ∧ n.factorization = Finsupp.single p k", " (∃ p k, p.Prime ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p k, 0 < k ∧ ...
[ " n.minFac ^ n.factorization n.minFac = n", " (p ^ k).minFac ^ (p ^ k).factorization (p ^ k).minFac = p ^ k", " IsPrimePow n", " IsPrimePow 0", " 0 < n.factorization n.minFac", " IsPrimePow n ↔ ∃ p k, 0 < k ∧ n.factorization = Finsupp.single p k", " (∃ p k, p.Prime ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p k, 0 < k ∧ ...
import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.LocalRing #align_import data.polynomial.expand from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821" universe u v w open Polynomial open Finset namespace Polynomial section CommSemiring variable (R : Type u) [...
Mathlib/Algebra/Polynomial/Expand.lean
100
117
theorem coeff_expand {p : ℕ} (hp : 0 < p) (f : R[X]) (n : ℕ) : (expand R p f).coeff n = if p ∣ n then f.coeff (n / p) else 0 := by
simp only [expand_eq_sum] simp_rw [coeff_sum, ← pow_mul, C_mul_X_pow_eq_monomial, coeff_monomial, sum] split_ifs with h · rw [Finset.sum_eq_single (n / p), Nat.mul_div_cancel' h, if_pos rfl] · intro b _ hb2 rw [if_neg] intro hb3 apply hb2 rw [← hb3, Nat.mul_div_cancel_left b hp] ...
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r", " (expand R p) ((expand R q) (C r)) = (expand R (p * q)) (C r)", " (expand R p) ((expand R q) (f + g)) = (expand R (p * q)) (f + g)", " (expand R p) ((expand R q) (C r * X ^ (n + 1))) = (expand R...
[ " (expand R p) f = f.sum fun e a => C a * (X ^ p) ^ e", " (expand R p) ((monomial q) r) = (monomial (q * p)) r", " (expand R p) ((expand R q) (C r)) = (expand R (p * q)) (C r)", " (expand R p) ((expand R q) (f + g)) = (expand R (p * q)) (f + g)", " (expand R p) ((expand R q) (C r * X ^ (n + 1))) = (expand R...
import Mathlib.Topology.Separation import Mathlib.Algebra.BigOperators.Finprod #align_import topology.algebra.infinite_sum.basic from "leanprover-community/mathlib"@"3b52265189f3fb43aa631edffce5d060fafaf82f" noncomputable section open Filter Function open scoped Topology variable {α β γ : Type*} section HasP...
Mathlib/Topology/Algebra/InfiniteSum/Defs.lean
174
175
theorem HasProd.unique {a₁ a₂ : α} [T2Space α] : HasProd f a₁ → HasProd f a₂ → a₁ = a₂ := by
classical exact tendsto_nhds_unique
[ " ∏' (b : β), f b = 1", " HasProd (f ∘ g) a ↔ HasProd f a", " ∀ x ∉ Set.range fun a => ↑a, f x = 1", " HasProd (f ∘ Subtype.val) (∏ b ∈ s, f b)", " HasProd (f ∘ Subtype.val) (∏ x ∈ s.attach, f ↑x)", " HasProd f (∏' (b : β), f b)", " HasProd f (if (mulSupport fun b => f b).Finite then ∏ᶠ (b : β), f b els...
[ " ∏' (b : β), f b = 1", " HasProd (f ∘ g) a ↔ HasProd f a", " ∀ x ∉ Set.range fun a => ↑a, f x = 1", " HasProd (f ∘ Subtype.val) (∏ b ∈ s, f b)", " HasProd (f ∘ Subtype.val) (∏ x ∈ s.attach, f ↑x)", " HasProd f (∏' (b : β), f b)", " HasProd f (if (mulSupport fun b => f b).Finite then ∏ᶠ (b : β), f b els...
import Mathlib.CategoryTheory.Limits.Shapes.ZeroMorphisms import Mathlib.CategoryTheory.Limits.Shapes.Kernels import Mathlib.CategoryTheory.Abelian.Basic import Mathlib.CategoryTheory.Subobject.Lattice import Mathlib.Order.Atoms #align_import category_theory.simple from "leanprover-community/mathlib"@"4ed0bcaef698011...
Mathlib/CategoryTheory/Simple.lean
96
100
theorem epi_of_nonzero_to_simple [HasEqualizers C] {X Y : C} [Simple Y] {f : X ⟶ Y} [HasImage f] (w : f ≠ 0) : Epi f := by
rw [← image.fac f] haveI : IsIso (image.ι f) := isIso_of_mono_of_nonzero fun h => w (eq_zero_of_image_eq_zero h) apply epi_comp
[ " IsIso f ↔ f ≠ 0", " IsIso f → f ≠ 0", " False", " IsIso (f ≫ i.hom)", " f ≠ 0 → IsIso f", " IsIso f", " f ≫ i.hom ≠ 0", " f = 0", " IsIso ((f ≫ i.hom) ≫ i.inv)", " kernel.ι f = 0", " Epi f", " Epi (factorThruImage f ≫ image.ι f)" ]
[ " IsIso f ↔ f ≠ 0", " IsIso f → f ≠ 0", " False", " IsIso (f ≫ i.hom)", " f ≠ 0 → IsIso f", " IsIso f", " f ≫ i.hom ≠ 0", " f = 0", " IsIso ((f ≫ i.hom) ≫ i.inv)", " kernel.ι f = 0" ]
import Mathlib.Data.List.Basic import Mathlib.Data.Sigma.Basic #align_import data.list.prod_sigma from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" variable {α β : Type*} namespace List @[simp] theorem nil_product (l : List β) : (@nil α) ×ˢ l = [] := rfl #align list.nil_product...
Mathlib/Data/List/ProdSigma.lean
89
93
theorem length_sigma' (l₁ : List α) (l₂ : ∀ a, List (σ a)) : length (l₁.sigma l₂) = Nat.sum (l₁.map fun a ↦ length (l₂ a)) := by
induction' l₁ with x l₁ IH · rfl · simp only [map, sigma_cons, length_append, length_map, IH, Nat.sum_cons]
[ " (head✝ :: l) ×ˢ [] = []", " (a, b) ∈ l₁ ×ˢ l₂ ↔ a ∈ l₁ ∧ b ∈ l₂", " (l₁ ×ˢ l₂).length = l₁.length * l₂.length", " ([] ×ˢ l₂).length = [].length * l₂.length", " ((x :: l₁) ×ˢ l₂).length = (x :: l₁).length * l₂.length", " ((head✝ :: l).sigma fun a => []) = []", " ⟨a, b⟩ ∈ l₁.sigma l₂ ↔ a ∈ l₁ ∧ b ∈ l₂ a...
[ " (head✝ :: l) ×ˢ [] = []", " (a, b) ∈ l₁ ×ˢ l₂ ↔ a ∈ l₁ ∧ b ∈ l₂", " (l₁ ×ˢ l₂).length = l₁.length * l₂.length", " ([] ×ˢ l₂).length = [].length * l₂.length", " ((x :: l₁) ×ˢ l₂).length = (x :: l₁).length * l₂.length", " ((head✝ :: l).sigma fun a => []) = []", " ⟨a, b⟩ ∈ l₁.sigma l₂ ↔ a ∈ l₁ ∧ b ∈ l₂ a...
import Mathlib.SetTheory.Ordinal.Arithmetic import Mathlib.SetTheory.Ordinal.Exponential #align_import set_theory.ordinal.cantor_normal_form from "leanprover-community/mathlib"@"991ff3b5269848f6dd942ae8e9dd3c946035dc8b" noncomputable section universe u open List namespace Ordinal @[elab_as_elim] noncomputabl...
Mathlib/SetTheory/Ordinal/CantorNormalForm.lean
150
158
theorem CNF_snd_lt {b o : Ordinal.{u}} (hb : 1 < b) {x : Ordinal × Ordinal} : x ∈ CNF b o → x.2 < b := by
refine CNFRec b ?_ (fun o ho IH ↦ ?_) o · simp only [CNF_zero, not_mem_nil, IsEmpty.forall_iff] · rw [CNF_ne_zero ho] intro h cases' (mem_cons.mp h) with h h · rw [h]; simpa only using div_opow_log_lt o hb · exact IH h
[ " C o", " C 0", " (invImage (fun x => x) wellFoundedRelation).1 (o % b ^ b.log o) o", " b.CNFRec H0 H 0 = H0", " ⋯.mpr H0 = H0", " b.CNFRec H0 H o = H o ho (b.CNFRec H0 H (o % b ^ b.log o))", " CNF 0 o = [(0, o)]", " CNF 1 o = [(0, o)]", " b.CNF o = [(0, o)]", " foldr (fun p r => b ^ p.1 * p.2 + r...
[ " C o", " C 0", " (invImage (fun x => x) wellFoundedRelation).1 (o % b ^ b.log o) o", " b.CNFRec H0 H 0 = H0", " ⋯.mpr H0 = H0", " b.CNFRec H0 H o = H o ho (b.CNFRec H0 H (o % b ^ b.log o))", " CNF 0 o = [(0, o)]", " CNF 1 o = [(0, o)]", " b.CNF o = [(0, o)]", " foldr (fun p r => b ^ p.1 * p.2 + r...
import Mathlib.CategoryTheory.Sites.Plus import Mathlib.CategoryTheory.Limits.Shapes.ConcreteCategory #align_import category_theory.sites.sheafification from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" namespace CategoryTheory open CategoryTheory.Limits Opposite universe w v u var...
Mathlib/CategoryTheory/Sites/ConcreteSheafification.lean
529
533
theorem isIso_toSheafify {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) : IsIso (J.toSheafify P) := by
dsimp [toSheafify] haveI := isIso_toPlus_of_isSheaf J P hP change (IsIso (toPlus J P ≫ (J.plusFunctor D).map (toPlus J P))) infer_instance
[ " J.sheafifyMap (𝟙 P) = 𝟙 (J.sheafify P)", " J.plusMap (J.plusMap (𝟙 P)) = 𝟙 (J.plusObj (J.plusObj P))", " J.sheafifyMap (η ≫ γ) = J.sheafifyMap η ≫ J.sheafifyMap γ", " J.plusMap (J.plusMap (η ≫ γ)) = J.plusMap (J.plusMap η) ≫ J.plusMap (J.plusMap γ)", " η ≫ J.toSheafify Q = J.toSheafify P ≫ J.sheafifyM...
[ " J.sheafifyMap (𝟙 P) = 𝟙 (J.sheafify P)", " J.plusMap (J.plusMap (𝟙 P)) = 𝟙 (J.plusObj (J.plusObj P))", " J.sheafifyMap (η ≫ γ) = J.sheafifyMap η ≫ J.sheafifyMap γ", " J.plusMap (J.plusMap (η ≫ γ)) = J.plusMap (J.plusMap η) ≫ J.plusMap (J.plusMap γ)", " η ≫ J.toSheafify Q = J.toSheafify P ≫ J.sheafifyM...
import Mathlib.Algebra.ContinuedFractions.Computation.Basic import Mathlib.Algebra.ContinuedFractions.Translations #align_import algebra.continued_fractions.computation.translations from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad" namespace GeneralizedContinuedFraction open Generali...
Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
240
244
theorem get?_of_eq_some_of_succ_get?_intFractPair_stream {ifp_succ_n : IntFractPair K} (stream_succ_nth_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n) : (of v).s.get? n = some ⟨1, ifp_succ_n.b⟩ := by
unfold of IntFractPair.seq1 simp [Stream'.Seq.map_tail, Stream'.Seq.get?_tail, Stream'.Seq.map_get?, stream_succ_nth_eq]
[ " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b", " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ { a := 1, b := ↑ifp.b } = gp_n", " ∃ ifp_1, IntFractPair.stream v (n + 1) = some ifp_1 ∧ ↑ifp_1.b = { a := 1, b := ↑ifp.b }.b", " (of v).s.get? n = some { a := 1, b := ↑ifp_succ_n.b }", ...
[ " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ ↑ifp.b = gp_n.b", " ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ { a := 1, b := ↑ifp.b } = gp_n", " ∃ ifp_1, IntFractPair.stream v (n + 1) = some ifp_1 ∧ ↑ifp_1.b = { a := 1, b := ↑ifp.b }.b" ]
import Mathlib.Algebra.Group.ConjFinite import Mathlib.Data.Fintype.BigOperators import Mathlib.Dynamics.PeriodicPts import Mathlib.GroupTheory.Commutator import Mathlib.GroupTheory.Coset import Mathlib.GroupTheory.GroupAction.ConjAct import Mathlib.GroupTheory.GroupAction.Hom #align_import group_theory.group_action....
Mathlib/GroupTheory/GroupAction/Quotient.lean
108
109
theorem Quotient.mk_smul_out' [QuotientAction β H] (b : β) (q : α ⧸ H) : QuotientGroup.mk (b • q.out') = b • q := by
rw [← Quotient.smul_mk, QuotientGroup.out_eq']
[ " (x✝³ • x✝²)⁻¹ * x✝³ • x✝¹ ∈ H", " (b • c)⁻¹ * b • x✝¹ ∈ H", " ↑(b • Quotient.out' q) = b • q" ]
[ " (x✝³ • x✝²)⁻¹ * x✝³ • x✝¹ ∈ H", " (b • c)⁻¹ * b • x✝¹ ∈ H" ]
import Mathlib.Order.Filter.Partial import Mathlib.Topology.Basic #align_import topology.partial from "leanprover-community/mathlib"@"4c19a16e4b705bf135cf9a80ac18fcc99c438514" open Filter open Topology variable {X Y : Type*} [TopologicalSpace X] theorem rtendsto_nhds {r : Rel Y X} {l : Filter Y} {x : X} : ...
Mathlib/Topology/Partial.lean
61
83
theorem pcontinuous_iff' {f : X →. Y} : PContinuous f ↔ ∀ {x y} (h : y ∈ f x), PTendsto' f (𝓝 x) (𝓝 y) := by
constructor · intro h x y h' simp only [ptendsto'_def, mem_nhds_iff] rintro s ⟨t, tsubs, opent, yt⟩ exact ⟨f.preimage t, PFun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩ intro hf s os rw [isOpen_iff_nhds] rintro x ⟨y, ys, fxy⟩ t rw [mem_principal] intro (h : f.preimage s ⊆ t) change t ∈ ...
[ " RTendsto' r l (𝓝 x) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → r.preimage s ∈ l", " (∀ s ∈ 𝓝 x, r.preimage s ∈ l) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → r.preimage s ∈ l", " ∀ (s t : Set X), s ⊆ t → r.preimage s ⊆ r.preimage t", " IsOpen f.Dom", " IsOpen (f.preimage Set.univ)", " PContinuous f ↔ ∀ {x : X} {y : ...
[ " RTendsto' r l (𝓝 x) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → r.preimage s ∈ l", " (∀ s ∈ 𝓝 x, r.preimage s ∈ l) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → r.preimage s ∈ l", " ∀ (s t : Set X), s ⊆ t → r.preimage s ⊆ r.preimage t", " IsOpen f.Dom", " IsOpen (f.preimage Set.univ)" ]
import Mathlib.MeasureTheory.Integral.Lebesgue open Set hiding restrict restrict_apply open Filter ENNReal NNReal MeasureTheory.Measure namespace MeasureTheory variable {α : Type*} {m0 : MeasurableSpace α} {μ : Measure α} noncomputable def Measure.withDensity {m : MeasurableSpace α} (μ : Measure α) (f : α → ℝ≥...
Mathlib/MeasureTheory/Measure/WithDensity.lean
144
147
theorem isFiniteMeasure_withDensity {f : α → ℝ≥0∞} (hf : ∫⁻ a, f a ∂μ ≠ ∞) : IsFiniteMeasure (μ.withDensity f) := { measure_univ_lt_top := by
rwa [withDensity_apply _ MeasurableSet.univ, Measure.restrict_univ, lt_top_iff_ne_top] }
[ " (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0", " ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s", " (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ", " (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ", " ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ", " μ.restrict t = μ.restrict s", " withDensity 0 f =...
[ " (fun s x => ∫⁻ (a : α) in s, f a ∂μ) ∅ ⋯ = 0", " ∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s", " (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ", " (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ", " ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ", " μ.restrict t = μ.restrict s", " withDensity 0 f =...
import Mathlib.Analysis.NormedSpace.OperatorNorm.Bilinear import Mathlib.Analysis.NormedSpace.OperatorNorm.NNNorm suppress_compilation open Bornology Metric Set Real open Filter hiding map_smul open scoped Classical NNReal Topology Uniformity -- the `ₗ` subscript variables are for special cases about linear (as o...
Mathlib/Analysis/NormedSpace/OperatorNorm/Completeness.lean
70
86
theorem tendsto_of_tendsto_pointwise_of_cauchySeq {f : ℕ → E' →SL[σ₁₂] F} {g : E' →SL[σ₁₂] F} (hg : Tendsto (fun n x => f n x) atTop (𝓝 g)) (hf : CauchySeq f) : Tendsto f atTop (𝓝 g) := by
/- Since `f` is a Cauchy sequence, there exists `b → 0` such that `‖f n - f m‖ ≤ b N` for any `m, n ≥ N`. -/ rcases cauchySeq_iff_le_tendsto_0.1 hf with ⟨b, hb₀, hfb, hb_lim⟩ -- Since `b → 0`, it suffices to show that `‖f n x - g x‖ ≤ b n * ‖x‖` for all `n` and `x`. suffices ∀ n x, ‖f n x - g x‖ ≤ b n * ‖x...
[ " E' →SL[σ₁₂] F", " f ∈ closure (range DFunLike.coe)", " g ∈ DFunLike.coe ⁻¹' range DFunLike.coe", " ∃ C, ∀ (x : E'), ‖(linearMapOfMemClosureRangeCoe f ⋯) x‖ ≤ C * ‖x‖", " g ∈ DFunLike.coe ⁻¹' {g | ‖g x‖ ≤ C * ‖x‖}", " Tendsto f atTop (𝓝 g)", " ∀ (n : ℕ) (x : E'), ‖(f n) x - g x‖ ≤ b n * ‖x‖", " ‖(f ...
[ " E' →SL[σ₁₂] F", " f ∈ closure (range DFunLike.coe)", " g ∈ DFunLike.coe ⁻¹' range DFunLike.coe", " ∃ C, ∀ (x : E'), ‖(linearMapOfMemClosureRangeCoe f ⋯) x‖ ≤ C * ‖x‖", " g ∈ DFunLike.coe ⁻¹' {g | ‖g x‖ ≤ C * ‖x‖}" ]
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
145
146
theorem laverage_congr {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) : ⨍⁻ x, f x ∂μ = ⨍⁻ x, g x ∂μ := by
simp only [laverage_eq, lintegral_congr_ae 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 : α...
import Mathlib.Analysis.Convex.Hull #align_import analysis.convex.join from "leanprover-community/mathlib"@"951bf1d9e98a2042979ced62c0620bcfb3587cf8" open Set variable {ι : Sort*} {𝕜 E : Type*} section OrderedSemiring variable (𝕜) [OrderedSemiring 𝕜] [AddCommMonoid E] [Module 𝕜 E] {s t s₁ s₂ t₁ t₂ u : Set ...
Mathlib/Analysis/Convex/Join.lean
61
61
theorem convexJoin_empty_right (s : Set E) : convexJoin 𝕜 s ∅ = ∅ := by
simp [convexJoin]
[ " x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b", " ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s", " convexJoin 𝕜 ∅ t = ∅", " convexJoin 𝕜 s ∅ = ∅" ]
[ " x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b", " ⋃ i₂ ∈ t, ⋃ i₁ ∈ s, segment 𝕜 i₁ i₂ = convexJoin 𝕜 t s", " convexJoin 𝕜 ∅ t = ∅" ]
import Mathlib.Algebra.Polynomial.Div import Mathlib.RingTheory.Polynomial.Basic import Mathlib.RingTheory.Ideal.QuotientOperations #align_import ring_theory.polynomial.quotient from "leanprover-community/mathlib"@"4f840b8d28320b20c87db17b3a6eef3d325fca87" set_option linter.uppercaseLean3 false open Polynomial ...
Mathlib/RingTheory/Polynomial/Quotient.lean
158
162
theorem polynomialQuotientEquivQuotientPolynomial_map_mk (I : Ideal R) (f : R[X]) : I.polynomialQuotientEquivQuotientPolynomial (f.map <| Quotient.mk I) = Quotient.mk (map C I : Ideal R[X]) f := by
apply (polynomialQuotientEquivQuotientPolynomial I).symm.injective rw [RingEquiv.symm_apply_apply, polynomialQuotientEquivQuotientPolynomial_symm_mk]
[ " ∀ a ∈ I, ((Quotient.mk (map C I)).comp C) a = 0", " ((Quotient.mk (map C I)).comp C) a = 0", " C a ∈ map C I", " ∀ f ∈ map C I, (eval₂RingHom (C.comp (Quotient.mk I)) X) f = 0", " (eval₂RingHom (C.comp (Quotient.mk I)) X) a = 0", " (eval₂RingHom (C.comp (Quotient.mk I)) X) (a.sum fun n a => (monomial n)...
[ " ∀ a ∈ I, ((Quotient.mk (map C I)).comp C) a = 0", " ((Quotient.mk (map C I)).comp C) a = 0", " C a ∈ map C I", " ∀ f ∈ map C I, (eval₂RingHom (C.comp (Quotient.mk I)) X) f = 0", " (eval₂RingHom (C.comp (Quotient.mk I)) X) a = 0", " (eval₂RingHom (C.comp (Quotient.mk I)) X) (a.sum fun n a => (monomial n)...
import Mathlib.Data.List.Join #align_import data.list.permutation from "leanprover-community/mathlib"@"dd71334db81d0bd444af1ee339a29298bef40734" -- Make sure we don't import algebra assert_not_exists Monoid open Nat variable {α β : Type*} namespace List theorem permutationsAux2_fst (t : α) (ts : List α) (r : L...
Mathlib/Data/List/Permutation.lean
90
100
theorem map_permutationsAux2' {α' β'} (g : α → α') (g' : β → β') (t : α) (ts ys : List α) (r : List β) (f : List α → β) (f' : List α' → β') (H : ∀ a, g' (f a) = f' (map g a)) : map g' (permutationsAux2 t ts r ys f).2 = (permutationsAux2 (g t) (map g ts) (map g' r) (map g ys) f').2 := by
induction' ys with ys_hd _ ys_ih generalizing f f' · simp · simp only [map, permutationsAux2_snd_cons, cons_append, cons.injEq] rw [ys_ih, permutationsAux2_fst] · refine ⟨?_, rfl⟩ simp only [← map_cons, ← map_append]; apply H · intro a; apply H
[ " (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts", " (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2", " (permutationsAux2 t ts [] ys f).2 ++ r = (permutationsAux2 t ts r ys f).2", " (permutationsAux2 t ts [] [] f).2 ++ r = (permu...
[ " (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts", " (permutationsAux2 t ts r (y :: ys) f).2 = f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).2", " (permutationsAux2 t ts [] ys f).2 ++ r = (permutationsAux2 t ts r ys f).2", " (permutationsAux2 t ts [] [] f).2 ++ r = (permu...
import Mathlib.Init.Order.Defs import Mathlib.Logic.Nontrivial.Defs import Mathlib.Tactic.Attr.Register import Mathlib.Data.Prod.Basic import Mathlib.Data.Subtype import Mathlib.Logic.Function.Basic import Mathlib.Logic.Unique #align_import logic.nontrivial from "leanprover-community/mathlib"@"48fb5b5280e7c81672afc95...
Mathlib/Logic/Nontrivial/Basic.lean
41
43
theorem Subtype.nontrivial_iff_exists_ne (p : α → Prop) (x : Subtype p) : Nontrivial (Subtype p) ↔ ∃ (y : α) (_ : p y), y ≠ x := by
simp only [_root_.nontrivial_iff_exists_ne x, Subtype.exists, Ne, Subtype.ext_iff]
[ " ∃ x y, x < y", " Nontrivial (Subtype p) ↔ ∃ y x_1, y ≠ ↑x" ]
[ " ∃ x y, x < y" ]
import Mathlib.SetTheory.Cardinal.Finite #align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8" noncomputable section open scoped Classical variable {α β γ : Type*} def Finite.equivFin (α : Type*) [Finite α] : α ≃ Fin (Nat.card α) := by have := (Finite....
Mathlib/Data/Finite/Card.lean
109
113
theorem card_le_of_surjective [Finite α] (f : α → β) (hf : Function.Surjective f) : Nat.card β ≤ Nat.card α := by
haveI := Fintype.ofFinite α haveI := Fintype.ofSurjective f hf simpa only [Nat.card_eq_fintype_card, ge_iff_le] using Fintype.card_le_of_surjective f hf
[ " α ≃ Fin (Nat.card α)", " α ≃ Fin n", " Nat.card α = if h : Finite α then Fintype.card α else 0", " 0 < Nat.card α ↔ Nonempty α", " Nat.card α = Nat.card β ↔ Nonempty (α ≃ β)", " Nat.card α ≤ 1 ↔ Subsingleton α", " 1 < Nat.card α ↔ Nontrivial α", " Nat.card (Option α) = Nat.card α + 1", " Nat.card ...
[ " α ≃ Fin (Nat.card α)", " α ≃ Fin n", " Nat.card α = if h : Finite α then Fintype.card α else 0", " 0 < Nat.card α ↔ Nonempty α", " Nat.card α = Nat.card β ↔ Nonempty (α ≃ β)", " Nat.card α ≤ 1 ↔ Subsingleton α", " 1 < Nat.card α ↔ Nontrivial α", " Nat.card (Option α) = Nat.card α + 1", " Nat.card ...
import Mathlib.MeasureTheory.Integral.Periodic import Mathlib.Data.ZMod.Quotient #align_import measure_theory.group.add_circle from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open Set Function Filter MeasureTheory MeasureTheory.Measure Metric open scoped MeasureTheory Pointwise Top...
Mathlib/MeasureTheory/Group/AddCircle.lean
95
104
theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T) (hu : IsOfFinAddOrder u) (hs : (u +ᵥ s : Set <| AddCircle T) =ᵐ[volume] s) (hI : I =ᵐ[volume] ball x (T / (2 * addOrderOf u))) : volume s = addOrderOf u • volume (s ∩ I) := by
let G := AddSubgroup.zmultiples u haveI : Fintype G := @Fintype.ofFinite _ hu.finite_zmultiples.to_subtype have hsG : ∀ g : G, (g +ᵥ s : Set <| AddCircle T) =ᵐ[volume] s := by rintro ⟨y, hy⟩; exact (vadd_ae_eq_self_of_mem_zmultiples hs hy : _) rw [(isAddFundamentalDomain_of_ae_ball I u x hu hI).measure_eq_...
[ " closedBall x ε =ᶠ[ae volume] ball x ε", " 2 * ε ≤ T", " 2 * ε ≤ 0", " volume (closedBall x ε) ≤ volume (ball x ε)", " Tendsto (fun δ => volume (closedBall x δ)) (𝓝[<] ε) (𝓝 (volume (closedBall x ε)))", " Tendsto (fun δ => ENNReal.ofReal (min T (2 * δ))) (𝓝[<] ε) (𝓝 (ENNReal.ofReal (min T (2 * ε))))"...
[ " closedBall x ε =ᶠ[ae volume] ball x ε", " 2 * ε ≤ T", " 2 * ε ≤ 0", " volume (closedBall x ε) ≤ volume (ball x ε)", " Tendsto (fun δ => volume (closedBall x δ)) (𝓝[<] ε) (𝓝 (volume (closedBall x ε)))", " Tendsto (fun δ => ENNReal.ofReal (min T (2 * δ))) (𝓝[<] ε) (𝓝 (ENNReal.ofReal (min T (2 * ε))))"...