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.Data.Complex.Basic import Mathlib.MeasureTheory.Integral.CircleIntegral #align_import measure_theory.integral.circle_transform from "leanprover-community/mathlib"@"d11893b411025250c8e61ff2f12ccbd7ee35ab15" open Set MeasureTheory Metric Filter Function open scoped Interval Real noncomputable secti...
Mathlib/MeasureTheory/Integral/CircleTransform.lean
86
90
theorem continuous_circleTransformDeriv {R : ℝ} (hR : 0 < R) {f : ℂ → E} {z w : ℂ} (hf : ContinuousOn f (sphere z R)) (hw : w ∈ ball z R) : Continuous (circleTransformDeriv R z w f) := by
rw [circleTransformDeriv_eq] exact (continuous_circleMap_inv hw).smul (continuous_circleTransform hR hf hw)
[ " Periodic (circleTransformDeriv R z w f) (2 * π)", " ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c...
[ " Periodic (circleTransformDeriv R z w f) (2 * π)", " ∀ (x : ℝ), circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " circleTransformDeriv R z w f (x + 2 * π) = circleTransformDeriv R z w f x", " (2 * ↑π * I)⁻¹ • deriv (circleMap z R) (x + 2 * π) • ((circleMap z R x - w) ^ 2)⁻¹ • f (c...
import Mathlib.Algebra.GroupWithZero.NonZeroDivisors import Mathlib.Algebra.Polynomial.Lifts import Mathlib.GroupTheory.MonoidLocalization import Mathlib.RingTheory.Algebraic import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.IntegralClosure import Mathlib.RingTheory.Localization.FractionRing import M...
Mathlib/RingTheory/Localization/Integral.lean
74
77
theorem integerNormalization_coeff (p : S[X]) (i : ℕ) : (integerNormalization M p).coeff i = coeffIntegerNormalization M p i := by
simp (config := { contextual := true }) [integerNormalization, coeff_monomial, coeffIntegerNormalization_of_not_mem_support]
[ " coeffIntegerNormalization M p i = 0", " i ∈ p.support", " ¬coeffIntegerNormalization M p i ≠ 0", " (integerNormalization M p).coeff i = coeffIntegerNormalization M p i" ]
[ " coeffIntegerNormalization M p i = 0", " i ∈ p.support", " ¬coeffIntegerNormalization M p i ≠ 0" ]
import Mathlib.FieldTheory.RatFunc.AsPolynomial import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.Content noncomputable section universe u variable {K : Type u} namespace RatFunc section IntDegree open Polynomial variable [Field...
Mathlib/FieldTheory/RatFunc/Degree.lean
85
91
theorem intDegree_neg (x : RatFunc K) : intDegree (-x) = intDegree x := by
by_cases hx : x = 0 · rw [hx, neg_zero] · rw [intDegree, intDegree, ← natDegree_neg x.num] exact natDegree_sub_eq_of_prod_eq (num_ne_zero (neg_ne_zero.mpr hx)) (denom_ne_zero (-x)) (neg_ne_zero.mpr (num_ne_zero hx)) (denom_ne_zero x) (num_denom_neg x)
[ " intDegree 0 = 0", " intDegree 1 = 0", " (C k).intDegree = 0", " X.intDegree = 1", " ((algebraMap K[X] (RatFunc K)) p).intDegree = ↑p.natDegree", " (x * y).intDegree = x.intDegree + y.intDegree", " ↑(x * y).num.natDegree + (↑x.denom.natDegree + ↑y.denom.natDegree) =\n ↑x.num.natDegree + ↑y.num.natDe...
[ " intDegree 0 = 0", " intDegree 1 = 0", " (C k).intDegree = 0", " X.intDegree = 1", " ((algebraMap K[X] (RatFunc K)) p).intDegree = ↑p.natDegree", " (x * y).intDegree = x.intDegree + y.intDegree", " ↑(x * y).num.natDegree + (↑x.denom.natDegree + ↑y.denom.natDegree) =\n ↑x.num.natDegree + ↑y.num.natDe...
import Mathlib.Algebra.CharP.ExpChar import Mathlib.GroupTheory.OrderOfElement #align_import algebra.char_p.two from "leanprover-community/mathlib"@"7f1ba1a333d66eed531ecb4092493cd1b6715450" variable {R ι : Type*} namespace CharTwo section Semiring variable [Semiring R] [CharP R 2] theorem two_eq_zero : (2 : ...
Mathlib/Algebra/CharP/Two.lean
55
55
theorem bit1_apply_eq_one (x : R) : (bit1 x : R) = 1 := by
simp
[ " 2 = 0", " x + x = 0", " bit0 = 0", " bit0 x✝ = 0 x✝", " bit0 x = 0", " bit1 = 1", " bit1 x✝ = 1 x✝", " bit1 x = 1" ]
[ " 2 = 0", " x + x = 0", " bit0 = 0", " bit0 x✝ = 0 x✝", " bit0 x = 0", " bit1 = 1", " bit1 x✝ = 1 x✝" ]
import Mathlib.LinearAlgebra.Matrix.BilinearForm import Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly import Mathlib.LinearAlgebra.Determinant import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.Vandermonde import Mathlib.LinearAlgebra.Trace import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosu...
Mathlib/RingTheory/Trace.lean
115
119
theorem trace_algebraMap_of_basis (x : R) : trace R S (algebraMap R S x) = Fintype.card ι • x := by
haveI := Classical.decEq ι rw [trace_apply, LinearMap.trace_eq_matrix_trace R b, Matrix.trace] convert Finset.sum_const x simp [-coe_lmul_eq_mul]
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace", " (trace R S) ((algebraMap R S) x) = Fintype.card ι • x", " ∑ i : ι, ((toMatrix b b) ((lmul R S) ((algebraMap R S) x))).diag i = Fintyp...
[ " trace R S = 0", " (trace R S) s = 0 s", " (trace R S) s = ((leftMulMatrix b) s).trace", " ((toMatrix b b) ((lmul R S) s)).trace = ((toMatrix b b) (mulLeft R s)).trace" ]
import Mathlib.MeasureTheory.Function.ConditionalExpectation.CondexpL1 #align_import measure_theory.function.conditional_expectation.basic from "leanprover-community/mathlib"@"d8bbb04e2d2a44596798a9207ceefc0fb236e41e" open TopologicalSpace MeasureTheory.Lp Filter open scoped ENNReal Topology MeasureTheory names...
Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean
169
176
theorem condexp_zero : μ[(0 : α → F')|m] = 0 := by
by_cases hm : m ≤ m0 swap; · rw [condexp_of_not_le hm] by_cases hμm : SigmaFinite (μ.trim hm) swap; · rw [condexp_of_not_sigmaFinite hm hμm] haveI : SigmaFinite (μ.trim hm) := hμm exact condexp_of_stronglyMeasurable hm (@stronglyMeasurable_zero _ _ m _ _) (integrable_zero _ _ _)
[ " μ[f|m] = 0", " ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)", " SigmaFinite (μ.trim hm) → ¬Integrable f μ", " μ[f|m] =\n if Integrable f μ then if StronglyMeasurable f then f else AEStronglyMeasurable'.mk ↑↑(condexpL1 hm μ f) ⋯ else 0", " (if h : SigmaFinite (μ.trim hm) ∧ Integrable f μ then\n if S...
[ " μ[f|m] = 0", " ¬(SigmaFinite (μ.trim hm) ∧ Integrable f μ)", " SigmaFinite (μ.trim hm) → ¬Integrable f μ", " μ[f|m] =\n if Integrable f μ then if StronglyMeasurable f then f else AEStronglyMeasurable'.mk ↑↑(condexpL1 hm μ f) ⋯ else 0", " (if h : SigmaFinite (μ.trim hm) ∧ Integrable f μ then\n if S...
import Mathlib.LinearAlgebra.Matrix.Symmetric import Mathlib.LinearAlgebra.Matrix.Orthogonal import Mathlib.Data.Matrix.Kronecker #align_import linear_algebra.matrix.is_diag from "leanprover-community/mathlib"@"55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99" namespace Matrix variable {α β R n m : Type*} open Function...
Mathlib/LinearAlgebra/Matrix/IsDiag.lean
143
149
theorem IsDiag.kronecker [MulZeroClass α] {A : Matrix m m α} {B : Matrix n n α} (hA : A.IsDiag) (hB : B.IsDiag) : (A ⊗ₖ B).IsDiag := by
rintro ⟨a, b⟩ ⟨c, d⟩ h simp only [Prod.mk.inj_iff, Ne, not_and_or] at h cases' h with hac hbd · simp [hA hac] · simp [hB hbd]
[ " diagonal A.diag i j = A i j", " diagonal A.diag i i = A i i", " (A.map f).IsDiag", " A.map f i j = 0", " (-A).IsDiag", " (-A) i j = 0", " (A + B).IsDiag", " (A + B) i j = 0", " (A - B).IsDiag", " (A - B) i j = 0", " (k • A).IsDiag", " (k • A) i j = 0", " A.IsDiag", " A = Aᴴᴴ", " (krone...
[ " diagonal A.diag i j = A i j", " diagonal A.diag i i = A i i", " (A.map f).IsDiag", " A.map f i j = 0", " (-A).IsDiag", " (-A) i j = 0", " (A + B).IsDiag", " (A + B) i j = 0", " (A - B).IsDiag", " (A - B) i j = 0", " (k • A).IsDiag", " (k • A) i j = 0", " A.IsDiag", " A = Aᴴᴴ" ]
import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Order.Group.Basic import Mathlib.Algebra.Order.Ring.Basic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.FieldSimp import Mathlib.Data.Int.NatPrime import Mathlib.Data.ZMod.Basic #align_import number_theory.pythagorean_tri...
Mathlib/NumberTheory/PythagoreanTriples.lean
73
73
theorem symm : PythagoreanTriple y x z := by
rwa [pythagoreanTriple_comm]
[ " z * z ≠ 2", " ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2", " ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2", " ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2", " ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2", " z * z % 4 ≠ 2", " ¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z", " PythagoreanTriple ...
[ " z * z ≠ 2", " ⟨0, ⋯⟩ * ⟨0, ⋯⟩ ≠ 2", " ⟨1, ⋯⟩ * ⟨1, ⋯⟩ ≠ 2", " ⟨2, ⋯⟩ * ⟨2, ⋯⟩ ≠ 2", " ⟨3, ⋯⟩ * ⟨3, ⋯⟩ ≠ 2", " z * z % 4 ≠ 2", " ¬z * z % ↑4 = 2 % ↑4", " ¬↑(z * z) = ↑2", " PythagoreanTriple x y z ↔ PythagoreanTriple y x z", " x * x + y * y = z * z ↔ y * y + x * x = z * z", " PythagoreanTriple ...
import Mathlib.Analysis.InnerProductSpace.Orthogonal import Mathlib.Analysis.Normed.Group.AddTorsor #align_import geometry.euclidean.basic from "leanprover-community/mathlib"@"2de9c37fa71dde2f1c6feff19876dd6a7b1519f0" open Set open scoped RealInnerProductSpace variable {V P : Type*} [NormedAddCommGroup V] [InnerP...
Mathlib/Geometry/Euclidean/PerpBisector.lean
59
63
theorem mem_perpBisector_pointReflection_iff_inner_eq_zero : c ∈ perpBisector p₁ (Equiv.pointReflection p₂ p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫ = 0 := by
rw [mem_perpBisector_iff_inner_eq_zero, midpoint_pointReflection_right, Equiv.pointReflection_apply, vadd_vsub_assoc, inner_add_right, add_self_eq_zero, ← neg_eq_zero, ← inner_neg_right, neg_vsub_eq_vsub_rev]
[ " c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0", " 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0", " c ∈ perpBisector p₁ ((Equiv.pointReflection p₂) p₁) ↔ ⟪c -ᵥ p₂, p₁ -ᵥ p₂⟫_ℝ = 0" ]
[ " c ∈ perpBisector p₁ p₂ ↔ ⟪(Equiv.pointReflection c) p₁ -ᵥ p₂, p₂ -ᵥ p₁⟫_ℝ = 0", " 2⁻¹ * ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0 ↔ ⟪c -ᵥ p₁ + (c -ᵥ p₂), p₂ -ᵥ p₁⟫_ℝ = 0" ]
import Mathlib.Algebra.Order.Field.Canonical.Defs #align_import algebra.order.field.canonical.basic from "leanprover-community/mathlib"@"ee0c179cd3c8a45aa5bffbf1b41d8dbede452865" variable {α : Type*} section CanonicallyLinearOrderedSemifield variable [CanonicallyLinearOrderedSemifield α] [Sub α] [OrderedSub α] ...
Mathlib/Algebra/Order/Field/Canonical/Basic.lean
22
22
theorem tsub_div (a b c : α) : (a - b) / c = a / c - b / c := by
simp_rw [div_eq_mul_inv, tsub_mul]
[ " (a - b) / c = a / c - b / c" ]
[]
import Mathlib.Topology.MetricSpace.Basic #align_import topology.metric_space.infsep from "leanprover-community/mathlib"@"5316314b553dcf8c6716541851517c1a9715e22b" variable {α β : Type*} namespace Set section Einfsep open ENNReal open Function noncomputable def einfsep [EDist α] (s : Set α) : ℝ≥0∞ := ⨅ (x...
Mathlib/Topology/MetricSpace/Infsep.lean
64
66
theorem einfsep_top : s.einfsep = ∞ ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → edist x y = ∞ := by
simp_rw [einfsep, iInf_eq_top]
[ " d ≤ s.einfsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ edist x y", " s.einfsep = 0 ↔ ∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C", " 0 < s.einfsep ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y", " (¬∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C) ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y", " s...
[ " d ≤ s.einfsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ edist x y", " s.einfsep = 0 ↔ ∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C", " 0 < s.einfsep ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y", " (¬∀ C > 0, ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ edist x y < C) ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y" ]
import Mathlib.Analysis.NormedSpace.Star.Spectrum import Mathlib.Analysis.Normed.Group.Quotient import Mathlib.Analysis.NormedSpace.Algebra import Mathlib.Topology.ContinuousFunction.Units import Mathlib.Topology.ContinuousFunction.Compact import Mathlib.Topology.Algebra.Algebra import Mathlib.Topology.ContinuousFunct...
Mathlib/Analysis/NormedSpace/Star/GelfandDuality.lean
119
123
theorem spectrum.gelfandTransform_eq (a : A) : spectrum ℂ (gelfandTransform ℂ A a) = spectrum ℂ a := by
ext z rw [ContinuousMap.spectrum_eq_range, WeakDual.CharacterSpace.mem_spectrum_iff_exists] exact Iff.rfl
[ " I.toCharacterSpace a = 0", " (CharacterSpace.equivAlgHom.symm ((↑(NormedRing.algEquivComplexOfComplete ⋯).symm).comp (Quotient.mkₐ ℂ I))) a = 0", " ⋯.some = 0", " ∃ f, f a = 0", " z ∈ spectrum ℂ a ↔ ∃ f, f a = z", " ∃ f, f a = z", " (∃ f, f a = z) → z ∈ spectrum ℂ a", " f a ∈ spectrum ℂ a", " spec...
[ " I.toCharacterSpace a = 0", " (CharacterSpace.equivAlgHom.symm ((↑(NormedRing.algEquivComplexOfComplete ⋯).symm).comp (Quotient.mkₐ ℂ I))) a = 0", " ⋯.some = 0", " ∃ f, f a = 0", " z ∈ spectrum ℂ a ↔ ∃ f, f a = z", " ∃ f, f a = z", " (∃ f, f a = z) → z ∈ spectrum ℂ a", " f a ∈ spectrum ℂ a" ]
import Mathlib.Data.Multiset.Bind #align_import data.multiset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9" namespace Multiset section Pi variable {α : Type*} open Function def Pi.empty (δ : α → Sort*) : ∀ a ∈ (0 : Multiset α), δ a := nofun #align multiset.pi.empty Multi...
Mathlib/Data/Multiset/Pi.lean
49
58
theorem Pi.cons_swap {a a' : α} {b : δ a} {b' : δ a'} {m : Multiset α} {f : ∀ a ∈ m, δ a} (h : a ≠ a') : HEq (Pi.cons (a' ::ₘ m) a b (Pi.cons m a' b' f)) (Pi.cons (a ::ₘ m) a' b' (Pi.cons m a b f)) := by
apply hfunext rfl simp only [heq_iff_eq] rintro a'' _ rfl refine hfunext (by rw [Multiset.cons_swap]) fun ha₁ ha₂ _ => ?_ rcases ne_or_eq a'' a with (h₁ | rfl) on_goal 1 => rcases eq_or_ne a'' a' with (rfl | h₂) all_goals simp [*, Pi.cons_same, Pi.cons_ne]
[ " HEq (cons (a' ::ₘ m) a b (cons m a' b' f)) (cons (a ::ₘ m) a' b' (cons m a b f))", " ∀ (a_1 a'_1 : α),\n HEq a_1 a'_1 → HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a_1) (cons (a ::ₘ m) a' b' (cons m a b f) a'_1)", " ∀ (a_1 a'_1 : α),\n a_1 = a'_1 → HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a_1) (cons (a :...
[]
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Algebra.Polynomial.Eval import Mathlib.Algebra.Polynomial.Monic import Mathlib.Algebra.Polynomial.RingDivision import Mathlib.Tactic.Abel #align_import ring_theory.polynomial.pochhammer from "leanprover-community/mathlib"@"53b216bcc1146df1c4a0a868778...
Mathlib/RingTheory/Polynomial/Pochhammer.lean
289
293
theorem descPochhammer_eval_zero {n : ℕ} : (descPochhammer R n).eval 0 = if n = 0 then 1 else 0 := by
cases n · simp · simp [X_mul, Nat.succ_ne_zero, descPochhammer_succ_left]
[ " descPochhammer R 1 = X", " descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)", " (descPochhammer R n).Monic", " (descPochhammer R 0).Monic", " (descPochhammer R (n + 1)).Monic", " map f (descPochhammer R n) = descPochhammer T n", " map f (descPochhammer R 0) = descPochhammer T 0", " m...
[ " descPochhammer R 1 = X", " descPochhammer R (n + 1) = X * (descPochhammer R n).comp (X - 1)", " (descPochhammer R n).Monic", " (descPochhammer R 0).Monic", " (descPochhammer R (n + 1)).Monic", " map f (descPochhammer R n) = descPochhammer T n", " map f (descPochhammer R 0) = descPochhammer T 0", " m...
import Mathlib.Topology.Separation import Mathlib.Topology.UniformSpace.Basic import Mathlib.Topology.UniformSpace.Cauchy #align_import topology.uniform_space.uniform_convergence from "leanprover-community/mathlib"@"2705404e701abc6b3127da906f40bae062a169c9" noncomputable section open Topology Uniformity Filter S...
Mathlib/Topology/UniformSpace/UniformConvergence.lean
106
111
theorem tendstoUniformlyOn_iff_tendstoUniformlyOnFilter : TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (𝓟 s) := by
simp only [TendstoUniformlyOn, TendstoUniformlyOnFilter] apply forall₂_congr simp_rw [eventually_prod_principal_iff] simp
[ " TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (𝓟 s)", " (∀ u ∈ 𝓤 β, ∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ u) ↔\n ∀ u ∈ 𝓤 β, ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ∈ u", " ∀ a ∈ 𝓤 β, (∀ᶠ (n : ι) in p, ∀ x ∈ s, (f x, F n x) ∈ a) ↔ ∀ᶠ (n : ι × α) in p ×ˢ 𝓟 s, (f n.2, F n.1 n.2) ...
[]
import Mathlib.Data.Set.Lattice import Mathlib.Data.Set.Pairwise.Basic #align_import data.set.pairwise.lattice from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d" open Function Set Order variable {α β γ ι ι' : Type*} {κ : Sort*} {r p q : α → α → Prop} section Pairwise variable {f g : ...
Mathlib/Data/Set/Pairwise/Lattice.lean
39
41
theorem pairwise_sUnion {r : α → α → Prop} {s : Set (Set α)} (h : DirectedOn (· ⊆ ·) s) : (⋃₀ s).Pairwise r ↔ ∀ a ∈ s, Set.Pairwise a r := by
rw [sUnion_eq_iUnion, pairwise_iUnion h.directed_val, SetCoe.forall]
[ " (⋃ n, f n).Pairwise r ↔ ∀ (n : κ), (f n).Pairwise r", " (⋃ n, f n).Pairwise r → ∀ (n : κ), (f n).Pairwise r", " (f n).Pairwise r", " (∀ (n : κ), (f n).Pairwise r) → (⋃ n, f n).Pairwise r", " r i j", " (⋃₀ s).Pairwise r ↔ ∀ a ∈ s, a.Pairwise r" ]
[ " (⋃ n, f n).Pairwise r ↔ ∀ (n : κ), (f n).Pairwise r", " (⋃ n, f n).Pairwise r → ∀ (n : κ), (f n).Pairwise r", " (f n).Pairwise r", " (∀ (n : κ), (f n).Pairwise r) → (⋃ n, f n).Pairwise r", " r i j" ]
import Mathlib.Algebra.Lie.Abelian import Mathlib.Algebra.Lie.IdealOperations import Mathlib.Algebra.Lie.Quotient #align_import algebra.lie.normalizer from "leanprover-community/mathlib"@"938fead7abdc0cbbca8eba7a1052865a169dc102" variable {R L M M' : Type*} variable [CommRing R] [LieRing L] [LieAlgebra R L] varia...
Mathlib/Algebra/Lie/Normalizer.lean
70
71
theorem normalizer_inf : (N₁ ⊓ N₂).normalizer = N₁.normalizer ⊓ N₂.normalizer := by
ext; simp [← forall_and]
[ " ⁅x, a✝ + b✝⁆ ∈ N", " ⁅x, a✝⁆ + ⁅x, b✝⁆ ∈ N", " ⁅x, 0⁆ ∈ N", " ⁅x, t • m⁆ ∈ N", " t • ⁅x, m⁆ ∈ N", " ⁅y, ⁅x, m⁆⁆ ∈ N", " ⁅⁅y, x⁆, m⁆ + ⁅x, ⁅y, m⁆⁆ ∈ N", " N ≤ N.normalizer", " m ∈ N.normalizer", " ∀ (x : L), ⁅x, m⁆ ∈ N", " (N₁ ⊓ N₂).normalizer = N₁.normalizer ⊓ N₂.normalizer", " m✝ ∈ (N₁ ⊓ N₂...
[ " ⁅x, a✝ + b✝⁆ ∈ N", " ⁅x, a✝⁆ + ⁅x, b✝⁆ ∈ N", " ⁅x, 0⁆ ∈ N", " ⁅x, t • m⁆ ∈ N", " t • ⁅x, m⁆ ∈ N", " ⁅y, ⁅x, m⁆⁆ ∈ N", " ⁅⁅y, x⁆, m⁆ + ⁅x, ⁅y, m⁆⁆ ∈ N", " N ≤ N.normalizer", " m ∈ N.normalizer", " ∀ (x : L), ⁅x, m⁆ ∈ N" ]
import Mathlib.GroupTheory.CoprodI import Mathlib.GroupTheory.Coprod.Basic import Mathlib.GroupTheory.QuotientGroup import Mathlib.GroupTheory.Complement namespace Monoid open CoprodI Subgroup Coprod Function List variable {ι : Type*} {G : ι → Type*} {H : Type*} {K : Type*} [Monoid K] def PushoutI.con [∀ i, Mo...
Mathlib/GroupTheory/PushoutI.lean
167
184
theorem induction_on {motive : PushoutI φ → Prop} (x : PushoutI φ) (of : ∀ (i : ι) (g : G i), motive (of i g)) (base : ∀ h, motive (base φ h)) (mul : ∀ x y, motive x → motive y → motive (x * y)) : motive x := by
delta PushoutI PushoutI.of PushoutI.base at * induction x using Con.induction_on with | H x => induction x using Coprod.induction_on with | inl g => induction g using CoprodI.induction_on with | h_of i g => exact of i g | h_mul x y ihx ihy => rw [map_mul] exact mul _ _ i...
[ " Mul (PushoutI φ)", " Mul (con φ).Quotient", " One (PushoutI φ)", " One (con φ).Quotient", " (of i).comp (φ i) = base φ", " ((of i).comp (φ i)) x = (base φ) x", " (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)", " ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ...
[ " Mul (PushoutI φ)", " Mul (con φ).Quotient", " One (PushoutI φ)", " One (con φ).Quotient", " (of i).comp (φ i) = base φ", " ((of i).comp (φ i)) x = (base φ) x", " (con φ) ((inl.comp CoprodI.of) ((φ i) x)) (inr x)", " ∃ i_1 x', (inl.comp CoprodI.of) ((φ i) x) = inl (CoprodI.of ((φ i_1) x')) ∧ inr x = ...
import Mathlib.MeasureTheory.Function.AEEqFun.DomAct import Mathlib.MeasureTheory.Function.LpSpace set_option autoImplicit true open MeasureTheory Filter open scoped ENNReal namespace DomMulAct variable {M N α E : Type*} [MeasurableSpace M] [MeasurableSpace N] [MeasurableSpace α] [NormedAddCommGroup E] {μ : Me...
Mathlib/MeasureTheory/Function/LpSpace/DomAct/Basic.lean
70
71
theorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g := by
rintro ⟨⟨⟩, _⟩ ⟨⟨⟩, _⟩; rfl
[ " ∀ (f g : ↥(Lp E p μ)), c • (f + g) = c • f + c • g", " c • (⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + ⟨Quot.mk Setoid.r a✝, property✝⟩) =\n c • ⟨Quot.mk Setoid.r a✝¹, property✝¹⟩ + c • ⟨Quot.mk Setoid.r a✝, property✝⟩" ]
[]
import Mathlib.Data.Rat.Sqrt import Mathlib.Data.Real.Sqrt import Mathlib.RingTheory.Algebraic import Mathlib.RingTheory.Int.Basic import Mathlib.Tactic.IntervalCases #align_import data.real.irrational from "leanprover-community/mathlib"@"7e7aaccf9b0182576cabdde36cf1b5ad3585b70d" open Rat Real multiplicity def ...
Mathlib/Data/Real/Irrational.lean
50
65
theorem irrational_nrt_of_notint_nrt {x : ℝ} (n : ℕ) (m : ℤ) (hxr : x ^ n = m) (hv : ¬∃ y : ℤ, x = y) (hnpos : 0 < n) : Irrational x := by
rintro ⟨⟨N, D, P, C⟩, rfl⟩ rw [← cast_pow] at hxr have c1 : ((D : ℤ) : ℝ) ≠ 0 := by rw [Int.cast_ne_zero, Int.natCast_ne_zero] exact P have c2 : ((D : ℤ) : ℝ) ^ n ≠ 0 := pow_ne_zero _ c1 rw [mk'_eq_divInt, cast_pow, cast_mk, div_pow, div_eq_iff_mul_eq c2, ← Int.cast_pow, ← Int.cast_pow, ← Int.cas...
[ " Irrational x ↔ ∀ (a b : ℤ), x ≠ ↑a / ↑b", " Irrational r", " False", " Irrational x", " ↑↑D ≠ 0", " D ≠ 0", " D = 1", " ↑{ num := N, den := 1, den_nz := P, reduced := C } = ↑N" ]
[ " Irrational x ↔ ∀ (a b : ℤ), x ≠ ↑a / ↑b", " Irrational r", " False" ]
import Mathlib.Algebra.Order.Ring.Cast import Mathlib.Data.Int.Cast.Lemmas import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.PSub import Mathlib.Data.Nat.Size import Mathlib.Data.Num.Bitwise #align_import data.num.lemmas from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2" set_opti...
Mathlib/Data/Num/Lemmas.lean
712
712
theorem bit_to_nat (b n) : (bit b n : ℕ) = Nat.bit b n := by
cases b <;> cases n <;> rfl
[ " ↑(bit b n) = Nat.bit b ↑n", " ↑(bit false n) = Nat.bit false ↑n", " ↑(bit true n) = Nat.bit true ↑n", " ↑(bit false zero) = Nat.bit false ↑zero", " ↑(bit false (pos a✝)) = Nat.bit false ↑(pos a✝)", " ↑(bit true zero) = Nat.bit true ↑zero", " ↑(bit true (pos a✝)) = Nat.bit true ↑(pos a✝)" ]
[]
import Mathlib.Data.Matrix.Block import Mathlib.Data.Matrix.Notation import Mathlib.LinearAlgebra.StdBasis import Mathlib.RingTheory.AlgebraTower import Mathlib.Algebra.Algebra.Subalgebra.Tower #align_import linear_algebra.matrix.to_lin from "leanprover-community/mathlib"@"0e2aab2b0d521f060f62a14d2cf2e2c54e8491d6" ...
Mathlib/LinearAlgebra/Matrix/ToLin.lean
173
176
theorem Matrix.toLinearMapRight'_one : Matrix.toLinearMapRight' (1 : Matrix m m R) = LinearMap.id := by
ext simp [LinearMap.one_apply, stdBasis_apply]
[ " ((LinearMap.stdBasis R (fun x => R) i) 1 ᵥ* M) j = M i j", " ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j", " ∑ x : m, (LinearMap.stdBasis R (fun x => R) i) 1 x * M x j = M i j", " (LinearMap.stdBasis R (fun x => R) i) 1 x✝ = if i = x✝ then 1 else 0", " (LinearMap.stdBasis R (fun x => R) i) 1 x✝ =...
[ " ((LinearMap.stdBasis R (fun x => R) i) 1 ᵥ* M) j = M i j", " ∑ i' : m, (if i = i' then 1 else 0) * M i' j = M i j", " ∑ x : m, (LinearMap.stdBasis R (fun x => R) i) 1 x * M x j = M i j", " (LinearMap.stdBasis R (fun x => R) i) 1 x✝ = if i = x✝ then 1 else 0", " (LinearMap.stdBasis R (fun x => R) i) 1 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
58
58
theorem le_div_iff' (hc : 0 < c) : a ≤ b / c ↔ c * a ≤ b := by
rw [mul_comm, le_div_iff hc]
[ " a ≤ b / c ↔ c * a ≤ b" ]
[]
import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor import Mathlib.CategoryTheory.Monoidal.Functor #align_import category_theory.monoidal.preadditive from "leanprover-community/mathlib"@"986c4d5761f938b2e1c43c01f001b6d9d88c2055" noncomputable section open scoped Classical namespace CategoryTheory open Cat...
Mathlib/CategoryTheory/Monoidal/Preadditive.lean
113
115
theorem tensor_sum {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) : (f ⊗ ∑ j ∈ s, g j) = ∑ j ∈ s, f ⊗ g j := by
simp only [tensorHom_def, whiskerLeft_sum, Preadditive.comp_sum]
[ " ∀ {X Y Z : D}, X ◁ 0 = 0", " X✝ ◁ 0 = 0", " F.map (X✝ ◁ 0) = F.map 0", " ∀ {X Y Z : D}, 0 ▷ X = 0", " 0 ▷ X✝ = 0", " F.map (0 ▷ X✝) = F.map 0", " ∀ {X Y Z : D} (f g : Y ⟶ Z), X ◁ (f + g) = X ◁ f + X ◁ g", " X✝ ◁ (f✝ + g✝) = X✝ ◁ f✝ + X✝ ◁ g✝", " F.map (X✝ ◁ (f✝ + g✝)) = F.map (X✝ ◁ f✝ + X✝ ◁ g✝)",...
[ " ∀ {X Y Z : D}, X ◁ 0 = 0", " X✝ ◁ 0 = 0", " F.map (X✝ ◁ 0) = F.map 0", " ∀ {X Y Z : D}, 0 ▷ X = 0", " 0 ▷ X✝ = 0", " F.map (0 ▷ X✝) = F.map 0", " ∀ {X Y Z : D} (f g : Y ⟶ Z), X ◁ (f + g) = X ◁ f + X ◁ g", " X✝ ◁ (f✝ + g✝) = X✝ ◁ f✝ + X✝ ◁ g✝", " F.map (X✝ ◁ (f✝ + g✝)) = F.map (X✝ ◁ f✝ + X✝ ◁ g✝)",...
import Mathlib.Algebra.Polynomial.AlgebraMap import Mathlib.Algebra.Polynomial.Degree.Lemmas import Mathlib.Algebra.Polynomial.HasseDeriv #align_import data.polynomial.taylor from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a" noncomputable section namespace Polynomial open Polynomial...
Mathlib/Algebra/Polynomial/Taylor.lean
121
123
theorem taylor_eval {R} [CommSemiring R] (r : R) (f : R[X]) (s : R) : (taylor r f).eval s = f.eval (s + r) := by
simp only [taylor_apply, eval_comp, eval_C, eval_X, eval_add]
[ " { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f", " (taylor r) X = X + C r", " (taylor r) (C x) = C x", " taylor 0 = LinearMap.id", " ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono...
[ " { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := fun f => f.comp (X + C r), map_add' := ⋯ }.toFun f", " (taylor r) X = X + C r", " (taylor r) (C x) = C x", " taylor 0 = LinearMap.id", " ((taylor 0 ∘ₗ monomial n✝¹) 1).coeff n✝ = ((LinearMap.id ∘ₗ mono...
import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Tactic.LinearCombination #align_import ring_theory.polynomial.chebyshev from "leanprover-community/mathlib"@"d774451114d6045faeb6751c396bea1eb9058946" namespace Polynomial.Chebyshev set_option linter.uppercaseLean3 false -- `T` `U` `X` open Polynomial v...
Mathlib/RingTheory/Polynomial/Chebyshev.lean
90
91
theorem T_add_one (n : ℤ) : T R (n + 1) = 2 * X * T R n - T R (n - 1) := by
linear_combination (norm := ring_nf) T_add_two R (n - 1)
[ " motive (Int.negSucc n)", " T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))", " T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0", " T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))...
[ " motive (Int.negSucc n)", " T R (-↑(k + 1) + 2) = 2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))", " T R (-↑(k + 1) + 2) - (2 * X * T R (-↑(k + 1) + 1) - T R (-↑(k + 1))) -\n (T R (Int.negSucc k) - (2 * X * T R (-↑k) - T R (-↑k + 1))) =\n 0", " T R (-1 + -↑k + 2) - (2 * X * T R (-↑k) - T R (-1 + -↑k))...
import Mathlib.Algebra.Order.Group.Instances import Mathlib.Analysis.Convex.Segment import Mathlib.Tactic.GCongr #align_import analysis.convex.star from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Set open Convex Pointwise variable {𝕜 E F : Type*} section OrderedSemiring va...
Mathlib/Analysis/Convex/Star.lean
136
139
theorem starConvex_sUnion {S : Set (Set E)} (hS : ∀ s ∈ S, StarConvex 𝕜 x s) : StarConvex 𝕜 x (⋃₀ S) := by
rw [sUnion_eq_iUnion] exact starConvex_iUnion fun s => hS _ s.2
[ " StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s", " StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s", " a • x + b • y ∈ s", " (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s", " StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s", " StarConvex 𝕜 x s → ∀ ⦃...
[ " StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s", " StarConvex 𝕜 x s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s", " a • x + b • y ∈ s", " (∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s) → StarConvex 𝕜 x s", " StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s", " StarConvex 𝕜 x s → ∀ ⦃...
import Mathlib.SetTheory.Game.Basic import Mathlib.Tactic.NthRewrite #align_import set_theory.game.impartial from "leanprover-community/mathlib"@"2e0975f6a25dd3fbfb9e41556a77f075f6269748" universe u namespace SetTheory open scoped PGame namespace PGame def ImpartialAux : PGame → Prop | G => (G ≈ -G) ∧ (∀ i...
Mathlib/SetTheory/Game/Impartial.lean
50
52
theorem impartial_def {G : PGame} : G.Impartial ↔ (G ≈ -G) ∧ (∀ i, Impartial (G.moveLeft i)) ∧ ∀ j, Impartial (G.moveRight j) := by
simpa only [impartial_iff_aux] using impartialAux_def
[ " G.ImpartialAux ↔\n G ≈ -G ∧ (∀ (i : G.LeftMoves), (G.moveLeft i).ImpartialAux) ∧ ∀ (j : G.RightMoves), (G.moveRight j).ImpartialAux", " G.Impartial ↔\n G ≈ -G ∧ (∀ (i : G.LeftMoves), (G.moveLeft i).Impartial) ∧ ∀ (j : G.RightMoves), (G.moveRight j).Impartial" ]
[ " G.ImpartialAux ↔\n G ≈ -G ∧ (∀ (i : G.LeftMoves), (G.moveLeft i).ImpartialAux) ∧ ∀ (j : G.RightMoves), (G.moveRight j).ImpartialAux" ]
import Mathlib.MeasureTheory.Integral.IntervalIntegral import Mathlib.Data.Set.Function #align_import analysis.sum_integral_comparisons from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Set MeasureTheory.MeasureSpace variable {x₀ : ℝ} {a b : ℕ} {f : ℝ → ℝ}
Mathlib/Analysis/SumIntegralComparisons.lean
47
70
theorem AntitoneOn.integral_le_sum (hf : AntitoneOn f (Icc x₀ (x₀ + a))) : (∫ x in x₀..x₀ + a, f x) ≤ ∑ i ∈ Finset.range a, f (x₀ + i) := by
have hint : ∀ k : ℕ, k < a → IntervalIntegrable f volume (x₀ + k) (x₀ + (k + 1 : ℕ)) := by intro k hk refine (hf.mono ?_).intervalIntegrable rw [uIcc_of_le] · apply Icc_subset_Icc · simp only [le_add_iff_nonneg_right, Nat.cast_nonneg] · simp only [add_le_add_iff_left, Nat.cast_le, Nat.suc...
[ " ∫ (x : ℝ) in x₀..x₀ + ↑a, f x ≤ ∑ i ∈ Finset.range a, f (x₀ + ↑i)", " ∀ k < a, IntervalIntegrable f volume (x₀ + ↑k) (x₀ + ↑(k + 1))", " IntervalIntegrable f volume (x₀ + ↑k) (x₀ + ↑(k + 1))", " uIcc (x₀ + ↑k) (x₀ + ↑(k + 1)) ⊆ Icc x₀ (x₀ + ↑a)", " Icc (x₀ + ↑k) (x₀ + ↑(k + 1)) ⊆ Icc x₀ (x₀ + ↑a)", " x₀...
[]
import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Defs import Mathlib.Data.Int.Defs import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Cases import Mathlib.Tactic.SimpRw import Mathlib.Tactic.SplitIfs #align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a...
Mathlib/Algebra/Group/Basic.lean
153
155
theorem ite_one_mul {P : Prop} [Decidable P] {a b : M} : ite P 1 (a * b) = ite P 1 a * ite P 1 b := by
by_cases h:P <;> simp [h]
[ " (if P then a * b else 1) = (if P then a else 1) * if P then b else 1", " (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b" ]
[ " (if P then a * b else 1) = (if P then a else 1) * if P then b else 1" ]
import Mathlib.Algebra.GCDMonoid.Multiset import Mathlib.Combinatorics.Enumerative.Partition import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Cycle.Factors import Mathlib.GroupTheory.Perm.Closure import Mathlib.Algebra.GCDMonoid.Nat import Mathlib.Tactic.NormNum.GCD #align_import group_theory.perm.cycl...
Mathlib/GroupTheory/Perm/Cycle/Type.lean
110
119
theorem card_cycleType_eq_one {σ : Perm α} : Multiset.card σ.cycleType = 1 ↔ σ.IsCycle := by
rw [card_eq_one] simp_rw [cycleType_def, Multiset.map_eq_singleton, ← Finset.singleton_val, Finset.val_inj, cycleFactorsFinset_eq_singleton_iff] constructor · rintro ⟨_, _, ⟨h, -⟩, -⟩ exact h · intro h use σ.support.card, σ simp [h]
[ " σ.cycleType = Multiset.map (Finset.card ∘ support) s.val", " Multiset.map (Finset.card ∘ support) σ.cycleFactorsFinset.val = Multiset.map (Finset.card ∘ support) s.val", " σ.cycleFactorsFinset = s", " (∀ f ∈ s, f.IsCycle) ∧ ∃ (h : (↑s).Pairwise Disjoint), s.noncommProd id ⋯ = σ", " σ.cycleType = ↑(List.ma...
[ " σ.cycleType = Multiset.map (Finset.card ∘ support) s.val", " Multiset.map (Finset.card ∘ support) σ.cycleFactorsFinset.val = Multiset.map (Finset.card ∘ support) s.val", " σ.cycleFactorsFinset = s", " (∀ f ∈ s, f.IsCycle) ∧ ∃ (h : (↑s).Pairwise Disjoint), s.noncommProd id ⋯ = σ", " σ.cycleType = ↑(List.ma...
import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Combinatorics.SimpleGraph.Maps open Finset namespace SimpleGraph variable {V : Type*} [DecidableEq V] (G : SimpleGraph V) (s t : V) namespace Iso variable {G} {W : Type*} {G' : SimpleGraph W} (f : G ≃g G')
Mathlib/Combinatorics/SimpleGraph/Operations.lean
35
39
theorem card_edgeFinset_eq [Fintype G.edgeSet] [Fintype G'.edgeSet] : G.edgeFinset.card = G'.edgeFinset.card := by
apply Finset.card_eq_of_equiv simp only [Set.mem_toFinset] exact f.mapEdgeSet
[ " G.edgeFinset.card = G'.edgeFinset.card", " { x // x ∈ G.edgeFinset } ≃ { x // x ∈ G'.edgeFinset }", " { x // x ∈ G.edgeSet } ≃ { x // x ∈ G'.edgeSet }" ]
[]
import Mathlib.MeasureTheory.Group.GeometryOfNumbers import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic #align_import number_theory.number_field.canonical_embedding from "leanprover-community/mathlib"@"60da01b41bbe4206f05d34fd70c8dd7498717a30" ...
Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
196
202
theorem convexBodyLT'_convex : Convex ℝ (convexBodyLT' K f w₀) := by
refine Convex.prod (convex_pi (fun _ _ => convex_ball _ _)) (convex_pi (fun _ _ => ?_)) split_ifs · simp_rw [abs_lt] refine Convex.inter ((convex_halfspace_re_gt _).inter (convex_halfspace_re_lt _)) ((convex_halfspace_im_gt _).inter (convex_halfspace_im_lt _)) · exact convex_ball _ _
[ " (mixedEmbedding K) x ∈ convexBodyLT' K f w₀ ↔\n (∀ (w : InfinitePlace K), w ≠ ↑w₀ → w x < ↑(f w)) ∧\n |((↑w₀).embedding x).re| < 1 ∧ |((↑w₀).embedding x).im| < ↑(f ↑w₀) ^ 2", " ((∀ (a : InfinitePlace K), a.IsReal → a x < ↑(f a)) ∧\n ∀ (a : InfinitePlace K) (b : a.IsComplex),\n if ⟨a, b⟩ = w₀...
[ " (mixedEmbedding K) x ∈ convexBodyLT' K f w₀ ↔\n (∀ (w : InfinitePlace K), w ≠ ↑w₀ → w x < ↑(f w)) ∧\n |((↑w₀).embedding x).re| < 1 ∧ |((↑w₀).embedding x).im| < ↑(f ↑w₀) ^ 2", " ((∀ (a : InfinitePlace K), a.IsReal → a x < ↑(f a)) ∧\n ∀ (a : InfinitePlace K) (b : a.IsComplex),\n if ⟨a, b⟩ = w₀...
import Mathlib.Data.Nat.Defs import Mathlib.Tactic.GCongr.Core import Mathlib.Tactic.Common import Mathlib.Tactic.Monotonicity.Attr #align_import data.nat.factorial.basic from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" namespace Nat def factorial : ℕ → ℕ | 0 => 1 | succ n => s...
Mathlib/Data/Nat/Factorial/Basic.lean
132
135
theorem factorial_inj' (h : 1 < n ∨ 1 < m) : n ! = m ! ↔ n = m := by
obtain hn|hm := h · exact factorial_inj hn · rw [eq_comm, factorial_inj hm, eq_comm]
[ " m ! ∣ n !", " m ! ∣ m !", " m ! ∣ n.succ !", " m ! * (m + 1) ^ 0 ≤ (m + 0)!", " m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!", " m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)", " n ! < m ! ↔ n < m", " n ! < m !", " ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!", " k ! < (k + 1)!", " 0 < k * k !", " n...
[ " m ! ∣ n !", " m ! ∣ m !", " m ! ∣ n.succ !", " m ! * (m + 1) ^ 0 ≤ (m + 0)!", " m ! * (m + 1) ^ (n + 1) ≤ (m + (n + 1))!", " m ! * (m + 1) ^ n * (m + 1) ≤ (m + n)! * (m + n + 1)", " n ! < m ! ↔ n < m", " n ! < m !", " ∀ {n : ℕ}, 0 < n → n ! < (n + 1)!", " k ! < (k + 1)!", " 0 < k * k !", " n...
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.List.Perm import Mathlib.Data.List.Range #align_import data.list.sublists from "leanprover-community/mathlib"@"ccad6d5093bd2f5c6ca621fc74674cce51355af6" universe u v w variable {α : Type u} {β : Type v} {γ : Type w} open Nat namespace List @[simp] theo...
Mathlib/Data/List/Sublists.lean
52
59
theorem sublists'Aux_eq_array_foldl (a : α) : ∀ (r₁ r₂ : List (List α)), sublists'Aux a r₁ r₂ = ((r₁.toArray).foldl (init := r₂.toArray) (fun r l => r.push (a :: l))).toList := by
intro r₁ r₂ rw [sublists'Aux, Array.foldl_eq_foldl_data] have := List.foldl_hom Array.toList (fun r l => r.push (a :: l)) (fun r l => r ++ [a :: l]) r₁ r₂.toArray (by simp) simpa using this
[ " ∀ (r₁ r₂ : List (List α)),\n sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList", " sublists'Aux a r₁ r₂ = (Array.foldl (fun r l => r.push (a :: l)) (toArray r₂) (toArray r₁) 0).toList", " foldl (fun r l => r ++ [a :: l]) r₂ r₁ = (foldl (fun r l => r.push (...
[]
import Mathlib.Data.List.Nodup import Mathlib.Data.List.Range #align_import data.list.nat_antidiagonal from "leanprover-community/mathlib"@"7b78d1776212a91ecc94cf601f83bdcc46b04213" open List Function Nat namespace List namespace Nat def antidiagonal (n : ℕ) : List (ℕ × ℕ) := (range (n + 1)).map fun i ↦ (i,...
Mathlib/Data/List/NatAntidiagonal.lean
85
92
theorem antidiagonal_succ_succ' {n : ℕ} : antidiagonal (n + 2) = (0, n + 2) :: (antidiagonal n).map (Prod.map Nat.succ Nat.succ) ++ [(n + 2, 0)] := by
rw [antidiagonal_succ'] simp only [antidiagonal_succ, map_cons, Prod.map_apply, id_eq, map_map, cons_append, cons.injEq, append_cancel_right_eq, true_and] ext simp
[ " x ∈ antidiagonal n ↔ x.1 + x.2 = n", " (∃ a ∈ range (n + 1), (a, n - a) = x) ↔ x.1 + x.2 = n", " (∃ a ∈ range (n + 1), (a, n - a) = x) → x.1 + x.2 = n", " (i, n - i).1 + (i, n - i).2 = n", " x.1 + x.2 = n → ∃ a ∈ range (n + 1), (a, n - a) = x", " ∃ a ∈ range (x.1 + x.2 + 1), (a, x.1 + x.2 - a) = x", "...
[ " x ∈ antidiagonal n ↔ x.1 + x.2 = n", " (∃ a ∈ range (n + 1), (a, n - a) = x) ↔ x.1 + x.2 = n", " (∃ a ∈ range (n + 1), (a, n - a) = x) → x.1 + x.2 = n", " (i, n - i).1 + (i, n - i).2 = n", " x.1 + x.2 = n → ∃ a ∈ range (n + 1), (a, n - a) = x", " ∃ a ∈ range (x.1 + x.2 + 1), (a, x.1 + x.2 - a) = x", "...
import Mathlib.Order.Filter.Basic import Mathlib.Algebra.Module.Pi #align_import order.filter.germ from "leanprover-community/mathlib"@"1f0096e6caa61e9c849ec2adbd227e960e9dff58" namespace Filter variable {α β γ δ : Type*} {l : Filter α} {f g h : α → β} theorem const_eventuallyEq' [NeBot l] {a b : β} : (∀ᶠ _ in ...
Mathlib/Order/Filter/Germ.lean
132
133
theorem isConstant_coe_const {l : Filter α} {b : β} : (fun _ : α ↦ b : Germ l β).IsConstant := by
use b
[ " ∀ (a b : α → β), a ≈ b → (fun f => ∃ b, f =ᶠ[l] fun x => b) a = (fun f => ∃ b, f =ᶠ[l] fun x => b) b", " ∀ (f g : α → β) (b : β), f =ᶠ[l] g → (f =ᶠ[l] fun x => b) → g =ᶠ[l] fun x => b", " (↑fun x => b).IsConstant" ]
[ " ∀ (a b : α → β), a ≈ b → (fun f => ∃ b, f =ᶠ[l] fun x => b) a = (fun f => ∃ b, f =ᶠ[l] fun x => b) b", " ∀ (f g : α → β) (b : β), f =ᶠ[l] g → (f =ᶠ[l] fun x => b) → g =ᶠ[l] fun x => b" ]
import Batteries.Data.List.Basic import Batteries.Data.List.Lemmas open Nat namespace List section countP variable (p q : α → Bool) @[simp] theorem countP_nil : countP p [] = 0 := rfl protected theorem countP_go_eq_add (l) : countP.go p l n = n + countP.go p l 0 := by induction l generalizing n with | nil...
.lake/packages/batteries/Batteries/Data/List/Count.lean
60
66
theorem countP_eq_length_filter (l) : countP p l = length (filter p l) := by
induction l with | nil => rfl | cons x l ih => if h : p x then rw [countP_cons_of_pos p l h, ih, filter_cons_of_pos l h, length] else rw [countP_cons_of_neg p l h, ih, filter_cons_of_neg l h]
[ " countP.go p l n = n + countP.go p l 0", " countP.go p [] n = n + countP.go p [] 0", " countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0", " (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0", " (bif ...
[ " countP.go p l n = n + countP.go p l 0", " countP.go p [] n = n + countP.go p [] 0", " countP.go p (head :: tail) n = n + countP.go p (head :: tail) 0", " (bif p head then countP.go p tail (n + 1) else countP.go p tail n) =\n n + bif p head then countP.go p tail (0 + 1) else countP.go p tail 0", " (bif ...
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.GeomSum import Mathlib.Algebra.Order.Ring.Abs import Mathlib.Data.Nat.Bitwise import Mathlib.Data.Nat.Log import Mathlib.Data.Nat.Prime import Mathlib.Data.Nat.Digits import Mathlib.RingTheory.Multiplicity #align_import data.nat.multiplicity from "l...
Mathlib/Data/Nat/Multiplicity.lean
108
123
theorem multiplicity_factorial {p : ℕ} (hp : p.Prime) : ∀ {n b : ℕ}, log p n < b → multiplicity p n ! = (∑ i ∈ Ico 1 b, n / p ^ i : ℕ) | 0, b, _ => by simp [Ico, hp.multiplicity_one] | n + 1, b, hb => calc multiplicity p (n + 1)! = multiplicity p n ! + multiplicity p (n + 1) := by
rw [factorial_succ, hp.multiplicity_mul, add_comm] _ = (∑ i ∈ Ico 1 b, n / p ^ i : ℕ) + ((Finset.Ico 1 b).filter fun i => p ^ i ∣ n + 1).card := by rw [multiplicity_factorial hp ((log_mono_right <| le_succ _).trans_lt hb), ← multiplicity_eq_card_pow_dvd hp.ne_one (succ_pos _...
[ " multiplicity m n = ↑(Ico 1 ((multiplicity m n).get ⋯ + 1)).card", " i ∈ Ico 1 ((multiplicity m n).get ⋯ + 1) ↔ i ∈ filter (fun i => m ^ i ∣ n) (Ico 1 b)", " 1 ≤ i ∧ m ^ i ∣ n ↔ (1 ≤ i ∧ m ^ i ∣ n) ∧ i < b", " i ≤ m.log n", " i ≤ log 0 n", " i ≠ 0", " i ≤ (m + 1).log n", " multiplicity p 0! = ↑(∑ i ∈...
[ " multiplicity m n = ↑(Ico 1 ((multiplicity m n).get ⋯ + 1)).card", " i ∈ Ico 1 ((multiplicity m n).get ⋯ + 1) ↔ i ∈ filter (fun i => m ^ i ∣ n) (Ico 1 b)", " 1 ≤ i ∧ m ^ i ∣ n ↔ (1 ≤ i ∧ m ^ i ∣ n) ∧ i < b", " i ≤ m.log n", " i ≤ log 0 n", " i ≠ 0", " i ≤ (m + 1).log n" ]
import Mathlib.AlgebraicTopology.DoldKan.Faces import Mathlib.CategoryTheory.Idempotents.Basic #align_import algebraic_topology.dold_kan.projections from "leanprover-community/mathlib"@"32a7e535287f9c73f2e4d2aef306a39190f0b504" open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Pread...
Mathlib/AlgebraicTopology/DoldKan/Projections.lean
75
77
theorem P_add_Q (q : ℕ) : P q + Q q = 𝟙 K[X] := by
rw [Q] abel
[ " (P q).f 0 = 𝟙 (K[X].X 0)", " (P 0).f 0 = 𝟙 (K[X].X 0)", " (P (q + 1)).f 0 = 𝟙 (K[X].X 0)", " P q + Q q = 𝟙 K[X]", " P q + (𝟙 K[X] - P q) = 𝟙 K[X]" ]
[ " (P q).f 0 = 𝟙 (K[X].X 0)", " (P 0).f 0 = 𝟙 (K[X].X 0)", " (P (q + 1)).f 0 = 𝟙 (K[X].X 0)" ]
import Mathlib.Algebra.Group.Indicator import Mathlib.Algebra.Group.Submonoid.Basic import Mathlib.Data.Set.Finite #align_import data.finsupp.defs from "leanprover-community/mathlib"@"842328d9df7e96fd90fc424e115679c15fb23a71" noncomputable section open Finset Function variable {α β γ ι M M' N P G H R S : Type*}...
Mathlib/Data/Finsupp/Defs.lean
188
195
theorem ext_iff' {f g : α →₀ M} : f = g ↔ f.support = g.support ∧ ∀ x ∈ f.support, f x = g x := ⟨fun h => h ▸ ⟨rfl, fun _ _ => rfl⟩, fun ⟨h₁, h₂⟩ => ext fun a => by classical exact if h : a ∈ f.support then h₂ a h else by have hf : f a = 0 := not_mem_support_iff.1 h have hg : g a = 0 :...
rwa [h₁, not_mem_support_iff] at h rw [hf, hg]⟩
[ " Injective toFun", " { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }", " s = t", " a ∈ s ↔ a ∈ t", " ⇑f = 0 ↔ f = 0", " f a = g a", " g a = 0" ]
[ " Injective toFun", " { support := s, toFun := f, mem_support_toFun := hf } = { support := t, toFun := f, mem_support_toFun := hg }", " s = t", " a ∈ s ↔ a ∈ t", " ⇑f = 0 ↔ f = 0" ]
import Mathlib.Probability.Process.Adapted import Mathlib.MeasureTheory.Constructions.BorelSpace.Order #align_import probability.process.stopping from "leanprover-community/mathlib"@"ba074af83b6cf54c3104e59402b39410ddbd6dca" open Filter Order TopologicalSpace open scoped Classical MeasureTheory NNReal ENNReal Top...
Mathlib/Probability/Process/Stopping.lean
72
82
theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStoppingTime f τ) (i : ι) : MeasurableSet[f i] {ω | τ ω < i} := by
by_cases hi_min : IsMin i · suffices {ω : Ω | τ ω < i} = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i) ext1 ω simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff] rw [isMin_iff_forall_not_lt] at hi_min exact hi_min (τ ω) have : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iic (pred i) := by...
[ " MeasurableSet {ω | (fun x => i) ω ≤ j}", " MeasurableSet {ω | τ ω < i}", " MeasurableSet ∅", " {ω | τ ω < i} = ∅", " ω ∈ {ω | τ ω < i} ↔ ω ∈ ∅", " ¬τ ω < i", " {ω | τ ω < i} = τ ⁻¹' Set.Iic (pred i)", " x✝ ∈ {ω | τ ω < i} ↔ x✝ ∈ τ ⁻¹' Set.Iic (pred i)", " MeasurableSet (τ ⁻¹' Set.Iic (pred i))" ]
[ " MeasurableSet {ω | (fun x => i) ω ≤ j}" ]
import Mathlib.Analysis.SpecialFunctions.Integrals #align_import data.real.pi.wallis from "leanprover-community/mathlib"@"980755c33b9168bc82f774f665eaa27878140fac" open scoped Real Topology Nat open Filter Finset intervalIntegral namespace Real namespace Wallis set_option linter.uppercaseLean3 false noncomp...
Mathlib/Data/Real/Pi/Wallis.lean
78
82
theorem W_eq_integral_sin_pow_div_integral_sin_pow (k : ℕ) : (π / 2)⁻¹ * W k = (∫ x : ℝ in (0)..π, sin x ^ (2 * k + 1)) / ∫ x : ℝ in (0)..π, sin x ^ (2 * k) := by
rw [integral_sin_pow_even, integral_sin_pow_odd, mul_div_mul_comm, ← prod_div_distrib, inv_div] simp_rw [div_div_div_comm, div_div_eq_mul_div, mul_div_assoc] rfl
[ " 0 < W k", " 0 < W 0", " 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))", " 0 < W (k + 1)", " 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))", " 0 < 2 * ↑k + 2", " 0 < 2 * ↑k + 1", " 0 < 2 * ↑k + 3", " W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)...
[ " 0 < W k", " 0 < W 0", " 0 < ∏ i ∈ range 0, (2 * ↑i + 2) / (2 * ↑i + 1) * ((2 * ↑i + 2) / (2 * ↑i + 3))", " 0 < W (k + 1)", " 0 < W k * ((2 * ↑k + 2) / (2 * ↑k + 1) * ((2 * ↑k + 2) / (2 * ↑k + 3)))", " 0 < 2 * ↑k + 2", " 0 < 2 * ↑k + 1", " 0 < 2 * ↑k + 3", " W n = 2 ^ (4 * n) * ↑n ! ^ 4 / (↑(2 * n)...
import Mathlib.SetTheory.Cardinal.Ordinal #align_import set_theory.cardinal.continuum from "leanprover-community/mathlib"@"e08a42b2dd544cf11eba72e5fc7bf199d4349925" namespace Cardinal universe u v open Cardinal def continuum : Cardinal.{u} := 2 ^ ℵ₀ #align cardinal.continuum Cardinal.continuum scoped notat...
Mathlib/SetTheory/Cardinal/Continuum.lean
101
103
theorem aleph_one_le_continuum : aleph 1 ≤ 𝔠 := by
rw [← succ_aleph0] exact Order.succ_le_of_lt aleph0_lt_continuum
[ " lift.{v, u_1} 𝔠 = 𝔠", " 𝔠 ≤ lift.{v, u} c ↔ 𝔠 ≤ c", " lift.{v, u} c ≤ 𝔠 ↔ c ≤ 𝔠", " 𝔠 < lift.{v, u} c ↔ 𝔠 < c", " lift.{v, u} c < 𝔠 ↔ c < 𝔠", " beth 1 = 𝔠", " #(Set ℕ) = 𝔠", " aleph 1 ≤ 𝔠", " Order.succ ℵ₀ ≤ 𝔠" ]
[ " lift.{v, u_1} 𝔠 = 𝔠", " 𝔠 ≤ lift.{v, u} c ↔ 𝔠 ≤ c", " lift.{v, u} c ≤ 𝔠 ↔ c ≤ 𝔠", " 𝔠 < lift.{v, u} c ↔ 𝔠 < c", " lift.{v, u} c < 𝔠 ↔ c < 𝔠", " beth 1 = 𝔠", " #(Set ℕ) = 𝔠" ]
import Mathlib.SetTheory.Game.Ordinal import Mathlib.SetTheory.Ordinal.NaturalOps #align_import set_theory.game.birthday from "leanprover-community/mathlib"@"a347076985674932c0e91da09b9961ed0a79508c" universe u open Ordinal namespace SetTheory open scoped NaturalOps PGame namespace PGame noncomputable def b...
Mathlib/SetTheory/Game/Birthday.lean
97
99
theorem birthday_eq_zero {x : PGame} : birthday x = 0 ↔ IsEmpty x.LeftMoves ∧ IsEmpty x.RightMoves := by
rw [birthday_def, max_eq_zero, lsub_eq_zero_iff, lsub_eq_zero_iff]
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
[ " x.birthday = max (lsub fun i => (x.moveLeft i).birthday) (lsub fun i => (x.moveRight i).birthday)", " (mk α✝ β✝ a✝¹ a✝).birthday =\n max (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveLeft i).birthday) (lsub fun i => ((mk α✝ β✝ a✝¹ a✝).moveRight i).birthday)", " max (lsub fun i => (a✝¹ i).birthday) (lsub fun i => (...
import Mathlib.Algebra.BigOperators.Ring import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Fin import Mathlib.GroupTheory.GroupAction.Pi import Mathlib.Logic.Equiv.Fin #align_import algebra.big_operators.fin from "leanprover-community/mathlib"@"cc5dd6244981976cc9da7afc4eee5682b037a013" open Fins...
Mathlib/Algebra/BigOperators/Fin.lean
129
131
theorem prod_univ_three [CommMonoid β] (f : Fin 3 → β) : ∏ i, f i = f 0 * f 1 * f 2 := by
rw [prod_univ_castSucc, prod_univ_two] rfl
[ " (List.ofFn f).prod = ∏ i : Fin n, f i", " ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod", " ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)", " f x * ∏ x_1 : Fin n, f (x.succAboveEmb x_1) = f x * ∏ i : Fin n, f (x.succAbove i)", " ∏ i : Fin (n + 1), f i = (∏ i : Fin n, f i.castSucc)...
[ " (List.ofFn f).prod = ∏ i : Fin n, f i", " ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod", " ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)", " f x * ∏ x_1 : Fin n, f (x.succAboveEmb x_1) = f x * ∏ i : Fin n, f (x.succAbove i)", " ∏ i : Fin (n + 1), f i = (∏ i : Fin n, f i.castSucc)...
import Mathlib.Data.Finsupp.ToDFinsupp import Mathlib.LinearAlgebra.Finsupp import Mathlib.LinearAlgebra.LinearIndependent #align_import linear_algebra.dfinsupp from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64" variable {ι : Type*} {R : Type*} {S : Type*} {M : ι → Type*} {N : Type*} n...
Mathlib/LinearAlgebra/DFinsupp.lean
170
172
theorem lsum_single [Semiring S] [Module S N] [SMulCommClass R S N] (F : ∀ i, M i →ₗ[R] N) (i) (x : M i) : lsum S (M := M) F (single i x) = F i x := by
simp
[ " { toFun := ⇑(sumAddHom fun i => (F i).toAddMonoidHom), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := ⇑(sumAddHom fun i => (F i).toAddMonoidHom), map_add' := ⋯ }.toFun f", " (sumAddHom fun i => (F i).toAddMonoidHom) (c • f) = c • (sumAddHom fun i => (F i).toAddMonoidHom) f", " (sumAddHom f...
[ " { toFun := ⇑(sumAddHom fun i => (F i).toAddMonoidHom), map_add' := ⋯ }.toFun (c • f) =\n (RingHom.id R) c • { toFun := ⇑(sumAddHom fun i => (F i).toAddMonoidHom), map_add' := ⋯ }.toFun f", " (sumAddHom fun i => (F i).toAddMonoidHom) (c • f) = c • (sumAddHom fun i => (F i).toAddMonoidHom) f", " (sumAddHom f...
import Mathlib.Algebra.Homology.ComplexShape import Mathlib.CategoryTheory.Subobject.Limits import Mathlib.CategoryTheory.GradedObject import Mathlib.Algebra.Homology.ShortComplex.Basic #align_import algebra.homology.homological_complex from "leanprover-community/mathlib"@"88bca0ce5d22ebfd9e73e682e51d60ea13b48347" ...
Mathlib/Algebra/Homology/HomologicalComplex.lean
717
719
theorem of_d (j : α) : (of X d sq).d (j + 1) j = d j := by
dsimp [of] rw [if_pos rfl, Category.id_comp]
[ " X i = X (j + 1)", " (fun i j => if h : i = j + 1 then eqToHom ⋯ ≫ d j else 0) i j = 0", " (if h : i = j + 1 then eqToHom ⋯ ≫ d j else 0) = 0", " (fun i j => if h : i = j + 1 then eqToHom ⋯ ≫ d j else 0) i j ≫\n (fun i j => if h : i = j + 1 then eqToHom ⋯ ≫ d j else 0) j k =\n 0", " (fun i j => if ...
[ " X i = X (j + 1)", " (fun i j => if h : i = j + 1 then eqToHom ⋯ ≫ d j else 0) i j = 0", " (if h : i = j + 1 then eqToHom ⋯ ≫ d j else 0) = 0", " (fun i j => if h : i = j + 1 then eqToHom ⋯ ≫ d j else 0) i j ≫\n (fun i j => if h : i = j + 1 then eqToHom ⋯ ≫ d j else 0) j k =\n 0", " (fun i j => if ...
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Nat.GCD.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.Linarith #align_import data.nat.choose.central from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" namespace Nat def centralBinom (n : ℕ) := (2 * n).choose n #alig...
Mathlib/Data/Nat/Choose/Central.lean
105
115
theorem four_pow_le_two_mul_self_mul_centralBinom : ∀ (n : ℕ) (_ : 0 < n), 4 ^ n ≤ 2 * n * centralBinom n | 0, pr => (Nat.not_lt_zero _ pr).elim | 1, _ => by norm_num [centralBinom, choose] | 2, _ => by norm_num [centralBinom, choose] | 3, _ => by norm_num [centralBinom, choose] | n + 4, _ => calc ...
rw [mul_assoc]; refine Nat.le_mul_of_pos_left _ zero_lt_two
[ " (2 * n).choose (2 * n / 2) = (2 * n).choose n", " (2 * n + 2).choose (n + 1) * (n + 1) = (2 * n + 1).choose n * (2 * n + 2)", " (2 * n + 1).choose n * (2 * n + 2) = 2 * ((2 * n + 1).choose n * (n + 1))", " 2 * ((2 * n + 1).choose n * (n + 1)) = 2 * ((2 * n + 1).choose n * (2 * n + 1 - n))", " 2 * ((2 * n ...
[ " (2 * n).choose (2 * n / 2) = (2 * n).choose n", " (2 * n + 2).choose (n + 1) * (n + 1) = (2 * n + 1).choose n * (2 * n + 2)", " (2 * n + 1).choose n * (2 * n + 2) = 2 * ((2 * n + 1).choose n * (n + 1))", " 2 * ((2 * n + 1).choose n * (n + 1)) = 2 * ((2 * n + 1).choose n * (2 * n + 1 - n))", " 2 * ((2 * n ...
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.ContDiff.Defs #align_import analysis.calculus.iterated_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe" noncomputable section open scoped Classical Topology open Filter Asymptotics Set variable {𝕜...
Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
84
86
theorem iteratedDerivWithin_eq_equiv_comp : iteratedDerivWithin n f s = (ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F).symm ∘ iteratedFDerivWithin 𝕜 n f s := by
ext x; rfl
[ " iteratedDerivWithin n f univ = iteratedDeriv n f", " iteratedDerivWithin n f univ x = iteratedDeriv n f x", " iteratedDerivWithin n f s = ⇑(ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F).symm ∘ iteratedFDerivWithin 𝕜 n f s", " iteratedDerivWithin n f s x =\n (⇑(ContinuousMultilinearMap.piFieldEquiv...
[ " iteratedDerivWithin n f univ = iteratedDeriv n f", " iteratedDerivWithin n f univ x = iteratedDeriv n f x" ]
import Mathlib.Data.Finset.Sigma import Mathlib.Data.Finset.Pairwise import Mathlib.Data.Finset.Powerset import Mathlib.Data.Fintype.Basic import Mathlib.Order.CompleteLatticeIntervals #align_import order.sup_indep from "leanprover-community/mathlib"@"c4c2ed622f43768eff32608d4a0f8a6cec1c047d" variable {α β ι ι' :...
Mathlib/Order/SupIndep.lean
120
126
theorem supIndep_map {s : Finset ι'} {g : ι' ↪ ι} : (s.map g).SupIndep f ↔ s.SupIndep (f ∘ g) := by
refine ⟨fun hs t ht i hi hit => ?_, fun hs => ?_⟩ · rw [← sup_map] exact hs (map_subset_map.2 ht) ((mem_map' _).2 hi) (by rwa [mem_map']) · classical rw [map_eq_image] exact hs.image
[ " Decidable (s.SupIndep f)", " (t : Finset ι) → t ⊆ s → Decidable (∀ ⦃i : ι⦄, i ∈ s → i ∉ t → Disjoint (f i) (t.sup f))", " Decidable (∀ ⦃i : ι⦄, i ∈ s → i ∉ t → Disjoint (f i) (t.sup f))", " (a : ι) → a ∈ s → Decidable (a ∉ t → Disjoint (f a) (t.sup f))", " Decidable (i ∉ t → Disjoint (f i) (t.sup f))", ...
[ " Decidable (s.SupIndep f)", " (t : Finset ι) → t ⊆ s → Decidable (∀ ⦃i : ι⦄, i ∈ s → i ∉ t → Disjoint (f i) (t.sup f))", " Decidable (∀ ⦃i : ι⦄, i ∈ s → i ∉ t → Disjoint (f i) (t.sup f))", " (a : ι) → a ∈ s → Decidable (a ∉ t → Disjoint (f a) (t.sup f))", " Decidable (i ∉ t → Disjoint (f i) (t.sup f))", ...
import Mathlib.RingTheory.DedekindDomain.Ideal #align_import ring_theory.dedekind_domain.factorization from "leanprover-community/mathlib"@"2f588be38bb5bec02f218ba14f82fc82eb663f87" noncomputable section open scoped Classical nonZeroDivisors open Set Function UniqueFactorizationMonoid IsDedekindDomain IsDedekind...
Mathlib/RingTheory/DedekindDomain/Factorization.lean
149
156
theorem Associates.finprod_ne_zero (I : Ideal R) : Associates.mk (∏ᶠ v : HeightOneSpectrum R, v.maxPowDividing I) ≠ 0 := by
rw [Associates.mk_ne_zero, finprod_def] split_ifs · rw [Finset.prod_ne_zero_iff] intro v _ apply pow_ne_zero _ v.ne_bot · exact one_ne_zero
[ " {v | v.asIdeal ∣ I}.Finite", " Finite { x // x.asIdeal ∣ I }", " Injective fun v => ⟨(↑v).asIdeal, ⋯⟩", " v = w", " ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0", " {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0...
[ " {v | v.asIdeal ∣ I}.Finite", " Finite { x // x.asIdeal ∣ I }", " Injective fun v => ⟨(↑v).asIdeal, ⋯⟩", " v = w", " ∀ᶠ (v : HeightOneSpectrum R) in Filter.cofinite, ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0", " {v | ¬↑((Associates.mk v.asIdeal).count (Associates.mk I).factors) = 0...
import Mathlib.RingTheory.Ideal.Maps #align_import ring_theory.ideal.prod from "leanprover-community/mathlib"@"052f6013363326d50cb99c6939814a4b8eb7b301" universe u v variable {R : Type u} {S : Type v} [Semiring R] [Semiring S] (I I' : Ideal R) (J J' : Ideal S) namespace Ideal def prod : Ideal (R × S) where ...
Mathlib/RingTheory/Ideal/Prod.lean
82
85
theorem map_prodComm_prod : map ((RingEquiv.prodComm : R × S ≃+* S × R) : R × S →+* S × R) (prod I J) = prod J I := by
refine Trans.trans (ideal_prod_eq _) ?_ simp [map_map]
[ " ∀ {a b : R × S}, a ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → a + b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}", " (a₁, a₂) + (b₁, b₂) ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}", " 0 ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, add_mem' := ⋯ }.carrier", " ∀ (c : R × S) {x : R × S},\n x ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, a...
[ " ∀ {a b : R × S}, a ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J} → a + b ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}", " (a₁, a₂) + (b₁, b₂) ∈ {x | x.1 ∈ I ∧ x.2 ∈ J}", " 0 ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, add_mem' := ⋯ }.carrier", " ∀ (c : R × S) {x : R × S},\n x ∈ { carrier := {x | x.1 ∈ I ∧ x.2 ∈ J}, a...
import Mathlib.Algebra.CharZero.Lemmas import Mathlib.Algebra.GroupWithZero.Commute import Mathlib.Algebra.Order.Field.Basic import Mathlib.Algebra.Order.Ring.Pow import Mathlib.Algebra.Ring.Int #align_import algebra.order.field.power from "leanprover-community/mathlib"@"acb3d204d4ee883eb686f45d486a2a6811a01329" ...
Mathlib/Algebra/Order/Field/Power.lean
166
169
theorem Odd.zpow_nonpos_iff (hn : Odd n) : a ^ n ≤ 0 ↔ a ≤ 0 := by
rw [le_iff_lt_or_eq, le_iff_lt_or_eq, hn.zpow_neg_iff, zpow_eq_zero_iff] rintro rfl exact Int.odd_iff_not_even.1 hn even_zero
[ " 0 ≤ a ^ n", " 0 ≤ a ^ (k + k)", " a ≠ 0 ∨ k + k ≠ 0 ∨ k = 0 ∧ k = 0", " 0 ≤ a ^ k * a ^ k", " 0 < a ^ n ↔ a ≠ 0", " 0 < a ^ (k + k) ↔ a ≠ 0", " k ≠ 0", " a ^ n < 0 ↔ a < 0", " a ^ n < 0", " a ^ (2 * k + 1) < 0", " a ^ (2 * k) * a < 0", " a ^ n ≤ 0 ↔ a ≤ 0", " n ≠ 0", " False" ]
[ " 0 ≤ a ^ n", " 0 ≤ a ^ (k + k)", " a ≠ 0 ∨ k + k ≠ 0 ∨ k = 0 ∧ k = 0", " 0 ≤ a ^ k * a ^ k", " 0 < a ^ n ↔ a ≠ 0", " 0 < a ^ (k + k) ↔ a ≠ 0", " k ≠ 0", " a ^ n < 0 ↔ a < 0", " a ^ n < 0", " a ^ (2 * k + 1) < 0", " a ^ (2 * k) * a < 0" ]
import Mathlib.Data.Set.Image import Mathlib.Order.Interval.Set.Basic #align_import data.set.intervals.with_bot_top from "leanprover-community/mathlib"@"d012cd09a9b256d870751284dd6a29882b0be105" open Set variable {α : Type*} namespace WithTop @[simp] theorem preimage_coe_top : (some : α → WithTop α) ⁻¹' {⊤} =...
Mathlib/Order/Interval/Set/WithBotTop.lean
107
110
theorem image_coe_Icc : (some : α → WithTop α) '' Icc a b = Icc (a : WithTop α) b := by
rw [← preimage_coe_Icc, image_preimage_eq_inter_range, range_coe, inter_eq_self_of_subset_left (Subset.trans Icc_subset_Iic_self <| Iic_subset_Iio.2 <| coe_lt_top b)]
[ " range some = Iio ⊤", " x ∈ range some ↔ x ∈ Iio ⊤", " some ⁻¹' Icc ↑a ↑b = Icc a b", " some ⁻¹' Ico ↑a ↑b = Ico a b", " some ⁻¹' Ioc ↑a ↑b = Ioc a b", " some ⁻¹' Ioo ↑a ↑b = Ioo a b", " some ⁻¹' Iio ⊤ = univ", " some ⁻¹' Ico ↑a ⊤ = Ici a", " some ⁻¹' Ioo ↑a ⊤ = Ioi a", " some '' Ioi a = Ioo ↑a ⊤...
[ " range some = Iio ⊤", " x ∈ range some ↔ x ∈ Iio ⊤", " some ⁻¹' Icc ↑a ↑b = Icc a b", " some ⁻¹' Ico ↑a ↑b = Ico a b", " some ⁻¹' Ioc ↑a ↑b = Ioc a b", " some ⁻¹' Ioo ↑a ↑b = Ioo a b", " some ⁻¹' Iio ⊤ = univ", " some ⁻¹' Ico ↑a ⊤ = Ici a", " some ⁻¹' Ioo ↑a ⊤ = Ioi a", " some '' Ioi a = Ioo ↑a ⊤...
import Mathlib.Analysis.SpecialFunctions.JapaneseBracket import Mathlib.Analysis.SpecialFunctions.Integrals import Mathlib.MeasureTheory.Group.Integral import Mathlib.MeasureTheory.Integral.IntegralEqImproper import Mathlib.MeasureTheory.Measure.Lebesgue.Integral #align_import analysis.special_functions.improper_inte...
Mathlib/Analysis/SpecialFunctions/ImproperIntegrals.lean
57
58
theorem integral_exp_neg_Ioi_zero : (∫ x : ℝ in Ioi 0, exp (-x)) = 1 := by
simpa only [neg_zero, exp_zero] using integral_exp_neg_Ioi 0
[ " IntegrableOn rexp (Iic c) volume", " ∫ (x : ℝ) in id y..c, ‖rexp x‖ ≤ rexp c", " 0 ≤ rexp (id y)", " ∫ (x : ℝ) in Iic c, rexp x = rexp c", " Tendsto (fun i => ∫ (x : ℝ) in id i..c, rexp x) atBot (𝓝 (rexp c))", " 𝓝 (rexp c) = 𝓝 (rexp c - 0)", " Tendsto (fun i => rexp c - rexp (id i)) atBot (𝓝 (rexp...
[ " IntegrableOn rexp (Iic c) volume", " ∫ (x : ℝ) in id y..c, ‖rexp x‖ ≤ rexp c", " 0 ≤ rexp (id y)", " ∫ (x : ℝ) in Iic c, rexp x = rexp c", " Tendsto (fun i => ∫ (x : ℝ) in id i..c, rexp x) atBot (𝓝 (rexp c))", " 𝓝 (rexp c) = 𝓝 (rexp c - 0)", " Tendsto (fun i => rexp c - rexp (id i)) atBot (𝓝 (rexp...
import Mathlib.Geometry.RingedSpace.PresheafedSpace import Mathlib.CategoryTheory.Limits.Final import Mathlib.Topology.Sheaves.Stalks #align_import algebraic_geometry.stalks from "leanprover-community/mathlib"@"d39590fc8728fbf6743249802486f8c91ffe07bc" noncomputable section universe v u v' u' open Opposite Cate...
Mathlib/Geometry/RingedSpace/Stalks.lean
137
145
theorem id (X : PresheafedSpace.{_, _, v} C) (x : X) : stalkMap (𝟙 X) x = 𝟙 (X.stalk x) := by
dsimp [stalkMap] simp only [stalkPushforward.id] erw [← map_comp] convert (stalkFunctor C x).map_id X.presheaf ext simp only [id_c, id_comp, Pushforward.id_hom_app, op_obj, eqToHom_refl, map_id] rfl
[ " Y.presheaf.germ ⟨α.base ↑x, ⋯⟩ ≫ stalkMap α ↑x = α.c.app { unop := U } ≫ X.presheaf.germ x", " stalkMap (𝟙 X) x = 𝟙 (X.stalk x)", " (stalkFunctor C x).map (𝟙 X).c ≫ stalkPushforward C (𝟙 ↑X) X.presheaf x = 𝟙 (X.stalk x)", " (stalkFunctor C x).map (𝟙 X).c ≫ (stalkFunctor C x).map (Pushforward.id X.pres...
[ " Y.presheaf.germ ⟨α.base ↑x, ⋯⟩ ≫ stalkMap α ↑x = α.c.app { unop := U } ≫ X.presheaf.germ x" ]
import Mathlib.Data.ZMod.Basic import Mathlib.Algebra.Group.Nat import Mathlib.Tactic.IntervalCases import Mathlib.GroupTheory.SpecificGroups.Dihedral import Mathlib.GroupTheory.SpecificGroups.Cyclic #align_import group_theory.specific_groups.quaternion from "leanprover-community/mathlib"@"879155bff5af618b9062cbb2915...
Mathlib/GroupTheory/SpecificGroups/Quaternion.lean
200
205
theorem xa_pow_four (i : ZMod (2 * n)) : xa i ^ 4 = 1 := by
rw [pow_succ, pow_succ, sq, xa_mul_xa, a_mul_xa, xa_mul_xa, add_sub_cancel_right, add_sub_assoc, sub_sub_cancel] norm_cast rw [← two_mul] simp [one_def]
[ " ∀ (a b c : QuaternionGroup n), a * b * c = a * (b * c)", " a i * a j * a k = a i * (a j * a k)", " a i * a j * xa k = a i * (a j * xa k)", " a i * xa j * a k = a i * (xa j * a k)", " a i * xa j * xa k = a i * (xa j * xa k)", " xa i * a j * a k = xa i * (a j * a k)", " xa i * a j * xa k = xa i * (a j *...
[ " ∀ (a b c : QuaternionGroup n), a * b * c = a * (b * c)", " a i * a j * a k = a i * (a j * a k)", " a i * a j * xa k = a i * (a j * xa k)", " a i * xa j * a k = a i * (xa j * a k)", " a i * xa j * xa k = a i * (xa j * xa k)", " xa i * a j * a k = xa i * (a j * a k)", " xa i * a j * xa k = xa i * (a j *...
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
98
102
theorem card_le_of_injective [Finite β] (f : α → β) (hf : Function.Injective f) : Nat.card α ≤ Nat.card β := by
haveI := Fintype.ofFinite β haveI := Fintype.ofInjective f hf simpa only [Nat.card_eq_fintype_card, ge_iff_le] using Fintype.card_le_of_injective 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" ]
import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.CategoryTheory.Functor.ReflectsIso #align_import category_theory.concrete_category.reflects_isomorphisms from "leanprover-community/mathlib"@"73dd4b5411ec8fafb18a9d77c9c826907730af80" universe u namespace CategoryTheory instance : (forget (Type...
Mathlib/CategoryTheory/ConcreteCategory/ReflectsIso.lean
31
38
theorem reflectsIsomorphisms_forget₂ [HasForget₂ C D] [(forget C).ReflectsIsomorphisms] : (forget₂ C D).ReflectsIsomorphisms := { reflects := fun X Y f {i} => by haveI i' : IsIso ((forget D).map ((forget₂ C D).map f)) := Functor.map_isIso (forget D) _ haveI : IsIso ((forget C).map f) := by
have := @HasForget₂.forget_comp C D rwa [← this] apply isIso_of_reflects_iso f (forget C) }
[ " IsIso f", " IsIso ((forget C).map f)" ]
[]
import Mathlib.Algebra.Group.Nat set_option autoImplicit true open Lean hiding Literal HashMap open Batteries namespace Sat inductive Literal | pos : Nat → Literal | neg : Nat → Literal def Literal.ofInt (i : Int) : Literal := if i < 0 then Literal.neg (-i-1).toNat else Literal.pos (i-1).toNat def Lit...
Mathlib/Tactic/Sat/FromLRAT.lean
156
166
theorem Valuation.mk_implies {as ps} (as₁) : as = List.reverseAux as₁ ps → (Valuation.mk as).implies p ps as₁.length → p := by
induction ps generalizing as₁ with | nil => exact fun _ ↦ id | cons a as ih => refine fun e H ↦ @ih (a::as₁) e (H ?_) subst e; clear ih H suffices ∀ n n', n' = List.length as₁ + n → ∀ bs, mk (as₁.reverseAux bs) n' ↔ mk bs n from this 0 _ rfl (a::as) induction as₁ with simp | cons b as₁ ...
[ " as = as₁.reverseAux ps → (mk as).implies p ps as₁.length → p", " as = as₁.reverseAux [] → (mk as).implies p [] as₁.length → p", " as✝ = as₁.reverseAux (a :: as) → (mk as✝).implies p (a :: as) as₁.length → p", " mk as✝ as₁.length ↔ a", " mk (as₁.reverseAux (a :: as)) as₁.length ↔ a", " ∀ (n n' : ℕ), n' =...
[]
import Mathlib.Algebra.CharP.Basic import Mathlib.GroupTheory.Perm.Cycle.Type import Mathlib.RingTheory.Coprime.Lemmas #align_import algebra.char_p.char_and_card from "leanprover-community/mathlib"@"2fae5fd7f90711febdadf19c44dc60fae8834d1b"
Mathlib/Algebra/CharP/CharAndCard.lean
24
47
theorem isUnit_iff_not_dvd_char_of_ringChar_ne_zero (R : Type*) [CommRing R] (p : ℕ) [Fact p.Prime] (hR : ringChar R ≠ 0) : IsUnit (p : R) ↔ ¬p ∣ ringChar R := by
have hch := CharP.cast_eq_zero R (ringChar R) have hp : p.Prime := Fact.out constructor · rintro h₁ ⟨q, hq⟩ rcases IsUnit.exists_left_inv h₁ with ⟨a, ha⟩ have h₃ : ¬ringChar R ∣ q := by rintro ⟨r, hr⟩ rw [hr, ← mul_assoc, mul_comm p, mul_assoc] at hq nth_rw 1 [← mul_one (ringChar R)] ...
[ " IsUnit ↑p ↔ ¬p ∣ ringChar R", " IsUnit ↑p → ¬p ∣ ringChar R", " False", " ¬ringChar R ∣ q", " ¬p ∣ ringChar R → IsUnit ↑p", " IsUnit ↑p" ]
[]
import Mathlib.NumberTheory.Padics.PadicIntegers import Mathlib.RingTheory.ZMod #align_import number_theory.padics.ring_homs from "leanprover-community/mathlib"@"565eb991e264d0db702722b4bde52ee5173c9950" noncomputable section open scoped Classical open Nat LocalRing Padic namespace PadicInt variable {p : ℕ} [h...
Mathlib/NumberTheory/Padics/RingHoms.lean
537
544
theorem nthHomSeq_one : nthHomSeq f_compat 1 ≈ 1 := by
intro ε hε change _ < _ at hε use 1 intro j hj haveI : Fact (1 < p ^ j) := ⟨Nat.one_lt_pow (by omega) hp_prime.1.one_lt⟩ suffices (ZMod.cast (1 : ZMod (p ^ j)) : ℚ) = 1 by simp [nthHomSeq, nthHom, this, hε] rw [ZMod.cast_eq_val, ZMod.val_one, Nat.cast_one]
[ " nthHom f 0 = 0", " (fun n => 0) = 0", " ↑p ^ i ∣ nthHom f r j - nthHom f r i", " ↑(nthHom f r j) - ↑(nthHom f r i) = 0", " ↑↑((f j) r).val - ↑↑((f i) r).val = 0", " ↑↑((f j) r).val - ↑↑((ZMod.castHom ⋯ (ZMod (p ^ i))) ((f j) r)).val = 0", " IsCauSeq (padicNorm p) fun n => ↑(nthHom f r n)", " ∃ i, ∀ ...
[ " nthHom f 0 = 0", " (fun n => 0) = 0", " ↑p ^ i ∣ nthHom f r j - nthHom f r i", " ↑(nthHom f r j) - ↑(nthHom f r i) = 0", " ↑↑((f j) r).val - ↑↑((f i) r).val = 0", " ↑↑((f j) r).val - ↑↑((ZMod.castHom ⋯ (ZMod (p ^ i))) ((f j) r)).val = 0", " IsCauSeq (padicNorm p) fun n => ↑(nthHom f r n)", " ∃ i, ∀ ...
import Mathlib.Algebra.Polynomial.Degree.Definitions import Mathlib.Data.ENat.Basic #align_import data.polynomial.degree.trailing_degree from "leanprover-community/mathlib"@"302eab4f46abb63de520828de78c04cb0f9b5836" noncomputable section open Function Polynomial Finsupp Finset open scoped Polynomial namespace ...
Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
117
130
theorem trailingDegree_eq_iff_natTrailingDegree_eq_of_pos {p : R[X]} {n : ℕ} (hn : 0 < n) : p.trailingDegree = n ↔ p.natTrailingDegree = n := by
constructor · intro H rwa [← trailingDegree_eq_iff_natTrailingDegree_eq] rintro rfl rw [trailingDegree_zero] at H exact Option.noConfusion H · intro H rwa [trailingDegree_eq_iff_natTrailingDegree_eq] rintro rfl rw [natTrailingDegree_zero] at H rw [H] at hn exact lt_irrefl _ hn...
[ " p.trailingDegree = ⊤", " p.trailingDegree = ↑p.natTrailingDegree", " ↑n = ↑(Option.getD (↑n) 0)", " p.trailingDegree = ↑n ↔ p.natTrailingDegree = n", " ↑p.natTrailingDegree = ↑n ↔ p.natTrailingDegree = n", " p.trailingDegree = ↑n → p.natTrailingDegree = n", " p.natTrailingDegree = n", " p ≠ 0", " ...
[ " p.trailingDegree = ⊤", " p.trailingDegree = ↑p.natTrailingDegree", " ↑n = ↑(Option.getD (↑n) 0)", " p.trailingDegree = ↑n ↔ p.natTrailingDegree = n", " ↑p.natTrailingDegree = ↑n ↔ p.natTrailingDegree = n" ]
import Mathlib.Topology.Category.TopCat.Limits.Products #align_import topology.category.Top.limits.pullbacks from "leanprover-community/mathlib"@"178a32653e369dce2da68dc6b2694e385d484ef1" -- Porting note: every ML3 decl has an uppercase letter set_option linter.uppercaseLean3 false open TopologicalSpace open Cat...
Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
460
464
theorem colimit_isOpen_iff (F : J ⥤ TopCat.{max v u}) (U : Set ((colimit F : _) : Type max v u)) : IsOpen U ↔ ∀ j, IsOpen (colimit.ι F j ⁻¹' U) := by
dsimp [topologicalSpace_coe] conv_lhs => rw [colimit_topology F] exact isOpen_iSup_iff
[ " c.pt.str = ⨆ j, coinduced (⇑(c.ι.app j)) (F.obj j).str", " IsOpen x✝ ↔ IsOpen x✝", " IsOpen (⇑homeo.symm ⁻¹' x✝) ↔ ∀ (i : J), IsOpen x✝", " IsOpen U ↔ ∀ (j : J), IsOpen (⇑(colimit.ι F j) ⁻¹' U)", "J : Type v inst✝ : SmallCategory J F : J ⥤ TopCat U : Set ↑(colimit F) | IsOpen U" ]
[ " c.pt.str = ⨆ j, coinduced (⇑(c.ι.app j)) (F.obj j).str", " IsOpen x✝ ↔ IsOpen x✝", " IsOpen (⇑homeo.symm ⁻¹' x✝) ↔ ∀ (i : J), IsOpen x✝" ]
import Mathlib.Algebra.Order.BigOperators.Ring.Finset import Mathlib.Analysis.Convex.Hull import Mathlib.LinearAlgebra.AffineSpace.Basis #align_import analysis.convex.combination from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d" open Set Function open scoped Classical open Pointwise ...
Mathlib/Analysis/Convex/Combination.lean
54
56
theorem Finset.centerMass_pair (hne : i ≠ j) : ({i, j} : Finset ι).centerMass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j := by
simp only [centerMass, sum_pair hne, smul_add, (mul_smul _ _ _).symm, div_eq_inv_mul]
[ " ∅.centerMass w z = 0", " {i, j}.centerMass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j" ]
[ " ∅.centerMass w z = 0" ]
import Mathlib.LinearAlgebra.Dimension.Free import Mathlib.Algebra.Homology.ShortComplex.ModuleCat open CategoryTheory namespace ModuleCat variable {ι ι' R : Type*} [Ring R] {S : ShortComplex (ModuleCat R)} (hS : S.Exact) (hS' : S.ShortExact) {v : ι → S.X₁} open CategoryTheory Submodule Set section Span the...
Mathlib/Algebra/Category/ModuleCat/Free.lean
129
138
theorem span_rightExact {w : ι' → S.X₃} (hv : ⊤ ≤ span R (range v)) (hw : ⊤ ≤ span R (range w)) (hE : Epi S.g) : ⊤ ≤ span R (range (Sum.elim (S.f ∘ v) (S.g.toFun.invFun ∘ w))) := by
refine span_exact hS ?_ hv ?_ · simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, Sum.elim_comp_inl] · convert hw simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, Sum.elim_comp_inr] rw [ModuleCat.epi_iff_surjective] at hE rw [← Function.comp.assoc, Function.RightInverse.comp_eq_id (Funct...
[ " ⊤ ≤ span R (range u)", " m ∈ span R (range u)", " m - m' ∈ LinearMap.range S.f", " m - m' ∈ LinearMap.ker S.g", " S.g m = S.g m'", " (cm.sum fun i a => a • (⇑S.g ∘ u ∘ Sum.inr) i) = cm.sum fun a b => S.g (b • u (Sum.inr a))", " (cn.sum fun a b => S.f (b • v a)) + m' ∈ span R (range u)", " (cn.sum fu...
[ " ⊤ ≤ span R (range u)", " m ∈ span R (range u)", " m - m' ∈ LinearMap.range S.f", " m - m' ∈ LinearMap.ker S.g", " S.g m = S.g m'", " (cm.sum fun i a => a • (⇑S.g ∘ u ∘ Sum.inr) i) = cm.sum fun a b => S.g (b • u (Sum.inr a))", " (cn.sum fun a b => S.f (b • v a)) + m' ∈ span R (range u)", " (cn.sum fu...
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.Polynomial.Monic import Mathlib.Data.Nat.Factorial.Basic import Mathlib.LinearAlgebra.Vandermonde import Mathlib.RingTheory.Polynomial.Pochhammer namespace Nat def superFactorial : ℕ → ℕ | 0 => 1 | succ n => factorial n.succ * superFactoria...
Mathlib/Data/Nat/Factorial/SuperFactorial.lean
96
102
theorem superFactorial_four_mul (n : ℕ) : sf (4 * n) = ((∏ i ∈ range (2 * n), (2 * i + 1) !) * 2 ^ n) ^ 2 * (2 * n) ! := calc sf (4 * n) = (∏ i ∈ range (2 * n), (2 * i + 1) !) ^ 2 * 2 ^ (2 * n) * (2 * n) ! := by
rw [← superFactorial_two_mul, ← mul_assoc, Nat.mul_two] _ = ((∏ i ∈ range (2 * n), (2 * i + 1) !) * 2 ^ n) ^ 2 * (2 * n) ! := by rw [pow_mul', mul_pow]
[ " ∏ x ∈ Icc 1 (n + 1), x ! = sf n + 1", " ∏ x ∈ range (n + 1 + 1), x ! = sf n + 1", " (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n)", " (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf 0)", " (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n + 1)", " (∏ j ∈ Ioi 0, (↑↑j - ↑↑0)) * ∏ i : Fin (n + 1), ∏ j ∈ Ioi (F...
[ " ∏ x ∈ Icc 1 (n + 1), x ! = sf n + 1", " ∏ x ∈ range (n + 1 + 1), x ! = sf n + 1", " (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n)", " (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf 0)", " (Matrix.vandermonde fun i => ↑↑i).det = ↑(sf n + 1)", " (∏ j ∈ Ioi 0, (↑↑j - ↑↑0)) * ∏ i : Fin (n + 1), ∏ j ∈ Ioi (F...
import Mathlib.Tactic.FinCases import Mathlib.Data.Nat.Choose.Sum import Mathlib.LinearAlgebra.Finsupp import Mathlib.Algebra.Field.IsField #align_import ring_theory.ideal.basic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988" universe u v w variable {α : Type u} {β : Type v} open ...
Mathlib/RingTheory/Ideal/Basic.lean
84
89
theorem eq_top_of_unit_mem (x y : α) (hx : x ∈ I) (h : y * x = 1) : I = ⊤ := eq_top_iff.2 fun z _ => calc z = z * (y * x) := by
simp [h] _ = z * y * x := Eq.symm <| mul_assoc z y x _ ∈ I := I.mul_mem_left _ hx
[ " z = z * (y * x)" ]
[]
import Mathlib.Analysis.Complex.Isometry import Mathlib.Analysis.NormedSpace.ConformalLinearMap import Mathlib.Analysis.NormedSpace.FiniteDimension #align_import analysis.complex.conformal from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6" noncomputable section open Complex Continuous...
Mathlib/Analysis/Complex/Conformal.lean
49
62
theorem isConformalMap_complex_linear {map : ℂ →L[ℂ] E} (nonzero : map ≠ 0) : IsConformalMap (map.restrictScalars ℝ) := by
have minor₁ : ‖map 1‖ ≠ 0 := by simpa only [ext_ring_iff, Ne, norm_eq_zero] using nonzero refine ⟨‖map 1‖, minor₁, ⟨‖map 1‖⁻¹ • ((map : ℂ →ₗ[ℂ] E) : ℂ →ₗ[ℝ] E), ?_⟩, ?_⟩ · intro x simp only [LinearMap.smul_apply] have : x = x • (1 : ℂ) := by rw [smul_eq_mul, mul_one] nth_rw 1 [this] rw [LinearMap...
[ " IsConformalMap (restrictScalars ℝ map)", " ‖map 1‖ ≠ 0", " ∀ (x : ℂ), ‖(‖map 1‖⁻¹ • ↑ℝ ↑map) x‖ = ‖x‖", " ‖(‖map 1‖⁻¹ • ↑ℝ ↑map) x‖ = ‖x‖", " ‖‖map 1‖⁻¹ • (↑ℝ ↑map) x‖ = ‖x‖", " x = x • 1", " ‖‖map 1‖⁻¹ • (↑ℝ ↑map) (x • 1)‖ = ‖x‖", " ‖‖map 1‖⁻¹ • ↑map (x • 1)‖ = ‖x‖", " ‖map 1‖⁻¹ * (‖x‖ * ‖map 1‖)...
[]
import Mathlib.Data.Vector.Basic import Mathlib.Data.Vector.Snoc set_option autoImplicit true namespace Vector section Fold section Bisim variable {xs : Vector α n} theorem mapAccumr_bisim {f₁ : α → σ₁ → σ₁ × β} {f₂ : α → σ₂ → σ₂ × β} {s₁ : σ₁} {s₂ : σ₂} (R : σ₁ → σ₂ → Prop) (h₀ : R s₁ s₂) (hR : ∀ {...
Mathlib/Data/Vector/MapLemmas.lean
205
211
theorem mapAccumr₂_bisim_tail {ys : Vector β n} {f₁ : α → β → σ₁ → σ₁ × γ} {f₂ : α → β → σ₂ → σ₂ × γ} {s₁ : σ₁} {s₂ : σ₂} (h : ∃ R : σ₁ → σ₂ → Prop, R s₁ s₂ ∧ ∀ {s q} a b, R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2) : (mapAccumr₂ f₁ xs ys s₁).2 = (mapAccumr₂ f₂ xs ys s₂).2 := by
rcases h with ⟨R, h₀, hR⟩ exact (mapAccumr₂_bisim R h₀ hR).2
[ " R (mapAccumr f₁ xs s₁).1 (mapAccumr f₂ xs s₂).1 ∧ (mapAccumr f₁ xs s₁).2 = (mapAccumr f₂ xs s₂).2", " R (mapAccumr f₁ (xs✝.snoc x✝) s₁).1 (mapAccumr f₂ (xs✝.snoc x✝) s₂).1 ∧\n (mapAccumr f₁ (xs✝.snoc x✝) s₁).2 = (mapAccumr f₂ (xs✝.snoc x✝) s₂).2", " R (mapAccumr f₁ nil s₁).1 (mapAccumr f₂ nil s₂).1 ∧ (mapA...
[ " R (mapAccumr f₁ xs s₁).1 (mapAccumr f₂ xs s₂).1 ∧ (mapAccumr f₁ xs s₁).2 = (mapAccumr f₂ xs s₂).2", " R (mapAccumr f₁ (xs✝.snoc x✝) s₁).1 (mapAccumr f₂ (xs✝.snoc x✝) s₂).1 ∧\n (mapAccumr f₁ (xs✝.snoc x✝) s₁).2 = (mapAccumr f₂ (xs✝.snoc x✝) s₂).2", " R (mapAccumr f₁ nil s₁).1 (mapAccumr f₂ nil s₂).1 ∧ (mapA...
import Mathlib.Algebra.Group.Commute.Units import Mathlib.Algebra.Group.Invertible.Basic import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Data.Set.Basic import Mathlib.Logic.Basic #align_import group_theory.subsemigroup.center from "leanprover-community/mathlib"@"1ac8d4304efba9d03fa720d06516fac845aa535...
Mathlib/Algebra/Group/Center.lean
98
119
theorem mul_mem_center [Mul M] {z₁ z₂ : M} (hz₁ : z₁ ∈ Set.center M) (hz₂ : z₂ ∈ Set.center M) : z₁ * z₂ ∈ Set.center M where comm a := calc z₁ * z₂ * a = z₂ * z₁ * a := by
rw [hz₁.comm] _ = z₂ * (z₁ * a) := by rw [hz₁.mid_assoc z₂] _ = (a * z₁) * z₂ := by rw [hz₁.comm, hz₂.comm] _ = a * (z₁ * z₂) := by rw [hz₂.right_assoc a z₁] left_assoc (b c : M) := calc z₁ * z₂ * (b * c) = z₁ * (z₂ * (b * c)) := by rw [hz₂.mid_assoc] _ = z₁ * ((z₂ * b) * c) := by rw [hz₂.left_as...
[ " z₁ * z₂ * a = z₂ * z₁ * a", " z₂ * z₁ * a = z₂ * (z₁ * a)", " z₂ * (z₁ * a) = a * z₁ * z₂", " a * z₁ * z₂ = a * (z₁ * z₂)", " z₁ * z₂ * (b * c) = z₁ * (z₂ * (b * c))", " z₁ * (z₂ * (b * c)) = z₁ * (z₂ * b * c)", " z₁ * (z₂ * b * c) = z₁ * (z₂ * b) * c", " z₁ * (z₂ * b) * c = z₁ * z₂ * b * c", " a ...
[]
import Mathlib.Algebra.Order.Group.Nat import Mathlib.Data.List.Rotate import Mathlib.GroupTheory.Perm.Support #align_import group_theory.perm.list from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" namespace List variable {α β : Type*} section FormPerm variable [DecidableEq α] (l :...
Mathlib/GroupTheory/Perm/List.lean
88
92
theorem zipWith_swap_prod_support [Fintype α] (l l' : List α) : (zipWith swap l l').prod.support ≤ l.toFinset ⊔ l'.toFinset := by
intro x hx have hx' : x ∈ { x | (zipWith swap l l').prod x ≠ x } := by simpa using hx simpa using zipWith_swap_prod_support' _ _ hx'
[ " (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹", " (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []", " (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h", " x = a → x ∈ a :: l", " x ∈ x :: l", " x = b → x ∈ b :: l'", " x ∈ x...
[ " (zipWith swap [] x✝¹).prod x✝ ≠ x✝ → x✝ ∈ [] ∨ x✝ ∈ x✝¹", " (zipWith swap x✝¹ []).prod x✝ ≠ x✝ → x✝ ∈ x✝¹ ∨ x✝ ∈ []", " (swap (?m.1920 a l b l' x hx h) (?m.1921 a l b l' x hx h)) (?m.1919 a l b l' x hx h) ≠ ?m.1919 a l b l' x hx h", " x = a → x ∈ a :: l", " x ∈ x :: l", " x = b → x ∈ b :: l'", " x ∈ x...
import Mathlib.Algebra.GroupWithZero.Hom import Mathlib.Algebra.GroupWithZero.Units.Basic import Mathlib.Algebra.Ring.Defs import Mathlib.Data.Nat.Lattice #align_import ring_theory.nilpotent from "leanprover-community/mathlib"@"da420a8c6dd5bdfb85c4ced85c34388f633bc6ff" universe u v open Function Set variable {R ...
Mathlib/RingTheory/Nilpotent/Defs.lean
64
68
theorem IsNilpotent.of_pow [MonoidWithZero R] {x : R} {m : ℕ} (h : IsNilpotent (x ^ m)) : IsNilpotent x := by
obtain ⟨n, h⟩ := h use m*n rw [← h, pow_mul x m n]
[ " IsNilpotent (x ^ n.succ)", " (x ^ n.succ) ^ N = 0", " IsNilpotent x", " x ^ (m * n) = 0" ]
[ " IsNilpotent (x ^ n.succ)", " (x ^ n.succ) ^ N = 0" ]
import Mathlib.Topology.Separation open Topology Filter Set TopologicalSpace section Basic variable {α : Type*} [TopologicalSpace α] {C : Set α} theorem AccPt.nhds_inter {x : α} {U : Set α} (h_acc : AccPt x (𝓟 C)) (hU : U ∈ 𝓝 x) : AccPt x (𝓟 (U ∩ C)) := by have : 𝓝[≠] x ≤ 𝓟 U := by rw [le_princ...
Mathlib/Topology/Perfect.lean
87
88
theorem preperfect_iff_nhds : Preperfect C ↔ ∀ x ∈ C, ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x := by
simp only [Preperfect, accPt_iff_nhds]
[ " AccPt x (𝓟 (U ∩ C))", " 𝓝[≠] x ≤ 𝓟 U", " U ∈ 𝓝[≠] x", " (𝓝[≠] x ⊓ 𝓟 C).NeBot", " Preperfect C ↔ ∀ x ∈ C, ∀ U ∈ 𝓝 x, ∃ y ∈ U ∩ C, y ≠ x" ]
[ " AccPt x (𝓟 (U ∩ C))", " 𝓝[≠] x ≤ 𝓟 U", " U ∈ 𝓝[≠] x", " (𝓝[≠] x ⊓ 𝓟 C).NeBot" ]
import Mathlib.LinearAlgebra.FiniteDimensional import Mathlib.LinearAlgebra.FreeModule.Finite.Basic import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition import Mathlib.LinearAlgebra.Projection import Mathlib.LinearAlgebra.SesquilinearForm import Mathlib.RingTheory.TensorProduct.Basic import Mathlib.RingTheory.I...
Mathlib/LinearAlgebra/Dual.lean
333
334
theorem toDual_apply_right (i : ι) (m : M) : b.toDual (b i) m = b.repr m i := by
rw [← b.toDual_total_right, b.total_repr]
[ " (b.toDual (b i)) (b j) = if i = j then 1 else 0", " (if j = i then 1 else 0) = if i = j then 1 else 0", " (b.toDual ((Finsupp.total ι M R ⇑b) f)) (b i) = f i", " ∑ d ∈ f.support, (b.toDual (f d • b d)) (b i) = f i", " (if i ∈ f.support then f i else 0) = f i", " f i = f i", " 0 = f i", " (b.toDual (...
[ " (b.toDual (b i)) (b j) = if i = j then 1 else 0", " (if j = i then 1 else 0) = if i = j then 1 else 0", " (b.toDual ((Finsupp.total ι M R ⇑b) f)) (b i) = f i", " ∑ d ∈ f.support, (b.toDual (f d • b d)) (b i) = f i", " (if i ∈ f.support then f i else 0) = f i", " f i = f i", " 0 = f i", " (b.toDual (...
import Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing import Mathlib.AlgebraicGeometry.OpenImmersion #align_import algebraic_geometry.gluing from "leanprover-community/mathlib"@"533f62f4dd62a5aad24a04326e6e787c8f7e98b1" set_option linter.uppercaseLean3 false noncomputable section universe u open Topologica...
Mathlib/AlgebraicGeometry/Gluing.lean
314
316
theorem gluedCoverT'_snd_snd (x y z : 𝒰.J) : gluedCoverT' 𝒰 x y z ≫ pullback.snd ≫ pullback.snd = pullback.fst ≫ pullback.fst := by
delta gluedCoverT'; simp
[ " pullback pullback.fst pullback.fst ⟶ pullback pullback.fst pullback.fst", " pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟶ pullback pullback.fst pullback.fst", " pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟶ pullback (pullback.fst ≫ 𝒰.map y) (𝒰.map z)", " (pullback.fst ≫ 𝒰.map x) ≫ 𝟙 X = (pullbackSym...
[ " pullback pullback.fst pullback.fst ⟶ pullback pullback.fst pullback.fst", " pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟶ pullback pullback.fst pullback.fst", " pullback (pullback.fst ≫ 𝒰.map x) (𝒰.map z) ⟶ pullback (pullback.fst ≫ 𝒰.map y) (𝒰.map z)", " (pullback.fst ≫ 𝒰.map x) ≫ 𝟙 X = (pullbackSym...
import Mathlib.Data.Nat.Choose.Basic import Mathlib.Data.Nat.GCD.Basic import Mathlib.Tactic.Ring import Mathlib.Tactic.Linarith #align_import data.nat.choose.central from "leanprover-community/mathlib"@"0a0ec35061ed9960bf0e7ffb0335f44447b58977" namespace Nat def centralBinom (n : ℕ) := (2 * n).choose n #alig...
Mathlib/Data/Nat/Choose/Central.lean
118
121
theorem two_dvd_centralBinom_succ (n : ℕ) : 2 ∣ centralBinom (n + 1) := by
use (n + 1 + n).choose n rw [centralBinom_eq_two_mul_choose, two_mul, ← add_assoc, choose_succ_succ' (n + 1 + n) n, choose_symm_add, ← two_mul]
[ " (2 * n).choose (2 * n / 2) = (2 * n).choose n", " (2 * n + 2).choose (n + 1) * (n + 1) = (2 * n + 1).choose n * (2 * n + 2)", " (2 * n + 1).choose n * (2 * n + 2) = 2 * ((2 * n + 1).choose n * (n + 1))", " 2 * ((2 * n + 1).choose n * (n + 1)) = 2 * ((2 * n + 1).choose n * (2 * n + 1 - n))", " 2 * ((2 * n ...
[ " (2 * n).choose (2 * n / 2) = (2 * n).choose n", " (2 * n + 2).choose (n + 1) * (n + 1) = (2 * n + 1).choose n * (2 * n + 2)", " (2 * n + 1).choose n * (2 * n + 2) = 2 * ((2 * n + 1).choose n * (n + 1))", " 2 * ((2 * n + 1).choose n * (n + 1)) = 2 * ((2 * n + 1).choose n * (2 * n + 1 - n))", " 2 * ((2 * n ...
import Mathlib.CategoryTheory.Subobject.Lattice #align_import category_theory.subobject.limits from "leanprover-community/mathlib"@"956af7c76589f444f2e1313911bad16366ea476d" universe v u noncomputable section open CategoryTheory CategoryTheory.Category CategoryTheory.Limits CategoryTheory.Subobject Opposite var...
Mathlib/CategoryTheory/Subobject/Limits.lean
168
171
theorem kernelSubobjectMap_comp {X'' Y'' : C} {f'' : X'' ⟶ Y''} [HasKernel f''] (sq : Arrow.mk f ⟶ Arrow.mk f') (sq' : Arrow.mk f' ⟶ Arrow.mk f'') : kernelSubobjectMap (sq ≫ sq') = kernelSubobjectMap sq ≫ kernelSubobjectMap sq' := by
aesop_cat
[ " (kernelSubobjectIso f).hom ≫ kernel.ι f = (kernelSubobject f).arrow", " (kernelSubobjectIso f).inv ≫ (kernelSubobject f).arrow = kernel.ι f", " (kernelSubobject f).arrow ≫ f = 0", " ((kernelSubobjectIso f).hom ≫ kernel.ι f) ≫ f = 0", " kernel.lift f h w ≫ (MonoOver.mk' (kernel.ι f)).arrow = h", " h ≫ f ...
[ " (kernelSubobjectIso f).hom ≫ kernel.ι f = (kernelSubobject f).arrow", " (kernelSubobjectIso f).inv ≫ (kernelSubobject f).arrow = kernel.ι f", " (kernelSubobject f).arrow ≫ f = 0", " ((kernelSubobjectIso f).hom ≫ kernel.ι f) ≫ f = 0", " kernel.lift f h w ≫ (MonoOver.mk' (kernel.ι f)).arrow = h", " h ≫ f ...
import Mathlib.MeasureTheory.Integral.IntegralEqImproper #align_import measure_theory.integral.peak_function from "leanprover-community/mathlib"@"13b0d72fd8533ba459ac66e9a885e35ffabb32b2" open Set Filter MeasureTheory MeasureTheory.Measure TopologicalSpace Metric open scoped Topology ENNReal open Set variable...
Mathlib/MeasureTheory/Integral/PeakFunction.lean
54
86
theorem integrableOn_peak_smul_of_integrableOn_of_tendsto (hs : MeasurableSet s) (h'st : t ∈ 𝓝[s] x₀) (hlφ : ∀ u : Set α, IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)) (hiφ : Tendsto (fun i ↦ ∫ x in t, φ i x ∂μ) l (𝓝 1)) (h'iφ : ∀ᶠ i in l, AEStronglyMeasurable (φ i) (μ.restrict s)) (hmg : ...
obtain ⟨u, u_open, x₀u, ut, hu⟩ : ∃ u, IsOpen u ∧ x₀ ∈ u ∧ s ∩ u ⊆ t ∧ ∀ x ∈ u ∩ s, g x ∈ ball a 1 := by rcases mem_nhdsWithin.1 (Filter.inter_mem h'st (hcg (ball_mem_nhds _ zero_lt_one))) with ⟨u, u_open, x₀u, hu⟩ refine ⟨u, u_open, x₀u, ?_, hu.trans inter_subset_right⟩ rw [inter_comm] e...
[ " ∀ᶠ (i : ι) in l, IntegrableOn (fun x => φ i x • g x) s μ", " ∃ u, IsOpen u ∧ x₀ ∈ u ∧ s ∩ u ⊆ t ∧ ∀ x ∈ u ∩ s, g x ∈ ball a 1", " s ∩ u ⊆ t", " u ∩ s ⊆ t", " IntegrableOn (fun x => φ i x • g x) s μ", " False", " IntegrableOn (fun x => φ i x • g x) (s \\ u) μ", " Memℒp (fun x => φ i x) ⊤ (μ.restrict ...
[]
import Batteries.Classes.Order namespace Batteries.PairingHeapImp inductive Heap (α : Type u) where | nil : Heap α | node (a : α) (child sibling : Heap α) : Heap α deriving Repr def Heap.size : Heap α → Nat | .nil => 0 | .node _ c s => c.size + 1 + s.size def Heap.singleton (a : α) : Heap α := ....
.lake/packages/batteries/Batteries/Data/PairingHeap.lean
123
127
theorem Heap.size_merge (le) {s₁ s₂ : Heap α} (h₁ : s₁.NoSibling) (h₂ : s₂.NoSibling) : (merge le s₁ s₂).size = s₁.size + s₂.size := by
match h₁, h₂ with | .nil, .nil | .nil, .node _ _ | .node _ _, .nil => simp [size] | .node _ _, .node _ _ => unfold merge; dsimp; split <;> simp_arith [size]
[ " (merge le s₁ s₂).NoSibling", " (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni...
[ " (merge le s₁ s₂).NoSibling", " (match s₁, s₂ with\n | nil, nil => nil\n | nil, node a₂ c₂ sibling => node a₂ c₂ nil\n | node a₁ c₁ sibling, nil => node a₁ c₁ nil\n | node a₁ c₁ sibling, node a₂ c₂ sibling_1 =>\n if le a₁ a₂ = true then node a₁ (node a₂ c₂ c₁) nil else node a₂ (node a₁ c₁ c₂) ni...
import Mathlib.Data.Finset.Grade import Mathlib.Order.Interval.Finset.Basic #align_import data.finset.interval from "leanprover-community/mathlib"@"98e83c3d541c77cdb7da20d79611a780ff8e7d90" variable {α β : Type*} namespace Finset section Decidable variable [DecidableEq α] (s t : Finset α) instance instLocally...
Mathlib/Data/Finset/Interval.lean
125
125
theorem card_Iic_finset : (Iic s).card = 2 ^ s.card := by
rw [Iic_eq_powerset, card_powerset]
[ " u ∈ (fun s t => filter (fun x => s ⊆ x) t.powerset) s t ↔ s ≤ u ∧ u ≤ t", " u ⊆ t ∧ s ⊆ u ↔ s ≤ u ∧ u ≤ t", " u ∈ (fun s t => filter (fun x => s ⊆ x) t.ssubsets) s t ↔ s ≤ u ∧ u < t", " u ⊂ t ∧ s ⊆ u ↔ s ≤ u ∧ u < t", " u ∈ (fun s t => filter (fun x => s ⊂ x) t.powerset) s t ↔ s < u ∧ u ≤ t", " u ⊆ t ∧ ...
[ " u ∈ (fun s t => filter (fun x => s ⊆ x) t.powerset) s t ↔ s ≤ u ∧ u ≤ t", " u ⊆ t ∧ s ⊆ u ↔ s ≤ u ∧ u ≤ t", " u ∈ (fun s t => filter (fun x => s ⊆ x) t.ssubsets) s t ↔ s ≤ u ∧ u < t", " u ⊂ t ∧ s ⊆ u ↔ s ≤ u ∧ u < t", " u ∈ (fun s t => filter (fun x => s ⊂ x) t.powerset) s t ↔ s < u ∧ u ≤ t", " u ⊆ t ∧ ...
import Aesop import Mathlib.Algebra.Group.Defs import Mathlib.Data.Nat.Defs import Mathlib.Data.Int.Defs import Mathlib.Logic.Function.Basic import Mathlib.Tactic.Cases import Mathlib.Tactic.SimpRw import Mathlib.Tactic.SplitIfs #align_import algebra.group.basic from "leanprover-community/mathlib"@"a07d750983b94c530a...
Mathlib/Algebra/Group/Basic.lean
202
203
theorem mul_rotate (a b c : G) : a * b * c = b * c * a := by
simp only [mul_left_comm, mul_comm]
[ " a * b * (c * d) = a * c * (b * d)", " a * b * c = b * c * a" ]
[ " a * b * (c * d) = a * c * (b * d)" ]
import Mathlib.Algebra.Group.Subgroup.Basic import Mathlib.Algebra.Order.Archimedean import Mathlib.Data.Set.Lattice #align_import group_theory.archimedean from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6" open Set variable {G : Type*} [LinearOrderedAddCommGroup G] [Archimedean G] th...
Mathlib/GroupTheory/Archimedean.lean
60
87
theorem AddSubgroup.exists_isLeast_pos {H : AddSubgroup G} (hbot : H ≠ ⊥) {a : G} (h₀ : 0 < a) (hd : Disjoint (H : Set G) (Ioo 0 a)) : ∃ b, IsLeast { g : G | g ∈ H ∧ 0 < g } b := by
-- todo: move to a lemma? have hex : ∀ g > 0, ∃ n : ℕ, g ∈ Ioc (n • a) ((n + 1) • a) := fun g hg => by rcases existsUnique_add_zsmul_mem_Ico h₀ 0 (g - a) with ⟨m, ⟨hm, hm'⟩, -⟩ simp only [zero_add, sub_le_iff_le_add, sub_add_cancel, ← add_one_zsmul] at hm hm' lift m to ℕ · rw [← Int.lt_add_one_iff,...
[ " H = closure {a}", " {a} ⊆ ↑H", " H ≤ closure {a}", " g ∈ closure {a}", " g - k • a = 0", " False", " a ≤ g - k • a", " g - k • a ∈ H", " 0 < g - k • a", " ∃ b, IsLeast {g | g ∈ H ∧ 0 < g} b", " ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)", " 0 ≤ m", " 0 < (m + 1) • a", " ∃ n, (↑H ∩ Ioc (n • a) ((...
[ " H = closure {a}", " {a} ⊆ ↑H", " H ≤ closure {a}", " g ∈ closure {a}", " g - k • a = 0", " False", " a ≤ g - k • a", " g - k • a ∈ H", " 0 < g - k • a" ]
import Mathlib.Init.Data.Nat.Notation import Mathlib.Init.Order.Defs set_option autoImplicit true structure UFModel (n) where parent : Fin n → Fin n rank : Nat → Nat rank_lt : ∀ i, (parent i).1 ≠ i → rank i < rank (parent i) structure UFNode (α : Type*) where parent : Nat value : α rank : Nat inductive...
Mathlib/Data/UnionFind.lean
103
112
theorem set {arr : Array α} {n} {m : Fin n → β} (H : Agrees arr f m) {i : Fin arr.size} {x} {m' : Fin n → β} (hm₁ : ∀ (j : Fin n), j.1 ≠ i → m' j = m j) (hm₂ : ∀ (h : i < n), f x = m' ⟨i, h⟩) : Agrees (arr.set i x) f m' := by
cases H refine mk' (by simp) fun j hj₁ hj₂ ↦ ?_ suffices f (Array.set arr i x)[j] = m' ⟨j, hj₂⟩ by simp_all [Array.get_set] by_cases h : i = j · subst h; rw [Array.get_set_eq, ← hm₂] · rw [arr.get_set_ne _ _ _ h, hm₁ ⟨j, _⟩ (Ne.symm h)]; rfl
[ " Agrees arr f g", " (fun i => f (arr.get i)) = g", " f (arr.get ⟨i, h⟩) = g ⟨i, h⟩", " Agrees arr f fun i => f (arr.get i)", " n = arr.size", " arr.size = arr.size", " ∀ (i : ℕ) (h₁ : i < arr.size) (h₂ : i < n), f (arr.get ⟨i, h₁⟩) = m ⟨i, h₂⟩", " ∀ (i : ℕ) (h₁ h₂ : i < arr.size), f (arr.get ⟨i, h₁⟩)...
[ " Agrees arr f g", " (fun i => f (arr.get i)) = g", " f (arr.get ⟨i, h⟩) = g ⟨i, h⟩", " Agrees arr f fun i => f (arr.get i)", " n = arr.size", " arr.size = arr.size", " ∀ (i : ℕ) (h₁ : i < arr.size) (h₂ : i < n), f (arr.get ⟨i, h₁⟩) = m ⟨i, h₂⟩", " ∀ (i : ℕ) (h₁ h₂ : i < arr.size), f (arr.get ⟨i, h₁⟩)...
import Mathlib.RingTheory.Localization.FractionRing import Mathlib.Algebra.Polynomial.RingDivision #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" noncomputable section open scoped Classical open scoped nonZeroDivisors Polynomial universe u v va...
Mathlib/FieldTheory/RatFunc/Defs.lean
189
192
theorem mk_one' (p : K[X]) : RatFunc.mk p 1 = ofFractionRing (algebraMap K[X] (FractionRing K[X]) p) := by
-- Porting note: had to hint `M := K[X]⁰` below rw [← IsLocalization.mk'_one (M := K[X]⁰) (FractionRing K[X]) p, ← mk_coe_def, Submonoid.coe_one]
[ " { toFractionRing := x } = { toFractionRing := y }", " { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }", " P", " ∀ {a c : K[X]} {b d : ↥K[X]⁰},\n (Localization.r K[X]⁰) (a, b) (c, d) → (fun p q => f p ↑q) a b = (fun p q => f p ↑q) c d", " (fun p q => f p ↑q) p q = ...
[ " { toFractionRing := x } = { toFractionRing := y }", " { toFractionRing := x } = { toFractionRing := { toFractionRing := x }.toFractionRing }", " P", " ∀ {a c : K[X]} {b d : ↥K[X]⁰},\n (Localization.r K[X]⁰) (a, b) (c, d) → (fun p q => f p ↑q) a b = (fun p q => f p ↑q) c d", " (fun p q => f p ↑q) p q = ...
import Mathlib.Data.Part import Mathlib.Data.Rel #align_import data.pfun from "leanprover-community/mathlib"@"207cfac9fcd06138865b5d04f7091e46d9320432" open Function def PFun (α β : Type*) := α → Part β #align pfun PFun infixr:25 " →. " => PFun namespace PFun variable {α β γ δ ε ι : Type*} instance inhab...
Mathlib/Data/PFun.lean
80
80
theorem mem_dom (f : α →. β) (x : α) : x ∈ Dom f ↔ ∃ y, y ∈ f x := by
simp [Dom, Part.dom_iff_mem]
[ " x ∈ f.Dom ↔ ∃ y, y ∈ f x" ]
[]
import Mathlib.Analysis.Calculus.Deriv.Basic import Mathlib.Analysis.Calculus.Deriv.Slope import Mathlib.Analysis.NormedSpace.FiniteDimension import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic #align_import analysis.calculus.fderiv_...
Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
486
492
theorem B_mem_nhdsWithin_Ioi {K : Set F} {r s ε x : ℝ} (hx : x ∈ B f K r s ε) : B f K r s ε ∈ 𝓝[>] x := by
obtain ⟨L, LK, hL₁, hL₂⟩ : ∃ L : F, L ∈ K ∧ x ∈ A f L r ε ∧ x ∈ A f L s ε := by simpa only [B, mem_iUnion, mem_inter_iff, exists_prop] using hx filter_upwards [A_mem_nhdsWithin_Ioi hL₁, A_mem_nhdsWithin_Ioi hL₂] with y hy₁ hy₂ simp only [B, mem_iUnion, mem_inter_iff, exists_prop] exact ⟨L, LK, hy₁, hy₂⟩
[ " A f L r ε ∈ 𝓝[>] x", " ∃ u ∈ Ioi x, Ioo x u ⊆ A f L r ε", " x + r' - s ∈ Ioi x", " x < x + r' - s", " ∀ y ∈ Icc x' (x' + s), ∀ z ∈ Icc x' (x' + s), ‖f z - f y - (z - y) • L‖ ≤ ε * r", " Icc x' (x' + s) ⊆ Icc x (x + r')", " x' + s ≤ x + r'", " ‖f z - f y - (z - y) • L‖ ≤ ε * r", " B f K r s ε ∈ 𝓝...
[ " A f L r ε ∈ 𝓝[>] x", " ∃ u ∈ Ioi x, Ioo x u ⊆ A f L r ε", " x + r' - s ∈ Ioi x", " x < x + r' - s", " ∀ y ∈ Icc x' (x' + s), ∀ z ∈ Icc x' (x' + s), ‖f z - f y - (z - y) • L‖ ≤ ε * r", " Icc x' (x' + s) ⊆ Icc x (x + r')", " x' + s ≤ x + r'", " ‖f z - f y - (z - y) • L‖ ≤ ε * r" ]
import Mathlib.Data.DFinsupp.Interval import Mathlib.Data.DFinsupp.Multiset import Mathlib.Order.Interval.Finset.Nat #align_import data.multiset.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29" open Finset DFinsupp Function open Pointwise variable {α : Type*} namespace Mu...
Mathlib/Data/Multiset/Interval.lean
72
74
theorem card_Ioo : (Finset.Ioo s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 2 := by
rw [Finset.card_Ioo_eq_card_Icc_sub_two, card_Icc]
[ " x ∈ (fun s t => Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp s) (toDFinsupp t))) s t ↔\n s ≤ x ∧ x ≤ t", " Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp (s ⊓ t)) (toDFinsupp (s ⊔ t))) =\n Finset.map equivDFinsupp.symm.toEmbedding (uIcc (toDFinsupp s) (toDFinsupp t)...
[ " x ∈ (fun s t => Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp s) (toDFinsupp t))) s t ↔\n s ≤ x ∧ x ≤ t", " Finset.map equivDFinsupp.symm.toEmbedding (Finset.Icc (toDFinsupp (s ⊓ t)) (toDFinsupp (s ⊔ t))) =\n Finset.map equivDFinsupp.symm.toEmbedding (uIcc (toDFinsupp s) (toDFinsupp t)...
import Mathlib.Data.Set.Finite import Mathlib.GroupTheory.GroupAction.FixedPoints import Mathlib.GroupTheory.Perm.Support open Equiv List MulAction Pointwise Set Subgroup variable {G α : Type*} [Group G] [MulAction G α] [DecidableEq α] theorem finite_compl_fixedBy_closure_iff {S : Set G} : (∀ g ∈ closure S, ...
Mathlib/GroupTheory/Perm/ClosureSwap.lean
74
88
theorem swap_mem_closure_isSwap {S : Set (Perm α)} (hS : ∀ f ∈ S, f.IsSwap) {x y : α} : swap x y ∈ closure S ↔ x ∈ orbit (closure S) y := by
refine ⟨fun h ↦ ⟨⟨swap x y, h⟩, swap_apply_right x y⟩, fun hf ↦ ?_⟩ by_contra h have := exists_smul_not_mem_of_subset_orbit_closure S {x | swap x y ∈ closure S} (fun f hf ↦ ?_) (fun z hz ↦ ?_) h ⟨y, ?_⟩ · obtain ⟨σ, hσ, a, ha, hσa⟩ := this obtain ⟨z, w, hzw, rfl⟩ := hS σ hσ have := ne_of_mem_of_not...
[ " (fixedBy α g)ᶜ.Finite", " (fixedBy α 1)ᶜ.Finite", " ∀ (x : G), (fixedBy α x)ᶜ.Finite → (fixedBy α x⁻¹)ᶜ.Finite", " (fixedBy α (g * g'))ᶜ ⊆ (fixedBy α g)ᶜ ∪ (fixedBy α g')ᶜ", " {x, y}.Finite", " z ∈ fixedBy α (swap x y)", " z ≠ x", " z ≠ y", " False", " (fixedBy α σ)ᶜ.Finite", " (fixedBy α (swa...
[ " (fixedBy α g)ᶜ.Finite", " (fixedBy α 1)ᶜ.Finite", " ∀ (x : G), (fixedBy α x)ᶜ.Finite → (fixedBy α x⁻¹)ᶜ.Finite", " (fixedBy α (g * g'))ᶜ ⊆ (fixedBy α g)ᶜ ∪ (fixedBy α g')ᶜ", " {x, y}.Finite", " z ∈ fixedBy α (swap x y)", " z ≠ x", " z ≠ y", " False", " (fixedBy α σ)ᶜ.Finite", " (fixedBy α (swa...
import Mathlib.CategoryTheory.ConcreteCategory.BundledHom import Mathlib.Topology.ContinuousFunction.Basic #align_import topology.category.Top.basic from "leanprover-community/mathlib"@"bcfa726826abd57587355b4b5b7e78ad6527b7e4" open CategoryTheory open TopologicalSpace universe u @[to_additive existing TopCat...
Mathlib/Topology/Category/TopCat/Basic.lean
175
179
theorem of_isoOfHomeo {X Y : TopCat.{u}} (f : X ≃ₜ Y) : homeoOfIso (isoOfHomeo f) = f := by
-- Porting note: unfold some defs now dsimp [homeoOfIso, isoOfHomeo] ext rfl
[ " f.toContinuousMap ≫ f.symm.toContinuousMap = 𝟙 X", " (f.toContinuousMap ≫ f.symm.toContinuousMap) x✝ = (𝟙 X) x✝", " f.symm.toContinuousMap ≫ f.toContinuousMap = 𝟙 Y", " (f.symm.toContinuousMap ≫ f.toContinuousMap) x✝ = (𝟙 Y) x✝", " f.inv (f.hom x) = x", " f.hom (f.inv x) = x", " homeoOfIso (isoOfH...
[ " f.toContinuousMap ≫ f.symm.toContinuousMap = 𝟙 X", " (f.toContinuousMap ≫ f.symm.toContinuousMap) x✝ = (𝟙 X) x✝", " f.symm.toContinuousMap ≫ f.toContinuousMap = 𝟙 Y", " (f.symm.toContinuousMap ≫ f.toContinuousMap) x✝ = (𝟙 Y) x✝", " f.inv (f.hom x) = x", " f.hom (f.inv x) = x" ]
import Mathlib.Init.Data.Sigma.Lex import Mathlib.Data.Prod.Lex import Mathlib.Data.Sigma.Lex import Mathlib.Order.Antichain import Mathlib.Order.OrderIsoNat import Mathlib.Order.WellFounded import Mathlib.Tactic.TFAE #align_import order.well_founded_set from "leanprover-community/mathlib"@"2c84c2c5496117349007d97104...
Mathlib/Order/WellFoundedSet.lean
92
93
theorem wellFoundedOn_univ : (univ : Set α).WellFoundedOn r ↔ WellFounded r := by
simp [wellFoundedOn_iff]
[ " s.WellFoundedOn r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s", " ∀ {a b : ↑s},\n r ({ toFun := Subtype.val, inj' := ⋯ } a) ({ toFun := Subtype.val, inj' := ⋯ } b) ∧\n { toFun := Subtype.val, inj' := ⋯ } a ∈ s ∧ { toFun := Subtype.val, inj' := ⋯ } b ∈ s ↔\n r ↑a ↑b", " WellFounded fun a b =>...
[ " s.WellFoundedOn r ↔ WellFounded fun a b => r a b ∧ a ∈ s ∧ b ∈ s", " ∀ {a b : ↑s},\n r ({ toFun := Subtype.val, inj' := ⋯ } a) ({ toFun := Subtype.val, inj' := ⋯ } b) ∧\n { toFun := Subtype.val, inj' := ⋯ } a ∈ s ∧ { toFun := Subtype.val, inj' := ⋯ } b ∈ s ↔\n r ↑a ↑b", " WellFounded fun a b =>...
import Mathlib.Algebra.Order.Group.Instances import Mathlib.Algebra.Order.Group.OrderIso import Mathlib.Data.Set.Pointwise.SMul import Mathlib.Order.UpperLower.Basic #align_import algebra.order.upper_lower from "leanprover-community/mathlib"@"c0c52abb75074ed8b73a948341f50521fbf43b4c" open Function Set open Pointw...
Mathlib/Algebra/Order/UpperLower.lean
70
72
theorem IsUpperSet.mul_right (hs : IsUpperSet s) : IsUpperSet (s * t) := by
rw [mul_comm] exact hs.mul_left
[ " (a • s).OrdConnected", " (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected", " IsUpperSet (s * t)", " IsUpperSet (⋃ a ∈ s, a • t)", " IsUpperSet (t * s)" ]
[ " (a • s).OrdConnected", " (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected", " IsUpperSet (s * t)", " IsUpperSet (⋃ a ∈ s, a • t)" ]
import Mathlib.Analysis.NormedSpace.Star.Basic import Mathlib.Analysis.NormedSpace.Spectrum import Mathlib.Analysis.SpecialFunctions.Exponential import Mathlib.Algebra.Star.StarAlgHom #align_import analysis.normed_space.star.spectrum from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9" l...
Mathlib/Analysis/NormedSpace/Star/Spectrum.lean
72
86
theorem IsStarNormal.spectralRadius_eq_nnnorm (a : A) [IsStarNormal a] : spectralRadius ℂ a = ‖a‖₊ := by
refine (ENNReal.pow_strictMono two_ne_zero).injective ?_ have heq : (fun n : ℕ => (‖(a⋆ * a) ^ n‖₊ : ℝ≥0∞) ^ (1 / n : ℝ)) = (fun x => x ^ 2) ∘ fun n : ℕ => (‖a ^ n‖₊ : ℝ≥0∞) ^ (1 / n : ℝ) := by funext n rw [Function.comp_apply, ← rpow_natCast, ← rpow_mul, mul_comm, rpow_mul, rpow_natCast, ← ...
[ " spectralRadius ℂ a = ↑‖a‖₊", " Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 (spectralRadius ℂ a))", " (fun _n => ↑‖a‖₊) = (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) ∘ fun n => 2 ^ n", " ↑‖a‖₊ = ((fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) ∘ fun n => 2 ^ n) n", " ↑‖a‖₊ = ↑‖a‖₊ ^ (↑(2 ^ n) * (1 / ↑(2 ^ n)))", " spectralRadius ℂ a ^ 2 = ...
[ " spectralRadius ℂ a = ↑‖a‖₊", " Tendsto (fun _n => ↑‖a‖₊) atTop (𝓝 (spectralRadius ℂ a))", " (fun _n => ↑‖a‖₊) = (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) ∘ fun n => 2 ^ n", " ↑‖a‖₊ = ((fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) ∘ fun n => 2 ^ n) n", " ↑‖a‖₊ = ↑‖a‖₊ ^ (↑(2 ^ n) * (1 / ↑(2 ^ n)))" ]
import Mathlib.FieldTheory.RatFunc.Defs import Mathlib.RingTheory.EuclideanDomain import Mathlib.RingTheory.Localization.FractionRing import Mathlib.RingTheory.Polynomial.Content #align_import field_theory.ratfunc from "leanprover-community/mathlib"@"bf9bbbcf0c1c1ead18280b0d010e417b10abb1b6" universe u v noncompu...
Mathlib/FieldTheory/RatFunc/Basic.lean
164
166
theorem ofFractionRing_div (p q : FractionRing K[X]) : ofFractionRing (p / q) = ofFractionRing p / ofFractionRing q := by
simp only [Div.div, HDiv.hDiv, RatFunc.div]
[ " { toFractionRing := 0 } = 0", " { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }", " { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }", " { toFractionRing := -p } = -{ toFractionRing := p }", " { toFractionRing := 1 } = 1", " { toFractionRing...
[ " { toFractionRing := 0 } = 0", " { toFractionRing := p + q } = { toFractionRing := p } + { toFractionRing := q }", " { toFractionRing := p - q } = { toFractionRing := p } - { toFractionRing := q }", " { toFractionRing := -p } = -{ toFractionRing := p }", " { toFractionRing := 1 } = 1", " { toFractionRing...
import Mathlib.Algebra.Polynomial.Basic #align_import data.polynomial.monomial from "leanprover-community/mathlib"@"220f71ba506c8958c9b41bd82226b3d06b0991e8" noncomputable section namespace Polynomial open Polynomial universe u variable {R : Type u} {a b : R} {m n : ℕ} variable [Semiring R] {p q r : R[X]}
Mathlib/Algebra/Polynomial/Monomial.lean
28
32
theorem monomial_one_eq_iff [Nontrivial R] {i j : ℕ} : (monomial i 1 : R[X]) = monomial j 1 ↔ i = j := by
-- Porting note: `ofFinsupp.injEq` is required. simp_rw [← ofFinsupp_single, ofFinsupp.injEq] exact AddMonoidAlgebra.of_injective.eq_iff
[ " (monomial i) 1 = (monomial j) 1 ↔ i = j", " Finsupp.single i 1 = Finsupp.single j 1 ↔ i = j" ]
[]
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
107
107
theorem mul_inv_le_iff (h : 0 < b) : a * b⁻¹ ≤ c ↔ a ≤ b * c := 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 ↔ 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" ]
import Mathlib.Algebra.Bounds import Mathlib.Algebra.Order.Field.Basic -- Porting note: `LinearOrderedField`, etc import Mathlib.Data.Set.Pointwise.SMul #align_import algebra.order.pointwise from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853" open Function Set open Pointwise variable ...
Mathlib/Algebra/Order/Pointwise.lean
137
139
theorem csInf_inv (hs₀ : s.Nonempty) (hs₁ : BddAbove s) : sInf s⁻¹ = (sSup s)⁻¹ := by
rw [← image_inv] exact ((OrderIso.inv α).map_csSup' hs₀ hs₁).symm
[ " sSup s⁻¹ = (sInf s)⁻¹", " sSup (Inv.inv '' s) = (sInf s)⁻¹", " sInf s⁻¹ = (sSup s)⁻¹", " sInf (Inv.inv '' s) = (sSup s)⁻¹" ]
[ " sSup s⁻¹ = (sInf s)⁻¹", " sSup (Inv.inv '' s) = (sInf s)⁻¹" ]
import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Data.Int.Log #align_import analysis.special_functions.log.base from "leanprover-community/mathlib"@"f23a09ce6d3f367220dc3cecad6b7eb69eb01690" open Set Filter Function open Topology noncomputable section namespace Real variable {b x y : ℝ} -- @...
Mathlib/Analysis/SpecialFunctions/Log/Base.lean
68
69
theorem logb_neg_eq_logb (x : ℝ) : logb b (-x) = logb b x := by
rw [← logb_abs x, ← logb_abs (-x), abs_neg]
[ " b.logb 0 = 0", " b.logb 1 = 0", " False", " b.logb |x| = b.logb x", " b.logb (-x) = b.logb x" ]
[ " b.logb 0 = 0", " b.logb 1 = 0", " False", " b.logb |x| = b.logb x" ]
import Mathlib.Analysis.Complex.UpperHalfPlane.Topology import Mathlib.Analysis.SpecialFunctions.Arsinh import Mathlib.Geometry.Euclidean.Inversion.Basic #align_import analysis.complex.upper_half_plane.metric from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c" noncomputable section ope...
Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
50
57
theorem cosh_half_dist (z w : ℍ) : cosh (dist z w / 2) = dist (z : ℂ) (conj (w : ℂ)) / (2 * √(z.im * w.im)) := by
rw [← sq_eq_sq, cosh_sq', sinh_half_dist, div_pow, div_pow, one_add_div, mul_pow, sq_sqrt] · congr 1 simp only [Complex.dist_eq, Complex.sq_abs, Complex.normSq_sub, Complex.normSq_conj, Complex.conj_conj, Complex.mul_re, Complex.conj_re, Complex.conj_im, coe_im] ring all_goals positivity
[ " (dist z w / 2).sinh = dist ↑z ↑w / (2 * √(z.im * w.im))", " (dist z w / 2).cosh = dist (↑z) ((starRingEnd ℂ) ↑w) / (2 * √(z.im * w.im))", " (2 ^ 2 * (z.im * w.im) + dist ↑z ↑w ^ 2) / (2 ^ 2 * (z.im * w.im)) =\n dist (↑z) ((starRingEnd ℂ) ↑w) ^ 2 / (2 ^ 2 * (z.im * w.im))", " 2 ^ 2 * (z.im * w.im) + dist ...
[ " (dist z w / 2).sinh = dist ↑z ↑w / (2 * √(z.im * w.im))" ]